diff --git a/assets/localization/en.json b/assets/localization/en.json index adaf7efa50..124dcd596f 100644 --- a/assets/localization/en.json +++ b/assets/localization/en.json @@ -15,6 +15,7 @@ "%some_localization_key%": "This is the English text for %some_localization_key%.", "%submitButton%": "Submit", "%webView_edit%": "Edit", + "%webView_openProjectSettings%": "Open Project Settings", "%webView_project%": "Project", "%webView_projectAssignmentsAndProgress%": "Assignments and Progress", "%wordList%": "Word List", @@ -30,6 +31,7 @@ "%project_name_missing%": "_NoName_", "%project_settings_platform_fullName_label%": "Project Full Name", "%project_full_name_missing%": "*Name Missing*", + "%project_language_missing%": "*Language Missing*", "%project_settings_platform_language_label%": "Project Primary Language", "%project_settings_platform_isEditable_label%": "Is Editable", "%project_settings_platform_isEditable_description%": "Whether this project is editable. A project that is not editable is sometimes called a resource." diff --git a/extensions/src/hello-world/contributions/menus.json b/extensions/src/hello-world/contributions/menus.json index b72d3794a9..a24114cef5 100644 --- a/extensions/src/hello-world/contributions/menus.json +++ b/extensions/src/hello-world/contributions/menus.json @@ -83,6 +83,12 @@ "group": "helloWorld.viewGroup", "order": 1, "command": "helloWorld.openViewerByWebViewId" + }, + { + "label": "%webView_openProjectSettings%", + "group": "helloWorld.projectGroup", + "order": 3, + "command": "platform.openProjectSettings" } ] } diff --git a/extensions/src/platform-scripture/contributions/localizedStrings.json b/extensions/src/platform-scripture/contributions/localizedStrings.json index fe1a3f6d89..b2858a1dea 100644 --- a/extensions/src/platform-scripture/contributions/localizedStrings.json +++ b/extensions/src/platform-scripture/contributions/localizedStrings.json @@ -2,10 +2,11 @@ "metadata": {}, "localizedStrings": { "en": { - "%settings_platformScripture_paratext_group_label%": "Paratext-related Settings", + "%settings_platformScripture_paratext_group_label%": "Paratext 9-related Settings", "%settings_platformScripture_paratext_group_description%": "Settings related to how Platform.Bible should interact with older Paratext installations", "%settings_platformScripture_includeMyParatext9Projects_label%": "Include My Paratext 9 Projects", "%settings_platformScripture_includeMyParatext9Projects_description%": "Whether to look in the Paratext 9 project storage folder for Paratext projects to load (Windows only). Located at \"C:\\My Paratext 9 Projects\". Note: you must restart Platform.Bible in order for a change in this setting to take effect.", + "%project_settings_platformScripture_group1_label%": "Scripture Project Settings", "%project_settings_platformScripture_booksPresent_label%": "Scripture Books Present", "%project_settings_platformScripture_booksPresent_description%": "Which books of the Bible are present in this Scripture project", "%project_settings_platformScripture_versification_label%": "Scripture Versification", diff --git a/lib/papi-dts/papi.d.ts b/lib/papi-dts/papi.d.ts index 9b1313fc7a..539844eaa7 100644 --- a/lib/papi-dts/papi.d.ts +++ b/lib/papi-dts/papi.d.ts @@ -2352,6 +2352,8 @@ declare module 'papi-shared-types' { 'test.throwError': (message: string) => void; 'platform.restartExtensionHost': () => Promise; 'platform.quit': () => Promise; + 'platform.openProjectSettings': (webViewId: string) => Promise; + 'platform.openUserSettings': () => Promise; 'test.addMany': (...nums: number[]) => number; 'test.throwErrorExtensionHost': (message: string) => void; } @@ -3831,6 +3833,31 @@ declare module 'shared/models/project-lookup.service-model' { includeProjectInterfaces: string | undefined; includePdpFactoryIds: string | undefined; }; + /** + * Determines whether the given project interfaces are included based on specified inclusion and + * exclusion rules. + * + * This function checks if a set of project interfaces meets the criteria defined by regular + * expressions for inclusion and exclusion. + * + * - A project interface is excluded if it matches any of the provided exclusion patterns. + * - A project interface is included only if it matches at least one of the provided inclusion + * patterns. + * + * @param projectInterfaces - An array of project interfaces to evaluate against the inclusion and + * exclusion patterns. + * @param includeProjectInterfaces - An array of regular expressions or arrays of regular + * expressions defining which interfaces should be included. + * @param excludeProjectInterfaces - An array of regular expressions or arrays of regular + * expressions defining which interfaces should be excluded. + * @returns A boolean value indicating whether the project interfaces satisfy the inclusion and + * exclusion criteria. + */ + export function areProjectInterfacesIncluded( + projectInterfaces: ProjectInterfaces[], + includeProjectInterfaces: (RegExp | RegExp[])[], + excludeProjectInterfaces: (RegExp | RegExp[])[], + ): boolean; /** * Compare function (for array sorting and such) that compares two PDPF Metadata infos by most * minimal match to the `projectInterface` in question. @@ -5176,6 +5203,93 @@ declare module 'shared/services/localization.service-model' { getLocalizedIdFromBookNumber(bookNum: number, localizationLanguage: string): Promise; } & IDataProvider; } +declare module 'shared/data/platform.data' { + /** + * Namespace to use for features like commands, settings, etc. on the PAPI that are provided by + * Platform.Bible core + */ + export const PLATFORM_NAMESPACE = 'platform'; + /** Query string passed to the renderer when starting if it should enable noisy dev mode */ + export const DEV_MODE_RENDERER_INDICATOR = '?noisyDevMode'; +} +declare module 'shared/log-error.model' { + /** Error that force logs the error message before throwing. Useful for debugging in some situations. */ + export default class LogError extends Error { + constructor(message?: string); + } +} +declare module 'shared/services/localization.service' { + import { ILocalizationService } from 'shared/services/localization.service-model'; + const localizationService: ILocalizationService; + export default localizationService; +} +declare module 'shared/utils/settings-document-combiner-base' { + import { SettingNames, SettingTypes } from 'papi-shared-types'; + import { + DocumentCombiner, + JsonDocumentLike, + Localized, + Setting, + SettingsGroup, + } from 'platform-bible-utils'; + /** + * Information about one specific setting. Basically just {@link Setting} but with specific default + * type info + */ + type SettingInfo = Setting & { + default: SettingTypes[SettingName]; + }; + /** Information about all settings. Keys are setting keys, values are information for that setting */ + type AllSettingsInfo = { + [SettingName in SettingNames]: SettingInfo; + }; + export type SettingsContributionInfo = { + /** Map of extension name to that extension's provided settings groups if provided */ + contributions: { + [extensionName: string]: SettingsGroup[] | undefined; + }; + /** + * Map of setting name to setting definition. For type specificity and ease of accessing settings + * since they're a bit hard to find in `contributions` + */ + settings: Partial; + }; + export type LocalizedSettingsContributionInfo = Localized; + export default abstract class SettingsDocumentCombinerBase extends DocumentCombiner { + /** Name for type of setting to use in error messages */ + protected readonly settingTypeName: string; + /** Cached promise for getting the localized output */ + private localizedOutputPromise; + constructor(baseDocument: JsonDocumentLike); + /** + * This method is intended to be layered over by a child class to expose the localized setting + * info. + * + * Get the current set of settings contribution info given all the input documents with all + * localized string keys localized properly. + * + * NOTE: If the input documents might have changed since the last time the settings contributions + * were retrieved, you can call `rebuild` to incorporate those document changes before calling + * this getter. For example, if one of the input document objects changed and + * `addOrUpdateContribution` wasn't called explicitly, those document changes will not be seen in + * the current set of settings contributions. If all the input documents are static, then there is + * no need to ever rebuild once all the documents have been contributed to this combiner. + */ + protected getLocalizedOutput(): Promise; + protected validateBaseDocument(baseDocument: JsonDocumentLike): void; + protected transformBaseDocumentAfterValidation( + baseDocument: JsonDocumentLike, + ): JsonDocumentLike; + protected validateContribution(documentName: string, document: JsonDocumentLike): void; + protected transformContributionAfterValidation( + documentName: string, + document: JsonDocumentLike, + ): JsonDocumentLike; + protected validateOutput(): void; + /** Validate the base and contribution documents against the JSON schema */ + protected abstract performSchemaValidation(document: JsonDocumentLike, docType: string): void; + } +} declare module 'shared/services/settings.service-model' { import { SettingNames, SettingTypes } from 'papi-shared-types'; import { OnDidDispose, UnsubscriberAsync } from 'platform-bible-utils'; @@ -5184,6 +5298,7 @@ declare module 'shared/services/settings.service-model' { DataProviderSubscriberOptions, DataProviderUpdateInstructions, } from 'shared/models/data-provider.model'; + import { LocalizedSettingsContributionInfo } from 'shared/utils/settings-document-combiner-base'; /** Name prefix for registered commands that call settings validators */ export const CATEGORY_EXTENSION_SETTING_VALIDATOR = 'extensionSettingValidator'; /** @@ -5259,6 +5374,20 @@ declare module 'shared/services/settings.service-model' { * @throws If no default value is available for the setting. */ get(key: SettingName): Promise; + /** + * Validates the setting at the given key with the new value provided + * + * @param key The string id of the setting to validate + * @param newValue The value to validate + * @param currentValue The value already set to the setting + * @param allChanges + */ + validateSetting( + key: SettingName, + newValue: SettingTypes[SettingName], + currentValue: SettingTypes[SettingName], + allChanges?: Partial, + ): Promise; /** * Sets the value of the specified setting * @@ -5305,13 +5434,85 @@ declare module 'shared/services/settings.service-model' { key: SettingName, validator: SettingValidator, ): Promise; + /** + * Get the current set of settings contribution info given all the input documents with all + * localized string keys localized properly. + * + * @returns Localized project settings contribution info or undefined + */ + getLocalizedSettingsContributionInfo(): Promise; } & OnDidDispose & IDataProvider & typeof settingsServiceObjectToProxy; } +declare module 'shared/utils/project-settings-document-combiner' { + import { ProjectSettingNames, ProjectSettingTypes } from 'papi-shared-types'; + import { + JsonDocumentLike, + Localized, + ProjectSetting, + ProjectSettingsGroup, + } from 'platform-bible-utils'; + import SettingsDocumentCombinerBase from 'shared/utils/settings-document-combiner-base'; + /** + * Information about one specific setting. Basically just {@link Setting} but with specific default + * type info + */ + type ProjectSettingInfo = ProjectSetting & { + default: ProjectSettingTypes[ProjectSettingName]; + }; + /** Information about all settings. Keys are setting keys, values are information for that setting */ + type AllProjectSettingsInfo = { + [ProjectSettingName in ProjectSettingNames]: ProjectSettingInfo; + }; + export type ProjectSettingsContributionInfo = { + /** Map of extension name to that extension's provided settings groups if provided */ + contributions: { + [extensionName: string]: ProjectSettingsGroup[] | undefined; + }; + /** + * Map of setting name to setting definition. For type specificity and ease of accessing settings + * since they're a bit hard to find in `contributions` + */ + settings: Partial; + }; + export type LocalizedProjectSettingsContributionInfo = Localized; + export default class ProjectSettingsDocumentCombiner extends SettingsDocumentCombinerBase { + protected readonly settingTypeName = 'Project Setting'; + /** + * Get the current set of project settings contribution info given all the input documents. + * Localized string keys have not been localized to corresponding strings. + * + * NOTE: If the input documents might have changed since the last time the project settings + * contributions were retrieved, you can call `rebuild` to incorporate those document changes + * before calling this getter. For example, if one of the input document objects changed and + * `addOrUpdateContribution` wasn't called explicitly, those document changes will not be seen in + * the current set of project settings contributions. If all the input documents are static, then + * there is no need to ever rebuild once all the documents have been contributed to this + * combiner. + */ + getProjectSettingsContributionInfo(): ProjectSettingsContributionInfo | undefined; + /** + * Get the current set of settings contribution info given all the input documents with all + * localized string keys localized properly. + * + * NOTE: If the input documents might have changed since the last time the settings contributions + * were retrieved, you can call `rebuild` to incorporate those document changes before calling + * this getter. For example, if one of the input document objects changed and + * `addOrUpdateContribution` wasn't called explicitly, those document changes will not be seen in + * the current set of settings contributions. If all the input documents are static, then there is + * no need to ever rebuild once all the documents have been contributed to this combiner. + */ + getLocalizedProjectSettingsContributionInfo(): Promise< + LocalizedProjectSettingsContributionInfo | undefined + >; + protected performSchemaValidation(document: JsonDocumentLike, docType: string): void; + } +} declare module 'shared/services/project-settings.service-model' { import { ProjectSettingNames, ProjectSettingTypes } from 'papi-shared-types'; import { UnsubscriberAsync } from 'platform-bible-utils'; + import { LocalizedProjectSettingsContributionInfo } from 'shared/utils/project-settings-document-combiner'; /** Name prefix for registered commands that call project settings validators */ export const CATEGORY_EXTENSION_PROJECT_SETTING_VALIDATOR = 'extensionProjectSettingValidator'; export const projectSettingsServiceNetworkObjectName = 'ProjectSettingsService'; @@ -5382,6 +5583,13 @@ declare module 'shared/services/project-settings.service-model' { key: ProjectSettingName, validatorCallback: ProjectSettingValidator, ): Promise; + /** + * Get the current set of project settings contribution info given all the input documents with + * all localized string keys localized properly. + * + * @returns Localized project settings contribution info or undefined + */ + getLocalizedContributionInfo(): Promise; } /** * All project settings changes being set in one batch @@ -5601,11 +5809,6 @@ declare module 'shared/services/menu-data.service' { const menuDataService: IMenuDataService; export default menuDataService; } -declare module 'shared/services/localization.service' { - import { ILocalizationService } from 'shared/services/localization.service-model'; - const localizationService: ILocalizationService; - export default localizationService; -} declare module 'shared/services/settings.service' { import { ISettingsService } from 'shared/services/settings.service-model'; const settingsService: ISettingsService; @@ -5613,6 +5816,26 @@ declare module 'shared/services/settings.service' { } declare module 'shared/services/project-settings.service' { import { IProjectSettingsService } from 'shared/services/project-settings.service-model'; + import { Localized } from 'platform-bible-utils'; + import { ProjectSettingsContributionInfo } from 'shared/utils/project-settings-document-combiner'; + import { ProjectDataProviderInterfaces } from 'papi-shared-types'; + /** + * Filters project settings contributions based on the provided project interfaces. + * + * This function iterates over a set of project settings contributions and filters their properties + * based on whether the project's interfaces match the specified inclusion and exclusion criteria. + * + * @param contributions - An object containing project settings contributions, which may be + * localized. + * @param projectInterfaces - An array of keys representing the project interfaces to filter the + * contributions by. + * @returns A filtered set of contributions, or `undefined` if no contributions match the project + * interfaces. + */ + export function filterProjectSettingsContributionsByProjectInterfaces( + contributions: Localized | undefined, + projectInterfaces: (keyof ProjectDataProviderInterfaces)[], + ): Localized | undefined; const projectSettingsService: IProjectSettingsService; export default projectSettingsService; } diff --git a/lib/platform-bible-react/dist/index.cjs b/lib/platform-bible-react/dist/index.cjs index dca6326727..e63bb984eb 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 l=require("react/jsx-runtime"),E=require("react"),re=require("lucide-react"),Se=require("clsx"),tc=require("tailwind-merge"),xs=require("@radix-ui/react-dropdown-menu"),He=require("platform-bible-utils"),Ce=require("@tanstack/react-table"),nc=require("@radix-ui/react-slot"),xo=require("class-variance-authority"),rc=require("@radix-ui/react-select"),Ee=require("@mui/material"),oc=require("@radix-ui/react-popover"),Ie=require("cmdk"),ac=require("@radix-ui/react-dialog"),oo=require("@mui/styled-engine"),kn=require("react-dom"),sc=require("@radix-ui/react-label"),ic=require("@radix-ui/react-tabs"),lc=require("@radix-ui/react-slider"),cc=require("@radix-ui/react-switch");function nt(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 T=nt(E),he=nt(xs),we=nt(rc),$n=nt(oc),Qe=nt(ac),pc=nt(kn),ks=nt(sc),De=nt(ic),En=nt(lc),ao=nt(cc);const dc=tc.extendTailwindMerge({prefix:"pr-"});function F(...e){return dc(Se.clsx(e))}const Vn=E.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:F("pr-flex pr-h-10 pr-rounded-md pr-bg-background pr-px-3 pr-py-2 pr-text-sm pr-ring-offset-background file:pr-border-0 file:pr-bg-transparent file:pr-text-sm file:pr-font-medium placeholder:pr-text-muted-foreground disabled:pr-cursor-not-allowed disabled:pr-opacity-50",e),ref:r,...n}));Vn.displayName="Input";const uc=E.forwardRef(({handleSearch:e,handleKeyDown:t,handleOnClick:n,handleSubmit:r,...o},a)=>l.jsxs("div",{className:"pr-relative",children:[l.jsx(Vn,{...o,type:"text",className:"pr-box-border pr-gap-2.5 pr-rounded-lg pr-border pr-border-solid pr-border-black pr-bg-white pr-py-2 pr-pl-4 pr-pr-3 pr-font-medium pr-text-slate-900 pr-shadow-none pr-outline-none",onChange:s=>e(s.target.value),onKeyDown:s=>{s.key==="Enter"&&r(),t(s)},onClick:n,ref:a}),l.jsx(re.History,{className:"pr-absolute pr-right-3 pr-top-1/2 pr-h-4 pr-w-4 pr--translate-y-1/2 pr-transform pr-cursor-pointer pr-text-gray-500",onClick:()=>{console.log("back in history")}})]}));var fc=Object.defineProperty,mc=(e,t,n)=>t in e?fc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>mc(e,typeof t!="symbol"?t+"":t,n);const Mt=["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"],ko=["XXA","XXB","XXC","XXD","XXE","XXF","XXG","FRT","BAK","OTH","INT","CNC","GLO","TDX","NDX"],Es=["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"],ha=Nc();function an(e,t=!0){return t&&(e=e.toUpperCase()),e in ha?ha[e]:0}function Eo(e){return an(e)>0}function hc(e){const t=typeof e=="string"?an(e):e;return t>=40&&t<=66}function gc(e){return(typeof e=="string"?an(e):e)<=39}function Ns(e){return e<=66}function bc(e){const t=typeof e=="string"?an(e):e;return Cs(t)&&!Ns(t)}function*vc(){for(let e=1;e<=Mt.length;e++)yield e}const yc=1,Ts=Mt.length;function wc(){return["XXA","XXB","XXC","XXD","XXE","XXF","XXG"]}function No(e,t="***"){const n=e-1;return n<0||n>=Mt.length?t:Mt[n]}function Ss(e){return e<=0||e>Ts?"******":Es[e-1]}function xc(e){return Ss(an(e))}function Cs(e){const t=typeof e=="number"?No(e):e;return Eo(t)&&!ko.includes(t)}function kc(e){const t=typeof e=="number"?No(e):e;return Eo(t)&&ko.includes(t)}function Ec(e){return Es[e-1].includes("*obsolete*")}function Nc(){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))(Je||{});const Le=class{constructor(t){if(oe(this,"name"),oe(this,"fullPath"),oe(this,"isPresent"),oe(this,"hasVerseSegments"),oe(this,"isCustomized"),oe(this,"baseVersification"),oe(this,"scriptureBooks"),oe(this,"_type"),t==null)throw new Error("Argument undefined");typeof t=="string"?(this.name=t,this._type=Je[t]):(this._type=t,this.name=Je[t])}get type(){return this._type}equals(t){return!t.type||!this.type?!1:t.type===this.type}};oe(Le,"Original",new Le(Je.Original)),oe(Le,"Septuagint",new Le(Je.Septuagint)),oe(Le,"Vulgate",new Le(Je.Vulgate)),oe(Le,"English",new Le(Je.English)),oe(Le,"RussianProtestant",new Le(Je.RussianProtestant)),oe(Le,"RussianOrthodox",new Le(Je.RussianOrthodox));let St=Le;function ga(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))(Os||{});const $e=class le{constructor(t,n,r,o){if(oe(this,"firstChapter"),oe(this,"lastChapter"),oe(this,"lastVerse"),oe(this,"hasSegmentsDefined"),oe(this,"text"),oe(this,"BBBCCCVVVS"),oe(this,"longHashCode"),oe(this,"versification"),oe(this,"rtlMark","‏"),oe(this,"_bookNum",0),oe(this,"_chapterNum",0),oe(this,"_verseNum",0),oe(this,"_verse"),r==null&&o==null)if(t!=null&&typeof t=="string"){const a=t,s=n!=null&&n instanceof St?n:void 0;this.setEmpty(s),this.parse(a)}else if(t!=null&&typeof t=="number"){const a=n!=null&&n instanceof St?n:void 0;this.setEmpty(a),this._verseNum=t%le.chapterDigitShifter,this._chapterNum=Math.floor(t%le.bookDigitShifter/le.chapterDigitShifter),this._bookNum=Math.floor(t/le.bookDigitShifter)}else if(n==null)if(t!=null&&t instanceof le){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 St?t:le.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??le.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 le(t),{success:!0,verseRef:n}}catch(r){if(r instanceof hn)return n=new le,{success:!1,verseRef:n};throw r}}static getBBBCCCVVV(t,n,r){return t%le.bcvMaxValue*le.bookDigitShifter+(n>=0?n%le.bcvMaxValue*le.chapterDigitShifter:0)+(r>=0?r%le.bcvMaxValue:0)}static fromJSON(t){const{book:n,chapterNum:r,verseNum:o,verse:a,versificationStr:s}=t,c=a||o.toString();let p;return s&&(p=new St(s)),n?new le(n,r.toString(),c,p):new le}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>le.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(le.verseRangeSeparator)||this._verse.includes(le.verseSequenceIndicator))}get book(){return fe.bookNumberToId(this.bookNum,"")}set book(t){this.bookNum=fe.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}=le.tryGetVerseNum(t);this._verse=n?void 0:t.replace(this.rtlMark,""),this._verseNum=r,!(this._verseNum>=0)&&({vNum:this._verseNum}=le.tryGetVerseNum(this._verse))}get bookNum(){return this._bookNum}set bookNum(t){if(t<=0||t>fe.lastBook)throw new hn("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 St(t):void 0}get valid(){return this.validStatus===0}get validStatus(){return this.validateVerse(le.verseRangeSeparators,le.verseSequenceIndicators)}get BBBCCC(){return le.getBBBCCCVVV(this._bookNum,this._chapterNum,0)}get BBBCCCVVV(){return le.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 s=+a[1].trim();this.versification=new St(Je[s])}catch{throw new hn("Invalid reference : "+t)}}const n=t.trim().split(" ");if(n.length!==2)throw new hn("Invalid reference : "+t);const r=n[1].split(":"),o=+r[0];if(r.length!==2||fe.bookIdToNumber(n[0])===0||!Number.isInteger(o)||o<0||!le.isVerseParseable(r[1]))throw new hn("Invalid reference : "+t);this.updateInternal(n[0],r[0],r[1])}simplify(){this._verse=void 0}clone(){return new le(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 le?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=le.verseRangeSeparators,r=le.verseSequenceIndicators){if(this._verse==null||this.chapterNum<=0)return[this.clone()];const o=[],a=ga(this._verse,r);for(const s of a.map(c=>ga(c,n))){const c=this.clone();c.verse=s[0];const p=c.verseNum;if(o.push(c),s.length>1){const f=this.clone();if(f.verse=s[1],!t)for(let m=p+1;ms)return 3;if(r===s)return 4;r=s}return 0}get internalValid(){return this.versification==null?1:this._bookNum<=0||this._bookNum>fe.lastBook?2:(fe.isCanonical(this._bookNum),0)}setEmpty(t=le.defaultVersification){this._bookNum=0,this._chapterNum=-1,this._verse=void 0,this.versification=t}updateInternal(t,n,r){this.bookNum=fe.bookIdToNumber(t),this.chapter=n,this.verse=r}};oe($e,"defaultVersification",St.English),oe($e,"verseRangeSeparator","-"),oe($e,"verseSequenceIndicator",","),oe($e,"verseRangeSeparators",[$e.verseRangeSeparator]),oe($e,"verseSequenceIndicators",[$e.verseSequenceIndicator]),oe($e,"chapterDigitShifter",1e3),oe($e,"bookDigitShifter",$e.chapterDigitShifter*$e.chapterDigitShifter),oe($e,"bcvMaxValue",$e.chapterDigitShifter-1),oe($e,"ValidStatusType",Os);let hn=class extends Error{};const xr=he.Root,To=he.Trigger,js=he.Group,Tc=he.Portal,Sc=he.Sub,Cc=he.RadioGroup,Rs=E.forwardRef(({className:e,inset:t,children:n,...r},o)=>l.jsxs(he.SubTrigger,{ref:o,className:F("pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none focus:pr-bg-accent data-[state=open]:pr-bg-accent",t&&"pr-pl-8",e),...r,children:[n,l.jsx(re.ChevronRight,{className:"pr-ml-auto pr-h-4 pr-w-4"})]}));Rs.displayName=he.SubTrigger.displayName;const Ps=E.forwardRef(({className:e,...t},n)=>l.jsx(he.SubContent,{ref:n,className:F("pr-z-50 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-p-1 pr-text-popover-foreground pr-shadow-lg data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2",e),...t}));Ps.displayName=he.SubContent.displayName;const Fn=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(he.Portal,{children:l.jsx(he.Content,{ref:r,sideOffset:t,className:F("pr-twp pr-z-50 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-p-1 pr-text-popover-foreground pr-shadow-md data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2",e),...n})}));Fn.displayName=he.Content.displayName;const So=E.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(he.Item,{ref:r,className:F("pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50",t&&"pr-pl-8",e),...n}));So.displayName=he.Item.displayName;const kr=E.forwardRef(({className:e,children:t,checked:n,...r},o)=>l.jsxs(he.CheckboxItem,{ref:o,className:F("pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50",e),checked:n,...r,children:[l.jsx("span",{className:"pr-absolute pr-left-2 pr-flex pr-h-3.5 pr-w-3.5 pr-items-center pr-justify-center",children:l.jsx(he.ItemIndicator,{children:l.jsx(re.Check,{className:"pr-h-4 pr-w-4"})})}),t]}));kr.displayName=he.CheckboxItem.displayName;const Co=E.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(he.RadioItem,{ref:r,className:F("pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50",e),...n,children:[l.jsx("span",{className:"pr-absolute pr-left-2 pr-flex pr-h-3.5 pr-w-3.5 pr-items-center pr-justify-center",children:l.jsx(he.ItemIndicator,{children:l.jsx(re.Circle,{className:"pr-h-2 pr-w-2 pr-fill-current"})})}),t]}));Co.displayName=he.RadioItem.displayName;const sn=E.forwardRef(({className:e,inset:t,...n},r)=>l.jsx(he.Label,{ref:r,className:F("pr-px-2 pr-py-1.5 pr-text-sm pr-font-semibold",t&&"pr-pl-8",e),...n}));sn.displayName=he.Label.displayName;const zn=E.forwardRef(({className:e,...t},n)=>l.jsx(he.Separator,{ref:n,className:F("pr--mx-1 pr-my-1 pr-h-px pr-bg-muted",e),...t}));zn.displayName=he.Separator.displayName;function $s({className:e,...t}){return l.jsx("span",{className:F("pr-ml-auto pr-text-xs pr-tracking-widest pr-opacity-60",e),...t})}$s.displayName="DropdownMenuShortcut";const Oc=E.forwardRef(({bookId:e,handleSelectBook:t,isSelected:n,handleHighlightBook:r,handleKeyDown:o,bookType:a,children:s},c)=>l.jsxs(So,{ref:c,textValue:e,className:F("pr-font-normal pr-text-slate-700",{"pr-bg-amber-50 pr-text-yellow-900 data-[highlighted]:pr-bg-amber-100":n}),onSelect:p=>{p.preventDefault(),t()},onKeyDown:p=>{o(p)},onFocus:r,onMouseMove:r,children:[l.jsx("span",{className:F("pr-border-b-0 pr-border-l-2 pr-border-r-0 pr-border-t-0 pr-border-solid pr-px-2",{"pr-font-bold":n,"pr-border-l-red-200":a.toLowerCase()==="ot","pr-border-l-purple-200":a.toLowerCase()==="nt","pr-border-l-indigo-200":a.toLowerCase()==="dc"}),children:fe.bookIdToEnglishName(e)}),n&&l.jsx("div",{children:s})]},e));function jc({handleSelectChapter:e,endChapter:t,activeChapter:n,highlightedChapter:r,handleHighlightedChapter:o}){const a=Array.from({length:t},(c,p)=>p+1),s=E.useCallback(c=>{o(c)},[o]);return l.jsx("div",{className:F("pr-flex pr-flex-wrap pr-items-start pr-justify-start pr-self-stretch"),children:a.map(c=>l.jsx("div",{className:F("pr-flex pr-h-4 pr-w-4 pr-cursor-pointer pr-items-center pr-justify-end pr-rounded-md pr-p-2 pr-text-amber-800",{"pr-font-semibold pr-text-amber-900":c===n,"pr-bg-amber-200":c===r}),onClick:p=>{p.preventDefault(),p.stopPropagation(),e(c)},role:"button",onKeyDown:p=>{p.key==="Enter"&&e(c)},tabIndex:0,onMouseMove:()=>s(c),children:c},c))})}function Rc({handleSort:e,handleLocationHistory:t,handleBookmarks:n}){return l.jsxs(sn,{className:"pr-flex pr-justify-between",children:[l.jsx("p",{className:"pr-inline-block pr-align-middle",children:"Go To"}),l.jsxs("div",{className:"pr-flex pr-items-center",children:[l.jsx(re.ArrowDownWideNarrow,{onClick:e,className:"pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2"}),l.jsx(re.Clock,{onClick:t,className:"pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2"}),l.jsx(re.Bookmark,{onClick:n,className:"pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2"})]})]})}const Cn=fe.allBookIds,Pc={OT:"Old Testament",NT:"New Testament",DC:"Deuterocanon"},ba=["OT","NT","DC"],$c=32+32+32,_c=[/^(\w+)$/i,/^(\w+)(?:\s(\d+))$/i,/^(\w+)(?:\s(\d+):(\d+))$/i],Mc=e=>({OT:Cn.filter(n=>fe.isBookOT(n)),NT:Cn.filter(n=>fe.isBookNT(n)),DC:Cn.filter(n=>fe.isBookDC(n))})[e],gn=e=>He.getChaptersForBook(fe.bookIdToNumber(e));function Ic(){return Cn.map(t=>fe.bookIdToEnglishName(t))}function Dc(e){return Ic().includes(e)}function Ac(e){const t=e.toLowerCase().replace(/^\w/,n=>n.toUpperCase());if(Dc(t))return Cn.find(r=>fe.bookIdToEnglishName(r)===t)}function Bc({scrRef:e,handleSubmit:t}){const[n,r]=E.useState(""),[o,a]=E.useState(fe.bookNumberToId(e.bookNum)),[s,c]=E.useState(e.chapterNum??0),[p,f]=E.useState(fe.bookNumberToId(e.bookNum)),[m,v]=E.useState(!1),[g,d]=E.useState(m),h=E.useRef(void 0),u=E.useRef(void 0),b=E.useRef(void 0),x=E.useCallback($=>Mc($).filter(N=>{const O=fe.bookIdToEnglishName(N).toLowerCase(),_=n.replace(/[^a-zA-Z]/g,"").toLowerCase();return O.includes(_)||N.toLowerCase().includes(_)}),[n]),R=$=>{r($)},w=E.useRef(!1),k=E.useCallback($=>{if(w.current){w.current=!1;return}v($)},[]),y=E.useCallback(($,N,O,_)=>{if(c(fe.bookNumberToId(e.bookNum)!==$?1:e.chapterNum),N||gn($)===-1){t({bookNum:fe.bookIdToNumber($),chapterNum:O||1,verseNum:_||1}),v(!1),r("");return}a(o!==$?$:""),v(!N)},[t,e.bookNum,e.chapterNum,o]),S=$=>{$<=0||$>gn(o)||y(o,!0,$)},C=E.useCallback(()=>{_c.forEach($=>{const N=n.match($);if(N){const[O,_=void 0,U=void 0]=N.slice(1),B=Ac(O);(fe.isBookIdValid(O)||B)&&y(B??O,!0,_?parseInt(_,10):1,U?parseInt(U,10):1)}})},[y,n]),M=E.useCallback($=>{m?($.key==="ArrowDown"||$.key==="ArrowUp")&&(typeof b<"u"&&b.current!==null?b.current.focus():typeof u<"u"&&u.current!==null&&u.current.focus(),$.preventDefault()):v(!0)},[m]),A=$=>{const{key:N}=$;N==="ArrowRight"||N==="ArrowLeft"||N==="ArrowDown"||N==="ArrowUp"||N==="Enter"||(h.current.dispatchEvent(new KeyboardEvent("keydown",{key:N})),h.current.focus())},z=$=>{const{key:N}=$;if(p===o){if(N==="Enter"){$.preventDefault(),y(o,!0,s);return}let O=0;if(N==="ArrowRight")if(s1)O=-1;else{$.preventDefault();return}else N==="ArrowDown"?O=6:N==="ArrowUp"&&(O=-6);s+O<=0||s+O>gn(p)?c(0):O!==0&&(c(s+O),$.preventDefault())}};return E.useEffect(()=>{o===p?o===fe.bookNumberToId(e.bookNum)?c(e.chapterNum):c(1):c(0)},[p,e.bookNum,e.chapterNum,o]),E.useLayoutEffect(()=>{d(m)},[m]),E.useLayoutEffect(()=>{const $=setTimeout(()=>{if(g&&u.current&&b.current){const O=b.current.offsetTop-$c;u.current.scrollTo({top:O,behavior:"instant"})}},10);return()=>{clearTimeout($)}},[g]),l.jsx("div",{className:"pr-flex",children:l.jsxs(xr,{modal:!1,open:m,onOpenChange:k,children:[l.jsx(To,{asChild:!0,children:l.jsx(uc,{ref:h,value:n,handleSearch:R,handleKeyDown:M,handleOnClick:()=>{a(fe.bookNumberToId(e.bookNum)),f(fe.bookNumberToId(e.bookNum)),c(e.chapterNum>0?e.chapterNum:0),v(!0),h.current.focus()},onFocus:()=>{w.current=!0},handleSubmit:C,placeholder:`${fe.bookNumberToEnglishName(e.bookNum)} ${e.chapterNum}:${e.verseNum}`})}),l.jsxs(Fn,{className:"pr-overflow-y-auto pr-font-normal pr-text-slate-700",style:{width:"233px",maxHeight:"500px"},onKeyDown:A,align:"start",ref:u,children:[l.jsx(Rc,{handleSort:()=>console.log("sorting"),handleLocationHistory:()=>console.log("location history"),handleBookmarks:()=>console.log("bookmarks")}),ba.map(($,N)=>x($).length>0&&l.jsxs("div",{children:[l.jsx(sn,{className:"pr-font-semibold pr-text-slate-700",children:Pc[$]}),x($).map(O=>l.jsx("div",{children:l.jsx(Oc,{bookId:O,handleSelectBook:()=>y(O,!1),isSelected:o===O,handleHighlightBook:()=>f(O),handleKeyDown:z,bookType:$,ref:_=>{o===O&&(b.current=_)},children:l.jsx(jc,{handleSelectChapter:S,endChapter:gn(O),activeChapter:e.bookNum===fe.bookIdToNumber(O)?e.chapterNum:0,highlightedChapter:s,handleHighlightedChapter:_=>{c(_)}})})},O)),ba.length-1!==N?l.jsx(zn,{}):void 0]},$))]})]})})}const _s=xo.cva("pr-twp pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-md pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50",{variants:{variant:{default:"pr-bg-primary pr-text-primary-foreground hover:pr-bg-primary/90",destructive:"pr-bg-destructive pr-text-destructive-foreground hover:pr-bg-destructive/90",outline:"pr-border pr-border-input pr-bg-background hover:pr-bg-accent hover:pr-text-accent-foreground",secondary:"pr-bg-secondary pr-text-secondary-foreground hover:pr-bg-secondary/80",ghost:"hover:pr-bg-accent hover:pr-text-accent-foreground",link:"pr-text-primary pr-underline-offset-4 hover:pr-underline"},size:{default:"pr-h-10 pr-px-4 pr-py-2",sm:"pr-h-9 pr-rounded-md pr-px-3",lg:"pr-h-11 pr-rounded-md pr-px-8",icon:"pr-h-10 pr-w-10"}},defaultVariants:{variant:"default",size:"default"}}),be=E.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?nc.Slot:"button";return l.jsx(s,{className:F(_s({variant:t,size:n,className:e})),ref:a,...o})});be.displayName="Button";function Lc({table:e}){return l.jsxs(xr,{children:[l.jsx(xs.DropdownMenuTrigger,{asChild:!0,children:l.jsxs(be,{variant:"outline",size:"sm",className:"pr-ml-auto pr-hidden pr-h-8 lg:pr-flex",children:[l.jsx(re.FilterIcon,{className:"pr-mr-2 pr-h-4 pr-w-4"}),"View"]})}),l.jsxs(Fn,{align:"end",className:"pr-w-[150px]",children:[l.jsx(sn,{children:"Toggle columns"}),l.jsx(zn,{}),e.getAllColumns().filter(t=>t.getCanHide()).map(t=>l.jsx(kr,{className:"pr-capitalize",checked:t.getIsVisible(),onCheckedChange:n=>t.toggleVisibility(!!n),children:t.id},t.id))]})]})}const _n=we.Root,Ms=we.Group,Mn=we.Value,Kt=E.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(we.Trigger,{ref:r,className:F("pr-flex pr-h-10 pr-w-full pr-items-center pr-justify-between pr-rounded-md pr-border pr-border-input pr-bg-background pr-px-3 pr-py-2 pr-text-sm pr-ring-offset-background placeholder:pr-text-muted-foreground focus:pr-outline-none focus:pr-ring-2 focus:pr-ring-ring focus:pr-ring-offset-2 disabled:pr-cursor-not-allowed disabled:pr-opacity-50 [&>span]:pr-line-clamp-1",e),...n,children:[t,l.jsx(we.Icon,{asChild:!0,children:l.jsx(re.ChevronDown,{className:"pr-h-4 pr-w-4 pr-opacity-50"})})]}));Kt.displayName=we.Trigger.displayName;const Oo=E.forwardRef(({className:e,...t},n)=>l.jsx(we.ScrollUpButton,{ref:n,className:F("pr-flex pr-cursor-default pr-items-center pr-justify-center pr-py-1",e),...t,children:l.jsx(re.ChevronUp,{className:"pr-h-4 pr-w-4"})}));Oo.displayName=we.ScrollUpButton.displayName;const jo=E.forwardRef(({className:e,...t},n)=>l.jsx(we.ScrollDownButton,{ref:n,className:F("pr-flex pr-cursor-default pr-items-center pr-justify-center pr-py-1",e),...t,children:l.jsx(re.ChevronDown,{className:"pr-h-4 pr-w-4"})}));jo.displayName=we.ScrollDownButton.displayName;const Jt=E.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>l.jsx(we.Portal,{children:l.jsxs(we.Content,{ref:o,className:F("pr-twp pr-relative pr-z-50 pr-max-h-96 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-text-popover-foreground pr-shadow-md data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:pr-translate-y-1 data-[side=left]:pr--translate-x-1 data-[side=right]:pr-translate-x-1 data-[side=top]:pr--translate-y-1",e),position:n,...r,children:[l.jsx(Oo,{}),l.jsx(we.Viewport,{className:F("pr-p-1",n==="popper"&&"pr-h-[var(--radix-select-trigger-height)] pr-w-full pr-min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(jo,{})]})}));Jt.displayName=we.Content.displayName;const Is=E.forwardRef(({className:e,...t},n)=>l.jsx(we.Label,{ref:n,className:F("pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-font-semibold",e),...t}));Is.displayName=we.Label.displayName;const Ke=E.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(we.Item,{ref:r,className:F("pr-relative pr-flex pr-w-full pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50",e),...n,children:[l.jsx("span",{className:"pr-absolute pr-left-2 pr-flex pr-h-3.5 pr-w-3.5 pr-items-center pr-justify-center",children:l.jsx(we.ItemIndicator,{children:l.jsx(re.Check,{className:"pr-h-4 pr-w-4"})})}),l.jsx(we.ItemText,{children:t})]}));Ke.displayName=we.Item.displayName;const Ds=E.forwardRef(({className:e,...t},n)=>l.jsx(we.Separator,{ref:n,className:F("pr--mx-1 pr-my-1 pr-h-px pr-bg-muted",e),...t}));Ds.displayName=we.Separator.displayName;function Vc({table:e}){return l.jsx("div",{className:"pr-flex pr-items-center pr-justify-between pr-px-2 pr-pb-3 pr-pt-3",children:l.jsxs("div",{className:"pr-flex pr-items-center pr-space-x-6 lg:pr-space-x-8",children:[l.jsxs("div",{className:"pr-flex-1 pr-text-sm pr-text-muted-foreground",children:[e.getFilteredSelectedRowModel().rows.length," of"," ",e.getFilteredRowModel().rows.length," row(s) selected"]}),l.jsxs("div",{className:"pr-flex pr-items-center pr-space-x-2",children:[l.jsx("p",{className:"pr-text-nowrap pr-text-sm pr-font-medium",children:"Rows per page"}),l.jsxs(_n,{value:`${e.getState().pagination.pageSize}`,onValueChange:t=>{e.setPageSize(Number(t))},children:[l.jsx(Kt,{className:"pr-h-8 pr-w-[70px]",children:l.jsx(Mn,{placeholder:e.getState().pagination.pageSize})}),l.jsx(Jt,{side:"top",children:[10,20,30,40,50].map(t=>l.jsx(Ke,{value:`${t}`,children:t},t))})]})]}),l.jsxs("div",{className:"pr-flex pr-w-[100px] pr-items-center pr-justify-center pr-text-sm pr-font-medium",children:["Page ",e.getState().pagination.pageIndex+1," of ",e.getPageCount()]}),l.jsxs("div",{className:"pr-flex pr-items-center pr-space-x-2",children:[l.jsxs(be,{variant:"outline",size:"icon",className:"pr-hidden pr-h-8 pr-w-8 pr-p-0 lg:pr-flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[l.jsx("span",{className:"pr-sr-only",children:"Go to first page"}),l.jsx(re.ArrowLeftIcon,{className:"pr-h-4 pr-w-4"})]}),l.jsxs(be,{variant:"outline",size:"icon",className:"pr-h-8 pr-w-8 pr-p-0",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[l.jsx("span",{className:"pr-sr-only",children:"Go to previous page"}),l.jsx(re.ChevronLeftIcon,{className:"pr-h-4 pr-w-4"})]}),l.jsxs(be,{variant:"outline",size:"icon",className:"pr-h-8 pr-w-8 pr-p-0",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[l.jsx("span",{className:"pr-sr-only",children:"Go to next page"}),l.jsx(re.ChevronRightIcon,{className:"pr-h-4 pr-w-4"})]}),l.jsxs(be,{variant:"outline",size:"icon",className:"pr-hidden pr-h-8 pr-w-8 pr-p-0 lg:pr-flex",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[l.jsx("span",{className:"pr-sr-only",children:"Go to last page"}),l.jsx(re.ArrowRightIcon,{className:"pr-h-4 pr-w-4"})]})]})]})})}const Un=E.forwardRef(({className:e,stickyHeader:t,...n},r)=>l.jsx("div",{className:F("pr-twp pr-relative pr-w-full",{"pr-overflow-auto":!t}),children:l.jsx("table",{ref:r,className:F("pr-w-full pr-caption-bottom pr-text-sm",e),...n})}));Un.displayName="Table";const Hn=E.forwardRef(({className:e,stickyHeader:t,...n},r)=>l.jsx("thead",{ref:r,className:F({"pr-sticky pr-top-0 pr-bg-muted":t},"[&_tr]:pr-border-b",e),...n}));Hn.displayName="TableHeader";const Gn=E.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:F("[&_tr:last-child]:pr-border-0",e),...t}));Gn.displayName="TableBody";const As=E.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:F("pr-border-t pr-bg-muted/50 pr-font-medium [&>tr]:last:pr-border-b-0",e),...t}));As.displayName="TableFooter";const lt=E.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:F("pr-border-b pr-transition-colors hover:pr-bg-muted/50 data-[state=selected]:pr-bg-muted",e),...t}));lt.displayName="TableRow";const Zt=E.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:F("pr-h-12 pr-px-4 pr-text-start pr-align-middle pr-font-medium pr-text-muted-foreground [&:has([role=checkbox])]:pr-pe-0",e),...t}));Zt.displayName="TableHead";const It=E.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:F("pr-p-4 pr-align-middle [&:has([role=checkbox])]:pr-pe-0",e),...t}));It.displayName="TableCell";const Bs=E.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:F("pr-mt-4 pr-text-sm pr-text-muted-foreground",e),...t}));Bs.displayName="TableCaption";function Ls({columns:e,data:t,enablePagination:n=!1,showPaginationControls:r=!1,showColumnVisibilityControls:o=!1,stickyHeader:a=!1,onRowClickHandler:s=()=>{}}){var b;const[c,p]=E.useState([]),[f,m]=E.useState([]),[v,g]=E.useState({}),[d,h]=E.useState({}),u=Ce.useReactTable({data:t,columns:e,getCoreRowModel:Ce.getCoreRowModel(),...n&&{getPaginationRowModel:Ce.getPaginationRowModel()},onSortingChange:p,getSortedRowModel:Ce.getSortedRowModel(),onColumnFiltersChange:m,getFilteredRowModel:Ce.getFilteredRowModel(),onColumnVisibilityChange:g,onRowSelectionChange:h,state:{sorting:c,columnFilters:f,columnVisibility:v,rowSelection:d}});return l.jsxs("div",{className:"pr-twp pr-font-sans",children:[o&&l.jsx(Lc,{table:u}),l.jsxs(Un,{stickyHeader:a,children:[l.jsx(Hn,{stickyHeader:a,children:u.getHeaderGroups().map(x=>l.jsx(lt,{children:x.headers.map(R=>l.jsx(Zt,{children:R.isPlaceholder?void 0:Ce.flexRender(R.column.columnDef.header,R.getContext())},R.id))},x.id))}),l.jsx(Gn,{children:(b=u.getRowModel().rows)!=null&&b.length?u.getRowModel().rows.map(x=>l.jsx(lt,{onClick:()=>s(x,u),"data-state":x.getIsSelected()&&"selected",children:x.getVisibleCells().map(R=>l.jsx(It,{children:Ce.flexRender(R.column.columnDef.cell,R.getContext())},R.id))},x.id)):l.jsx(lt,{children:l.jsx(It,{colSpan:e.length,className:"pr-h-24 pr-text-center",children:"No results."})})})]}),n&&l.jsxs("div",{className:"pr-flex pr-items-center pr-justify-end pr-space-x-2 pr-py-4",children:[l.jsx(be,{variant:"outline",size:"sm",onClick:()=>u.previousPage(),disabled:!u.getCanPreviousPage(),children:"Previous"}),l.jsx(be,{variant:"outline",size:"sm",onClick:()=>u.nextPage(),disabled:!u.getCanNextPage(),children:"Next"})]}),n&&r&&l.jsx(Vc,{table:u})]})}const Fc=e=>e.split(/(?=\n|\\(?:v|c|id))/g),va=e=>{const t=/^\\[vc]\s+(\d+)/,n=e.match(t);return n?+n[1]:0},ya=(e,t,n,r)=>{if(!e||e===""||t==="")return[];const o=[],a=Fc(e);let s=r.chapterNum,c=r.verseNum,p=0;return a.forEach(f=>{f.startsWith("\\id")&&(s=0,c=0),f.startsWith("\\c")&&(s=va(f),c=0),f.startsWith("\\v")&&(c=va(f),s===0&&(s=r.chapterNum));const m=n(f,t);for(let v=0;vf(ya(t,e,n,r)),[t,e,r,n]),l.jsxs(Un,{stickyHeader:!0,children:[l.jsx(Hn,{stickyHeader:!0,children:l.jsxs(lt,{children:[l.jsx(Zt,{children:s}),l.jsx(Zt,{children:c})]})}),l.jsx(Gn,{children:p.map(m=>l.jsxs(lt,{onClick:()=>{o(m.reference)},children:[l.jsx(It,{children:`${fe.bookNumberToEnglishName(m.reference.bookNum)} ${m.reference.chapterNum}:${m.reference.verseNum}`}),l.jsx(It,{children:m.snippet})]},m.key))})]})}const Uc=Object.freeze(["%webView_inventory_all%","%webView_inventory_approved%","%webView_inventory_unapproved%","%webView_inventory_unknown%","%webView_inventory_scope_book%","%webView_inventory_scope_chapter%","%webView_inventory_scope_verse%","%webView_inventory_filter_text%","%webView_inventory_occurrences_table_header_reference%","%webView_inventory_occurrences_table_header_occurrence%"]),Er=e=>e==="asc"?l.jsx(re.ArrowUpIcon,{className:"pr-ms-2 pr-h-4 pr-w-4"}):e==="desc"?l.jsx(re.ArrowDownIcon,{className:"pr-ms-2 pr-h-4 pr-w-4"}):l.jsx(re.ArrowUpDownIcon,{className:"pr-ms-2 pr-h-4 pr-w-4"}),Hc=(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.item.includes(n))),r},Gc=(e,t,n)=>{const r=[],o=t(e);for(let a=0;ap.item===s);if(c)c.count+=1;else{const p={item:s,count:1,status:n(s)};r.push(p)}}return r},gt=(e,t)=>e[t]??t;function qc({scriptureReference:e,setScriptureReference:t,localizedStrings:n,extractItems:r,approvedItems:o,onApprovedItemsChange:a,unapprovedItems:s,onUnapprovedItemsChange:c,text:p,scope:f,onScopeChange:m,getColumns:v}){const g=gt(n,"%webView_inventory_all%"),d=gt(n,"%webView_inventory_approved%"),h=gt(n,"%webView_inventory_unapproved%"),u=gt(n,"%webView_inventory_unknown%"),b=gt(n,"%webView_inventory_scope_book%"),x=gt(n,"%webView_inventory_scope_chapter%"),R=gt(n,"%webView_inventory_scope_verse%"),w=gt(n,"%webView_inventory_filter_text%"),[k,y]=E.useState([]),[S,C]=E.useState("all"),[M,A]=E.useState(""),[z,$]=E.useState(""),N=E.useCallback((L,J)=>{y(I=>{let H=[];return L.forEach(K=>{H=I.map(G=>G.item===K&&G.status!==J?{...G,status:J}:G)}),H});let Z=[...o];L.forEach(I=>{J==="approved"?Z.includes(I)||Z.push(I):Z=Z.filter(H=>H!==I)}),a(Z);let j=[...s];L.forEach(I=>{J==="unapproved"?j.includes(I)||j.push(I):j=j.filter(H=>H!==I)}),c(j)},[o,a,s,c]),O=E.useCallback(L=>o.includes(L)?"approved":s.includes(L)?"unapproved":"unknown",[o,s]);E.useEffect(()=>{p&&y(Gc(p,r,O))},[r,p,O]);const _=E.useMemo(()=>Hc(k,S,M),[k,S,M]);E.useEffect(()=>{$("")},[_]);const U=(L,J)=>{J.toggleAllRowsSelected(!1),L.toggleSelected(void 0),$(L.getValue("item"))},B=E.useMemo(()=>v(N),[v,N]);return l.jsxs("div",{className:"pr-twp pr-flex pr-h-full pr-flex-col",children:[l.jsxs("div",{className:"pr-flex",children:[l.jsxs(_n,{onValueChange:L=>C(L),defaultValue:S,children:[l.jsx(Kt,{className:"pr-m-1",children:l.jsx(Mn,{placeholder:"Select filter"})}),l.jsxs(Jt,{className:"pr-font-sans",children:[l.jsx(Ke,{value:"all",children:g}),l.jsx(Ke,{value:"approved",children:d}),l.jsx(Ke,{value:"unapproved",children:h}),l.jsx(Ke,{value:"unknown",children:u})]})]}),l.jsxs(_n,{onValueChange:L=>m(L),defaultValue:f,children:[l.jsx(Kt,{className:"pr-m-1",children:l.jsx(Mn,{placeholder:"Select scope"})}),l.jsxs(Jt,{className:"pr-font-sans",children:[l.jsx(Ke,{value:"book",children:b}),l.jsx(Ke,{value:"chapter",children:x}),l.jsx(Ke,{value:"verse",children:R})]})]}),l.jsx(Vn,{className:"pr-m-1 pr-rounded-md pr-border",placeholder:w,value:M,onChange:L=>{A(L.target.value)}})]}),l.jsx("div",{className:"pr-m-1 pr-flex-1 pr-overflow-auto pr-rounded-md pr-border",children:l.jsx(Ls,{columns:B,data:_,onRowClickHandler:U,stickyHeader:!0})}),z!==""&&l.jsx("div",{className:"pr-m-1 pr-flex-1 pr-overflow-auto pr-rounded-md pr-border",children:l.jsx(zc,{selectedItem:z,text:p,extractItems:r,scriptureReference:e,setScriptureReference:L=>t(L),localizedStrings:n})})]})}const Wc=e=>({accessorKey:"item",header:({column:t})=>l.jsxs(be,{variant:"ghost",onClick:()=>t.toggleSorting(void 0),children:[e,Er(t.getIsSorted())]})}),Xc=e=>({accessorKey:"count",header:({column:t})=>l.jsxs(be,{variant:"ghost",onClick:()=>t.toggleSorting(void 0),children:[e,Er(t.getIsSorted())]})}),Yc=(e,t)=>({accessorKey:"status",header:({column:n,table:r})=>{const o=r.getSelectedRowModel().rows,a=[];return o.forEach(s=>{a.push(s.getValue("item"))}),l.jsxs("div",{children:[l.jsx("div",{className:"pr-flex pr-justify-center",children:l.jsxs(be,{className:"pr-mt-1",variant:"ghost",onClick:()=>n.toggleSorting(void 0),children:[e,Er(n.getIsSorted())]})}),l.jsxs("div",{className:"pr-flex pr-justify-center",children:[l.jsx(be,{className:"pr-m-1",children:l.jsx(re.CircleCheckIcon,{onClick:()=>{t(a,"approved")}})}),l.jsx(be,{className:"pr-m-1",children:l.jsx(re.CircleXIcon,{onClick:()=>{t(a,"unapproved")}})}),l.jsx(be,{className:"pr-m-1",children:l.jsx(re.CircleHelpIcon,{onClick:()=>{t(a,"unknown")}})})]})]})},cell:({row:n})=>{switch(n.getValue("status")){case"approved":return l.jsx(re.CircleCheckIcon,{});case"unapproved":return l.jsx(re.CircleXIcon,{});case"unknown":default:return l.jsx(re.CircleHelpIcon,{})}}}),Kc=$n.Root,Jc=$n.Trigger,Vs=E.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>l.jsx($n.Portal,{children:l.jsx($n.Content,{ref:o,align:t,sideOffset:n,className:F("pr-twp pr-z-50 pr-w-72 pr-rounded-md pr-border pr-bg-popover pr-p-4 pr-text-popover-foreground pr-shadow-md pr-outline-none data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2",e),...r})}));Vs.displayName=$n.Content.displayName;const Zc=Qe.Portal,Fs=E.forwardRef(({className:e,...t},n)=>l.jsx(Qe.Overlay,{ref:n,className:F("pr- pr-fixed pr-inset-0 pr-z-50 pr-bg-black/80 data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0",e),...t}));Fs.displayName=Qe.Overlay.displayName;const Qc=E.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(Zc,{children:[l.jsx(Fs,{}),l.jsxs(Qe.Content,{ref:r,className:F("pr-fixed pr-left-[50%] pr-top-[50%] pr-z-50 pr-grid pr-w-full pr-max-w-lg pr-translate-x-[-50%] pr-translate-y-[-50%] pr-gap-4 pr-border pr-bg-background pr-p-6 pr-shadow-lg pr-duration-200 data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[state=closed]:pr-slide-out-to-left-1/2 data-[state=closed]:pr-slide-out-to-top-[48%] data-[state=open]:pr-slide-in-from-left-1/2 data-[state=open]:pr-slide-in-from-top-[48%] sm:pr-rounded-lg",e),...n,children:[t,l.jsxs(Qe.Close,{className:"pr-absolute pr-right-4 pr-top-4 pr-rounded-sm pr-opacity-70 pr-ring-offset-background pr-transition-opacity hover:pr-opacity-100 focus:pr-outline-none focus:pr-ring-2 focus:pr-ring-ring focus:pr-ring-offset-2 disabled:pr-pointer-events-none data-[state=open]:pr-bg-accent data-[state=open]:pr-text-muted-foreground",children:[l.jsx(re.X,{className:"pr-h-4 pr-w-4"}),l.jsx("span",{className:"pr-sr-only",children:"Close"})]})]})]}));Qc.displayName=Qe.Content.displayName;const ep=E.forwardRef(({className:e,...t},n)=>l.jsx(Qe.Title,{ref:n,className:F("pr-text-lg pr-font-semibold pr-leading-none pr-tracking-tight",e),...t}));ep.displayName=Qe.Title.displayName;const tp=E.forwardRef(({className:e,...t},n)=>l.jsx(Qe.Description,{ref:n,className:F("pr-text-sm pr-text-muted-foreground",e),...t}));tp.displayName=Qe.Description.displayName;const zs=E.forwardRef(({className:e,...t},n)=>l.jsx(Ie.Command,{ref:n,className:F("pr-flex pr-h-full pr-w-full pr-flex-col pr-overflow-hidden pr-rounded-md pr-bg-popover pr-text-popover-foreground",e),...t}));zs.displayName=Ie.Command.displayName;const Us=E.forwardRef(({className:e,...t},n)=>l.jsxs("div",{className:"pr-flex pr-items-center pr-border-b pr-px-3",children:[l.jsx(re.Search,{className:"pr-me-2 pr-h-4 pr-w-4 pr-shrink-0 pr-opacity-50"}),l.jsx(Ie.Command.Input,{ref:n,className:F("pr-flex pr-h-11 pr-w-full pr-rounded-md pr-bg-transparent pr-py-3 pr-text-sm pr-outline-none placeholder:pr-text-muted-foreground disabled:pr-cursor-not-allowed disabled:pr-opacity-50",e),...t})]}));Us.displayName=Ie.Command.Input.displayName;const Hs=E.forwardRef(({className:e,...t},n)=>l.jsx(Ie.Command.List,{ref:n,className:F("pr-max-h-[300px] pr-overflow-y-auto pr-overflow-x-hidden",e),...t}));Hs.displayName=Ie.Command.List.displayName;const Gs=E.forwardRef((e,t)=>l.jsx(Ie.Command.Empty,{ref:t,className:"pr-py-6 pr-text-center pr-text-sm",...e}));Gs.displayName=Ie.Command.Empty.displayName;const np=E.forwardRef(({className:e,...t},n)=>l.jsx(Ie.Command.Group,{ref:n,className:F("pr-overflow-hidden pr-p-1 pr-text-foreground [&_[cmdk-group-heading]]:pr-px-2 [&_[cmdk-group-heading]]:pr-py-1.5 [&_[cmdk-group-heading]]:pr-text-xs [&_[cmdk-group-heading]]:pr-font-medium [&_[cmdk-group-heading]]:pr-text-muted-foreground",e),...t}));np.displayName=Ie.Command.Group.displayName;const rp=E.forwardRef(({className:e,...t},n)=>l.jsx(Ie.Command.Separator,{ref:n,className:F("pr--mx-1 pr-h-px pr-bg-border",e),...t}));rp.displayName=Ie.Command.Separator.displayName;const qs=E.forwardRef(({className:e,...t},n)=>l.jsx(Ie.Command.Item,{ref:n,className:F("pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none data-[disabled=true]:pr-pointer-events-none data-[selected=true]:pr-bg-accent data-[selected=true]:pr-text-accent-foreground data-[disabled=true]:pr-opacity-50",e),...t}));qs.displayName=Ie.Command.Item.displayName;function op(e){return typeof e=="string"?e:typeof e=="number"?e.toString():e.label}function so({id:e,options:t=[],className:n,value:r,onChange:o=()=>{},getOptionLabel:a=op,buttonPlaceholder:s="",textPlaceholder:c="",commandEmptyMessage:p="No option found",buttonVariant:f="outline",dir:m="ltr",...v}){const[g,d]=E.useState(!1);return l.jsxs(Kc,{open:g,onOpenChange:d,...v,children:[l.jsx(Jc,{asChild:!0,children:l.jsxs(be,{variant:f,role:"combobox","aria-expanded":g,id:e,className:F("pr-w-[200px] pr-justify-between",n),children:[r?a(r):s,l.jsx(re.ChevronsUpDown,{className:"pr-ms-2 pr-h-4 pr-w-4 pr-shrink-0 pr-opacity-50"})]})}),l.jsx(Vs,{className:"pr-w-[200px] pr-p-0",dir:m,children:l.jsxs(zs,{children:[l.jsx(Us,{dir:m,placeholder:c,className:"pr-text-inherit"}),l.jsx(Gs,{children:p}),l.jsx(Hs,{children:t.map(h=>l.jsxs(qs,{value:a(h),onSelect:()=>{o(h),d(!1)},children:[l.jsx(re.Check,{className:F("pr-me-2 pr-h-4 pr-w-4",{"pr-opacity-0":!r||a(r)!==a(h)})}),a(h)]},a(h)))})]})})]})}function ap({handleSelectStartChapter:e,handleSelectEndChapter:t,isDisabled:n=!1,chapterCount:r}){const[o,a]=E.useState(1),[s,c]=E.useState(r),[p,f]=E.useState(Array.from({length:r},(g,d)=>d+1));E.useEffect(()=>{a(1),e(1),c(r),t(r),f(Array.from({length:r},(g,d)=>d+1))},[r,t,e]);const m=g=>{a(g),e(g),g>s&&(c(g),t(g))},v=g=>{c(g),t(g),gg.toString(),value:o},"start chapter"),label:"Chapters",labelPlacement:"start"}),l.jsx(Ee.FormControlLabel,{className:"book-selection-chapter-form-label end",disabled:n,control:l.jsx(so,{onChange:v,className:"book-selection-chapter",options:p,getOptionLabel:g=>g.toString(),value:s},"end chapter"),label:"to",labelPlacement:"start"})]})}var Rt=(e=>(e.After="after",e.Before="before",e.Above="above",e.Below="below",e))(Rt||{});function Ws({id:e,isChecked:t,labelText:n="",labelPosition:r=Rt.After,isIndeterminate:o=!1,isDefaultChecked:a,isDisabled:s=!1,hasError:c=!1,className:p,onChange:f}){const m=l.jsx(Ee.Checkbox,{id:e,checked:t,indeterminate:o,defaultChecked:a,disabled:s,className:`papi-checkbox ${c?"error":""} ${p??""}`,onChange:f});let v;if(n){const g=r===Rt.Before||r===Rt.Above,d=l.jsx("span",{className:`papi-checkbox-label ${c?"error":""} ${p??""}`,children:n}),h=r===Rt.Before||r===Rt.After,u=h?d:l.jsx("div",{children:d}),b=h?m:l.jsx("div",{children:m});v=l.jsxs(Ee.FormLabel,{className:`papi-checkbox ${r.toString()}`,disabled:s,error:c,children:[g&&u,b,!g&&u]})}else v=m;return v}function sp({id:e,className:t,legend:n,listItems:r,selectedListItems:o,handleSelectListItem:a,createLabel:s}){return l.jsxs("fieldset",{id:e,className:t,children:[n&&l.jsx("legend",{children:n}),r.map(c=>l.jsx(Ws,{className:"check-item",isChecked:o.includes(c),labelText:s?s(c):c,onChange:()=>a(c)},c))]})}function ip(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lp(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 Ro={},Xs={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})(Xs);var cp=Xs.exports,Fr={};function ln(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]=Ys(e[n])}),t}function ct(e,t,n={clone:!0}){const r=n.clone?P({},e):e;return Pt(e)&&Pt(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Pt(t[o])&&o in e&&Pt(e[o])?r[o]=ct(e[o],t[o],n):n.clone?r[o]=Pt(t[o])?Ys(t[o]):t[o]:r[o]=t[o])}),r}var io={exports:{}},nr={exports:{}},ce={};/** @license React v16.13.1 +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),E=require("react"),ne=require("lucide-react"),Se=require("clsx"),oc=require("tailwind-merge"),Ts=require("@radix-ui/react-dropdown-menu"),Ue=require("platform-bible-utils"),Ce=require("@tanstack/react-table"),ac=require("@radix-ui/react-slot"),xo=require("class-variance-authority"),sc=require("@radix-ui/react-select"),Ee=require("@mui/material"),ic=require("@radix-ui/react-popover"),Ie=require("cmdk"),lc=require("@radix-ui/react-dialog"),oo=require("@mui/styled-engine"),kr=require("react-dom"),cc=require("@radix-ui/react-tabs"),pc=require("@radix-ui/react-separator"),dc=require("@radix-ui/react-label"),uc=require("@radix-ui/react-slider"),fc=require("@radix-ui/react-switch");function Je(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const T=Je(E),he=Je(Ts),we=Je(sc),$r=Je(ic),et=Je(lc),mc=Je(kr),De=Je(cc),Ss=Je(pc),Cs=Je(dc),Er=Je(uc),ao=Je(fc);const hc=oc.extendTailwindMerge({prefix:"pr-"});function F(...e){return hc(Se.clsx(e))}const ar=E.forwardRef(({className:e,type:t,...r},n)=>l.jsx("input",{type:t,className:F("pr-flex pr-h-10 pr-rounded-md pr-bg-background pr-px-3 pr-py-2 pr-text-sm pr-ring-offset-background file:pr-border-0 file:pr-bg-transparent file:pr-text-sm file:pr-font-medium placeholder:pr-text-muted-foreground disabled:pr-cursor-not-allowed disabled:pr-opacity-50",e),ref:n,...r}));ar.displayName="Input";const gc=E.forwardRef(({handleSearch:e,handleKeyDown:t,handleOnClick:r,handleSubmit:n,...o},a)=>l.jsxs("div",{className:"pr-relative",children:[l.jsx(ar,{...o,type:"text",className:"pr-box-border pr-gap-2.5 pr-rounded-lg pr-border pr-border-solid pr-border-black pr-bg-white pr-py-2 pr-pl-4 pr-pr-3 pr-font-medium pr-text-slate-900 pr-shadow-none pr-outline-none",onChange:s=>e(s.target.value),onKeyDown:s=>{s.key==="Enter"&&n(),t(s)},onClick:r,ref:a}),l.jsx(ne.History,{className:"pr-absolute pr-right-3 pr-top-1/2 pr-h-4 pr-w-4 pr--translate-y-1/2 pr-transform pr-cursor-pointer pr-text-gray-500",onClick:()=>{console.log("back in history")}})]}));var bc=Object.defineProperty,vc=(e,t,r)=>t in e?bc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oe=(e,t,r)=>vc(e,typeof t!="symbol"?t+"":t,r);const Mt=["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"],ko=["XXA","XXB","XXC","XXD","XXE","XXF","XXG","FRT","BAK","OTH","INT","CNC","GLO","TDX","NDX"],js=["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"],ya=jc();function sr(e,t=!0){return t&&(e=e.toUpperCase()),e in ya?ya[e]:0}function Eo(e){return sr(e)>0}function yc(e){const t=typeof e=="string"?sr(e):e;return t>=40&&t<=66}function wc(e){return(typeof e=="string"?sr(e):e)<=39}function Os(e){return e<=66}function xc(e){const t=typeof e=="string"?sr(e):e;return $s(t)&&!Os(t)}function*kc(){for(let e=1;e<=Mt.length;e++)yield e}const Ec=1,Rs=Mt.length;function Nc(){return["XXA","XXB","XXC","XXD","XXE","XXF","XXG"]}function No(e,t="***"){const r=e-1;return r<0||r>=Mt.length?t:Mt[r]}function Ps(e){return e<=0||e>Rs?"******":js[e-1]}function Tc(e){return Ps(sr(e))}function $s(e){const t=typeof e=="number"?No(e):e;return Eo(t)&&!ko.includes(t)}function Sc(e){const t=typeof e=="number"?No(e):e;return Eo(t)&&ko.includes(t)}function Cc(e){return js[e-1].includes("*obsolete*")}function jc(){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))(Ze||{});const Le=class{constructor(t){if(oe(this,"name"),oe(this,"fullPath"),oe(this,"isPresent"),oe(this,"hasVerseSegments"),oe(this,"isCustomized"),oe(this,"baseVersification"),oe(this,"scriptureBooks"),oe(this,"_type"),t==null)throw new Error("Argument undefined");typeof t=="string"?(this.name=t,this._type=Ze[t]):(this._type=t,this.name=Ze[t])}get type(){return this._type}equals(t){return!t.type||!this.type?!1:t.type===this.type}};oe(Le,"Original",new Le(Ze.Original)),oe(Le,"Septuagint",new Le(Ze.Septuagint)),oe(Le,"Vulgate",new Le(Ze.Vulgate)),oe(Le,"English",new Le(Ze.English)),oe(Le,"RussianProtestant",new Le(Ze.RussianProtestant)),oe(Le,"RussianOrthodox",new Le(Ze.RussianOrthodox));let St=Le;function wa(e,t){const r=t[0];for(let n=1;n(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))(_s||{});const $e=class le{constructor(t,r,n,o){if(oe(this,"firstChapter"),oe(this,"lastChapter"),oe(this,"lastVerse"),oe(this,"hasSegmentsDefined"),oe(this,"text"),oe(this,"BBBCCCVVVS"),oe(this,"longHashCode"),oe(this,"versification"),oe(this,"rtlMark","‏"),oe(this,"_bookNum",0),oe(this,"_chapterNum",0),oe(this,"_verseNum",0),oe(this,"_verse"),n==null&&o==null)if(t!=null&&typeof t=="string"){const a=t,s=r!=null&&r instanceof St?r:void 0;this.setEmpty(s),this.parse(a)}else if(t!=null&&typeof t=="number"){const a=r!=null&&r instanceof St?r:void 0;this.setEmpty(a),this._verseNum=t%le.chapterDigitShifter,this._chapterNum=Math.floor(t%le.bookDigitShifter/le.chapterDigitShifter),this._bookNum=Math.floor(t/le.bookDigitShifter)}else if(r==null)if(t!=null&&t instanceof le){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 St?t:le.defaultVersification;this.setEmpty(a)}else throw new Error("VerseRef constructor not supported.");else if(t!=null&&r!=null&&n!=null)if(typeof t=="string"&&typeof r=="string"&&typeof n=="string")this.setEmpty(o),this.updateInternal(t,r,n);else if(typeof t=="number"&&typeof r=="number"&&typeof n=="number")this._bookNum=t,this._chapterNum=r,this._verseNum=n,this.versification=o??le.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 r;try{return r=new le(t),{success:!0,verseRef:r}}catch(n){if(n instanceof hr)return r=new le,{success:!1,verseRef:r};throw n}}static getBBBCCCVVV(t,r,n){return t%le.bcvMaxValue*le.bookDigitShifter+(r>=0?r%le.bcvMaxValue*le.chapterDigitShifter:0)+(n>=0?n%le.bcvMaxValue:0)}static fromJSON(t){const{book:r,chapterNum:n,verseNum:o,verse:a,versificationStr:s}=t,c=a||o.toString();let p;return s&&(p=new St(s)),r?new le(r,n.toString(),c,p):new le}static tryGetVerseNum(t){let r;if(!t)return r=-1,{success:!0,vNum:r};r=0;let n;for(let o=0;o"9")return o===0&&(r=-1),{success:!1,vNum:r};if(r=r*10+ +n-0,r>le.bcvMaxValue)return r=-1,{success:!1,vNum:r}}return{success:!0,vNum:r}}get isDefault(){return this.bookNum===0&&this.chapterNum===0&&this.verseNum===0&&this.versification==null}get hasMultiple(){return this._verse!=null&&(this._verse.includes(le.verseRangeSeparator)||this._verse.includes(le.verseSequenceIndicator))}get book(){return fe.bookNumberToId(this.bookNum,"")}set book(t){this.bookNum=fe.bookIdToNumber(t)}get chapter(){return this.isDefault||this._chapterNum<0?"":this._chapterNum.toString()}set chapter(t){const r=+t;this._chapterNum=Number.isInteger(r)?r:-1}get verse(){return this._verse!=null?this._verse:this.isDefault||this._verseNum<0?"":this._verseNum.toString()}set verse(t){const{success:r,vNum:n}=le.tryGetVerseNum(t);this._verse=r?void 0:t.replace(this.rtlMark,""),this._verseNum=n,!(this._verseNum>=0)&&({vNum:this._verseNum}=le.tryGetVerseNum(this._verse))}get bookNum(){return this._bookNum}set bookNum(t){if(t<=0||t>fe.lastBook)throw new hr("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 St(t):void 0}get valid(){return this.validStatus===0}get validStatus(){return this.validateVerse(le.verseRangeSeparators,le.verseSequenceIndicators)}get BBBCCC(){return le.getBBBCCCVVV(this._bookNum,this._chapterNum,0)}get BBBCCCVVV(){return le.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 s=+a[1].trim();this.versification=new St(Ze[s])}catch{throw new hr("Invalid reference : "+t)}}const r=t.trim().split(" ");if(r.length!==2)throw new hr("Invalid reference : "+t);const n=r[1].split(":"),o=+n[0];if(n.length!==2||fe.bookIdToNumber(r[0])===0||!Number.isInteger(o)||o<0||!le.isVerseParseable(n[1]))throw new hr("Invalid reference : "+t);this.updateInternal(r[0],n[0],n[1])}simplify(){this._verse=void 0}clone(){return new le(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 r={book:this.book,chapterNum:this.chapterNum,verseNum:this.verseNum,verse:t,versificationStr:this.versificationStr};return t||delete r.verse,r}equals(t){return t instanceof le?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,r=le.verseRangeSeparators,n=le.verseSequenceIndicators){if(this._verse==null||this.chapterNum<=0)return[this.clone()];const o=[],a=wa(this._verse,n);for(const s of a.map(c=>wa(c,r))){const c=this.clone();c.verse=s[0];const p=c.verseNum;if(o.push(c),s.length>1){const f=this.clone();if(f.verse=s[1],!t)for(let m=p+1;ms)return 3;if(n===s)return 4;n=s}return 0}get internalValid(){return this.versification==null?1:this._bookNum<=0||this._bookNum>fe.lastBook?2:(fe.isCanonical(this._bookNum),0)}setEmpty(t=le.defaultVersification){this._bookNum=0,this._chapterNum=-1,this._verse=void 0,this.versification=t}updateInternal(t,r,n){this.bookNum=fe.bookIdToNumber(t),this.chapter=r,this.verse=n}};oe($e,"defaultVersification",St.English),oe($e,"verseRangeSeparator","-"),oe($e,"verseSequenceIndicator",","),oe($e,"verseRangeSeparators",[$e.verseRangeSeparator]),oe($e,"verseSequenceIndicators",[$e.verseSequenceIndicator]),oe($e,"chapterDigitShifter",1e3),oe($e,"bookDigitShifter",$e.chapterDigitShifter*$e.chapterDigitShifter),oe($e,"bcvMaxValue",$e.chapterDigitShifter-1),oe($e,"ValidStatusType",_s);let hr=class extends Error{};const xn=he.Root,To=he.Trigger,Ms=he.Group,Oc=he.Portal,Rc=he.Sub,Pc=he.RadioGroup,Is=E.forwardRef(({className:e,inset:t,children:r,...n},o)=>l.jsxs(he.SubTrigger,{ref:o,className:F("pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none focus:pr-bg-accent data-[state=open]:pr-bg-accent",t&&"pr-pl-8",e),...n,children:[r,l.jsx(ne.ChevronRight,{className:"pr-ml-auto pr-h-4 pr-w-4"})]}));Is.displayName=he.SubTrigger.displayName;const Ds=E.forwardRef(({className:e,...t},r)=>l.jsx(he.SubContent,{ref:r,className:F("pr-z-50 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-p-1 pr-text-popover-foreground pr-shadow-lg data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2",e),...t}));Ds.displayName=he.SubContent.displayName;const Fr=E.forwardRef(({className:e,sideOffset:t=4,...r},n)=>l.jsx(he.Portal,{children:l.jsx(he.Content,{ref:n,sideOffset:t,className:F("pr-twp pr-z-50 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-p-1 pr-text-popover-foreground pr-shadow-md data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2",e),...r})}));Fr.displayName=he.Content.displayName;const So=E.forwardRef(({className:e,inset:t,...r},n)=>l.jsx(he.Item,{ref:n,className:F("pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50",t&&"pr-pl-8",e),...r}));So.displayName=he.Item.displayName;const kn=E.forwardRef(({className:e,children:t,checked:r,...n},o)=>l.jsxs(he.CheckboxItem,{ref:o,className:F("pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50",e),checked:r,...n,children:[l.jsx("span",{className:"pr-absolute pr-left-2 pr-flex pr-h-3.5 pr-w-3.5 pr-items-center pr-justify-center",children:l.jsx(he.ItemIndicator,{children:l.jsx(ne.Check,{className:"pr-h-4 pr-w-4"})})}),t]}));kn.displayName=he.CheckboxItem.displayName;const Co=E.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(he.RadioItem,{ref:n,className:F("pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50",e),...r,children:[l.jsx("span",{className:"pr-absolute pr-left-2 pr-flex pr-h-3.5 pr-w-3.5 pr-items-center pr-justify-center",children:l.jsx(he.ItemIndicator,{children:l.jsx(ne.Circle,{className:"pr-h-2 pr-w-2 pr-fill-current"})})}),t]}));Co.displayName=he.RadioItem.displayName;const ir=E.forwardRef(({className:e,inset:t,...r},n)=>l.jsx(he.Label,{ref:n,className:F("pr-px-2 pr-py-1.5 pr-text-sm pr-font-semibold",t&&"pr-pl-8",e),...r}));ir.displayName=he.Label.displayName;const Vr=E.forwardRef(({className:e,...t},r)=>l.jsx(he.Separator,{ref:r,className:F("pr--mx-1 pr-my-1 pr-h-px pr-bg-muted",e),...t}));Vr.displayName=he.Separator.displayName;function As({className:e,...t}){return l.jsx("span",{className:F("pr-ml-auto pr-text-xs pr-tracking-widest pr-opacity-60",e),...t})}As.displayName="DropdownMenuShortcut";const $c=E.forwardRef(({bookId:e,handleSelectBook:t,isSelected:r,handleHighlightBook:n,handleKeyDown:o,bookType:a,children:s},c)=>l.jsxs(So,{ref:c,textValue:e,className:F("pr-font-normal pr-text-slate-700",{"pr-bg-amber-50 pr-text-yellow-900 data-[highlighted]:pr-bg-amber-100":r}),onSelect:p=>{p.preventDefault(),t()},onKeyDown:p=>{o(p)},onFocus:n,onMouseMove:n,children:[l.jsx("span",{className:F("pr-border-b-0 pr-border-l-2 pr-border-r-0 pr-border-t-0 pr-border-solid pr-px-2",{"pr-font-bold":r,"pr-border-l-red-200":a.toLowerCase()==="ot","pr-border-l-purple-200":a.toLowerCase()==="nt","pr-border-l-indigo-200":a.toLowerCase()==="dc"}),children:fe.bookIdToEnglishName(e)}),r&&l.jsx("div",{children:s})]},e));function _c({handleSelectChapter:e,endChapter:t,activeChapter:r,highlightedChapter:n,handleHighlightedChapter:o}){const a=Array.from({length:t},(c,p)=>p+1),s=E.useCallback(c=>{o(c)},[o]);return l.jsx("div",{className:F("pr-flex pr-flex-wrap pr-items-start pr-justify-start pr-self-stretch"),children:a.map(c=>l.jsx("div",{className:F("pr-flex pr-h-4 pr-w-4 pr-cursor-pointer pr-items-center pr-justify-end pr-rounded-md pr-p-2 pr-text-amber-800",{"pr-font-semibold pr-text-amber-900":c===r,"pr-bg-amber-200":c===n}),onClick:p=>{p.preventDefault(),p.stopPropagation(),e(c)},role:"button",onKeyDown:p=>{p.key==="Enter"&&e(c)},tabIndex:0,onMouseMove:()=>s(c),children:c},c))})}function Mc({handleSort:e,handleLocationHistory:t,handleBookmarks:r}){return l.jsxs(ir,{className:"pr-flex pr-justify-between",children:[l.jsx("p",{className:"pr-inline-block pr-align-middle",children:"Go To"}),l.jsxs("div",{className:"pr-flex pr-items-center",children:[l.jsx(ne.ArrowDownWideNarrow,{onClick:e,className:"pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2"}),l.jsx(ne.Clock,{onClick:t,className:"pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2"}),l.jsx(ne.Bookmark,{onClick:r,className:"pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2"})]})]})}const Cr=fe.allBookIds,Ic={OT:"Old Testament",NT:"New Testament",DC:"Deuterocanon"},xa=["OT","NT","DC"],Dc=32+32+32,Ac=[/^(\w+)$/i,/^(\w+)(?:\s(\d+))$/i,/^(\w+)(?:\s(\d+):(\d+))$/i],Bc=e=>({OT:Cr.filter(r=>fe.isBookOT(r)),NT:Cr.filter(r=>fe.isBookNT(r)),DC:Cr.filter(r=>fe.isBookDC(r))})[e],gr=e=>Ue.getChaptersForBook(fe.bookIdToNumber(e));function Lc(){return Cr.map(t=>fe.bookIdToEnglishName(t))}function Fc(e){return Lc().includes(e)}function Vc(e){const t=e.toLowerCase().replace(/^\w/,r=>r.toUpperCase());if(Fc(t))return Cr.find(n=>fe.bookIdToEnglishName(n)===t)}function zc({scrRef:e,handleSubmit:t}){const[r,n]=E.useState(""),[o,a]=E.useState(fe.bookNumberToId(e.bookNum)),[s,c]=E.useState(e.chapterNum??0),[p,f]=E.useState(fe.bookNumberToId(e.bookNum)),[m,v]=E.useState(!1),[g,d]=E.useState(m),h=E.useRef(void 0),u=E.useRef(void 0),b=E.useRef(void 0),x=E.useCallback($=>Bc($).filter(N=>{const j=fe.bookIdToEnglishName(N).toLowerCase(),_=r.replace(/[^a-zA-Z]/g,"").toLowerCase();return j.includes(_)||N.toLowerCase().includes(_)}),[r]),R=$=>{n($)},w=E.useRef(!1),k=E.useCallback($=>{if(w.current){w.current=!1;return}v($)},[]),y=E.useCallback(($,N,j,_)=>{if(c(fe.bookNumberToId(e.bookNum)!==$?1:e.chapterNum),N||gr($)===-1){t({bookNum:fe.bookIdToNumber($),chapterNum:j||1,verseNum:_||1}),v(!1),n("");return}a(o!==$?$:""),v(!N)},[t,e.bookNum,e.chapterNum,o]),S=$=>{$<=0||$>gr(o)||y(o,!0,$)},C=E.useCallback(()=>{Ac.forEach($=>{const N=r.match($);if(N){const[j,_=void 0,H=void 0]=N.slice(1),B=Vc(j);(fe.isBookIdValid(j)||B)&&y(B??j,!0,_?parseInt(_,10):1,H?parseInt(H,10):1)}})},[y,r]),M=E.useCallback($=>{m?($.key==="ArrowDown"||$.key==="ArrowUp")&&(typeof b<"u"&&b.current!==null?b.current.focus():typeof u<"u"&&u.current!==null&&u.current.focus(),$.preventDefault()):v(!0)},[m]),A=$=>{const{key:N}=$;N==="ArrowRight"||N==="ArrowLeft"||N==="ArrowDown"||N==="ArrowUp"||N==="Enter"||(h.current.dispatchEvent(new KeyboardEvent("keydown",{key:N})),h.current.focus())},z=$=>{const{key:N}=$;if(p===o){if(N==="Enter"){$.preventDefault(),y(o,!0,s);return}let j=0;if(N==="ArrowRight")if(s1)j=-1;else{$.preventDefault();return}else N==="ArrowDown"?j=6:N==="ArrowUp"&&(j=-6);s+j<=0||s+j>gr(p)?c(0):j!==0&&(c(s+j),$.preventDefault())}};return E.useEffect(()=>{o===p?o===fe.bookNumberToId(e.bookNum)?c(e.chapterNum):c(1):c(0)},[p,e.bookNum,e.chapterNum,o]),E.useLayoutEffect(()=>{d(m)},[m]),E.useLayoutEffect(()=>{const $=setTimeout(()=>{if(g&&u.current&&b.current){const j=b.current.offsetTop-Dc;u.current.scrollTo({top:j,behavior:"instant"})}},10);return()=>{clearTimeout($)}},[g]),l.jsx("div",{className:"pr-flex",children:l.jsxs(xn,{modal:!1,open:m,onOpenChange:k,children:[l.jsx(To,{asChild:!0,children:l.jsx(gc,{ref:h,value:r,handleSearch:R,handleKeyDown:M,handleOnClick:()=>{a(fe.bookNumberToId(e.bookNum)),f(fe.bookNumberToId(e.bookNum)),c(e.chapterNum>0?e.chapterNum:0),v(!0),h.current.focus()},onFocus:()=>{w.current=!0},handleSubmit:C,placeholder:`${fe.bookNumberToEnglishName(e.bookNum)} ${e.chapterNum}:${e.verseNum}`})}),l.jsxs(Fr,{className:"pr-overflow-y-auto pr-font-normal pr-text-slate-700",style:{width:"233px",maxHeight:"500px"},onKeyDown:A,align:"start",ref:u,children:[l.jsx(Mc,{handleSort:()=>console.log("sorting"),handleLocationHistory:()=>console.log("location history"),handleBookmarks:()=>console.log("bookmarks")}),xa.map(($,N)=>x($).length>0&&l.jsxs("div",{children:[l.jsx(ir,{className:"pr-font-semibold pr-text-slate-700",children:Ic[$]}),x($).map(j=>l.jsx("div",{children:l.jsx($c,{bookId:j,handleSelectBook:()=>y(j,!1),isSelected:o===j,handleHighlightBook:()=>f(j),handleKeyDown:z,bookType:$,ref:_=>{o===j&&(b.current=_)},children:l.jsx(_c,{handleSelectChapter:S,endChapter:gr(j),activeChapter:e.bookNum===fe.bookIdToNumber(j)?e.chapterNum:0,highlightedChapter:s,handleHighlightedChapter:_=>{c(_)}})})},j)),xa.length-1!==N?l.jsx(Vr,{}):void 0]},$))]})]})})}const Bs=xo.cva("pr-twp pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-md pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50",{variants:{variant:{default:"pr-bg-primary pr-text-primary-foreground hover:pr-bg-primary/90",destructive:"pr-bg-destructive pr-text-destructive-foreground hover:pr-bg-destructive/90",outline:"pr-border pr-border-input pr-bg-background hover:pr-bg-accent hover:pr-text-accent-foreground",secondary:"pr-bg-secondary pr-text-secondary-foreground hover:pr-bg-secondary/80",ghost:"hover:pr-bg-accent hover:pr-text-accent-foreground",link:"pr-text-primary pr-underline-offset-4 hover:pr-underline"},size:{default:"pr-h-10 pr-px-4 pr-py-2",sm:"pr-h-9 pr-rounded-md pr-px-3",lg:"pr-h-11 pr-rounded-md pr-px-8",icon:"pr-h-10 pr-w-10"}},defaultVariants:{variant:"default",size:"default"}}),be=E.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},a)=>{const s=n?ac.Slot:"button";return l.jsx(s,{className:F(Bs({variant:t,size:r,className:e})),ref:a,...o})});be.displayName="Button";function Hc({table:e}){return l.jsxs(xn,{children:[l.jsx(Ts.DropdownMenuTrigger,{asChild:!0,children:l.jsxs(be,{variant:"outline",size:"sm",className:"pr-ml-auto pr-hidden pr-h-8 lg:pr-flex",children:[l.jsx(ne.FilterIcon,{className:"pr-mr-2 pr-h-4 pr-w-4"}),"View"]})}),l.jsxs(Fr,{align:"end",className:"pr-w-[150px]",children:[l.jsx(ir,{children:"Toggle columns"}),l.jsx(Vr,{}),e.getAllColumns().filter(t=>t.getCanHide()).map(t=>l.jsx(kn,{className:"pr-capitalize",checked:t.getIsVisible(),onCheckedChange:r=>t.toggleVisibility(!!r),children:t.id},t.id))]})]})}const _r=we.Root,Ls=we.Group,Mr=we.Value,Kt=E.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(we.Trigger,{ref:n,className:F("pr-flex pr-h-10 pr-w-full pr-items-center pr-justify-between pr-rounded-md pr-border pr-border-input pr-bg-background pr-px-3 pr-py-2 pr-text-sm pr-ring-offset-background placeholder:pr-text-muted-foreground focus:pr-outline-none focus:pr-ring-2 focus:pr-ring-ring focus:pr-ring-offset-2 disabled:pr-cursor-not-allowed disabled:pr-opacity-50 [&>span]:pr-line-clamp-1",e),...r,children:[t,l.jsx(we.Icon,{asChild:!0,children:l.jsx(ne.ChevronDown,{className:"pr-h-4 pr-w-4 pr-opacity-50"})})]}));Kt.displayName=we.Trigger.displayName;const jo=E.forwardRef(({className:e,...t},r)=>l.jsx(we.ScrollUpButton,{ref:r,className:F("pr-flex pr-cursor-default pr-items-center pr-justify-center pr-py-1",e),...t,children:l.jsx(ne.ChevronUp,{className:"pr-h-4 pr-w-4"})}));jo.displayName=we.ScrollUpButton.displayName;const Oo=E.forwardRef(({className:e,...t},r)=>l.jsx(we.ScrollDownButton,{ref:r,className:F("pr-flex pr-cursor-default pr-items-center pr-justify-center pr-py-1",e),...t,children:l.jsx(ne.ChevronDown,{className:"pr-h-4 pr-w-4"})}));Oo.displayName=we.ScrollDownButton.displayName;const Jt=E.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>l.jsx(we.Portal,{children:l.jsxs(we.Content,{ref:o,className:F("pr-twp pr-relative pr-z-50 pr-max-h-96 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-text-popover-foreground pr-shadow-md data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:pr-translate-y-1 data-[side=left]:pr--translate-x-1 data-[side=right]:pr-translate-x-1 data-[side=top]:pr--translate-y-1",e),position:r,...n,children:[l.jsx(jo,{}),l.jsx(we.Viewport,{className:F("pr-p-1",r==="popper"&&"pr-h-[var(--radix-select-trigger-height)] pr-w-full pr-min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(Oo,{})]})}));Jt.displayName=we.Content.displayName;const Fs=E.forwardRef(({className:e,...t},r)=>l.jsx(we.Label,{ref:r,className:F("pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-font-semibold",e),...t}));Fs.displayName=we.Label.displayName;const Ke=E.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(we.Item,{ref:n,className:F("pr-relative pr-flex pr-w-full pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50",e),...r,children:[l.jsx("span",{className:"pr-absolute pr-left-2 pr-flex pr-h-3.5 pr-w-3.5 pr-items-center pr-justify-center",children:l.jsx(we.ItemIndicator,{children:l.jsx(ne.Check,{className:"pr-h-4 pr-w-4"})})}),l.jsx(we.ItemText,{children:t})]}));Ke.displayName=we.Item.displayName;const Vs=E.forwardRef(({className:e,...t},r)=>l.jsx(we.Separator,{ref:r,className:F("pr--mx-1 pr-my-1 pr-h-px pr-bg-muted",e),...t}));Vs.displayName=we.Separator.displayName;function Uc({table:e}){return l.jsx("div",{className:"pr-flex pr-items-center pr-justify-between pr-px-2 pr-pb-3 pr-pt-3",children:l.jsxs("div",{className:"pr-flex pr-items-center pr-space-x-6 lg:pr-space-x-8",children:[l.jsxs("div",{className:"pr-flex-1 pr-text-sm pr-text-muted-foreground",children:[e.getFilteredSelectedRowModel().rows.length," of"," ",e.getFilteredRowModel().rows.length," row(s) selected"]}),l.jsxs("div",{className:"pr-flex pr-items-center pr-space-x-2",children:[l.jsx("p",{className:"pr-text-nowrap pr-text-sm pr-font-medium",children:"Rows per page"}),l.jsxs(_r,{value:`${e.getState().pagination.pageSize}`,onValueChange:t=>{e.setPageSize(Number(t))},children:[l.jsx(Kt,{className:"pr-h-8 pr-w-[70px]",children:l.jsx(Mr,{placeholder:e.getState().pagination.pageSize})}),l.jsx(Jt,{side:"top",children:[10,20,30,40,50].map(t=>l.jsx(Ke,{value:`${t}`,children:t},t))})]})]}),l.jsxs("div",{className:"pr-flex pr-w-[100px] pr-items-center pr-justify-center pr-text-sm pr-font-medium",children:["Page ",e.getState().pagination.pageIndex+1," of ",e.getPageCount()]}),l.jsxs("div",{className:"pr-flex pr-items-center pr-space-x-2",children:[l.jsxs(be,{variant:"outline",size:"icon",className:"pr-hidden pr-h-8 pr-w-8 pr-p-0 lg:pr-flex",onClick:()=>e.setPageIndex(0),disabled:!e.getCanPreviousPage(),children:[l.jsx("span",{className:"pr-sr-only",children:"Go to first page"}),l.jsx(ne.ArrowLeftIcon,{className:"pr-h-4 pr-w-4"})]}),l.jsxs(be,{variant:"outline",size:"icon",className:"pr-h-8 pr-w-8 pr-p-0",onClick:()=>e.previousPage(),disabled:!e.getCanPreviousPage(),children:[l.jsx("span",{className:"pr-sr-only",children:"Go to previous page"}),l.jsx(ne.ChevronLeftIcon,{className:"pr-h-4 pr-w-4"})]}),l.jsxs(be,{variant:"outline",size:"icon",className:"pr-h-8 pr-w-8 pr-p-0",onClick:()=>e.nextPage(),disabled:!e.getCanNextPage(),children:[l.jsx("span",{className:"pr-sr-only",children:"Go to next page"}),l.jsx(ne.ChevronRightIcon,{className:"pr-h-4 pr-w-4"})]}),l.jsxs(be,{variant:"outline",size:"icon",className:"pr-hidden pr-h-8 pr-w-8 pr-p-0 lg:pr-flex",onClick:()=>e.setPageIndex(e.getPageCount()-1),disabled:!e.getCanNextPage(),children:[l.jsx("span",{className:"pr-sr-only",children:"Go to last page"}),l.jsx(ne.ArrowRightIcon,{className:"pr-h-4 pr-w-4"})]})]})]})})}const zr=E.forwardRef(({className:e,stickyHeader:t,...r},n)=>l.jsx("div",{className:F("pr-twp pr-relative pr-w-full",{"pr-overflow-auto":!t}),children:l.jsx("table",{ref:n,className:F("pr-w-full pr-caption-bottom pr-text-sm",e),...r})}));zr.displayName="Table";const Hr=E.forwardRef(({className:e,stickyHeader:t,...r},n)=>l.jsx("thead",{ref:n,className:F({"pr-sticky pr-top-0 pr-bg-muted":t},"[&_tr]:pr-border-b",e),...r}));Hr.displayName="TableHeader";const Ur=E.forwardRef(({className:e,...t},r)=>l.jsx("tbody",{ref:r,className:F("[&_tr:last-child]:pr-border-0",e),...t}));Ur.displayName="TableBody";const zs=E.forwardRef(({className:e,...t},r)=>l.jsx("tfoot",{ref:r,className:F("pr-border-t pr-bg-muted/50 pr-font-medium [&>tr]:last:pr-border-b-0",e),...t}));zs.displayName="TableFooter";const lt=E.forwardRef(({className:e,...t},r)=>l.jsx("tr",{ref:r,className:F("pr-border-b pr-transition-colors hover:pr-bg-muted/50 data-[state=selected]:pr-bg-muted",e),...t}));lt.displayName="TableRow";const Zt=E.forwardRef(({className:e,...t},r)=>l.jsx("th",{ref:r,className:F("pr-h-12 pr-px-4 pr-text-start pr-align-middle pr-font-medium pr-text-muted-foreground [&:has([role=checkbox])]:pr-pe-0",e),...t}));Zt.displayName="TableHead";const It=E.forwardRef(({className:e,...t},r)=>l.jsx("td",{ref:r,className:F("pr-p-4 pr-align-middle [&:has([role=checkbox])]:pr-pe-0",e),...t}));It.displayName="TableCell";const Hs=E.forwardRef(({className:e,...t},r)=>l.jsx("caption",{ref:r,className:F("pr-mt-4 pr-text-sm pr-text-muted-foreground",e),...t}));Hs.displayName="TableCaption";function Us({columns:e,data:t,enablePagination:r=!1,showPaginationControls:n=!1,showColumnVisibilityControls:o=!1,stickyHeader:a=!1,onRowClickHandler:s=()=>{}}){var b;const[c,p]=E.useState([]),[f,m]=E.useState([]),[v,g]=E.useState({}),[d,h]=E.useState({}),u=Ce.useReactTable({data:t,columns:e,getCoreRowModel:Ce.getCoreRowModel(),...r&&{getPaginationRowModel:Ce.getPaginationRowModel()},onSortingChange:p,getSortedRowModel:Ce.getSortedRowModel(),onColumnFiltersChange:m,getFilteredRowModel:Ce.getFilteredRowModel(),onColumnVisibilityChange:g,onRowSelectionChange:h,state:{sorting:c,columnFilters:f,columnVisibility:v,rowSelection:d}});return l.jsxs("div",{className:"pr-twp pr-font-sans",children:[o&&l.jsx(Hc,{table:u}),l.jsxs(zr,{stickyHeader:a,children:[l.jsx(Hr,{stickyHeader:a,children:u.getHeaderGroups().map(x=>l.jsx(lt,{children:x.headers.map(R=>l.jsx(Zt,{children:R.isPlaceholder?void 0:Ce.flexRender(R.column.columnDef.header,R.getContext())},R.id))},x.id))}),l.jsx(Ur,{children:(b=u.getRowModel().rows)!=null&&b.length?u.getRowModel().rows.map(x=>l.jsx(lt,{onClick:()=>s(x,u),"data-state":x.getIsSelected()&&"selected",children:x.getVisibleCells().map(R=>l.jsx(It,{children:Ce.flexRender(R.column.columnDef.cell,R.getContext())},R.id))},x.id)):l.jsx(lt,{children:l.jsx(It,{colSpan:e.length,className:"pr-h-24 pr-text-center",children:"No results."})})})]}),r&&l.jsxs("div",{className:"pr-flex pr-items-center pr-justify-end pr-space-x-2 pr-py-4",children:[l.jsx(be,{variant:"outline",size:"sm",onClick:()=>u.previousPage(),disabled:!u.getCanPreviousPage(),children:"Previous"}),l.jsx(be,{variant:"outline",size:"sm",onClick:()=>u.nextPage(),disabled:!u.getCanNextPage(),children:"Next"})]}),r&&n&&l.jsx(Uc,{table:u})]})}const Gc=e=>e.split(/(?=\n|\\(?:v|c|id))/g),ka=e=>{const t=/^\\[vc]\s+(\d+)/,r=e.match(t);return r?+r[1]:0},Ea=(e,t,r,n)=>{if(!e||e===""||t==="")return[];const o=[],a=Gc(e);let s=n.chapterNum,c=n.verseNum,p=0;return a.forEach(f=>{f.startsWith("\\id")&&(s=0,c=0),f.startsWith("\\c")&&(s=ka(f),c=0),f.startsWith("\\v")&&(c=ka(f),s===0&&(s=n.chapterNum));const m=r(f,t);for(let v=0;vf(Ea(t,e,r,n)),[t,e,n,r]),l.jsxs(zr,{stickyHeader:!0,children:[l.jsx(Hr,{stickyHeader:!0,children:l.jsxs(lt,{children:[l.jsx(Zt,{children:s}),l.jsx(Zt,{children:c})]})}),l.jsx(Ur,{children:p.map(m=>l.jsxs(lt,{onClick:()=>{o(m.reference)},children:[l.jsx(It,{children:`${fe.bookNumberToEnglishName(m.reference.bookNum)} ${m.reference.chapterNum}:${m.reference.verseNum}`}),l.jsx(It,{children:m.snippet})]},m.key))})]})}const Wc=Object.freeze(["%webView_inventory_all%","%webView_inventory_approved%","%webView_inventory_unapproved%","%webView_inventory_unknown%","%webView_inventory_scope_book%","%webView_inventory_scope_chapter%","%webView_inventory_scope_verse%","%webView_inventory_filter_text%","%webView_inventory_occurrences_table_header_reference%","%webView_inventory_occurrences_table_header_occurrence%"]),En=e=>e==="asc"?l.jsx(ne.ArrowUpIcon,{className:"pr-ms-2 pr-h-4 pr-w-4"}):e==="desc"?l.jsx(ne.ArrowDownIcon,{className:"pr-ms-2 pr-h-4 pr-w-4"}):l.jsx(ne.ArrowUpDownIcon,{className:"pr-ms-2 pr-h-4 pr-w-4"}),Xc=(e,t,r)=>{let n=e;return t!=="all"&&(n=n.filter(o=>t==="approved"&&o.status==="approved"||t==="unapproved"&&o.status==="unapproved"||t==="unknown"&&o.status==="unknown")),r!==""&&(n=n.filter(o=>o.item.includes(r))),n},Yc=(e,t,r)=>{const n=[],o=t(e);for(let a=0;ap.item===s);if(c)c.count+=1;else{const p={item:s,count:1,status:r(s)};n.push(p)}}return n},gt=(e,t)=>e[t]??t;function Kc({scriptureReference:e,setScriptureReference:t,localizedStrings:r,extractItems:n,approvedItems:o,onApprovedItemsChange:a,unapprovedItems:s,onUnapprovedItemsChange:c,text:p,scope:f,onScopeChange:m,getColumns:v}){const g=gt(r,"%webView_inventory_all%"),d=gt(r,"%webView_inventory_approved%"),h=gt(r,"%webView_inventory_unapproved%"),u=gt(r,"%webView_inventory_unknown%"),b=gt(r,"%webView_inventory_scope_book%"),x=gt(r,"%webView_inventory_scope_chapter%"),R=gt(r,"%webView_inventory_scope_verse%"),w=gt(r,"%webView_inventory_filter_text%"),[k,y]=E.useState([]),[S,C]=E.useState("all"),[M,A]=E.useState(""),[z,$]=E.useState(""),N=E.useCallback((L,J)=>{y(I=>{let U=[];return L.forEach(K=>{U=I.map(G=>G.item===K&&G.status!==J?{...G,status:J}:G)}),U});let Z=[...o];L.forEach(I=>{J==="approved"?Z.includes(I)||Z.push(I):Z=Z.filter(U=>U!==I)}),a(Z);let O=[...s];L.forEach(I=>{J==="unapproved"?O.includes(I)||O.push(I):O=O.filter(U=>U!==I)}),c(O)},[o,a,s,c]),j=E.useCallback(L=>o.includes(L)?"approved":s.includes(L)?"unapproved":"unknown",[o,s]);E.useEffect(()=>{p&&y(Yc(p,n,j))},[n,p,j]);const _=E.useMemo(()=>Xc(k,S,M),[k,S,M]);E.useEffect(()=>{$("")},[_]);const H=(L,J)=>{J.toggleAllRowsSelected(!1),L.toggleSelected(void 0),$(L.getValue("item"))},B=E.useMemo(()=>v(N),[v,N]);return l.jsxs("div",{className:"pr-twp pr-flex pr-h-full pr-flex-col",children:[l.jsxs("div",{className:"pr-flex",children:[l.jsxs(_r,{onValueChange:L=>C(L),defaultValue:S,children:[l.jsx(Kt,{className:"pr-m-1",children:l.jsx(Mr,{placeholder:"Select filter"})}),l.jsxs(Jt,{className:"pr-font-sans",children:[l.jsx(Ke,{value:"all",children:g}),l.jsx(Ke,{value:"approved",children:d}),l.jsx(Ke,{value:"unapproved",children:h}),l.jsx(Ke,{value:"unknown",children:u})]})]}),l.jsxs(_r,{onValueChange:L=>m(L),defaultValue:f,children:[l.jsx(Kt,{className:"pr-m-1",children:l.jsx(Mr,{placeholder:"Select scope"})}),l.jsxs(Jt,{className:"pr-font-sans",children:[l.jsx(Ke,{value:"book",children:b}),l.jsx(Ke,{value:"chapter",children:x}),l.jsx(Ke,{value:"verse",children:R})]})]}),l.jsx(ar,{className:"pr-m-1 pr-rounded-md pr-border",placeholder:w,value:M,onChange:L=>{A(L.target.value)}})]}),l.jsx("div",{className:"pr-m-1 pr-flex-1 pr-overflow-auto pr-rounded-md pr-border",children:l.jsx(Us,{columns:B,data:_,onRowClickHandler:H,stickyHeader:!0})}),z!==""&&l.jsx("div",{className:"pr-m-1 pr-flex-1 pr-overflow-auto pr-rounded-md pr-border",children:l.jsx(qc,{selectedItem:z,text:p,extractItems:n,scriptureReference:e,setScriptureReference:L=>t(L),localizedStrings:r})})]})}const Jc=e=>({accessorKey:"item",header:({column:t})=>l.jsxs(be,{variant:"ghost",onClick:()=>t.toggleSorting(void 0),children:[e,En(t.getIsSorted())]})}),Zc=e=>({accessorKey:"count",header:({column:t})=>l.jsxs(be,{variant:"ghost",onClick:()=>t.toggleSorting(void 0),children:[e,En(t.getIsSorted())]})}),Qc=(e,t)=>({accessorKey:"status",header:({column:r,table:n})=>{const o=n.getSelectedRowModel().rows,a=[];return o.forEach(s=>{a.push(s.getValue("item"))}),l.jsxs("div",{children:[l.jsx("div",{className:"pr-flex pr-justify-center",children:l.jsxs(be,{className:"pr-mt-1",variant:"ghost",onClick:()=>r.toggleSorting(void 0),children:[e,En(r.getIsSorted())]})}),l.jsxs("div",{className:"pr-flex pr-justify-center",children:[l.jsx(be,{className:"pr-m-1",children:l.jsx(ne.CircleCheckIcon,{onClick:()=>{t(a,"approved")}})}),l.jsx(be,{className:"pr-m-1",children:l.jsx(ne.CircleXIcon,{onClick:()=>{t(a,"unapproved")}})}),l.jsx(be,{className:"pr-m-1",children:l.jsx(ne.CircleHelpIcon,{onClick:()=>{t(a,"unknown")}})})]})]})},cell:({row:r})=>{switch(r.getValue("status")){case"approved":return l.jsx(ne.CircleCheckIcon,{});case"unapproved":return l.jsx(ne.CircleXIcon,{});case"unknown":default:return l.jsx(ne.CircleHelpIcon,{})}}}),ep=$r.Root,tp=$r.Trigger,Gs=E.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx($r.Portal,{children:l.jsx($r.Content,{ref:o,align:t,sideOffset:r,className:F("pr-twp pr-z-50 pr-w-72 pr-rounded-md pr-border pr-bg-popover pr-p-4 pr-text-popover-foreground pr-shadow-md pr-outline-none data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2",e),...n})}));Gs.displayName=$r.Content.displayName;const rp=et.Portal,qs=E.forwardRef(({className:e,...t},r)=>l.jsx(et.Overlay,{ref:r,className:F("pr- pr-fixed pr-inset-0 pr-z-50 pr-bg-black/80 data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0",e),...t}));qs.displayName=et.Overlay.displayName;const np=E.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(rp,{children:[l.jsx(qs,{}),l.jsxs(et.Content,{ref:n,className:F("pr-fixed pr-left-[50%] pr-top-[50%] pr-z-50 pr-grid pr-w-full pr-max-w-lg pr-translate-x-[-50%] pr-translate-y-[-50%] pr-gap-4 pr-border pr-bg-background pr-p-6 pr-shadow-lg pr-duration-200 data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[state=closed]:pr-slide-out-to-left-1/2 data-[state=closed]:pr-slide-out-to-top-[48%] data-[state=open]:pr-slide-in-from-left-1/2 data-[state=open]:pr-slide-in-from-top-[48%] sm:pr-rounded-lg",e),...r,children:[t,l.jsxs(et.Close,{className:"pr-absolute pr-right-4 pr-top-4 pr-rounded-sm pr-opacity-70 pr-ring-offset-background pr-transition-opacity hover:pr-opacity-100 focus:pr-outline-none focus:pr-ring-2 focus:pr-ring-ring focus:pr-ring-offset-2 disabled:pr-pointer-events-none data-[state=open]:pr-bg-accent data-[state=open]:pr-text-muted-foreground",children:[l.jsx(ne.X,{className:"pr-h-4 pr-w-4"}),l.jsx("span",{className:"pr-sr-only",children:"Close"})]})]})]}));np.displayName=et.Content.displayName;const op=E.forwardRef(({className:e,...t},r)=>l.jsx(et.Title,{ref:r,className:F("pr-text-lg pr-font-semibold pr-leading-none pr-tracking-tight",e),...t}));op.displayName=et.Title.displayName;const ap=E.forwardRef(({className:e,...t},r)=>l.jsx(et.Description,{ref:r,className:F("pr-text-sm pr-text-muted-foreground",e),...t}));ap.displayName=et.Description.displayName;const Ws=E.forwardRef(({className:e,...t},r)=>l.jsx(Ie.Command,{ref:r,className:F("pr-flex pr-h-full pr-w-full pr-flex-col pr-overflow-hidden pr-rounded-md pr-bg-popover pr-text-popover-foreground",e),...t}));Ws.displayName=Ie.Command.displayName;const Xs=E.forwardRef(({className:e,...t},r)=>l.jsxs("div",{className:"pr-flex pr-items-center pr-border-b pr-px-3",children:[l.jsx(ne.Search,{className:"pr-me-2 pr-h-4 pr-w-4 pr-shrink-0 pr-opacity-50"}),l.jsx(Ie.Command.Input,{ref:r,className:F("pr-flex pr-h-11 pr-w-full pr-rounded-md pr-bg-transparent pr-py-3 pr-text-sm pr-outline-none placeholder:pr-text-muted-foreground disabled:pr-cursor-not-allowed disabled:pr-opacity-50",e),...t})]}));Xs.displayName=Ie.Command.Input.displayName;const Ys=E.forwardRef(({className:e,...t},r)=>l.jsx(Ie.Command.List,{ref:r,className:F("pr-max-h-[300px] pr-overflow-y-auto pr-overflow-x-hidden",e),...t}));Ys.displayName=Ie.Command.List.displayName;const Ks=E.forwardRef((e,t)=>l.jsx(Ie.Command.Empty,{ref:t,className:"pr-py-6 pr-text-center pr-text-sm",...e}));Ks.displayName=Ie.Command.Empty.displayName;const sp=E.forwardRef(({className:e,...t},r)=>l.jsx(Ie.Command.Group,{ref:r,className:F("pr-overflow-hidden pr-p-1 pr-text-foreground [&_[cmdk-group-heading]]:pr-px-2 [&_[cmdk-group-heading]]:pr-py-1.5 [&_[cmdk-group-heading]]:pr-text-xs [&_[cmdk-group-heading]]:pr-font-medium [&_[cmdk-group-heading]]:pr-text-muted-foreground",e),...t}));sp.displayName=Ie.Command.Group.displayName;const ip=E.forwardRef(({className:e,...t},r)=>l.jsx(Ie.Command.Separator,{ref:r,className:F("pr--mx-1 pr-h-px pr-bg-border",e),...t}));ip.displayName=Ie.Command.Separator.displayName;const Js=E.forwardRef(({className:e,...t},r)=>l.jsx(Ie.Command.Item,{ref:r,className:F("pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none data-[disabled=true]:pr-pointer-events-none data-[selected=true]:pr-bg-accent data-[selected=true]:pr-text-accent-foreground data-[disabled=true]:pr-opacity-50",e),...t}));Js.displayName=Ie.Command.Item.displayName;function lp(e){return typeof e=="string"?e:typeof e=="number"?e.toString():e.label}function so({id:e,options:t=[],className:r,value:n,onChange:o=()=>{},getOptionLabel:a=lp,buttonPlaceholder:s="",textPlaceholder:c="",commandEmptyMessage:p="No option found",buttonVariant:f="outline",dir:m="ltr",...v}){const[g,d]=E.useState(!1);return l.jsxs(ep,{open:g,onOpenChange:d,...v,children:[l.jsx(tp,{asChild:!0,children:l.jsxs(be,{variant:f,role:"combobox","aria-expanded":g,id:e,className:F("pr-w-[200px] pr-justify-between",r),children:[n?a(n):s,l.jsx(ne.ChevronsUpDown,{className:"pr-ms-2 pr-h-4 pr-w-4 pr-shrink-0 pr-opacity-50"})]})}),l.jsx(Gs,{className:"pr-w-[200px] pr-p-0",dir:m,children:l.jsxs(Ws,{children:[l.jsx(Xs,{dir:m,placeholder:c,className:"pr-text-inherit"}),l.jsx(Ks,{children:p}),l.jsx(Ys,{children:t.map(h=>l.jsxs(Js,{value:a(h),onSelect:()=>{o(h),d(!1)},children:[l.jsx(ne.Check,{className:F("pr-me-2 pr-h-4 pr-w-4",{"pr-opacity-0":!n||a(n)!==a(h)})}),a(h)]},a(h)))})]})})]})}function cp({handleSelectStartChapter:e,handleSelectEndChapter:t,isDisabled:r=!1,chapterCount:n}){const[o,a]=E.useState(1),[s,c]=E.useState(n),[p,f]=E.useState(Array.from({length:n},(g,d)=>d+1));E.useEffect(()=>{a(1),e(1),c(n),t(n),f(Array.from({length:n},(g,d)=>d+1))},[n,t,e]);const m=g=>{a(g),e(g),g>s&&(c(g),t(g))},v=g=>{c(g),t(g),gg.toString(),value:o},"start chapter"),label:"Chapters",labelPlacement:"start"}),l.jsx(Ee.FormControlLabel,{className:"book-selection-chapter-form-label end",disabled:r,control:l.jsx(so,{onChange:v,className:"book-selection-chapter",options:p,getOptionLabel:g=>g.toString(),value:s},"end chapter"),label:"to",labelPlacement:"start"})]})}var Rt=(e=>(e.After="after",e.Before="before",e.Above="above",e.Below="below",e))(Rt||{});function Zs({id:e,isChecked:t,labelText:r="",labelPosition:n=Rt.After,isIndeterminate:o=!1,isDefaultChecked:a,isDisabled:s=!1,hasError:c=!1,className:p,onChange:f}){const m=l.jsx(Ee.Checkbox,{id:e,checked:t,indeterminate:o,defaultChecked:a,disabled:s,className:`papi-checkbox ${c?"error":""} ${p??""}`,onChange:f});let v;if(r){const g=n===Rt.Before||n===Rt.Above,d=l.jsx("span",{className:`papi-checkbox-label ${c?"error":""} ${p??""}`,children:r}),h=n===Rt.Before||n===Rt.After,u=h?d:l.jsx("div",{children:d}),b=h?m:l.jsx("div",{children:m});v=l.jsxs(Ee.FormLabel,{className:`papi-checkbox ${n.toString()}`,disabled:s,error:c,children:[g&&u,b,!g&&u]})}else v=m;return v}function pp({id:e,className:t,legend:r,listItems:n,selectedListItems:o,handleSelectListItem:a,createLabel:s}){return l.jsxs("fieldset",{id:e,className:t,children:[r&&l.jsx("legend",{children:r}),n.map(c=>l.jsx(Zs,{className:"check-item",isChecked:o.includes(c),labelText:s?s(c):c,onChange:()=>a(c)},c))]})}function dp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function up(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Ro={},Qs={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Qs);var fp=Qs.exports,Vn={};function lr(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...n){return e(...n)||t(...n)}}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t{t[r]=ei(e[r])}),t}function ct(e,t,r={clone:!0}){const n=r.clone?P({},e):e;return Pt(e)&&Pt(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Pt(t[o])&&o in e&&Pt(e[o])?n[o]=ct(e[o],t[o],r):r.clone?n[o]=Pt(t[o])?ei(t[o]):t[o]:n[o]=t[o])}),n}var io={exports:{}},tn={exports:{}},ce={};/** @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 wa;function pp(){if(wa)return ce;wa=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,c=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function w(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case t:switch(y=y.type,y){case p:case f:case r:case a:case o:case v:return y;default:switch(y=y&&y.$$typeof,y){case c:case m:case h:case d:case s:return y;default:return S}}case n:return S}}}function k(y){return w(y)===f}return ce.AsyncMode=p,ce.ConcurrentMode=f,ce.ContextConsumer=c,ce.ContextProvider=s,ce.Element=t,ce.ForwardRef=m,ce.Fragment=r,ce.Lazy=h,ce.Memo=d,ce.Portal=n,ce.Profiler=a,ce.StrictMode=o,ce.Suspense=v,ce.isAsyncMode=function(y){return k(y)||w(y)===p},ce.isConcurrentMode=k,ce.isContextConsumer=function(y){return w(y)===c},ce.isContextProvider=function(y){return w(y)===s},ce.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},ce.isForwardRef=function(y){return w(y)===m},ce.isFragment=function(y){return w(y)===r},ce.isLazy=function(y){return w(y)===h},ce.isMemo=function(y){return w(y)===d},ce.isPortal=function(y){return w(y)===n},ce.isProfiler=function(y){return w(y)===a},ce.isStrictMode=function(y){return w(y)===o},ce.isSuspense=function(y){return w(y)===v},ce.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===f||y===a||y===o||y===v||y===g||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===d||y.$$typeof===s||y.$$typeof===c||y.$$typeof===m||y.$$typeof===b||y.$$typeof===x||y.$$typeof===R||y.$$typeof===u)},ce.typeOf=w,ce}var pe={};/** @license React v16.13.1 + */var Na;function mp(){if(Na)return ce;Na=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=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,c=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function w(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case t:switch(y=y.type,y){case p:case f:case n:case a:case o:case v:return y;default:switch(y=y&&y.$$typeof,y){case c:case m:case h:case d:case s:return y;default:return S}}case r:return S}}}function k(y){return w(y)===f}return ce.AsyncMode=p,ce.ConcurrentMode=f,ce.ContextConsumer=c,ce.ContextProvider=s,ce.Element=t,ce.ForwardRef=m,ce.Fragment=n,ce.Lazy=h,ce.Memo=d,ce.Portal=r,ce.Profiler=a,ce.StrictMode=o,ce.Suspense=v,ce.isAsyncMode=function(y){return k(y)||w(y)===p},ce.isConcurrentMode=k,ce.isContextConsumer=function(y){return w(y)===c},ce.isContextProvider=function(y){return w(y)===s},ce.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},ce.isForwardRef=function(y){return w(y)===m},ce.isFragment=function(y){return w(y)===n},ce.isLazy=function(y){return w(y)===h},ce.isMemo=function(y){return w(y)===d},ce.isPortal=function(y){return w(y)===r},ce.isProfiler=function(y){return w(y)===a},ce.isStrictMode=function(y){return w(y)===o},ce.isSuspense=function(y){return w(y)===v},ce.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===f||y===a||y===o||y===v||y===g||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===d||y.$$typeof===s||y.$$typeof===c||y.$$typeof===m||y.$$typeof===b||y.$$typeof===x||y.$$typeof===R||y.$$typeof===u)},ce.typeOf=w,ce}var pe={};/** @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 xa;function dp(){return xa||(xa=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,c=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function w(V){return typeof V=="string"||typeof V=="function"||V===r||V===f||V===a||V===o||V===v||V===g||typeof V=="object"&&V!==null&&(V.$$typeof===h||V.$$typeof===d||V.$$typeof===s||V.$$typeof===c||V.$$typeof===m||V.$$typeof===b||V.$$typeof===x||V.$$typeof===R||V.$$typeof===u)}function k(V){if(typeof V=="object"&&V!==null){var te=V.$$typeof;switch(te){case t:var D=V.type;switch(D){case p:case f:case r:case a:case o:case v:return D;default:var ie=D&&D.$$typeof;switch(ie){case c:case m:case h:case d:case s:return ie;default:return te}}case n:return te}}}var y=p,S=f,C=c,M=s,A=t,z=m,$=r,N=h,O=d,_=n,U=a,B=o,L=v,J=!1;function Z(V){return J||(J=!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.")),j(V)||k(V)===p}function j(V){return k(V)===f}function I(V){return k(V)===c}function H(V){return k(V)===s}function K(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function G(V){return k(V)===m}function q(V){return k(V)===r}function X(V){return k(V)===h}function Y(V){return k(V)===d}function W(V){return k(V)===n}function Q(V){return k(V)===a}function ee(V){return k(V)===o}function se(V){return k(V)===v}pe.AsyncMode=y,pe.ConcurrentMode=S,pe.ContextConsumer=C,pe.ContextProvider=M,pe.Element=A,pe.ForwardRef=z,pe.Fragment=$,pe.Lazy=N,pe.Memo=O,pe.Portal=_,pe.Profiler=U,pe.StrictMode=B,pe.Suspense=L,pe.isAsyncMode=Z,pe.isConcurrentMode=j,pe.isContextConsumer=I,pe.isContextProvider=H,pe.isElement=K,pe.isForwardRef=G,pe.isFragment=q,pe.isLazy=X,pe.isMemo=Y,pe.isPortal=W,pe.isProfiler=Q,pe.isStrictMode=ee,pe.isSuspense=se,pe.isValidElementType=w,pe.typeOf=k}()),pe}var ka;function Ks(){return ka||(ka=1,process.env.NODE_ENV==="production"?nr.exports=pp():nr.exports=dp()),nr.exports}/* + */var Ta;function hp(){return Ta||(Ta=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=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,c=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,v=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,u=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function w(V){return typeof V=="string"||typeof V=="function"||V===n||V===f||V===a||V===o||V===v||V===g||typeof V=="object"&&V!==null&&(V.$$typeof===h||V.$$typeof===d||V.$$typeof===s||V.$$typeof===c||V.$$typeof===m||V.$$typeof===b||V.$$typeof===x||V.$$typeof===R||V.$$typeof===u)}function k(V){if(typeof V=="object"&&V!==null){var te=V.$$typeof;switch(te){case t:var D=V.type;switch(D){case p:case f:case n:case a:case o:case v:return D;default:var ie=D&&D.$$typeof;switch(ie){case c:case m:case h:case d:case s:return ie;default:return te}}case r:return te}}}var y=p,S=f,C=c,M=s,A=t,z=m,$=n,N=h,j=d,_=r,H=a,B=o,L=v,J=!1;function Z(V){return J||(J=!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.")),O(V)||k(V)===p}function O(V){return k(V)===f}function I(V){return k(V)===c}function U(V){return k(V)===s}function K(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function G(V){return k(V)===m}function q(V){return k(V)===n}function X(V){return k(V)===h}function Y(V){return k(V)===d}function W(V){return k(V)===r}function Q(V){return k(V)===a}function ee(V){return k(V)===o}function se(V){return k(V)===v}pe.AsyncMode=y,pe.ConcurrentMode=S,pe.ContextConsumer=C,pe.ContextProvider=M,pe.Element=A,pe.ForwardRef=z,pe.Fragment=$,pe.Lazy=N,pe.Memo=j,pe.Portal=_,pe.Profiler=H,pe.StrictMode=B,pe.Suspense=L,pe.isAsyncMode=Z,pe.isConcurrentMode=O,pe.isContextConsumer=I,pe.isContextProvider=U,pe.isElement=K,pe.isForwardRef=G,pe.isFragment=q,pe.isLazy=X,pe.isMemo=Y,pe.isPortal=W,pe.isProfiler=Q,pe.isStrictMode=ee,pe.isSuspense=se,pe.isValidElementType=w,pe.typeOf=k}()),pe}var Sa;function ti(){return Sa||(Sa=1,process.env.NODE_ENV==="production"?tn.exports=mp():tn.exports=hp()),tn.exports}/* object-assign (c) Sindre Sorhus @license MIT -*/var zr,Ea;function up(){if(Ea)return zr;Ea=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},c=0;c<10;c++)s["_"+String.fromCharCode(c)]=c;var p=Object.getOwnPropertyNames(s).map(function(m){return s[m]});if(p.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(m){f[m]=m}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return zr=o()?Object.assign:function(a,s){for(var c,p=r(a),f,m=1;m1?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.")),s;function I(H,K,G,q,X){for(var Y=H[K],W=0;W0?", expected one of type ["+Q.join(", ")+"]":"";return new u("Invalid "+Y+" `"+W+"` supplied to "+("`"+X+"`"+te+"."))}return b(K)}function z(){function j(I,H,K,G,q){return _(I[H])?null:new u("Invalid "+G+" `"+q+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return b(j)}function $(j,I,H,K,G){return new u((j||"React class")+": "+I+" type `"+H+"."+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function N(j){function I(H,K,G,q,X){var Y=H[K],W=B(Y);if(W!=="object")return new u("Invalid "+q+" `"+X+"` of type `"+W+"` "+("supplied to `"+G+"`, expected `object`."));for(var Q in j){var ee=j[Q];if(typeof ee!="function")return $(G,q,X,Q,L(ee));var se=ee(Y,Q,G,q,X+"."+Q,n);if(se)return se}return null}return b(I)}function O(j){function I(H,K,G,q,X){var Y=H[K],W=B(Y);if(W!=="object")return new u("Invalid "+q+" `"+X+"` of type `"+W+"` "+("supplied to `"+G+"`, expected `object`."));var Q=t({},H[K],j);for(var ee in Q){var se=j[ee];if(r(j,ee)&&typeof se!="function")return $(G,q,X,ee,L(se));if(!se)return new u("Invalid "+q+" `"+X+"` key `"+ee+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(H[K],null," ")+` -Valid keys: `+JSON.stringify(Object.keys(j),null," "));var V=se(Y,ee,G,q,X+"."+ee,n);if(V)return V}return null}return b(I)}function _(j){switch(typeof j){case"number":case"string":case"undefined":return!0;case"boolean":return!j;case"object":if(Array.isArray(j))return j.every(_);if(j===null||c(j))return!0;var I=v(j);if(I){var H=I.call(j),K;if(I!==j.entries){for(;!(K=H.next()).done;)if(!_(K.value))return!1}else for(;!(K=H.next()).done;){var G=K.value;if(G&&!_(G[1]))return!1}}else return!1;return!0;default:return!1}}function U(j,I){return j==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function B(j){var I=typeof j;return Array.isArray(j)?"array":j instanceof RegExp?"object":U(I,j)?"symbol":I}function L(j){if(typeof j>"u"||j===null)return""+j;var I=B(j);if(I==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return I}function J(j){var I=L(j);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function Z(j){return!j.constructor||!j.constructor.name?g:j.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},qr}var Wr,Oa;function hp(){if(Oa)return Wr;Oa=1;var e=Po();function t(){}function n(){}return n.resetWarningCache=t,Wr=function(){function r(s,c,p,f,m,v){if(v!==e){var g=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 g.name="Invariant Violation",g}}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},Wr}if(process.env.NODE_ENV!=="production"){var gp=Ks(),bp=!0;io.exports=mp()(gp.isElement,bp)}else io.exports=hp()();var vp=io.exports;const i=ip(vp);function yp(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Zs(e,t,n,r,o){const a=e[t],s=o||t;if(a==null||typeof window>"u")return null;let c;const p=a.type;return typeof p=="function"&&!yp(p)&&(c="Did you accidentally use a plain function component for an element instead?"),c!==void 0?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Qs=ln(i.element,Zs);Qs.isRequired=ln(i.element.isRequired,Zs);const qn=Qs;function wp(e){const{prototype:t={}}=e;return!!t.isReactComponent}function xp(e,t,n,r,o){const a=e[t],s=o||t;if(a==null||typeof window>"u")return null;let c;return typeof a=="function"&&!wp(a)&&(c="Did you accidentally provide a plain function component instead?"),c!==void 0?new Error(`Invalid ${r} \`${s}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const kp=ln(i.elementType,xp),Ep="exact-prop: ​";function ei(e){return process.env.NODE_ENV==="production"?e:P({},e,{[Ep]: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 Qt(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.")),s;function I(U,K,G,q,X){for(var Y=U[K],W=0;W0?", expected one of type ["+Q.join(", ")+"]":"";return new u("Invalid "+Y+" `"+W+"` supplied to "+("`"+X+"`"+te+"."))}return b(K)}function z(){function O(I,U,K,G,q){return _(I[U])?null:new u("Invalid "+G+" `"+q+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return b(O)}function $(O,I,U,K,G){return new u((O||"React class")+": "+I+" type `"+U+"."+K+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function N(O){function I(U,K,G,q,X){var Y=U[K],W=B(Y);if(W!=="object")return new u("Invalid "+q+" `"+X+"` of type `"+W+"` "+("supplied to `"+G+"`, expected `object`."));for(var Q in O){var ee=O[Q];if(typeof ee!="function")return $(G,q,X,Q,L(ee));var se=ee(Y,Q,G,q,X+"."+Q,r);if(se)return se}return null}return b(I)}function j(O){function I(U,K,G,q,X){var Y=U[K],W=B(Y);if(W!=="object")return new u("Invalid "+q+" `"+X+"` of type `"+W+"` "+("supplied to `"+G+"`, expected `object`."));var Q=t({},U[K],O);for(var ee in Q){var se=O[ee];if(n(O,ee)&&typeof se!="function")return $(G,q,X,ee,L(se));if(!se)return new u("Invalid "+q+" `"+X+"` key `"+ee+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(U[K],null," ")+` +Valid keys: `+JSON.stringify(Object.keys(O),null," "));var V=se(Y,ee,G,q,X+"."+ee,r);if(V)return V}return null}return b(I)}function _(O){switch(typeof O){case"number":case"string":case"undefined":return!0;case"boolean":return!O;case"object":if(Array.isArray(O))return O.every(_);if(O===null||c(O))return!0;var I=v(O);if(I){var U=I.call(O),K;if(I!==O.entries){for(;!(K=U.next()).done;)if(!_(K.value))return!1}else for(;!(K=U.next()).done;){var G=K.value;if(G&&!_(G[1]))return!1}}else return!1;return!0;default:return!1}}function H(O,I){return O==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function B(O){var I=typeof O;return Array.isArray(O)?"array":O instanceof RegExp?"object":H(I,O)?"symbol":I}function L(O){if(typeof O>"u"||O===null)return""+O;var I=B(O);if(I==="object"){if(O instanceof Date)return"date";if(O instanceof RegExp)return"regexp"}return I}function J(O){var I=L(O);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function Z(O){return!O.constructor||!O.constructor.name?g:O.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},qn}var Wn,$a;function yp(){if($a)return Wn;$a=1;var e=Po();function t(){}function r(){}return r.resetWarningCache=t,Wn=function(){function n(s,c,p,f,m,v){if(v!==e){var g=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 g.name="Invariant Violation",g}}n.isRequired=n;function o(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Wn}if(process.env.NODE_ENV!=="production"){var wp=ti(),xp=!0;io.exports=vp()(wp.isElement,xp)}else io.exports=yp()();var kp=io.exports;const i=dp(kp);function Ep(e){const{prototype:t={}}=e;return!!t.isReactComponent}function ni(e,t,r,n,o){const a=e[t],s=o||t;if(a==null||typeof window>"u")return null;let c;const p=a.type;return typeof p=="function"&&!Ep(p)&&(c="Did you accidentally use a plain function component for an element instead?"),c!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const oi=lr(i.element,ni);oi.isRequired=lr(i.element.isRequired,ni);const Gr=oi;function Np(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Tp(e,t,r,n,o){const a=e[t],s=o||t;if(a==null||typeof window>"u")return null;let c;return typeof a=="function"&&!Np(a)&&(c="Did you accidentally provide a plain function component instead?"),c!==void 0?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Sp=lr(i.elementType,Tp),Cp="exact-prop: ​";function ai(e){return process.env.NODE_ENV==="production"?e:P({},e,{[Cp]:t=>{const r=Object.keys(t).filter(n=>!e.hasOwnProperty(n));return r.length>0?new Error(`The following props are not supported: ${r.map(n=>`\`${n}\``).join(", ")}. Please remove them.`):null}})}function Qt(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;rn==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function ni(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 Rp(e,t){return process.env.NODE_ENV==="production"?()=>null:(n,r,o,a,s)=>{const c=o||"<>",p=s||r;return typeof n[r]<"u"?new Error(`The ${a} \`${p}\` of \`${c}\` is deprecated. ${t}`):null}}function Pp(e,t){var n,r;return T.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 Oe(e){return e&&e.ownerDocument||document}function en(e){return Oe(e).defaultView||window}function $p(e,t){if(process.env.NODE_ENV==="production")return()=>null;const n=t?P({},t.propTypes):null;return o=>(a,s,c,p,f,...m)=>{const v=f||s,g=n==null?void 0:n[v];if(g){const d=g(a,s,c,p,f,...m);if(d)return d}return typeof a[s]<"u"&&!a[o]?new Error(`The prop \`${v}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function fr(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const _p=typeof window<"u"?T.useLayoutEffect:T.useEffect,Dt=_p;let $a=0;function Mp(e){const[t,n]=T.useState(e),r=e||t;return T.useEffect(()=>{t==null&&($a+=1,n(`mui-${$a}`))},[t]),r}const _a=T["useId".toString()];function ri(e){if(_a!==void 0){const t=_a();return e??t}return Mp(e)}function Ip(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 oi({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=T.useRef(e!==void 0),[a,s]=T.useState(t),c=o?e:a;if(process.env.NODE_ENV!=="production"){T.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:f}=T.useRef(t);T.useEffect(()=>{!o&&f!==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 p=T.useCallback(f=>{o||s(f)},[]);return[c,p]}function In(e){const t=T.useRef(e);return Dt(()=>{t.current=e}),T.useRef((...n)=>(0,t.current)(...n)).current}function qe(...e){return T.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{fr(n,t)})},e)}const Ma={};function Dp(e,t){const n=T.useRef(Ma);return n.current===Ma&&(n.current=e(t)),n}const Ap=[];function Bp(e){T.useEffect(e,Ap)}class Wn{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Wn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Nn(){const e=Dp(Wn.create).current;return Bp(e.disposeEffect),e}let Nr=!0,po=!1;const Lp=new Wn,Vp={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 Fp(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&Vp[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function zp(e){e.metaKey||e.altKey||e.ctrlKey||(Nr=!0)}function Xr(){Nr=!1}function Up(){this.visibilityState==="hidden"&&po&&(Nr=!0)}function Hp(e){e.addEventListener("keydown",zp,!0),e.addEventListener("mousedown",Xr,!0),e.addEventListener("pointerdown",Xr,!0),e.addEventListener("touchstart",Xr,!0),e.addEventListener("visibilitychange",Up,!0)}function Gp(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Nr||Fp(t)}function ai(){const e=T.useCallback(o=>{o!=null&&Hp(o.ownerDocument)},[]),t=T.useRef(!1);function n(){return t.current?(po=!0,Lp.start(100,()=>{po=!1}),t.current=!1,!0):!1}function r(o){return Gp(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function si(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function qp(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function Wp(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}const Xp=Number.isInteger||Wp;function ii(e,t,n,r){const o=e[t];if(o==null||!Xp(o)){const a=qp(o);return new RangeError(`Invalid ${r} \`${t}\` of type \`${a}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function li(e,t,...n){return e[t]===void 0?null:ii(e,t,...n)}function uo(){return null}li.isRequired=ii;uo.isRequired=uo;const ci=process.env.NODE_ENV==="production"?uo:li;function pi(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(s=>{n[r][s]=pi(o[s],a[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function ft(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((a,s)=>{if(s){const c=t(s);c!==""&&a.push(c),n&&n[s]&&a.push(n[s])}return a},[]).join(" ")}),r}const Ia=e=>e,Yp=()=>{let e=Ia;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Ia}}},Kp=Yp(),di=Kp,ui={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 rt(e,t,n="Mui"){const r=ui[t];return r?`${n}-${r}`:`${di.generate(e)}-${t}`}function xt(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=rt(e,o,n)}),r}function Jp(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function me(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 Zp=["values","unit","step"],Qp=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 ed(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=me(e,Zp),a=Qp(t),s=Object.keys(a);function c(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n})`}function p(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-r/100}${n})`}function f(g,d){const h=s.indexOf(d);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:d)-r/100}${n})`}function m(g){return s.indexOf(g)+1`@media (min-width:${_o[e]}px)`};function dt(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||Da;return t.reduce((s,c,p)=>(s[a.up(a.keys[p])]=n(t[p]),s),{})}if(typeof t=="object"){const a=r.breakpoints||Da;return Object.keys(t).reduce((s,c)=>{if(Object.keys(a.values||_o).indexOf(c)!==-1){const p=a.up(c);s[p]=n(t[c],c)}else{const p=c;s[p]=t[p]}return s},{})}return n(t)}function od(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function ad(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Tr(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 mr(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Tr(e,n)||r,t&&(o=t(o,r,e)),o}function ke(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=s=>{if(s[t]==null)return null;const c=s[t],p=s.theme,f=Tr(p,r)||{};return dt(s,c,v=>{let g=mr(f,o,v);return v===g&&typeof v=="string"&&(g=mr(f,o,`${t}${v==="default"?"":et(v)}`,v)),n===!1?g:{[n]:g}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:kt}:{},a.filterProps=[t],a}function sd(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const id={m:"margin",p:"padding"},ld={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Aa={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},cd=sd(e=>{if(e.length>2)if(Aa[e])e=Aa[e];else return[e];const[t,n]=e.split(""),r=id[t],o=ld[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),Sr=["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"],pd=[...Sr,...Cr];function Xn(e,t,n,r){var o;const a=(o=Tr(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(` + */var Ma;function Op(){return Ma||(Ma=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),p=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),h=!1,u=!1,b=!1,x=!1,R=!1,w;w=Symbol.for("react.module.reference");function k(D){return!!(typeof D=="string"||typeof D=="function"||D===r||D===o||R||D===n||D===f||D===m||x||D===d||h||u||b||typeof D=="object"&&D!==null&&(D.$$typeof===g||D.$$typeof===v||D.$$typeof===a||D.$$typeof===s||D.$$typeof===p||D.$$typeof===w||D.getModuleId!==void 0))}function y(D){if(typeof D=="object"&&D!==null){var ie=D.$$typeof;switch(ie){case e:var Ne=D.type;switch(Ne){case r:case o:case n:case f:case m:return Ne;default:var Re=Ne&&Ne.$$typeof;switch(Re){case c:case s:case p:case g:case v:case a:return Re;default:return ie}}case t:return ie}}}var S=s,C=a,M=e,A=p,z=r,$=g,N=v,j=t,_=o,H=n,B=f,L=m,J=!1,Z=!1;function O(D){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function I(D){return Z||(Z=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(D){return y(D)===s}function K(D){return y(D)===a}function G(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function q(D){return y(D)===p}function X(D){return y(D)===r}function Y(D){return y(D)===g}function W(D){return y(D)===v}function Q(D){return y(D)===t}function ee(D){return y(D)===o}function se(D){return y(D)===n}function V(D){return y(D)===f}function te(D){return y(D)===m}ue.ContextConsumer=S,ue.ContextProvider=C,ue.Element=M,ue.ForwardRef=A,ue.Fragment=z,ue.Lazy=$,ue.Memo=N,ue.Portal=j,ue.Profiler=_,ue.StrictMode=H,ue.Suspense=B,ue.SuspenseList=L,ue.isAsyncMode=O,ue.isConcurrentMode=I,ue.isContextConsumer=U,ue.isContextProvider=K,ue.isElement=G,ue.isForwardRef=q,ue.isFragment=X,ue.isLazy=Y,ue.isMemo=W,ue.isPortal=Q,ue.isProfiler=ee,ue.isStrictMode=se,ue.isSuspense=V,ue.isSuspenseList=te,ue.isValidElementType=k,ue.typeOf=y}()),ue}process.env.NODE_ENV==="production"?lo.exports=jp():lo.exports=Op();var un=lo.exports;const Rp=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Pp(e){const t=`${e}`.match(Rp);return t&&t[1]||""}function si(e,t=""){return e.displayName||e.name||Pp(e)||t}function Ia(e,t,r){const n=si(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function $p(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return si(e,"Component");if(typeof e=="object")switch(e.$$typeof){case un.ForwardRef:return Ia(e,e.render,"ForwardRef");case un.Memo:return Ia(e,e.type,"memo");default:return}}}function pt(e,t,r,n,o){if(process.env.NODE_ENV==="production")return null;const a=e[t],s=o||t;return a==null?null:a&&a.nodeType!==1?new Error(`Invalid ${n} \`${s}\` supplied to \`${r}\`. Expected an HTMLElement.`):null}const _p=i.oneOfType([i.func,i.object]),$o=_p;function tt(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Qt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function co(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function ii(e,t=166){let r;function n(...o){const a=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(a,t)}return n.clear=()=>{clearTimeout(r)},n}function Mp(e,t){return process.env.NODE_ENV==="production"?()=>null:(r,n,o,a,s)=>{const c=o||"<>",p=s||n;return typeof r[n]<"u"?new Error(`The ${a} \`${p}\` of \`${c}\` is deprecated. ${t}`):null}}function Ip(e,t){var r,n;return T.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function je(e){return e&&e.ownerDocument||document}function er(e){return je(e).defaultView||window}function Dp(e,t){if(process.env.NODE_ENV==="production")return()=>null;const r=t?P({},t.propTypes):null;return o=>(a,s,c,p,f,...m)=>{const v=f||s,g=r==null?void 0:r[v];if(g){const d=g(a,s,c,p,f,...m);if(d)return d}return typeof a[s]<"u"&&!a[o]?new Error(`The prop \`${v}\` of \`${e}\` can only be used together with the \`${o}\` prop.`):null}}function fn(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Ap=typeof window<"u"?T.useLayoutEffect:T.useEffect,Dt=Ap;let Da=0;function Bp(e){const[t,r]=T.useState(e),n=e||t;return T.useEffect(()=>{t==null&&(Da+=1,r(`mui-${Da}`))},[t]),n}const Aa=T["useId".toString()];function li(e){if(Aa!==void 0){const t=Aa();return e??t}return Bp(e)}function Lp(e,t,r,n,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 ci({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=T.useRef(e!==void 0),[a,s]=T.useState(t),c=o?e:a;if(process.env.NODE_ENV!=="production"){T.useEffect(()=>{o!==(e!==void 0)&&console.error([`MUI: A component is changing the ${o?"":"un"}controlled ${n} state of ${r} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} 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,r,e]);const{current:f}=T.useRef(t);T.useEffect(()=>{!o&&f!==t&&console.error([`MUI: A component is changing the default ${n} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(` +`))},[JSON.stringify(t)])}const p=T.useCallback(f=>{o||s(f)},[]);return[c,p]}function Ir(e){const t=T.useRef(e);return Dt(()=>{t.current=e}),T.useRef((...r)=>(0,t.current)(...r)).current}function qe(...e){return T.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{fn(r,t)})},e)}const Ba={};function Fp(e,t){const r=T.useRef(Ba);return r.current===Ba&&(r.current=e(t)),r}const Vp=[];function zp(e){T.useEffect(e,Vp)}class qr{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new qr}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}}function Nr(){const e=Fp(qr.create).current;return zp(e.disposeEffect),e}let Nn=!0,po=!1;const Hp=new qr,Up={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 Gp(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&Up[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function qp(e){e.metaKey||e.altKey||e.ctrlKey||(Nn=!0)}function Xn(){Nn=!1}function Wp(){this.visibilityState==="hidden"&&po&&(Nn=!0)}function Xp(e){e.addEventListener("keydown",qp,!0),e.addEventListener("mousedown",Xn,!0),e.addEventListener("pointerdown",Xn,!0),e.addEventListener("touchstart",Xn,!0),e.addEventListener("visibilitychange",Wp,!0)}function Yp(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Nn||Gp(t)}function pi(){const e=T.useCallback(o=>{o!=null&&Xp(o.ownerDocument)},[]),t=T.useRef(!1);function r(){return t.current?(po=!0,Hp.start(100,()=>{po=!1}),t.current=!1,!0):!1}function n(o){return Yp(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function di(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function Kp(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function Jp(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}const Zp=Number.isInteger||Jp;function ui(e,t,r,n){const o=e[t];if(o==null||!Zp(o)){const a=Kp(o);return new RangeError(`Invalid ${n} \`${t}\` of type \`${a}\` supplied to \`${r}\`, expected \`integer\`.`)}return null}function fi(e,t,...r){return e[t]===void 0?null:ui(e,t,...r)}function uo(){return null}fi.isRequired=ui;uo.isRequired=uo;const mi=process.env.NODE_ENV==="production"?uo:fi;function hi(e,t){const r=P({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=P({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},a=t[n];r[n]={},!a||!Object.keys(a)?r[n]=o:!o||!Object.keys(o)?r[n]=a:(r[n]=P({},a),Object.keys(o).forEach(s=>{r[n][s]=hi(o[s],a[s])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function ft(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((a,s)=>{if(s){const c=t(s);c!==""&&a.push(c),r&&r[s]&&a.push(r[s])}return a},[]).join(" ")}),n}const La=e=>e,Qp=()=>{let e=La;return{configure(t){e=t},generate(t){return e(t)},reset(){e=La}}},ed=Qp(),gi=ed,bi={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 nt(e,t,r="Mui"){const n=bi[t];return n?`${r}-${n}`:`${gi.generate(e)}-${t}`}function xt(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=nt(e,o,r)}),n}function td(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function me(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a=0)&&(r[o]=e[o]);return r}const rd=["values","unit","step"],nd=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>P({},r,{[n.key]:n.val}),{})};function od(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=me(e,rd),a=nd(t),s=Object.keys(a);function c(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${r})`}function p(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-n/100}${r})`}function f(g,d){const h=s.indexOf(d);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${r}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:d)-n/100}${r})`}function m(g){return s.indexOf(g)+1`@media (min-width:${_o[e]}px)`};function dt(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||Fa;return t.reduce((s,c,p)=>(s[a.up(a.keys[p])]=r(t[p]),s),{})}if(typeof t=="object"){const a=n.breakpoints||Fa;return Object.keys(t).reduce((s,c)=>{if(Object.keys(a.values||_o).indexOf(c)!==-1){const p=a.up(c);s[p]=r(t[c],c)}else{const p=c;s[p]=t[p]}return s},{})}return r(t)}function ld(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const a=e.up(o);return n[a]={},n},{}))||{}}function cd(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Tn(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function mn(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Tn(e,r)||n,t&&(o=t(o,n,e)),o}function ke(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,a=s=>{if(s[t]==null)return null;const c=s[t],p=s.theme,f=Tn(p,n)||{};return dt(s,c,v=>{let g=mn(f,o,v);return v===g&&typeof v=="string"&&(g=mn(f,o,`${t}${v==="default"?"":tt(v)}`,v)),r===!1?g:{[r]:g}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:kt}:{},a.filterProps=[t],a}function pd(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const dd={m:"margin",p:"padding"},ud={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Va={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fd=pd(e=>{if(e.length>2)if(Va[e])e=Va[e];else return[e];const[t,r]=e.split(""),n=dd[t],o=ud[r]||"";return Array.isArray(o)?o.map(a=>n+a):[n+o]}),Sn=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Cn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],md=[...Sn,...Cn];function Wr(e,t,r,n){var o;const a=(o=Tn(e,t,!1))!=null?o:r;return typeof a=="number"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} 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[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 fi(e){return Xn(e,"spacing",8,"spacing")}function Yn(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 dd(e,t){return n=>e.reduce((r,o)=>(r[o]=Yn(t,n),r),{})}function ud(e,t,n,r){if(t.indexOf(n)===-1)return null;const o=cd(n),a=dd(o,r),s=e[n];return dt(e,s,a)}function mi(e,t){const n=fi(e.theme);return Object.keys(e).map(r=>ud(e,t,r,n)).reduce(On,{})}function ve(e){return mi(e,Sr)}ve.propTypes=process.env.NODE_ENV!=="production"?Sr.reduce((e,t)=>(e[t]=kt,e),{}):{};ve.filterProps=Sr;function ye(e){return mi(e,Cr)}ye.propTypes=process.env.NODE_ENV!=="production"?Cr.reduce((e,t)=>(e[t]=kt,e),{}):{};ye.filterProps=Cr;process.env.NODE_ENV!=="production"&&pd.reduce((e,t)=>(e[t]=kt,e),{});function fd(e=8){if(e.mui)return e;const t=fi({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 s=t(a);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function Or(...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]?On(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 Ue(e){return typeof e!="number"?e:`${e}px solid`}function Ye(e,t){return ke({prop:e,themeKey:"borders",transform:t})}const md=Ye("border",Ue),hd=Ye("borderTop",Ue),gd=Ye("borderRight",Ue),bd=Ye("borderBottom",Ue),vd=Ye("borderLeft",Ue),yd=Ye("borderColor"),wd=Ye("borderTopColor"),xd=Ye("borderRightColor"),kd=Ye("borderBottomColor"),Ed=Ye("borderLeftColor"),Nd=Ye("outline",Ue),Td=Ye("outlineColor"),jr=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Xn(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Yn(t,r)});return dt(e,e.borderRadius,n)}return null};jr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:kt}:{};jr.filterProps=["borderRadius"];Or(md,hd,gd,bd,vd,yd,wd,xd,kd,Ed,jr,Nd,Td);const Rr=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Xn(e.theme,"spacing",8,"gap"),n=r=>({gap:Yn(t,r)});return dt(e,e.gap,n)}return null};Rr.propTypes=process.env.NODE_ENV!=="production"?{gap:kt}:{};Rr.filterProps=["gap"];const Pr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Xn(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Yn(t,r)});return dt(e,e.columnGap,n)}return null};Pr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:kt}:{};Pr.filterProps=["columnGap"];const $r=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Xn(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Yn(t,r)});return dt(e,e.rowGap,n)}return null};$r.propTypes=process.env.NODE_ENV!=="production"?{rowGap:kt}:{};$r.filterProps=["rowGap"];const Sd=ke({prop:"gridColumn"}),Cd=ke({prop:"gridRow"}),Od=ke({prop:"gridAutoFlow"}),jd=ke({prop:"gridAutoColumns"}),Rd=ke({prop:"gridAutoRows"}),Pd=ke({prop:"gridTemplateColumns"}),$d=ke({prop:"gridTemplateRows"}),_d=ke({prop:"gridTemplateAreas"}),Md=ke({prop:"gridArea"});Or(Rr,Pr,$r,Sd,Cd,Od,jd,Rd,Pd,$d,_d,Md);function Yt(e,t){return t==="grey"?t:e}const Id=ke({prop:"color",themeKey:"palette",transform:Yt}),Dd=ke({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yt}),Ad=ke({prop:"backgroundColor",themeKey:"palette",transform:Yt});Or(Id,Dd,Ad);function Ve(e){return e<=1&&e!==0?`${e*100}%`:e}const Bd=ke({prop:"width",transform:Ve}),Mo=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])||_o[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:Ve(n)}};return dt(e,e.maxWidth,t)}return null};Mo.filterProps=["maxWidth"];const Ld=ke({prop:"minWidth",transform:Ve}),Vd=ke({prop:"height",transform:Ve}),Fd=ke({prop:"maxHeight",transform:Ve}),zd=ke({prop:"minHeight",transform:Ve});ke({prop:"size",cssProperty:"width",transform:Ve});ke({prop:"size",cssProperty:"height",transform:Ve});const Ud=ke({prop:"boxSizing"});Or(Bd,Mo,Ld,Vd,Fd,zd,Ud);const Hd={border:{themeKey:"borders",transform:Ue},borderTop:{themeKey:"borders",transform:Ue},borderRight:{themeKey:"borders",transform:Ue},borderBottom:{themeKey:"borders",transform:Ue},borderLeft:{themeKey:"borders",transform:Ue},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Ue},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:jr},color:{themeKey:"palette",transform:Yt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yt},backgroundColor:{themeKey:"palette",transform:Yt},p:{style:ye},pt:{style:ye},pr:{style:ye},pb:{style:ye},pl:{style:ye},px:{style:ye},py:{style:ye},padding:{style:ye},paddingTop:{style:ye},paddingRight:{style:ye},paddingBottom:{style:ye},paddingLeft:{style:ye},paddingX:{style:ye},paddingY:{style:ye},paddingInline:{style:ye},paddingInlineStart:{style:ye},paddingInlineEnd:{style:ye},paddingBlock:{style:ye},paddingBlockStart:{style:ye},paddingBlockEnd:{style:ye},m:{style:ve},mt:{style:ve},mr:{style:ve},mb:{style:ve},ml:{style:ve},mx:{style:ve},my:{style:ve},margin:{style:ve},marginTop:{style:ve},marginRight:{style:ve},marginBottom:{style:ve},marginLeft:{style:ve},marginX:{style:ve},marginY:{style:ve},marginInline:{style:ve},marginInlineStart:{style:ve},marginInlineEnd:{style:ve},marginBlock:{style:ve},marginBlockStart:{style:ve},marginBlockEnd:{style:ve},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:Rr},rowGap:{style:$r},columnGap:{style:Pr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ve},maxWidth:{style:Mo},minWidth:{transform:Ve},height:{transform:Ve},maxHeight:{transform:Ve},minHeight:{transform:Ve},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Io=Hd;function Gd(...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 qd(e,t){return typeof e=="function"?e(t):e}function Wd(){function e(n,r,o,a){const s={[n]:r,theme:o},c=a[n];if(!c)return{[n]:r};const{cssProperty:p=n,themeKey:f,transform:m,style:v}=c;if(r==null)return null;if(f==="typography"&&r==="inherit")return{[n]:r};const g=Tr(o,f)||{};return v?v(s):dt(s,r,h=>{let u=mr(g,m,h);return h===u&&typeof h=="string"&&(u=mr(g,m,`${n}${h==="default"?"":et(h)}`,h)),p===!1?u:{[p]:u}})}function t(n){var r;const{sx:o,theme:a={}}=n||{};if(!o)return null;const s=(r=a.unstable_sxConfig)!=null?r:Io;function c(p){let f=p;if(typeof p=="function")f=p(a);else if(typeof p!="object")return p;if(!f)return null;const m=od(a.breakpoints),v=Object.keys(m);let g=m;return Object.keys(f).forEach(d=>{const h=qd(f[d],a);if(h!=null)if(typeof h=="object")if(s[d])g=On(g,e(d,h,a,s));else{const u=dt({theme:a},h,b=>({[d]:b}));Gd(u,h)?g[d]=t({sx:h,theme:a}):g=On(g,u)}else g=On(g,e(d,h,a,s))}),ad(v,g)}return Array.isArray(o)?o.map(c):c(o)}return t}const hi=Wd();hi.filterProps=["sx"];const Do=hi;function Xd(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 Yd=["breakpoints","palette","spacing","shape"];function Ao(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:a={}}=e,s=me(e,Yd),c=ed(n),p=fd(o);let f=ct({breakpoints:c,direction:"ltr",components:{},palette:P({mode:"light"},r),spacing:p,shape:P({},nd,a)},s);return f.applyStyles=Xd,f=t.reduce((m,v)=>ct(m,v),f),f.unstable_sxConfig=P({},Io,s==null?void 0:s.unstable_sxConfig),f.unstable_sx=function(v){return Do({sx:v,theme:this})},f}function Kd(e){return Object.keys(e).length===0}function gi(e=null){const t=T.useContext(oo.ThemeContext);return!t||Kd(t)?e:t}const Jd=Ao();function bi(e=Jd){return gi(e)}const Zd=["ownerState"],Qd=["variants"],eu=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function tu(e){return Object.keys(e).length===0}function nu(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ir(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ru=Ao(),Ba=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function rr({defaultTheme:e,theme:t,themeId:n}){return tu(t)?e:t[n]||t}function ou(e){return e?(t,n)=>n[e]:null}function lr(e,t){let{ownerState:n}=t,r=me(t,Zd);const o=typeof e=="function"?e(P({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(a=>lr(a,P({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:a=[]}=o;let c=me(o,Qd);return a.forEach(p=>{let f=!0;typeof p.props=="function"?f=p.props(P({ownerState:n},r,n)):Object.keys(p.props).forEach(m=>{(n==null?void 0:n[m])!==p.props[m]&&r[m]!==p.props[m]&&(f=!1)}),f&&(Array.isArray(c)||(c=[c]),c.push(typeof p.style=="function"?p.style(P({ownerState:n},r,n)):p.style))}),c}return o}function au(e={}){const{themeId:t,defaultTheme:n=ru,rootShouldForwardProp:r=ir,slotShouldForwardProp:o=ir}=e,a=s=>Do(P({},s,{theme:rr(P({},s,{defaultTheme:n,themeId:t}))}));return a.__mui_systemSx=!0,(s,c={})=>{oo.internal_processStyles(s,y=>y.filter(S=>!(S!=null&&S.__mui_systemSx)));const{name:p,slot:f,skipVariantsResolver:m,skipSx:v,overridesResolver:g=ou(Ba(f))}=c,d=me(c,eu),h=m!==void 0?m:f&&f!=="Root"&&f!=="root"||!1,u=v||!1;let b;process.env.NODE_ENV!=="production"&&p&&(b=`${p}-${Ba(f||"Root")}`);let x=ir;f==="Root"||f==="root"?x=r:f?x=o:nu(s)&&(x=void 0);const R=oo(s,P({shouldForwardProp:x,label:b},d)),w=y=>typeof y=="function"&&y.__emotion_real!==y||Pt(y)?S=>lr(y,P({},S,{theme:rr({theme:S.theme,defaultTheme:n,themeId:t})})):y,k=(y,...S)=>{let C=w(y);const M=S?S.map(w):[];p&&g&&M.push($=>{const N=rr(P({},$,{defaultTheme:n,themeId:t}));if(!N.components||!N.components[p]||!N.components[p].styleOverrides)return null;const O=N.components[p].styleOverrides,_={};return Object.entries(O).forEach(([U,B])=>{_[U]=lr(B,P({},$,{theme:N}))}),g($,_)}),p&&!h&&M.push($=>{var N;const O=rr(P({},$,{defaultTheme:n,themeId:t})),_=O==null||(N=O.components)==null||(N=N[p])==null?void 0:N.variants;return lr({variants:_},P({},$,{theme:O}))}),u||M.push(a);const A=M.length-S.length;if(Array.isArray(y)&&A>0){const $=new Array(A).fill("");C=[...y,...$],C.raw=[...y.raw,...$]}const z=R(C,...M);if(process.env.NODE_ENV!=="production"){let $;p&&($=`${p}${et(f||"")}`),$===void 0&&($=`Styled(${Op(s)})`),z.displayName=$}return s.muiName&&(z.muiName=s.muiName),z};return R.withConfig&&(k.withConfig=R.withConfig),k}}function su(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:pi(t.components[n].defaultProps,r)}function iu({props:e,name:t,defaultTheme:n,themeId:r}){let o=bi(n);return r&&(o=o[r]||o),su({theme:o,name:t,props:e})}function Bo(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}].`),Jp(e,t,n)}function lu(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 At(e){if(e.type)return e;if(e.charAt(0)==="#")return At(lu(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().`:Qt(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.`:Qt(10,o))}else r=r.split(",");return r=r.map(a=>parseFloat(a)),{type:n,values:r,colorSpace:o}}function _r(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 cu(e){e=At(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,a=r*Math.min(o,1-o),s=(f,m=(f+n/30)%12)=>o-a*Math.max(Math.min(m-3,9-m,1),-1);let c="rgb";const p=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(c+="a",p.push(t[3])),_r({type:c,values:p})}function La(e){e=At(e);let t=e.type==="hsl"||e.type==="hsla"?At(cu(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 Va(e,t){const n=La(e),r=La(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function hr(e,t){return e=At(e),t=Bo(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_r(e)}function pu(e,t){if(e=At(e),t=Bo(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 _r(e)}function du(e,t){if(e=At(e),t=Bo(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 _r(e)}function uu(e,t){return P({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const fu={black:"#000",white:"#fff"},Dn=fu,mu={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"},hu=mu,gu={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"},Ft=gu,bu={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"},zt=bu,vu={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"},bn=vu,yu={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"},Ut=yu,wu={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"},Ht=wu,xu={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"},Gt=xu,ku=["mode","contrastThreshold","tonalOffset"],Fa={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:Dn.white,default:Dn.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}},Yr={text:{primary:Dn.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:Dn.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 za(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=du(e.main,o):t==="dark"&&(e.dark=pu(e.main,a)))}function Eu(e="light"){return e==="dark"?{main:Ut[200],light:Ut[50],dark:Ut[400]}:{main:Ut[700],light:Ut[400],dark:Ut[800]}}function Nu(e="light"){return e==="dark"?{main:Ft[200],light:Ft[50],dark:Ft[400]}:{main:Ft[500],light:Ft[300],dark:Ft[700]}}function Tu(e="light"){return e==="dark"?{main:zt[500],light:zt[300],dark:zt[700]}:{main:zt[700],light:zt[400],dark:zt[800]}}function Su(e="light"){return e==="dark"?{main:Ht[400],light:Ht[300],dark:Ht[700]}:{main:Ht[700],light:Ht[500],dark:Ht[900]}}function Cu(e="light"){return e==="dark"?{main:Gt[400],light:Gt[300],dark:Gt[700]}:{main:Gt[800],light:Gt[500],dark:Gt[900]}}function Ou(e="light"){return e==="dark"?{main:bn[400],light:bn[300],dark:bn[700]}:{main:"#ed6c02",light:bn[500],dark:bn[900]}}function ju(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=me(e,ku),a=e.primary||Eu(t),s=e.secondary||Nu(t),c=e.error||Tu(t),p=e.info||Su(t),f=e.success||Cu(t),m=e.warning||Ou(t);function v(u){const b=Va(u,Yr.text.primary)>=n?Yr.text.primary:Fa.text.primary;if(process.env.NODE_ENV!=="production"){const x=Va(u,b);x<3&&console.error([`MUI: The contrast ratio of ${x}:1 for ${b} on ${u}`,"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(` +`)),()=>{})}function vi(e){return Wr(e,"spacing",8,"spacing")}function Xr(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function hd(e,t){return r=>e.reduce((n,o)=>(n[o]=Xr(t,r),n),{})}function gd(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=fd(r),a=hd(o,n),s=e[r];return dt(e,s,a)}function yi(e,t){const r=vi(e.theme);return Object.keys(e).map(n=>gd(e,t,n,r)).reduce(jr,{})}function ve(e){return yi(e,Sn)}ve.propTypes=process.env.NODE_ENV!=="production"?Sn.reduce((e,t)=>(e[t]=kt,e),{}):{};ve.filterProps=Sn;function ye(e){return yi(e,Cn)}ye.propTypes=process.env.NODE_ENV!=="production"?Cn.reduce((e,t)=>(e[t]=kt,e),{}):{};ye.filterProps=Cn;process.env.NODE_ENV!=="production"&&md.reduce((e,t)=>(e[t]=kt,e),{});function bd(e=8){if(e.mui)return e;const t=vi({spacing:e}),r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const s=t(a);return typeof s=="number"?`${s}px`:s}).join(" "));return r.mui=!0,r}function jn(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(a=>{n[a]=o}),n),{}),r=n=>Object.keys(n).reduce((o,a)=>t[a]?jr(o,t[a](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function He(e){return typeof e!="number"?e:`${e}px solid`}function Ye(e,t){return ke({prop:e,themeKey:"borders",transform:t})}const vd=Ye("border",He),yd=Ye("borderTop",He),wd=Ye("borderRight",He),xd=Ye("borderBottom",He),kd=Ye("borderLeft",He),Ed=Ye("borderColor"),Nd=Ye("borderTopColor"),Td=Ye("borderRightColor"),Sd=Ye("borderBottomColor"),Cd=Ye("borderLeftColor"),jd=Ye("outline",He),Od=Ye("outlineColor"),On=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Wr(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:Xr(t,n)});return dt(e,e.borderRadius,r)}return null};On.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:kt}:{};On.filterProps=["borderRadius"];jn(vd,yd,wd,xd,kd,Ed,Nd,Td,Sd,Cd,On,jd,Od);const Rn=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Wr(e.theme,"spacing",8,"gap"),r=n=>({gap:Xr(t,n)});return dt(e,e.gap,r)}return null};Rn.propTypes=process.env.NODE_ENV!=="production"?{gap:kt}:{};Rn.filterProps=["gap"];const Pn=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Wr(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:Xr(t,n)});return dt(e,e.columnGap,r)}return null};Pn.propTypes=process.env.NODE_ENV!=="production"?{columnGap:kt}:{};Pn.filterProps=["columnGap"];const $n=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Wr(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:Xr(t,n)});return dt(e,e.rowGap,r)}return null};$n.propTypes=process.env.NODE_ENV!=="production"?{rowGap:kt}:{};$n.filterProps=["rowGap"];const Rd=ke({prop:"gridColumn"}),Pd=ke({prop:"gridRow"}),$d=ke({prop:"gridAutoFlow"}),_d=ke({prop:"gridAutoColumns"}),Md=ke({prop:"gridAutoRows"}),Id=ke({prop:"gridTemplateColumns"}),Dd=ke({prop:"gridTemplateRows"}),Ad=ke({prop:"gridTemplateAreas"}),Bd=ke({prop:"gridArea"});jn(Rn,Pn,$n,Rd,Pd,$d,_d,Md,Id,Dd,Ad,Bd);function Yt(e,t){return t==="grey"?t:e}const Ld=ke({prop:"color",themeKey:"palette",transform:Yt}),Fd=ke({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Yt}),Vd=ke({prop:"backgroundColor",themeKey:"palette",transform:Yt});jn(Ld,Fd,Vd);function Fe(e){return e<=1&&e!==0?`${e*100}%`:e}const zd=ke({prop:"width",transform:Fe}),Mo=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const a=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||_o[r];return a?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${a}${e.theme.breakpoints.unit}`}:{maxWidth:a}:{maxWidth:Fe(r)}};return dt(e,e.maxWidth,t)}return null};Mo.filterProps=["maxWidth"];const Hd=ke({prop:"minWidth",transform:Fe}),Ud=ke({prop:"height",transform:Fe}),Gd=ke({prop:"maxHeight",transform:Fe}),qd=ke({prop:"minHeight",transform:Fe});ke({prop:"size",cssProperty:"width",transform:Fe});ke({prop:"size",cssProperty:"height",transform:Fe});const Wd=ke({prop:"boxSizing"});jn(zd,Mo,Hd,Ud,Gd,qd,Wd);const Xd={border:{themeKey:"borders",transform:He},borderTop:{themeKey:"borders",transform:He},borderRight:{themeKey:"borders",transform:He},borderBottom:{themeKey:"borders",transform:He},borderLeft:{themeKey:"borders",transform:He},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:He},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:On},color:{themeKey:"palette",transform:Yt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Yt},backgroundColor:{themeKey:"palette",transform:Yt},p:{style:ye},pt:{style:ye},pr:{style:ye},pb:{style:ye},pl:{style:ye},px:{style:ye},py:{style:ye},padding:{style:ye},paddingTop:{style:ye},paddingRight:{style:ye},paddingBottom:{style:ye},paddingLeft:{style:ye},paddingX:{style:ye},paddingY:{style:ye},paddingInline:{style:ye},paddingInlineStart:{style:ye},paddingInlineEnd:{style:ye},paddingBlock:{style:ye},paddingBlockStart:{style:ye},paddingBlockEnd:{style:ye},m:{style:ve},mt:{style:ve},mr:{style:ve},mb:{style:ve},ml:{style:ve},mx:{style:ve},my:{style:ve},margin:{style:ve},marginTop:{style:ve},marginRight:{style:ve},marginBottom:{style:ve},marginLeft:{style:ve},marginX:{style:ve},marginY:{style:ve},marginInline:{style:ve},marginInlineStart:{style:ve},marginInlineEnd:{style:ve},marginBlock:{style:ve},marginBlockStart:{style:ve},marginBlockEnd:{style:ve},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:Rn},rowGap:{style:$n},columnGap:{style:Pn},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Fe},maxWidth:{style:Mo},minWidth:{transform:Fe},height:{transform:Fe},maxHeight:{transform:Fe},minHeight:{transform:Fe},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Io=Xd;function Yd(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Kd(e,t){return typeof e=="function"?e(t):e}function Jd(){function e(r,n,o,a){const s={[r]:n,theme:o},c=a[r];if(!c)return{[r]:n};const{cssProperty:p=r,themeKey:f,transform:m,style:v}=c;if(n==null)return null;if(f==="typography"&&n==="inherit")return{[r]:n};const g=Tn(o,f)||{};return v?v(s):dt(s,n,h=>{let u=mn(g,m,h);return h===u&&typeof h=="string"&&(u=mn(g,m,`${r}${h==="default"?"":tt(h)}`,h)),p===!1?u:{[p]:u}})}function t(r){var n;const{sx:o,theme:a={}}=r||{};if(!o)return null;const s=(n=a.unstable_sxConfig)!=null?n:Io;function c(p){let f=p;if(typeof p=="function")f=p(a);else if(typeof p!="object")return p;if(!f)return null;const m=ld(a.breakpoints),v=Object.keys(m);let g=m;return Object.keys(f).forEach(d=>{const h=Kd(f[d],a);if(h!=null)if(typeof h=="object")if(s[d])g=jr(g,e(d,h,a,s));else{const u=dt({theme:a},h,b=>({[d]:b}));Yd(u,h)?g[d]=t({sx:h,theme:a}):g=jr(g,u)}else g=jr(g,e(d,h,a,s))}),cd(v,g)}return Array.isArray(o)?o.map(c):c(o)}return t}const wi=Jd();wi.filterProps=["sx"];const Do=wi;function Zd(e,t){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}const Qd=["breakpoints","palette","spacing","shape"];function Ao(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:a={}}=e,s=me(e,Qd),c=od(r),p=bd(o);let f=ct({breakpoints:c,direction:"ltr",components:{},palette:P({mode:"light"},n),spacing:p,shape:P({},sd,a)},s);return f.applyStyles=Zd,f=t.reduce((m,v)=>ct(m,v),f),f.unstable_sxConfig=P({},Io,s==null?void 0:s.unstable_sxConfig),f.unstable_sx=function(v){return Do({sx:v,theme:this})},f}function eu(e){return Object.keys(e).length===0}function xi(e=null){const t=T.useContext(oo.ThemeContext);return!t||eu(t)?e:t}const tu=Ao();function ki(e=tu){return xi(e)}const ru=["ownerState"],nu=["variants"],ou=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function au(e){return Object.keys(e).length===0}function su(e){return typeof e=="string"&&e.charCodeAt(0)>96}function sn(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const iu=Ao(),za=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function rn({defaultTheme:e,theme:t,themeId:r}){return au(t)?e:t[r]||t}function lu(e){return e?(t,r)=>r[e]:null}function ln(e,t){let{ownerState:r}=t,n=me(t,ru);const o=typeof e=="function"?e(P({ownerState:r},n)):e;if(Array.isArray(o))return o.flatMap(a=>ln(a,P({ownerState:r},n)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:a=[]}=o;let c=me(o,nu);return a.forEach(p=>{let f=!0;typeof p.props=="function"?f=p.props(P({ownerState:r},n,r)):Object.keys(p.props).forEach(m=>{(r==null?void 0:r[m])!==p.props[m]&&n[m]!==p.props[m]&&(f=!1)}),f&&(Array.isArray(c)||(c=[c]),c.push(typeof p.style=="function"?p.style(P({ownerState:r},n,r)):p.style))}),c}return o}function cu(e={}){const{themeId:t,defaultTheme:r=iu,rootShouldForwardProp:n=sn,slotShouldForwardProp:o=sn}=e,a=s=>Do(P({},s,{theme:rn(P({},s,{defaultTheme:r,themeId:t}))}));return a.__mui_systemSx=!0,(s,c={})=>{oo.internal_processStyles(s,y=>y.filter(S=>!(S!=null&&S.__mui_systemSx)));const{name:p,slot:f,skipVariantsResolver:m,skipSx:v,overridesResolver:g=lu(za(f))}=c,d=me(c,ou),h=m!==void 0?m:f&&f!=="Root"&&f!=="root"||!1,u=v||!1;let b;process.env.NODE_ENV!=="production"&&p&&(b=`${p}-${za(f||"Root")}`);let x=sn;f==="Root"||f==="root"?x=n:f?x=o:su(s)&&(x=void 0);const R=oo(s,P({shouldForwardProp:x,label:b},d)),w=y=>typeof y=="function"&&y.__emotion_real!==y||Pt(y)?S=>ln(y,P({},S,{theme:rn({theme:S.theme,defaultTheme:r,themeId:t})})):y,k=(y,...S)=>{let C=w(y);const M=S?S.map(w):[];p&&g&&M.push($=>{const N=rn(P({},$,{defaultTheme:r,themeId:t}));if(!N.components||!N.components[p]||!N.components[p].styleOverrides)return null;const j=N.components[p].styleOverrides,_={};return Object.entries(j).forEach(([H,B])=>{_[H]=ln(B,P({},$,{theme:N}))}),g($,_)}),p&&!h&&M.push($=>{var N;const j=rn(P({},$,{defaultTheme:r,themeId:t})),_=j==null||(N=j.components)==null||(N=N[p])==null?void 0:N.variants;return ln({variants:_},P({},$,{theme:j}))}),u||M.push(a);const A=M.length-S.length;if(Array.isArray(y)&&A>0){const $=new Array(A).fill("");C=[...y,...$],C.raw=[...y.raw,...$]}const z=R(C,...M);if(process.env.NODE_ENV!=="production"){let $;p&&($=`${p}${tt(f||"")}`),$===void 0&&($=`Styled(${$p(s)})`),z.displayName=$}return s.muiName&&(z.muiName=s.muiName),z};return R.withConfig&&(k.withConfig=R.withConfig),k}}function pu(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:hi(t.components[r].defaultProps,n)}function du({props:e,name:t,defaultTheme:r,themeId:n}){let o=ki(r);return n&&(o=o[n]||o),pu({theme:o,name:t,props:e})}function Bo(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(er)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),td(e,t,r)}function uu(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function At(e){if(e.type)return e;if(e.charAt(0)==="#")return At(uu(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-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().`:Qt(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[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.`:Qt(10,o))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:o}}function _n(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.indexOf("rgb")!==-1?n=n.map((o,a)=>a<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function fu(e){e=At(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,a=n*Math.min(o,1-o),s=(f,m=(f+r/30)%12)=>o-a*Math.max(Math.min(m-3,9-m,1),-1);let c="rgb";const p=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(c+="a",p.push(t[3])),_n({type:c,values:p})}function Ha(e){e=At(e);let t=e.type==="hsl"||e.type==="hsla"?At(fu(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ua(e,t){const r=Ha(e),n=Ha(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function hn(e,t){return e=At(e),t=Bo(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,_n(e)}function mu(e,t){if(e=At(e),t=Bo(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 r=0;r<3;r+=1)e.values[r]*=1-t;return _n(e)}function hu(e,t){if(e=At(e),t=Bo(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return _n(e)}function gu(e,t){return P({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const bu={black:"#000",white:"#fff"},Dr=bu,vu={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"},yu=vu,wu={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"},Vt=wu,xu={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"},zt=xu,ku={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"},br=ku,Eu={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"},Ht=Eu,Nu={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"},Ut=Nu,Tu={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"},Gt=Tu,Su=["mode","contrastThreshold","tonalOffset"],Ga={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:Dr.white,default:Dr.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}},Yn={text:{primary:Dr.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:Dr.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 qa(e,t,r,n){const o=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=hu(e.main,o):t==="dark"&&(e.dark=mu(e.main,a)))}function Cu(e="light"){return e==="dark"?{main:Ht[200],light:Ht[50],dark:Ht[400]}:{main:Ht[700],light:Ht[400],dark:Ht[800]}}function ju(e="light"){return e==="dark"?{main:Vt[200],light:Vt[50],dark:Vt[400]}:{main:Vt[500],light:Vt[300],dark:Vt[700]}}function Ou(e="light"){return e==="dark"?{main:zt[500],light:zt[300],dark:zt[700]}:{main:zt[700],light:zt[400],dark:zt[800]}}function Ru(e="light"){return e==="dark"?{main:Ut[400],light:Ut[300],dark:Ut[700]}:{main:Ut[700],light:Ut[500],dark:Ut[900]}}function Pu(e="light"){return e==="dark"?{main:Gt[400],light:Gt[300],dark:Gt[700]}:{main:Gt[800],light:Gt[500],dark:Gt[900]}}function $u(e="light"){return e==="dark"?{main:br[400],light:br[300],dark:br[700]}:{main:"#ed6c02",light:br[500],dark:br[900]}}function _u(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=me(e,Su),a=e.primary||Cu(t),s=e.secondary||ju(t),c=e.error||Ou(t),p=e.info||Ru(t),f=e.success||Pu(t),m=e.warning||$u(t);function v(u){const b=Ua(u,Yn.text.primary)>=r?Yn.text.primary:Ga.text.primary;if(process.env.NODE_ENV!=="production"){const x=Ua(u,b);x<3&&console.error([`MUI: The contrast ratio of ${x}:1 for ${b} on ${u}`,"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 b}const g=({color:u,name:b,mainShade:x=500,lightShade:R=300,darkShade:w=700})=>{if(u=P({},u),!u.main&&u[x]&&(u.main=u[x]),!u.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid. The color object needs to have a \`main\` property or a \`${x}\` property.`:Qt(11,b?` (${b})`:"",x));if(typeof u.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${b?` (${b})`:""} provided to augmentColor(color) is invalid. \`color.main\` should be a string, but \`${JSON.stringify(u.main)}\` was provided instead. @@ -55,180 +55,37 @@ const theme1 = createTheme({ palette: { const theme2 = createTheme({ palette: { primary: { main: green[500] }, -} });`:Qt(12,b?` (${b})`:"",JSON.stringify(u.main)));return za(u,"light",R,r),za(u,"dark",w,r),u.contrastText||(u.contrastText=v(u.main)),u},d={dark:Yr,light:Fa};return process.env.NODE_ENV!=="production"&&(d[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ct(P({common:P({},Dn),mode:t,primary:g({color:a,name:"primary"}),secondary:g({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:c,name:"error"}),warning:g({color:m,name:"warning"}),info:g({color:p,name:"info"}),success:g({color:f,name:"success"}),grey:hu,contrastThreshold:n,getContrastText:v,augmentColor:g,tonalOffset:r},d[t]),o)}const Ru=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Pu(e){return Math.round(e*1e5)/1e5}const Ua={textTransform:"uppercase"},Ha='"Roboto", "Helvetica", "Arial", sans-serif';function $u(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=Ha,fontSize:o=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:c=500,fontWeightBold:p=700,htmlFontSize:f=16,allVariants:m,pxToRem:v}=n,g=me(n,Ru);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const d=o/14,h=v||(x=>`${x/f*d}rem`),u=(x,R,w,k,y)=>P({fontFamily:r,fontWeight:x,fontSize:h(R),lineHeight:w},r===Ha?{letterSpacing:`${Pu(k/R)}em`}:{},y,m),b={h1:u(a,96,1.167,-1.5),h2:u(a,60,1.2,-.5),h3:u(s,48,1.167,0),h4:u(s,34,1.235,.25),h5:u(s,24,1.334,0),h6:u(c,20,1.6,.15),subtitle1:u(s,16,1.75,.15),subtitle2:u(c,14,1.57,.1),body1:u(s,16,1.5,.15),body2:u(s,14,1.43,.15),button:u(c,14,1.75,.4,Ua),caption:u(s,12,1.66,.4),overline:u(s,12,2.66,1,Ua),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ct(P({htmlFontSize:f,pxToRem:h,fontFamily:r,fontSize:o,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:c,fontWeightBold:p},b),g,{clone:!1})}const _u=.2,Mu=.14,Iu=.12;function ge(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${_u})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Mu})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Iu})`].join(",")}const Du=["none",ge(0,2,1,-1,0,1,1,0,0,1,3,0),ge(0,3,1,-2,0,2,2,0,0,1,5,0),ge(0,3,3,-2,0,3,4,0,0,1,8,0),ge(0,2,4,-1,0,4,5,0,0,1,10,0),ge(0,3,5,-1,0,5,8,0,0,1,14,0),ge(0,3,5,-1,0,6,10,0,0,1,18,0),ge(0,4,5,-2,0,7,10,1,0,2,16,1),ge(0,5,5,-3,0,8,10,1,0,3,14,2),ge(0,5,6,-3,0,9,12,1,0,3,16,2),ge(0,6,6,-3,0,10,14,1,0,4,18,3),ge(0,6,7,-4,0,11,15,1,0,4,20,3),ge(0,7,8,-4,0,12,17,2,0,5,22,4),ge(0,7,8,-4,0,13,19,2,0,5,24,4),ge(0,7,9,-4,0,14,21,2,0,5,26,4),ge(0,8,9,-5,0,15,22,2,0,6,28,5),ge(0,8,10,-5,0,16,24,2,0,6,30,5),ge(0,8,11,-5,0,17,26,2,0,6,32,5),ge(0,9,11,-5,0,18,28,2,0,7,34,6),ge(0,9,12,-6,0,19,29,2,0,7,36,6),ge(0,10,13,-6,0,20,31,3,0,8,38,7),ge(0,10,13,-6,0,21,33,3,0,8,40,7),ge(0,10,14,-6,0,22,35,3,0,8,42,7),ge(0,11,14,-7,0,23,36,3,0,9,44,8),ge(0,11,15,-7,0,24,38,3,0,9,46,8)],Au=Du,Bu=["duration","easing","delay"],Lu={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)"},Vu={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ga(e){return`${Math.round(e)}ms`}function Fu(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function zu(e){const t=P({},Lu,e.easing),n=P({},Vu,e.duration);return P({getAutoHeightDuration:Fu,create:(o=["all"],a={})=>{const{duration:s=n.standard,easing:c=t.easeInOut,delay:p=0}=a,f=me(a,Bu);if(process.env.NODE_ENV!=="production"){const m=g=>typeof g=="string",v=g=>!isNaN(parseFloat(g));!m(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!v(s)&&!m(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),m(c)||console.error('MUI: Argument "easing" must be a string.'),!v(p)&&!m(p)&&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(f).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(f).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(m=>`${m} ${typeof s=="string"?s:Ga(s)} ${c} ${typeof p=="string"?p:Ga(p)}`).join(",")}},e,{easing:t,duration:n})}const Uu={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Hu=Uu,Gu=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function qu(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:a={}}=e,s=me(e,Gu);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.":Qt(18));const c=ju(r),p=Ao(e);let f=ct(p,{mixins:uu(p.breakpoints,n),palette:c,shadows:Au.slice(),typography:$u(c,a),transitions:zu(o),zIndex:P({},Hu)});if(f=ct(f,s),f=t.reduce((m,v)=>ct(m,v),f),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],v=(g,d)=>{let h;for(h in g){const u=g[h];if(m.indexOf(h)!==-1&&Object.keys(u).length>0){if(process.env.NODE_ENV!=="production"){const b=rt("",h);console.error([`MUI: The \`${d}\` component increases the CSS specificity of the \`${h}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${b}' syntax:`,JSON.stringify({root:{[`&.${b}`]:u}},null,2),"","https://mui.com/r/state-classes-guide"].join(` -`))}g[h]={}}}};Object.keys(f.components).forEach(g=>{const d=f.components[g].styleOverrides;d&&g.indexOf("Mui")===0&&v(d,g)})}return f.unstable_sxConfig=P({},Io,s==null?void 0:s.unstable_sxConfig),f.unstable_sx=function(v){return Do({sx:v,theme:this})},f}const Wu=qu(),Lo=Wu,Vo="$$material";function mt({props:e,name:t}){return iu({props:e,name:t,defaultTheme:Lo,themeId:Vo})}const vi=e=>ir(e)&&e!=="classes",Xu=au({themeId:Vo,defaultTheme:Lo,rootShouldForwardProp:vi}),je=Xu;function Yu(e){return rt("MuiSvgIcon",e)}xt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ku=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Ju=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${et(t)}`,`fontSize${et(n)}`]};return ft(o,Yu,r)},Zu=je("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${et(n.color)}`],t[`fontSize${et(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,o,a,s,c,p,f,m,v,g,d,h;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||(s=a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem",medium:((c=e.typography)==null||(p=c.pxToRem)==null?void 0:p.call(c,24))||"1.5rem",large:((f=e.typography)==null||(m=f.pxToRem)==null?void 0:m.call(f,35))||"2.1875rem"}[t.fontSize],color:(v=(g=(e.vars||e).palette)==null||(g=g[t.color])==null?void 0:g.main)!=null?v:{action:(d=(e.vars||e).palette)==null||(d=d.action)==null?void 0:d.active,disabled:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.disabled,inherit:void 0}[t.color]}}),Fo=T.forwardRef(function(t,n){const r=mt({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:s="inherit",component:c="svg",fontSize:p="medium",htmlColor:f,inheritViewBox:m=!1,titleAccess:v,viewBox:g="0 0 24 24"}=r,d=me(r,Ku),h=T.isValidElement(o)&&o.type==="svg",u=P({},r,{color:s,component:c,fontSize:p,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:g,hasSvgAsChild:h}),b={};m||(b.viewBox=g);const x=Ju(u);return l.jsxs(Zu,P({as:c,className:Se(x.root,a),focusable:"false",color:f,"aria-hidden":v?void 0:!0,role:v?"img":void 0,ref:n},b,d,h&&o.props,{ownerState:u,children:[h?o.props.children:o,v?l.jsx("title",{children:v}):null]}))});process.env.NODE_ENV!=="production"&&(Fo.propTypes={children:i.node,classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),i.string]),component:i.elementType,fontSize:i.oneOfType([i.oneOf(["inherit","large","medium","small"]),i.string]),htmlColor:i.string,inheritViewBox:i.bool,shapeRendering:i.string,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),titleAccess:i.string,viewBox:i.string});Fo.muiName="SvgIcon";const qa=Fo;function yi(e,t){function n(r,o){return l.jsx(qa,P({"data-testid":`${t}Icon`,ref:o},r,{children:e}))}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=qa.muiName,T.memo(T.forwardRef(n))}const Qu={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(` -`)),di.configure(e)}},ef=Object.freeze(Object.defineProperty({__proto__:null,capitalize:et,createChainedFunction:co,createSvgIcon:yi,debounce:ni,deprecatedPropType:Rp,isMuiElement:Pp,ownerDocument:Oe,ownerWindow:en,requirePropFactory:$p,setRef:fr,unstable_ClassNameGenerator:Qu,unstable_useEnhancedEffect:Dt,unstable_useId:ri,unsupportedProp:Ip,useControlled:oi,useEventCallback:In,useForkRef:qe,useIsFocusVisible:ai},Symbol.toStringTag,{value:"Module"})),tf=lp(ef);var Wa;function nf(){return Wa||(Wa=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=tf}(Fr)),Fr}var rf=cp;Object.defineProperty(Ro,"__esModule",{value:!0});var wi=Ro.default=void 0,of=rf(nf()),af=l;wi=Ro.default=(0,of.default)((0,af.jsx)("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight");function xi(e){return typeof e=="string"}function Tn(e,t,n){return e===void 0||xi(e)?t:P({},t,{ownerState:P({},t.ownerState,n)})}const sf={disableDefaultClasses:!1},lf=T.createContext(sf);function cf(e){const{disableDefaultClasses:t}=T.useContext(lf);return n=>t?"":e(n)}function ki(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 pf(e,t,n){return typeof e=="function"?e(t,n):e}function Xa(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 df(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){const d=Se(n==null?void 0:n.className,a,o==null?void 0:o.className,r==null?void 0:r.className),h=P({},n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),u=P({},n,o,r);return d.length>0&&(u.className=d),Object.keys(h).length>0&&(u.style=h),{props:u,internalRef:void 0}}const s=ki(P({},o,r)),c=Xa(r),p=Xa(o),f=t(s),m=Se(f==null?void 0:f.className,n==null?void 0:n.className,a,o==null?void 0:o.className,r==null?void 0:r.className),v=P({},f==null?void 0:f.style,n==null?void 0:n.style,o==null?void 0:o.style,r==null?void 0:r.style),g=P({},f,n,p,c);return m.length>0&&(g.className=m),Object.keys(v).length>0&&(g.style=v),{props:g,internalRef:f.ref}}const uf=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Bt(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o,skipResolvingSlotProps:a=!1}=e,s=me(e,uf),c=a?{}:pf(r,o),{props:p,internalRef:f}=df(P({},s,{externalSlotProps:c})),m=qe(f,c==null?void 0:c.ref,(t=e.additionalProps)==null?void 0:t.ref);return Tn(n,P({},p,{ref:m}),o)}const Ei="base";function ff(e){return`${Ei}--${e}`}function mf(e,t){return`${Ei}-${e}-${t}`}function Ni(e,t){const n=ui[t];return n?ff(n):mf(e,t)}function hf(e,t){const n={};return t.forEach(r=>{n[r]=Ni(e,r)}),n}const gf=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function bf(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function vf(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function yf(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||vf(e))}function wf(e){const t=[],n=[];return Array.from(e.querySelectorAll(gf)).forEach((r,o)=>{const a=bf(r);a===-1||!yf(r)||(a===0?t.push(r):n.push({documentOrder:o,tabIndex:a,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function xf(){return!0}function gr(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:a=wf,isEnabled:s=xf,open:c}=e,p=T.useRef(!1),f=T.useRef(null),m=T.useRef(null),v=T.useRef(null),g=T.useRef(null),d=T.useRef(!1),h=T.useRef(null),u=qe(t.ref,h),b=T.useRef(null);T.useEffect(()=>{!c||!h.current||(d.current=!n)},[n,c]),T.useEffect(()=>{if(!c||!h.current)return;const w=Oe(h.current);return h.current.contains(w.activeElement)||(h.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(` -`)),h.current.setAttribute("tabIndex","-1")),d.current&&h.current.focus()),()=>{o||(v.current&&v.current.focus&&(p.current=!0,v.current.focus()),v.current=null)}},[c]),T.useEffect(()=>{if(!c||!h.current)return;const w=Oe(h.current),k=C=>{b.current=C,!(r||!s()||C.key!=="Tab")&&w.activeElement===h.current&&C.shiftKey&&(p.current=!0,m.current&&m.current.focus())},y=()=>{const C=h.current;if(C===null)return;if(!w.hasFocus()||!s()||p.current){p.current=!1;return}if(C.contains(w.activeElement)||r&&w.activeElement!==f.current&&w.activeElement!==m.current)return;if(w.activeElement!==g.current)g.current=null;else if(g.current!==null)return;if(!d.current)return;let M=[];if((w.activeElement===f.current||w.activeElement===m.current)&&(M=a(h.current)),M.length>0){var A,z;const $=!!((A=b.current)!=null&&A.shiftKey&&((z=b.current)==null?void 0:z.key)==="Tab"),N=M[0],O=M[M.length-1];typeof N!="string"&&typeof O!="string"&&($?O.focus():N.focus())}else C.focus()};w.addEventListener("focusin",y),w.addEventListener("keydown",k,!0);const S=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&y()},50);return()=>{clearInterval(S),w.removeEventListener("focusin",y),w.removeEventListener("keydown",k,!0)}},[n,r,o,s,c,a]);const x=w=>{v.current===null&&(v.current=w.relatedTarget),d.current=!0,g.current=w.target;const k=t.props.onFocus;k&&k(w)},R=w=>{v.current===null&&(v.current=w.relatedTarget),d.current=!0};return l.jsxs(T.Fragment,{children:[l.jsx("div",{tabIndex:c?0:-1,onFocus:R,ref:f,"data-testid":"sentinelStart"}),T.cloneElement(t,{ref:u,onFocus:x}),l.jsx("div",{tabIndex:c?0:-1,onFocus:R,ref:m,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(gr.propTypes={children:qn,disableAutoFocus:i.bool,disableEnforceFocus:i.bool,disableRestoreFocus:i.bool,getTabbable:i.func,isEnabled:i.func,open:i.bool.isRequired});process.env.NODE_ENV!=="production"&&(gr["propTypes"]=ei(gr.propTypes));function kf(e){return typeof e=="function"?e():e}const An=T.forwardRef(function(t,n){const{children:r,container:o,disablePortal:a=!1}=t,[s,c]=T.useState(null),p=qe(T.isValidElement(r)?r.ref:null,n);if(Dt(()=>{a||c(kf(o)||document.body)},[o,a]),Dt(()=>{if(s&&!a)return fr(n,s),()=>{fr(n,null)}},[n,s,a]),a){if(T.isValidElement(r)){const f={ref:p};return T.cloneElement(r,f)}return l.jsx(T.Fragment,{children:r})}return l.jsx(T.Fragment,{children:s&&pc.createPortal(r,s)})});process.env.NODE_ENV!=="production"&&(An.propTypes={children:i.node,container:i.oneOfType([pt,i.func]),disablePortal:i.bool});process.env.NODE_ENV!=="production"&&(An["propTypes"]=ei(An.propTypes));function Ef(e){const t=Oe(e);return t.body===e?en(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function jn(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Ya(e){return parseInt(en(e).getComputedStyle(e).paddingRight,10)||0}function Nf(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function Ka(e,t,n,r,o){const a=[t,n,...r];[].forEach.call(e.children,s=>{const c=a.indexOf(s)===-1,p=!Nf(s);c&&p&&jn(s,o)})}function Kr(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function Tf(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Ef(r)){const s=si(Oe(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Ya(r)+s}px`;const c=Oe(r).querySelectorAll(".mui-fixed");[].forEach.call(c,p=>{n.push({value:p.style.paddingRight,property:"padding-right",el:p}),p.style.paddingRight=`${Ya(p)+s}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=Oe(r).body;else{const s=r.parentElement,c=en(r);a=(s==null?void 0:s.nodeName)==="HTML"&&c.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{n.forEach(({value:a,el:s,property:c})=>{a?s.style.setProperty(c,a):s.style.removeProperty(c)})}}function Sf(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Cf{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&jn(t.modalRef,!1);const o=Sf(n);Ka(n,t.mount,t.modalRef,o,!0);const a=Kr(this.containers,s=>s.container===n);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Kr(this.containers,a=>a.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=Tf(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Kr(this.containers,s=>s.modals.indexOf(t)!==-1),a=this.containers[o];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&jn(t.modalRef,n),Ka(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&jn(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Of(e){return typeof e=="function"?e():e}function jf(e){return e?e.props.hasOwnProperty("in"):!1}const Rf=new Cf;function Pf(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=Rf,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:c,children:p,onClose:f,open:m,rootRef:v}=e,g=T.useRef({}),d=T.useRef(null),h=T.useRef(null),u=qe(h,v),[b,x]=T.useState(!m),R=jf(p);let w=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(w=!1);const k=()=>Oe(d.current),y=()=>(g.current.modalRef=h.current,g.current.mount=d.current,g.current),S=()=>{o.mount(y(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},C=In(()=>{const B=Of(t)||k().body;o.add(y(),B),h.current&&S()}),M=T.useCallback(()=>o.isTopModal(y()),[o]),A=In(B=>{d.current=B,B&&(m&&M()?S():h.current&&jn(h.current,w))}),z=T.useCallback(()=>{o.remove(y(),w)},[w,o]);T.useEffect(()=>()=>{z()},[z]),T.useEffect(()=>{m?C():(!R||!a)&&z()},[m,z,R,a,C]);const $=B=>L=>{var J;(J=B.onKeyDown)==null||J.call(B,L),!(L.key!=="Escape"||L.which===229||!M())&&(n||(L.stopPropagation(),f&&f(L,"escapeKeyDown")))},N=B=>L=>{var J;(J=B.onClick)==null||J.call(B,L),L.target===L.currentTarget&&f&&f(L,"backdropClick")};return{getRootProps:(B={})=>{const L=ki(e);delete L.onTransitionEnter,delete L.onTransitionExited;const J=P({},L,B);return P({role:"presentation"},J,{onKeyDown:$(J),ref:u})},getBackdropProps:(B={})=>{const L=B;return P({"aria-hidden":!0},L,{onClick:N(L),open:m})},getTransitionProps:()=>{const B=()=>{x(!1),s&&s()},L=()=>{x(!0),c&&c(),a&&z()};return{onEnter:co(B,p==null?void 0:p.props.onEnter),onExited:co(L,p==null?void 0:p.props.onExited)}},rootRef:u,portalRef:A,isTopModal:M,exited:b,hasTransition:R}}var _e="top",We="bottom",Xe="right",Me="left",zo="auto",Kn=[_e,We,Xe,Me],tn="start",Bn="end",$f="clippingParents",Ti="viewport",vn="popper",_f="reference",Ja=Kn.reduce(function(e,t){return e.concat([t+"-"+tn,t+"-"+Bn])},[]),Si=[].concat(Kn,[zo]).reduce(function(e,t){return e.concat([t,t+"-"+tn,t+"-"+Bn])},[]),Mf="beforeRead",If="read",Df="afterRead",Af="beforeMain",Bf="main",Lf="afterMain",Vf="beforeWrite",Ff="write",zf="afterWrite",Uf=[Mf,If,Df,Af,Bf,Lf,Vf,Ff,zf];function tt(e){return e?(e.nodeName||"").toLowerCase():null}function Fe(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Lt(e){var t=Fe(e).Element;return e instanceof t||e instanceof Element}function Ge(e){var t=Fe(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Uo(e){if(typeof ShadowRoot>"u")return!1;var t=Fe(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Hf(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];!Ge(a)||!tt(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(s){var c=o[s];c===!1?a.removeAttribute(s):a.setAttribute(s,c===!0?"":c)}))})}function Gf(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]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),c=s.reduce(function(p,f){return p[f]="",p},{});!Ge(o)||!tt(o)||(Object.assign(o.style,c),Object.keys(a).forEach(function(p){o.removeAttribute(p)}))})}}const qf={name:"applyStyles",enabled:!0,phase:"write",fn:Hf,effect:Gf,requires:["computeStyles"]};function Ze(e){return e.split("-")[0]}var _t=Math.max,br=Math.min,nn=Math.round;function fo(){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 Ci(){return!/^((?!chrome|android).)*safari/i.test(fo())}function rn(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&Ge(e)&&(o=e.offsetWidth>0&&nn(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&nn(r.height)/e.offsetHeight||1);var s=Lt(e)?Fe(e):window,c=s.visualViewport,p=!Ci()&&n,f=(r.left+(p&&c?c.offsetLeft:0))/o,m=(r.top+(p&&c?c.offsetTop:0))/a,v=r.width/o,g=r.height/a;return{width:v,height:g,top:m,right:f+v,bottom:m+g,left:f,x:f,y:m}}function Ho(e){var t=rn(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 Oi(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Uo(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ut(e){return Fe(e).getComputedStyle(e)}function Wf(e){return["table","td","th"].indexOf(tt(e))>=0}function Et(e){return((Lt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Mr(e){return tt(e)==="html"?e:e.assignedSlot||e.parentNode||(Uo(e)?e.host:null)||Et(e)}function Za(e){return!Ge(e)||ut(e).position==="fixed"?null:e.offsetParent}function Xf(e){var t=/firefox/i.test(fo()),n=/Trident/i.test(fo());if(n&&Ge(e)){var r=ut(e);if(r.position==="fixed")return null}var o=Mr(e);for(Uo(o)&&(o=o.host);Ge(o)&&["html","body"].indexOf(tt(o))<0;){var a=ut(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 Jn(e){for(var t=Fe(e),n=Za(e);n&&Wf(n)&&ut(n).position==="static";)n=Za(n);return n&&(tt(n)==="html"||tt(n)==="body"&&ut(n).position==="static")?t:n||Xf(e)||t}function Go(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Rn(e,t,n){return _t(e,br(t,n))}function Yf(e,t,n){var r=Rn(e,t,n);return r>n?n:r}function ji(){return{top:0,right:0,bottom:0,left:0}}function Ri(e){return Object.assign({},ji(),e)}function Pi(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Kf=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Ri(typeof t!="number"?t:Pi(t,Kn))};function Jf(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,s=n.modifiersData.popperOffsets,c=Ze(n.placement),p=Go(c),f=[Me,Xe].indexOf(c)>=0,m=f?"height":"width";if(!(!a||!s)){var v=Kf(o.padding,n),g=Ho(a),d=p==="y"?_e:Me,h=p==="y"?We:Xe,u=n.rects.reference[m]+n.rects.reference[p]-s[p]-n.rects.popper[m],b=s[p]-n.rects.reference[p],x=Jn(a),R=x?p==="y"?x.clientHeight||0:x.clientWidth||0:0,w=u/2-b/2,k=v[d],y=R-g[m]-v[h],S=R/2-g[m]/2+w,C=Rn(k,S,y),M=p;n.modifiersData[r]=(t={},t[M]=C,t.centerOffset=C-S,t)}}function Zf(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)||Oi(t.elements.popper,o)&&(t.elements.arrow=o))}const Qf={name:"arrow",enabled:!0,phase:"main",fn:Jf,effect:Zf,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function on(e){return e.split("-")[1]}var em={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tm(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:nn(n*o)/o||0,y:nn(r*o)/o||0}}function Qa(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,c=e.position,p=e.gpuAcceleration,f=e.adaptive,m=e.roundOffsets,v=e.isFixed,g=s.x,d=g===void 0?0:g,h=s.y,u=h===void 0?0:h,b=typeof m=="function"?m({x:d,y:u}):{x:d,y:u};d=b.x,u=b.y;var x=s.hasOwnProperty("x"),R=s.hasOwnProperty("y"),w=Me,k=_e,y=window;if(f){var S=Jn(n),C="clientHeight",M="clientWidth";if(S===Fe(n)&&(S=Et(n),ut(S).position!=="static"&&c==="absolute"&&(C="scrollHeight",M="scrollWidth")),S=S,o===_e||(o===Me||o===Xe)&&a===Bn){k=We;var A=v&&S===y&&y.visualViewport?y.visualViewport.height:S[C];u-=A-r.height,u*=p?1:-1}if(o===Me||(o===_e||o===We)&&a===Bn){w=Xe;var z=v&&S===y&&y.visualViewport?y.visualViewport.width:S[M];d-=z-r.width,d*=p?1:-1}}var $=Object.assign({position:c},f&&em),N=m===!0?tm({x:d,y:u},Fe(n)):{x:d,y:u};if(d=N.x,u=N.y,p){var O;return Object.assign({},$,(O={},O[k]=R?"0":"",O[w]=x?"0":"",O.transform=(y.devicePixelRatio||1)<=1?"translate("+d+"px, "+u+"px)":"translate3d("+d+"px, "+u+"px, 0)",O))}return Object.assign({},$,(t={},t[k]=R?u+"px":"",t[w]=x?d+"px":"",t.transform="",t))}function nm(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,c=n.roundOffsets,p=c===void 0?!0:c,f={placement:Ze(t.placement),variation:on(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,Qa(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:p})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Qa(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:p})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const rm={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:nm,data:{}};var or={passive:!0};function om(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=o===void 0?!0:o,s=r.resize,c=s===void 0?!0:s,p=Fe(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(m){m.addEventListener("scroll",n.update,or)}),c&&p.addEventListener("resize",n.update,or),function(){a&&f.forEach(function(m){m.removeEventListener("scroll",n.update,or)}),c&&p.removeEventListener("resize",n.update,or)}}const am={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:om,data:{}};var sm={left:"right",right:"left",bottom:"top",top:"bottom"};function cr(e){return e.replace(/left|right|bottom|top/g,function(t){return sm[t]})}var im={start:"end",end:"start"};function es(e){return e.replace(/start|end/g,function(t){return im[t]})}function qo(e){var t=Fe(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Wo(e){return rn(Et(e)).left+qo(e).scrollLeft}function lm(e,t){var n=Fe(e),r=Et(e),o=n.visualViewport,a=r.clientWidth,s=r.clientHeight,c=0,p=0;if(o){a=o.width,s=o.height;var f=Ci();(f||!f&&t==="fixed")&&(c=o.offsetLeft,p=o.offsetTop)}return{width:a,height:s,x:c+Wo(e),y:p}}function cm(e){var t,n=Et(e),r=qo(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=_t(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=_t(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+Wo(e),p=-r.scrollTop;return ut(o||n).direction==="rtl"&&(c+=_t(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:c,y:p}}function Xo(e){var t=ut(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function $i(e){return["html","body","#document"].indexOf(tt(e))>=0?e.ownerDocument.body:Ge(e)&&Xo(e)?e:$i(Mr(e))}function Pn(e,t){var n;t===void 0&&(t=[]);var r=$i(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),a=Fe(r),s=o?[a].concat(a.visualViewport||[],Xo(r)?r:[]):r,c=t.concat(s);return o?c:c.concat(Pn(Mr(s)))}function mo(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pm(e,t){var n=rn(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 ts(e,t,n){return t===Ti?mo(lm(e,n)):Lt(t)?pm(t,n):mo(cm(Et(e)))}function dm(e){var t=Pn(Mr(e)),n=["absolute","fixed"].indexOf(ut(e).position)>=0,r=n&&Ge(e)?Jn(e):e;return Lt(r)?t.filter(function(o){return Lt(o)&&Oi(o,r)&&tt(o)!=="body"}):[]}function um(e,t,n,r){var o=t==="clippingParents"?dm(e):[].concat(t),a=[].concat(o,[n]),s=a[0],c=a.reduce(function(p,f){var m=ts(e,f,r);return p.top=_t(m.top,p.top),p.right=br(m.right,p.right),p.bottom=br(m.bottom,p.bottom),p.left=_t(m.left,p.left),p},ts(e,s,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function _i(e){var t=e.reference,n=e.element,r=e.placement,o=r?Ze(r):null,a=r?on(r):null,s=t.x+t.width/2-n.width/2,c=t.y+t.height/2-n.height/2,p;switch(o){case _e:p={x:s,y:t.y-n.height};break;case We:p={x:s,y:t.y+t.height};break;case Xe:p={x:t.x+t.width,y:c};break;case Me:p={x:t.x-n.width,y:c};break;default:p={x:t.x,y:t.y}}var f=o?Go(o):null;if(f!=null){var m=f==="y"?"height":"width";switch(a){case tn:p[f]=p[f]-(t[m]/2-n[m]/2);break;case Bn:p[f]=p[f]+(t[m]/2-n[m]/2);break}}return p}function Ln(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,a=n.strategy,s=a===void 0?e.strategy:a,c=n.boundary,p=c===void 0?$f:c,f=n.rootBoundary,m=f===void 0?Ti:f,v=n.elementContext,g=v===void 0?vn:v,d=n.altBoundary,h=d===void 0?!1:d,u=n.padding,b=u===void 0?0:u,x=Ri(typeof b!="number"?b:Pi(b,Kn)),R=g===vn?_f:vn,w=e.rects.popper,k=e.elements[h?R:g],y=um(Lt(k)?k:k.contextElement||Et(e.elements.popper),p,m,s),S=rn(e.elements.reference),C=_i({reference:S,element:w,strategy:"absolute",placement:o}),M=mo(Object.assign({},w,C)),A=g===vn?M:S,z={top:y.top-A.top+x.top,bottom:A.bottom-y.bottom+x.bottom,left:y.left-A.left+x.left,right:A.right-y.right+x.right},$=e.modifiersData.offset;if(g===vn&&$){var N=$[o];Object.keys(z).forEach(function(O){var _=[Xe,We].indexOf(O)>=0?1:-1,U=[_e,We].indexOf(O)>=0?"y":"x";z[O]+=N[U]*_})}return z}function fm(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,s=n.padding,c=n.flipVariations,p=n.allowedAutoPlacements,f=p===void 0?Si:p,m=on(r),v=m?c?Ja:Ja.filter(function(h){return on(h)===m}):Kn,g=v.filter(function(h){return f.indexOf(h)>=0});g.length===0&&(g=v);var d=g.reduce(function(h,u){return h[u]=Ln(e,{placement:u,boundary:o,rootBoundary:a,padding:s})[Ze(u)],h},{});return Object.keys(d).sort(function(h,u){return d[h]-d[u]})}function mm(e){if(Ze(e)===zo)return[];var t=cr(e);return[es(e),t,es(t)]}function hm(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,s=n.altAxis,c=s===void 0?!0:s,p=n.fallbackPlacements,f=n.padding,m=n.boundary,v=n.rootBoundary,g=n.altBoundary,d=n.flipVariations,h=d===void 0?!0:d,u=n.allowedAutoPlacements,b=t.options.placement,x=Ze(b),R=x===b,w=p||(R||!h?[cr(b)]:mm(b)),k=[b].concat(w).reduce(function(G,q){return G.concat(Ze(q)===zo?fm(t,{placement:q,boundary:m,rootBoundary:v,padding:f,flipVariations:h,allowedAutoPlacements:u}):q)},[]),y=t.rects.reference,S=t.rects.popper,C=new Map,M=!0,A=k[0],z=0;z=0,U=_?"width":"height",B=Ln(t,{placement:$,boundary:m,rootBoundary:v,altBoundary:g,padding:f}),L=_?O?Xe:Me:O?We:_e;y[U]>S[U]&&(L=cr(L));var J=cr(L),Z=[];if(a&&Z.push(B[N]<=0),c&&Z.push(B[L]<=0,B[J]<=0),Z.every(function(G){return G})){A=$,M=!1;break}C.set($,Z)}if(M)for(var j=h?3:1,I=function(q){var X=k.find(function(Y){var W=C.get(Y);if(W)return W.slice(0,q).every(function(Q){return Q})});if(X)return A=X,"break"},H=j;H>0;H--){var K=I(H);if(K==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const gm={name:"flip",enabled:!0,phase:"main",fn:hm,requiresIfExists:["offset"],data:{_skip:!1}};function ns(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 rs(e){return[_e,Xe,We,Me].some(function(t){return e[t]>=0})}function bm(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=Ln(t,{elementContext:"reference"}),c=Ln(t,{altBoundary:!0}),p=ns(s,r),f=ns(c,o,a),m=rs(p),v=rs(f);t.modifiersData[n]={referenceClippingOffsets:p,popperEscapeOffsets:f,isReferenceHidden:m,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":m,"data-popper-escaped":v})}const vm={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bm};function ym(e,t,n){var r=Ze(e),o=[Me,_e].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=a[0],c=a[1];return s=s||0,c=(c||0)*o,[Me,Xe].indexOf(r)>=0?{x:c,y:s}:{x:s,y:c}}function wm(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=o===void 0?[0,0]:o,s=Si.reduce(function(m,v){return m[v]=ym(v,t.rects,a),m},{}),c=s[t.placement],p=c.x,f=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=p,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=s}const xm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wm};function km(e){var t=e.state,n=e.name;t.modifiersData[n]=_i({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Em={name:"popperOffsets",enabled:!0,phase:"read",fn:km,data:{}};function Nm(e){return e==="x"?"y":"x"}function Tm(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=o===void 0?!0:o,s=n.altAxis,c=s===void 0?!1:s,p=n.boundary,f=n.rootBoundary,m=n.altBoundary,v=n.padding,g=n.tether,d=g===void 0?!0:g,h=n.tetherOffset,u=h===void 0?0:h,b=Ln(t,{boundary:p,rootBoundary:f,padding:v,altBoundary:m}),x=Ze(t.placement),R=on(t.placement),w=!R,k=Go(x),y=Nm(k),S=t.modifiersData.popperOffsets,C=t.rects.reference,M=t.rects.popper,A=typeof u=="function"?u(Object.assign({},t.rects,{placement:t.placement})):u,z=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(S){if(a){var O,_=k==="y"?_e:Me,U=k==="y"?We:Xe,B=k==="y"?"height":"width",L=S[k],J=L+b[_],Z=L-b[U],j=d?-M[B]/2:0,I=R===tn?C[B]:M[B],H=R===tn?-M[B]:-C[B],K=t.elements.arrow,G=d&&K?Ho(K):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:ji(),X=q[_],Y=q[U],W=Rn(0,C[B],G[B]),Q=w?C[B]/2-j-W-X-z.mainAxis:I-W-X-z.mainAxis,ee=w?-C[B]/2+j+W+Y+z.mainAxis:H+W+Y+z.mainAxis,se=t.elements.arrow&&Jn(t.elements.arrow),V=se?k==="y"?se.clientTop||0:se.clientLeft||0:0,te=(O=$==null?void 0:$[k])!=null?O:0,D=L+Q-te-V,ie=L+ee-te,Ne=Rn(d?br(J,D):J,L,d?_t(Z,ie):Z);S[k]=Ne,N[k]=Ne-L}if(c){var Re,xe=k==="x"?_e:Me,Nt=k==="x"?We:Xe,Pe=S[y],ot=y==="y"?"height":"width",Ae=Pe+b[xe],at=Pe-b[Nt],Te=[_e,Me].indexOf(x)!==-1,Vt=(Re=$==null?void 0:$[y])!=null?Re:0,Tt=Te?Ae:Pe-C[ot]-M[ot]-Vt+z.altAxis,pn=Te?Pe+C[ot]+M[ot]-Vt-z.altAxis:at,Qn=d&&Te?Yf(Tt,Pe,pn):Rn(d?Tt:Ae,Pe,d?pn:at);S[y]=Qn,N[y]=Qn-Pe}t.modifiersData[r]=N}}const Sm={name:"preventOverflow",enabled:!0,phase:"main",fn:Tm,requiresIfExists:["offset"]};function Cm(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Om(e){return e===Fe(e)||!Ge(e)?qo(e):Cm(e)}function jm(e){var t=e.getBoundingClientRect(),n=nn(t.width)/e.offsetWidth||1,r=nn(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Rm(e,t,n){n===void 0&&(n=!1);var r=Ge(t),o=Ge(t)&&jm(t),a=Et(t),s=rn(e,o,n),c={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(r||!r&&!n)&&((tt(t)!=="body"||Xo(a))&&(c=Om(t)),Ge(t)?(p=rn(t,!0),p.x+=t.clientLeft,p.y+=t.clientTop):a&&(p.x=Wo(a))),{x:s.left+c.scrollLeft-p.x,y:s.top+c.scrollTop-p.y,width:s.width,height:s.height}}function Pm(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 s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(c){if(!n.has(c)){var p=t.get(c);p&&o(p)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||o(a)}),r}function $m(e){var t=Pm(e);return Uf.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function _m(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Mm(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 os={placement:"bottom",modifiers:[],strategy:"absolute"};function as(){for(var e=arguments.length,t=new Array(e),n=0;nft({root:["root"]},cf(Bm)),Hm={},Gm=T.forwardRef(function(t,n){var r;const{anchorEl:o,children:a,direction:s,disablePortal:c,modifiers:p,open:f,placement:m,popperOptions:v,popperRef:g,slotProps:d={},slots:h={},TransitionProps:u}=t,b=me(t,Lm),x=T.useRef(null),R=qe(x,n),w=T.useRef(null),k=qe(w,g),y=T.useRef(k);Dt(()=>{y.current=k},[k]),T.useImperativeHandle(g,()=>w.current,[]);const S=Fm(m,s),[C,M]=T.useState(S),[A,z]=T.useState(vr(o));T.useEffect(()=>{w.current&&w.current.forceUpdate()}),T.useEffect(()=>{o&&z(vr(o))},[o]),Dt(()=>{if(!A||!f)return;const U=J=>{M(J.placement)};if(process.env.NODE_ENV!=="production"&&A&&Ir(A)&&A.nodeType===1){const J=A.getBoundingClientRect();process.env.NODE_ENV!=="test"&&J.top===0&&J.left===0&&J.right===0&&J.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 B=[{name:"preventOverflow",options:{altBoundary:c}},{name:"flip",options:{altBoundary:c}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:J})=>{U(J)}}];p!=null&&(B=B.concat(p)),v&&v.modifiers!=null&&(B=B.concat(v.modifiers));const L=Am(A,x.current,P({placement:S},v,{modifiers:B}));return y.current(L),()=>{L.destroy(),y.current(null)}},[A,c,p,f,v,S]);const $={placement:C};u!==null&&($.TransitionProps=u);const N=Um(),O=(r=h.root)!=null?r:"div",_=Bt({elementType:O,externalSlotProps:d.root,externalForwardedProps:b,additionalProps:{role:"tooltip",ref:R},ownerState:t,className:N.root});return l.jsx(O,P({},_,{children:typeof a=="function"?a($):a}))}),Ii=T.forwardRef(function(t,n){const{anchorEl:r,children:o,container:a,direction:s="ltr",disablePortal:c=!1,keepMounted:p=!1,modifiers:f,open:m,placement:v="bottom",popperOptions:g=Hm,popperRef:d,style:h,transition:u=!1,slotProps:b={},slots:x={}}=t,R=me(t,Vm),[w,k]=T.useState(!0),y=()=>{k(!1)},S=()=>{k(!0)};if(!p&&!m&&(!u||w))return null;let C;if(a)C=a;else if(r){const z=vr(r);C=z&&Ir(z)?Oe(z).body:Oe(null).body}const M=!m&&p&&(!u||w)?"none":void 0,A=u?{in:m,onEnter:y,onExited:S}:void 0;return l.jsx(An,{disablePortal:c,container:C,children:l.jsx(Gm,P({anchorEl:r,direction:s,disablePortal:c,modifiers:f,ref:n,open:u?!w:m,placement:v,popperOptions:g,popperRef:d,slotProps:b,slots:x},R,{style:P({position:"fixed",top:0,left:0,display:M},h),TransitionProps:A,children:o}))})});process.env.NODE_ENV!=="production"&&(Ii.propTypes={anchorEl:ln(i.oneOfType([pt,i.object,i.func]),e=>{if(e.open){const t=vr(e.anchorEl);if(t&&Ir(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"||zm(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:i.oneOfType([i.node,i.func]),container:i.oneOfType([pt,i.func]),direction:i.oneOf(["ltr","rtl"]),disablePortal:i.bool,keepMounted:i.bool,modifiers:i.arrayOf(i.shape({data:i.object,effect:i.func,enabled:i.bool,fn:i.func,name:i.any,options:i.object,phase:i.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:i.arrayOf(i.string),requiresIfExists:i.arrayOf(i.string)})),open:i.bool.isRequired,placement:i.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:i.shape({modifiers:i.array,onFirstUpdate:i.func,placement:i.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:i.oneOf(["absolute","fixed"])}),popperRef:$o,slotProps:i.shape({root:i.oneOfType([i.func,i.object])}),slots:i.shape({root:i.elementType}),transition:i.bool});function Zn(){const e=bi(Lo);return process.env.NODE_ENV!=="production"&&T.useDebugValue(e),e[Vo]||e}function ho(e,t){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},ho(e,t)}function qm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ho(e,t)}const ss={disabled:!1};var Wm=process.env.NODE_ENV!=="production"?i.oneOfType([i.number,i.shape({enter:i.number,exit:i.number,appear:i.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&i.oneOfType([i.string,i.shape({enter:i.string,exit:i.string,active:i.string}),i.shape({enter:i.string,enterDone:i.string,enterActive:i.string,exit:i.string,exitDone:i.string,exitActive:i.string})]);const Di=E.createContext(null);var Xm=function(t){return t.scrollTop},Sn="unmounted",Ct="exited",Ot="entering",Xt="entered",go="exiting",ht=function(e){qm(t,e);function t(r,o){var a;a=e.call(this,r,o)||this;var s=o,c=s&&!s.isMounting?r.enter:r.appear,p;return a.appearStatus=null,r.in?c?(p=Ct,a.appearStatus=Ot):p=Xt:r.unmountOnExit||r.mountOnEnter?p=Sn:p=Ct,a.state={status:p},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var s=o.in;return s&&a.status===Sn?{status:Ct}: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 s=this.state.status;this.props.in?s!==Ot&&s!==Xt&&(a=Ot):(s===Ot||s===Xt)&&(a=go)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,a,s,c;return a=s=c=o,o!=null&&typeof o!="number"&&(a=o.exit,s=o.enter,c=o.appear!==void 0?o.appear:s),{exit:a,enter:s,appear:c}},n.updateStatus=function(o,a){if(o===void 0&&(o=!1),a!==null)if(this.cancelNextCallback(),a===Ot){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:kn.findDOMNode(this);s&&Xm(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ct&&this.setState({status:Sn})},n.performEnter=function(o){var a=this,s=this.props.enter,c=this.context?this.context.isMounting:o,p=this.props.nodeRef?[c]:[kn.findDOMNode(this),c],f=p[0],m=p[1],v=this.getTimeouts(),g=c?v.appear:v.enter;if(!o&&!s||ss.disabled){this.safeSetState({status:Xt},function(){a.props.onEntered(f)});return}this.props.onEnter(f,m),this.safeSetState({status:Ot},function(){a.props.onEntering(f,m),a.onTransitionEnd(g,function(){a.safeSetState({status:Xt},function(){a.props.onEntered(f,m)})})})},n.performExit=function(){var o=this,a=this.props.exit,s=this.getTimeouts(),c=this.props.nodeRef?void 0:kn.findDOMNode(this);if(!a||ss.disabled){this.safeSetState({status:Ct},function(){o.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:go},function(){o.props.onExiting(c),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ct},function(){o.props.onExited(c)})})})},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,s=!0;return this.nextCallback=function(c){s&&(s=!1,a.nextCallback=null,o(c))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(o,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:kn.findDOMNode(this),c=o==null&&!this.props.addEndListener;if(!s||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var p=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],f=p[0],m=p[1];this.props.addEndListener(f,m)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===Sn)return null;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 c=me(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return E.createElement(Di.Provider,{value:null},typeof s=="function"?s(o,c):E.cloneElement(E.Children.only(s),c))},t}(E.Component);ht.contextType=Di;ht.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:i.shape({current:typeof Element>"u"?i.any:function(e,t,n,r,o,a){var s=e[t];return i.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,n,r,o,a)}}),children:i.oneOfType([i.func.isRequired,i.element.isRequired]).isRequired,in:i.bool,mountOnEnter:i.bool,unmountOnExit:i.bool,appear:i.bool,enter:i.bool,exit:i.bool,timeout:function(t){var n=Wm;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;ae.scrollTop;function yr(e,t){var n,r;const{timeout:o,easing:a,style:s={}}=e;return{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 Ym=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function bo(e){return`scale(${e}, ${e**2})`}const Km={entering:{opacity:1,transform:bo(1)},entered:{opacity:1,transform:"none"}},Jr=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Yo=T.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:a,easing:s,in:c,onEnter:p,onEntered:f,onEntering:m,onExit:v,onExited:g,onExiting:d,style:h,timeout:u="auto",TransitionComponent:b=Ai}=t,x=me(t,Ym),R=Nn(),w=T.useRef(),k=Zn(),y=T.useRef(null),S=qe(y,a.ref,n),C=U=>B=>{if(U){const L=y.current;B===void 0?U(L):U(L,B)}},M=C(m),A=C((U,B)=>{Bi(U);const{duration:L,delay:J,easing:Z}=yr({style:h,timeout:u,easing:s},{mode:"enter"});let j;u==="auto"?(j=k.transitions.getAutoHeightDuration(U.clientHeight),w.current=j):j=L,U.style.transition=[k.transitions.create("opacity",{duration:j,delay:J}),k.transitions.create("transform",{duration:Jr?j:j*.666,delay:J,easing:Z})].join(","),p&&p(U,B)}),z=C(f),$=C(d),N=C(U=>{const{duration:B,delay:L,easing:J}=yr({style:h,timeout:u,easing:s},{mode:"exit"});let Z;u==="auto"?(Z=k.transitions.getAutoHeightDuration(U.clientHeight),w.current=Z):Z=B,U.style.transition=[k.transitions.create("opacity",{duration:Z,delay:L}),k.transitions.create("transform",{duration:Jr?Z:Z*.666,delay:Jr?L:L||Z*.333,easing:J})].join(","),U.style.opacity=0,U.style.transform=bo(.75),v&&v(U)}),O=C(g),_=U=>{u==="auto"&&R.start(w.current||0,U),r&&r(y.current,U)};return l.jsx(b,P({appear:o,in:c,nodeRef:y,onEnter:A,onEntered:z,onEntering:M,onExit:N,onExited:O,onExiting:$,addEndListener:_,timeout:u==="auto"?null:u},x,{children:(U,B)=>T.cloneElement(a,P({style:P({opacity:0,transform:bo(.75),visibility:U==="exited"&&!c?"hidden":void 0},Km[U],h,a.props.style),ref:S},B))}))});process.env.NODE_ENV!=="production"&&(Yo.propTypes={addEndListener:i.func,appear:i.bool,children:qn.isRequired,easing:i.oneOfType([i.shape({enter:i.string,exit:i.string}),i.string]),in:i.bool,onEnter:i.func,onEntered:i.func,onEntering:i.func,onExit:i.func,onExited:i.func,onExiting:i.func,style:i.object,timeout:i.oneOfType([i.oneOf(["auto"]),i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})])});Yo.muiSupportAuto=!0;const vo=Yo,Jm=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},is=Jm,Zm=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],Qm=je(Ii,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Li=T.forwardRef(function(t,n){var r;const o=gi(),a=mt({props:t,name:"MuiPopper"}),{anchorEl:s,component:c,components:p,componentsProps:f,container:m,disablePortal:v,keepMounted:g,modifiers:d,open:h,placement:u,popperOptions:b,popperRef:x,transition:R,slots:w,slotProps:k}=a,y=me(a,Zm),S=(r=w==null?void 0:w.root)!=null?r:p==null?void 0:p.Root,C=P({anchorEl:s,container:m,disablePortal:v,keepMounted:g,modifiers:d,open:h,placement:u,popperOptions:b,popperRef:x,transition:R},y);return l.jsx(Qm,P({as:c,direction:o==null?void 0:o.direction,slots:{root:S},slotProps:k??f},C,{ref:n}))});process.env.NODE_ENV!=="production"&&(Li.propTypes={anchorEl:i.oneOfType([pt,i.object,i.func]),children:i.oneOfType([i.node,i.func]),component:i.elementType,components:i.shape({Root:i.elementType}),componentsProps:i.shape({root:i.oneOfType([i.func,i.object])}),container:i.oneOfType([pt,i.func]),disablePortal:i.bool,keepMounted:i.bool,modifiers:i.arrayOf(i.shape({data:i.object,effect:i.func,enabled:i.bool,fn:i.func,name:i.any,options:i.object,phase:i.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:i.arrayOf(i.string),requiresIfExists:i.arrayOf(i.string)})),open:i.bool.isRequired,placement:i.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:i.shape({modifiers:i.array,onFirstUpdate:i.func,placement:i.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:i.oneOf(["absolute","fixed"])}),popperRef:$o,slotProps:i.shape({root:i.oneOfType([i.func,i.object])}),slots:i.shape({root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),transition:i.bool});const Vi=Li;function eh(e){return rt("MuiTooltip",e)}const th=xt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),wt=th,nh=["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 rh(e){return Math.round(e*1e5)/1e5}const oh=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${et(a.split("-")[0])}`],arrow:["arrow"]};return ft(s,eh,t)},ah=je(Vi,{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"] .${wt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${wt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${wt.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"] .${wt.arrow}`]:P({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),sh=je("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${et(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>P({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:hr(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:`${rh(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${wt.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"})),[`.${wt.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"})),[`.${wt.popper}[data-popper-placement*="top"] &`]:P({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${wt.popper}[data-popper-placement*="bottom"] &`]:P({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),ih=je("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:hr(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let ar=!1;const ls=new Wn;let yn={x:0,y:0};function sr(e,t){return n=>{t&&t(n),e(n)}}const Fi=T.forwardRef(function(t,n){var r,o,a,s,c,p,f,m,v,g,d,h,u,b,x,R,w,k,y;const S=mt({props:t,name:"MuiTooltip"}),{arrow:C=!1,children:M,components:A={},componentsProps:z={},describeChild:$=!1,disableFocusListener:N=!1,disableHoverListener:O=!1,disableInteractive:_=!1,disableTouchListener:U=!1,enterDelay:B=100,enterNextDelay:L=0,enterTouchDelay:J=700,followCursor:Z=!1,id:j,leaveDelay:I=0,leaveTouchDelay:H=1500,onClose:K,onOpen:G,open:q,placement:X="bottom",PopperComponent:Y,PopperProps:W={},slotProps:Q={},slots:ee={},title:se,TransitionComponent:V=vo,TransitionProps:te}=S,D=me(S,nh),ie=T.isValidElement(M)?M:l.jsx("span",{children:M}),Ne=Zn(),Re=Ne.direction==="rtl",[xe,Nt]=T.useState(),[Pe,ot]=T.useState(null),Ae=T.useRef(!1),at=_||Z,Te=Nn(),Vt=Nn(),Tt=Nn(),pn=Nn(),[Qn,ta]=oi({controlled:q,default:!1,name:"Tooltip",state:"open"});let st=Qn;if(process.env.NODE_ENV!=="production"){const{current:ne}=T.useRef(q!==void 0);T.useEffect(()=>{xe&&xe.disabled&&!ne&&se!==""&&xe.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(` -`))},[se,xe,ne])}const Dr=ri(j),dn=T.useRef(),er=In(()=>{dn.current!==void 0&&(document.body.style.WebkitUserSelect=dn.current,dn.current=void 0),pn.clear()});T.useEffect(()=>er,[er]);const na=ne=>{ls.clear(),ar=!0,ta(!0),G&&!st&&G(ne)},tr=In(ne=>{ls.start(800+I,()=>{ar=!1}),ta(!1),K&&st&&K(ne),Te.start(Ne.transitions.duration.shortest,()=>{Ae.current=!1})}),Ar=ne=>{Ae.current&&ne.type!=="touchstart"||(xe&&xe.removeAttribute("title"),Vt.clear(),Tt.clear(),B||ar&&L?Vt.start(ar?L:B,()=>{na(ne)}):na(ne))},ra=ne=>{Vt.clear(),Tt.start(I,()=>{tr(ne)})},{isFocusVisibleRef:oa,onBlur:Ul,onFocus:Hl,ref:Gl}=ai(),[,aa]=T.useState(!1),sa=ne=>{Ul(ne),oa.current===!1&&(aa(!1),ra(ne))},ia=ne=>{xe||Nt(ne.currentTarget),Hl(ne),oa.current===!0&&(aa(!0),Ar(ne))},la=ne=>{Ae.current=!0;const Be=ie.props;Be.onTouchStart&&Be.onTouchStart(ne)},ca=Ar,pa=ra,ql=ne=>{la(ne),Tt.clear(),Te.clear(),er(),dn.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",pn.start(J,()=>{document.body.style.WebkitUserSelect=dn.current,Ar(ne)})},Wl=ne=>{ie.props.onTouchEnd&&ie.props.onTouchEnd(ne),er(),Tt.start(H,()=>{tr(ne)})};T.useEffect(()=>{if(!st)return;function ne(Be){(Be.key==="Escape"||Be.key==="Esc")&&tr(Be)}return document.addEventListener("keydown",ne),()=>{document.removeEventListener("keydown",ne)}},[tr,st]);const Xl=qe(ie.ref,Gl,Nt,n);!se&&se!==0&&(st=!1);const Br=T.useRef(),Yl=ne=>{const Be=ie.props;Be.onMouseMove&&Be.onMouseMove(ne),yn={x:ne.clientX,y:ne.clientY},Br.current&&Br.current.update()},un={},Lr=typeof se=="string";$?(un.title=!st&&Lr&&!O?se:null,un["aria-describedby"]=st?Dr:null):(un["aria-label"]=Lr?se:null,un["aria-labelledby"]=st&&!Lr?Dr:null);const ze=P({},un,D,ie.props,{className:Se(D.className,ie.props.className),onTouchStart:la,ref:Xl},Z?{onMouseMove:Yl}:{});process.env.NODE_ENV!=="production"&&(ze["data-mui-internal-clone-element"]=!0,T.useEffect(()=>{xe&&!xe.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(` -`))},[xe]));const fn={};U||(ze.onTouchStart=ql,ze.onTouchEnd=Wl),O||(ze.onMouseOver=sr(ca,ze.onMouseOver),ze.onMouseLeave=sr(pa,ze.onMouseLeave),at||(fn.onMouseOver=ca,fn.onMouseLeave=pa)),N||(ze.onFocus=sr(ia,ze.onFocus),ze.onBlur=sr(sa,ze.onBlur),at||(fn.onFocus=ia,fn.onBlur=sa)),process.env.NODE_ENV!=="production"&&ie.props.title&&console.error(["MUI: You have provided a `title` prop to the child of .",`Remove this title prop \`${ie.props.title}\` or the Tooltip component.`].join(` -`));const Kl=T.useMemo(()=>{var ne;let Be=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(ne=W.popperOptions)!=null&&ne.modifiers&&(Be=Be.concat(W.popperOptions.modifiers)),P({},W.popperOptions,{modifiers:Be})},[Pe,W]),mn=P({},S,{isRtl:Re,arrow:C,disableInteractive:at,placement:X,PopperComponentProp:Y,touch:Ae.current}),Vr=oh(mn),da=(r=(o=ee.popper)!=null?o:A.Popper)!=null?r:ah,ua=(a=(s=(c=ee.transition)!=null?c:A.Transition)!=null?s:V)!=null?a:vo,fa=(p=(f=ee.tooltip)!=null?f:A.Tooltip)!=null?p:sh,ma=(m=(v=ee.arrow)!=null?v:A.Arrow)!=null?m:ih,Jl=Tn(da,P({},W,(g=Q.popper)!=null?g:z.popper,{className:Se(Vr.popper,W==null?void 0:W.className,(d=(h=Q.popper)!=null?h:z.popper)==null?void 0:d.className)}),mn),Zl=Tn(ua,P({},te,(u=Q.transition)!=null?u:z.transition),mn),Ql=Tn(fa,P({},(b=Q.tooltip)!=null?b:z.tooltip,{className:Se(Vr.tooltip,(x=(R=Q.tooltip)!=null?R:z.tooltip)==null?void 0:x.className)}),mn),ec=Tn(ma,P({},(w=Q.arrow)!=null?w:z.arrow,{className:Se(Vr.arrow,(k=(y=Q.arrow)!=null?y:z.arrow)==null?void 0:k.className)}),mn);return l.jsxs(T.Fragment,{children:[T.cloneElement(ie,ze),l.jsx(da,P({as:Y??Vi,placement:X,anchorEl:Z?{getBoundingClientRect:()=>({top:yn.y,left:yn.x,right:yn.x,bottom:yn.y,width:0,height:0})}:xe,popperRef:Br,open:xe?st:!1,id:Dr,transition:!0},fn,Jl,{popperOptions:Kl,children:({TransitionProps:ne})=>l.jsx(ua,P({timeout:Ne.transitions.duration.shorter},ne,Zl,{children:l.jsxs(fa,P({},Ql,{children:[se,C?l.jsx(ma,P({},ec,{ref:ot})):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(Fi.propTypes={arrow:i.bool,children:qn.isRequired,classes:i.object,className:i.string,components:i.shape({Arrow:i.elementType,Popper:i.elementType,Tooltip:i.elementType,Transition:i.elementType}),componentsProps:i.shape({arrow:i.object,popper:i.object,tooltip:i.object,transition:i.object}),describeChild:i.bool,disableFocusListener:i.bool,disableHoverListener:i.bool,disableInteractive:i.bool,disableTouchListener:i.bool,enterDelay:i.number,enterNextDelay:i.number,enterTouchDelay:i.number,followCursor:i.bool,id:i.string,leaveDelay:i.number,leaveTouchDelay:i.number,onClose:i.func,onOpen:i.func,open:i.bool,placement:i.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:i.elementType,PopperProps:i.object,slotProps:i.shape({arrow:i.object,popper:i.object,tooltip:i.object,transition:i.object}),slots:i.shape({arrow:i.elementType,popper:i.elementType,tooltip:i.elementType,transition:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),title:i.node,TransitionComponent:i.elementType,TransitionProps:i.object});const lh=Fi;function cs(e,t,n){return e?l.jsx(Ee.ListItemIcon,{className:`papi-menu-icon-${n?"leading":"trailing"}`,children:l.jsx("img",{src:e,alt:`${n?"Leading":"Trailing"} icon for ${t}`})}):void 0}function Ko(e){const{onClick:t,label:n,tooltip:r,allowForLeadingIcons:o=!0,iconPathBefore:a=void 0,iconPathAfter:s=void 0,hasAutoFocus:c=!1,className:p,isDisabled:f=!1,isDense:m=!0,isSubMenuParent:v=!1,hasDisabledGutters:g=!1,hasDivider:d=!1,focusVisibleClassName:h,id:u,children:b}=e,x=l.jsx(Ee.MenuItem,{sx:{lineHeight:.8},autoFocus:c,className:p,disabled:f,dense:m,disableGutters:g,divider:d,focusVisibleClassName:h,onClick:t,id:u,children:n?l.jsxs(l.Fragment,{children:[cs(a,n,!0),l.jsx(Ee.ListItemText,{primary:n,inset:!a&&o}),v?l.jsx(Ee.ListItemIcon,{className:"papi-menu-icon-trailing",children:l.jsx(wi,{})}):cs(s,n,!1)]}):b});return r?l.jsx(lh,{title:r,placement:"right",children:l.jsx("div",{children:x})}):x}function zi(e){return Object.entries(e.groups).map(([n,r])=>({id:n,group:r}))}function ch(e){const[t,n]=E.useState(void 0),{parentMenuItem:r,parentItemProps:o,menuDefinition:a}=e,s=f=>{n(f.currentTarget)},c=()=>{n(void 0)},p=()=>{let f=zi(a).filter(m=>"menuItem"in m.group);if(!(r!=null&&r.id))throw new Error("A valid parent menu item is required for submenus.");return f=f.filter(m=>"menuItem"in m.group&&m.group.menuItem===r.id),l.jsx(Jo,{...e,includedGroups:f})};return l.jsxs(l.Fragment,{children:[l.jsx(Ko,{onClick:s,...o,isSubMenuParent:!0}),l.jsx(Ee.Menu,{anchorEl:t,open:!!t,onClose:c,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:p()},r.id)]})}const ph=(e,t)=>t.filter(o=>o.group===e).sort((o,a)=>(o.order||0)-(a.order||0));function Jo(e){const{menuDefinition:t,onClick:n,commandHandler:r,includedGroups:o}=e,{items:a,allowForLeadingIcons:s}=E.useMemo(()=>{const m=o&&o.length>0?o:zi(t).filter(h=>!("menuItem"in h.group)),v=Object.values(m).sort((h,u)=>(h.group.order||0)-(u.group.order||0)),g=[];v.forEach(h=>{ph(h.id,t.items).forEach(u=>g.push({item:u,isLastItemInGroup:!1})),g.length>0&&(g[g.length-1].isLastItemInGroup=!0)}),g.length>0&&(g[g.length-1].isLastItemInGroup=!1);const d=g.some(h=>"iconPathBefore"in h.item&&h.item.iconPathBefore);return{items:g,allowForLeadingIcons:d}},[o,t]),c=({item:m,isLastItemInGroup:v})=>({className:"papi-menu-item",label:m.label,tooltip:m.tooltip,iconPathBefore:"iconPathBefore"in m?m.iconPathBefore:void 0,iconPathAfter:"iconPathAfter"in m?m.iconPathAfter:void 0,hasDivider:v,allowForLeadingIcons:s}),[p]=a;if(!p)return l.jsx("div",{});const f=p.item.group;return l.jsx("div",{role:"menu","aria-label":f,children:a.map((m,v)=>{const{item:g}=m,d=c(m);if("command"in g){const h=g.group+v;return l.jsx(Ko,{onClick:u=>{n==null||n(u),r(g)},...d},h)}return l.jsx(ch,{parentMenuItem:g,parentItemProps:d,...e},f+g.id)})},f)}function dh(e){const{menuDefinition:t,columnId:n}=e;let a=Object.entries(t.groups).map(([s,c])=>({id:s,group:c})).filter(s=>"column"in s.group);return n&&"columns"in t&&t.columns[n]&&(a=a.filter(s=>"column"in s.group&&s.group.column===n)),l.jsx(Jo,{...e,includedGroups:a})}function uh({commandHandler:e,menuDefinition:t,id:n,metadata:r,onClick:o,className:a}){return l.jsxs(Ee.Grid,{id:n,item:!0,xs:"auto",role:"menu","aria-label":n,className:`papi-menu-column ${a??""}`,children:[l.jsx("h3",{"aria-label":r.label,className:`papi-menu-column-header ${a??""}`,children:r.label}),l.jsx(Ee.List,{id:n,dense:!0,className:a??"",children:l.jsx(dh,{commandHandler:e,menuDefinition:t,columnId:n,onClick:o})})]})}function Ui({commandHandler:e,className:t,multiColumnMenu:n,id:r}){const{columns:o}=n,a=E.useMemo(()=>{const s=new Map;return Object.getOwnPropertyNames(o).forEach(c=>{if(c==="isExtensible")return;const p=c,f=o[p];typeof f=="object"&&typeof f.order=="number"&&!Number.isNaN(f.order)?s.set(f.order,{id:p,metadata:f}):console.warn(`Property ${c} (${typeof f}) on menu ${r} is not a valid column and is being ignored. This might indicate data corruption`)}),Array.from(s.values()).sort((c,p)=>(c.metadata.order||0)-(p.metadata.order||0))},[o,r]);return l.jsx(Ee.Grid,{container:!0,spacing:0,className:`papi-multi-column-menu ${t??""}`,columns:a.length,role:"menu","aria-label":"GridMenu",id:r,children:a.map((s,c)=>l.jsx(uh,{commandHandler:e,menuDefinition:n,...s,className:t},c))})}const Hi=T.createContext({});process.env.NODE_ENV!=="production"&&(Hi.displayName="ListContext");const fh=Hi;function mh(e){return rt("MuiList",e)}xt("MuiList",["root","padding","dense","subheader"]);const hh=["children","className","component","dense","disablePadding","subheader"],gh=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return ft({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},mh,t)},bh=je("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>P({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Gi=T.forwardRef(function(t,n){const r=mt({props:t,name:"MuiList"}),{children:o,className:a,component:s="ul",dense:c=!1,disablePadding:p=!1,subheader:f}=r,m=me(r,hh),v=T.useMemo(()=>({dense:c}),[c]),g=P({},r,{component:s,dense:c,disablePadding:p}),d=gh(g);return l.jsx(fh.Provider,{value:v,children:l.jsxs(bh,P({as:s,className:Se(d.root,a),ref:n,ownerState:g},m,{children:[f,o]}))})});process.env.NODE_ENV!=="production"&&(Gi.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,dense:i.bool,disablePadding:i.bool,subheader:i.node,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const vh=Gi,yh=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Zr(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ps(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function qi(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function wn(e,t,n,r,o,a){let s=!1,c=o(e,t,t?n:!1);for(;c;){if(c===e.firstChild){if(s)return!1;s=!0}const p=r?!1:c.disabled||c.getAttribute("aria-disabled")==="true";if(!c.hasAttribute("tabindex")||!qi(c,a)||p)c=o(e,c,n);else return c.focus(),!0}return!1}const Wi=T.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:a=!1,children:s,className:c,disabledItemsFocusable:p=!1,disableListWrap:f=!1,onKeyDown:m,variant:v="selectedMenu"}=t,g=me(t,yh),d=T.useRef(null),h=T.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Dt(()=>{o&&d.current.focus()},[o]),T.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,k)=>{const y=!d.current.style.width;if(w.clientHeight{const k=d.current,y=w.key,S=Oe(k).activeElement;if(y==="ArrowDown")w.preventDefault(),wn(k,S,f,p,Zr);else if(y==="ArrowUp")w.preventDefault(),wn(k,S,f,p,ps);else if(y==="Home")w.preventDefault(),wn(k,null,f,p,Zr);else if(y==="End")w.preventDefault(),wn(k,null,f,p,ps);else if(y.length===1){const C=h.current,M=y.toLowerCase(),A=performance.now();C.keys.length>0&&(A-C.lastTime>500?(C.keys=[],C.repeating=!0,C.previousKeyMatched=!0):C.repeating&&M!==C.keys[0]&&(C.repeating=!1)),C.lastTime=A,C.keys.push(M);const z=S&&!C.repeating&&qi(S,C);C.previousKeyMatched&&(z||wn(k,S,!1,p,Zr,C))?w.preventDefault():C.previousKeyMatched=!1}m&&m(w)},b=qe(d,n);let x=-1;T.Children.forEach(s,(w,k)=>{if(!T.isValidElement(w)){x===k&&(x+=1,x>=s.length&&(x=-1));return}process.env.NODE_ENV!=="production"&&ur.isFragment(w)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(` -`)),w.props.disabled||(v==="selectedMenu"&&w.props.selected||x===-1)&&(x=k),x===k&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(x+=1,x>=s.length&&(x=-1))});const R=T.Children.map(s,(w,k)=>{if(k===x){const y={};return a&&(y.autoFocus=!0),w.props.tabIndex===void 0&&v==="selectedMenu"&&(y.tabIndex=0),T.cloneElement(w,y)}return w});return l.jsx(vh,P({role:"menu",ref:b,className:c,onKeyDown:u,tabIndex:o?0:-1},g,{children:R}))});process.env.NODE_ENV!=="production"&&(Wi.propTypes={autoFocus:i.bool,autoFocusItem:i.bool,children:i.node,className:i.string,disabledItemsFocusable:i.bool,disableListWrap:i.bool,onKeyDown:i.func,variant:i.oneOf(["menu","selectedMenu"])});const wh=Wi,xh=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],kh={entering:{opacity:1},entered:{opacity:1}},Xi=T.forwardRef(function(t,n){const r=Zn(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:c,easing:p,in:f,onEnter:m,onEntered:v,onEntering:g,onExit:d,onExited:h,onExiting:u,style:b,timeout:x=o,TransitionComponent:R=Ai}=t,w=me(t,xh),k=T.useRef(null),y=qe(k,c.ref,n),S=_=>U=>{if(_){const B=k.current;U===void 0?_(B):_(B,U)}},C=S(g),M=S((_,U)=>{Bi(_);const B=yr({style:b,timeout:x,easing:p},{mode:"enter"});_.style.webkitTransition=r.transitions.create("opacity",B),_.style.transition=r.transitions.create("opacity",B),m&&m(_,U)}),A=S(v),z=S(u),$=S(_=>{const U=yr({style:b,timeout:x,easing:p},{mode:"exit"});_.style.webkitTransition=r.transitions.create("opacity",U),_.style.transition=r.transitions.create("opacity",U),d&&d(_)}),N=S(h),O=_=>{a&&a(k.current,_)};return l.jsx(R,P({appear:s,in:f,nodeRef:k,onEnter:M,onEntered:A,onEntering:C,onExit:$,onExited:N,onExiting:z,addEndListener:O,timeout:x},w,{children:(_,U)=>T.cloneElement(c,P({style:P({opacity:0,visibility:_==="exited"&&!f?"hidden":void 0},kh[_],b,c.props.style),ref:y},U))}))});process.env.NODE_ENV!=="production"&&(Xi.propTypes={addEndListener:i.func,appear:i.bool,children:qn.isRequired,easing:i.oneOfType([i.shape({enter:i.string,exit:i.string}),i.string]),in:i.bool,onEnter:i.func,onEntered:i.func,onEntering:i.func,onExit:i.func,onExited:i.func,onExiting:i.func,style:i.object,timeout:i.oneOfType([i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})])});const Eh=Xi;function Nh(e){return rt("MuiBackdrop",e)}xt("MuiBackdrop",["root","invisible"]);const Th=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Sh=e=>{const{classes:t,invisible:n}=e;return ft({root:["root",n&&"invisible"]},Nh,t)},Ch=je("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>P({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Yi=T.forwardRef(function(t,n){var r,o,a;const s=mt({props:t,name:"MuiBackdrop"}),{children:c,className:p,component:f="div",components:m={},componentsProps:v={},invisible:g=!1,open:d,slotProps:h={},slots:u={},TransitionComponent:b=Eh,transitionDuration:x}=s,R=me(s,Th),w=P({},s,{component:f,invisible:g}),k=Sh(w),y=(r=h.root)!=null?r:v.root;return l.jsx(b,P({in:d,timeout:x},R,{children:l.jsx(Ch,P({"aria-hidden":!0},y,{as:(o=(a=u.root)!=null?a:m.Root)!=null?o:f,className:Se(k.root,p,y==null?void 0:y.className),ownerState:P({},w,y==null?void 0:y.ownerState),classes:k,ref:n,children:c}))}))});process.env.NODE_ENV!=="production"&&(Yi.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,components:i.shape({Root:i.elementType}),componentsProps:i.shape({root:i.object}),invisible:i.bool,open:i.bool.isRequired,slotProps:i.shape({root:i.object}),slots:i.shape({root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),TransitionComponent:i.elementType,transitionDuration:i.oneOfType([i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})])});const Oh=Yi;function jh(e){return rt("MuiModal",e)}xt("MuiModal",["root","hidden","backdrop"]);const Rh=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Ph=e=>{const{open:t,exited:n,classes:r}=e;return ft({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},jh,r)},$h=je("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>P({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),_h=je(Oh,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Ki=T.forwardRef(function(t,n){var r,o,a,s,c,p;const f=mt({name:"MuiModal",props:t}),{BackdropComponent:m=_h,BackdropProps:v,className:g,closeAfterTransition:d=!1,children:h,container:u,component:b,components:x={},componentsProps:R={},disableAutoFocus:w=!1,disableEnforceFocus:k=!1,disableEscapeKeyDown:y=!1,disablePortal:S=!1,disableRestoreFocus:C=!1,disableScrollLock:M=!1,hideBackdrop:A=!1,keepMounted:z=!1,onBackdropClick:$,open:N,slotProps:O,slots:_}=f,U=me(f,Rh),B=P({},f,{closeAfterTransition:d,disableAutoFocus:w,disableEnforceFocus:k,disableEscapeKeyDown:y,disablePortal:S,disableRestoreFocus:C,disableScrollLock:M,hideBackdrop:A,keepMounted:z}),{getRootProps:L,getBackdropProps:J,getTransitionProps:Z,portalRef:j,isTopModal:I,exited:H,hasTransition:K}=Pf(P({},B,{rootRef:n})),G=P({},B,{exited:H}),q=Ph(G),X={};if(h.props.tabIndex===void 0&&(X.tabIndex="-1"),K){const{onEnter:te,onExited:D}=Z();X.onEnter=te,X.onExited=D}const Y=(r=(o=_==null?void 0:_.root)!=null?o:x.Root)!=null?r:$h,W=(a=(s=_==null?void 0:_.backdrop)!=null?s:x.Backdrop)!=null?a:m,Q=(c=O==null?void 0:O.root)!=null?c:R.root,ee=(p=O==null?void 0:O.backdrop)!=null?p:R.backdrop,se=Bt({elementType:Y,externalSlotProps:Q,externalForwardedProps:U,getSlotProps:L,additionalProps:{ref:n,as:b},ownerState:G,className:Se(g,Q==null?void 0:Q.className,q==null?void 0:q.root,!G.open&&G.exited&&(q==null?void 0:q.hidden))}),V=Bt({elementType:W,externalSlotProps:ee,additionalProps:v,getSlotProps:te=>J(P({},te,{onClick:D=>{$&&$(D),te!=null&&te.onClick&&te.onClick(D)}})),className:Se(ee==null?void 0:ee.className,v==null?void 0:v.className,q==null?void 0:q.backdrop),ownerState:G});return!z&&!N&&(!K||H)?null:l.jsx(An,{ref:j,container:u,disablePortal:S,children:l.jsxs(Y,P({},se,{children:[!A&&m?l.jsx(W,P({},V)):null,l.jsx(gr,{disableEnforceFocus:k,disableAutoFocus:w,disableRestoreFocus:C,isEnabled:I,open:N,children:T.cloneElement(h,X)})]}))})});process.env.NODE_ENV!=="production"&&(Ki.propTypes={BackdropComponent:i.elementType,BackdropProps:i.object,children:qn.isRequired,classes:i.object,className:i.string,closeAfterTransition:i.bool,component:i.elementType,components:i.shape({Backdrop:i.elementType,Root:i.elementType}),componentsProps:i.shape({backdrop:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object])}),container:i.oneOfType([pt,i.func]),disableAutoFocus:i.bool,disableEnforceFocus:i.bool,disableEscapeKeyDown:i.bool,disablePortal:i.bool,disableRestoreFocus:i.bool,disableScrollLock:i.bool,hideBackdrop:i.bool,keepMounted:i.bool,onBackdropClick:i.func,onClose:i.func,onTransitionEnter:i.func,onTransitionExited:i.func,open:i.bool.isRequired,slotProps:i.shape({backdrop:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object])}),slots:i.shape({backdrop:i.elementType,root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Mh=Ki;function Ih(e){return rt("MuiPaper",e)}xt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Dh=["className","component","elevation","square","variant"],Ah=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,a={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return ft(a,Ih,o)},Bh=je("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return P({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&P({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${hr("#fff",is(t.elevation))}, ${hr("#fff",is(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),Ji=T.forwardRef(function(t,n){const r=mt({props:t,name:"MuiPaper"}),{className:o,component:a="div",elevation:s=1,square:c=!1,variant:p="elevation"}=r,f=me(r,Dh),m=P({},r,{component:a,elevation:s,square:c,variant:p}),v=Ah(m);return process.env.NODE_ENV!=="production"&&Zn().shadows[s]===void 0&&console.error([`MUI: The elevation provided is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(` -`)),l.jsx(Bh,P({as:a,ownerState:m,className:Se(v.root,o),ref:n},f))});process.env.NODE_ENV!=="production"&&(Ji.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,elevation:ln(ci,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:i.bool,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),variant:i.oneOfType([i.oneOf(["elevation","outlined"]),i.string])});const Lh=Ji;function Vh(e){return rt("MuiPopover",e)}xt("MuiPopover",["root","paper"]);const Fh=["onEntering"],zh=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Uh=["slotProps"];function ds(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function us(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function fs(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function pr(e){return typeof e=="function"?e():e}const Hh=e=>{const{classes:t}=e;return ft({root:["root"],paper:["paper"]},Vh,t)},Gh=je(Mh,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Zi=je(Lh,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Qi=T.forwardRef(function(t,n){var r,o,a;const s=mt({props:t,name:"MuiPopover"}),{action:c,anchorEl:p,anchorOrigin:f={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:v="anchorEl",children:g,className:d,container:h,elevation:u=8,marginThreshold:b=16,open:x,PaperProps:R={},slots:w,slotProps:k,transformOrigin:y={vertical:"top",horizontal:"left"},TransitionComponent:S=vo,transitionDuration:C="auto",TransitionProps:{onEntering:M}={},disableScrollLock:A=!1}=s,z=me(s.TransitionProps,Fh),$=me(s,zh),N=(r=k==null?void 0:k.paper)!=null?r:R,O=T.useRef(),_=qe(O,N.ref),U=P({},s,{anchorOrigin:f,anchorReference:v,elevation:u,marginThreshold:b,externalPaperSlotProps:N,transformOrigin:y,TransitionComponent:S,transitionDuration:C,TransitionProps:z}),B=Hh(U),L=T.useCallback(()=>{if(v==="anchorPosition")return process.env.NODE_ENV!=="production"&&(m||console.error('MUI: You need to provide a `anchorPosition` prop when using .')),m;const te=pr(p),D=te&&te.nodeType===1?te:Oe(O.current).body,ie=D.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const Ne=D.getBoundingClientRect();process.env.NODE_ENV!=="test"&&Ne.top===0&&Ne.left===0&&Ne.right===0&&Ne.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(` -`))}return{top:ie.top+ds(ie,f.vertical),left:ie.left+us(ie,f.horizontal)}},[p,f.horizontal,f.vertical,m,v]),J=T.useCallback(te=>({vertical:ds(te,y.vertical),horizontal:us(te,y.horizontal)}),[y.horizontal,y.vertical]),Z=T.useCallback(te=>{const D={width:te.offsetWidth,height:te.offsetHeight},ie=J(D);if(v==="none")return{top:null,left:null,transformOrigin:fs(ie)};const Ne=L();let Re=Ne.top-ie.vertical,xe=Ne.left-ie.horizontal;const Nt=Re+D.height,Pe=xe+D.width,ot=en(pr(p)),Ae=ot.innerHeight-b,at=ot.innerWidth-b;if(b!==null&&ReAe){const Te=Nt-Ae;Re-=Te,ie.vertical+=Te}if(process.env.NODE_ENV!=="production"&&D.height>Ae&&D.height&&Ae&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${D.height-Ae}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(` -`)),b!==null&&xeat){const Te=Pe-at;xe-=Te,ie.horizontal+=Te}return{top:`${Math.round(Re)}px`,left:`${Math.round(xe)}px`,transformOrigin:fs(ie)}},[p,v,L,J,b]),[j,I]=T.useState(x),H=T.useCallback(()=>{const te=O.current;if(!te)return;const D=Z(te);D.top!==null&&(te.style.top=D.top),D.left!==null&&(te.style.left=D.left),te.style.transformOrigin=D.transformOrigin,I(!0)},[Z]);T.useEffect(()=>(A&&window.addEventListener("scroll",H),()=>window.removeEventListener("scroll",H)),[p,A,H]);const K=(te,D)=>{M&&M(te,D),H()},G=()=>{I(!1)};T.useEffect(()=>{x&&H()}),T.useImperativeHandle(c,()=>x?{updatePosition:()=>{H()}}:null,[x,H]),T.useEffect(()=>{if(!x)return;const te=ni(()=>{H()}),D=en(p);return D.addEventListener("resize",te),()=>{te.clear(),D.removeEventListener("resize",te)}},[p,x,H]);let q=C;C==="auto"&&!S.muiSupportAuto&&(q=void 0);const X=h||(p?Oe(pr(p)).body:void 0),Y=(o=w==null?void 0:w.root)!=null?o:Gh,W=(a=w==null?void 0:w.paper)!=null?a:Zi,Q=Bt({elementType:W,externalSlotProps:P({},N,{style:j?N.style:P({},N.style,{opacity:0})}),additionalProps:{elevation:u,ref:_},ownerState:U,className:Se(B.paper,N==null?void 0:N.className)}),ee=Bt({elementType:Y,externalSlotProps:(k==null?void 0:k.root)||{},externalForwardedProps:$,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:X,open:x},ownerState:U,className:Se(B.root,d)}),{slotProps:se}=ee,V=me(ee,Uh);return l.jsx(Y,P({},V,!xi(Y)&&{slotProps:se,disableScrollLock:A},{children:l.jsx(S,P({appear:!0,in:x,onEntering:K,onExited:G,timeout:q},z,{children:l.jsx(W,P({},Q,{children:g}))}))}))});process.env.NODE_ENV!=="production"&&(Qi.propTypes={action:$o,anchorEl:ln(i.oneOfType([pt,i.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=pr(e.anchorEl);if(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(` +} });`:Qt(12,b?` (${b})`:"",JSON.stringify(u.main)));return qa(u,"light",R,n),qa(u,"dark",w,n),u.contrastText||(u.contrastText=v(u.main)),u},d={dark:Yn,light:Ga};return process.env.NODE_ENV!=="production"&&(d[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),ct(P({common:P({},Dr),mode:t,primary:g({color:a,name:"primary"}),secondary:g({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:c,name:"error"}),warning:g({color:m,name:"warning"}),info:g({color:p,name:"info"}),success:g({color:f,name:"success"}),grey:yu,contrastThreshold:r,getContrastText:v,augmentColor:g,tonalOffset:n},d[t]),o)}const Mu=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Iu(e){return Math.round(e*1e5)/1e5}const Wa={textTransform:"uppercase"},Xa='"Roboto", "Helvetica", "Arial", sans-serif';function Du(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Xa,fontSize:o=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:c=500,fontWeightBold:p=700,htmlFontSize:f=16,allVariants:m,pxToRem:v}=r,g=me(r,Mu);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const d=o/14,h=v||(x=>`${x/f*d}rem`),u=(x,R,w,k,y)=>P({fontFamily:n,fontWeight:x,fontSize:h(R),lineHeight:w},n===Xa?{letterSpacing:`${Iu(k/R)}em`}:{},y,m),b={h1:u(a,96,1.167,-1.5),h2:u(a,60,1.2,-.5),h3:u(s,48,1.167,0),h4:u(s,34,1.235,.25),h5:u(s,24,1.334,0),h6:u(c,20,1.6,.15),subtitle1:u(s,16,1.75,.15),subtitle2:u(c,14,1.57,.1),body1:u(s,16,1.5,.15),body2:u(s,14,1.43,.15),button:u(c,14,1.75,.4,Wa),caption:u(s,12,1.66,.4),overline:u(s,12,2.66,1,Wa),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ct(P({htmlFontSize:f,pxToRem:h,fontFamily:n,fontSize:o,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:c,fontWeightBold:p},b),g,{clone:!1})}const Au=.2,Bu=.14,Lu=.12;function ge(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Au})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Bu})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Lu})`].join(",")}const Fu=["none",ge(0,2,1,-1,0,1,1,0,0,1,3,0),ge(0,3,1,-2,0,2,2,0,0,1,5,0),ge(0,3,3,-2,0,3,4,0,0,1,8,0),ge(0,2,4,-1,0,4,5,0,0,1,10,0),ge(0,3,5,-1,0,5,8,0,0,1,14,0),ge(0,3,5,-1,0,6,10,0,0,1,18,0),ge(0,4,5,-2,0,7,10,1,0,2,16,1),ge(0,5,5,-3,0,8,10,1,0,3,14,2),ge(0,5,6,-3,0,9,12,1,0,3,16,2),ge(0,6,6,-3,0,10,14,1,0,4,18,3),ge(0,6,7,-4,0,11,15,1,0,4,20,3),ge(0,7,8,-4,0,12,17,2,0,5,22,4),ge(0,7,8,-4,0,13,19,2,0,5,24,4),ge(0,7,9,-4,0,14,21,2,0,5,26,4),ge(0,8,9,-5,0,15,22,2,0,6,28,5),ge(0,8,10,-5,0,16,24,2,0,6,30,5),ge(0,8,11,-5,0,17,26,2,0,6,32,5),ge(0,9,11,-5,0,18,28,2,0,7,34,6),ge(0,9,12,-6,0,19,29,2,0,7,36,6),ge(0,10,13,-6,0,20,31,3,0,8,38,7),ge(0,10,13,-6,0,21,33,3,0,8,40,7),ge(0,10,14,-6,0,22,35,3,0,8,42,7),ge(0,11,14,-7,0,23,36,3,0,9,44,8),ge(0,11,15,-7,0,24,38,3,0,9,46,8)],Vu=Fu,zu=["duration","easing","delay"],Hu={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)"},Uu={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ya(e){return`${Math.round(e)}ms`}function Gu(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function qu(e){const t=P({},Hu,e.easing),r=P({},Uu,e.duration);return P({getAutoHeightDuration:Gu,create:(o=["all"],a={})=>{const{duration:s=r.standard,easing:c=t.easeInOut,delay:p=0}=a,f=me(a,zu);if(process.env.NODE_ENV!=="production"){const m=g=>typeof g=="string",v=g=>!isNaN(parseFloat(g));!m(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!v(s)&&!m(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),m(c)||console.error('MUI: Argument "easing" must be a string.'),!v(p)&&!m(p)&&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(f).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(f).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(m=>`${m} ${typeof s=="string"?s:Ya(s)} ${c} ${typeof p=="string"?p:Ya(p)}`).join(",")}},e,{easing:t,duration:r})}const Wu={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Xu=Wu,Yu=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Ku(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:a={}}=e,s=me(e,Yu);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.":Qt(18));const c=_u(n),p=Ao(e);let f=ct(p,{mixins:gu(p.breakpoints,r),palette:c,shadows:Vu.slice(),typography:Du(c,a),transitions:qu(o),zIndex:P({},Xu)});if(f=ct(f,s),f=t.reduce((m,v)=>ct(m,v),f),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],v=(g,d)=>{let h;for(h in g){const u=g[h];if(m.indexOf(h)!==-1&&Object.keys(u).length>0){if(process.env.NODE_ENV!=="production"){const b=nt("",h);console.error([`MUI: The \`${d}\` component increases the CSS specificity of the \`${h}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${b}' syntax:`,JSON.stringify({root:{[`&.${b}`]:u}},null,2),"","https://mui.com/r/state-classes-guide"].join(` +`))}g[h]={}}}};Object.keys(f.components).forEach(g=>{const d=f.components[g].styleOverrides;d&&g.indexOf("Mui")===0&&v(d,g)})}return f.unstable_sxConfig=P({},Io,s==null?void 0:s.unstable_sxConfig),f.unstable_sx=function(v){return Do({sx:v,theme:this})},f}const Ju=Ku(),Lo=Ju,Fo="$$material";function mt({props:e,name:t}){return du({props:e,name:t,defaultTheme:Lo,themeId:Fo})}const Ei=e=>sn(e)&&e!=="classes",Zu=cu({themeId:Fo,defaultTheme:Lo,rootShouldForwardProp:Ei}),Oe=Zu;function Qu(e){return nt("MuiSvgIcon",e)}xt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ef=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],tf=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${tt(t)}`,`fontSize${tt(r)}`]};return ft(o,Qu,n)},rf=Oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${tt(r.color)}`],t[`fontSize${tt(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,a,s,c,p,f,m,v,g,d,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((a=e.typography)==null||(s=a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem",medium:((c=e.typography)==null||(p=c.pxToRem)==null?void 0:p.call(c,24))||"1.5rem",large:((f=e.typography)==null||(m=f.pxToRem)==null?void 0:m.call(f,35))||"2.1875rem"}[t.fontSize],color:(v=(g=(e.vars||e).palette)==null||(g=g[t.color])==null?void 0:g.main)!=null?v:{action:(d=(e.vars||e).palette)==null||(d=d.action)==null?void 0:d.active,disabled:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.disabled,inherit:void 0}[t.color]}}),Vo=T.forwardRef(function(t,r){const n=mt({props:t,name:"MuiSvgIcon"}),{children:o,className:a,color:s="inherit",component:c="svg",fontSize:p="medium",htmlColor:f,inheritViewBox:m=!1,titleAccess:v,viewBox:g="0 0 24 24"}=n,d=me(n,ef),h=T.isValidElement(o)&&o.type==="svg",u=P({},n,{color:s,component:c,fontSize:p,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:g,hasSvgAsChild:h}),b={};m||(b.viewBox=g);const x=tf(u);return l.jsxs(rf,P({as:c,className:Se(x.root,a),focusable:"false",color:f,"aria-hidden":v?void 0:!0,role:v?"img":void 0,ref:r},b,d,h&&o.props,{ownerState:u,children:[h?o.props.children:o,v?l.jsx("title",{children:v}):null]}))});process.env.NODE_ENV!=="production"&&(Vo.propTypes={children:i.node,classes:i.object,className:i.string,color:i.oneOfType([i.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),i.string]),component:i.elementType,fontSize:i.oneOfType([i.oneOf(["inherit","large","medium","small"]),i.string]),htmlColor:i.string,inheritViewBox:i.bool,shapeRendering:i.string,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),titleAccess:i.string,viewBox:i.string});Vo.muiName="SvgIcon";const Ka=Vo;function Ni(e,t){function r(n,o){return l.jsx(Ka,P({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Ka.muiName,T.memo(T.forwardRef(r))}const nf={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(` +`)),gi.configure(e)}},of=Object.freeze(Object.defineProperty({__proto__:null,capitalize:tt,createChainedFunction:co,createSvgIcon:Ni,debounce:ii,deprecatedPropType:Mp,isMuiElement:Ip,ownerDocument:je,ownerWindow:er,requirePropFactory:Dp,setRef:fn,unstable_ClassNameGenerator:nf,unstable_useEnhancedEffect:Dt,unstable_useId:li,unsupportedProp:Lp,useControlled:ci,useEventCallback:Ir,useForkRef:qe,useIsFocusVisible:pi},Symbol.toStringTag,{value:"Module"})),af=up(of);var Ja;function sf(){return Ja||(Ja=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=af}(Vn)),Vn}var lf=fp;Object.defineProperty(Ro,"__esModule",{value:!0});var Ti=Ro.default=void 0,cf=lf(sf()),pf=l;Ti=Ro.default=(0,cf.default)((0,pf.jsx)("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight");function Si(e){return typeof e=="string"}function Tr(e,t,r){return e===void 0||Si(e)?t:P({},t,{ownerState:P({},t.ownerState,r)})}const df={disableDefaultClasses:!1},uf=T.createContext(df);function ff(e){const{disableDefaultClasses:t}=T.useContext(uf);return r=>t?"":e(r)}function Ci(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function mf(e,t,r){return typeof e=="function"?e(t,r):e}function Za(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function hf(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:a}=e;if(!t){const d=Se(r==null?void 0:r.className,a,o==null?void 0:o.className,n==null?void 0:n.className),h=P({},r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),u=P({},r,o,n);return d.length>0&&(u.className=d),Object.keys(h).length>0&&(u.style=h),{props:u,internalRef:void 0}}const s=Ci(P({},o,n)),c=Za(n),p=Za(o),f=t(s),m=Se(f==null?void 0:f.className,r==null?void 0:r.className,a,o==null?void 0:o.className,n==null?void 0:n.className),v=P({},f==null?void 0:f.style,r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),g=P({},f,r,p,c);return m.length>0&&(g.className=m),Object.keys(v).length>0&&(g.style=v),{props:g,internalRef:f.ref}}const gf=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Bt(e){var t;const{elementType:r,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:a=!1}=e,s=me(e,gf),c=a?{}:mf(n,o),{props:p,internalRef:f}=hf(P({},s,{externalSlotProps:c})),m=qe(f,c==null?void 0:c.ref,(t=e.additionalProps)==null?void 0:t.ref);return Tr(r,P({},p,{ref:m}),o)}const ji="base";function bf(e){return`${ji}--${e}`}function vf(e,t){return`${ji}-${e}-${t}`}function Oi(e,t){const r=bi[t];return r?bf(r):vf(e,t)}function yf(e,t){const r={};return t.forEach(n=>{r[n]=Oi(e,n)}),r}const wf=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function xf(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function kf(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=n=>e.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function Ef(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||kf(e))}function Nf(e){const t=[],r=[];return Array.from(e.querySelectorAll(wf)).forEach((n,o)=>{const a=xf(n);a===-1||!Ef(n)||(a===0?t.push(n):r.push({documentOrder:o,tabIndex:a,node:n}))}),r.sort((n,o)=>n.tabIndex===o.tabIndex?n.documentOrder-o.documentOrder:n.tabIndex-o.tabIndex).map(n=>n.node).concat(t)}function Tf(){return!0}function gn(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:a=Nf,isEnabled:s=Tf,open:c}=e,p=T.useRef(!1),f=T.useRef(null),m=T.useRef(null),v=T.useRef(null),g=T.useRef(null),d=T.useRef(!1),h=T.useRef(null),u=qe(t.ref,h),b=T.useRef(null);T.useEffect(()=>{!c||!h.current||(d.current=!r)},[r,c]),T.useEffect(()=>{if(!c||!h.current)return;const w=je(h.current);return h.current.contains(w.activeElement)||(h.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(` +`)),h.current.setAttribute("tabIndex","-1")),d.current&&h.current.focus()),()=>{o||(v.current&&v.current.focus&&(p.current=!0,v.current.focus()),v.current=null)}},[c]),T.useEffect(()=>{if(!c||!h.current)return;const w=je(h.current),k=C=>{b.current=C,!(n||!s()||C.key!=="Tab")&&w.activeElement===h.current&&C.shiftKey&&(p.current=!0,m.current&&m.current.focus())},y=()=>{const C=h.current;if(C===null)return;if(!w.hasFocus()||!s()||p.current){p.current=!1;return}if(C.contains(w.activeElement)||n&&w.activeElement!==f.current&&w.activeElement!==m.current)return;if(w.activeElement!==g.current)g.current=null;else if(g.current!==null)return;if(!d.current)return;let M=[];if((w.activeElement===f.current||w.activeElement===m.current)&&(M=a(h.current)),M.length>0){var A,z;const $=!!((A=b.current)!=null&&A.shiftKey&&((z=b.current)==null?void 0:z.key)==="Tab"),N=M[0],j=M[M.length-1];typeof N!="string"&&typeof j!="string"&&($?j.focus():N.focus())}else C.focus()};w.addEventListener("focusin",y),w.addEventListener("keydown",k,!0);const S=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&y()},50);return()=>{clearInterval(S),w.removeEventListener("focusin",y),w.removeEventListener("keydown",k,!0)}},[r,n,o,s,c,a]);const x=w=>{v.current===null&&(v.current=w.relatedTarget),d.current=!0,g.current=w.target;const k=t.props.onFocus;k&&k(w)},R=w=>{v.current===null&&(v.current=w.relatedTarget),d.current=!0};return l.jsxs(T.Fragment,{children:[l.jsx("div",{tabIndex:c?0:-1,onFocus:R,ref:f,"data-testid":"sentinelStart"}),T.cloneElement(t,{ref:u,onFocus:x}),l.jsx("div",{tabIndex:c?0:-1,onFocus:R,ref:m,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(gn.propTypes={children:Gr,disableAutoFocus:i.bool,disableEnforceFocus:i.bool,disableRestoreFocus:i.bool,getTabbable:i.func,isEnabled:i.func,open:i.bool.isRequired});process.env.NODE_ENV!=="production"&&(gn["propTypes"]=ai(gn.propTypes));function Sf(e){return typeof e=="function"?e():e}const Ar=T.forwardRef(function(t,r){const{children:n,container:o,disablePortal:a=!1}=t,[s,c]=T.useState(null),p=qe(T.isValidElement(n)?n.ref:null,r);if(Dt(()=>{a||c(Sf(o)||document.body)},[o,a]),Dt(()=>{if(s&&!a)return fn(r,s),()=>{fn(r,null)}},[r,s,a]),a){if(T.isValidElement(n)){const f={ref:p};return T.cloneElement(n,f)}return l.jsx(T.Fragment,{children:n})}return l.jsx(T.Fragment,{children:s&&mc.createPortal(n,s)})});process.env.NODE_ENV!=="production"&&(Ar.propTypes={children:i.node,container:i.oneOfType([pt,i.func]),disablePortal:i.bool});process.env.NODE_ENV!=="production"&&(Ar["propTypes"]=ai(Ar.propTypes));function Cf(e){const t=je(e);return t.body===e?er(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Or(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Qa(e){return parseInt(er(e).getComputedStyle(e).paddingRight,10)||0}function jf(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,n=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||n}function es(e,t,r,n,o){const a=[t,r,...n];[].forEach.call(e.children,s=>{const c=a.indexOf(s)===-1,p=!jf(s);c&&p&&Or(s,o)})}function Kn(e,t){let r=-1;return e.some((n,o)=>t(n)?(r=o,!0):!1),r}function Of(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(Cf(n)){const s=di(je(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${Qa(n)+s}px`;const c=je(n).querySelectorAll(".mui-fixed");[].forEach.call(c,p=>{r.push({value:p.style.paddingRight,property:"padding-right",el:p}),p.style.paddingRight=`${Qa(p)+s}px`})}let a;if(n.parentNode instanceof DocumentFragment)a=je(n).body;else{const s=n.parentElement,c=er(n);a=(s==null?void 0:s.nodeName)==="HTML"&&c.getComputedStyle(s).overflowY==="scroll"?s:n}r.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{r.forEach(({value:a,el:s,property:c})=>{a?s.style.setProperty(c,a):s.style.removeProperty(c)})}}function Rf(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class Pf{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let n=this.modals.indexOf(t);if(n!==-1)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&Or(t.modalRef,!1);const o=Rf(r);es(r,t.mount,t.modalRef,o,!0);const a=Kn(this.containers,s=>s.container===r);return a!==-1?(this.containers[a].modals.push(t),n):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:o}),n)}mount(t,r){const n=Kn(this.containers,a=>a.modals.indexOf(t)!==-1),o=this.containers[n];o.restore||(o.restore=Of(o,r))}remove(t,r=!0){const n=this.modals.indexOf(t);if(n===-1)return n;const o=Kn(this.containers,s=>s.modals.indexOf(t)!==-1),a=this.containers[o];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(n,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&Or(t.modalRef,r),es(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(o,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&Or(s.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function $f(e){return typeof e=="function"?e():e}function _f(e){return e?e.props.hasOwnProperty("in"):!1}const Mf=new Pf;function If(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:o=Mf,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:c,children:p,onClose:f,open:m,rootRef:v}=e,g=T.useRef({}),d=T.useRef(null),h=T.useRef(null),u=qe(h,v),[b,x]=T.useState(!m),R=_f(p);let w=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(w=!1);const k=()=>je(d.current),y=()=>(g.current.modalRef=h.current,g.current.mount=d.current,g.current),S=()=>{o.mount(y(),{disableScrollLock:n}),h.current&&(h.current.scrollTop=0)},C=Ir(()=>{const B=$f(t)||k().body;o.add(y(),B),h.current&&S()}),M=T.useCallback(()=>o.isTopModal(y()),[o]),A=Ir(B=>{d.current=B,B&&(m&&M()?S():h.current&&Or(h.current,w))}),z=T.useCallback(()=>{o.remove(y(),w)},[w,o]);T.useEffect(()=>()=>{z()},[z]),T.useEffect(()=>{m?C():(!R||!a)&&z()},[m,z,R,a,C]);const $=B=>L=>{var J;(J=B.onKeyDown)==null||J.call(B,L),!(L.key!=="Escape"||L.which===229||!M())&&(r||(L.stopPropagation(),f&&f(L,"escapeKeyDown")))},N=B=>L=>{var J;(J=B.onClick)==null||J.call(B,L),L.target===L.currentTarget&&f&&f(L,"backdropClick")};return{getRootProps:(B={})=>{const L=Ci(e);delete L.onTransitionEnter,delete L.onTransitionExited;const J=P({},L,B);return P({role:"presentation"},J,{onKeyDown:$(J),ref:u})},getBackdropProps:(B={})=>{const L=B;return P({"aria-hidden":!0},L,{onClick:N(L),open:m})},getTransitionProps:()=>{const B=()=>{x(!1),s&&s()},L=()=>{x(!0),c&&c(),a&&z()};return{onEnter:co(B,p==null?void 0:p.props.onEnter),onExited:co(L,p==null?void 0:p.props.onExited)}},rootRef:u,portalRef:A,isTopModal:M,exited:b,hasTransition:R}}var _e="top",We="bottom",Xe="right",Me="left",zo="auto",Yr=[_e,We,Xe,Me],tr="start",Br="end",Df="clippingParents",Ri="viewport",vr="popper",Af="reference",ts=Yr.reduce(function(e,t){return e.concat([t+"-"+tr,t+"-"+Br])},[]),Pi=[].concat(Yr,[zo]).reduce(function(e,t){return e.concat([t,t+"-"+tr,t+"-"+Br])},[]),Bf="beforeRead",Lf="read",Ff="afterRead",Vf="beforeMain",zf="main",Hf="afterMain",Uf="beforeWrite",Gf="write",qf="afterWrite",Wf=[Bf,Lf,Ff,Vf,zf,Hf,Uf,Gf,qf];function rt(e){return e?(e.nodeName||"").toLowerCase():null}function Ve(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Lt(e){var t=Ve(e).Element;return e instanceof t||e instanceof Element}function Ge(e){var t=Ve(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Ho(e){if(typeof ShadowRoot>"u")return!1;var t=Ve(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Xf(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},o=t.attributes[r]||{},a=t.elements[r];!Ge(a)||!rt(a)||(Object.assign(a.style,n),Object.keys(o).forEach(function(s){var c=o[s];c===!1?a.removeAttribute(s):a.setAttribute(s,c===!0?"":c)}))})}function Yf(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],a=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),c=s.reduce(function(p,f){return p[f]="",p},{});!Ge(o)||!rt(o)||(Object.assign(o.style,c),Object.keys(a).forEach(function(p){o.removeAttribute(p)}))})}}const Kf={name:"applyStyles",enabled:!0,phase:"write",fn:Xf,effect:Yf,requires:["computeStyles"]};function Qe(e){return e.split("-")[0]}var _t=Math.max,bn=Math.min,rr=Math.round;function fo(){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 $i(){return!/^((?!chrome|android).)*safari/i.test(fo())}function nr(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&Ge(e)&&(o=e.offsetWidth>0&&rr(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&rr(n.height)/e.offsetHeight||1);var s=Lt(e)?Ve(e):window,c=s.visualViewport,p=!$i()&&r,f=(n.left+(p&&c?c.offsetLeft:0))/o,m=(n.top+(p&&c?c.offsetTop:0))/a,v=n.width/o,g=n.height/a;return{width:v,height:g,top:m,right:f+v,bottom:m+g,left:f,x:f,y:m}}function Uo(e){var t=nr(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function _i(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Ho(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ut(e){return Ve(e).getComputedStyle(e)}function Jf(e){return["table","td","th"].indexOf(rt(e))>=0}function Et(e){return((Lt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Mn(e){return rt(e)==="html"?e:e.assignedSlot||e.parentNode||(Ho(e)?e.host:null)||Et(e)}function rs(e){return!Ge(e)||ut(e).position==="fixed"?null:e.offsetParent}function Zf(e){var t=/firefox/i.test(fo()),r=/Trident/i.test(fo());if(r&&Ge(e)){var n=ut(e);if(n.position==="fixed")return null}var o=Mn(e);for(Ho(o)&&(o=o.host);Ge(o)&&["html","body"].indexOf(rt(o))<0;){var a=ut(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 Kr(e){for(var t=Ve(e),r=rs(e);r&&Jf(r)&&ut(r).position==="static";)r=rs(r);return r&&(rt(r)==="html"||rt(r)==="body"&&ut(r).position==="static")?t:r||Zf(e)||t}function Go(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Rr(e,t,r){return _t(e,bn(t,r))}function Qf(e,t,r){var n=Rr(e,t,r);return n>r?r:n}function Mi(){return{top:0,right:0,bottom:0,left:0}}function Ii(e){return Object.assign({},Mi(),e)}function Di(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var em=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Ii(typeof t!="number"?t:Di(t,Yr))};function tm(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,s=r.modifiersData.popperOffsets,c=Qe(r.placement),p=Go(c),f=[Me,Xe].indexOf(c)>=0,m=f?"height":"width";if(!(!a||!s)){var v=em(o.padding,r),g=Uo(a),d=p==="y"?_e:Me,h=p==="y"?We:Xe,u=r.rects.reference[m]+r.rects.reference[p]-s[p]-r.rects.popper[m],b=s[p]-r.rects.reference[p],x=Kr(a),R=x?p==="y"?x.clientHeight||0:x.clientWidth||0:0,w=u/2-b/2,k=v[d],y=R-g[m]-v[h],S=R/2-g[m]/2+w,C=Rr(k,S,y),M=p;r.modifiersData[n]=(t={},t[M]=C,t.centerOffset=C-S,t)}}function rm(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||_i(t.elements.popper,o)&&(t.elements.arrow=o))}const nm={name:"arrow",enabled:!0,phase:"main",fn:tm,effect:rm,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function or(e){return e.split("-")[1]}var om={top:"auto",right:"auto",bottom:"auto",left:"auto"};function am(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:rr(r*o)/o||0,y:rr(n*o)/o||0}}function ns(e){var t,r=e.popper,n=e.popperRect,o=e.placement,a=e.variation,s=e.offsets,c=e.position,p=e.gpuAcceleration,f=e.adaptive,m=e.roundOffsets,v=e.isFixed,g=s.x,d=g===void 0?0:g,h=s.y,u=h===void 0?0:h,b=typeof m=="function"?m({x:d,y:u}):{x:d,y:u};d=b.x,u=b.y;var x=s.hasOwnProperty("x"),R=s.hasOwnProperty("y"),w=Me,k=_e,y=window;if(f){var S=Kr(r),C="clientHeight",M="clientWidth";if(S===Ve(r)&&(S=Et(r),ut(S).position!=="static"&&c==="absolute"&&(C="scrollHeight",M="scrollWidth")),S=S,o===_e||(o===Me||o===Xe)&&a===Br){k=We;var A=v&&S===y&&y.visualViewport?y.visualViewport.height:S[C];u-=A-n.height,u*=p?1:-1}if(o===Me||(o===_e||o===We)&&a===Br){w=Xe;var z=v&&S===y&&y.visualViewport?y.visualViewport.width:S[M];d-=z-n.width,d*=p?1:-1}}var $=Object.assign({position:c},f&&om),N=m===!0?am({x:d,y:u},Ve(r)):{x:d,y:u};if(d=N.x,u=N.y,p){var j;return Object.assign({},$,(j={},j[k]=R?"0":"",j[w]=x?"0":"",j.transform=(y.devicePixelRatio||1)<=1?"translate("+d+"px, "+u+"px)":"translate3d("+d+"px, "+u+"px, 0)",j))}return Object.assign({},$,(t={},t[k]=R?u+"px":"",t[w]=x?d+"px":"",t.transform="",t))}function sm(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,a=r.adaptive,s=a===void 0?!0:a,c=r.roundOffsets,p=c===void 0?!0:c,f={placement:Qe(t.placement),variation:or(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,ns(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:p})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ns(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:p})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const im={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sm,data:{}};var nn={passive:!0};function lm(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,a=o===void 0?!0:o,s=n.resize,c=s===void 0?!0:s,p=Ve(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(m){m.addEventListener("scroll",r.update,nn)}),c&&p.addEventListener("resize",r.update,nn),function(){a&&f.forEach(function(m){m.removeEventListener("scroll",r.update,nn)}),c&&p.removeEventListener("resize",r.update,nn)}}const cm={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:lm,data:{}};var pm={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(e){return e.replace(/left|right|bottom|top/g,function(t){return pm[t]})}var dm={start:"end",end:"start"};function os(e){return e.replace(/start|end/g,function(t){return dm[t]})}function qo(e){var t=Ve(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Wo(e){return nr(Et(e)).left+qo(e).scrollLeft}function um(e,t){var r=Ve(e),n=Et(e),o=r.visualViewport,a=n.clientWidth,s=n.clientHeight,c=0,p=0;if(o){a=o.width,s=o.height;var f=$i();(f||!f&&t==="fixed")&&(c=o.offsetLeft,p=o.offsetTop)}return{width:a,height:s,x:c+Wo(e),y:p}}function fm(e){var t,r=Et(e),n=qo(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=_t(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=_t(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-n.scrollLeft+Wo(e),p=-n.scrollTop;return ut(o||r).direction==="rtl"&&(c+=_t(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:c,y:p}}function Xo(e){var t=ut(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function Ai(e){return["html","body","#document"].indexOf(rt(e))>=0?e.ownerDocument.body:Ge(e)&&Xo(e)?e:Ai(Mn(e))}function Pr(e,t){var r;t===void 0&&(t=[]);var n=Ai(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),a=Ve(n),s=o?[a].concat(a.visualViewport||[],Xo(n)?n:[]):n,c=t.concat(s);return o?c:c.concat(Pr(Mn(s)))}function mo(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function mm(e,t){var r=nr(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function as(e,t,r){return t===Ri?mo(um(e,r)):Lt(t)?mm(t,r):mo(fm(Et(e)))}function hm(e){var t=Pr(Mn(e)),r=["absolute","fixed"].indexOf(ut(e).position)>=0,n=r&&Ge(e)?Kr(e):e;return Lt(n)?t.filter(function(o){return Lt(o)&&_i(o,n)&&rt(o)!=="body"}):[]}function gm(e,t,r,n){var o=t==="clippingParents"?hm(e):[].concat(t),a=[].concat(o,[r]),s=a[0],c=a.reduce(function(p,f){var m=as(e,f,n);return p.top=_t(m.top,p.top),p.right=bn(m.right,p.right),p.bottom=bn(m.bottom,p.bottom),p.left=_t(m.left,p.left),p},as(e,s,n));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function Bi(e){var t=e.reference,r=e.element,n=e.placement,o=n?Qe(n):null,a=n?or(n):null,s=t.x+t.width/2-r.width/2,c=t.y+t.height/2-r.height/2,p;switch(o){case _e:p={x:s,y:t.y-r.height};break;case We:p={x:s,y:t.y+t.height};break;case Xe:p={x:t.x+t.width,y:c};break;case Me:p={x:t.x-r.width,y:c};break;default:p={x:t.x,y:t.y}}var f=o?Go(o):null;if(f!=null){var m=f==="y"?"height":"width";switch(a){case tr:p[f]=p[f]-(t[m]/2-r[m]/2);break;case Br:p[f]=p[f]+(t[m]/2-r[m]/2);break}}return p}function Lr(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,a=r.strategy,s=a===void 0?e.strategy:a,c=r.boundary,p=c===void 0?Df:c,f=r.rootBoundary,m=f===void 0?Ri:f,v=r.elementContext,g=v===void 0?vr:v,d=r.altBoundary,h=d===void 0?!1:d,u=r.padding,b=u===void 0?0:u,x=Ii(typeof b!="number"?b:Di(b,Yr)),R=g===vr?Af:vr,w=e.rects.popper,k=e.elements[h?R:g],y=gm(Lt(k)?k:k.contextElement||Et(e.elements.popper),p,m,s),S=nr(e.elements.reference),C=Bi({reference:S,element:w,strategy:"absolute",placement:o}),M=mo(Object.assign({},w,C)),A=g===vr?M:S,z={top:y.top-A.top+x.top,bottom:A.bottom-y.bottom+x.bottom,left:y.left-A.left+x.left,right:A.right-y.right+x.right},$=e.modifiersData.offset;if(g===vr&&$){var N=$[o];Object.keys(z).forEach(function(j){var _=[Xe,We].indexOf(j)>=0?1:-1,H=[_e,We].indexOf(j)>=0?"y":"x";z[j]+=N[H]*_})}return z}function bm(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,s=r.padding,c=r.flipVariations,p=r.allowedAutoPlacements,f=p===void 0?Pi:p,m=or(n),v=m?c?ts:ts.filter(function(h){return or(h)===m}):Yr,g=v.filter(function(h){return f.indexOf(h)>=0});g.length===0&&(g=v);var d=g.reduce(function(h,u){return h[u]=Lr(e,{placement:u,boundary:o,rootBoundary:a,padding:s})[Qe(u)],h},{});return Object.keys(d).sort(function(h,u){return d[h]-d[u]})}function vm(e){if(Qe(e)===zo)return[];var t=cn(e);return[os(e),t,os(t)]}function ym(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=o===void 0?!0:o,s=r.altAxis,c=s===void 0?!0:s,p=r.fallbackPlacements,f=r.padding,m=r.boundary,v=r.rootBoundary,g=r.altBoundary,d=r.flipVariations,h=d===void 0?!0:d,u=r.allowedAutoPlacements,b=t.options.placement,x=Qe(b),R=x===b,w=p||(R||!h?[cn(b)]:vm(b)),k=[b].concat(w).reduce(function(G,q){return G.concat(Qe(q)===zo?bm(t,{placement:q,boundary:m,rootBoundary:v,padding:f,flipVariations:h,allowedAutoPlacements:u}):q)},[]),y=t.rects.reference,S=t.rects.popper,C=new Map,M=!0,A=k[0],z=0;z=0,H=_?"width":"height",B=Lr(t,{placement:$,boundary:m,rootBoundary:v,altBoundary:g,padding:f}),L=_?j?Xe:Me:j?We:_e;y[H]>S[H]&&(L=cn(L));var J=cn(L),Z=[];if(a&&Z.push(B[N]<=0),c&&Z.push(B[L]<=0,B[J]<=0),Z.every(function(G){return G})){A=$,M=!1;break}C.set($,Z)}if(M)for(var O=h?3:1,I=function(q){var X=k.find(function(Y){var W=C.get(Y);if(W)return W.slice(0,q).every(function(Q){return Q})});if(X)return A=X,"break"},U=O;U>0;U--){var K=I(U);if(K==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const wm={name:"flip",enabled:!0,phase:"main",fn:ym,requiresIfExists:["offset"],data:{_skip:!1}};function ss(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function is(e){return[_e,Xe,We,Me].some(function(t){return e[t]>=0})}function xm(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,s=Lr(t,{elementContext:"reference"}),c=Lr(t,{altBoundary:!0}),p=ss(s,n),f=ss(c,o,a),m=is(p),v=is(f);t.modifiersData[r]={referenceClippingOffsets:p,popperEscapeOffsets:f,isReferenceHidden:m,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":m,"data-popper-escaped":v})}const km={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:xm};function Em(e,t,r){var n=Qe(e),o=[Me,_e].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=a[0],c=a[1];return s=s||0,c=(c||0)*o,[Me,Xe].indexOf(n)>=0?{x:c,y:s}:{x:s,y:c}}function Nm(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=o===void 0?[0,0]:o,s=Pi.reduce(function(m,v){return m[v]=Em(v,t.rects,a),m},{}),c=s[t.placement],p=c.x,f=c.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=p,t.modifiersData.popperOffsets.y+=f),t.modifiersData[n]=s}const Tm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Nm};function Sm(e){var t=e.state,r=e.name;t.modifiersData[r]=Bi({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Cm={name:"popperOffsets",enabled:!0,phase:"read",fn:Sm,data:{}};function jm(e){return e==="x"?"y":"x"}function Om(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=o===void 0?!0:o,s=r.altAxis,c=s===void 0?!1:s,p=r.boundary,f=r.rootBoundary,m=r.altBoundary,v=r.padding,g=r.tether,d=g===void 0?!0:g,h=r.tetherOffset,u=h===void 0?0:h,b=Lr(t,{boundary:p,rootBoundary:f,padding:v,altBoundary:m}),x=Qe(t.placement),R=or(t.placement),w=!R,k=Go(x),y=jm(k),S=t.modifiersData.popperOffsets,C=t.rects.reference,M=t.rects.popper,A=typeof u=="function"?u(Object.assign({},t.rects,{placement:t.placement})):u,z=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(S){if(a){var j,_=k==="y"?_e:Me,H=k==="y"?We:Xe,B=k==="y"?"height":"width",L=S[k],J=L+b[_],Z=L-b[H],O=d?-M[B]/2:0,I=R===tr?C[B]:M[B],U=R===tr?-M[B]:-C[B],K=t.elements.arrow,G=d&&K?Uo(K):{width:0,height:0},q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Mi(),X=q[_],Y=q[H],W=Rr(0,C[B],G[B]),Q=w?C[B]/2-O-W-X-z.mainAxis:I-W-X-z.mainAxis,ee=w?-C[B]/2+O+W+Y+z.mainAxis:U+W+Y+z.mainAxis,se=t.elements.arrow&&Kr(t.elements.arrow),V=se?k==="y"?se.clientTop||0:se.clientLeft||0:0,te=(j=$==null?void 0:$[k])!=null?j:0,D=L+Q-te-V,ie=L+ee-te,Ne=Rr(d?bn(J,D):J,L,d?_t(Z,ie):Z);S[k]=Ne,N[k]=Ne-L}if(c){var Re,xe=k==="x"?_e:Me,Nt=k==="x"?We:Xe,Pe=S[y],ot=y==="y"?"height":"width",Ae=Pe+b[xe],at=Pe-b[Nt],Te=[_e,Me].indexOf(x)!==-1,Ft=(Re=$==null?void 0:$[y])!=null?Re:0,Tt=Te?Ae:Pe-C[ot]-M[ot]-Ft+z.altAxis,pr=Te?Pe+C[ot]+M[ot]-Ft-z.altAxis:at,Zr=d&&Te?Qf(Tt,Pe,pr):Rr(d?Tt:Ae,Pe,d?pr:at);S[y]=Zr,N[y]=Zr-Pe}t.modifiersData[n]=N}}const Rm={name:"preventOverflow",enabled:!0,phase:"main",fn:Om,requiresIfExists:["offset"]};function Pm(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function $m(e){return e===Ve(e)||!Ge(e)?qo(e):Pm(e)}function _m(e){var t=e.getBoundingClientRect(),r=rr(t.width)/e.offsetWidth||1,n=rr(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Mm(e,t,r){r===void 0&&(r=!1);var n=Ge(t),o=Ge(t)&&_m(t),a=Et(t),s=nr(e,o,r),c={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(n||!n&&!r)&&((rt(t)!=="body"||Xo(a))&&(c=$m(t)),Ge(t)?(p=nr(t,!0),p.x+=t.clientLeft,p.y+=t.clientTop):a&&(p.x=Wo(a))),{x:s.left+c.scrollLeft-p.x,y:s.top+c.scrollTop-p.y,width:s.width,height:s.height}}function Im(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function o(a){r.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(c){if(!r.has(c)){var p=t.get(c);p&&o(p)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||o(a)}),n}function Dm(e){var t=Im(e);return Wf.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function Am(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Bm(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var ls={placement:"bottom",modifiers:[],strategy:"absolute"};function cs(){for(var e=arguments.length,t=new Array(e),r=0;rft({root:["root"]},ff(zm)),Xm={},Ym=T.forwardRef(function(t,r){var n;const{anchorEl:o,children:a,direction:s,disablePortal:c,modifiers:p,open:f,placement:m,popperOptions:v,popperRef:g,slotProps:d={},slots:h={},TransitionProps:u}=t,b=me(t,Hm),x=T.useRef(null),R=qe(x,r),w=T.useRef(null),k=qe(w,g),y=T.useRef(k);Dt(()=>{y.current=k},[k]),T.useImperativeHandle(g,()=>w.current,[]);const S=Gm(m,s),[C,M]=T.useState(S),[A,z]=T.useState(vn(o));T.useEffect(()=>{w.current&&w.current.forceUpdate()}),T.useEffect(()=>{o&&z(vn(o))},[o]),Dt(()=>{if(!A||!f)return;const H=J=>{M(J.placement)};if(process.env.NODE_ENV!=="production"&&A&&In(A)&&A.nodeType===1){const J=A.getBoundingClientRect();process.env.NODE_ENV!=="test"&&J.top===0&&J.left===0&&J.right===0&&J.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 B=[{name:"preventOverflow",options:{altBoundary:c}},{name:"flip",options:{altBoundary:c}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:J})=>{H(J)}}];p!=null&&(B=B.concat(p)),v&&v.modifiers!=null&&(B=B.concat(v.modifiers));const L=Vm(A,x.current,P({placement:S},v,{modifiers:B}));return y.current(L),()=>{L.destroy(),y.current(null)}},[A,c,p,f,v,S]);const $={placement:C};u!==null&&($.TransitionProps=u);const N=Wm(),j=(n=h.root)!=null?n:"div",_=Bt({elementType:j,externalSlotProps:d.root,externalForwardedProps:b,additionalProps:{role:"tooltip",ref:R},ownerState:t,className:N.root});return l.jsx(j,P({},_,{children:typeof a=="function"?a($):a}))}),Fi=T.forwardRef(function(t,r){const{anchorEl:n,children:o,container:a,direction:s="ltr",disablePortal:c=!1,keepMounted:p=!1,modifiers:f,open:m,placement:v="bottom",popperOptions:g=Xm,popperRef:d,style:h,transition:u=!1,slotProps:b={},slots:x={}}=t,R=me(t,Um),[w,k]=T.useState(!0),y=()=>{k(!1)},S=()=>{k(!0)};if(!p&&!m&&(!u||w))return null;let C;if(a)C=a;else if(n){const z=vn(n);C=z&&In(z)?je(z).body:je(null).body}const M=!m&&p&&(!u||w)?"none":void 0,A=u?{in:m,onEnter:y,onExited:S}:void 0;return l.jsx(Ar,{disablePortal:c,container:C,children:l.jsx(Ym,P({anchorEl:n,direction:s,disablePortal:c,modifiers:f,ref:r,open:u?!w:m,placement:v,popperOptions:g,popperRef:d,slotProps:b,slots:x},R,{style:P({position:"fixed",top:0,left:0,display:M},h),TransitionProps:A,children:o}))})});process.env.NODE_ENV!=="production"&&(Fi.propTypes={anchorEl:lr(i.oneOfType([pt,i.object,i.func]),e=>{if(e.open){const t=vn(e.anchorEl);if(t&&In(t)&&t.nodeType===1){const r=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&r.top===0&&r.left===0&&r.right===0&&r.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"||qm(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:i.oneOfType([i.node,i.func]),container:i.oneOfType([pt,i.func]),direction:i.oneOf(["ltr","rtl"]),disablePortal:i.bool,keepMounted:i.bool,modifiers:i.arrayOf(i.shape({data:i.object,effect:i.func,enabled:i.bool,fn:i.func,name:i.any,options:i.object,phase:i.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:i.arrayOf(i.string),requiresIfExists:i.arrayOf(i.string)})),open:i.bool.isRequired,placement:i.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:i.shape({modifiers:i.array,onFirstUpdate:i.func,placement:i.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:i.oneOf(["absolute","fixed"])}),popperRef:$o,slotProps:i.shape({root:i.oneOfType([i.func,i.object])}),slots:i.shape({root:i.elementType}),transition:i.bool});function Jr(){const e=ki(Lo);return process.env.NODE_ENV!=="production"&&T.useDebugValue(e),e[Fo]||e}function ho(e,t){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ho(e,t)}function Km(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ho(e,t)}const ps={disabled:!1};var Jm=process.env.NODE_ENV!=="production"?i.oneOfType([i.number,i.shape({enter:i.number,exit:i.number,appear:i.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&i.oneOfType([i.string,i.shape({enter:i.string,exit:i.string,active:i.string}),i.shape({enter:i.string,enterDone:i.string,enterActive:i.string,exit:i.string,exitDone:i.string,exitActive:i.string})]);const Vi=E.createContext(null);var Zm=function(t){return t.scrollTop},Sr="unmounted",Ct="exited",jt="entering",Xt="entered",go="exiting",ht=function(e){Km(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var s=o,c=s&&!s.isMounting?n.enter:n.appear,p;return a.appearStatus=null,n.in?c?(p=Ct,a.appearStatus=jt):p=Xt:n.unmountOnExit||n.mountOnEnter?p=Sr:p=Ct,a.state={status:p},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var s=o.in;return s&&a.status===Sr?{status:Ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var a=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==jt&&s!==Xt&&(a=jt):(s===jt||s===Xt)&&(a=go)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,a,s,c;return a=s=c=o,o!=null&&typeof o!="number"&&(a=o.exit,s=o.enter,c=o.appear!==void 0?o.appear:s),{exit:a,enter:s,appear:c}},r.updateStatus=function(o,a){if(o===void 0&&(o=!1),a!==null)if(this.cancelNextCallback(),a===jt){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:kr.findDOMNode(this);s&&Zm(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ct&&this.setState({status:Sr})},r.performEnter=function(o){var a=this,s=this.props.enter,c=this.context?this.context.isMounting:o,p=this.props.nodeRef?[c]:[kr.findDOMNode(this),c],f=p[0],m=p[1],v=this.getTimeouts(),g=c?v.appear:v.enter;if(!o&&!s||ps.disabled){this.safeSetState({status:Xt},function(){a.props.onEntered(f)});return}this.props.onEnter(f,m),this.safeSetState({status:jt},function(){a.props.onEntering(f,m),a.onTransitionEnd(g,function(){a.safeSetState({status:Xt},function(){a.props.onEntered(f,m)})})})},r.performExit=function(){var o=this,a=this.props.exit,s=this.getTimeouts(),c=this.props.nodeRef?void 0:kr.findDOMNode(this);if(!a||ps.disabled){this.safeSetState({status:Ct},function(){o.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:go},function(){o.props.onExiting(c),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:Ct},function(){o.props.onExited(c)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},r.setNextCallback=function(o){var a=this,s=!0;return this.nextCallback=function(c){s&&(s=!1,a.nextCallback=null,o(c))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},r.onTransitionEnd=function(o,a){this.setNextCallback(a);var s=this.props.nodeRef?this.props.nodeRef.current:kr.findDOMNode(this),c=o==null&&!this.props.addEndListener;if(!s||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var p=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],f=p[0],m=p[1];this.props.addEndListener(f,m)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Sr)return null;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 c=me(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return E.createElement(Vi.Provider,{value:null},typeof s=="function"?s(o,c):E.cloneElement(E.Children.only(s),c))},t}(E.Component);ht.contextType=Vi;ht.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:i.shape({current:typeof Element>"u"?i.any:function(e,t,r,n,o,a){var s=e[t];return i.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,t,r,n,o,a)}}),children:i.oneOfType([i.func.isRequired,i.element.isRequired]).isRequired,in:i.bool,mountOnEnter:i.bool,unmountOnExit:i.bool,appear:i.bool,enter:i.bool,exit:i.bool,timeout:function(t){var r=Jm;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;ae.scrollTop;function yn(e,t){var r,n;const{timeout:o,easing:a,style:s={}}=e;return{duration:(r=s.transitionDuration)!=null?r:typeof o=="number"?o:o[t.mode]||0,easing:(n=s.transitionTimingFunction)!=null?n:typeof a=="object"?a[t.mode]:a,delay:s.transitionDelay}}const Qm=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function bo(e){return`scale(${e}, ${e**2})`}const eh={entering:{opacity:1,transform:bo(1)},entered:{opacity:1,transform:"none"}},Jn=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Yo=T.forwardRef(function(t,r){const{addEndListener:n,appear:o=!0,children:a,easing:s,in:c,onEnter:p,onEntered:f,onEntering:m,onExit:v,onExited:g,onExiting:d,style:h,timeout:u="auto",TransitionComponent:b=zi}=t,x=me(t,Qm),R=Nr(),w=T.useRef(),k=Jr(),y=T.useRef(null),S=qe(y,a.ref,r),C=H=>B=>{if(H){const L=y.current;B===void 0?H(L):H(L,B)}},M=C(m),A=C((H,B)=>{Hi(H);const{duration:L,delay:J,easing:Z}=yn({style:h,timeout:u,easing:s},{mode:"enter"});let O;u==="auto"?(O=k.transitions.getAutoHeightDuration(H.clientHeight),w.current=O):O=L,H.style.transition=[k.transitions.create("opacity",{duration:O,delay:J}),k.transitions.create("transform",{duration:Jn?O:O*.666,delay:J,easing:Z})].join(","),p&&p(H,B)}),z=C(f),$=C(d),N=C(H=>{const{duration:B,delay:L,easing:J}=yn({style:h,timeout:u,easing:s},{mode:"exit"});let Z;u==="auto"?(Z=k.transitions.getAutoHeightDuration(H.clientHeight),w.current=Z):Z=B,H.style.transition=[k.transitions.create("opacity",{duration:Z,delay:L}),k.transitions.create("transform",{duration:Jn?Z:Z*.666,delay:Jn?L:L||Z*.333,easing:J})].join(","),H.style.opacity=0,H.style.transform=bo(.75),v&&v(H)}),j=C(g),_=H=>{u==="auto"&&R.start(w.current||0,H),n&&n(y.current,H)};return l.jsx(b,P({appear:o,in:c,nodeRef:y,onEnter:A,onEntered:z,onEntering:M,onExit:N,onExited:j,onExiting:$,addEndListener:_,timeout:u==="auto"?null:u},x,{children:(H,B)=>T.cloneElement(a,P({style:P({opacity:0,transform:bo(.75),visibility:H==="exited"&&!c?"hidden":void 0},eh[H],h,a.props.style),ref:S},B))}))});process.env.NODE_ENV!=="production"&&(Yo.propTypes={addEndListener:i.func,appear:i.bool,children:Gr.isRequired,easing:i.oneOfType([i.shape({enter:i.string,exit:i.string}),i.string]),in:i.bool,onEnter:i.func,onEntered:i.func,onEntering:i.func,onExit:i.func,onExited:i.func,onExiting:i.func,style:i.object,timeout:i.oneOfType([i.oneOf(["auto"]),i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})])});Yo.muiSupportAuto=!0;const vo=Yo,th=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},ds=th,rh=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],nh=Oe(Fi,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ui=T.forwardRef(function(t,r){var n;const o=xi(),a=mt({props:t,name:"MuiPopper"}),{anchorEl:s,component:c,components:p,componentsProps:f,container:m,disablePortal:v,keepMounted:g,modifiers:d,open:h,placement:u,popperOptions:b,popperRef:x,transition:R,slots:w,slotProps:k}=a,y=me(a,rh),S=(n=w==null?void 0:w.root)!=null?n:p==null?void 0:p.Root,C=P({anchorEl:s,container:m,disablePortal:v,keepMounted:g,modifiers:d,open:h,placement:u,popperOptions:b,popperRef:x,transition:R},y);return l.jsx(nh,P({as:c,direction:o==null?void 0:o.direction,slots:{root:S},slotProps:k??f},C,{ref:r}))});process.env.NODE_ENV!=="production"&&(Ui.propTypes={anchorEl:i.oneOfType([pt,i.object,i.func]),children:i.oneOfType([i.node,i.func]),component:i.elementType,components:i.shape({Root:i.elementType}),componentsProps:i.shape({root:i.oneOfType([i.func,i.object])}),container:i.oneOfType([pt,i.func]),disablePortal:i.bool,keepMounted:i.bool,modifiers:i.arrayOf(i.shape({data:i.object,effect:i.func,enabled:i.bool,fn:i.func,name:i.any,options:i.object,phase:i.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:i.arrayOf(i.string),requiresIfExists:i.arrayOf(i.string)})),open:i.bool.isRequired,placement:i.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:i.shape({modifiers:i.array,onFirstUpdate:i.func,placement:i.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:i.oneOf(["absolute","fixed"])}),popperRef:$o,slotProps:i.shape({root:i.oneOfType([i.func,i.object])}),slots:i.shape({root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),transition:i.bool});const Gi=Ui;function oh(e){return nt("MuiTooltip",e)}const ah=xt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),wt=ah,sh=["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 ih(e){return Math.round(e*1e5)/1e5}const lh=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:a}=e,s={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${tt(a.split("-")[0])}`],arrow:["arrow"]};return ft(s,oh,t)},ch=Oe(Gi,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>P({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${wt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${wt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${wt.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"] .${wt.arrow}`]:P({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),ph=Oe("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${tt(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>P({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:hn(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:`${ih(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${wt.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"})),[`.${wt.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"})),[`.${wt.popper}[data-popper-placement*="top"] &`]:P({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${wt.popper}[data-popper-placement*="bottom"] &`]:P({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),dh=Oe("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:hn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let on=!1;const us=new qr;let yr={x:0,y:0};function an(e,t){return r=>{t&&t(r),e(r)}}const qi=T.forwardRef(function(t,r){var n,o,a,s,c,p,f,m,v,g,d,h,u,b,x,R,w,k,y;const S=mt({props:t,name:"MuiTooltip"}),{arrow:C=!1,children:M,components:A={},componentsProps:z={},describeChild:$=!1,disableFocusListener:N=!1,disableHoverListener:j=!1,disableInteractive:_=!1,disableTouchListener:H=!1,enterDelay:B=100,enterNextDelay:L=0,enterTouchDelay:J=700,followCursor:Z=!1,id:O,leaveDelay:I=0,leaveTouchDelay:U=1500,onClose:K,onOpen:G,open:q,placement:X="bottom",PopperComponent:Y,PopperProps:W={},slotProps:Q={},slots:ee={},title:se,TransitionComponent:V=vo,TransitionProps:te}=S,D=me(S,sh),ie=T.isValidElement(M)?M:l.jsx("span",{children:M}),Ne=Jr(),Re=Ne.direction==="rtl",[xe,Nt]=T.useState(),[Pe,ot]=T.useState(null),Ae=T.useRef(!1),at=_||Z,Te=Nr(),Ft=Nr(),Tt=Nr(),pr=Nr(),[Zr,aa]=ci({controlled:q,default:!1,name:"Tooltip",state:"open"});let st=Zr;if(process.env.NODE_ENV!=="production"){const{current:re}=T.useRef(q!==void 0);T.useEffect(()=>{xe&&xe.disabled&&!re&&se!==""&&xe.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(` +`))},[se,xe,re])}const Dn=li(O),dr=T.useRef(),Qr=Ir(()=>{dr.current!==void 0&&(document.body.style.WebkitUserSelect=dr.current,dr.current=void 0),pr.clear()});T.useEffect(()=>Qr,[Qr]);const sa=re=>{us.clear(),on=!0,aa(!0),G&&!st&&G(re)},en=Ir(re=>{us.start(800+I,()=>{on=!1}),aa(!1),K&&st&&K(re),Te.start(Ne.transitions.duration.shortest,()=>{Ae.current=!1})}),An=re=>{Ae.current&&re.type!=="touchstart"||(xe&&xe.removeAttribute("title"),Ft.clear(),Tt.clear(),B||on&&L?Ft.start(on?L:B,()=>{sa(re)}):sa(re))},ia=re=>{Ft.clear(),Tt.start(I,()=>{en(re)})},{isFocusVisibleRef:la,onBlur:ql,onFocus:Wl,ref:Xl}=pi(),[,ca]=T.useState(!1),pa=re=>{ql(re),la.current===!1&&(ca(!1),ia(re))},da=re=>{xe||Nt(re.currentTarget),Wl(re),la.current===!0&&(ca(!0),An(re))},ua=re=>{Ae.current=!0;const Be=ie.props;Be.onTouchStart&&Be.onTouchStart(re)},fa=An,ma=ia,Yl=re=>{ua(re),Tt.clear(),Te.clear(),Qr(),dr.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",pr.start(J,()=>{document.body.style.WebkitUserSelect=dr.current,An(re)})},Kl=re=>{ie.props.onTouchEnd&&ie.props.onTouchEnd(re),Qr(),Tt.start(U,()=>{en(re)})};T.useEffect(()=>{if(!st)return;function re(Be){(Be.key==="Escape"||Be.key==="Esc")&&en(Be)}return document.addEventListener("keydown",re),()=>{document.removeEventListener("keydown",re)}},[en,st]);const Jl=qe(ie.ref,Xl,Nt,r);!se&&se!==0&&(st=!1);const Bn=T.useRef(),Zl=re=>{const Be=ie.props;Be.onMouseMove&&Be.onMouseMove(re),yr={x:re.clientX,y:re.clientY},Bn.current&&Bn.current.update()},ur={},Ln=typeof se=="string";$?(ur.title=!st&&Ln&&!j?se:null,ur["aria-describedby"]=st?Dn:null):(ur["aria-label"]=Ln?se:null,ur["aria-labelledby"]=st&&!Ln?Dn:null);const ze=P({},ur,D,ie.props,{className:Se(D.className,ie.props.className),onTouchStart:ua,ref:Jl},Z?{onMouseMove:Zl}:{});process.env.NODE_ENV!=="production"&&(ze["data-mui-internal-clone-element"]=!0,T.useEffect(()=>{xe&&!xe.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(` +`))},[xe]));const fr={};H||(ze.onTouchStart=Yl,ze.onTouchEnd=Kl),j||(ze.onMouseOver=an(fa,ze.onMouseOver),ze.onMouseLeave=an(ma,ze.onMouseLeave),at||(fr.onMouseOver=fa,fr.onMouseLeave=ma)),N||(ze.onFocus=an(da,ze.onFocus),ze.onBlur=an(pa,ze.onBlur),at||(fr.onFocus=da,fr.onBlur=pa)),process.env.NODE_ENV!=="production"&&ie.props.title&&console.error(["MUI: You have provided a `title` prop to the child of .",`Remove this title prop \`${ie.props.title}\` or the Tooltip component.`].join(` +`));const Ql=T.useMemo(()=>{var re;let Be=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(re=W.popperOptions)!=null&&re.modifiers&&(Be=Be.concat(W.popperOptions.modifiers)),P({},W.popperOptions,{modifiers:Be})},[Pe,W]),mr=P({},S,{isRtl:Re,arrow:C,disableInteractive:at,placement:X,PopperComponentProp:Y,touch:Ae.current}),Fn=lh(mr),ha=(n=(o=ee.popper)!=null?o:A.Popper)!=null?n:ch,ga=(a=(s=(c=ee.transition)!=null?c:A.Transition)!=null?s:V)!=null?a:vo,ba=(p=(f=ee.tooltip)!=null?f:A.Tooltip)!=null?p:ph,va=(m=(v=ee.arrow)!=null?v:A.Arrow)!=null?m:dh,ec=Tr(ha,P({},W,(g=Q.popper)!=null?g:z.popper,{className:Se(Fn.popper,W==null?void 0:W.className,(d=(h=Q.popper)!=null?h:z.popper)==null?void 0:d.className)}),mr),tc=Tr(ga,P({},te,(u=Q.transition)!=null?u:z.transition),mr),rc=Tr(ba,P({},(b=Q.tooltip)!=null?b:z.tooltip,{className:Se(Fn.tooltip,(x=(R=Q.tooltip)!=null?R:z.tooltip)==null?void 0:x.className)}),mr),nc=Tr(va,P({},(w=Q.arrow)!=null?w:z.arrow,{className:Se(Fn.arrow,(k=(y=Q.arrow)!=null?y:z.arrow)==null?void 0:k.className)}),mr);return l.jsxs(T.Fragment,{children:[T.cloneElement(ie,ze),l.jsx(ha,P({as:Y??Gi,placement:X,anchorEl:Z?{getBoundingClientRect:()=>({top:yr.y,left:yr.x,right:yr.x,bottom:yr.y,width:0,height:0})}:xe,popperRef:Bn,open:xe?st:!1,id:Dn,transition:!0},fr,ec,{popperOptions:Ql,children:({TransitionProps:re})=>l.jsx(ga,P({timeout:Ne.transitions.duration.shorter},re,tc,{children:l.jsxs(ba,P({},rc,{children:[se,C?l.jsx(va,P({},nc,{ref:ot})):null]}))}))}))]})});process.env.NODE_ENV!=="production"&&(qi.propTypes={arrow:i.bool,children:Gr.isRequired,classes:i.object,className:i.string,components:i.shape({Arrow:i.elementType,Popper:i.elementType,Tooltip:i.elementType,Transition:i.elementType}),componentsProps:i.shape({arrow:i.object,popper:i.object,tooltip:i.object,transition:i.object}),describeChild:i.bool,disableFocusListener:i.bool,disableHoverListener:i.bool,disableInteractive:i.bool,disableTouchListener:i.bool,enterDelay:i.number,enterNextDelay:i.number,enterTouchDelay:i.number,followCursor:i.bool,id:i.string,leaveDelay:i.number,leaveTouchDelay:i.number,onClose:i.func,onOpen:i.func,open:i.bool,placement:i.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:i.elementType,PopperProps:i.object,slotProps:i.shape({arrow:i.object,popper:i.object,tooltip:i.object,transition:i.object}),slots:i.shape({arrow:i.elementType,popper:i.elementType,tooltip:i.elementType,transition:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),title:i.node,TransitionComponent:i.elementType,TransitionProps:i.object});const uh=qi;function fs(e,t,r){return e?l.jsx(Ee.ListItemIcon,{className:`papi-menu-icon-${r?"leading":"trailing"}`,children:l.jsx("img",{src:e,alt:`${r?"Leading":"Trailing"} icon for ${t}`})}):void 0}function Ko(e){const{onClick:t,label:r,tooltip:n,allowForLeadingIcons:o=!0,iconPathBefore:a=void 0,iconPathAfter:s=void 0,hasAutoFocus:c=!1,className:p,isDisabled:f=!1,isDense:m=!0,isSubMenuParent:v=!1,hasDisabledGutters:g=!1,hasDivider:d=!1,focusVisibleClassName:h,id:u,children:b}=e,x=l.jsx(Ee.MenuItem,{sx:{lineHeight:.8},autoFocus:c,className:p,disabled:f,dense:m,disableGutters:g,divider:d,focusVisibleClassName:h,onClick:t,id:u,children:r?l.jsxs(l.Fragment,{children:[fs(a,r,!0),l.jsx(Ee.ListItemText,{primary:r,inset:!a&&o}),v?l.jsx(Ee.ListItemIcon,{className:"papi-menu-icon-trailing",children:l.jsx(Ti,{})}):fs(s,r,!1)]}):b});return n?l.jsx(uh,{title:n,placement:"right",children:l.jsx("div",{children:x})}):x}function Wi(e){return Object.entries(e.groups).map(([r,n])=>({id:r,group:n}))}function fh(e){const[t,r]=E.useState(void 0),{parentMenuItem:n,parentItemProps:o,menuDefinition:a}=e,s=f=>{r(f.currentTarget)},c=()=>{r(void 0)},p=()=>{let f=Wi(a).filter(m=>"menuItem"in m.group);if(!(n!=null&&n.id))throw new Error("A valid parent menu item is required for submenus.");return f=f.filter(m=>"menuItem"in m.group&&m.group.menuItem===n.id),l.jsx(Jo,{...e,includedGroups:f})};return l.jsxs(l.Fragment,{children:[l.jsx(Ko,{onClick:s,...o,isSubMenuParent:!0}),l.jsx(Ee.Menu,{anchorEl:t,open:!!t,onClose:c,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:p()},n.id)]})}const mh=(e,t)=>t.filter(o=>o.group===e).sort((o,a)=>(o.order||0)-(a.order||0));function Jo(e){const{menuDefinition:t,onClick:r,commandHandler:n,includedGroups:o}=e,{items:a,allowForLeadingIcons:s}=E.useMemo(()=>{const m=o&&o.length>0?o:Wi(t).filter(h=>!("menuItem"in h.group)),v=Object.values(m).sort((h,u)=>(h.group.order||0)-(u.group.order||0)),g=[];v.forEach(h=>{mh(h.id,t.items).forEach(u=>g.push({item:u,isLastItemInGroup:!1})),g.length>0&&(g[g.length-1].isLastItemInGroup=!0)}),g.length>0&&(g[g.length-1].isLastItemInGroup=!1);const d=g.some(h=>"iconPathBefore"in h.item&&h.item.iconPathBefore);return{items:g,allowForLeadingIcons:d}},[o,t]),c=({item:m,isLastItemInGroup:v})=>({className:"papi-menu-item",label:m.label,tooltip:m.tooltip,iconPathBefore:"iconPathBefore"in m?m.iconPathBefore:void 0,iconPathAfter:"iconPathAfter"in m?m.iconPathAfter:void 0,hasDivider:v,allowForLeadingIcons:s}),[p]=a;if(!p)return l.jsx("div",{});const f=p.item.group;return l.jsx("div",{role:"menu","aria-label":f,children:a.map((m,v)=>{const{item:g}=m,d=c(m);if("command"in g){const h=g.group+v;return l.jsx(Ko,{onClick:u=>{r==null||r(u),n(g)},...d},h)}return l.jsx(fh,{parentMenuItem:g,parentItemProps:d,...e},f+g.id)})},f)}function hh(e){const{menuDefinition:t,columnId:r}=e;let a=Object.entries(t.groups).map(([s,c])=>({id:s,group:c})).filter(s=>"column"in s.group);return r&&"columns"in t&&t.columns[r]&&(a=a.filter(s=>"column"in s.group&&s.group.column===r)),l.jsx(Jo,{...e,includedGroups:a})}function gh({commandHandler:e,menuDefinition:t,id:r,metadata:n,onClick:o,className:a}){return l.jsxs(Ee.Grid,{id:r,item:!0,xs:"auto",role:"menu","aria-label":r,className:`papi-menu-column ${a??""}`,children:[l.jsx("h3",{"aria-label":n.label,className:`papi-menu-column-header ${a??""}`,children:n.label}),l.jsx(Ee.List,{id:r,dense:!0,className:a??"",children:l.jsx(hh,{commandHandler:e,menuDefinition:t,columnId:r,onClick:o})})]})}function Xi({commandHandler:e,className:t,multiColumnMenu:r,id:n}){const{columns:o}=r,a=E.useMemo(()=>{const s=new Map;return Object.getOwnPropertyNames(o).forEach(c=>{if(c==="isExtensible")return;const p=c,f=o[p];typeof f=="object"&&typeof f.order=="number"&&!Number.isNaN(f.order)?s.set(f.order,{id:p,metadata:f}):console.warn(`Property ${c} (${typeof f}) on menu ${n} is not a valid column and is being ignored. This might indicate data corruption`)}),Array.from(s.values()).sort((c,p)=>(c.metadata.order||0)-(p.metadata.order||0))},[o,n]);return l.jsx(Ee.Grid,{container:!0,spacing:0,className:`papi-multi-column-menu ${t??""}`,columns:a.length,role:"menu","aria-label":"GridMenu",id:n,children:a.map((s,c)=>l.jsx(gh,{commandHandler:e,menuDefinition:r,...s,className:t},c))})}const Yi=T.createContext({});process.env.NODE_ENV!=="production"&&(Yi.displayName="ListContext");const bh=Yi;function vh(e){return nt("MuiList",e)}xt("MuiList",["root","padding","dense","subheader"]);const yh=["children","className","component","dense","disablePadding","subheader"],wh=e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e;return ft({root:["root",!r&&"padding",n&&"dense",o&&"subheader"]},vh,t)},xh=Oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})(({ownerState:e})=>P({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),Ki=T.forwardRef(function(t,r){const n=mt({props:t,name:"MuiList"}),{children:o,className:a,component:s="ul",dense:c=!1,disablePadding:p=!1,subheader:f}=n,m=me(n,yh),v=T.useMemo(()=>({dense:c}),[c]),g=P({},n,{component:s,dense:c,disablePadding:p}),d=wh(g);return l.jsx(bh.Provider,{value:v,children:l.jsxs(xh,P({as:s,className:Se(d.root,a),ref:r,ownerState:g},m,{children:[f,o]}))})});process.env.NODE_ENV!=="production"&&(Ki.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,dense:i.bool,disablePadding:i.bool,subheader:i.node,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const kh=Ki,Eh=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Zn(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function ms(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function Ji(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function wr(e,t,r,n,o,a){let s=!1,c=o(e,t,t?r:!1);for(;c;){if(c===e.firstChild){if(s)return!1;s=!0}const p=n?!1:c.disabled||c.getAttribute("aria-disabled")==="true";if(!c.hasAttribute("tabindex")||!Ji(c,a)||p)c=o(e,c,r);else return c.focus(),!0}return!1}const Zi=T.forwardRef(function(t,r){const{actions:n,autoFocus:o=!1,autoFocusItem:a=!1,children:s,className:c,disabledItemsFocusable:p=!1,disableListWrap:f=!1,onKeyDown:m,variant:v="selectedMenu"}=t,g=me(t,Eh),d=T.useRef(null),h=T.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Dt(()=>{o&&d.current.focus()},[o]),T.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(w,k)=>{const y=!d.current.style.width;if(w.clientHeight{const k=d.current,y=w.key,S=je(k).activeElement;if(y==="ArrowDown")w.preventDefault(),wr(k,S,f,p,Zn);else if(y==="ArrowUp")w.preventDefault(),wr(k,S,f,p,ms);else if(y==="Home")w.preventDefault(),wr(k,null,f,p,Zn);else if(y==="End")w.preventDefault(),wr(k,null,f,p,ms);else if(y.length===1){const C=h.current,M=y.toLowerCase(),A=performance.now();C.keys.length>0&&(A-C.lastTime>500?(C.keys=[],C.repeating=!0,C.previousKeyMatched=!0):C.repeating&&M!==C.keys[0]&&(C.repeating=!1)),C.lastTime=A,C.keys.push(M);const z=S&&!C.repeating&&Ji(S,C);C.previousKeyMatched&&(z||wr(k,S,!1,p,Zn,C))?w.preventDefault():C.previousKeyMatched=!1}m&&m(w)},b=qe(d,r);let x=-1;T.Children.forEach(s,(w,k)=>{if(!T.isValidElement(w)){x===k&&(x+=1,x>=s.length&&(x=-1));return}process.env.NODE_ENV!=="production"&&un.isFragment(w)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(` +`)),w.props.disabled||(v==="selectedMenu"&&w.props.selected||x===-1)&&(x=k),x===k&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(x+=1,x>=s.length&&(x=-1))});const R=T.Children.map(s,(w,k)=>{if(k===x){const y={};return a&&(y.autoFocus=!0),w.props.tabIndex===void 0&&v==="selectedMenu"&&(y.tabIndex=0),T.cloneElement(w,y)}return w});return l.jsx(kh,P({role:"menu",ref:b,className:c,onKeyDown:u,tabIndex:o?0:-1},g,{children:R}))});process.env.NODE_ENV!=="production"&&(Zi.propTypes={autoFocus:i.bool,autoFocusItem:i.bool,children:i.node,className:i.string,disabledItemsFocusable:i.bool,disableListWrap:i.bool,onKeyDown:i.func,variant:i.oneOf(["menu","selectedMenu"])});const Nh=Zi,Th=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Sh={entering:{opacity:1},entered:{opacity:1}},Qi=T.forwardRef(function(t,r){const n=Jr(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:c,easing:p,in:f,onEnter:m,onEntered:v,onEntering:g,onExit:d,onExited:h,onExiting:u,style:b,timeout:x=o,TransitionComponent:R=zi}=t,w=me(t,Th),k=T.useRef(null),y=qe(k,c.ref,r),S=_=>H=>{if(_){const B=k.current;H===void 0?_(B):_(B,H)}},C=S(g),M=S((_,H)=>{Hi(_);const B=yn({style:b,timeout:x,easing:p},{mode:"enter"});_.style.webkitTransition=n.transitions.create("opacity",B),_.style.transition=n.transitions.create("opacity",B),m&&m(_,H)}),A=S(v),z=S(u),$=S(_=>{const H=yn({style:b,timeout:x,easing:p},{mode:"exit"});_.style.webkitTransition=n.transitions.create("opacity",H),_.style.transition=n.transitions.create("opacity",H),d&&d(_)}),N=S(h),j=_=>{a&&a(k.current,_)};return l.jsx(R,P({appear:s,in:f,nodeRef:k,onEnter:M,onEntered:A,onEntering:C,onExit:$,onExited:N,onExiting:z,addEndListener:j,timeout:x},w,{children:(_,H)=>T.cloneElement(c,P({style:P({opacity:0,visibility:_==="exited"&&!f?"hidden":void 0},Sh[_],b,c.props.style),ref:y},H))}))});process.env.NODE_ENV!=="production"&&(Qi.propTypes={addEndListener:i.func,appear:i.bool,children:Gr.isRequired,easing:i.oneOfType([i.shape({enter:i.string,exit:i.string}),i.string]),in:i.bool,onEnter:i.func,onEntered:i.func,onEntering:i.func,onExit:i.func,onExited:i.func,onExiting:i.func,style:i.object,timeout:i.oneOfType([i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})])});const Ch=Qi;function jh(e){return nt("MuiBackdrop",e)}xt("MuiBackdrop",["root","invisible"]);const Oh=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Rh=e=>{const{classes:t,invisible:r}=e;return ft({root:["root",r&&"invisible"]},jh,t)},Ph=Oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>P({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),el=T.forwardRef(function(t,r){var n,o,a;const s=mt({props:t,name:"MuiBackdrop"}),{children:c,className:p,component:f="div",components:m={},componentsProps:v={},invisible:g=!1,open:d,slotProps:h={},slots:u={},TransitionComponent:b=Ch,transitionDuration:x}=s,R=me(s,Oh),w=P({},s,{component:f,invisible:g}),k=Rh(w),y=(n=h.root)!=null?n:v.root;return l.jsx(b,P({in:d,timeout:x},R,{children:l.jsx(Ph,P({"aria-hidden":!0},y,{as:(o=(a=u.root)!=null?a:m.Root)!=null?o:f,className:Se(k.root,p,y==null?void 0:y.className),ownerState:P({},w,y==null?void 0:y.ownerState),classes:k,ref:r,children:c}))}))});process.env.NODE_ENV!=="production"&&(el.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,components:i.shape({Root:i.elementType}),componentsProps:i.shape({root:i.object}),invisible:i.bool,open:i.bool.isRequired,slotProps:i.shape({root:i.object}),slots:i.shape({root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),TransitionComponent:i.elementType,transitionDuration:i.oneOfType([i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})])});const $h=el;function _h(e){return nt("MuiModal",e)}xt("MuiModal",["root","hidden","backdrop"]);const Mh=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Ih=e=>{const{open:t,exited:r,classes:n}=e;return ft({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},_h,n)},Dh=Oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>P({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Ah=Oe($h,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),tl=T.forwardRef(function(t,r){var n,o,a,s,c,p;const f=mt({name:"MuiModal",props:t}),{BackdropComponent:m=Ah,BackdropProps:v,className:g,closeAfterTransition:d=!1,children:h,container:u,component:b,components:x={},componentsProps:R={},disableAutoFocus:w=!1,disableEnforceFocus:k=!1,disableEscapeKeyDown:y=!1,disablePortal:S=!1,disableRestoreFocus:C=!1,disableScrollLock:M=!1,hideBackdrop:A=!1,keepMounted:z=!1,onBackdropClick:$,open:N,slotProps:j,slots:_}=f,H=me(f,Mh),B=P({},f,{closeAfterTransition:d,disableAutoFocus:w,disableEnforceFocus:k,disableEscapeKeyDown:y,disablePortal:S,disableRestoreFocus:C,disableScrollLock:M,hideBackdrop:A,keepMounted:z}),{getRootProps:L,getBackdropProps:J,getTransitionProps:Z,portalRef:O,isTopModal:I,exited:U,hasTransition:K}=If(P({},B,{rootRef:r})),G=P({},B,{exited:U}),q=Ih(G),X={};if(h.props.tabIndex===void 0&&(X.tabIndex="-1"),K){const{onEnter:te,onExited:D}=Z();X.onEnter=te,X.onExited=D}const Y=(n=(o=_==null?void 0:_.root)!=null?o:x.Root)!=null?n:Dh,W=(a=(s=_==null?void 0:_.backdrop)!=null?s:x.Backdrop)!=null?a:m,Q=(c=j==null?void 0:j.root)!=null?c:R.root,ee=(p=j==null?void 0:j.backdrop)!=null?p:R.backdrop,se=Bt({elementType:Y,externalSlotProps:Q,externalForwardedProps:H,getSlotProps:L,additionalProps:{ref:r,as:b},ownerState:G,className:Se(g,Q==null?void 0:Q.className,q==null?void 0:q.root,!G.open&&G.exited&&(q==null?void 0:q.hidden))}),V=Bt({elementType:W,externalSlotProps:ee,additionalProps:v,getSlotProps:te=>J(P({},te,{onClick:D=>{$&&$(D),te!=null&&te.onClick&&te.onClick(D)}})),className:Se(ee==null?void 0:ee.className,v==null?void 0:v.className,q==null?void 0:q.backdrop),ownerState:G});return!z&&!N&&(!K||U)?null:l.jsx(Ar,{ref:O,container:u,disablePortal:S,children:l.jsxs(Y,P({},se,{children:[!A&&m?l.jsx(W,P({},V)):null,l.jsx(gn,{disableEnforceFocus:k,disableAutoFocus:w,disableRestoreFocus:C,isEnabled:I,open:N,children:T.cloneElement(h,X)})]}))})});process.env.NODE_ENV!=="production"&&(tl.propTypes={BackdropComponent:i.elementType,BackdropProps:i.object,children:Gr.isRequired,classes:i.object,className:i.string,closeAfterTransition:i.bool,component:i.elementType,components:i.shape({Backdrop:i.elementType,Root:i.elementType}),componentsProps:i.shape({backdrop:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object])}),container:i.oneOfType([pt,i.func]),disableAutoFocus:i.bool,disableEnforceFocus:i.bool,disableEscapeKeyDown:i.bool,disablePortal:i.bool,disableRestoreFocus:i.bool,disableScrollLock:i.bool,hideBackdrop:i.bool,keepMounted:i.bool,onBackdropClick:i.func,onClose:i.func,onTransitionEnter:i.func,onTransitionExited:i.func,open:i.bool.isRequired,slotProps:i.shape({backdrop:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object])}),slots:i.shape({backdrop:i.elementType,root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object])});const Bh=tl;function Lh(e){return nt("MuiPaper",e)}xt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Fh=["className","component","elevation","square","variant"],Vh=e=>{const{square:t,elevation:r,variant:n,classes:o}=e,a={root:["root",n,!t&&"rounded",n==="elevation"&&`elevation${r}`]};return ft(a,Lh,o)},zh=Oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return P({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&P({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${hn("#fff",ds(t.elevation))}, ${hn("#fff",ds(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),rl=T.forwardRef(function(t,r){const n=mt({props:t,name:"MuiPaper"}),{className:o,component:a="div",elevation:s=1,square:c=!1,variant:p="elevation"}=n,f=me(n,Fh),m=P({},n,{component:a,elevation:s,square:c,variant:p}),v=Vh(m);return process.env.NODE_ENV!=="production"&&Jr().shadows[s]===void 0&&console.error([`MUI: The elevation provided is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(` +`)),l.jsx(zh,P({as:a,ownerState:m,className:Se(v.root,o),ref:r},f))});process.env.NODE_ENV!=="production"&&(rl.propTypes={children:i.node,classes:i.object,className:i.string,component:i.elementType,elevation:lr(mi,e=>{const{elevation:t,variant:r}=e;return t>0&&r==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${r}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:i.bool,sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),variant:i.oneOfType([i.oneOf(["elevation","outlined"]),i.string])});const Hh=rl;function Uh(e){return nt("MuiPopover",e)}xt("MuiPopover",["root","paper"]);const Gh=["onEntering"],qh=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],Wh=["slotProps"];function hs(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function gs(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function bs(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function pn(e){return typeof e=="function"?e():e}const Xh=e=>{const{classes:t}=e;return ft({root:["root"],paper:["paper"]},Uh,t)},Yh=Oe(Bh,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nl=Oe(Hh,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),ol=T.forwardRef(function(t,r){var n,o,a;const s=mt({props:t,name:"MuiPopover"}),{action:c,anchorEl:p,anchorOrigin:f={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:v="anchorEl",children:g,className:d,container:h,elevation:u=8,marginThreshold:b=16,open:x,PaperProps:R={},slots:w,slotProps:k,transformOrigin:y={vertical:"top",horizontal:"left"},TransitionComponent:S=vo,transitionDuration:C="auto",TransitionProps:{onEntering:M}={},disableScrollLock:A=!1}=s,z=me(s.TransitionProps,Gh),$=me(s,qh),N=(n=k==null?void 0:k.paper)!=null?n:R,j=T.useRef(),_=qe(j,N.ref),H=P({},s,{anchorOrigin:f,anchorReference:v,elevation:u,marginThreshold:b,externalPaperSlotProps:N,transformOrigin:y,TransitionComponent:S,transitionDuration:C,TransitionProps:z}),B=Xh(H),L=T.useCallback(()=>{if(v==="anchorPosition")return process.env.NODE_ENV!=="production"&&(m||console.error('MUI: You need to provide a `anchorPosition` prop when using .')),m;const te=pn(p),D=te&&te.nodeType===1?te:je(j.current).body,ie=D.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const Ne=D.getBoundingClientRect();process.env.NODE_ENV!=="test"&&Ne.top===0&&Ne.left===0&&Ne.right===0&&Ne.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(` +`))}return{top:ie.top+hs(ie,f.vertical),left:ie.left+gs(ie,f.horizontal)}},[p,f.horizontal,f.vertical,m,v]),J=T.useCallback(te=>({vertical:hs(te,y.vertical),horizontal:gs(te,y.horizontal)}),[y.horizontal,y.vertical]),Z=T.useCallback(te=>{const D={width:te.offsetWidth,height:te.offsetHeight},ie=J(D);if(v==="none")return{top:null,left:null,transformOrigin:bs(ie)};const Ne=L();let Re=Ne.top-ie.vertical,xe=Ne.left-ie.horizontal;const Nt=Re+D.height,Pe=xe+D.width,ot=er(pn(p)),Ae=ot.innerHeight-b,at=ot.innerWidth-b;if(b!==null&&ReAe){const Te=Nt-Ae;Re-=Te,ie.vertical+=Te}if(process.env.NODE_ENV!=="production"&&D.height>Ae&&D.height&&Ae&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${D.height-Ae}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(` +`)),b!==null&&xeat){const Te=Pe-at;xe-=Te,ie.horizontal+=Te}return{top:`${Math.round(Re)}px`,left:`${Math.round(xe)}px`,transformOrigin:bs(ie)}},[p,v,L,J,b]),[O,I]=T.useState(x),U=T.useCallback(()=>{const te=j.current;if(!te)return;const D=Z(te);D.top!==null&&(te.style.top=D.top),D.left!==null&&(te.style.left=D.left),te.style.transformOrigin=D.transformOrigin,I(!0)},[Z]);T.useEffect(()=>(A&&window.addEventListener("scroll",U),()=>window.removeEventListener("scroll",U)),[p,A,U]);const K=(te,D)=>{M&&M(te,D),U()},G=()=>{I(!1)};T.useEffect(()=>{x&&U()}),T.useImperativeHandle(c,()=>x?{updatePosition:()=>{U()}}:null,[x,U]),T.useEffect(()=>{if(!x)return;const te=ii(()=>{U()}),D=er(p);return D.addEventListener("resize",te),()=>{te.clear(),D.removeEventListener("resize",te)}},[p,x,U]);let q=C;C==="auto"&&!S.muiSupportAuto&&(q=void 0);const X=h||(p?je(pn(p)).body:void 0),Y=(o=w==null?void 0:w.root)!=null?o:Yh,W=(a=w==null?void 0:w.paper)!=null?a:nl,Q=Bt({elementType:W,externalSlotProps:P({},N,{style:O?N.style:P({},N.style,{opacity:0})}),additionalProps:{elevation:u,ref:_},ownerState:H,className:Se(B.paper,N==null?void 0:N.className)}),ee=Bt({elementType:Y,externalSlotProps:(k==null?void 0:k.root)||{},externalForwardedProps:$,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:X,open:x},ownerState:H,className:Se(B.root,d)}),{slotProps:se}=ee,V=me(ee,Wh);return l.jsx(Y,P({},V,!Si(Y)&&{slotProps:se,disableScrollLock:A},{children:l.jsx(S,P({appear:!0,in:x,onEntering:K,onExited:G,timeout:q},z,{children:l.jsx(W,P({},Q,{children:g}))}))}))});process.env.NODE_ENV!=="production"&&(ol.propTypes={action:$o,anchorEl:lr(i.oneOfType([pt,i.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=pn(e.anchorEl);if(t&&t.nodeType===1){const r=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&r.top===0&&r.left===0&&r.right===0&&r.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 return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(` -`))}return null}),anchorOrigin:i.shape({horizontal:i.oneOfType([i.oneOf(["center","left","right"]),i.number]).isRequired,vertical:i.oneOfType([i.oneOf(["bottom","center","top"]),i.number]).isRequired}),anchorPosition:i.shape({left:i.number.isRequired,top:i.number.isRequired}),anchorReference:i.oneOf(["anchorEl","anchorPosition","none"]),children:i.node,classes:i.object,className:i.string,container:i.oneOfType([pt,i.func]),disableScrollLock:i.bool,elevation:ci,marginThreshold:i.number,onClose:i.func,open:i.bool.isRequired,PaperProps:i.shape({component:kp}),slotProps:i.shape({paper:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object])}),slots:i.shape({paper:i.elementType,root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),transformOrigin:i.shape({horizontal:i.oneOfType([i.oneOf(["center","left","right"]),i.number]).isRequired,vertical:i.oneOfType([i.oneOf(["bottom","center","top"]),i.number]).isRequired}),TransitionComponent:i.elementType,transitionDuration:i.oneOfType([i.oneOf(["auto"]),i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})]),TransitionProps:i.object});const qh=Qi;function Wh(e){return rt("MuiMenu",e)}xt("MuiMenu",["root","paper","list"]);const Xh=["onEntering"],Yh=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Kh={vertical:"top",horizontal:"right"},Jh={vertical:"top",horizontal:"left"},Zh=e=>{const{classes:t}=e;return ft({root:["root"],paper:["paper"],list:["list"]},Wh,t)},Qh=je(qh,{shouldForwardProp:e=>vi(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),eg=je(Zi,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),tg=je(wh,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),el=T.forwardRef(function(t,n){var r,o;const a=mt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:c,className:p,disableAutoFocusItem:f=!1,MenuListProps:m={},onClose:v,open:g,PaperProps:d={},PopoverClasses:h,transitionDuration:u="auto",TransitionProps:{onEntering:b}={},variant:x="selectedMenu",slots:R={},slotProps:w={}}=a,k=me(a.TransitionProps,Xh),y=me(a,Yh),S=Zn(),C=S.direction==="rtl",M=P({},a,{autoFocus:s,disableAutoFocusItem:f,MenuListProps:m,onEntering:b,PaperProps:d,transitionDuration:u,TransitionProps:k,variant:x}),A=Zh(M),z=s&&!f&&g,$=T.useRef(null),N=(Z,j)=>{$.current&&$.current.adjustStyleForScrollbar(Z,S),b&&b(Z,j)},O=Z=>{Z.key==="Tab"&&(Z.preventDefault(),v&&v(Z,"tabKeyDown"))};let _=-1;T.Children.map(c,(Z,j)=>{T.isValidElement(Z)&&(process.env.NODE_ENV!=="production"&&ur.isFragment(Z)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(` -`)),Z.props.disabled||(x==="selectedMenu"&&Z.props.selected||_===-1)&&(_=j))});const U=(r=R.paper)!=null?r:eg,B=(o=w.paper)!=null?o:d,L=Bt({elementType:R.root,externalSlotProps:w.root,ownerState:M,className:[A.root,p]}),J=Bt({elementType:U,externalSlotProps:B,ownerState:M,className:A.paper});return l.jsx(Qh,P({onClose:v,anchorOrigin:{vertical:"bottom",horizontal:C?"right":"left"},transformOrigin:C?Kh:Jh,slots:{paper:U,root:R.root},slotProps:{root:L,paper:J},open:g,ref:n,transitionDuration:u,TransitionProps:P({onEntering:N},k),ownerState:M},y,{classes:h,children:l.jsx(tg,P({onKeyDown:O,actions:$,autoFocus:s&&(_===-1||f),autoFocusItem:z,variant:x},m,{className:Se(A.list,m.className),children:c}))}))});process.env.NODE_ENV!=="production"&&(el.propTypes={anchorEl:i.oneOfType([pt,i.func]),autoFocus:i.bool,children:i.node,classes:i.object,className:i.string,disableAutoFocusItem:i.bool,MenuListProps:i.object,onClose:i.func,open:i.bool.isRequired,PaperProps:i.object,PopoverClasses:i.object,slotProps:i.shape({paper:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object])}),slots:i.shape({paper:i.elementType,root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),transitionDuration:i.oneOfType([i.oneOf(["auto"]),i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})]),TransitionProps:i.object,variant:i.oneOf(["menu","selectedMenu"])});const ng=el;function rg({className:e,commandHandler:t,menuDefinition:n,children:r}){var f;const[o,a]=E.useState(void 0),s=E.useCallback(m=>{m.preventDefault(),a(o===void 0?{mouseX:m.clientX+2,mouseY:m.clientY-6}:void 0)},[o]),c=E.useCallback(()=>{a(void 0)},[]),p=E.useMemo(()=>{if(o!==void 0)return{top:o.mouseY,left:o.mouseX}},[o]);return(((f=n==null?void 0:n.items)==null?void 0:f.length)??0)===0||!r?r:l.jsxs("div",{className:`papi-context-menu-target ${e??""}`,onContextMenu:s,children:[r,l.jsx(ng,{className:`papi-context-menu ${e??""}`,open:o!==void 0,onClose:c,anchorReference:"anchorPosition",anchorPosition:p,children:l.jsx(Jo,{menuDefinition:n,commandHandler:t,onClick:c})})]})}function og(e){return{preserveValue:!0,...e}}const wr=(e,t,n={})=>{const r=E.useRef(t);r.current=t;const o=E.useRef(n);o.current=og(o.current);const[a,s]=E.useState(()=>r.current),[c,p]=E.useState(!0);return E.useEffect(()=>{let f=!0;return p(!!e),(async()=>{if(e){const m=await e();f&&(s(()=>m),p(!1))}})(),()=>{f=!1,o.current.preserveValue||s(()=>r.current)}},[e]),[a,c]},ag=yi(l.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function tl({menuProvider:e,normalMenu:t,fullMenu:n,commandHandler:r,containerRef:o,className:a,ariaLabelPrefix:s,children:c}){const[p,f]=E.useState(!1),[m,v]=E.useState(!1),g=E.useCallback(()=>{p&&f(!1),v(!1)},[p]),d=E.useCallback(k=>{k.stopPropagation(),f(y=>{const S=!y;return S&&k.shiftKey?v(!0):S||v(!1),S})},[]),h=E.useCallback(k=>(g(),r(k)),[r,g]),[u,b]=E.useState({top:1,left:1});E.useEffect(()=>{if(p){const k=o==null?void 0:o.current;if(k){const y=k.getBoundingClientRect(),S=window.scrollY,C=window.scrollX,M=y.top+S+k.clientHeight,A=y.left+C;b({top:M,left:A})}}},[p,o]);const[x]=wr(E.useCallback(async()=>(e==null?void 0:e(!1))??t,[e,t,p]),t),[R]=wr(E.useCallback(async()=>(e==null?void 0:e(!0))??n??x,[e,n,x,p]),n??x),w=m&&R?R:x;return l.jsxs(l.Fragment,{children:[l.jsx(Ee.IconButton,{sx:{paddingTop:0,paddingBottom:0},edge:"start",className:`papi-menuButton ${a??""}`,color:"inherit","aria-label":`${s??""} menu button`,onClick:d,children:c??l.jsx(ag,{})}),l.jsx(Ee.Drawer,{className:`papi-menu-drawer ${a??""}`,anchor:"left",variant:"temporary",open:p,onClose:g,PaperProps:{className:"papi-menu-drawer-paper",style:{top:u.top,left:u.left}},children:w?l.jsx(Ui,{className:a,id:`${s??""} main menu`,commandHandler:h,multiColumnMenu:w}):void 0})]})}function sg({id:e,label:t,isDisabled:n=!1,tooltip:r,isTooltipSuppressed:o=!1,adjustMarginToAlignToEdge:a=!1,size:s="medium",className:c,onClick:p,children:f}){return l.jsx(Ee.IconButton,{id:e,disabled:n,edge:a,size:s,"aria-label":t,title:o?void 0:r??t,className:`papi-icon-button ${c??""}`,onClick:p,children:f})}const yt="scrBook",ig="scrRef",jt="source",lg="details",cg="Scripture Reference",pg="Scripture Book",nl="Type",dg="Details";function ug(e,t){const n=t??!1;return[{accessorFn:r=>`${fe.bookNumberToId(r.start.bookNum)} ${r.start.chapterNum}:${r.start.verseNum}`,id:yt,header:(e==null?void 0:e.scriptureReferenceColumnName)??cg,cell:r=>{const o=r.row.original;return r.row.getIsGrouped()?fe.bookNumberToEnglishName(o.start.bookNum):r.row.groupingColumnId===yt?He.formatScrRef(o.start):void 0},getGroupingValue:r=>r.start.bookNum,sortingFn:(r,o)=>He.compareScrRefs(r.original.start,o.original.start),enableGrouping:!0},{accessorFn:r=>He.formatScrRef(r.start),id:ig,header:void 0,cell:r=>{const o=r.row.original;return r.row.getIsGrouped()?void 0:He.formatScrRef(o.start)},sortingFn:(r,o)=>He.compareScrRefs(r.original.start,o.original.start),enableGrouping:!1},{accessorFn:r=>r.source.displayName,id:jt,header:n?(e==null?void 0:e.typeColumnName)??nl: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:lg,header:(e==null?void 0:e.detailsColumnName)??dg,cell:r=>r.getValue(),enableGrouping:!1}]}function fg({sources:e,showColumnHeaders:t=!1,showSourceColumn:n=!1,scriptureReferenceColumnName:r,scriptureBookGroupName:o,typeColumnName:a,detailsColumnName:s,onRowSelected:c,direction:p="ltr"}){const[f,m]=E.useState([]),[v,g]=E.useState([{id:yt,desc:!1}]),[d,h]=E.useState(()=>e.flatMap(N=>{const O=N.source;return N.data.map(_=>({..._,source:O}))})),[u,b]=E.useState({});E.useEffect(()=>{h(()=>e.flatMap(N=>{const O=N.source;return N.data.map(_=>({..._,source:O}))}))},[e]);const x=E.useMemo(()=>ug({scriptureReferenceColumnName:r,typeColumnName:a,detailsColumnName:s},n),[r,a,s,n]);E.useEffect(()=>{f.includes(jt)?g([{id:jt,desc:!1},{id:yt,desc:!1}]):g([{id:yt,desc:!1}])},[f]);const R=E.useCallback((N,O)=>!O||He.compareScrRefs(N,O)===0?`${He.scrRefToBBBCCCVVV(N)}`:`${He.scrRefToBBBCCCVVV(N)}-${He.scrRefToBBBCCCVVV(O)}`,[]),w=E.useCallback(N=>`${R(N.start,N.end)} ${N.source} ${N.detail}`,[R]),k=Ce.useReactTable({data:d,columns:x,state:{grouping:f,sorting:v,rowSelection:u},onGroupingChange:m,onSortingChange:g,onRowSelectionChange:b,getExpandedRowModel:Ce.getExpandedRowModel(),getGroupedRowModel:Ce.getGroupedRowModel(),getCoreRowModel:Ce.getCoreRowModel(),getSortedRowModel:Ce.getSortedRowModel(),getRowId:w,autoResetExpanded:!1,enableMultiRowSelection:!1,enableSubRowSelection:!1});E.useEffect(()=>{if(c){const N=k.getSelectedRowModel().rowsById,O=Object.keys(N);if(O.length===1){const _=d.find(U=>w(U)===O[0])||void 0;_&&c(_)}}},[u,d,w,c,k]);const y=o??pg,S=a??nl,C=[{label:"No Grouping",value:[]},{label:`Group by ${y}`,value:[yt]},{label:`Group by ${S}`,value:[jt]},{label:`Group by ${y} and ${S}`,value:[yt,jt]},{label:`Group by ${S} and ${y}`,value:[jt,yt]}],M=N=>{m(JSON.parse(N))},A=(N,O)=>{!N.getIsGrouped()&&!N.getIsSelected()&&N.getToggleSelectedHandler()(O)},z=(N,O)=>N.getIsGrouped()?"":F("banded-row",O%2===0?"even":"odd"),$=(N,O,_)=>{if(!((N==null?void 0:N.length)===0||O.depth<_.column.getGroupedIndex())){if(O.getIsGrouped())switch(O.depth){case 1:return"pr-ps-4";default:return}switch(O.depth){case 1:return"pr-ps-8";case 2:return"pr-ps-12";default:return}}};return l.jsxs("div",{className:"pr-twp pr-flex pr-h-full pr-w-full pr-flex-col",children:[!t&&l.jsxs(_n,{value:JSON.stringify(f),onValueChange:N=>{M(N)},children:[l.jsx(Kt,{className:"pr-mb-1 pr-mt-2",children:l.jsx(Mn,{})}),l.jsx(Jt,{position:"item-aligned",children:l.jsx(Ms,{children:C.map(N=>l.jsx(Ke,{value:JSON.stringify(N.value),children:N.label},N.label))})})]}),l.jsxs(Un,{className:"pr-relative pr-flex pr-flex-col pr-overflow-y-auto pr-p-0",children:[t&&l.jsx(Hn,{children:k.getHeaderGroups().map(N=>l.jsx(lt,{children:N.headers.filter(O=>O.column.columnDef.header).map(O=>l.jsx(Zt,{colSpan:O.colSpan,className:"top-0 pr-sticky",children:O.isPlaceholder?void 0:l.jsxs("div",{children:[O.column.getCanGroup()?l.jsx(be,{variant:"ghost",title:`Toggle grouping by ${O.column.columnDef.header}`,onClick:O.column.getToggleGroupingHandler(),type:"button",children:O.column.getIsGrouped()?"🛑":"👊 "}):void 0," ",Ce.flexRender(O.column.columnDef.header,O.getContext())]})},O.id))},N.id))}),l.jsx(Gn,{children:k.getRowModel().rows.map((N,O)=>l.jsx(lt,{"data-state":N.getIsSelected()?"selected":"",className:F(z(N,O)),onClick:_=>A(N,_),children:N.getVisibleCells().map(_=>{if(!(_.getIsPlaceholder()||_.column.columnDef.enableGrouping&&!_.getIsGrouped()&&(_.column.columnDef.id!==jt||!n)))return l.jsx(It,{className:F(_.column.columnDef.id,"pr-p-[1px]",$(f,N,_)),children:(()=>_.getIsGrouped()?l.jsxs(be,{variant:"link",onClick:N.getToggleExpandedHandler(),type:"button",children:[N.getIsExpanded()&&l.jsx(re.ChevronDown,{}),!N.getIsExpanded()&&(p==="ltr"?l.jsx(re.ChevronRight,{}):l.jsx(re.ChevronLeft,{}))," ",Ce.flexRender(_.column.columnDef.cell,_.getContext())," (",N.subRows.length,")"]}):Ce.flexRender(_.column.columnDef.cell,_.getContext()))()},_.id)})},N.id))})]})]})}const mg=xo.cva("pr-text-sm pr-font-medium pr-leading-none peer-disabled:pr-cursor-not-allowed peer-disabled:pr-opacity-70"),Zo=E.forwardRef(({className:e,...t},n)=>l.jsx(ks.Root,{ref:n,className:F(mg(),e),...t}));Zo.displayName=ks.Root.displayName;function rl({id:e,isDisabled:t=!1,hasError:n=!1,isFullWidth:r=!1,helperText:o,label:a,placeholder:s,isRequired:c=!1,className:p,defaultValue:f,value:m,onChange:v,onFocus:g,onBlur:d}){return l.jsxs("div",{className:F("pr-inline-grid pr-items-center pr-gap-1.5",{"pr-w-full":r}),children:[l.jsx(Zo,{htmlFor:e,className:F({"pr-text-red-600":n,"pr-hidden":!a}),children:`${a}${c?"*":""}`}),l.jsx(Vn,{id:e,disabled:t,placeholder:s,required:c,className:F(p,{"pr-border-red-600":n}),defaultValue:f,value:m,onChange:v,onFocus:g,onBlur:d}),l.jsx("p",{className:F({"pr-hidden":!o}),children:o})]})}function hg({onSearch:e,placeholder:t,isFullWidth:n}){const[r,o]=E.useState(""),a=s=>{o(s),e(s)};return l.jsx(rl,{isFullWidth:n,className:"search-bar-input",placeholder:t,value:r,onChange:s=>a(s.target.value)})}function gg({id:e,isDisabled:t=!1,orientation:n="horizontal",min:r=0,max:o=100,step:a=1,showMarks:s=!1,defaultValue:c,value:p,valueLabelDisplay:f="off",className:m,onChange:v,onChangeCommitted:g}){return l.jsx(Ee.Slider,{id:e,disabled:t,orientation:n,min:r,max:o,step:a,marks:s,defaultValue:c,value:p,valueLabelDisplay:f,className:`papi-slider ${n} ${m??""}`,onChange:v,onChangeCommitted:g})}function bg({autoHideDuration:e=void 0,id:t,isOpen:n=!1,className:r,onClose:o,anchorOrigin:a={vertical:"bottom",horizontal:"left"},ContentProps:s,children:c}){const p={action:(s==null?void 0:s.action)||c,message:s==null?void 0:s.message,className:r};return l.jsx(Ee.Snackbar,{autoHideDuration:e??void 0,open:n,onClose:o,anchorOrigin:a,id:t,ContentProps:p})}const cn=E.forwardRef(({className:e,...t},n)=>l.jsx(re.LoaderCircle,{size:35,className:F("pr-animate-spin",e),...t,ref:n}));cn.displayName="Spinner";function vg({id:e,isChecked:t,isDisabled:n=!1,hasError:r=!1,className:o,onChange:a}){return l.jsx(Ee.Switch,{id:e,checked:t,disabled:n,className:`papi-switch ${r?"error":""} ${o??""}`,onChange:a})}function yg({menuProvider:e,commandHandler:t,className:n,id:r,children:o}){const a=E.useRef(void 0);return l.jsx("div",{ref:a,style:{position:"relative"},children:l.jsx(Ee.AppBar,{position:"static",id:r,children:l.jsxs(Ee.Toolbar,{className:`papi-toolbar ${n??""}`,variant:"dense",children:[e?l.jsx(tl,{commandHandler:t,containerRef:a,menuProvider:e}):void 0,o?l.jsx("div",{className:"papi-toolbar-children",children:o}):void 0]})})})}const wg=De.Root,ol=E.forwardRef(({className:e,...t},n)=>l.jsx(De.List,{ref:n,className:F("pr-inline-flex pr-h-10 pr-items-center pr-justify-center pr-rounded-md pr-bg-muted pr-p-1 pr-text-muted-foreground",e),...t}));ol.displayName=De.List.displayName;const al=E.forwardRef(({className:e,...t},n)=>l.jsx(De.Trigger,{ref:n,className:F("pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-sm pr-px-3 pr-py-1.5 pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-all hover:pr-text-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50 data-[state=active]:pr-bg-background data-[state=active]:pr-text-foreground data-[state=active]:pr-shadow-sm",e),...t}));al.displayName=De.Trigger.displayName;const sl=E.forwardRef(({className:e,...t},n)=>l.jsx(De.Content,{ref:n,className:F("pr-mt-2 pr-ring-offset-background focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2",e),...t}));sl.displayName=De.Content.displayName;const il=E.forwardRef(({className:e,...t},n)=>l.jsx(De.Root,{orientation:"vertical",ref:n,className:F("pr-flex pr-gap-1 pr-rounded-md pr-text-muted-foreground",e),...t}));il.displayName=De.List.displayName;const ll=E.forwardRef(({className:e,...t},n)=>l.jsx(De.List,{ref:n,className:F("pr-flex-fit pr-mlk-items-center pr-w-[124px] pr-justify-center pr-rounded-md pr-bg-muted pr-p-1 pr-text-muted-foreground",e),...t}));ll.displayName=De.List.displayName;const xg=E.forwardRef(({className:e,...t},n)=>l.jsx(De.Trigger,{ref:n,...t,className:F("overflow-clip pr-inline-flex pr-w-[116px] pr-cursor-pointer pr-items-center pr-justify-center pr-break-words pr-rounded-sm pr-border-0 pr-bg-muted pr-px-3 pr-py-1.5 pr-text-sm pr-font-medium pr-text-inherit pr-ring-offset-background pr-transition-all hover:pr-text-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50 data-[state=active]:pr-bg-background data-[state=active]:pr-text-foreground data-[state=active]:pr-shadow-sm",e)})),cl=E.forwardRef(({className:e,...t},n)=>l.jsx(De.Content,{ref:n,className:F("mt-2 pr-ms-5 pr-flex-grow pr-text-foreground pr-ring-offset-background focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2",e),...t}));cl.displayName=De.Content.displayName;function kg({isInstalling:e,handleClick:t,buttonText:n,className:r,...o}){return l.jsx(be,{className:F("pr-h-8 pr-rounded-md pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700",{"pr-cursor-not-allowed pr-bg-blue-700":e,"pr-bg-blue-600":!e,"pr-bg-white pr-text-blue-600 hover:pr-text-white":!n,"pr-w-20":n},r),onClick:t,...o,children:e?l.jsx(cn,{size:15}):l.jsxs(l.Fragment,{children:[l.jsx(re.Download,{size:25,className:F("pr-h-4 pr-w-4",{"pr-mr-1":n})}),n]})})}function Eg({isEnabling:e,handleClick:t,className:n,...r}){return l.jsx(be,{className:F("pr-h-8 pr-rounded-md pr-bg-blue-600 pr-px-4 pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700",{"pr-cursor-not-allowed pr-bg-blue-700":e},n),onClick:t,...r,children:e?l.jsxs(l.Fragment,{children:[l.jsx(cn,{size:15,className:"pr-mr-1 pr-text-white"}),"Enabling..."]}):"Enable"})}function Ng({isDisabling:e,handleClick:t,className:n,...r}){return l.jsx(be,{className:F("pr-h-8 pr-rounded-md pr-bg-gray-300 pr-text-black pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-gray-400",{"pr-cursor-not-allowed pr-bg-gray-400":e},n),onClick:t,...r,children:e?l.jsxs(l.Fragment,{children:[l.jsx(cn,{size:15,className:"pr-mr-1 pr-text-black"}),"Disabling..."]}):"Disable"})}function Tg({isUpdating:e,handleClick:t,className:n,...r}){return l.jsx(be,{className:F("pr-h-8 pr-rounded-md pr-bg-blue-600 pr-px-4 pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700 hover:pr-text-white",{"pr-cursor-not-allowed pr-bg-blue-700":e},n),onClick:t,...r,children:e?l.jsxs(l.Fragment,{children:[l.jsx(cn,{size:15,className:"pr-mr-1 pr-text-white"}),"Updating..."]}):"Update"})}function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),hs={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Cg=["style","script"],Og=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,jg=/mailto:/i,Rg=/\n{2,}$/,pl=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,Pg=/^ *> ?/gm,$g=/^ {2,}\n/,_g=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,dl=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,ul=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Mg=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,Ig=/^(?:\n *)*\n/,Dg=/\r\n?/g,Ag=/^\[\^([^\]]+)](:.*)\n/,Bg=/^\[\^([^\]]+)]/,Lg=/\f/g,Vg=/^\s*?\[(x|\s)\]/,fl=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ml=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,hl=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,yo=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,Fg=/&([a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)",ea="(?:[*+-])";function vl(e){return"( *)("+(e===1?Qo:ea)+") +"}const yl=vl(1),wl=vl(2);function xl(e){return new RegExp("^"+(e===1?yl:wl))}const gb=xl(1),bb=xl(2);function kl(e){return new RegExp("^"+(e===1?yl:wl)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Qo:ea)+" )[^\\n]*)*(\\n|$)","gm")}const El=kl(1),Nl=kl(2);function Tl(e){const t=e===1?Qo:ea;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Sl=Tl(1),Cl=Tl(2);function bs(e,t){const n=t===1,r=n?Sl:Cl,o=n?El:Nl,a=n?gb:bb;return{t(s,c,p){const f=hb.exec(p);return f&&(c.o||!c._&&!c.u)?r.exec(s=f[1]+s):null},i:ae.HIGH,l(s,c,p){const f=n?+s[2]:void 0,m=s[0].replace(Rg,` +`))}return null}),anchorOrigin:i.shape({horizontal:i.oneOfType([i.oneOf(["center","left","right"]),i.number]).isRequired,vertical:i.oneOfType([i.oneOf(["bottom","center","top"]),i.number]).isRequired}),anchorPosition:i.shape({left:i.number.isRequired,top:i.number.isRequired}),anchorReference:i.oneOf(["anchorEl","anchorPosition","none"]),children:i.node,classes:i.object,className:i.string,container:i.oneOfType([pt,i.func]),disableScrollLock:i.bool,elevation:mi,marginThreshold:i.number,onClose:i.func,open:i.bool.isRequired,PaperProps:i.shape({component:Sp}),slotProps:i.shape({paper:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object])}),slots:i.shape({paper:i.elementType,root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),transformOrigin:i.shape({horizontal:i.oneOfType([i.oneOf(["center","left","right"]),i.number]).isRequired,vertical:i.oneOfType([i.oneOf(["bottom","center","top"]),i.number]).isRequired}),TransitionComponent:i.elementType,transitionDuration:i.oneOfType([i.oneOf(["auto"]),i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})]),TransitionProps:i.object});const Kh=ol;function Jh(e){return nt("MuiMenu",e)}xt("MuiMenu",["root","paper","list"]);const Zh=["onEntering"],Qh=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],eg={vertical:"top",horizontal:"right"},tg={vertical:"top",horizontal:"left"},rg=e=>{const{classes:t}=e;return ft({root:["root"],paper:["paper"],list:["list"]},Jh,t)},ng=Oe(Kh,{shouldForwardProp:e=>Ei(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),og=Oe(nl,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),ag=Oe(Nh,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),al=T.forwardRef(function(t,r){var n,o;const a=mt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:c,className:p,disableAutoFocusItem:f=!1,MenuListProps:m={},onClose:v,open:g,PaperProps:d={},PopoverClasses:h,transitionDuration:u="auto",TransitionProps:{onEntering:b}={},variant:x="selectedMenu",slots:R={},slotProps:w={}}=a,k=me(a.TransitionProps,Zh),y=me(a,Qh),S=Jr(),C=S.direction==="rtl",M=P({},a,{autoFocus:s,disableAutoFocusItem:f,MenuListProps:m,onEntering:b,PaperProps:d,transitionDuration:u,TransitionProps:k,variant:x}),A=rg(M),z=s&&!f&&g,$=T.useRef(null),N=(Z,O)=>{$.current&&$.current.adjustStyleForScrollbar(Z,S),b&&b(Z,O)},j=Z=>{Z.key==="Tab"&&(Z.preventDefault(),v&&v(Z,"tabKeyDown"))};let _=-1;T.Children.map(c,(Z,O)=>{T.isValidElement(Z)&&(process.env.NODE_ENV!=="production"&&un.isFragment(Z)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(` +`)),Z.props.disabled||(x==="selectedMenu"&&Z.props.selected||_===-1)&&(_=O))});const H=(n=R.paper)!=null?n:og,B=(o=w.paper)!=null?o:d,L=Bt({elementType:R.root,externalSlotProps:w.root,ownerState:M,className:[A.root,p]}),J=Bt({elementType:H,externalSlotProps:B,ownerState:M,className:A.paper});return l.jsx(ng,P({onClose:v,anchorOrigin:{vertical:"bottom",horizontal:C?"right":"left"},transformOrigin:C?eg:tg,slots:{paper:H,root:R.root},slotProps:{root:L,paper:J},open:g,ref:r,transitionDuration:u,TransitionProps:P({onEntering:N},k),ownerState:M},y,{classes:h,children:l.jsx(ag,P({onKeyDown:j,actions:$,autoFocus:s&&(_===-1||f),autoFocusItem:z,variant:x},m,{className:Se(A.list,m.className),children:c}))}))});process.env.NODE_ENV!=="production"&&(al.propTypes={anchorEl:i.oneOfType([pt,i.func]),autoFocus:i.bool,children:i.node,classes:i.object,className:i.string,disableAutoFocusItem:i.bool,MenuListProps:i.object,onClose:i.func,open:i.bool.isRequired,PaperProps:i.object,PopoverClasses:i.object,slotProps:i.shape({paper:i.oneOfType([i.func,i.object]),root:i.oneOfType([i.func,i.object])}),slots:i.shape({paper:i.elementType,root:i.elementType}),sx:i.oneOfType([i.arrayOf(i.oneOfType([i.func,i.object,i.bool])),i.func,i.object]),transitionDuration:i.oneOfType([i.oneOf(["auto"]),i.number,i.shape({appear:i.number,enter:i.number,exit:i.number})]),TransitionProps:i.object,variant:i.oneOf(["menu","selectedMenu"])});const sg=al;function ig({className:e,commandHandler:t,menuDefinition:r,children:n}){var f;const[o,a]=E.useState(void 0),s=E.useCallback(m=>{m.preventDefault(),a(o===void 0?{mouseX:m.clientX+2,mouseY:m.clientY-6}:void 0)},[o]),c=E.useCallback(()=>{a(void 0)},[]),p=E.useMemo(()=>{if(o!==void 0)return{top:o.mouseY,left:o.mouseX}},[o]);return(((f=r==null?void 0:r.items)==null?void 0:f.length)??0)===0||!n?n:l.jsxs("div",{className:`papi-context-menu-target ${e??""}`,onContextMenu:s,children:[n,l.jsx(sg,{className:`papi-context-menu ${e??""}`,open:o!==void 0,onClose:c,anchorReference:"anchorPosition",anchorPosition:p,children:l.jsx(Jo,{menuDefinition:r,commandHandler:t,onClick:c})})]})}function lg(e){return{preserveValue:!0,...e}}const wn=(e,t,r={})=>{const n=E.useRef(t);n.current=t;const o=E.useRef(r);o.current=lg(o.current);const[a,s]=E.useState(()=>n.current),[c,p]=E.useState(!0);return E.useEffect(()=>{let f=!0;return p(!!e),(async()=>{if(e){const m=await e();f&&(s(()=>m),p(!1))}})(),()=>{f=!1,o.current.preserveValue||s(()=>n.current)}},[e]),[a,c]},cg=Ni(l.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");function sl({menuProvider:e,normalMenu:t,fullMenu:r,commandHandler:n,containerRef:o,className:a,ariaLabelPrefix:s,children:c}){const[p,f]=E.useState(!1),[m,v]=E.useState(!1),g=E.useCallback(()=>{p&&f(!1),v(!1)},[p]),d=E.useCallback(k=>{k.stopPropagation(),f(y=>{const S=!y;return S&&k.shiftKey?v(!0):S||v(!1),S})},[]),h=E.useCallback(k=>(g(),n(k)),[n,g]),[u,b]=E.useState({top:1,left:1});E.useEffect(()=>{if(p){const k=o==null?void 0:o.current;if(k){const y=k.getBoundingClientRect(),S=window.scrollY,C=window.scrollX,M=y.top+S+k.clientHeight,A=y.left+C;b({top:M,left:A})}}},[p,o]);const[x]=wn(E.useCallback(async()=>(e==null?void 0:e(!1))??t,[e,t,p]),t),[R]=wn(E.useCallback(async()=>(e==null?void 0:e(!0))??r??x,[e,r,x,p]),r??x),w=m&&R?R:x;return l.jsxs(l.Fragment,{children:[l.jsx(Ee.IconButton,{sx:{paddingTop:0,paddingBottom:0},edge:"start",className:`papi-menuButton ${a??""}`,color:"inherit","aria-label":`${s??""} menu button`,onClick:d,children:c??l.jsx(cg,{})}),l.jsx(Ee.Drawer,{className:`papi-menu-drawer ${a??""}`,anchor:"left",variant:"temporary",open:p,onClose:g,PaperProps:{className:"papi-menu-drawer-paper",style:{top:u.top,left:u.left}},children:w?l.jsx(Xi,{className:a,id:`${s??""} main menu`,commandHandler:h,multiColumnMenu:w}):void 0})]})}function pg({id:e,label:t,isDisabled:r=!1,tooltip:n,isTooltipSuppressed:o=!1,adjustMarginToAlignToEdge:a=!1,size:s="medium",className:c,onClick:p,children:f}){return l.jsx(Ee.IconButton,{id:e,disabled:r,edge:a,size:s,"aria-label":t,title:o?void 0:n??t,className:`papi-icon-button ${c??""}`,onClick:p,children:f})}const yt="scrBook",dg="scrRef",Ot="source",ug="details",fg="Scripture Reference",mg="Scripture Book",il="Type",hg="Details";function gg(e,t){const r=t??!1;return[{accessorFn:n=>`${fe.bookNumberToId(n.start.bookNum)} ${n.start.chapterNum}:${n.start.verseNum}`,id:yt,header:(e==null?void 0:e.scriptureReferenceColumnName)??fg,cell:n=>{const o=n.row.original;return n.row.getIsGrouped()?fe.bookNumberToEnglishName(o.start.bookNum):n.row.groupingColumnId===yt?Ue.formatScrRef(o.start):void 0},getGroupingValue:n=>n.start.bookNum,sortingFn:(n,o)=>Ue.compareScrRefs(n.original.start,o.original.start),enableGrouping:!0},{accessorFn:n=>Ue.formatScrRef(n.start),id:dg,header:void 0,cell:n=>{const o=n.row.original;return n.row.getIsGrouped()?void 0:Ue.formatScrRef(o.start)},sortingFn:(n,o)=>Ue.compareScrRefs(n.original.start,o.original.start),enableGrouping:!1},{accessorFn:n=>n.source.displayName,id:Ot,header:r?(e==null?void 0:e.typeColumnName)??il:void 0,cell:n=>r||n.row.getIsGrouped()?n.getValue():void 0,getGroupingValue:n=>n.source.id,sortingFn:(n,o)=>n.original.source.displayName.localeCompare(o.original.source.displayName),enableGrouping:!0},{accessorFn:n=>n.detail,id:ug,header:(e==null?void 0:e.detailsColumnName)??hg,cell:n=>n.getValue(),enableGrouping:!1}]}function bg({sources:e,showColumnHeaders:t=!1,showSourceColumn:r=!1,scriptureReferenceColumnName:n,scriptureBookGroupName:o,typeColumnName:a,detailsColumnName:s,onRowSelected:c,direction:p="ltr"}){const[f,m]=E.useState([]),[v,g]=E.useState([{id:yt,desc:!1}]),[d,h]=E.useState(()=>e.flatMap(N=>{const j=N.source;return N.data.map(_=>({..._,source:j}))})),[u,b]=E.useState({});E.useEffect(()=>{h(()=>e.flatMap(N=>{const j=N.source;return N.data.map(_=>({..._,source:j}))}))},[e]);const x=E.useMemo(()=>gg({scriptureReferenceColumnName:n,typeColumnName:a,detailsColumnName:s},r),[n,a,s,r]);E.useEffect(()=>{f.includes(Ot)?g([{id:Ot,desc:!1},{id:yt,desc:!1}]):g([{id:yt,desc:!1}])},[f]);const R=E.useCallback((N,j)=>!j||Ue.compareScrRefs(N,j)===0?`${Ue.scrRefToBBBCCCVVV(N)}`:`${Ue.scrRefToBBBCCCVVV(N)}-${Ue.scrRefToBBBCCCVVV(j)}`,[]),w=E.useCallback(N=>`${R(N.start,N.end)} ${N.source} ${N.detail}`,[R]),k=Ce.useReactTable({data:d,columns:x,state:{grouping:f,sorting:v,rowSelection:u},onGroupingChange:m,onSortingChange:g,onRowSelectionChange:b,getExpandedRowModel:Ce.getExpandedRowModel(),getGroupedRowModel:Ce.getGroupedRowModel(),getCoreRowModel:Ce.getCoreRowModel(),getSortedRowModel:Ce.getSortedRowModel(),getRowId:w,autoResetExpanded:!1,enableMultiRowSelection:!1,enableSubRowSelection:!1});E.useEffect(()=>{if(c){const N=k.getSelectedRowModel().rowsById,j=Object.keys(N);if(j.length===1){const _=d.find(H=>w(H)===j[0])||void 0;_&&c(_)}}},[u,d,w,c,k]);const y=o??mg,S=a??il,C=[{label:"No Grouping",value:[]},{label:`Group by ${y}`,value:[yt]},{label:`Group by ${S}`,value:[Ot]},{label:`Group by ${y} and ${S}`,value:[yt,Ot]},{label:`Group by ${S} and ${y}`,value:[Ot,yt]}],M=N=>{m(JSON.parse(N))},A=(N,j)=>{!N.getIsGrouped()&&!N.getIsSelected()&&N.getToggleSelectedHandler()(j)},z=(N,j)=>N.getIsGrouped()?"":F("banded-row",j%2===0?"even":"odd"),$=(N,j,_)=>{if(!((N==null?void 0:N.length)===0||j.depth<_.column.getGroupedIndex())){if(j.getIsGrouped())switch(j.depth){case 1:return"pr-ps-4";default:return}switch(j.depth){case 1:return"pr-ps-8";case 2:return"pr-ps-12";default:return}}};return l.jsxs("div",{className:"pr-twp pr-flex pr-h-full pr-w-full pr-flex-col",children:[!t&&l.jsxs(_r,{value:JSON.stringify(f),onValueChange:N=>{M(N)},children:[l.jsx(Kt,{className:"pr-mb-1 pr-mt-2",children:l.jsx(Mr,{})}),l.jsx(Jt,{position:"item-aligned",children:l.jsx(Ls,{children:C.map(N=>l.jsx(Ke,{value:JSON.stringify(N.value),children:N.label},N.label))})})]}),l.jsxs(zr,{className:"pr-relative pr-flex pr-flex-col pr-overflow-y-auto pr-p-0",children:[t&&l.jsx(Hr,{children:k.getHeaderGroups().map(N=>l.jsx(lt,{children:N.headers.filter(j=>j.column.columnDef.header).map(j=>l.jsx(Zt,{colSpan:j.colSpan,className:"top-0 pr-sticky",children:j.isPlaceholder?void 0:l.jsxs("div",{children:[j.column.getCanGroup()?l.jsx(be,{variant:"ghost",title:`Toggle grouping by ${j.column.columnDef.header}`,onClick:j.column.getToggleGroupingHandler(),type:"button",children:j.column.getIsGrouped()?"🛑":"👊 "}):void 0," ",Ce.flexRender(j.column.columnDef.header,j.getContext())]})},j.id))},N.id))}),l.jsx(Ur,{children:k.getRowModel().rows.map((N,j)=>l.jsx(lt,{"data-state":N.getIsSelected()?"selected":"",className:F(z(N,j)),onClick:_=>A(N,_),children:N.getVisibleCells().map(_=>{if(!(_.getIsPlaceholder()||_.column.columnDef.enableGrouping&&!_.getIsGrouped()&&(_.column.columnDef.id!==Ot||!r)))return l.jsx(It,{className:F(_.column.columnDef.id,"pr-p-[1px]",$(f,N,_)),children:(()=>_.getIsGrouped()?l.jsxs(be,{variant:"link",onClick:N.getToggleExpandedHandler(),type:"button",children:[N.getIsExpanded()&&l.jsx(ne.ChevronDown,{}),!N.getIsExpanded()&&(p==="ltr"?l.jsx(ne.ChevronRight,{}):l.jsx(ne.ChevronLeft,{}))," ",Ce.flexRender(_.column.columnDef.cell,_.getContext())," (",N.subRows.length,")"]}):Ce.flexRender(_.column.columnDef.cell,_.getContext()))()},_.id)})},N.id))})]})]})}function ll({onSearch:e,placeholder:t,isFullWidth:r}){const[n,o]=E.useState(""),a=s=>{o(s),e(s)};return l.jsx(ar,{className:F("pr-flex pr-h-10 pr-rounded-md pr-border pr-border-input pr-bg-background pr-px-3 pr-py-2 pr-text-sm pr-ring-offset-background file:pr-border-0 file:pr-bg-transparent file:pr-text-sm file:pr-font-medium placeholder:pr-text-muted-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-[color:hsl(240,5%,64.9%)] focus-visible:pr-ring-offset-2 disabled:pr-cursor-not-allowed disabled:pr-opacity-50",{"pr-w-full":r}),placeholder:t,value:n,onChange:s=>a(s.target.value)})}function vg({id:e,isDisabled:t=!1,orientation:r="horizontal",min:n=0,max:o=100,step:a=1,showMarks:s=!1,defaultValue:c,value:p,valueLabelDisplay:f="off",className:m,onChange:v,onChangeCommitted:g}){return l.jsx(Ee.Slider,{id:e,disabled:t,orientation:r,min:n,max:o,step:a,marks:s,defaultValue:c,value:p,valueLabelDisplay:f,className:`papi-slider ${r} ${m??""}`,onChange:v,onChangeCommitted:g})}function yg({autoHideDuration:e=void 0,id:t,isOpen:r=!1,className:n,onClose:o,anchorOrigin:a={vertical:"bottom",horizontal:"left"},ContentProps:s,children:c}){const p={action:(s==null?void 0:s.action)||c,message:s==null?void 0:s.message,className:n};return l.jsx(Ee.Snackbar,{autoHideDuration:e??void 0,open:r,onClose:o,anchorOrigin:a,id:t,ContentProps:p})}const Zo=E.forwardRef(({className:e,...t},r)=>l.jsx(De.Root,{orientation:"vertical",ref:r,className:F("pr-flex pr-gap-1 pr-rounded-md pr-text-muted-foreground",e),...t}));Zo.displayName=De.List.displayName;const Qo=E.forwardRef(({className:e,...t},r)=>l.jsx(De.List,{ref:r,className:F("pr-flex-fit pr-mlk-items-center pr-w-[124px] pr-justify-center pr-rounded-md pr-bg-muted pr-p-1 pr-text-muted-foreground",e),...t}));Qo.displayName=De.List.displayName;const cl=E.forwardRef(({className:e,...t},r)=>l.jsx(De.Trigger,{ref:r,...t,className:F("overflow-clip pr-inline-flex pr-w-[116px] pr-cursor-pointer pr-items-center pr-justify-center pr-break-words pr-rounded-sm pr-border-0 pr-bg-muted pr-px-3 pr-py-1.5 pr-text-sm pr-font-medium pr-text-inherit pr-ring-offset-background pr-transition-all hover:pr-text-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50 data-[state=active]:pr-bg-background data-[state=active]:pr-text-foreground data-[state=active]:pr-shadow-sm",e)})),ea=E.forwardRef(({className:e,...t},r)=>l.jsx(De.Content,{ref:r,className:F("mt-2 pr-ms-5 pr-flex-grow pr-text-foreground pr-ring-offset-background focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2",e),...t}));ea.displayName=De.Content.displayName;function wg({tabList:e,onSearch:t,searchPlaceholder:r,headerTitle:n,isSearchBarFullWidth:o=!1}){return l.jsxs("div",{className:"pr-twp",children:[l.jsxs("div",{className:"pr-space-y-2 pr-pb-2",children:[n?l.jsx("h1",{children:n}):"",l.jsx(ll,{isFullWidth:o,onSearch:t,placeholder:r})]}),l.jsxs(Zo,{children:[l.jsx(Qo,{children:e.map(a=>l.jsx(cl,{value:a.value,children:a.value},a.key))}),e.map(a=>l.jsx(ea,{value:a.value,children:a.content},a.key))]})]})}const ta=E.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},o)=>l.jsx(Ss.Root,{ref:o,decorative:r,orientation:t,className:F("pr-twp pr-shrink-0 pr-bg-border",t==="horizontal"?"pr-h-[1px] pr-w-full":"pr-h-full pr-w-[1px]",e),...n}));ta.displayName=Ss.Root.displayName;function xg({children:e}){return l.jsx("div",{className:"pr-twp pr-grid",children:e})}function kg({primary:e,secondary:t,children:r,isLoading:n=!1,loadingMessage:o}){return l.jsxs("div",{className:"pr-flex pr-items-center pr-justify-between pr-space-x-4 pr-py-2",children:[l.jsxs("div",{children:[l.jsx("p",{className:"pr-text-sm pr-font-medium pr-leading-none",children:e}),l.jsx("p",{className:"pr-text-sm pr-text-muted-foreground",children:t})]}),n?l.jsx("p",{className:"pr-text-sm pr-text-muted-foreground",children:o}):l.jsx("div",{children:r})]})}function Eg({primary:e,secondary:t,includeSeparator:r=!1}){return l.jsxs("div",{className:"pr-space-y-4 pr-py-2",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"pr-text-lg pr-font-medium",children:e}),l.jsx("p",{className:"pr-text-sm pr-text-muted-foreground",children:t})]}),r?l.jsx(ta,{}):""]})}const cr=E.forwardRef(({className:e,...t},r)=>l.jsx(ne.LoaderCircle,{size:35,className:F("pr-animate-spin",e),...t,ref:r}));cr.displayName="Spinner";function Ng({id:e,isChecked:t,isDisabled:r=!1,hasError:n=!1,className:o,onChange:a}){return l.jsx(Ee.Switch,{id:e,checked:t,disabled:r,className:`papi-switch ${n?"error":""} ${o??""}`,onChange:a})}const Tg=xo.cva("pr-text-sm pr-font-medium pr-leading-none peer-disabled:pr-cursor-not-allowed peer-disabled:pr-opacity-70"),ra=E.forwardRef(({className:e,...t},r)=>l.jsx(Cs.Root,{ref:r,className:F(Tg(),e),...t}));ra.displayName=Cs.Root.displayName;function Sg({id:e,isDisabled:t=!1,hasError:r=!1,isFullWidth:n=!1,helperText:o,label:a,placeholder:s,isRequired:c=!1,className:p,defaultValue:f,value:m,onChange:v,onFocus:g,onBlur:d}){return l.jsxs("div",{className:F("pr-inline-grid pr-items-center pr-gap-1.5",{"pr-w-full":n}),children:[l.jsx(ra,{htmlFor:e,className:F({"pr-text-red-600":r,"pr-hidden":!a}),children:`${a}${c?"*":""}`}),l.jsx(ar,{id:e,disabled:t,placeholder:s,required:c,className:F(p,{"pr-border-red-600":r}),defaultValue:f,value:m,onChange:v,onFocus:g,onBlur:d}),l.jsx("p",{className:F({"pr-hidden":!o}),children:o})]})}function Cg({menuProvider:e,commandHandler:t,className:r,id:n,children:o}){const a=E.useRef(void 0);return l.jsx("div",{ref:a,style:{position:"relative"},children:l.jsx(Ee.AppBar,{position:"static",id:n,children:l.jsxs(Ee.Toolbar,{className:`papi-toolbar ${r??""}`,variant:"dense",children:[e?l.jsx(sl,{commandHandler:t,containerRef:a,menuProvider:e}):void 0,o?l.jsx("div",{className:"papi-toolbar-children",children:o}):void 0]})})})}const jg=De.Root,pl=E.forwardRef(({className:e,...t},r)=>l.jsx(De.List,{ref:r,className:F("pr-inline-flex pr-h-10 pr-items-center pr-justify-center pr-rounded-md pr-bg-muted pr-p-1 pr-text-muted-foreground",e),...t}));pl.displayName=De.List.displayName;const dl=E.forwardRef(({className:e,...t},r)=>l.jsx(De.Trigger,{ref:r,className:F("pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-sm pr-px-3 pr-py-1.5 pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-all hover:pr-text-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50 data-[state=active]:pr-bg-background data-[state=active]:pr-text-foreground data-[state=active]:pr-shadow-sm",e),...t}));dl.displayName=De.Trigger.displayName;const ul=E.forwardRef(({className:e,...t},r)=>l.jsx(De.Content,{ref:r,className:F("pr-mt-2 pr-ring-offset-background focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2",e),...t}));ul.displayName=De.Content.displayName;function Og({isInstalling:e,handleClick:t,buttonText:r,className:n,...o}){return l.jsx(be,{className:F("pr-h-8 pr-rounded-md pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700",{"pr-cursor-not-allowed pr-bg-blue-700":e,"pr-bg-blue-600":!e,"pr-bg-white pr-text-blue-600 hover:pr-text-white":!r,"pr-w-20":r},n),onClick:t,...o,children:e?l.jsx(cr,{size:15}):l.jsxs(l.Fragment,{children:[l.jsx(ne.Download,{size:25,className:F("pr-h-4 pr-w-4",{"pr-mr-1":r})}),r]})})}function Rg({isEnabling:e,handleClick:t,className:r,...n}){return l.jsx(be,{className:F("pr-h-8 pr-rounded-md pr-bg-blue-600 pr-px-4 pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700",{"pr-cursor-not-allowed pr-bg-blue-700":e},r),onClick:t,...n,children:e?l.jsxs(l.Fragment,{children:[l.jsx(cr,{size:15,className:"pr-mr-1 pr-text-white"}),"Enabling..."]}):"Enable"})}function Pg({isDisabling:e,handleClick:t,className:r,...n}){return l.jsx(be,{className:F("pr-h-8 pr-rounded-md pr-bg-gray-300 pr-text-black pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-gray-400",{"pr-cursor-not-allowed pr-bg-gray-400":e},r),onClick:t,...n,children:e?l.jsxs(l.Fragment,{children:[l.jsx(cr,{size:15,className:"pr-mr-1 pr-text-black"}),"Disabling..."]}):"Disable"})}function $g({isUpdating:e,handleClick:t,className:r,...n}){return l.jsx(be,{className:F("pr-h-8 pr-rounded-md pr-bg-blue-600 pr-px-4 pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700 hover:pr-text-white",{"pr-cursor-not-allowed pr-bg-blue-700":e},r),onClick:t,...n,children:e?l.jsxs(l.Fragment,{children:[l.jsx(cr,{size:15,className:"pr-mr-1 pr-text-white"}),"Updating..."]}):"Update"})}function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),ys={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Mg=["style","script"],Ig=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|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^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,rb=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,nb=/^\[([^\]]*)\] ?\[([^\]]*)\]/,ob=/(\[|\])/g,ab=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,sb=/\t/g,ib=/^ *\| */,lb=/(^ *\||\| *$)/g,cb=/ *$/,pb=/^ *:-+: *$/,db=/^ *:-+ *$/,ub=/^ *-+: *$/,fb=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,mb=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,hb=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,gb=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,bb=/^\\([^0-9A-Za-z\s])/,vb=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,yb=/^\n+/,wb=/^([ \t]*)/,xb=/\\([^\\])/g,ws=/ *\n+$/,kb=/(?:^|\n)( *)$/,na="(?:\\d+\\.)",oa="(?:[*+-])";function xl(e){return"( *)("+(e===1?na:oa)+") +"}const kl=xl(1),El=xl(2);function Nl(e){return new RegExp("^"+(e===1?kl:El))}const Eb=Nl(1),Nb=Nl(2);function Tl(e){return new RegExp("^"+(e===1?kl:El)+"[^\\n]*(?:\\n(?!\\1"+(e===1?na:oa)+" )[^\\n]*)*(\\n|$)","gm")}const Sl=Tl(1),Cl=Tl(2);function jl(e){const t=e===1?na:oa;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Ol=jl(1),Rl=jl(2);function xs(e,t){const r=t===1,n=r?Ol:Rl,o=r?Sl:Cl,a=r?Eb:Nb;return{t(s,c,p){const f=kb.exec(p);return f&&(c.o||!c._&&!c.u)?n.exec(s=f[1]+s):null},i:ae.HIGH,l(s,c,p){const f=r?+s[2]:void 0,m=s[0].replace(Ag,` `).match(o);let v=!1;return{p:m.map(function(g,d){const h=a.exec(g)[0].length,u=new RegExp("^ {1,"+h+"}","gm"),b=g.replace(u,"").replace(a,""),x=d===m.length-1,R=b.indexOf(` -`)!==-1||x&&v;v=R;const w=p._,k=p.o;let y;p.o=!0,R?(p._=!1,y=b.replace(gs,` +`)!==-1||x&&v;v=R;const w=p._,k=p.o;let y;p.o=!0,R?(p._=!1,y=b.replace(ws,` -`)):(p._=!0,y=b.replace(gs,""));const S=c(y,p);return p._=w,p.o=k,S}),m:n,g:f}},h:(s,c,p)=>e(s.m?"ol":"ul",{key:p.k,start:s.g},s.p.map(function(f,m){return e("li",{key:m},c(f,p))}))}}const vb=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,yb=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Ol=[pl,dl,ul,fl,hl,ml,gl,bl,El,Sl,Nl,Cl],wb=[...Ol,/^[^\n]+(?: \n|\n{2,})/,yo,wo];function xb(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function kb(e){return ab.test(e)?"right":rb.test(e)?"center":ob.test(e)?"left":null}function vs(e,t,n){const r=n.$;n.$=!0;const o=t(e.trim(),n);n.$=r;let a=[[]];return o.forEach(function(s,c){s.type==="tableSeparator"?c!==0&&c!==o.length-1&&a.push([]):(s.type!=="text"||o[c+1]!=null&&o[c+1].type!=="tableSeparator"||(s.v=s.v.replace(nb,"")),a[a.length-1].push(s))}),a}function Eb(e,t,n){n._=!0;const r=vs(e[1],t,n),o=e[2].replace(tb,"").split("|").map(kb),a=function(s,c,p){return s.trim().split(` -`).map(function(f){return vs(f,c,p)})}(e[3],t,n);return n._=!1,{S:o,A:a,L:r,type:"table"}}function ys(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function bt(e){return function(t,n){return n._?e.exec(t):null}}function vt(e){return function(t,n){return n._||n.u?e.exec(t):null}}function it(e){return function(t,n){return n._||n.u?null:e.exec(t)}}function xn(e){return function(t){return e.exec(t)}}function Nb(e,t,n){if(t._||t.u||n&&!n.endsWith(` -`))return null;let r="";e.split(` -`).every(a=>!Ol.some(s=>s.test(a))&&(r+=a+` -`,a.trim()));const o=r.trimEnd();return o==""?null:[r,o]}function Wt(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function ws(e){return e.replace(mb,"$1")}function dr(e,t,n){const r=n._||!1,o=n.u||!1;n._=!0,n.u=!0;const a=e(t,n);return n._=r,n.u=o,a}function Tb(e,t,n){const r=n._||!1,o=n.u||!1;n._=!1,n.u=!0;const a=e(t,n);return n._=r,n.u=o,a}function Sb(e,t,n){return n._=!1,e(t,n)}const Qr=(e,t,n)=>({v:dr(t,e[1],n)});function eo(){return{}}function to(){return null}function Cb(...e){return e.filter(Boolean).join(" ")}function no(e,t,n){let r=e;const o=t.split(".");for(;o.length&&(r=r[o[0]],r!==void 0);)o.shift();return r||n}var ae;function Ob(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||xb,t.namedCodesToUnicode=t.namedCodesToUnicode?$t({},hs,t.namedCodesToUnicode):hs;const n=t.createElement||T.createElement;function r(d,h,...u){const b=no(t.overrides,`${d}.props`,{});return n(function(x,R){const w=no(R,x);return w?typeof w=="function"||typeof w=="object"&&"render"in w?w:no(R,`${x}.component`,x):x}(d,t.overrides),$t({},h,b,{className:Cb(h==null?void 0:h.className,b.className)||void 0}),...u)}function o(d){let h=!1;t.forceInline?h=!0:t.forceBlock||(h=Zg.test(d)===!1);const u=m(f(h?d:`${d.trimEnd().replace(ub,"")} +`)):(p._=!0,y=b.replace(ws,""));const S=c(y,p);return p._=w,p.o=k,S}),m:r,g:f}},h:(s,c,p)=>e(s.m?"ol":"ul",{key:p.k,start:s.g},s.p.map(function(f,m){return e("li",{key:m},c(f,p))}))}}const Tb=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Sb=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Pl=[fl,ml,hl,gl,vl,bl,yl,wl,Sl,Ol,Cl,Rl],Cb=[...Pl,/^[^\n]+(?: \n|\n{2,})/,yo,wo];function jb(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Ob(e){return ub.test(e)?"right":pb.test(e)?"center":db.test(e)?"left":null}function ks(e,t,r){const n=r.$;r.$=!0;const o=t(e.trim(),r);r.$=n;let a=[[]];return o.forEach(function(s,c){s.type==="tableSeparator"?c!==0&&c!==o.length-1&&a.push([]):(s.type!=="text"||o[c+1]!=null&&o[c+1].type!=="tableSeparator"||(s.v=s.v.replace(cb,"")),a[a.length-1].push(s))}),a}function Rb(e,t,r){r._=!0;const n=ks(e[1],t,r),o=e[2].replace(lb,"").split("|").map(Ob),a=function(s,c,p){return s.trim().split(` +`).map(function(f){return ks(f,c,p)})}(e[3],t,r);return r._=!1,{S:o,A:a,L:n,type:"table"}}function Es(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function bt(e){return function(t,r){return r._?e.exec(t):null}}function vt(e){return function(t,r){return r._||r.u?e.exec(t):null}}function it(e){return function(t,r){return r._||r.u?null:e.exec(t)}}function xr(e){return function(t){return e.exec(t)}}function Pb(e,t,r){if(t._||t.u||r&&!r.endsWith(` +`))return null;let n="";e.split(` +`).every(a=>!Pl.some(s=>s.test(a))&&(n+=a+` +`,a.trim()));const o=n.trimEnd();return o==""?null:[n,o]}function Wt(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function Ns(e){return e.replace(xb,"$1")}function dn(e,t,r){const n=r._||!1,o=r.u||!1;r._=!0,r.u=!0;const a=e(t,r);return r._=n,r.u=o,a}function $b(e,t,r){const n=r._||!1,o=r.u||!1;r._=!1,r.u=!0;const a=e(t,r);return r._=n,r.u=o,a}function _b(e,t,r){return r._=!1,e(t,r)}const Qn=(e,t,r)=>({v:dn(t,e[1],r)});function eo(){return{}}function to(){return null}function Mb(...e){return e.filter(Boolean).join(" ")}function ro(e,t,r){let n=e;const o=t.split(".");for(;o.length&&(n=n[o[0]],n!==void 0);)o.shift();return n||r}var ae;function Ib(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||jb,t.namedCodesToUnicode=t.namedCodesToUnicode?$t({},ys,t.namedCodesToUnicode):ys;const r=t.createElement||T.createElement;function n(d,h,...u){const b=ro(t.overrides,`${d}.props`,{});return r(function(x,R){const w=ro(R,x);return w?typeof w=="function"||typeof w=="object"&&"render"in w?w:ro(R,`${x}.component`,x):x}(d,t.overrides),$t({},h,b,{className:Mb(h==null?void 0:h.className,b.className)||void 0}),...u)}function o(d){let h=!1;t.forceInline?h=!0:t.forceBlock||(h=ab.test(d)===!1);const u=m(f(h?d:`${d.trimEnd().replace(yb,"")} -`,{_:h}));for(;typeof u[u.length-1]=="string"&&!u[u.length-1].trim();)u.pop();if(t.wrapper===null)return u;const b=t.wrapper||(h?"span":"div");let x;if(u.length>1||t.forceWrapper)x=u;else{if(u.length===1)return x=u[0],typeof x=="string"?r("span",{key:"outer"},x):x;x=null}return T.createElement(b,{key:"outer"},x)}function a(d){const h=d.match(Og);return h?h.reduce(function(u,b,x){const R=b.indexOf("=");if(R!==-1){const w=function(C){return C.indexOf("-")!==-1&&C.match(zg)===null&&(C=C.replace(Wg,function(M,A){return A.toUpperCase()})),C}(b.slice(0,R)).trim(),k=function(C){const M=C[0];return(M==='"'||M==="'")&&C.length>=2&&C[C.length-1]===M?C.slice(1,-1):C}(b.slice(R+1).trim()),y=ms[w]||w,S=u[y]=function(C,M){return C==="style"?M.split(/;\s?/).reduce(function(A,z){const $=z.slice(0,z.indexOf(":"));return A[$.replace(/(-[a-z])/g,N=>N[1].toUpperCase())]=z.slice($.length+1).trim(),A},{}):C==="href"?Wt(M):(M.match(Ug)&&(M=M.slice(1,M.length-1)),M==="true"||M!=="false"&&M)}(w,k);typeof S=="string"&&(yo.test(S)||wo.test(S))&&(u[y]=T.cloneElement(o(S.trim()),{key:x}))}else b!=="style"&&(u[ms[b]||b]=!0);return u},{}):null}const s=[],c={},p={blockQuote:{t:it(pl),i:ae.HIGH,l:(d,h,u)=>({v:h(d[0].replace(Pg,""),u)}),h:(d,h,u)=>r("blockquote",{key:u.k},h(d.v,u))},breakLine:{t:xn($g),i:ae.HIGH,l:eo,h:(d,h,u)=>r("br",{key:u.k})},breakThematic:{t:it(_g),i:ae.HIGH,l:eo,h:(d,h,u)=>r("hr",{key:u.k})},codeBlock:{t:it(ul),i:ae.MAX,l:d=>({v:d[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(d,h,u)=>r("pre",{key:u.k},r("code",$t({},d.O,{className:d.M?`lang-${d.M}`:""}),d.v))},codeFenced:{t:it(dl),i:ae.MAX,l:d=>({O:a(d[3]||""),v:d[4],M:d[2]||void 0,type:"codeBlock"})},codeInline:{t:vt(Mg),i:ae.LOW,l:d=>({v:d[2]}),h:(d,h,u)=>r("code",{key:u.k},d.v)},footnote:{t:it(Ag),i:ae.MAX,l:d=>(s.push({I:d[2],j:d[1]}),{}),h:to},footnoteReference:{t:bt(Bg),i:ae.HIGH,l:d=>({v:d[1],B:`#${t.slugify(d[1])}`}),h:(d,h,u)=>r("a",{key:u.k,href:Wt(d.B)},r("sup",{key:u.k},d.v))},gfmTask:{t:bt(Vg),i:ae.HIGH,l:d=>({R:d[1].toLowerCase()==="x"}),h:(d,h,u)=>r("input",{checked:d.R,key:u.k,readOnly:!0,type:"checkbox"})},heading:{t:it(t.enforceAtxHeadings?ml:fl),i:ae.HIGH,l:(d,h,u)=>({v:dr(h,d[2],u),T:t.slugify(d[2]),C:d[1].length}),h:(d,h,u)=>r(`h${d.C}`,{id:d.T,key:u.k},h(d.v,u))},headingSetext:{t:it(hl),i:ae.MAX,l:(d,h,u)=>({v:dr(h,d[1],u),C:d[2]==="="?1:2,type:"heading"})},htmlComment:{t:xn(gl),i:ae.HIGH,l:()=>({}),h:to},image:{t:vt(yb),i:ae.HIGH,l:d=>({D:d[1],B:ws(d[2]),F:d[3]}),h:(d,h,u)=>r("img",{key:u.k,alt:d.D||void 0,title:d.F||void 0,src:Wt(d.B)})},link:{t:bt(vb),i:ae.LOW,l:(d,h,u)=>({v:Tb(h,d[1],u),B:ws(d[2]),F:d[3]}),h:(d,h,u)=>r("a",{key:u.k,href:Wt(d.B),title:d.F},h(d.v,u))},linkAngleBraceStyleDetector:{t:bt(qg),i:ae.MAX,l:d=>({v:[{v:d[1],type:"text"}],B:d[1],type:"link"})},linkBareUrlDetector:{t:(d,h)=>h.N?null:bt(Hg)(d,h),i:ae.MAX,l:d=>({v:[{v:d[1],type:"text"}],B:d[1],F:void 0,type:"link"})},linkMailtoDetector:{t:bt(Gg),i:ae.MAX,l(d){let h=d[1],u=d[1];return jg.test(u)||(u="mailto:"+u),{v:[{v:h.replace("mailto:",""),type:"text"}],B:u,type:"link"}}},orderedList:bs(r,1),unorderedList:bs(r,2),newlineCoalescer:{t:it(Ig),i:ae.LOW,l:eo,h:()=>` -`},paragraph:{t:Nb,i:ae.LOW,l:Qr,h:(d,h,u)=>r("p",{key:u.k},h(d.v,u))},ref:{t:bt(Xg),i:ae.MAX,l:d=>(c[d[1]]={B:d[2],F:d[4]},{}),h:to},refImage:{t:vt(Yg),i:ae.MAX,l:d=>({D:d[1]||void 0,P:d[2]}),h:(d,h,u)=>r("img",{key:u.k,alt:d.D,src:Wt(c[d.P].B),title:c[d.P].F})},refLink:{t:bt(Kg),i:ae.MAX,l:(d,h,u)=>({v:h(d[1],u),Z:h(d[0].replace(Jg,"\\$1"),u),P:d[2]}),h:(d,h,u)=>c[d.P]?r("a",{key:u.k,href:Wt(c[d.P].B),title:c[d.P].F},h(d.v,u)):r("span",{key:u.k},h(d.Z,u))},table:{t:it(bl),i:ae.HIGH,l:Eb,h:(d,h,u)=>r("table",{key:u.k},r("thead",null,r("tr",null,d.L.map(function(b,x){return r("th",{key:x,style:ys(d,x)},h(b,u))}))),r("tbody",null,d.A.map(function(b,x){return r("tr",{key:x},b.map(function(R,w){return r("td",{key:w,style:ys(d,w)},h(R,u))}))})))},tableSeparator:{t:function(d,h){return h.$?(h._=!0,eb.exec(d)):null},i:ae.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:xn(db),i:ae.MIN,l:d=>({v:d[0].replace(Fg,(h,u)=>t.namedCodesToUnicode[u]?t.namedCodesToUnicode[u]:h)}),h:d=>d.v},textBolded:{t:vt(sb),i:ae.MED,l:(d,h,u)=>({v:h(d[2],u)}),h:(d,h,u)=>r("strong",{key:u.k},h(d.v,u))},textEmphasized:{t:vt(ib),i:ae.LOW,l:(d,h,u)=>({v:h(d[2],u)}),h:(d,h,u)=>r("em",{key:u.k},h(d.v,u))},textEscaped:{t:vt(pb),i:ae.HIGH,l:d=>({v:d[1],type:"text"})},textMarked:{t:vt(lb),i:ae.LOW,l:Qr,h:(d,h,u)=>r("mark",{key:u.k},h(d.v,u))},textStrikethroughed:{t:vt(cb),i:ae.LOW,l:Qr,h:(d,h,u)=>r("del",{key:u.k},h(d.v,u))}};t.disableParsingRawHTML!==!0&&(p.htmlBlock={t:xn(yo),i:ae.HIGH,l(d,h,u){const[,b]=d[3].match(fb),x=new RegExp(`^${b}`,"gm"),R=d[3].replace(x,""),w=(k=R,wb.some(M=>M.test(k))?Sb:dr);var k;const y=d[1].toLowerCase(),S=Cg.indexOf(y)!==-1;u.N=u.N||y==="a";const C=S?d[3]:w(h,R,u);return u.N=!1,{O:a(d[2]),v:C,G:S,H:S?y:d[1]}},h:(d,h,u)=>r(d.H,$t({key:u.k},d.O),d.G?d.v:h(d.v,u))},p.htmlSelfClosing={t:xn(wo),i:ae.HIGH,l:d=>({O:a(d[2]||""),H:d[1]}),h:(d,h,u)=>r(d.H,$t({},d.O,{key:u.k}))});const f=function(d){let h=Object.keys(d);function u(b,x){let R=[],w="";for(;b;){let k=0;for(;k{let{children:t,options:n}=e,r=function(o,a){if(o==null)return{};var s,c,p={},f=Object.keys(o);for(c=0;c=0||(p[s]=o[s]);return p}(e,Sg);return T.cloneElement(Ob(t,n),r)};function Rb({id:e,markdown:t}){return l.jsx("div",{id:e,className:"pr-prose",children:l.jsx(jb,{children:t})})}const jl=E.forwardRef((e,t)=>l.jsxs(be,{ref:t,className:"pr-rounded-md pr-border pr-border-dashed pr-border-gray-400 pr-bg-white pr-px-4 pr-py-2 pr-text-black pr-transition pr-duration-300 pr-ease-in-out hover:pr-border-blue-600 hover:pr-bg-white hover:pr-text-blue-600",...e,children:[l.jsx(re.Filter,{size:16,className:"pr-mr-2 pr-h-4 pr-w-4 pr-text-gray-700 hover:pr-text-blue-600"}),"Filter",l.jsx(re.ChevronDown,{size:16,className:"pr-ml-2 pr-h-4 pr-w-4 pr-text-gray-700 hover:pr-text-blue-600"})]}));var Rl=(e=>(e[e.Check=0]="Check",e[e.Radio=1]="Radio",e))(Rl||{});function Pb({id:e,groups:t}){return l.jsx("div",{id:e,children:l.jsxs(xr,{children:[l.jsx(To,{asChild:!0,children:l.jsx(jl,{})}),l.jsx(Fn,{children:t.map(n=>l.jsxs("div",{children:[l.jsx(sn,{children:n.label}),l.jsx(js,{children:n.items.map(r=>l.jsx("div",{children:r.itemType===0?l.jsx(kr,{onClick:r.onClick,children:r.label}):l.jsx(Co,{onClick:r.onClick,value:r.label,children:r.label})},r.label))}),l.jsx(zn,{})]},n.label))})]})})}function $b({id:e,message:t}){return l.jsx("div",{id:e,className:"pr-mb-20 pr-mt-20 pr-flex pr-items-center pr-justify-center",children:l.jsx("div",{className:"pr-w-3/4 pr-rounded-lg pr-bg-gray-100 pr-p-8 pr-text-center",children:l.jsx("p",{className:"pr-text-lg pr-text-gray-800",children:t})})})}function _b({id:e,category:t,downloads:n,languages:r,moreInfoUrl:o}){const a=new He.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(Object.values(n).reduce((c,p)=>c+p,0)),s=()=>{window.scrollTo(0,document.body.scrollHeight)};return l.jsxs("div",{id:e,className:"pr-flex pr-flex-wrap pr-items-start pr-space-x-4 pr-border-b pr-border-t pr-bg-white pr-pb-4 pr-pt-4",children:[l.jsxs("div",{className:"pr-flex pr-flex-col pr-items-center",children:[l.jsx("div",{className:"pr-flex pr-items-center pr-rounded-md pr-bg-gray-100 pr-px-2 pr-py-1",children:l.jsx("span",{className:"pr-text-xs pr-font-semibold pr-text-gray-700",children:t})}),l.jsx("span",{className:"pr-text-xs pr-text-gray-500",children:"CATEGORY"})]}),l.jsx("div",{className:"pr-mx-2 pr-h-10 pr-border-l pr-border-gray-300"}),l.jsxs("div",{className:"pr-flex pr-flex-col pr-items-center",children:[l.jsxs("div",{className:"pr-flex pr-items-center pr-rounded-md pr-bg-gray-100 pr-px-2 pr-py-1",children:[l.jsx(re.User,{className:"pr-mr-1 pr-h-4 pr-w-4"}),l.jsx("span",{className:"pr-text-xs pr-font-semibold pr-text-gray-700",children:a})]}),l.jsx("span",{className:"pr-text-xs pr-text-gray-500",children:"USERS"})]}),l.jsx("div",{className:"pr-mx-2 pr-h-10 pr-border-l pr-border-gray-300"}),l.jsxs("div",{className:"pr-flex pr-flex-col pr-items-center",children:[l.jsx("div",{className:"pr-flex pr-items-center",children:r.slice(0,3).map(c=>l.jsx("span",{className:"pr-ml-1 pr-rounded-md pr-bg-gray-100 pr-px-2 pr-py-1 pr-text-xs pr-font-semibold pr-text-gray-700",children:c.toUpperCase()},c))}),r.length>3&&l.jsxs("button",{type:"button",onClick:()=>s(),className:"pr-text-xs pr-text-gray-500 pr-underline",children:["+",r.length-3," more languages"]})]}),l.jsx("div",{className:"pr-mx-2 pr-h-10 pr-border-l pr-border-gray-300"}),l.jsxs("div",{className:"pr-ml-auto pr-flex pr-flex-col pr-space-y-2",children:[l.jsxs("a",{href:o,className:"pr-flex pr-items-center pr-text-xs pr-font-semibold pr-text-gray-500 pr-underline",children:["Website",l.jsx(re.Link,{className:"pr-ml-1 pr-inline pr-h-4 pr-w-4"})]}),l.jsxs("a",{href:"https://placeholder.com",className:"pr-flex pr-items-center pr-text-xs pr-font-semibold pr-text-gray-500 pr-underline",children:["Support",l.jsx(re.CircleHelp,{className:"pr-ml-1 pr-inline pr-h-4 pr-w-4"})]})]})]})}function Pl({id:e,versionHistory:t}){const[n,r]=E.useState(!1),o=new Date;function a(c){const p=new Date(c),f=new Date(o.getTime()-p.getTime()),m=f.getUTCFullYear()-1970,v=f.getUTCMonth(),g=f.getUTCDate()-1;let d="";return m>0?d=`${m.toString()} year${m===1?"":"s"} ago`:v>0?d=`${v.toString()} month${v===1?"":"s"} ago`:g===0?d="today":d=`${g.toString()} day${g===1?"":"s"} ago`,d}const s=Object.entries(t).sort((c,p)=>p[0].localeCompare(c[0]));return l.jsxs("div",{id:e,children:[l.jsx("h3",{className:"pr-text-md pr-font-semibold",children:"What`s New"}),l.jsx("ul",{className:"pr-list-disc pr-pl-5 pr-pr-4 pr-text-xs pr-text-gray-600",children:(n?s:s.slice(0,5)).map(c=>l.jsxs("div",{className:"pr-mt-3 pr-flex pr-justify-between",children:[l.jsx("div",{className:"pr-text-gray-600",children:l.jsx("li",{className:"pr-prose pr-text-xs",children:l.jsx("span",{children:c[1].description})})}),l.jsxs("div",{className:"pr-justify-end pr-text-right",children:[l.jsxs("div",{children:["Version ",c[0]]}),l.jsx("div",{children:a(c[1].date)})]})]},c[0]))}),s.length>5&&l.jsx("button",{type:"button",onClick:()=>r(!n),className:"pr-text-xs pr-text-gray-500 pr-underline",children:n?"Show Less Version History":"Show All Version History"})]})}function Mb({id:e,publisherDisplayName:t,fileSize:n,locales:r,versionHistory:o}){const a=E.useMemo(()=>He.formatBytes(n),[n]),c=(p=>{const f=new Intl.DisplayNames(navigator.language,{type:"language"});return p.map(m=>f.of(m))})(r);return l.jsx("div",{id:e,className:"pr-border-t pr-pb-4 pr-pt-4",children:l.jsxs("div",{className:"pr-md:flex-row pr-md:space-x-8 pr-flex pr-flex-col pr-space-x-0",children:[l.jsx(Pl,{versionHistory:o}),l.jsx("div",{className:"pr-md:border-t-0 pr-md:border-l pr-md-h-auto pr-md-ml-8 pr-mt-4 pr-border-t pr-border-gray-300"}),l.jsxs("div",{className:"pr-md:mt-0 pr-mt-4 pr-flex-1 pr-space-y-3",children:[l.jsx("h2",{className:"pr-text-md pr-font-semibold",children:"Information"}),l.jsxs("div",{className:"pr-flex pr-items-start pr-justify-between pr-pr-4 pr-text-xs pr-text-gray-600",children:[l.jsxs("p",{className:"pr-flex pr-flex-col pr-justify-start",children:[l.jsx("span",{className:"pr-mb-2",children:"Publisher"}),l.jsx("span",{className:"pr-font-semibold",children:t}),l.jsx("span",{className:"pr-mb-2 pr-mt-4",children:"Size"}),l.jsx("span",{className:"pr-font-semibold",children:a})]}),l.jsx("div",{className:"pr-flex pr-w-3/4 pr-items-center pr-justify-between pr-text-xs pr-text-gray-600",children:l.jsxs("p",{className:"pr-flex pr-flex-col pr-justify-start",children:[l.jsx("span",{className:"pr-mb-2",children:"Languages"}),l.jsx("span",{className:"pr-font-semibold",children:c.join(", ")})]})})]})]})]})})}const Ib=(e,t)=>{E.useEffect(()=>{if(!e)return()=>{};const n=e(t);return()=>{n()}},[e,t])},ro=()=>!1,Db=(e,t)=>{const[n]=wr(E.useCallback(async()=>{if(!e)return ro;const r=await Promise.resolve(e(t));return async()=>r()},[t,e]),ro,{preserveValue:!1});E.useEffect(()=>()=>{n!==ro&&n()},[n])},$l=E.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("pr-rounded-lg pr-border pr-bg-card pr-text-card-foreground pr-shadow-sm",e),...t}));$l.displayName="Card";const _l=E.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("pr-flex pr-flex-col pr-space-y-1.5 pr-p-6",e),...t}));_l.displayName="CardHeader";const Ml=E.forwardRef(({className:e,...t},n)=>l.jsx("h3",{ref:n,className:F("pr-text-2xl pr-font-semibold pr-leading-none pr-tracking-tight",e),...t,children:t.children}));Ml.displayName="CardTitle";const Il=E.forwardRef(({className:e,...t},n)=>l.jsx("p",{ref:n,className:F("pr-text-sm pr-text-muted-foreground",e),...t}));Il.displayName="CardDescription";const Dl=E.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("pr-p-6 pr-pt-0",e),...t}));Dl.displayName="CardContent";const Al=E.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("pr-flex pr-items-center pr-p-6 pr-pt-0",e),...t}));Al.displayName="CardFooter";const Ab=xo.cva("pr-relative pr-w-full pr-rounded-lg pr-border pr-p-4 [&>svg~*]:pr-pl-7 [&>svg+div]:pr-translate-y-[-3px] [&>svg]:pr-absolute [&>svg]:pr-left-4 [&>svg]:pr-top-4 [&>svg]:pr-text-foreground",{variants:{variant:{default:"pr-bg-background pr-text-foreground",destructive:"pr-border-destructive/50 pr-text-destructive dark:pr-border-destructive [&>svg]:pr-text-destructive"}},defaultVariants:{variant:"default"}}),Bl=E.forwardRef(({className:e,variant:t,...n},r)=>l.jsx("div",{ref:r,role:"alert",className:F(Ab({variant:t}),e),...n}));Bl.displayName="Alert";const Ll=E.forwardRef(({className:e,...t},n)=>l.jsxs("h5",{ref:n,className:F("pr-mb-1 pr-font-medium pr-leading-none pr-tracking-tight",e),...t,children:[t.children," "]}));Ll.displayName="AlertTitle";const Vl=E.forwardRef(({className:e,...t},n)=>l.jsx("div",{ref:n,className:F("pr-text-sm [&_p]:pr-leading-relaxed",e),...t}));Vl.displayName="AlertDescription";const Fl=E.forwardRef(({className:e,...t},n)=>l.jsxs(En.Root,{ref:n,className:F("pr-relative pr-flex pr-w-full pr-touch-none pr-select-none pr-items-center",e),...t,children:[l.jsx(En.Track,{className:"pr-relative pr-h-2 pr-w-full pr-grow pr-overflow-hidden pr-rounded-full pr-bg-secondary",children:l.jsx(En.Range,{className:"pr-absolute pr-h-full pr-bg-primary"})}),l.jsx(En.Thumb,{className:"pr-block pr-h-5 pr-w-5 pr-rounded-full pr-border-2 pr-border-primary pr-bg-background pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50"})]}));Fl.displayName=En.Root.displayName;const zl=E.forwardRef(({className:e,...t},n)=>l.jsx(ao.Root,{className:F("pr-peer pr-inline-flex pr-h-6 pr-w-11 pr-shrink-0 pr-cursor-pointer pr-items-center pr-rounded-full pr-border-2 pr-border-transparent pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 focus-visible:pr-ring-offset-background disabled:pr-cursor-not-allowed disabled:pr-opacity-50 data-[state=checked]:pr-bg-primary data-[state=unchecked]:pr-bg-input",e),...t,ref:n,children:l.jsx(ao.Thumb,{className:F("pr-pointer-events-none pr-block pr-h-5 pr-w-5 pr-rounded-full pr-bg-background pr-shadow-lg pr-ring-0 pr-transition-transform data-[state=checked]:pr-translate-x-5 data-[state=unchecked]:pr-translate-x-0")})}));zl.displayName=ao.Root.displayName;exports.Alert=Bl;exports.AlertDescription=Vl;exports.AlertTitle=Ll;exports.BookChapterControl=Bc;exports.Button=be;exports.Card=$l;exports.CardContent=Dl;exports.CardDescription=Il;exports.CardFooter=Al;exports.CardHeader=_l;exports.CardTitle=Ml;exports.ChapterRangeSelector=ap;exports.Checkbox=Ws;exports.Checklist=sp;exports.ComboBox=so;exports.ContextMenu=rg;exports.DataTable=Ls;exports.DisableButton=Ng;exports.DropdownMenu=xr;exports.DropdownMenuCheckboxItem=kr;exports.DropdownMenuContent=Fn;exports.DropdownMenuGroup=js;exports.DropdownMenuItem=So;exports.DropdownMenuItemType=Rl;exports.DropdownMenuLabel=sn;exports.DropdownMenuPortal=Tc;exports.DropdownMenuRadioGroup=Cc;exports.DropdownMenuRadioItem=Co;exports.DropdownMenuSeparator=zn;exports.DropdownMenuShortcut=$s;exports.DropdownMenuSub=Sc;exports.DropdownMenuSubContent=Ps;exports.DropdownMenuSubTrigger=Rs;exports.DropdownMenuTrigger=To;exports.EnableButton=Eg;exports.FilterButton=jl;exports.FilterDropdown=Pb;exports.Footer=Mb;exports.GridMenu=Ui;exports.HamburgerMenuButton=tl;exports.INVENTORY_STRING_KEYS=Uc;exports.IconButton=sg;exports.Input=Vn;exports.InstallButton=kg;exports.Inventory=qc;exports.Label=Zo;exports.LabelPosition=Rt;exports.MarkdownRenderer=Rb;exports.MenuItem=Ko;exports.MoreInfo=_b;exports.NoExtensionsFound=$b;exports.ScriptureResultsViewer=fg;exports.SearchBar=hg;exports.Select=_n;exports.SelectContent=Jt;exports.SelectGroup=Ms;exports.SelectItem=Ke;exports.SelectLabel=Is;exports.SelectScrollDownButton=jo;exports.SelectScrollUpButton=Oo;exports.SelectSeparator=Ds;exports.SelectTrigger=Kt;exports.SelectValue=Mn;exports.ShadCnSlider=Fl;exports.ShadCnSwitch=zl;exports.Slider=gg;exports.Snackbar=bg;exports.Spinner=cn;exports.Switch=vg;exports.Table=Un;exports.TableBody=Gn;exports.TableCaption=Bs;exports.TableCell=It;exports.TableFooter=As;exports.TableHead=Zt;exports.TableHeader=Hn;exports.TableRow=lt;exports.Tabs=wg;exports.TabsContent=sl;exports.TabsList=ol;exports.TabsTrigger=al;exports.TextField=rl;exports.Toolbar=yg;exports.UpdateButton=Tg;exports.VersionHistory=Pl;exports.VerticalTabs=il;exports.VerticalTabsContent=cl;exports.VerticalTabsList=ll;exports.VerticalTabsTrigger=xg;exports.buttonVariants=_s;exports.getSortingIcon=Er;exports.inventoryCountColumn=Xc;exports.inventoryItemColumn=Wc;exports.inventoryStatusColumn=Yc;exports.useEvent=Ib;exports.useEventAsync=Db;exports.usePromise=wr;function Bb(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)}Bb(`.papi-icon-button { - border: 0; - border-radius: 3em; - cursor: pointer; - display: inline-block; -} - -.papi-icon-button.primary { - background-color: #1ea7fd; - color: white; -} - -.papi-icon-button.secondary { - background-color: transparent; - color: #333; -} - -.papi-icon-button.paratext { - background-color: darkgreen; - color: greenyellow; -} - -.papi-icon-button.paratext.bright { - background-color: greenyellow; - color: darkgreen; -} -.papi-snackbar { - font-family: Arial, Helvetica, sans-serif; -} - -.papi-snackbar.primary { - background: #1ea7fd; - color: white; -} - -.papi-snackbar.external { - background-color: lightsteelblue; - border-color: white; - border-style: dotted; - padding: 2%; - width: 30%; -} - -.papi-snackbar.secondary { - background: transparent; - color: #333; -} - -.papi-snackbar.alert { - background: lightcoral; -} - -.papi-snackbar.paratext { - background: darkgreen; - color: greenyellow; -} - -.papi-snackbar.bright { - background: greenyellow; - color: darkgreen; -} -.check-item { - flex-wrap: wrap; - vertical-align: middle; -} - -.papi-checkbox { - display: block; -} -.papi-checkbox { - background-color: transparent; -} - -.papi-checkbox.error { - color: #f00; -} - -.papi-checkbox.error:hover { - background-color: rgba(255, 0, 0, 0.2); -} - -.papi-checkbox.paratext { - color: greenyellow; -} - -.papi-checkbox-label.paratext { - color: darkgreen; -} - -.papi-checkbox.paratext:hover { - background-color: rgba(0, 100, 0, 0.3); -} - -.papi-checkbox.paratext.bright { - color: darkgreen; -} - -.papi-checkbox-label.paratext.bright { - background-color: greenyellow; -} - -.papi-checkbox.paratext.bright:hover { - background-color: rgba(173, 255, 47, 0.3); -} - -.papi-checkbox.below, -.papi-checkbox.above { - text-align: center; -} -.papi-multi-column-menu { - background-color: rgb(222, 222, 222); - display: flex; - flex-direction: column; - padding-left: 3px; - padding-right: 3px; -} - -.papi-menu-column { - font-size: 11pt; - font-weight: 600; - padding-bottom: 2px; -} - -.papi-menu-column ul { - padding-top: 0; -} - -.papi-menu-column-header { - background-color: rgb(181, 181, 181); - padding-left: 24px; - margin-top: 0; - margin-bottom: 0; -} - -.papi-multi-column-menu.paratext { - background-color: rgb(76, 106, 76); - color: rgb(214, 255, 152); -} - -.papi-multi-column-menu.paratext.bright { - color: rgb(76, 106, 76); - background-color: rgb(214, 255, 152); -} -/* +`,{_:h}));for(;typeof u[u.length-1]=="string"&&!u[u.length-1].trim();)u.pop();if(t.wrapper===null)return u;const b=t.wrapper||(h?"span":"div");let x;if(u.length>1||t.forceWrapper)x=u;else{if(u.length===1)return x=u[0],typeof x=="string"?n("span",{key:"outer"},x):x;x=null}return T.createElement(b,{key:"outer"},x)}function a(d){const h=d.match(Ig);return h?h.reduce(function(u,b,x){const R=b.indexOf("=");if(R!==-1){const w=function(C){return C.indexOf("-")!==-1&&C.match(Yg)===null&&(C=C.replace(eb,function(M,A){return A.toUpperCase()})),C}(b.slice(0,R)).trim(),k=function(C){const M=C[0];return(M==='"'||M==="'")&&C.length>=2&&C[C.length-1]===M?C.slice(1,-1):C}(b.slice(R+1).trim()),y=vs[w]||w,S=u[y]=function(C,M){return C==="style"?M.split(/;\s?/).reduce(function(A,z){const $=z.slice(0,z.indexOf(":"));return A[$.replace(/(-[a-z])/g,N=>N[1].toUpperCase())]=z.slice($.length+1).trim(),A},{}):C==="href"?Wt(M):(M.match(Kg)&&(M=M.slice(1,M.length-1)),M==="true"||M!=="false"&&M)}(w,k);typeof S=="string"&&(yo.test(S)||wo.test(S))&&(u[y]=T.cloneElement(o(S.trim()),{key:x}))}else b!=="style"&&(u[vs[b]||b]=!0);return u},{}):null}const s=[],c={},p={blockQuote:{t:it(fl),i:ae.HIGH,l:(d,h,u)=>({v:h(d[0].replace(Bg,""),u)}),h:(d,h,u)=>n("blockquote",{key:u.k},h(d.v,u))},breakLine:{t:xr(Lg),i:ae.HIGH,l:eo,h:(d,h,u)=>n("br",{key:u.k})},breakThematic:{t:it(Fg),i:ae.HIGH,l:eo,h:(d,h,u)=>n("hr",{key:u.k})},codeBlock:{t:it(hl),i:ae.MAX,l:d=>({v:d[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(d,h,u)=>n("pre",{key:u.k},n("code",$t({},d.O,{className:d.M?`lang-${d.M}`:""}),d.v))},codeFenced:{t:it(ml),i:ae.MAX,l:d=>({O:a(d[3]||""),v:d[4],M:d[2]||void 0,type:"codeBlock"})},codeInline:{t:vt(Vg),i:ae.LOW,l:d=>({v:d[2]}),h:(d,h,u)=>n("code",{key:u.k},d.v)},footnote:{t:it(Ug),i:ae.MAX,l:d=>(s.push({I:d[2],j:d[1]}),{}),h:to},footnoteReference:{t:bt(Gg),i:ae.HIGH,l:d=>({v:d[1],B:`#${t.slugify(d[1])}`}),h:(d,h,u)=>n("a",{key:u.k,href:Wt(d.B)},n("sup",{key:u.k},d.v))},gfmTask:{t:bt(Wg),i:ae.HIGH,l:d=>({R:d[1].toLowerCase()==="x"}),h:(d,h,u)=>n("input",{checked:d.R,key:u.k,readOnly:!0,type:"checkbox"})},heading:{t:it(t.enforceAtxHeadings?bl:gl),i:ae.HIGH,l:(d,h,u)=>({v:dn(h,d[2],u),T:t.slugify(d[2]),C:d[1].length}),h:(d,h,u)=>n(`h${d.C}`,{id:d.T,key:u.k},h(d.v,u))},headingSetext:{t:it(vl),i:ae.MAX,l:(d,h,u)=>({v:dn(h,d[1],u),C:d[2]==="="?1:2,type:"heading"})},htmlComment:{t:xr(yl),i:ae.HIGH,l:()=>({}),h:to},image:{t:vt(Sb),i:ae.HIGH,l:d=>({D:d[1],B:Ns(d[2]),F:d[3]}),h:(d,h,u)=>n("img",{key:u.k,alt:d.D||void 0,title:d.F||void 0,src:Wt(d.B)})},link:{t:bt(Tb),i:ae.LOW,l:(d,h,u)=>({v:$b(h,d[1],u),B:Ns(d[2]),F:d[3]}),h:(d,h,u)=>n("a",{key:u.k,href:Wt(d.B),title:d.F},h(d.v,u))},linkAngleBraceStyleDetector:{t:bt(Qg),i:ae.MAX,l:d=>({v:[{v:d[1],type:"text"}],B:d[1],type:"link"})},linkBareUrlDetector:{t:(d,h)=>h.N?null:bt(Jg)(d,h),i:ae.MAX,l:d=>({v:[{v:d[1],type:"text"}],B:d[1],F:void 0,type:"link"})},linkMailtoDetector:{t:bt(Zg),i:ae.MAX,l(d){let h=d[1],u=d[1];return Dg.test(u)||(u="mailto:"+u),{v:[{v:h.replace("mailto:",""),type:"text"}],B:u,type:"link"}}},orderedList:xs(n,1),unorderedList:xs(n,2),newlineCoalescer:{t:it(zg),i:ae.LOW,l:eo,h:()=>` +`},paragraph:{t:Pb,i:ae.LOW,l:Qn,h:(d,h,u)=>n("p",{key:u.k},h(d.v,u))},ref:{t:bt(tb),i:ae.MAX,l:d=>(c[d[1]]={B:d[2],F:d[4]},{}),h:to},refImage:{t:vt(rb),i:ae.MAX,l:d=>({D:d[1]||void 0,P:d[2]}),h:(d,h,u)=>n("img",{key:u.k,alt:d.D,src:Wt(c[d.P].B),title:c[d.P].F})},refLink:{t:bt(nb),i:ae.MAX,l:(d,h,u)=>({v:h(d[1],u),Z:h(d[0].replace(ob,"\\$1"),u),P:d[2]}),h:(d,h,u)=>c[d.P]?n("a",{key:u.k,href:Wt(c[d.P].B),title:c[d.P].F},h(d.v,u)):n("span",{key:u.k},h(d.Z,u))},table:{t:it(wl),i:ae.HIGH,l:Rb,h:(d,h,u)=>n("table",{key:u.k},n("thead",null,n("tr",null,d.L.map(function(b,x){return n("th",{key:x,style:Es(d,x)},h(b,u))}))),n("tbody",null,d.A.map(function(b,x){return n("tr",{key:x},b.map(function(R,w){return n("td",{key:w,style:Es(d,w)},h(R,u))}))})))},tableSeparator:{t:function(d,h){return h.$?(h._=!0,ib.exec(d)):null},i:ae.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:xr(vb),i:ae.MIN,l:d=>({v:d[0].replace(Xg,(h,u)=>t.namedCodesToUnicode[u]?t.namedCodesToUnicode[u]:h)}),h:d=>d.v},textBolded:{t:vt(fb),i:ae.MED,l:(d,h,u)=>({v:h(d[2],u)}),h:(d,h,u)=>n("strong",{key:u.k},h(d.v,u))},textEmphasized:{t:vt(mb),i:ae.LOW,l:(d,h,u)=>({v:h(d[2],u)}),h:(d,h,u)=>n("em",{key:u.k},h(d.v,u))},textEscaped:{t:vt(bb),i:ae.HIGH,l:d=>({v:d[1],type:"text"})},textMarked:{t:vt(hb),i:ae.LOW,l:Qn,h:(d,h,u)=>n("mark",{key:u.k},h(d.v,u))},textStrikethroughed:{t:vt(gb),i:ae.LOW,l:Qn,h:(d,h,u)=>n("del",{key:u.k},h(d.v,u))}};t.disableParsingRawHTML!==!0&&(p.htmlBlock={t:xr(yo),i:ae.HIGH,l(d,h,u){const[,b]=d[3].match(wb),x=new RegExp(`^${b}`,"gm"),R=d[3].replace(x,""),w=(k=R,Cb.some(M=>M.test(k))?_b:dn);var k;const y=d[1].toLowerCase(),S=Mg.indexOf(y)!==-1;u.N=u.N||y==="a";const C=S?d[3]:w(h,R,u);return u.N=!1,{O:a(d[2]),v:C,G:S,H:S?y:d[1]}},h:(d,h,u)=>n(d.H,$t({key:u.k},d.O),d.G?d.v:h(d.v,u))},p.htmlSelfClosing={t:xr(wo),i:ae.HIGH,l:d=>({O:a(d[2]||""),H:d[1]}),h:(d,h,u)=>n(d.H,$t({},d.O,{key:u.k}))});const f=function(d){let h=Object.keys(d);function u(b,x){let R=[],w="";for(;b;){let k=0;for(;k{let{children:t,options:r}=e,n=function(o,a){if(o==null)return{};var s,c,p={},f=Object.keys(o);for(c=0;c=0||(p[s]=o[s]);return p}(e,_g);return T.cloneElement(Ib(t,r),n)};function Ab({id:e,markdown:t}){return l.jsx("div",{id:e,className:"pr-prose",children:l.jsx(Db,{children:t})})}const $l=E.forwardRef((e,t)=>l.jsxs(be,{ref:t,className:"pr-rounded-md pr-border pr-border-dashed pr-border-gray-400 pr-bg-white pr-px-4 pr-py-2 pr-text-black pr-transition pr-duration-300 pr-ease-in-out hover:pr-border-blue-600 hover:pr-bg-white hover:pr-text-blue-600",...e,children:[l.jsx(ne.Filter,{size:16,className:"pr-mr-2 pr-h-4 pr-w-4 pr-text-gray-700 hover:pr-text-blue-600"}),"Filter",l.jsx(ne.ChevronDown,{size:16,className:"pr-ml-2 pr-h-4 pr-w-4 pr-text-gray-700 hover:pr-text-blue-600"})]}));var _l=(e=>(e[e.Check=0]="Check",e[e.Radio=1]="Radio",e))(_l||{});function Bb({id:e,groups:t}){return l.jsx("div",{id:e,children:l.jsxs(xn,{children:[l.jsx(To,{asChild:!0,children:l.jsx($l,{})}),l.jsx(Fr,{children:t.map(r=>l.jsxs("div",{children:[l.jsx(ir,{children:r.label}),l.jsx(Ms,{children:r.items.map(n=>l.jsx("div",{children:n.itemType===0?l.jsx(kn,{onClick:n.onClick,children:n.label}):l.jsx(Co,{onClick:n.onClick,value:n.label,children:n.label})},n.label))}),l.jsx(Vr,{})]},r.label))})]})})}function Lb({id:e,message:t}){return l.jsx("div",{id:e,className:"pr-mb-20 pr-mt-20 pr-flex pr-items-center pr-justify-center",children:l.jsx("div",{className:"pr-w-3/4 pr-rounded-lg pr-bg-gray-100 pr-p-8 pr-text-center",children:l.jsx("p",{className:"pr-text-lg pr-text-gray-800",children:t})})})}function Fb({id:e,category:t,downloads:r,languages:n,moreInfoUrl:o}){const a=new Ue.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(Object.values(r).reduce((c,p)=>c+p,0)),s=()=>{window.scrollTo(0,document.body.scrollHeight)};return l.jsxs("div",{id:e,className:"pr-flex pr-flex-wrap pr-items-start pr-space-x-4 pr-border-b pr-border-t pr-bg-white pr-pb-4 pr-pt-4",children:[l.jsxs("div",{className:"pr-flex pr-flex-col pr-items-center",children:[l.jsx("div",{className:"pr-flex pr-items-center pr-rounded-md pr-bg-gray-100 pr-px-2 pr-py-1",children:l.jsx("span",{className:"pr-text-xs pr-font-semibold pr-text-gray-700",children:t})}),l.jsx("span",{className:"pr-text-xs pr-text-gray-500",children:"CATEGORY"})]}),l.jsx("div",{className:"pr-mx-2 pr-h-10 pr-border-l pr-border-gray-300"}),l.jsxs("div",{className:"pr-flex pr-flex-col pr-items-center",children:[l.jsxs("div",{className:"pr-flex pr-items-center pr-rounded-md pr-bg-gray-100 pr-px-2 pr-py-1",children:[l.jsx(ne.User,{className:"pr-mr-1 pr-h-4 pr-w-4"}),l.jsx("span",{className:"pr-text-xs pr-font-semibold pr-text-gray-700",children:a})]}),l.jsx("span",{className:"pr-text-xs pr-text-gray-500",children:"USERS"})]}),l.jsx("div",{className:"pr-mx-2 pr-h-10 pr-border-l pr-border-gray-300"}),l.jsxs("div",{className:"pr-flex pr-flex-col pr-items-center",children:[l.jsx("div",{className:"pr-flex pr-items-center",children:n.slice(0,3).map(c=>l.jsx("span",{className:"pr-ml-1 pr-rounded-md pr-bg-gray-100 pr-px-2 pr-py-1 pr-text-xs pr-font-semibold pr-text-gray-700",children:c.toUpperCase()},c))}),n.length>3&&l.jsxs("button",{type:"button",onClick:()=>s(),className:"pr-text-xs pr-text-gray-500 pr-underline",children:["+",n.length-3," more languages"]})]}),l.jsx("div",{className:"pr-mx-2 pr-h-10 pr-border-l pr-border-gray-300"}),l.jsxs("div",{className:"pr-ml-auto pr-flex pr-flex-col pr-space-y-2",children:[l.jsxs("a",{href:o,target:"_blank",rel:"noreferrer",className:"pr-flex pr-items-center pr-text-xs pr-font-semibold pr-text-gray-500 pr-underline",children:["Website",l.jsx(ne.Link,{className:"pr-ml-1 pr-inline pr-h-4 pr-w-4"})]}),l.jsxs("a",{href:"https://example.com",target:"_blank",rel:"noreferrer",className:"pr-flex pr-items-center pr-text-xs pr-font-semibold pr-text-gray-500 pr-underline",children:["Support",l.jsx(ne.CircleHelp,{className:"pr-ml-1 pr-inline pr-h-4 pr-w-4"})]})]})]})}function Ml({id:e,versionHistory:t}){const[r,n]=E.useState(!1),o=new Date;function a(c){const p=new Date(c),f=new Date(o.getTime()-p.getTime()),m=f.getUTCFullYear()-1970,v=f.getUTCMonth(),g=f.getUTCDate()-1;let d="";return m>0?d=`${m.toString()} year${m===1?"":"s"} ago`:v>0?d=`${v.toString()} month${v===1?"":"s"} ago`:g===0?d="today":d=`${g.toString()} day${g===1?"":"s"} ago`,d}const s=Object.entries(t).sort((c,p)=>p[0].localeCompare(c[0]));return l.jsxs("div",{id:e,children:[l.jsx("h3",{className:"pr-text-md pr-font-semibold",children:"What`s New"}),l.jsx("ul",{className:"pr-list-disc pr-pl-5 pr-pr-4 pr-text-xs pr-text-gray-600",children:(r?s:s.slice(0,5)).map(c=>l.jsxs("div",{className:"pr-mt-3 pr-flex pr-justify-between",children:[l.jsx("div",{className:"pr-text-gray-600",children:l.jsx("li",{className:"pr-prose pr-text-xs",children:l.jsx("span",{children:c[1].description})})}),l.jsxs("div",{className:"pr-justify-end pr-text-right",children:[l.jsxs("div",{children:["Version ",c[0]]}),l.jsx("div",{children:a(c[1].date)})]})]},c[0]))}),s.length>5&&l.jsx("button",{type:"button",onClick:()=>n(!r),className:"pr-text-xs pr-text-gray-500 pr-underline",children:r?"Show Less Version History":"Show All Version History"})]})}function Vb({id:e,publisherDisplayName:t,fileSize:r,locales:n,versionHistory:o}){const a=E.useMemo(()=>Ue.formatBytes(r),[r]),c=(p=>{const f=new Intl.DisplayNames(navigator.language,{type:"language"});return p.map(m=>f.of(m))})(n);return l.jsx("div",{id:e,className:"pr-border-t pr-pb-4 pr-pt-4",children:l.jsxs("div",{className:"pr-md:flex-row pr-md:space-x-8 pr-flex pr-flex-col pr-space-x-0",children:[l.jsx(Ml,{versionHistory:o}),l.jsx("div",{className:"pr-md:border-t-0 pr-md:border-l pr-md-h-auto pr-md-ml-8 pr-mt-4 pr-border-t pr-border-gray-300"}),l.jsxs("div",{className:"pr-md:mt-0 pr-mt-4 pr-flex-1 pr-space-y-3",children:[l.jsx("h2",{className:"pr-text-md pr-font-semibold",children:"Information"}),l.jsxs("div",{className:"pr-flex pr-items-start pr-justify-between pr-pr-4 pr-text-xs pr-text-gray-600",children:[l.jsxs("p",{className:"pr-flex pr-flex-col pr-justify-start",children:[l.jsx("span",{className:"pr-mb-2",children:"Publisher"}),l.jsx("span",{className:"pr-font-semibold",children:t}),l.jsx("span",{className:"pr-mb-2 pr-mt-4",children:"Size"}),l.jsx("span",{className:"pr-font-semibold",children:a})]}),l.jsx("div",{className:"pr-flex pr-w-3/4 pr-items-center pr-justify-between pr-text-xs pr-text-gray-600",children:l.jsxs("p",{className:"pr-flex pr-flex-col pr-justify-start",children:[l.jsx("span",{className:"pr-mb-2",children:"Languages"}),l.jsx("span",{className:"pr-font-semibold",children:c.join(", ")})]})})]})]})]})})}const zb=(e,t)=>{E.useEffect(()=>{if(!e)return()=>{};const r=e(t);return()=>{r()}},[e,t])},no=()=>!1,Hb=(e,t)=>{const[r]=wn(E.useCallback(async()=>{if(!e)return no;const n=await Promise.resolve(e(t));return async()=>n()},[t,e]),no,{preserveValue:!1});E.useEffect(()=>()=>{r!==no&&r()},[r])},Il=E.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:F("pr-rounded-lg pr-border pr-bg-card pr-text-card-foreground pr-shadow-sm",e),...t}));Il.displayName="Card";const Dl=E.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:F("pr-flex pr-flex-col pr-space-y-1.5 pr-p-6",e),...t}));Dl.displayName="CardHeader";const Al=E.forwardRef(({className:e,...t},r)=>l.jsx("h3",{ref:r,className:F("pr-text-2xl pr-font-semibold pr-leading-none pr-tracking-tight",e),...t,children:t.children}));Al.displayName="CardTitle";const Bl=E.forwardRef(({className:e,...t},r)=>l.jsx("p",{ref:r,className:F("pr-text-sm pr-text-muted-foreground",e),...t}));Bl.displayName="CardDescription";const Ll=E.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:F("pr-p-6 pr-pt-0",e),...t}));Ll.displayName="CardContent";const Fl=E.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:F("pr-flex pr-items-center pr-p-6 pr-pt-0",e),...t}));Fl.displayName="CardFooter";const Ub=xo.cva("pr-relative pr-w-full pr-rounded-lg pr-border pr-p-4 [&>svg~*]:pr-pl-7 [&>svg+div]:pr-translate-y-[-3px] [&>svg]:pr-absolute [&>svg]:pr-left-4 [&>svg]:pr-top-4 [&>svg]:pr-text-foreground",{variants:{variant:{default:"pr-bg-background pr-text-foreground",destructive:"pr-border-destructive/50 pr-text-destructive dark:pr-border-destructive [&>svg]:pr-text-destructive"}},defaultVariants:{variant:"default"}}),Vl=E.forwardRef(({className:e,variant:t,...r},n)=>l.jsx("div",{ref:n,role:"alert",className:F(Ub({variant:t}),e),...r}));Vl.displayName="Alert";const zl=E.forwardRef(({className:e,...t},r)=>l.jsxs("h5",{ref:r,className:F("pr-mb-1 pr-font-medium pr-leading-none pr-tracking-tight",e),...t,children:[t.children," "]}));zl.displayName="AlertTitle";const Hl=E.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:F("pr-text-sm [&_p]:pr-leading-relaxed",e),...t}));Hl.displayName="AlertDescription";const Ul=E.forwardRef(({className:e,...t},r)=>l.jsxs(Er.Root,{ref:r,className:F("pr-relative pr-flex pr-w-full pr-touch-none pr-select-none pr-items-center",e),...t,children:[l.jsx(Er.Track,{className:"pr-relative pr-h-2 pr-w-full pr-grow pr-overflow-hidden pr-rounded-full pr-bg-secondary",children:l.jsx(Er.Range,{className:"pr-absolute pr-h-full pr-bg-primary"})}),l.jsx(Er.Thumb,{className:"pr-block pr-h-5 pr-w-5 pr-rounded-full pr-border-2 pr-border-primary pr-bg-background pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50"})]}));Ul.displayName=Er.Root.displayName;const Gl=E.forwardRef(({className:e,...t},r)=>l.jsx(ao.Root,{className:F("pr-peer pr-inline-flex pr-h-6 pr-w-11 pr-shrink-0 pr-cursor-pointer pr-items-center pr-rounded-full pr-border-2 pr-border-transparent pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 focus-visible:pr-ring-offset-background disabled:pr-cursor-not-allowed disabled:pr-opacity-50 data-[state=checked]:pr-bg-primary data-[state=unchecked]:pr-bg-input",e),...t,ref:r,children:l.jsx(ao.Thumb,{className:F("pr-pointer-events-none pr-block pr-h-5 pr-w-5 pr-rounded-full pr-bg-background pr-shadow-lg pr-ring-0 pr-transition-transform data-[state=checked]:pr-translate-x-5 data-[state=unchecked]:pr-translate-x-0")})}));Gl.displayName=ao.Root.displayName;exports.Alert=Vl;exports.AlertDescription=Hl;exports.AlertTitle=zl;exports.BookChapterControl=zc;exports.Button=be;exports.Card=Il;exports.CardContent=Ll;exports.CardDescription=Bl;exports.CardFooter=Fl;exports.CardHeader=Dl;exports.CardTitle=Al;exports.ChapterRangeSelector=cp;exports.Checkbox=Zs;exports.Checklist=pp;exports.ComboBox=so;exports.ContextMenu=ig;exports.DataTable=Us;exports.DisableButton=Pg;exports.DropdownMenu=xn;exports.DropdownMenuCheckboxItem=kn;exports.DropdownMenuContent=Fr;exports.DropdownMenuGroup=Ms;exports.DropdownMenuItem=So;exports.DropdownMenuItemType=_l;exports.DropdownMenuLabel=ir;exports.DropdownMenuPortal=Oc;exports.DropdownMenuRadioGroup=Pc;exports.DropdownMenuRadioItem=Co;exports.DropdownMenuSeparator=Vr;exports.DropdownMenuShortcut=As;exports.DropdownMenuSub=Rc;exports.DropdownMenuSubContent=Ds;exports.DropdownMenuSubTrigger=Is;exports.DropdownMenuTrigger=To;exports.EnableButton=Rg;exports.FilterButton=$l;exports.FilterDropdown=Bb;exports.Footer=Vb;exports.GridMenu=Xi;exports.HamburgerMenuButton=sl;exports.INVENTORY_STRING_KEYS=Wc;exports.IconButton=pg;exports.Input=ar;exports.InstallButton=Og;exports.Inventory=Kc;exports.Label=ra;exports.LabelPosition=Rt;exports.MarkdownRenderer=Ab;exports.MenuItem=Ko;exports.MoreInfo=Fb;exports.NavigationContentSearch=wg;exports.NoExtensionsFound=Lb;exports.ScriptureResultsViewer=bg;exports.SearchBar=ll;exports.Select=_r;exports.SelectContent=Jt;exports.SelectGroup=Ls;exports.SelectItem=Ke;exports.SelectLabel=Fs;exports.SelectScrollDownButton=Oo;exports.SelectScrollUpButton=jo;exports.SelectSeparator=Vs;exports.SelectTrigger=Kt;exports.SelectValue=Mr;exports.Separator=ta;exports.SettingsList=xg;exports.SettingsListHeader=Eg;exports.SettingsListItem=kg;exports.ShadCnSlider=Ul;exports.ShadCnSwitch=Gl;exports.Slider=vg;exports.Snackbar=yg;exports.Spinner=cr;exports.Switch=Ng;exports.Table=zr;exports.TableBody=Ur;exports.TableCaption=Hs;exports.TableCell=It;exports.TableFooter=zs;exports.TableHead=Zt;exports.TableHeader=Hr;exports.TableRow=lt;exports.Tabs=jg;exports.TabsContent=ul;exports.TabsList=pl;exports.TabsTrigger=dl;exports.TextField=Sg;exports.Toolbar=Cg;exports.UpdateButton=$g;exports.VersionHistory=Ml;exports.VerticalTabs=Zo;exports.VerticalTabsContent=ea;exports.VerticalTabsList=Qo;exports.VerticalTabsTrigger=cl;exports.buttonVariants=Bs;exports.getSortingIcon=En;exports.inventoryCountColumn=Zc;exports.inventoryItemColumn=Jc;exports.inventoryStatusColumn=Qc;exports.useEvent=zb;exports.useEventAsync=Hb;exports.usePromise=wn;function Gb(e,t="top"){if(!e||typeof document>"u")return;const r=document.head||document.querySelector("head"),n=r.querySelector(":first-child"),o=document.createElement("style");o.appendChild(document.createTextNode(e)),t==="top"&&n?r.insertBefore(o,n):r.appendChild(o)}Gb(`/* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) */ @@ -1128,6 +985,9 @@ video:where(.pr-twp,.pr-twp *) { .pr-h-\\[100\\%\\] { height: 100%; } +.pr-h-\\[1px\\] { + height: 1px; +} .pr-h-\\[405px\\] { height: 405px; } @@ -1209,6 +1069,9 @@ video:where(.pr-twp,.pr-twp *) { .pr-w-\\[150px\\] { width: 150px; } +.pr-w-\\[1px\\] { + width: 1px; +} .pr-w-\\[200px\\] { width: 200px; } @@ -1741,6 +1604,9 @@ video:where(.pr-twp,.pr-twp *) { padding-top: 1.5rem; padding-bottom: 1.5rem; } +.pr-pb-2 { + padding-bottom: 0.5rem; +} .pr-pb-3 { padding-bottom: 0.75rem; } @@ -2632,21 +2498,141 @@ video:where(.pr-twp,.pr-twp *) { .\\[\\&_tr\\]\\:pr-border-b tr { border-bottom-width: 1px; } -.papi-slider { +.papi-checkbox { background-color: transparent; - color: #1ea7fd; } -.papi-slider.vertical { - min-height: 200px; +.papi-checkbox.error { + color: #f00; } -.papi-slider.paratext { +.papi-checkbox.error:hover { + background-color: rgba(255, 0, 0, 0.2); +} + +.papi-checkbox.paratext { + color: greenyellow; +} + +.papi-checkbox-label.paratext { + color: darkgreen; +} + +.papi-checkbox.paratext:hover { + background-color: rgba(0, 100, 0, 0.3); +} + +.papi-checkbox.paratext.bright { + color: darkgreen; +} + +.papi-checkbox-label.paratext.bright { + background-color: greenyellow; +} + +.papi-checkbox.paratext.bright:hover { + background-color: rgba(173, 255, 47, 0.3); +} + +.papi-checkbox.below, +.papi-checkbox.above { + text-align: center; +} +.check-item { + flex-wrap: wrap; + vertical-align: middle; +} + +.papi-checkbox { + display: block; +} +.papi-multi-column-menu { + background-color: rgb(222, 222, 222); + display: flex; + flex-direction: column; + padding-left: 3px; + padding-right: 3px; +} + +.papi-menu-column { + font-size: 11pt; + font-weight: 600; + padding-bottom: 2px; +} + +.papi-menu-column ul { + padding-top: 0; +} + +.papi-menu-column-header { + background-color: rgb(181, 181, 181); + padding-left: 24px; + margin-top: 0; + margin-bottom: 0; +} + +.papi-multi-column-menu.paratext { + background-color: rgb(76, 106, 76); + color: rgb(214, 255, 152); +} + +.papi-multi-column-menu.paratext.bright { + color: rgb(76, 106, 76); + background-color: rgb(214, 255, 152); +} +.papi-context-menu-target { + white-space: nowrap; + cursor: context-menu; +} + +.papi-context-menu-target * { + white-space: normal; +} + +.papi-context-menu-target:hover { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.07); /* Faint shadowy background */ +} + +.papi-context-menu-target.paratext:hover { + box-shadow: 0 0 10px rgba(0, 100, 0, 0.07); /* Faint shadowy background */ +} + +.papi-context-menu-target.paratext.bright:hover { + box-shadow: 0 0 10px rgba(173, 255, 47, 0.07); /* Faint shadowy background */ +} + +.papi-context-menu.paratext ul { + background-color: rgb(76, 106, 76); + color: rgb(214, 255, 152); +} + +.papi-context-menu.paratext.bright ul { + color: rgb(76, 106, 76); + background-color: rgb(214, 255, 152); +} +.papi-icon-button { + border: 0; + border-radius: 3em; + cursor: pointer; + display: inline-block; +} + +.papi-icon-button.primary { + background-color: #1ea7fd; + color: white; +} + +.papi-icon-button.secondary { + background-color: transparent; + color: #333; +} + +.papi-icon-button.paratext { background-color: darkgreen; color: greenyellow; } -.papi-slider.paratext.bright { +.papi-icon-button.paratext.bright { background-color: greenyellow; color: darkgreen; } @@ -2663,6 +2649,59 @@ video:where(.pr-twp,.pr-twp *) { max-width: 24px; max-height: 24px; } +.papi-slider { + background-color: transparent; + color: #1ea7fd; +} + +.papi-slider.vertical { + min-height: 200px; +} + +.papi-slider.paratext { + background-color: darkgreen; + color: greenyellow; +} + +.papi-slider.paratext.bright { + background-color: greenyellow; + color: darkgreen; +} +.papi-snackbar { + font-family: Arial, Helvetica, sans-serif; +} + +.papi-snackbar.primary { + background: #1ea7fd; + color: white; +} + +.papi-snackbar.external { + background-color: lightsteelblue; + border-color: white; + border-style: dotted; + padding: 2%; + width: 30%; +} + +.papi-snackbar.secondary { + background: transparent; + color: #333; +} + +.papi-snackbar.alert { + background: lightcoral; +} + +.papi-snackbar.paratext { + background: darkgreen; + color: greenyellow; +} + +.papi-snackbar.bright { + background: greenyellow; + color: darkgreen; +} .banded-row:hover { cursor: pointer; } @@ -2719,35 +2758,5 @@ video:where(.pr-twp,.pr-twp *) { padding: 10px; position: relative; } -.papi-context-menu-target { - white-space: nowrap; - cursor: context-menu; -} - -.papi-context-menu-target * { - white-space: normal; -} - -.papi-context-menu-target:hover { - box-shadow: 0 0 10px rgba(0, 0, 0, 0.07); /* Faint shadowy background */ -} - -.papi-context-menu-target.paratext:hover { - box-shadow: 0 0 10px rgba(0, 100, 0, 0.07); /* Faint shadowy background */ -} - -.papi-context-menu-target.paratext.bright:hover { - box-shadow: 0 0 10px rgba(173, 255, 47, 0.07); /* Faint shadowy background */ -} - -.papi-context-menu.paratext ul { - background-color: rgb(76, 106, 76); - color: rgb(214, 255, 152); -} - -.papi-context-menu.paratext.bright ul { - color: rgb(76, 106, 76); - background-color: rgb(214, 255, 152); -} `,"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 220595ff21..ca81d04b10 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/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/inventory-utils.ts","../src/components/advanced/inventory/occurrences-table.component.tsx","../src/components/advanced/inventory/inventory.component.tsx","../src/components/advanced/inventory/inventory-columns.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/mui/chapter-range-selector.component.tsx","../src/components/mui/label-position.model.ts","../src/components/mui/checkbox.component.tsx","../src/components/mui/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/elementTypeAcceptingRef/elementTypeAcceptingRef.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/getScrollbarSize/getScrollbarSize.js","../../../node_modules/@mui/utils/integerPropType/integerPropType.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/FocusTrap/FocusTrap.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@mui/base/unstable_useModal/ModalManager.js","../../../node_modules/@mui/base/unstable_useModal/useModal.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/styles/getOverlayAlpha.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","../../../node_modules/@mui/material/List/ListContext.js","../../../node_modules/@mui/material/List/listClasses.js","../../../node_modules/@mui/material/List/List.js","../../../node_modules/@mui/material/MenuList/MenuList.js","../../../node_modules/@mui/material/Fade/Fade.js","../../../node_modules/@mui/material/Backdrop/backdropClasses.js","../../../node_modules/@mui/material/Backdrop/Backdrop.js","../../../node_modules/@mui/material/Modal/modalClasses.js","../../../node_modules/@mui/material/Modal/Modal.js","../../../node_modules/@mui/material/Paper/paperClasses.js","../../../node_modules/@mui/material/Paper/Paper.js","../../../node_modules/@mui/material/Popover/popoverClasses.js","../../../node_modules/@mui/material/Popover/Popover.js","../../../node_modules/@mui/material/Menu/menuClasses.js","../../../node_modules/@mui/material/Menu/Menu.js","../src/components/mui/context-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/advanced/scripture-results-viewer/scripture-results-viewer.component.tsx","../src/components/shadcn-ui/label.tsx","../src/components/basics/text-field.component.tsx","../src/components/basics/search-bar.component.tsx","../src/components/mui/slider.component.tsx","../src/components/mui/snackbar.component.tsx","../src/components/basics/spinner.component.tsx","../src/components/mui/switch.component.tsx","../src/components/mui/toolbar.component.tsx","../src/components/shadcn-ui/tabs.tsx","../src/components/basics/tabs-vertical.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","../../../node_modules/markdown-to-jsx/dist/index.modern.js","../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","../src/components/shadcn-ui/card.tsx","../src/components/shadcn-ui/alert.tsx","../src/components/shadcn-ui/slider.tsx","../src/components/shadcn-ui/switch.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst twMergeCustom = extendTailwindMerge({ prefix: 'pr-' });\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 pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-md pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50',\n {\n variants: {\n variant: {\n default: 'pr-bg-primary pr-text-primary-foreground hover:pr-bg-primary/90',\n destructive: 'pr-bg-destructive pr-text-destructive-foreground hover:pr-bg-destructive/90',\n outline:\n 'pr-border pr-border-input pr-bg-background hover:pr-bg-accent hover:pr-text-accent-foreground',\n secondary: 'pr-bg-secondary pr-text-secondary-foreground hover:pr-bg-secondary/80',\n ghost: 'hover:pr-bg-accent hover:pr-text-accent-foreground',\n link: 'pr-text-primary pr-underline-offset-4 hover:pr-underline',\n },\n size: {\n default: 'pr-h-10 pr-px-4 pr-py-2',\n sm: 'pr-h-9 pr-rounded-md pr-px-3',\n lg: 'pr-h-11 pr-rounded-md pr-px-8',\n icon: 'pr-h-10 pr-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 { 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]:pr-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:pr-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 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;\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\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","export const getLinesFromUSFM = (text: string) => {\n return text.split(/(?=\\n|\\\\(?:v|c|id))/g);\n};\n\nexport const extractNumberFromUSFM = (text: string): number => {\n const regex = /^\\\\[vc]\\s+(\\d+)/;\n const match = text.match(regex);\n if (match) {\n return +match[1];\n }\n return 0;\n};\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 { LanguageStrings, ScriptureReference } from 'platform-bible-utils';\nimport { useEffect, useState } from 'react';\nimport { extractNumberFromUSFM, getLinesFromUSFM } from './inventory-utils';\n\ntype SearchResult = {\n reference: ScriptureReference;\n snippet: string;\n key: number;\n};\n\nconst extractOccurrences = (\n text: string | undefined,\n item: string,\n extractItems: (text: string, item?: string | undefined) => string[],\n scriptureRef: ScriptureReference,\n): SearchResult[] => {\n if (!text || text === '' || item === '') return [];\n\n const results: SearchResult[] = [];\n const lines = getLinesFromUSFM(text);\n\n let currentChapter: number = scriptureRef.chapterNum;\n let currentVerse: number = scriptureRef.verseNum;\n let key: number = 0;\n\n lines.forEach((line) => {\n if (line.startsWith('\\\\id')) {\n currentChapter = 0;\n currentVerse = 0;\n }\n if (line.startsWith('\\\\c')) {\n currentChapter = extractNumberFromUSFM(line);\n currentVerse = 0;\n }\n if (line.startsWith('\\\\v')) {\n currentVerse = extractNumberFromUSFM(line);\n if (currentChapter === 0) {\n currentChapter = scriptureRef.chapterNum;\n }\n }\n\n const items: string[] = extractItems(line, item);\n\n for (let i = 0; i < items.length; i++) {\n const result: SearchResult = {\n reference: { ...scriptureRef, chapterNum: +currentChapter, verseNum: +currentVerse },\n snippet: line,\n key,\n };\n key += 1;\n results.push(result);\n }\n });\n\n return results;\n};\n\ninterface OccurrencesTableProps {\n selectedItem: string;\n text: string | undefined;\n extractItems: (text: string, item?: string | undefined) => string[];\n scriptureReference: ScriptureReference;\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n localizedStrings: LanguageStrings;\n}\n\nfunction OccurrencesTable({\n selectedItem,\n text,\n extractItems,\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n}: OccurrencesTableProps) {\n const reference = localizedStrings['%webView_inventory_occurrences_table_header_reference%'];\n const occurrence = localizedStrings['%webView_inventory_occurrences_table_header_occurrence%'];\n const [tableData, setTableData] = useState(\n extractOccurrences(text, selectedItem, extractItems, scriptureReference),\n );\n\n useEffect(\n () => setTableData(extractOccurrences(text, selectedItem, extractItems, scriptureReference)),\n [text, selectedItem, scriptureReference, extractItems],\n );\n\n return (\n \n \n \n {reference}\n {occurrence}\n \n \n \n {tableData.map((result) => (\n {\n setScriptureReference(result.reference);\n }}\n >\n {`${Canon.bookNumberToEnglishName(result.reference.bookNum)} ${result.reference.chapterNum}:${result.reference.verseNum}`}\n {result.snippet}\n \n ))}\n \n
\n );\n}\n\nexport default OccurrencesTable;\n","import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';\nimport { LocalizedStringValue, ScriptureReference } from 'platform-bible-utils';\nimport { Input } from '@/components/shadcn-ui/input';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport DataTable, {\n ColumnDef,\n RowContents,\n SortDirection,\n TableContents,\n} from '@/components/advanced/data-table/data-table.component';\nimport OccurrencesTable from '@/components/advanced/inventory/occurrences-table.component';\nimport { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from 'lucide-react';\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_book%',\n '%webView_inventory_scope_chapter%',\n '%webView_inventory_scope_verse%',\n '%webView_inventory_filter_text%',\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\nexport type Status = 'approved' | 'unapproved' | 'unknown';\n\nexport type ItemData = {\n item: string;\n count: number;\n status: Status;\n};\n\nexport const getSortingIcon = (sortDirection: false | SortDirection): ReactNode => {\n if (sortDirection === 'asc') {\n return ;\n }\n if (sortDirection === 'desc') {\n return ;\n }\n return ;\n};\n\nconst filterItemData = (\n items: ItemData[],\n statusFilter: string,\n textFilter: string,\n): ItemData[] => {\n let filteredItemData: ItemData[] = items;\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.item.includes(textFilter));\n\n return filteredItemData;\n};\n\nconst convertTextToItemData = (\n text: string,\n getInventoryItems: (text: string) => string[],\n getStatusForItem: (item: string) => Status,\n): ItemData[] => {\n const itemData: ItemData[] = [];\n\n const items: string[] = getInventoryItems(text);\n\n for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n const item = items[itemIndex];\n const existingItem = itemData.find((entry) => {\n return entry.item === item;\n });\n if (existingItem) {\n existingItem.count += 1;\n } else {\n const newItem: ItemData = {\n item,\n count: 1,\n status: getStatusForItem(item),\n };\n itemData.push(newItem);\n }\n }\n\n return itemData;\n};\n\nconst localizeString = (\n strings: InventoryLocalizedStrings,\n key: keyof InventoryLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\ninterface InventoryProps {\n scriptureReference: ScriptureReference;\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n localizedStrings: InventoryLocalizedStrings;\n extractItems: (text: string, item?: string | undefined) => string[];\n approvedItems: string[];\n onApprovedItemsChange: (items: string[]) => void;\n unapprovedItems: string[];\n onUnapprovedItemsChange: (items: string[]) => void;\n text: string | undefined;\n scope: string;\n onScopeChange: (scope: string) => void;\n getColumns: (\n onStatusChange: (newItems: string[], status: Status) => void,\n ) => ColumnDef[];\n}\n\nfunction Inventory({\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n extractItems,\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n text,\n scope,\n onScopeChange,\n getColumns,\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_book%');\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\n const [items, setItems] = useState([]);\n const [statusFilter, setStatusFilter] = useState('all');\n const [textFilter, setTextFilter] = useState('');\n const [selectedItem, setSelectedItem] = useState('');\n\n const statusChangeHandler = useCallback(\n (changedItems: string[], status: Status) => {\n setItems((prevTableData) => {\n let tableData: ItemData[] = [];\n changedItems.forEach((item) => {\n tableData = prevTableData.map((tableEntry) => {\n if (tableEntry.item === item && tableEntry.status !== status)\n return { ...tableEntry, status };\n return tableEntry;\n });\n });\n return tableData;\n });\n\n let newApprovedItems: string[] = [...approvedItems];\n changedItems.forEach((item) => {\n if (status === '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 (status === 'unapproved') {\n if (!newUnapprovedItems.includes(item)) {\n newUnapprovedItems.push(item);\n }\n } else {\n newUnapprovedItems = newUnapprovedItems.filter(\n (unapprovedItem) => unapprovedItem !== item,\n );\n }\n });\n onUnapprovedItemsChange(newUnapprovedItems);\n },\n [approvedItems, onApprovedItemsChange, unapprovedItems, onUnapprovedItemsChange],\n );\n\n const getStatusForItem = useCallback(\n (item: string): Status => {\n if (approvedItems.includes(item)) return 'approved';\n if (unapprovedItems.includes(item)) return 'unapproved';\n return 'unknown';\n },\n [approvedItems, unapprovedItems],\n );\n\n useEffect(() => {\n if (!text) return;\n setItems(convertTextToItemData(text, extractItems, getStatusForItem));\n }, [extractItems, text, getStatusForItem]);\n\n const filteredItemData = useMemo(() => {\n return filterItemData(items, statusFilter, textFilter);\n }, [items, statusFilter, textFilter]);\n\n useEffect(() => {\n setSelectedItem('');\n }, [filteredItemData]);\n\n const rowClickHandler = (row: RowContents, table: TableContents) => {\n table.toggleAllRowsSelected(false); // this is pretty hacky, and also prevents us from selecting multiple rows\n row.toggleSelected(undefined);\n\n setSelectedItem(row.getValue('item'));\n };\n\n const columns = useMemo(() => getColumns(statusChangeHandler), [getColumns, statusChangeHandler]);\n\n return (\n
\n
\n \n \n {\n setTextFilter(event.target.value);\n }}\n />\n
\n
\n \n
\n {selectedItem !== '' && (\n
\n \n setScriptureReference(newScriptureReference)\n }\n localizedStrings={localizedStrings}\n />\n
\n )}\n
\n );\n}\n\nexport default Inventory;\n","import { CircleCheckIcon, CircleHelpIcon, CircleXIcon } from 'lucide-react';\nimport { Button } from '@/components/shadcn-ui/button';\nimport { ColumnDef } from '../data-table/data-table.component';\nimport { getSortingIcon, ItemData, Status } from './inventory.component';\n\nexport const inventoryItemColumn = (itemLabel: string): ColumnDef => {\n return {\n accessorKey: 'item',\n header: ({ column }) => (\n \n ),\n };\n};\n\nexport const inventoryCountColumn = (countLabel: string): ColumnDef => {\n return {\n accessorKey: 'count',\n header: ({ column }) => (\n \n ),\n };\n};\n\nexport const inventoryStatusColumn = (\n statusLabel: string,\n statusChangeHandler: (items: string[], status: Status) => void,\n): ColumnDef => {\n return {\n accessorKey: 'status',\n header: ({ column, table }) => {\n const selectedRows = table.getSelectedRowModel().rows;\n\n const items: string[] = [];\n selectedRows.forEach((row) => {\n items.push(row.getValue('item'));\n });\n\n return (\n
\n
\n column.toggleSorting(undefined)}\n >\n {statusLabel}\n {getSortingIcon(column.getIsSorted())}\n \n
\n
\n \n \n \n
\n
\n );\n },\n cell: ({ row }) => {\n const status: Status = row.getValue('status');\n switch (status) {\n case 'approved':\n return ;\n case 'unapproved':\n return ;\n case 'unknown':\n default:\n return ;\n }\n },\n };\n};\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 { 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 /** 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 /** Text direction ltr or rtl */\n dir?: Direction;\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 buttonPlaceholder = '',\n textPlaceholder = '',\n commandEmptyMessage = 'No option found',\n buttonVariant = 'outline',\n dir = 'ltr',\n ...props\n}: ComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n return (\n \n \n \n {value ? getOptionLabel(value) : buttonPlaceholder}\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 { useEffect, useState } from 'react';\nimport { FormControlLabel } from '@mui/material';\nimport ComboBox from '@/components/basics/combo-box.component';\n\nexport type ChapterRangeSelectorProps = {\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled = false,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const [startChapter, setStartChapter] = useState(1);\n const [endChapter, setEndChapter] = useState(chapterCount);\n const [chapterOptions, setChapterOptions] = useState(\n Array.from({ length: chapterCount }, (_, i) => i + 1),\n );\n\n useEffect(() => {\n setStartChapter(1);\n handleSelectStartChapter(1);\n setEndChapter(chapterCount);\n handleSelectEndChapter(chapterCount);\n setChapterOptions(Array.from({ length: chapterCount }, (_, i) => i + 1));\n }, [chapterCount, handleSelectEndChapter, handleSelectStartChapter]);\n\n const onChangeStartChapter = (value: number) => {\n setStartChapter(value);\n handleSelectStartChapter(value);\n if (value > endChapter) {\n setEndChapter(value);\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (value: number) => {\n setEndChapter(value);\n handleSelectEndChapter(value);\n if (value < startChapter) {\n setStartChapter(value);\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n option.toString()}\n value={startChapter}\n />\n }\n label=\"Chapters\"\n labelPlacement=\"start\"\n />\n option.toString()}\n value={endChapter}\n />\n }\n label=\"to\"\n labelPlacement=\"start\"\n />\n \n );\n}\n","enum LabelPosition {\n After = 'after',\n Before = 'before',\n Above = 'above',\n Below = 'below',\n}\n\nexport default LabelPosition;\n","import '@/components/mui/checkbox.component.css';\nimport LabelPosition from '@/components/mui/label-position.model';\nimport { FormLabel, Checkbox as MuiCheckbox } from '@mui/material';\nimport { ChangeEvent } from 'react';\n\nexport type CheckboxProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * If specified, the label that will appear associated with the checkbox.\n *\n * @default '' (no label will be shown)\n */\n labelText?: string;\n /**\n * Indicates the position of the label relative to the checkbox.\n *\n * @default 'after'\n */\n labelPosition?: LabelPosition;\n /**\n * If `true`, the component is in the indeterminate state.\n *\n * @default false\n */\n isIndeterminate?: boolean;\n /** If `true`, the component is checked by default. */\n isDefaultChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/* function CheckboxContainer({ labelText? = '', isDisabled : boolean, hasError : boolean, children? }) {\n return (\n \n {children}\n labelText\n \n );\n} */\n\n/** Primary UI component for user interaction */\nfunction Checkbox({\n id,\n isChecked,\n labelText = '',\n labelPosition = LabelPosition.After,\n isIndeterminate = false,\n isDefaultChecked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: CheckboxProps) {\n const checkBox = (\n \n );\n\n let result;\n\n if (labelText) {\n const preceding =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.Above;\n\n const labelSpan = (\n \n {labelText}\n \n );\n\n const labelIsInline =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.After;\n\n const label = labelIsInline ? labelSpan :
{labelSpan}
;\n\n const checkBoxElement = labelIsInline ? checkBox :
{checkBox}
;\n\n result = (\n \n {preceding && label}\n {checkBoxElement}\n {!preceding && label}\n \n );\n } else {\n result = checkBox;\n }\n return result;\n}\n\nexport default Checkbox;\n","import Checkbox from '@/components/mui/checkbox.component';\nimport '@/components/mui/checklist.component.css';\n\nexport type ChecklistProps = {\n /** Optional string representing the id attribute of the fieldset element */\n id?: string;\n /** Optional string representing CSS class name(s) for styling */\n className?: string;\n /** Optional string representing legend for fieldset element */\n legend?: string;\n /** Array of strings representing the legend text for the fieldset element */\n listItems: string[];\n /** Array of strings representing items to be displayed as checkboxes in the checklist */\n selectedListItems: string[];\n /** Function that takes a string param and is called when a checkbox item is selected or deselected */\n handleSelectListItem: (item: string) => void;\n /**\n * Optional function that takes a string param and returns a string representing the label text\n * for the checkbox associated with that item\n */\n createLabel?: (item: string) => string;\n};\n\n/**\n * Renders a list of checkboxes wrapped in a fieldset element. Each checkbox corresponds to an item\n * from the `listItems` array.\n */\nexport default function Checklist({\n id,\n className,\n legend,\n listItems,\n selectedListItems,\n handleSelectListItem,\n createLabel,\n}: ChecklistProps) {\n return (\n
\n {legend && {legend}}\n {listItems.map((item) => (\n handleSelectListItem(item)}\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 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 elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == 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\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 propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","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}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}","export function getTypeByValue(value) {\n const valueType = typeof value;\n switch (valueType) {\n case 'number':\n if (Number.isNaN(value)) {\n return 'NaN';\n }\n if (!Number.isFinite(value)) {\n return 'Infinity';\n }\n if (value !== Math.floor(value)) {\n return 'float';\n }\n return 'number';\n case 'object':\n if (value === null) {\n return 'null';\n }\n return value.constructor.name;\n default:\n return valueType;\n }\n}\n\n// IE 11 support\nfunction ponyfillIsInteger(x) {\n // eslint-disable-next-line no-restricted-globals\n return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;\n}\nconst isInteger = Number.isInteger || ponyfillIsInteger;\nfunction requiredInteger(props, propName, componentName, location) {\n const propValue = props[propName];\n if (propValue == null || !isInteger(propValue)) {\n const propType = getTypeByValue(propValue);\n return new RangeError(`Invalid ${location} \\`${propName}\\` of type \\`${propType}\\` supplied to \\`${componentName}\\`, expected \\`integer\\`.`);\n }\n return null;\n}\nfunction validator(props, propName, ...other) {\n const propValue = props[propName];\n if (propValue === undefined) {\n return null;\n }\n return requiredInteger(props, propName, ...other);\n}\nfunction validatorNoop() {\n return null;\n}\nvalidator.isRequired = requiredInteger;\nvalidatorNoop.isRequired = validatorNoop;\nexport default process.env.NODE_ENV === 'production' ? validatorNoop : validator;","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\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome,
, and elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n return node.tabIndex;\n}\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n if (!node.name) {\n return false;\n }\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n return roving !== node;\n}\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n return true;\n}\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node: node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\nfunction defaultIsEnabled() {\n return true;\n}\n\n/**\n * Utility component that locks focus inside the component.\n *\n * Demos:\n *\n * - [Focus Trap](https://mui.com/base-ui/react-focus-trap/)\n *\n * API:\n *\n * - [FocusTrap API](https://mui.com/base-ui/react-focus-trap/components-api/#focus-trap)\n */\nfunction FocusTrap(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef(false);\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null);\n // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef(children.ref, rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n if (!rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n rootRef.current.setAttribute('tabIndex', '-1');\n }\n if (activated.current) {\n rootRef.current.focus();\n }\n }\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n nodeToRestore.current = null;\n }\n };\n // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open FocusTrap\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n }\n\n // Make sure the next tab starts from the right place.\n // doc.activeElement refers to the origin.\n if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (sentinelEnd.current) {\n sentinelEnd.current.focus();\n }\n }\n };\n const contain = () => {\n const rootElement = rootRef.current;\n\n // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) {\n return;\n }\n if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n // The focus is already inside\n if (rootElement.contains(doc.activeElement)) {\n return;\n }\n\n // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)\n if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {\n return;\n }\n\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (doc.activeElement !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n if (!activated.current) {\n return;\n }\n let tabbable = [];\n if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n // one of the sentinel nodes was focused, so move the focus\n // to the first/last tabbable element inside the focus trap\n if (tabbable.length > 0) {\n var _lastKeydown$current, _lastKeydown$current2;\n const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n }\n // no tabbable elements in the trap focus or the focus was outside of the focus trap\n } else {\n rootElement.focus();\n }\n };\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true);\n\n // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n const interval = setInterval(() => {\n if (doc.activeElement && doc.activeElement.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-testid\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-testid\": \"sentinelEnd\"\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? FocusTrap.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n /**\n * If `true`, the focus trap will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not restore focus to previously focused element once\n * focus trap is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple focus trap mounted at the same time.\n * @default function defaultIsEnabled(): boolean {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n FocusTrap['propTypes' + ''] = exactProp(FocusTrap.propTypes);\n}\nexport { FocusTrap };","'use client';\n\nimport * 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 };","import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, show) {\n if (show) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = blacklist.indexOf(element) === -1;\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, show);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerDocument(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.containers = void 0;\n this.modals = void 0;\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_createChainedFunction as createChainedFunction } from '@mui/utils';\nimport { extractEventHandlers } from '../utils';\nimport { ModalManager, ariaHidden } from './ModalManager';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst defaultManager = new ModalManager();\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/base-ui/react-modal/#hook)\n *\n * API:\n *\n * - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal)\n */\nexport function useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n // @ts-ignore internal logic - Base UI supports the manager as a prop too\n manager = defaultManager,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp, manager]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || event.which === 229 ||\n // Wait until IME is settled.\n !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n var _otherHandlers$onClic;\n (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers);\n return _extends({\n role: 'presentation'\n }, externalEventHandlers, {\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n });\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return _extends({\n 'aria-hidden': true\n }, externalEventHandlers, {\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n });\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children == null ? void 0 : children.props.onEnter),\n onExited: createChainedFunction(handleExited, children == null ? void 0 : children.props.onExited)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}","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;","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nconst getOverlayAlpha = elevation => {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return (alphaValue / 100).toFixed(2);\n};\nexport default getOverlayAlpha;","'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","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"dense\", \"disablePadding\", \"subheader\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport ListContext from './ListContext';\nimport { getListUtilityClass } from './listClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})(({\n ownerState\n}) => _extends({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative'\n}, !ownerState.disablePadding && {\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.subheader && {\n paddingTop: 0\n}));\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = _extends({}, props, {\n component,\n dense,\n disablePadding\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: [subheader, children]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.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 * The content of the component.\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 component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"actions\", \"autoFocus\", \"autoFocusItem\", \"children\", \"className\", \"disabledItemsFocusable\", \"disableListWrap\", \"onKeyDown\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport List from '../List';\nimport getScrollbarSize from '../utils/getScrollbarSize';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.indexOf(textCriteria.keys.join('')) === 0;\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, theme) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerDocument(containerElement))}px`;\n listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = ownerDocument(list).activeElement;\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, _extends({\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1\n }, other, {\n children: items\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.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`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","'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 { Transition } from 'react-transition-group';\nimport { elementAcceptingRef } from '@mui/utils';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\n\n/**\n * The Fade transition is used by the [Modal](/material-ui/react-modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const theme = useTheme();\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\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 = defaultTimeout,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const enableStrictModeCompat = true;\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 transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\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 transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\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: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\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\" ? Fade.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 * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"invisible\", \"open\", \"slotProps\", \"slots\", \"TransitionComponent\", \"transitionDuration\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Fade from '../Fade';\nimport { getBackdropUtilityClass } from './backdropClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})(({\n ownerState\n}) => _extends({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n}, ownerState.invisible && {\n backgroundColor: 'transparent'\n}));\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n var _slotProps$root, _ref, _slots$root;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n const {\n children,\n className,\n component = 'div',\n components = {},\n componentsProps = {},\n invisible = false,\n open,\n slotProps = {},\n slots = {},\n TransitionComponent = Fade,\n transitionDuration\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n invisible\n });\n const classes = useUtilityClasses(ownerState);\n const rootSlotProps = (_slotProps$root = slotProps.root) != null ? _slotProps$root : componentsProps.root;\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n in: open,\n timeout: transitionDuration\n }, other, {\n children: /*#__PURE__*/_jsx(BackdropRoot, _extends({\n \"aria-hidden\": true\n }, rootSlotProps, {\n as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,\n className: clsx(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),\n ownerState: _extends({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),\n classes: classes,\n ref: ref,\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.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 * The content of the component.\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 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.\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 Root: 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 root: PropTypes.object\n }),\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\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 root: 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 root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The 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 Fade\n */\n TransitionComponent: PropTypes.elementType,\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 transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getModalUtilityClass(slot) {\n return generateUtilityClass('MuiModal', slot);\n}\nconst modalClasses = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);\nexport default modalClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"BackdropComponent\", \"BackdropProps\", \"classes\", \"className\", \"closeAfterTransition\", \"children\", \"container\", \"component\", \"components\", \"componentsProps\", \"disableAutoFocus\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\", \"onBackdropClick\", \"onClose\", \"onTransitionEnter\", \"onTransitionExited\", \"open\", \"slotProps\", \"slots\", \"theme\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, HTMLElementType } from '@mui/utils';\nimport { useSlotProps } from '@mui/base';\nimport { unstable_useModal as useModal } from '@mui/base/unstable_useModal';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport FocusTrap from '../Unstable_TrapFocus';\nimport Portal from '../Portal';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Backdrop from '../Backdrop';\nimport { getModalUtilityClass } from './modalClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open,\n exited,\n classes\n } = ownerState;\n const slots = {\n root: ['root', !open && exited && 'hidden'],\n backdrop: ['backdrop']\n };\n return composeClasses(slots, getModalUtilityClass, classes);\n};\nconst ModalRoot = styled('div', {\n name: 'MuiModal',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.open && ownerState.exited && styles.hidden];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'fixed',\n zIndex: (theme.vars || theme).zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0\n}, !ownerState.open && ownerState.exited && {\n visibility: 'hidden'\n}));\nconst ModalBackdrop = styled(Backdrop, {\n name: 'MuiModal',\n slot: 'Backdrop',\n overridesResolver: (props, styles) => {\n return styles.backdrop;\n }\n})({\n zIndex: -1\n});\n\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/material-ui/api/dialog/)\n * - [Drawer](/material-ui/api/drawer/)\n * - [Menu](/material-ui/api/menu/)\n * - [Popover](/material-ui/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/material-ui/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n var _ref, _slots$root, _ref2, _slots$backdrop, _slotProps$root, _slotProps$backdrop;\n const props = useThemeProps({\n name: 'MuiModal',\n props: inProps\n });\n const {\n BackdropComponent = ModalBackdrop,\n BackdropProps,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n components = {},\n componentsProps = {},\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n onBackdropClick,\n open,\n slotProps,\n slots\n // eslint-disable-next-line react/prop-types\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const propsWithDefaults = _extends({}, props, {\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n });\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n isTopModal,\n exited,\n hasTransition\n } = useModal(_extends({}, propsWithDefaults, {\n rootRef: ref\n }));\n const ownerState = _extends({}, propsWithDefaults, {\n exited\n });\n const classes = useUtilityClasses(ownerState);\n const childProps = {};\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = '-1';\n }\n\n // It's a Transition like component\n if (hasTransition) {\n const {\n onEnter,\n onExited\n } = getTransitionProps();\n childProps.onEnter = onEnter;\n childProps.onExited = onExited;\n }\n const RootSlot = (_ref = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref : ModalRoot;\n const BackdropSlot = (_ref2 = (_slots$backdrop = slots == null ? void 0 : slots.backdrop) != null ? _slots$backdrop : components.Backdrop) != null ? _ref2 : BackdropComponent;\n const rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;\n const backdropSlotProps = (_slotProps$backdrop = slotProps == null ? void 0 : slotProps.backdrop) != null ? _slotProps$backdrop : componentsProps.backdrop;\n const rootProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: rootSlotProps,\n externalForwardedProps: other,\n getSlotProps: getRootProps,\n additionalProps: {\n ref,\n as: component\n },\n ownerState,\n className: clsx(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))\n });\n const backdropProps = useSlotProps({\n elementType: BackdropSlot,\n externalSlotProps: backdropSlotProps,\n additionalProps: BackdropProps,\n getSlotProps: otherHandlers => {\n return getBackdropProps(_extends({}, otherHandlers, {\n onClick: e => {\n if (onBackdropClick) {\n onBackdropClick(e);\n }\n if (otherHandlers != null && otherHandlers.onClick) {\n otherHandlers.onClick(e);\n }\n }\n }));\n },\n className: clsx(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop),\n ownerState\n });\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, _extends({}, rootProps, {\n children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/React.cloneElement(children, childProps)\n })]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead.\n */\n BackdropProps: PropTypes.object,\n /**\n * A single child content 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 * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\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.\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 Backdrop: PropTypes.elementType,\n Root: 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 backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\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 * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * A function called when a transition enters.\n */\n onTransitionEnter: PropTypes.func,\n /**\n * A function called when a transition has exited.\n */\n onTransitionExited: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Modal;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"component\", \"elevation\", \"square\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes, integerPropType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport getOverlayAlpha from '../styles/getOverlayAlpha';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport { getPaperUtilityClass } from './paperClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$vars$overlays;\n return _extends({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow')\n }, !ownerState.square && {\n borderRadius: theme.shape.borderRadius\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }, ownerState.variant === 'elevation' && _extends({\n boxShadow: (theme.vars || theme).shadows[ownerState.elevation]\n }, !theme.vars && theme.palette.mode === 'dark' && {\n backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`\n }, theme.vars && {\n backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]\n }));\n});\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n elevation,\n square,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const theme = useTheme();\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.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 * The content of the component.\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 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 * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopoverUtilityClass(slot) {\n return generateUtilityClass('MuiPopover', slot);\n}\nconst popoverClasses = generateUtilityClasses('MuiPopover', ['root', 'paper']);\nexport default popoverClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"action\", \"anchorEl\", \"anchorOrigin\", \"anchorPosition\", \"anchorReference\", \"children\", \"className\", \"container\", \"elevation\", \"marginThreshold\", \"open\", \"PaperProps\", \"slots\", \"slotProps\", \"transformOrigin\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"disableScrollLock\"],\n _excluded3 = [\"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses, useSlotProps, isHostComponent } from '@mui/base';\nimport { chainPropTypes, integerPropType, elementTypeAcceptingRef, refType, HTMLElementType } from '@mui/utils';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport debounce from '../utils/debounce';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport useForkRef from '../utils/useForkRef';\nimport Grow from '../Grow';\nimport Modal from '../Modal';\nimport PaperBase from '../Paper';\nimport { getPopoverUtilityClass } from './popoverClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getOffsetTop(rect, vertical) {\n let offset = 0;\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n let offset = 0;\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n return offset;\n}\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(n => typeof n === 'number' ? `${n}px` : n).join(' ');\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPopoverUtilityClass, classes);\n};\nexport const PopoverRoot = styled(Modal, {\n name: 'MuiPopover',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const PopoverPaper = styled(PaperBase, {\n name: 'MuiPopover',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {\n var _slotProps$paper, _slots$root, _slots$paper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopover'\n });\n const {\n action,\n anchorEl,\n anchorOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n anchorPosition,\n anchorReference = 'anchorEl',\n children,\n className,\n container: containerProp,\n elevation = 8,\n marginThreshold = 16,\n open,\n PaperProps: PaperPropsProp = {},\n slots,\n slotProps,\n transformOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n TransitionComponent = Grow,\n transitionDuration: transitionDurationProp = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n disableScrollLock = false\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const externalPaperSlotProps = (_slotProps$paper = slotProps == null ? void 0 : slotProps.paper) != null ? _slotProps$paper : PaperPropsProp;\n const paperRef = React.useRef();\n const handlePaperRef = useForkRef(paperRef, externalPaperSlotProps.ref);\n const ownerState = _extends({}, props, {\n anchorOrigin,\n anchorReference,\n elevation,\n marginThreshold,\n externalPaperSlotProps,\n transformOrigin,\n TransitionComponent,\n transitionDuration: transitionDurationProp,\n TransitionProps\n });\n const classes = useUtilityClasses(ownerState);\n\n // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n const getAnchorOffset = React.useCallback(() => {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '.');\n }\n }\n return anchorPosition;\n }\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n\n // If an anchor element wasn't provided, just use the parent body element of this Popover\n const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n const anchorRect = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n const box = anchorElement.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 return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]);\n\n // Returns the base transform origin using the element\n const getTransformOrigin = React.useCallback(elemRect => {\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical),\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n const getPositioningStyle = React.useCallback(element => {\n const elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n\n // Get the transform origin point on the element itself\n const elemTransformOrigin = getTransformOrigin(elemRect);\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }\n\n // Get the offset of the anchoring element\n const anchorOffset = getAnchorOffset();\n\n // Calculate element positioning\n let top = anchorOffset.top - elemTransformOrigin.vertical;\n let left = anchorOffset.left - elemTransformOrigin.horizontal;\n const bottom = top + elemRect.height;\n const right = left + elemRect.width;\n\n // Use the parent window of the anchorEl if provided\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n\n // Window thresholds taking required margin into account\n const heightThreshold = containerWindow.innerHeight - marginThreshold;\n const widthThreshold = containerWindow.innerWidth - marginThreshold;\n\n // Check if the vertical axis needs shifting\n if (marginThreshold !== null && top < marginThreshold) {\n const diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (marginThreshold !== null && bottom > heightThreshold) {\n const diff = bottom - heightThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n }\n\n // Check if the horizontal axis needs shifting\n if (marginThreshold !== null && left < marginThreshold) {\n const diff = left - marginThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n } else if (right > widthThreshold) {\n const diff = right - widthThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n }\n return {\n top: `${Math.round(top)}px`,\n left: `${Math.round(left)}px`,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);\n const [isPositioned, setIsPositioned] = React.useState(open);\n const setPositioningStyles = React.useCallback(() => {\n const element = paperRef.current;\n if (!element) {\n return;\n }\n const positioning = getPositioningStyle(element);\n if (positioning.top !== null) {\n element.style.top = positioning.top;\n }\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n element.style.transformOrigin = positioning.transformOrigin;\n setIsPositioned(true);\n }, [getPositioningStyle]);\n React.useEffect(() => {\n if (disableScrollLock) {\n window.addEventListener('scroll', setPositioningStyles);\n }\n return () => window.removeEventListener('scroll', setPositioningStyles);\n }, [anchorEl, disableScrollLock, setPositioningStyles]);\n const handleEntering = (element, isAppearing) => {\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n setPositioningStyles();\n };\n const handleExited = () => {\n setIsPositioned(false);\n };\n React.useEffect(() => {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, () => open ? {\n updatePosition: () => {\n setPositioningStyles();\n }\n } : null, [open, setPositioningStyles]);\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n const handleResize = debounce(() => {\n setPositioningStyles();\n });\n const containerWindow = ownerWindow(anchorEl);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [anchorEl, open, setPositioningStyles]);\n let transitionDuration = transitionDurationProp;\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\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 const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n const RootSlot = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : PopoverRoot;\n const PaperSlot = (_slots$paper = slots == null ? void 0 : slots.paper) != null ? _slots$paper : PopoverPaper;\n const paperProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: _extends({}, externalPaperSlotProps, {\n style: isPositioned ? externalPaperSlotProps.style : _extends({}, externalPaperSlotProps.style, {\n opacity: 0\n })\n }),\n additionalProps: {\n elevation,\n ref: handlePaperRef\n },\n ownerState,\n className: clsx(classes.paper, externalPaperSlotProps == null ? void 0 : externalPaperSlotProps.className)\n });\n const _useSlotProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: (slotProps == null ? void 0 : slotProps.root) || {},\n externalForwardedProps: other,\n additionalProps: {\n ref,\n slotProps: {\n backdrop: {\n invisible: true\n }\n },\n container,\n open\n },\n ownerState,\n className: clsx(classes.root, className)\n }),\n {\n slotProps: rootSlotPropsProp\n } = _useSlotProps,\n rootProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded3);\n return /*#__PURE__*/_jsx(RootSlot, _extends({}, rootProps, !isHostComponent(RootSlot) && {\n slotProps: rootSlotPropsProp,\n disableScrollLock\n }, {\n children: /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEntering: handleEntering,\n onExited: handleExited,\n timeout: transitionDuration\n }, TransitionProps, {\n children: /*#__PURE__*/_jsx(PaperSlot, _extends({}, paperProps, {\n children: children\n }))\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.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 * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n /**\n * An HTML element, [PopoverVirtualElement](/material-ui/react-popover/#virtual-element),\n * or a function that returns either.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (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 {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \\`${resolvedAnchorEl}\\` instead.`].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * This is the position that may be used to set the position of the popover.\n * The coordinates are relative to the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n /**\n * This determines which anchor prop to refer to when setting\n * the position of the popover.\n * @default 'anchorEl'\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n /**\n * The content of the component.\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 * An HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's 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 * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * The elevation of the popover.\n * @default 8\n */\n elevation: integerPropType,\n /**\n * Specifies how close to the edge of the window the popover can appear.\n * If null, the popover will not be constrained by the window.\n * @default 16\n */\n marginThreshold: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Props applied to the [`Paper`](/material-ui/api/paper/) element.\n *\n * This prop is an alias for `slotProps.paper` and will be overriden by it if both are used.\n * @deprecated Use `slotProps.paper` instead.\n *\n * @default {}\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\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 * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\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 * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Popover;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"autoFocus\", \"children\", \"className\", \"disableAutoFocusItem\", \"MenuListProps\", \"onClose\", \"open\", \"PaperProps\", \"PopoverClasses\", \"transitionDuration\", \"TransitionProps\", \"variant\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useSlotProps } from '@mui/base/utils';\nimport { HTMLElementType } from '@mui/utils';\nimport MenuList from '../MenuList';\nimport Popover, { PopoverPaper } from '../Popover';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getMenuUtilityClass } from './menuClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const MenuPaper = styled(PopoverPaper, {\n name: 'MuiMenu',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tappable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List',\n overridesResolver: (props, styles) => styles.list\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n var _slots$paper, _slotProps$paper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiMenu'\n });\n const {\n autoFocus = true,\n children,\n className,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n variant = 'selectedMenu',\n slots = {},\n slotProps = {}\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const ownerState = _extends({}, props, {\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, theme);\n }\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const PaperSlot = (_slots$paper = slots.paper) != null ? _slots$paper : MenuPaper;\n const paperExternalSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : PaperProps;\n const rootSlotProps = useSlotProps({\n elementType: slots.root,\n externalSlotProps: slotProps.root,\n ownerState,\n className: [classes.root, className]\n });\n const paperSlotProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: paperExternalSlotProps,\n ownerState,\n className: classes.paper\n });\n return /*#__PURE__*/_jsx(MenuRoot, _extends({\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n slots: {\n paper: PaperSlot,\n root: slots.root\n },\n slotProps: {\n root: rootSlotProps,\n paper: paperSlotProps\n },\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n TransitionProps: _extends({\n onEntering: handleEntering\n }, TransitionProps),\n ownerState: ownerState\n }, other, {\n classes: PopoverClasses,\n children: /*#__PURE__*/_jsx(MenuMenuList, _extends({\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant\n }, MenuListProps, {\n className: clsx(classes.list, MenuListProps.className),\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.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 * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n /**\n * Menu contents, normally `MenuItem`s.\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 * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n /**\n * Props applied to the [`MenuList`](/material-ui/api/menu-list/) element.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n /**\n * `classes` prop applied to the [`Popover`](/material-ui/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\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 * @default {}\n */\n TransitionProps: PropTypes.object,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","import '@/components/mui/context-menu.component.css';\nimport MenuItemList, {\n GroupedMenuPropsBase,\n} from '@/components/mui/grouped-menu-item-list.component';\nimport Menu from '@mui/material/Menu';\nimport React, { PropsWithChildren, useCallback, useMemo } from 'react';\n\nexport type ContextMenuProps = GroupedMenuPropsBase & {\n /** Additional css classes to help with styling of the context menu */\n className?: string;\n};\n\n/**\n * A component that wraps its children, making them the \"target\" of a context menu so that the\n * context menu is displayed when the target is right-clicked.\n *\n * @param {ContextMenuProps & PropsWithChildren} props - The properties for the ContextMenu\n * component which define what menu items to display and supply a command handler for when a menu\n * item is clicked.\n * @returns {JSX.Element} The ContextMenu component (including the wrapped children)\n */\nexport default function ContextMenu({\n className,\n commandHandler,\n menuDefinition,\n children,\n}: PropsWithChildren) {\n const [contextMenuPosition, setContextMenuPosition] = React.useState<\n | {\n mouseX: number;\n mouseY: number;\n }\n | undefined\n >(undefined);\n\n const handleContextMenu = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n setContextMenuPosition(\n contextMenuPosition === undefined\n ? {\n mouseX: event.clientX + 2,\n mouseY: event.clientY - 6,\n }\n : // repeated contextmenu when it is already open closes it with Chrome 84 on Ubuntu\n // Other native context menus might behave different.\n // With this behavior we prevent re-locating existing context menus.\n undefined,\n );\n },\n [contextMenuPosition],\n );\n\n const handleClose = useCallback(() => {\n setContextMenuPosition(undefined);\n }, []);\n\n const anchorPosition = useMemo(() => {\n if (contextMenuPosition !== undefined) {\n return { top: contextMenuPosition.mouseY, left: contextMenuPosition.mouseX };\n }\n return undefined;\n }, [contextMenuPosition]);\n\n // If no menu items or children, we don't want to display the context menu at all.\n return (menuDefinition?.items?.length ?? 0) === 0 || !children ? (\n children\n ) : (\n \n {children}\n \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 { 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 ScriptureReference,\n ScriptureSelection,\n scrRefToBBBCCCVVV,\n} from 'platform-bible-utils';\nimport { MouseEvent, useCallback, 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/**\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 [data, setData] = useState(() => {\n // Initial data extraction from sources\n return sources.flatMap((source) => {\n const src = source.source;\n return source.data.map((item) => ({\n ...item,\n source: src,\n }));\n });\n });\n const [rowSelection, setRowSelection] = useState({});\n\n useEffect(() => {\n // Update data whenever sources change\n setData(() => {\n return sources.flatMap((source) => {\n const src = source.source;\n return source.data.map((item) => ({\n ...item,\n source: src,\n }));\n });\n });\n }, [sources]);\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 toRefOrRange = useCallback(\n (start: ScriptureReference, end: ScriptureReference | undefined) => {\n if (!end || compareScrRefs(start, end) === 0) return `${scrRefToBBBCCCVVV(start)}`;\n return `${scrRefToBBBCCCVVV(start)}-${scrRefToBBBCCCVVV(end)}`;\n },\n [],\n );\n\n const getRowKey = useCallback(\n (row: ScriptureSrcItemDetail) =>\n `${toRefOrRange(row.start, row.end)} ${row.source} ${row.detail}`,\n [toRefOrRange],\n );\n\n const table = useReactTable({\n data,\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 = data.find((row) => getRowKey(row) === keys[0]) || undefined;\n if (selectedRow) onRowSelected(selectedRow);\n }\n }\n }, [rowSelection, data, getRowKey, 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 pr-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 'pr-ps-4';\n default:\n return undefined;\n }\n }\n switch (row.depth) {\n case 1:\n return 'pr-ps-8';\n case 2:\n return 'pr-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 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 'pr-text-sm pr-font-medium pr-leading-none peer-disabled:pr-cursor-not-allowed peer-disabled:pr-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 { 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 TextField from '@/components/basics/text-field.component';\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\nexport default function SearchBar({ onSearch, placeholder, isFullWidth }: SearchBarProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const handleInputChange = (searchString: string) => {\n setSearchQuery(searchString);\n onSearch(searchString);\n };\n\n return (\n handleInputChange(e.target.value)}\n />\n );\n}\n","import '@/components/mui/slider.component.css';\nimport { Slider as MuiSlider } from '@mui/material';\nimport { SyntheticEvent } from 'react';\n\nexport type SliderProps = {\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 * The component orientation.\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * The minimum allowed value of the slider. Should not be equal to max.\n *\n * @default 0\n */\n min?: number;\n /**\n * The maximum allowed value of the slider. Should not be equal to min.\n *\n * @default 100\n */\n max?: number;\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.) The `min`\n * prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible\n * by the step.\n *\n * @default 1\n */\n step?: number;\n /**\n * Marks indicate predetermined values to which the user can move the slider. If `true` the marks\n * are spaced according the value of the `step` prop.\n *\n * @default false\n */\n showMarks?: boolean;\n /** The default value. Use when the component is not controlled. */\n defaultValue?: number;\n /** The value of the slider. For ranged sliders, provide an array with two values. */\n value?: number | number[];\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n *\n * @default 'off'\n */\n valueLabelDisplay?: 'on' | 'auto' | 'off';\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (any). Warning: This is a generic event not a change event.\n * @param value The new value.\n * @param activeThumb Index of the currently moved thumb.\n */\n onChange?: (event: Event, value: number | number[], activeThumb: number) => void;\n /**\n * Callback function that is fired when the mouseup is triggered.\n *\n * @param event The event source of the callback. Warning: This is a generic event not a change\n * event.\n * @param value The new value.\n */\n onChangeCommitted?: (\n event: Event | SyntheticEvent,\n value: number | number[],\n ) => void;\n};\n\n/**\n * Slider that allows selecting a value from a range\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Slider({\n id,\n isDisabled = false,\n orientation = 'horizontal',\n min = 0,\n max = 100,\n step = 1,\n showMarks = false,\n defaultValue,\n value,\n valueLabelDisplay = 'off',\n className,\n onChange,\n onChangeCommitted,\n}: SliderProps) {\n return (\n \n );\n}\n\nexport default Slider;\n","import '@/components/mui/snackbar.component.css';\nimport { Snackbar as MuiSnackbar, SnackbarCloseReason, SnackbarOrigin } from '@mui/material';\nimport { PropsWithChildren, ReactNode, SyntheticEvent } from 'react';\n\nexport type CloseReason = SnackbarCloseReason;\nexport type AnchorOrigin = SnackbarOrigin;\n\nexport type SnackbarContentProps = {\n /** The action to display, renders after the message */\n action?: ReactNode;\n\n /** The message to display */\n message?: ReactNode;\n\n /** Additional css classes to help with unique styling of the snackbar, internal */\n className?: string;\n};\n\nexport type SnackbarProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n\n /**\n * If true, the component is shown\n *\n * @default false\n */\n isOpen?: boolean;\n\n /**\n * The number of milliseconds to wait before automatically calling onClose()\n *\n * @default undefined\n */\n autoHideDuration?: number;\n\n /** Additional css classes to help with unique styling of the snackbar, external */\n className?: string;\n\n /**\n * Optional, used to control the open prop event: Event | SyntheticEvent, reason:\n * string\n */\n onClose?: (event: Event | SyntheticEvent, reason: CloseReason) => void;\n\n /**\n * The anchor of the `Snackbar`. The horizontal alignment is ignored.\n *\n * @default { vertical: 'bottom', horizontal: 'left' }\n */\n anchorOrigin?: AnchorOrigin;\n\n /** Props applied to the [`SnackbarContent`](/material-ui/api/snackbar-content/) element. */\n ContentProps?: SnackbarContentProps;\n}>;\n\n/**\n * Snackbar that provides brief notifications\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Snackbar({\n autoHideDuration = undefined,\n id,\n isOpen = false,\n className,\n onClose,\n anchorOrigin = { vertical: 'bottom', horizontal: 'left' },\n ContentProps,\n children,\n}: SnackbarProps) {\n const newContentProps: SnackbarContentProps = {\n action: ContentProps?.action || children,\n message: ContentProps?.message,\n className,\n };\n\n return (\n \n );\n}\n\nexport default Snackbar;\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 '@/components/mui/switch.component.css';\nimport { Switch as MuiSwitch } from '@mui/material';\nimport { ChangeEvent } from 'react';\n\nexport type SwitchProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/**\n * Switch to toggle on and off\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Switch({\n id,\n isChecked: checked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: SwitchProps) {\n return (\n \n );\n}\n\nexport default Switch;\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 { 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 * 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","// 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 { 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*as t from\"react\";function n(){return n=Object.assign?Object.assign.bind():function(t){for(var n=1;n(t[n.toLowerCase()]=n,t),{for:\"htmlFor\"}),o={amp:\"&\",apos:\"'\",gt:\">\",lt:\"<\",nbsp:\" \",quot:\"“\"},c=[\"style\",\"script\"],a=/([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi,_=/mailto:/i,u=/\\n{2,}$/,i=/^( *>[^\\n]+(\\n[^\\n]+)*\\n*)+\\n{2,}/,s=/^ *> ?/gm,l=/^ {2,}\\n/,f=/^(?:( *[-*_])){3,} *(?:\\n *)+\\n/,d=/^\\s*(`{3,}|~{3,}) *(\\S+)?([^\\n]*?)?\\n([\\s\\S]+?)\\s*\\1 *(?:\\n *)*\\n?/,p=/^(?: {4}[^\\n]+\\n*)+(?:\\n *)+\\n?/,m=/^(`+)\\s*([\\s\\S]*?[^`])\\s*\\1(?!`)/,g=/^(?:\\n *)*\\n/,y=/\\r\\n?/g,h=/^\\[\\^([^\\]]+)](:.*)\\n/,k=/^\\[\\^([^\\]]+)]/,x=/\\f/g,b=/^\\s*?\\[(x|\\s)\\]/,$=/^ *(#{1,6}) *([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/,v=/^ *(#{1,6}) +([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/,S=/^([^\\n]+)\\n *(=|-){3,} *(?:\\n *)+\\n/,z=/^ *(?!<[a-z][^ >/]* ?\\/>)<([a-z][^ >/]*) ?([^>]*)\\/{0}>\\n?(\\s*(?:<\\1[^>]*?>[\\s\\S]*?<\\/\\1>|(?!<\\1)[\\s\\S])*?)<\\/\\1>\\n*/i,w=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,A=/^)/,E=/^(data|aria|x)-[a-z_][a-z\\d_.-]*$/,L=/^ *<([a-z][a-z0-9:]*)(?:\\s+((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+\"}const ut=_t(1),it=_t(2);function st(t){return new RegExp(\"^\"+(1===t?ut:it))}const lt=st(1),ft=st(2);function dt(t){return new RegExp(\"^\"+(1===t?ut:it)+\"[^\\\\n]*(?:\\\\n(?!\\\\1\"+(1===t?ct:at)+\" )[^\\\\n]*)*(\\\\n|$)\",\"gm\")}const pt=dt(1),mt=dt(2);function gt(t){const n=1===t?ct:at;return new RegExp(\"^( *)(\"+n+\") [\\\\s\\\\S]+?(?:\\\\n{2,}(?! )(?!\\\\1\"+n+\" (?!\"+n+\" ))\\\\n*|\\\\s*\\\\n*$)\")}const yt=gt(1),ht=gt(2);function kt(t,n){const e=1===n,r=e?yt:ht,o=e?pt:mt,c=e?lt:ft;return{t(t,n,e){const o=ot.exec(e);return o&&(n.o||!n._&&!n.u)?r.exec(t=o[1]+t):null},i:Ht.HIGH,l(t,n,r){const a=e?+t[2]:void 0,_=t[0].replace(u,\"\\n\").match(o);let i=!1;return{p:_.map(function(t,e){const o=c.exec(t)[0].length,a=new RegExp(\"^ {1,\"+o+\"}\",\"gm\"),u=t.replace(a,\"\").replace(c,\"\"),s=e===_.length-1,l=-1!==u.indexOf(\"\\n\\n\")||s&&i;i=l;const f=r._,d=r.o;let p;r.o=!0,l?(r._=!1,p=u.replace(rt,\"\\n\\n\")):(r._=!0,p=u.replace(rt,\"\"));const m=n(p,r);return r._=f,r.o=d,m}),m:e,g:a}},h:(n,e,r)=>t(n.m?\"ol\":\"ul\",{key:r.k,start:n.g},n.p.map(function(n,o){return t(\"li\",{key:o},e(n,r))}))}}const xt=/^\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,bt=/^!\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,$t=[i,d,p,$,S,v,A,R,pt,yt,mt,ht],vt=[...$t,/^[^\\n]+(?: \\n|\\n{2,})/,z,L];function St(t){return t.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,\"a\").replace(/[çÇ]/g,\"c\").replace(/[ðÐ]/g,\"d\").replace(/[ÈÉÊËéèêë]/g,\"e\").replace(/[ÏïÎîÍíÌì]/g,\"i\").replace(/[Ññ]/g,\"n\").replace(/[øØœŒÕõÔôÓóÒò]/g,\"o\").replace(/[ÜüÛûÚúÙù]/g,\"u\").replace(/[ŸÿÝý]/g,\"y\").replace(/[^a-z0-9- ]/gi,\"\").replace(/ /gi,\"-\").toLowerCase()}function zt(t){return V.test(t)?\"right\":q.test(t)?\"center\":U.test(t)?\"left\":null}function wt(t,n,e){const r=e.$;e.$=!0;const o=n(t.trim(),e);e.$=r;let c=[[]];return o.forEach(function(t,n){\"tableSeparator\"===t.type?0!==n&&n!==o.length-1&&c.push([]):(\"text\"!==t.type||null!=o[n+1]&&\"tableSeparator\"!==o[n+1].type||(t.v=t.v.replace(H,\"\")),c[c.length-1].push(t))}),c}function At(t,n,e){e._=!0;const r=wt(t[1],n,e),o=t[2].replace(G,\"\").split(\"|\").map(zt),c=function(t,n,e){return t.trim().split(\"\\n\").map(function(t){return wt(t,n,e)})}(t[3],n,e);return e._=!1,{S:o,A:c,L:r,type:\"table\"}}function Et(t,n){return null==t.S[n]?{}:{textAlign:t.S[n]}}function Lt(t){return function(n,e){return e._?t.exec(n):null}}function Mt(t){return function(n,e){return e._||e.u?t.exec(n):null}}function Ot(t){return function(n,e){return e._||e.u?null:t.exec(n)}}function It(t){return function(n){return t.exec(n)}}function jt(t,n,e){if(n._||n.u)return null;if(e&&!e.endsWith(\"\\n\"))return null;let r=\"\";t.split(\"\\n\").every(t=>!$t.some(n=>n.test(t))&&(r+=t+\"\\n\",t.trim()));const o=r.trimEnd();return\"\"==o?null:[r,o]}function Bt(t){try{if(decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,\"\").match(/^\\s*(javascript|vbscript|data(?!:image)):/i))return}catch(t){return null}return t}function Rt(t){return t.replace(et,\"$1\")}function Tt(t,n,e){const r=e._||!1,o=e.u||!1;e._=!0,e.u=!0;const c=t(n,e);return e._=r,e.u=o,c}function Ct(t,n,e){const r=e._||!1,o=e.u||!1;e._=!1,e.u=!0;const c=t(n,e);return e._=r,e.u=o,c}function Dt(t,n,e){return e._=!1,t(n,e)}const Ft=(t,n,e)=>({v:Tt(n,t[1],e)});function Nt(){return{}}function Pt(){return null}function Zt(...t){return t.filter(Boolean).join(\" \")}function Gt(t,n,e){let r=t;const o=n.split(\".\");for(;o.length&&(r=r[o[0]],void 0!==r);)o.shift();return r||e}var Ht;function qt(e,u={}){u.overrides=u.overrides||{},u.slugify=u.slugify||St,u.namedCodesToUnicode=u.namedCodesToUnicode?n({},o,u.namedCodesToUnicode):o;const G=u.createElement||t.createElement;function H(t,e,...r){const o=Gt(u.overrides,`${t}.props`,{});return G(function(t,n){const e=Gt(n,t);return e?\"function\"==typeof e||\"object\"==typeof e&&\"render\"in e?e:Gt(n,`${t}.component`,t):t}(t,u.overrides),n({},e,o,{className:Zt(null==e?void 0:e.className,o.className)||void 0}),...r)}function q(n){let e=!1;u.forceInline?e=!0:u.forceBlock||(e=!1===N.test(n));const r=ct(ot(e?n:`${n.trimEnd().replace(tt,\"\")}\\n\\n`,{_:e}));for(;\"string\"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===u.wrapper)return r;const o=u.wrapper||(e?\"span\":\"div\");let c;if(r.length>1||u.forceWrapper)c=r;else{if(1===r.length)return c=r[0],\"string\"==typeof c?H(\"span\",{key:\"outer\"},c):c;c=null}return t.createElement(o,{key:\"outer\"},c)}function U(n){const e=n.match(a);return e?e.reduce(function(n,e,o){const c=e.indexOf(\"=\");if(-1!==c){const a=function(t){return-1!==t.indexOf(\"-\")&&null===t.match(E)&&(t=t.replace(B,function(t,n){return n.toUpperCase()})),t}(e.slice(0,c)).trim(),_=function(t){const n=t[0];return('\"'===n||\"'\"===n)&&t.length>=2&&t[t.length-1]===n?t.slice(1,-1):t}(e.slice(c+1).trim()),u=r[a]||a,i=n[u]=function(t,n){return\"style\"===t?n.split(/;\\s?/).reduce(function(t,n){const e=n.slice(0,n.indexOf(\":\"));return t[e.replace(/(-[a-z])/g,t=>t[1].toUpperCase())]=n.slice(e.length+1).trim(),t},{}):\"href\"===t?Bt(n):(n.match(M)&&(n=n.slice(1,n.length-1)),\"true\"===n||\"false\"!==n&&n)}(a,_);\"string\"==typeof i&&(z.test(i)||L.test(i))&&(n[u]=t.cloneElement(q(i.trim()),{key:o}))}else\"style\"!==e&&(n[r[e]||e]=!0);return n},{}):null}const V=[],et={},rt={blockQuote:{t:Ot(i),i:Ht.HIGH,l:(t,n,e)=>({v:n(t[0].replace(s,\"\"),e)}),h:(t,n,e)=>H(\"blockquote\",{key:e.k},n(t.v,e))},breakLine:{t:It(l),i:Ht.HIGH,l:Nt,h:(t,n,e)=>H(\"br\",{key:e.k})},breakThematic:{t:Ot(f),i:Ht.HIGH,l:Nt,h:(t,n,e)=>H(\"hr\",{key:e.k})},codeBlock:{t:Ot(p),i:Ht.MAX,l:t=>({v:t[0].replace(/^ {4}/gm,\"\").replace(/\\n+$/,\"\"),M:void 0}),h:(t,e,r)=>H(\"pre\",{key:r.k},H(\"code\",n({},t.O,{className:t.M?`lang-${t.M}`:\"\"}),t.v))},codeFenced:{t:Ot(d),i:Ht.MAX,l:t=>({O:U(t[3]||\"\"),v:t[4],M:t[2]||void 0,type:\"codeBlock\"})},codeInline:{t:Mt(m),i:Ht.LOW,l:t=>({v:t[2]}),h:(t,n,e)=>H(\"code\",{key:e.k},t.v)},footnote:{t:Ot(h),i:Ht.MAX,l:t=>(V.push({I:t[2],j:t[1]}),{}),h:Pt},footnoteReference:{t:Lt(k),i:Ht.HIGH,l:t=>({v:t[1],B:`#${u.slugify(t[1])}`}),h:(t,n,e)=>H(\"a\",{key:e.k,href:Bt(t.B)},H(\"sup\",{key:e.k},t.v))},gfmTask:{t:Lt(b),i:Ht.HIGH,l:t=>({R:\"x\"===t[1].toLowerCase()}),h:(t,n,e)=>H(\"input\",{checked:t.R,key:e.k,readOnly:!0,type:\"checkbox\"})},heading:{t:Ot(u.enforceAtxHeadings?v:$),i:Ht.HIGH,l:(t,n,e)=>({v:Tt(n,t[2],e),T:u.slugify(t[2]),C:t[1].length}),h:(t,n,e)=>H(`h${t.C}`,{id:t.T,key:e.k},n(t.v,e))},headingSetext:{t:Ot(S),i:Ht.MAX,l:(t,n,e)=>({v:Tt(n,t[1],e),C:\"=\"===t[2]?1:2,type:\"heading\"})},htmlComment:{t:It(A),i:Ht.HIGH,l:()=>({}),h:Pt},image:{t:Mt(bt),i:Ht.HIGH,l:t=>({D:t[1],B:Rt(t[2]),F:t[3]}),h:(t,n,e)=>H(\"img\",{key:e.k,alt:t.D||void 0,title:t.F||void 0,src:Bt(t.B)})},link:{t:Lt(xt),i:Ht.LOW,l:(t,n,e)=>({v:Ct(n,t[1],e),B:Rt(t[2]),F:t[3]}),h:(t,n,e)=>H(\"a\",{key:e.k,href:Bt(t.B),title:t.F},n(t.v,e))},linkAngleBraceStyleDetector:{t:Lt(j),i:Ht.MAX,l:t=>({v:[{v:t[1],type:\"text\"}],B:t[1],type:\"link\"})},linkBareUrlDetector:{t:(t,n)=>n.N?null:Lt(O)(t,n),i:Ht.MAX,l:t=>({v:[{v:t[1],type:\"text\"}],B:t[1],F:void 0,type:\"link\"})},linkMailtoDetector:{t:Lt(I),i:Ht.MAX,l(t){let n=t[1],e=t[1];return _.test(e)||(e=\"mailto:\"+e),{v:[{v:n.replace(\"mailto:\",\"\"),type:\"text\"}],B:e,type:\"link\"}}},orderedList:kt(H,1),unorderedList:kt(H,2),newlineCoalescer:{t:Ot(g),i:Ht.LOW,l:Nt,h:()=>\"\\n\"},paragraph:{t:jt,i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"p\",{key:e.k},n(t.v,e))},ref:{t:Lt(T),i:Ht.MAX,l:t=>(et[t[1]]={B:t[2],F:t[4]},{}),h:Pt},refImage:{t:Mt(C),i:Ht.MAX,l:t=>({D:t[1]||void 0,P:t[2]}),h:(t,n,e)=>H(\"img\",{key:e.k,alt:t.D,src:Bt(et[t.P].B),title:et[t.P].F})},refLink:{t:Lt(D),i:Ht.MAX,l:(t,n,e)=>({v:n(t[1],e),Z:n(t[0].replace(F,\"\\\\$1\"),e),P:t[2]}),h:(t,n,e)=>et[t.P]?H(\"a\",{key:e.k,href:Bt(et[t.P].B),title:et[t.P].F},n(t.v,e)):H(\"span\",{key:e.k},n(t.Z,e))},table:{t:Ot(R),i:Ht.HIGH,l:At,h:(t,n,e)=>H(\"table\",{key:e.k},H(\"thead\",null,H(\"tr\",null,t.L.map(function(r,o){return H(\"th\",{key:o,style:Et(t,o)},n(r,e))}))),H(\"tbody\",null,t.A.map(function(r,o){return H(\"tr\",{key:o},r.map(function(r,o){return H(\"td\",{key:o,style:Et(t,o)},n(r,e))}))})))},tableSeparator:{t:function(t,n){return n.$?(n._=!0,Z.exec(t)):null},i:Ht.HIGH,l:function(){return{type:\"tableSeparator\"}},h:()=>\" | \"},text:{t:It(Y),i:Ht.MIN,l:t=>({v:t[0].replace(w,(t,n)=>u.namedCodesToUnicode[n]?u.namedCodesToUnicode[n]:t)}),h:t=>t.v},textBolded:{t:Mt(W),i:Ht.MED,l:(t,n,e)=>({v:n(t[2],e)}),h:(t,n,e)=>H(\"strong\",{key:e.k},n(t.v,e))},textEmphasized:{t:Mt(Q),i:Ht.LOW,l:(t,n,e)=>({v:n(t[2],e)}),h:(t,n,e)=>H(\"em\",{key:e.k},n(t.v,e))},textEscaped:{t:Mt(K),i:Ht.HIGH,l:t=>({v:t[1],type:\"text\"})},textMarked:{t:Mt(X),i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"mark\",{key:e.k},n(t.v,e))},textStrikethroughed:{t:Mt(J),i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"del\",{key:e.k},n(t.v,e))}};!0!==u.disableParsingRawHTML&&(rt.htmlBlock={t:It(z),i:Ht.HIGH,l(t,n,e){const[,r]=t[3].match(nt),o=new RegExp(`^${r}`,\"gm\"),a=t[3].replace(o,\"\"),_=(u=a,vt.some(t=>t.test(u))?Dt:Tt);var u;const i=t[1].toLowerCase(),s=-1!==c.indexOf(i);e.N=e.N||\"a\"===i;const l=s?t[3]:_(n,a,e);return e.N=!1,{O:U(t[2]),v:l,G:s,H:s?i:t[1]}},h:(t,e,r)=>H(t.H,n({key:r.k},t.O),t.G?t.v:e(t.v,r))},rt.htmlSelfClosing={t:It(L),i:Ht.HIGH,l:t=>({O:U(t[2]||\"\"),H:t[1]}),h:(t,e,r)=>H(t.H,n({},t.O,{key:r.k}))});const ot=function(t){let n=Object.keys(t);function e(r,o){let c=[],a=\"\";for(;r;){let _=0;for(;_{let{children:r,options:o}=n,c=function(t,n){if(null==t)return{};var e,r,o={},c=Object.keys(t);for(r=0;r=0||(o[e]=t[e]);return o}(n,e);return t.cloneElement(qt(r,o),c)};export{qt as compiler};\n//# sourceMappingURL=index.modern.js.map\n","import Markdown from 'markdown-to-jsx';\n\ninterface MarkdownRendererProps {\n /** Optional unique identifier */\n id?: string;\n /** The markdown string to render */\n markdown: 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({ id, markdown }: MarkdownRendererProps) {\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=\"pr-text-xs pr-text-gray-500 pr-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=\"pr-text-xs pr-text-gray-500 pr-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","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 React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst alertVariants = cva(\n 'pr-relative pr-w-full pr-rounded-lg pr-border pr-p-4 [&>svg~*]:pr-pl-7 [&>svg+div]:pr-translate-y-[-3px] [&>svg]:pr-absolute [&>svg]:pr-left-4 [&>svg]:pr-top-4 [&>svg]:pr-text-foreground',\n {\n variants: {\n variant: {\n default: 'pr-bg-background pr-text-foreground',\n destructive:\n 'pr-border-destructive/50 pr-text-destructive dark:pr-border-destructive [&>svg]:pr-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 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"],"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","DataTableViewOptions","table","FilterIcon","column","value","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","getLinesFromUSFM","text","extractNumberFromUSFM","regex","match","extractOccurrences","item","extractItems","scriptureRef","results","lines","currentChapter","currentVerse","line","items","result","OccurrencesTable","selectedItem","scriptureReference","setScriptureReference","localizedStrings","reference","occurrence","tableData","setTableData","INVENTORY_STRING_KEYS","getSortingIcon","sortDirection","ArrowUpIcon","ArrowDownIcon","ArrowUpDownIcon","filterItemData","statusFilter","textFilter","filteredItemData","convertTextToItemData","getInventoryItems","getStatusForItem","itemData","itemIndex","existingItem","entry","newItem","localizeString","strings","Inventory","approvedItems","onApprovedItemsChange","unapprovedItems","onUnapprovedItemsChange","scope","onScopeChange","getColumns","allItemsText","approvedItemsText","unapprovedItemsText","unknownItemsText","scopeBookText","scopeChapterText","scopeVerseText","filterText","setItems","setStatusFilter","setTextFilter","setSelectedItem","statusChangeHandler","changedItems","status","prevTableData","tableEntry","newApprovedItems","validItem","newUnapprovedItems","unapprovedItem","useMemo","rowClickHandler","newScriptureReference","inventoryItemColumn","itemLabel","inventoryCountColumn","countLabel","inventoryStatusColumn","statusLabel","selectedRows","CircleCheckIcon","CircleXIcon","CircleHelpIcon","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","onChange","getOptionLabel","buttonPlaceholder","textPlaceholder","commandEmptyMessage","buttonVariant","dir","setOpen","ChevronsUpDown","ChapterRangeSelector","handleSelectStartChapter","handleSelectEndChapter","isDisabled","chapterCount","startChapter","setStartChapter","setEndChapter","chapterOptions","setChapterOptions","onChangeStartChapter","onChangeEndChapter","Fragment","FormControlLabel","LabelPosition","Checkbox","isChecked","labelText","labelPosition","isIndeterminate","isDefaultChecked","hasError","checkBox","MuiCheckbox","preceding","labelSpan","labelIsInline","label","checkBoxElement","FormLabel","Checklist","legend","listItems","selectedListItems","handleSelectListItem","createLabel","_interopRequireDefault","obj","module","chainPropTypes","propType1","propType2","args","_extends","target","source","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","isSymbol","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","isClassComponent","elementType","acceptingRef","safePropName","warningHint","elementAcceptingRef","PropTypes","elementAcceptingRef$1","elementTypeAcceptingRef","elementTypeAcceptingRef$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","getScrollbarSize","documentWidth","getTypeByValue","valueType","ponyfillIsInteger","isInteger","requiredInteger","other","validatorNoop","integerPropType","resolveProps","defaultProps","defaultSlotProps","slotProps","slotPropName","composeClasses","slots","getUtilityClass","classes","slot","utilityClass","defaultGenerator","createClassNameGenerator","generate","generator","ClassNameGenerator","ClassNameGenerator$1","globalStateClasses","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","clamp","min","max","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","breakpoints","unit","sortedValues","keys","up","down","between","start","end","endIndex","only","not","keyIndex","shape","shape$1","responsivePropType","responsivePropType$1","merge","defaultBreakpoints","handleBreakpoints","styleFromPropValue","theme","themeBreakpoints","index","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","direction","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","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","primary","secondary","info","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","candidatesSelector","getTabIndex","tabindexAttr","isNonTabbableRadio","getRadio","selector","roving","isNodeMatchingSelectorFocusable","defaultGetTabbable","root","regularTabNodes","orderedTabNodes","nodeTabIndex","defaultIsEnabled","FocusTrap","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","rootRef","handleRef","lastKeydown","loopFocus","nativeEvent","contain","rootElement","tabbable","_lastKeydown$current","_lastKeydown$current2","isShiftTab","focusNext","focusPrevious","interval","onFocus","childrenPropsHandler","handleFocusSentinel","getContainer","container","forwardedRef","disablePortal","mountNode","setMountNode","newProps","ReactDOM","isOverflowing","ariaHidden","show","getPaddingRight","isAriaHiddenForbiddenOnElement","isForbiddenTagName","isInputHidden","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","blacklist","isNotExcludedElement","isNotForbiddenElement","findIndexOf","callback","idx","handleContainer","containerInfo","restoreStyle","scrollbarSize","fixedElements","scrollContainer","parent","containerWindow","el","getHiddenSiblings","hiddenSiblings","ModalManager","modal","modalIndex","containerIndex","ariaHiddenState","nextTop","getHasTransition","defaultManager","useModal","disableEscapeKeyDown","disableScrollLock","manager","closeAfterTransition","onTransitionEnter","onTransitionExited","onClose","mountNodeRef","modalRef","exited","setExited","hasTransition","ariaHiddenProp","getDoc","getModal","handleMounted","handleOpen","resolvedContainer","isTopModal","handlePortalRef","handleClose","createHandleKeyDown","otherHandlers","_otherHandlers$onKeyD","createHandleBackdropClick","_otherHandlers$onClic","propsEventHandlers","externalEventHandlers","handleEnter","handleExited","top","bottom","right","left","auto","basePlacements","clippingParents","viewport","popper","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","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","resolvedAnchorEl","display","transitionProps","useThemeSystem","_setPrototypeOf","_inheritsLoose","subClass","superClass","setPrototypeOf","timeoutsShape","TransitionGroupContext","forceReflow","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","context","_this","parentGroup","appear","initialStatus","prevState","nextIn","_proto","prevProps","nextStatus","exit","enter","mounting","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","_this3","nextState","_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","getOverlayAlpha","elevation","alphaValue","getOverlayAlpha$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","onOpen","openProp","PopperComponentProp","PopperProps","title","TransitionComponentProp","isRtl","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","handleLeave","focusVisibleRef","setChildIsFocusVisible","handleBlur","handleFocus","detectTouchStart","childrenProps","handleMouseOver","handleMouseLeave","handleTouchStart","handleTouchEnd","handleMouseMove","nameOrDescProps","titleIsString","interactiveWrapperListeners","_PopperProps$popperOp","tooltipModifiers","PopperComponent","TooltipComponent","ArrowComponent","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","Tooltip$1","getIcon","icon","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","firstItem","divKey","itemInfo","menuItemProps","TopLevelMenu","columnId","MenuColumn","metadata","Grid","List","GridMenu","multiColumnMenu","sortedColumns","columnNumbers","columnName","col","ListContext","ListContext$1","getListUtilityClass","disablePadding","dense","subheader","ListRoot","List$1","nextItem","disableListWrap","previousItem","textCriteriaMatches","nextFocus","textCriteria","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","MenuList","actions","autoFocus","autoFocusItem","onKeyDown","listRef","textCriteriaRef","containerElement","noExplicitWidth","criteria","lowerKey","currTime","keepFocusOnCurrent","activeItemIndex","newChildProps","MenuList$1","Fade","defaultTimeout","Fade$1","getBackdropUtilityClass","invisible","BackdropRoot","Backdrop","_slotProps$root","rootSlotProps","Backdrop$1","getModalUtilityClass","ModalRoot","ModalBackdrop","Modal","_slots$backdrop","_slotProps$backdrop","BackdropComponent","BackdropProps","hideBackdrop","onBackdropClick","propsWithDefaults","getRootProps","getBackdropProps","portalRef","RootSlot","BackdropSlot","backdropSlotProps","backdropProps","Modal$1","getPaperUtilityClass","square","PaperRoot","_theme$vars$overlays","Paper","PaperBase","getPopoverUtilityClass","getOffsetTop","vertical","getOffsetLeft","horizontal","getTransformOriginValue","transformOrigin","PopoverRoot","PopoverPaper","_slotProps$paper","_slots$paper","action","anchorOrigin","anchorPosition","anchorReference","marginThreshold","PaperPropsProp","transitionDurationProp","externalPaperSlotProps","paperRef","handlePaperRef","getAnchorOffset","anchorElement","anchorRect","getTransformOrigin","elemRect","getPositioningStyle","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","diff","isPositioned","setIsPositioned","setPositioningStyles","positioning","handleResize","PaperSlot","paperProps","_useSlotProps","rootSlotPropsProp","Popover$1","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","MenuPaper","MenuMenuList","disableAutoFocusItem","MenuListProps","PaperProps","PopoverClasses","menuListActionsRef","handleListKeyDown","paperExternalSlotProps","paperSlotProps","Menu$1","ContextMenu","contextMenuPosition","setContextMenuPosition","handleContextMenu","MenuItemList","getUsePromiseOptionsDefaults","usePromise","promiseFactoryCallback","defaultValueRef","optionsDefaultedRef","isLoading","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","scrBookColId","scrRefColId","typeColId","detailsColId","defaultScrRefColumnName","defaultScrBookGroupName","defaultTypeColumnName","defaultDetailsColumnName","colInfo","showSourceColumn","showSrcCol","formatScrRef","compareScrRefs","ScriptureResultsViewer","sources","showColumnHeaders","scriptureReferenceColumnName","scriptureBookGroupName","typeColumnName","detailsColumnName","onRowSelected","grouping","setGrouping","setData","src","toRefOrRange","scrRefToBBBCCCVVV","getRowKey","getExpandedRowModel","getGroupedRowModel","selectedRow","scrBookGroupName","typeGroupName","groupingOptions","handleSelectChange","selectedGrouping","handleRowClick","getEvenOrOddBandingStyle","getIndent","groupingState","rowIndex","ChevronLeft","labelVariants","Label","LabelPrimitive","TextField","isFullWidth","helperText","placeholder","onBlur","ShadLabel","SearchBar","onSearch","handleInputChange","Slider","orientation","showMarks","valueLabelDisplay","onChangeCommitted","MuiSlider","Snackbar","autoHideDuration","isOpen","ContentProps","newContentProps","MuiSnackbar","Spinner","LoaderCircle","Switch","MuiSwitch","Toolbar","AppBar","MuiToolbar","Tabs","TabsPrimitive","TabsList","TabsTrigger","TabsContent","VerticalTabs","VerticalTabsList","VerticalTabsTrigger","VerticalTabsContent","InstallButton","isInstalling","handleClick","buttonText","Download","EnableButton","isEnabling","DisableButton","isDisabling","UpdateButton","isUpdating","$","M","j","F","Z","W","Q","Y","tt","nt","et","rt","ot","ct","at","_t","ut","it","st","lt","ft","dt","mt","gt","yt","ht","kt","Ht","xt","bt","$t","vt","St","zt","wt","At","Et","Lt","Mt","Ot","It","jt","Bt","Rt","Tt","Ct","Dt","Ft","Nt","Pt","Zt","Gt","qt","Markdown","MarkdownRenderer","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","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","alertVariants","Alert","AlertTitle","AlertDescription","SliderPrimitive","SwitchPrimitives"],"mappings":"+mCAGA,MAAMA,GAAgBC,GAAAA,oBAAoB,CAAE,OAAQ,KAAO,CAAA,EAIpD,SAASC,KAAMC,EAAsB,CACnC,OAAAH,GAAcI,GAAAA,KAAKD,CAAM,CAAC,CACnC,CCJO,MAAME,GAAQC,EAAM,WACzB,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAA,EAASC,IAE5BC,EAAA,IAAC,QAAA,CACC,KAAAH,EACA,UAAWN,EACT,6QACAK,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,uLACV,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,GAAA,QAAA,CACC,UAAU,sHACV,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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AOA,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,UAAWpnB,IAAU,CACnB,eAAgB,CACd,QAASA,CACV,CACP,EACG,EACD,QAAS,CAAE,EACX,SAAU,CAAE,EACZ,aAAc,CAAE,EAChB,WAAY,CAAE,EACd,WAAY,CAAE,EAEd,UAAW,CAAE,EACb,cAAe,CAAE,EACjB,SAAU,CAAE,EACZ,eAAgB,CAAE,EAClB,WAAY,CAAE,EACd,aAAc,CAAE,EAChB,MAAO,CAAE,EACT,KAAM,CAAE,EACR,SAAU,CAAE,EACZ,WAAY,CAAE,EACd,UAAW,CAAE,EACb,aAAc,CAAE,EAChB,YAAa,CAAE,EAEf,IAAK,CACH,MAAO6oB,EACR,EACD,OAAQ,CACN,M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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,27,28,29,30,31,32,33,34,35,36,37,38,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,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,233,251]} \ 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/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/inventory-utils.ts","../src/components/advanced/inventory/occurrences-table.component.tsx","../src/components/advanced/inventory/inventory.component.tsx","../src/components/advanced/inventory/inventory-columns.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/mui/chapter-range-selector.component.tsx","../src/components/mui/label-position.model.ts","../src/components/mui/checkbox.component.tsx","../src/components/mui/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/elementTypeAcceptingRef/elementTypeAcceptingRef.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/getScrollbarSize/getScrollbarSize.js","../../../node_modules/@mui/utils/integerPropType/integerPropType.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/FocusTrap/FocusTrap.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@mui/base/unstable_useModal/ModalManager.js","../../../node_modules/@mui/base/unstable_useModal/useModal.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/styles/getOverlayAlpha.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","../../../node_modules/@mui/material/List/ListContext.js","../../../node_modules/@mui/material/List/listClasses.js","../../../node_modules/@mui/material/List/List.js","../../../node_modules/@mui/material/MenuList/MenuList.js","../../../node_modules/@mui/material/Fade/Fade.js","../../../node_modules/@mui/material/Backdrop/backdropClasses.js","../../../node_modules/@mui/material/Backdrop/Backdrop.js","../../../node_modules/@mui/material/Modal/modalClasses.js","../../../node_modules/@mui/material/Modal/Modal.js","../../../node_modules/@mui/material/Paper/paperClasses.js","../../../node_modules/@mui/material/Paper/Paper.js","../../../node_modules/@mui/material/Popover/popoverClasses.js","../../../node_modules/@mui/material/Popover/Popover.js","../../../node_modules/@mui/material/Menu/menuClasses.js","../../../node_modules/@mui/material/Menu/Menu.js","../src/components/mui/context-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/advanced/scripture-results-viewer/scripture-results-viewer.component.tsx","../src/components/basics/search-bar.component.tsx","../src/components/mui/slider.component.tsx","../src/components/mui/snackbar.component.tsx","../src/components/basics/tabs-vertical.tsx","../src/components/advanced/navigation-content-search.component.tsx","../src/components/shadcn-ui/separator.tsx","../src/components/advanced/settings-components/settings-list.component.tsx","../src/components/basics/spinner.component.tsx","../src/components/mui/switch.component.tsx","../src/components/shadcn-ui/label.tsx","../src/components/basics/text-field.component.tsx","../src/components/mui/toolbar.component.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","../../../node_modules/markdown-to-jsx/dist/index.modern.js","../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","../src/components/shadcn-ui/card.tsx","../src/components/shadcn-ui/alert.tsx","../src/components/shadcn-ui/slider.tsx","../src/components/shadcn-ui/switch.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst twMergeCustom = extendTailwindMerge({ prefix: 'pr-' });\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 pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-md pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50',\n {\n variants: {\n variant: {\n default: 'pr-bg-primary pr-text-primary-foreground hover:pr-bg-primary/90',\n destructive: 'pr-bg-destructive pr-text-destructive-foreground hover:pr-bg-destructive/90',\n outline:\n 'pr-border pr-border-input pr-bg-background hover:pr-bg-accent hover:pr-text-accent-foreground',\n secondary: 'pr-bg-secondary pr-text-secondary-foreground hover:pr-bg-secondary/80',\n ghost: 'hover:pr-bg-accent hover:pr-text-accent-foreground',\n link: 'pr-text-primary pr-underline-offset-4 hover:pr-underline',\n },\n size: {\n default: 'pr-h-10 pr-px-4 pr-py-2',\n sm: 'pr-h-9 pr-rounded-md pr-px-3',\n lg: 'pr-h-11 pr-rounded-md pr-px-8',\n icon: 'pr-h-10 pr-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 { 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]:pr-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:pr-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 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;\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\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","export const getLinesFromUSFM = (text: string) => {\n return text.split(/(?=\\n|\\\\(?:v|c|id))/g);\n};\n\nexport const extractNumberFromUSFM = (text: string): number => {\n const regex = /^\\\\[vc]\\s+(\\d+)/;\n const match = text.match(regex);\n if (match) {\n return +match[1];\n }\n return 0;\n};\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 { LanguageStrings, ScriptureReference } from 'platform-bible-utils';\nimport { useEffect, useState } from 'react';\nimport { extractNumberFromUSFM, getLinesFromUSFM } from './inventory-utils';\n\ntype SearchResult = {\n reference: ScriptureReference;\n snippet: string;\n key: number;\n};\n\nconst extractOccurrences = (\n text: string | undefined,\n item: string,\n extractItems: (text: string, item?: string | undefined) => string[],\n scriptureRef: ScriptureReference,\n): SearchResult[] => {\n if (!text || text === '' || item === '') return [];\n\n const results: SearchResult[] = [];\n const lines = getLinesFromUSFM(text);\n\n let currentChapter: number = scriptureRef.chapterNum;\n let currentVerse: number = scriptureRef.verseNum;\n let key: number = 0;\n\n lines.forEach((line) => {\n if (line.startsWith('\\\\id')) {\n currentChapter = 0;\n currentVerse = 0;\n }\n if (line.startsWith('\\\\c')) {\n currentChapter = extractNumberFromUSFM(line);\n currentVerse = 0;\n }\n if (line.startsWith('\\\\v')) {\n currentVerse = extractNumberFromUSFM(line);\n if (currentChapter === 0) {\n currentChapter = scriptureRef.chapterNum;\n }\n }\n\n const items: string[] = extractItems(line, item);\n\n for (let i = 0; i < items.length; i++) {\n const result: SearchResult = {\n reference: { ...scriptureRef, chapterNum: +currentChapter, verseNum: +currentVerse },\n snippet: line,\n key,\n };\n key += 1;\n results.push(result);\n }\n });\n\n return results;\n};\n\ninterface OccurrencesTableProps {\n selectedItem: string;\n text: string | undefined;\n extractItems: (text: string, item?: string | undefined) => string[];\n scriptureReference: ScriptureReference;\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n localizedStrings: LanguageStrings;\n}\n\nfunction OccurrencesTable({\n selectedItem,\n text,\n extractItems,\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n}: OccurrencesTableProps) {\n const reference = localizedStrings['%webView_inventory_occurrences_table_header_reference%'];\n const occurrence = localizedStrings['%webView_inventory_occurrences_table_header_occurrence%'];\n const [tableData, setTableData] = useState(\n extractOccurrences(text, selectedItem, extractItems, scriptureReference),\n );\n\n useEffect(\n () => setTableData(extractOccurrences(text, selectedItem, extractItems, scriptureReference)),\n [text, selectedItem, scriptureReference, extractItems],\n );\n\n return (\n \n \n \n {reference}\n {occurrence}\n \n \n \n {tableData.map((result) => (\n {\n setScriptureReference(result.reference);\n }}\n >\n {`${Canon.bookNumberToEnglishName(result.reference.bookNum)} ${result.reference.chapterNum}:${result.reference.verseNum}`}\n {result.snippet}\n \n ))}\n \n
\n );\n}\n\nexport default OccurrencesTable;\n","import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';\nimport { LocalizedStringValue, ScriptureReference } from 'platform-bible-utils';\nimport { Input } from '@/components/shadcn-ui/input';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport DataTable, {\n ColumnDef,\n RowContents,\n SortDirection,\n TableContents,\n} from '@/components/advanced/data-table/data-table.component';\nimport OccurrencesTable from '@/components/advanced/inventory/occurrences-table.component';\nimport { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from 'lucide-react';\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_book%',\n '%webView_inventory_scope_chapter%',\n '%webView_inventory_scope_verse%',\n '%webView_inventory_filter_text%',\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\nexport type Status = 'approved' | 'unapproved' | 'unknown';\n\nexport type ItemData = {\n item: string;\n count: number;\n status: Status;\n};\n\nexport const getSortingIcon = (sortDirection: false | SortDirection): ReactNode => {\n if (sortDirection === 'asc') {\n return ;\n }\n if (sortDirection === 'desc') {\n return ;\n }\n return ;\n};\n\nconst filterItemData = (\n items: ItemData[],\n statusFilter: string,\n textFilter: string,\n): ItemData[] => {\n let filteredItemData: ItemData[] = items;\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.item.includes(textFilter));\n\n return filteredItemData;\n};\n\nconst convertTextToItemData = (\n text: string,\n getInventoryItems: (text: string) => string[],\n getStatusForItem: (item: string) => Status,\n): ItemData[] => {\n const itemData: ItemData[] = [];\n\n const items: string[] = getInventoryItems(text);\n\n for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n const item = items[itemIndex];\n const existingItem = itemData.find((entry) => {\n return entry.item === item;\n });\n if (existingItem) {\n existingItem.count += 1;\n } else {\n const newItem: ItemData = {\n item,\n count: 1,\n status: getStatusForItem(item),\n };\n itemData.push(newItem);\n }\n }\n\n return itemData;\n};\n\nconst localizeString = (\n strings: InventoryLocalizedStrings,\n key: keyof InventoryLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\ninterface InventoryProps {\n scriptureReference: ScriptureReference;\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n localizedStrings: InventoryLocalizedStrings;\n extractItems: (text: string, item?: string | undefined) => string[];\n approvedItems: string[];\n onApprovedItemsChange: (items: string[]) => void;\n unapprovedItems: string[];\n onUnapprovedItemsChange: (items: string[]) => void;\n text: string | undefined;\n scope: string;\n onScopeChange: (scope: string) => void;\n getColumns: (\n onStatusChange: (newItems: string[], status: Status) => void,\n ) => ColumnDef[];\n}\n\nfunction Inventory({\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n extractItems,\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n text,\n scope,\n onScopeChange,\n getColumns,\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_book%');\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\n const [items, setItems] = useState([]);\n const [statusFilter, setStatusFilter] = useState('all');\n const [textFilter, setTextFilter] = useState('');\n const [selectedItem, setSelectedItem] = useState('');\n\n const statusChangeHandler = useCallback(\n (changedItems: string[], status: Status) => {\n setItems((prevTableData) => {\n let tableData: ItemData[] = [];\n changedItems.forEach((item) => {\n tableData = prevTableData.map((tableEntry) => {\n if (tableEntry.item === item && tableEntry.status !== status)\n return { ...tableEntry, status };\n return tableEntry;\n });\n });\n return tableData;\n });\n\n let newApprovedItems: string[] = [...approvedItems];\n changedItems.forEach((item) => {\n if (status === '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 (status === 'unapproved') {\n if (!newUnapprovedItems.includes(item)) {\n newUnapprovedItems.push(item);\n }\n } else {\n newUnapprovedItems = newUnapprovedItems.filter(\n (unapprovedItem) => unapprovedItem !== item,\n );\n }\n });\n onUnapprovedItemsChange(newUnapprovedItems);\n },\n [approvedItems, onApprovedItemsChange, unapprovedItems, onUnapprovedItemsChange],\n );\n\n const getStatusForItem = useCallback(\n (item: string): Status => {\n if (approvedItems.includes(item)) return 'approved';\n if (unapprovedItems.includes(item)) return 'unapproved';\n return 'unknown';\n },\n [approvedItems, unapprovedItems],\n );\n\n useEffect(() => {\n if (!text) return;\n setItems(convertTextToItemData(text, extractItems, getStatusForItem));\n }, [extractItems, text, getStatusForItem]);\n\n const filteredItemData = useMemo(() => {\n return filterItemData(items, statusFilter, textFilter);\n }, [items, statusFilter, textFilter]);\n\n useEffect(() => {\n setSelectedItem('');\n }, [filteredItemData]);\n\n const rowClickHandler = (row: RowContents, table: TableContents) => {\n table.toggleAllRowsSelected(false); // this is pretty hacky, and also prevents us from selecting multiple rows\n row.toggleSelected(undefined);\n\n setSelectedItem(row.getValue('item'));\n };\n\n const columns = useMemo(() => getColumns(statusChangeHandler), [getColumns, statusChangeHandler]);\n\n return (\n
\n
\n \n \n {\n setTextFilter(event.target.value);\n }}\n />\n
\n
\n \n
\n {selectedItem !== '' && (\n
\n \n setScriptureReference(newScriptureReference)\n }\n localizedStrings={localizedStrings}\n />\n
\n )}\n
\n );\n}\n\nexport default Inventory;\n","import { CircleCheckIcon, CircleHelpIcon, CircleXIcon } from 'lucide-react';\nimport { Button } from '@/components/shadcn-ui/button';\nimport { ColumnDef } from '../data-table/data-table.component';\nimport { getSortingIcon, ItemData, Status } from './inventory.component';\n\nexport const inventoryItemColumn = (itemLabel: string): ColumnDef => {\n return {\n accessorKey: 'item',\n header: ({ column }) => (\n \n ),\n };\n};\n\nexport const inventoryCountColumn = (countLabel: string): ColumnDef => {\n return {\n accessorKey: 'count',\n header: ({ column }) => (\n \n ),\n };\n};\n\nexport const inventoryStatusColumn = (\n statusLabel: string,\n statusChangeHandler: (items: string[], status: Status) => void,\n): ColumnDef => {\n return {\n accessorKey: 'status',\n header: ({ column, table }) => {\n const selectedRows = table.getSelectedRowModel().rows;\n\n const items: string[] = [];\n selectedRows.forEach((row) => {\n items.push(row.getValue('item'));\n });\n\n return (\n
\n
\n column.toggleSorting(undefined)}\n >\n {statusLabel}\n {getSortingIcon(column.getIsSorted())}\n \n
\n
\n \n \n \n
\n
\n );\n },\n cell: ({ row }) => {\n const status: Status = row.getValue('status');\n switch (status) {\n case 'approved':\n return ;\n case 'unapproved':\n return ;\n case 'unknown':\n default:\n return ;\n }\n },\n };\n};\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 { 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 /** 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 /** Text direction ltr or rtl */\n dir?: Direction;\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 buttonPlaceholder = '',\n textPlaceholder = '',\n commandEmptyMessage = 'No option found',\n buttonVariant = 'outline',\n dir = 'ltr',\n ...props\n}: ComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n return (\n \n \n \n {value ? getOptionLabel(value) : buttonPlaceholder}\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 { useEffect, useState } from 'react';\nimport { FormControlLabel } from '@mui/material';\nimport ComboBox from '@/components/basics/combo-box.component';\n\nexport type ChapterRangeSelectorProps = {\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled = false,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const [startChapter, setStartChapter] = useState(1);\n const [endChapter, setEndChapter] = useState(chapterCount);\n const [chapterOptions, setChapterOptions] = useState(\n Array.from({ length: chapterCount }, (_, i) => i + 1),\n );\n\n useEffect(() => {\n setStartChapter(1);\n handleSelectStartChapter(1);\n setEndChapter(chapterCount);\n handleSelectEndChapter(chapterCount);\n setChapterOptions(Array.from({ length: chapterCount }, (_, i) => i + 1));\n }, [chapterCount, handleSelectEndChapter, handleSelectStartChapter]);\n\n const onChangeStartChapter = (value: number) => {\n setStartChapter(value);\n handleSelectStartChapter(value);\n if (value > endChapter) {\n setEndChapter(value);\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (value: number) => {\n setEndChapter(value);\n handleSelectEndChapter(value);\n if (value < startChapter) {\n setStartChapter(value);\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n option.toString()}\n value={startChapter}\n />\n }\n label=\"Chapters\"\n labelPlacement=\"start\"\n />\n option.toString()}\n value={endChapter}\n />\n }\n label=\"to\"\n labelPlacement=\"start\"\n />\n \n );\n}\n","enum LabelPosition {\n After = 'after',\n Before = 'before',\n Above = 'above',\n Below = 'below',\n}\n\nexport default LabelPosition;\n","import '@/components/mui/checkbox.component.css';\nimport LabelPosition from '@/components/mui/label-position.model';\nimport { FormLabel, Checkbox as MuiCheckbox } from '@mui/material';\nimport { ChangeEvent } from 'react';\n\nexport type CheckboxProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * If specified, the label that will appear associated with the checkbox.\n *\n * @default '' (no label will be shown)\n */\n labelText?: string;\n /**\n * Indicates the position of the label relative to the checkbox.\n *\n * @default 'after'\n */\n labelPosition?: LabelPosition;\n /**\n * If `true`, the component is in the indeterminate state.\n *\n * @default false\n */\n isIndeterminate?: boolean;\n /** If `true`, the component is checked by default. */\n isDefaultChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/* function CheckboxContainer({ labelText? = '', isDisabled : boolean, hasError : boolean, children? }) {\n return (\n \n {children}\n labelText\n \n );\n} */\n\n/** Primary UI component for user interaction */\nfunction Checkbox({\n id,\n isChecked,\n labelText = '',\n labelPosition = LabelPosition.After,\n isIndeterminate = false,\n isDefaultChecked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: CheckboxProps) {\n const checkBox = (\n \n );\n\n let result;\n\n if (labelText) {\n const preceding =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.Above;\n\n const labelSpan = (\n \n {labelText}\n \n );\n\n const labelIsInline =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.After;\n\n const label = labelIsInline ? labelSpan :
{labelSpan}
;\n\n const checkBoxElement = labelIsInline ? checkBox :
{checkBox}
;\n\n result = (\n \n {preceding && label}\n {checkBoxElement}\n {!preceding && label}\n \n );\n } else {\n result = checkBox;\n }\n return result;\n}\n\nexport default Checkbox;\n","import Checkbox from '@/components/mui/checkbox.component';\nimport '@/components/mui/checklist.component.css';\n\nexport type ChecklistProps = {\n /** Optional string representing the id attribute of the fieldset element */\n id?: string;\n /** Optional string representing CSS class name(s) for styling */\n className?: string;\n /** Optional string representing legend for fieldset element */\n legend?: string;\n /** Array of strings representing the legend text for the fieldset element */\n listItems: string[];\n /** Array of strings representing items to be displayed as checkboxes in the checklist */\n selectedListItems: string[];\n /** Function that takes a string param and is called when a checkbox item is selected or deselected */\n handleSelectListItem: (item: string) => void;\n /**\n * Optional function that takes a string param and returns a string representing the label text\n * for the checkbox associated with that item\n */\n createLabel?: (item: string) => string;\n};\n\n/**\n * Renders a list of checkboxes wrapped in a fieldset element. Each checkbox corresponds to an item\n * from the `listItems` array.\n */\nexport default function Checklist({\n id,\n className,\n legend,\n listItems,\n selectedListItems,\n handleSelectListItem,\n createLabel,\n}: ChecklistProps) {\n return (\n
\n {legend && {legend}}\n {listItems.map((item) => (\n handleSelectListItem(item)}\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 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 elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == 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\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 propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","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}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}","export function getTypeByValue(value) {\n const valueType = typeof value;\n switch (valueType) {\n case 'number':\n if (Number.isNaN(value)) {\n return 'NaN';\n }\n if (!Number.isFinite(value)) {\n return 'Infinity';\n }\n if (value !== Math.floor(value)) {\n return 'float';\n }\n return 'number';\n case 'object':\n if (value === null) {\n return 'null';\n }\n return value.constructor.name;\n default:\n return valueType;\n }\n}\n\n// IE 11 support\nfunction ponyfillIsInteger(x) {\n // eslint-disable-next-line no-restricted-globals\n return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;\n}\nconst isInteger = Number.isInteger || ponyfillIsInteger;\nfunction requiredInteger(props, propName, componentName, location) {\n const propValue = props[propName];\n if (propValue == null || !isInteger(propValue)) {\n const propType = getTypeByValue(propValue);\n return new RangeError(`Invalid ${location} \\`${propName}\\` of type \\`${propType}\\` supplied to \\`${componentName}\\`, expected \\`integer\\`.`);\n }\n return null;\n}\nfunction validator(props, propName, ...other) {\n const propValue = props[propName];\n if (propValue === undefined) {\n return null;\n }\n return requiredInteger(props, propName, ...other);\n}\nfunction validatorNoop() {\n return null;\n}\nvalidator.isRequired = requiredInteger;\nvalidatorNoop.isRequired = validatorNoop;\nexport default process.env.NODE_ENV === 'production' ? validatorNoop : validator;","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\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome,
, and elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n return node.tabIndex;\n}\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n if (!node.name) {\n return false;\n }\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n return roving !== node;\n}\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n return true;\n}\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node: node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\nfunction defaultIsEnabled() {\n return true;\n}\n\n/**\n * Utility component that locks focus inside the component.\n *\n * Demos:\n *\n * - [Focus Trap](https://mui.com/base-ui/react-focus-trap/)\n *\n * API:\n *\n * - [FocusTrap API](https://mui.com/base-ui/react-focus-trap/components-api/#focus-trap)\n */\nfunction FocusTrap(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef(false);\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null);\n // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef(children.ref, rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n if (!rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n rootRef.current.setAttribute('tabIndex', '-1');\n }\n if (activated.current) {\n rootRef.current.focus();\n }\n }\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n nodeToRestore.current = null;\n }\n };\n // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open FocusTrap\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n }\n\n // Make sure the next tab starts from the right place.\n // doc.activeElement refers to the origin.\n if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (sentinelEnd.current) {\n sentinelEnd.current.focus();\n }\n }\n };\n const contain = () => {\n const rootElement = rootRef.current;\n\n // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) {\n return;\n }\n if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n // The focus is already inside\n if (rootElement.contains(doc.activeElement)) {\n return;\n }\n\n // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)\n if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {\n return;\n }\n\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (doc.activeElement !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n if (!activated.current) {\n return;\n }\n let tabbable = [];\n if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n // one of the sentinel nodes was focused, so move the focus\n // to the first/last tabbable element inside the focus trap\n if (tabbable.length > 0) {\n var _lastKeydown$current, _lastKeydown$current2;\n const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n }\n // no tabbable elements in the trap focus or the focus was outside of the focus trap\n } else {\n rootElement.focus();\n }\n };\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true);\n\n // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n const interval = setInterval(() => {\n if (doc.activeElement && doc.activeElement.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-testid\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-testid\": \"sentinelEnd\"\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? FocusTrap.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n /**\n * If `true`, the focus trap will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not restore focus to previously focused element once\n * focus trap is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple focus trap mounted at the same time.\n * @default function defaultIsEnabled(): boolean {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n FocusTrap['propTypes' + ''] = exactProp(FocusTrap.propTypes);\n}\nexport { FocusTrap };","'use client';\n\nimport * 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 };","import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, show) {\n if (show) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = blacklist.indexOf(element) === -1;\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, show);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerDocument(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.containers = void 0;\n this.modals = void 0;\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_createChainedFunction as createChainedFunction } from '@mui/utils';\nimport { extractEventHandlers } from '../utils';\nimport { ModalManager, ariaHidden } from './ModalManager';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst defaultManager = new ModalManager();\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/base-ui/react-modal/#hook)\n *\n * API:\n *\n * - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal)\n */\nexport function useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n // @ts-ignore internal logic - Base UI supports the manager as a prop too\n manager = defaultManager,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp, manager]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || event.which === 229 ||\n // Wait until IME is settled.\n !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n var _otherHandlers$onClic;\n (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers);\n return _extends({\n role: 'presentation'\n }, externalEventHandlers, {\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n });\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return _extends({\n 'aria-hidden': true\n }, externalEventHandlers, {\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n });\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children == null ? void 0 : children.props.onEnter),\n onExited: createChainedFunction(handleExited, children == null ? void 0 : children.props.onExited)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}","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;","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nconst getOverlayAlpha = elevation => {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return (alphaValue / 100).toFixed(2);\n};\nexport default getOverlayAlpha;","'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","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"dense\", \"disablePadding\", \"subheader\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport ListContext from './ListContext';\nimport { getListUtilityClass } from './listClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})(({\n ownerState\n}) => _extends({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative'\n}, !ownerState.disablePadding && {\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.subheader && {\n paddingTop: 0\n}));\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = _extends({}, props, {\n component,\n dense,\n disablePadding\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: [subheader, children]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.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 * The content of the component.\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 component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"actions\", \"autoFocus\", \"autoFocusItem\", \"children\", \"className\", \"disabledItemsFocusable\", \"disableListWrap\", \"onKeyDown\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport List from '../List';\nimport getScrollbarSize from '../utils/getScrollbarSize';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.indexOf(textCriteria.keys.join('')) === 0;\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, theme) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerDocument(containerElement))}px`;\n listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = ownerDocument(list).activeElement;\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, _extends({\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1\n }, other, {\n children: items\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.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`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","'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 { Transition } from 'react-transition-group';\nimport { elementAcceptingRef } from '@mui/utils';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\n\n/**\n * The Fade transition is used by the [Modal](/material-ui/react-modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const theme = useTheme();\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\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 = defaultTimeout,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const enableStrictModeCompat = true;\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 transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\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 transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\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: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\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\" ? Fade.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 * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"invisible\", \"open\", \"slotProps\", \"slots\", \"TransitionComponent\", \"transitionDuration\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Fade from '../Fade';\nimport { getBackdropUtilityClass } from './backdropClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})(({\n ownerState\n}) => _extends({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n}, ownerState.invisible && {\n backgroundColor: 'transparent'\n}));\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n var _slotProps$root, _ref, _slots$root;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n const {\n children,\n className,\n component = 'div',\n components = {},\n componentsProps = {},\n invisible = false,\n open,\n slotProps = {},\n slots = {},\n TransitionComponent = Fade,\n transitionDuration\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n invisible\n });\n const classes = useUtilityClasses(ownerState);\n const rootSlotProps = (_slotProps$root = slotProps.root) != null ? _slotProps$root : componentsProps.root;\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n in: open,\n timeout: transitionDuration\n }, other, {\n children: /*#__PURE__*/_jsx(BackdropRoot, _extends({\n \"aria-hidden\": true\n }, rootSlotProps, {\n as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,\n className: clsx(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),\n ownerState: _extends({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),\n classes: classes,\n ref: ref,\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.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 * The content of the component.\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 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.\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 Root: 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 root: PropTypes.object\n }),\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\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 root: 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 root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The 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 Fade\n */\n TransitionComponent: PropTypes.elementType,\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 transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getModalUtilityClass(slot) {\n return generateUtilityClass('MuiModal', slot);\n}\nconst modalClasses = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);\nexport default modalClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"BackdropComponent\", \"BackdropProps\", \"classes\", \"className\", \"closeAfterTransition\", \"children\", \"container\", \"component\", \"components\", \"componentsProps\", \"disableAutoFocus\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\", \"onBackdropClick\", \"onClose\", \"onTransitionEnter\", \"onTransitionExited\", \"open\", \"slotProps\", \"slots\", \"theme\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, HTMLElementType } from '@mui/utils';\nimport { useSlotProps } from '@mui/base';\nimport { unstable_useModal as useModal } from '@mui/base/unstable_useModal';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport FocusTrap from '../Unstable_TrapFocus';\nimport Portal from '../Portal';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Backdrop from '../Backdrop';\nimport { getModalUtilityClass } from './modalClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open,\n exited,\n classes\n } = ownerState;\n const slots = {\n root: ['root', !open && exited && 'hidden'],\n backdrop: ['backdrop']\n };\n return composeClasses(slots, getModalUtilityClass, classes);\n};\nconst ModalRoot = styled('div', {\n name: 'MuiModal',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.open && ownerState.exited && styles.hidden];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'fixed',\n zIndex: (theme.vars || theme).zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0\n}, !ownerState.open && ownerState.exited && {\n visibility: 'hidden'\n}));\nconst ModalBackdrop = styled(Backdrop, {\n name: 'MuiModal',\n slot: 'Backdrop',\n overridesResolver: (props, styles) => {\n return styles.backdrop;\n }\n})({\n zIndex: -1\n});\n\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/material-ui/api/dialog/)\n * - [Drawer](/material-ui/api/drawer/)\n * - [Menu](/material-ui/api/menu/)\n * - [Popover](/material-ui/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/material-ui/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n var _ref, _slots$root, _ref2, _slots$backdrop, _slotProps$root, _slotProps$backdrop;\n const props = useThemeProps({\n name: 'MuiModal',\n props: inProps\n });\n const {\n BackdropComponent = ModalBackdrop,\n BackdropProps,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n components = {},\n componentsProps = {},\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n onBackdropClick,\n open,\n slotProps,\n slots\n // eslint-disable-next-line react/prop-types\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const propsWithDefaults = _extends({}, props, {\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n });\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n isTopModal,\n exited,\n hasTransition\n } = useModal(_extends({}, propsWithDefaults, {\n rootRef: ref\n }));\n const ownerState = _extends({}, propsWithDefaults, {\n exited\n });\n const classes = useUtilityClasses(ownerState);\n const childProps = {};\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = '-1';\n }\n\n // It's a Transition like component\n if (hasTransition) {\n const {\n onEnter,\n onExited\n } = getTransitionProps();\n childProps.onEnter = onEnter;\n childProps.onExited = onExited;\n }\n const RootSlot = (_ref = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref : ModalRoot;\n const BackdropSlot = (_ref2 = (_slots$backdrop = slots == null ? void 0 : slots.backdrop) != null ? _slots$backdrop : components.Backdrop) != null ? _ref2 : BackdropComponent;\n const rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;\n const backdropSlotProps = (_slotProps$backdrop = slotProps == null ? void 0 : slotProps.backdrop) != null ? _slotProps$backdrop : componentsProps.backdrop;\n const rootProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: rootSlotProps,\n externalForwardedProps: other,\n getSlotProps: getRootProps,\n additionalProps: {\n ref,\n as: component\n },\n ownerState,\n className: clsx(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))\n });\n const backdropProps = useSlotProps({\n elementType: BackdropSlot,\n externalSlotProps: backdropSlotProps,\n additionalProps: BackdropProps,\n getSlotProps: otherHandlers => {\n return getBackdropProps(_extends({}, otherHandlers, {\n onClick: e => {\n if (onBackdropClick) {\n onBackdropClick(e);\n }\n if (otherHandlers != null && otherHandlers.onClick) {\n otherHandlers.onClick(e);\n }\n }\n }));\n },\n className: clsx(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop),\n ownerState\n });\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, _extends({}, rootProps, {\n children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/React.cloneElement(children, childProps)\n })]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead.\n */\n BackdropProps: PropTypes.object,\n /**\n * A single child content 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 * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\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.\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 Backdrop: PropTypes.elementType,\n Root: 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 backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\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 * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * A function called when a transition enters.\n */\n onTransitionEnter: PropTypes.func,\n /**\n * A function called when a transition has exited.\n */\n onTransitionExited: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Modal;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"component\", \"elevation\", \"square\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes, integerPropType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport getOverlayAlpha from '../styles/getOverlayAlpha';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport { getPaperUtilityClass } from './paperClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$vars$overlays;\n return _extends({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow')\n }, !ownerState.square && {\n borderRadius: theme.shape.borderRadius\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }, ownerState.variant === 'elevation' && _extends({\n boxShadow: (theme.vars || theme).shadows[ownerState.elevation]\n }, !theme.vars && theme.palette.mode === 'dark' && {\n backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`\n }, theme.vars && {\n backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]\n }));\n});\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n elevation,\n square,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const theme = useTheme();\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.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 * The content of the component.\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 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 * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopoverUtilityClass(slot) {\n return generateUtilityClass('MuiPopover', slot);\n}\nconst popoverClasses = generateUtilityClasses('MuiPopover', ['root', 'paper']);\nexport default popoverClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"action\", \"anchorEl\", \"anchorOrigin\", \"anchorPosition\", \"anchorReference\", \"children\", \"className\", \"container\", \"elevation\", \"marginThreshold\", \"open\", \"PaperProps\", \"slots\", \"slotProps\", \"transformOrigin\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"disableScrollLock\"],\n _excluded3 = [\"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses, useSlotProps, isHostComponent } from '@mui/base';\nimport { chainPropTypes, integerPropType, elementTypeAcceptingRef, refType, HTMLElementType } from '@mui/utils';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport debounce from '../utils/debounce';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport useForkRef from '../utils/useForkRef';\nimport Grow from '../Grow';\nimport Modal from '../Modal';\nimport PaperBase from '../Paper';\nimport { getPopoverUtilityClass } from './popoverClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getOffsetTop(rect, vertical) {\n let offset = 0;\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n let offset = 0;\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n return offset;\n}\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(n => typeof n === 'number' ? `${n}px` : n).join(' ');\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPopoverUtilityClass, classes);\n};\nexport const PopoverRoot = styled(Modal, {\n name: 'MuiPopover',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const PopoverPaper = styled(PaperBase, {\n name: 'MuiPopover',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {\n var _slotProps$paper, _slots$root, _slots$paper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopover'\n });\n const {\n action,\n anchorEl,\n anchorOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n anchorPosition,\n anchorReference = 'anchorEl',\n children,\n className,\n container: containerProp,\n elevation = 8,\n marginThreshold = 16,\n open,\n PaperProps: PaperPropsProp = {},\n slots,\n slotProps,\n transformOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n TransitionComponent = Grow,\n transitionDuration: transitionDurationProp = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n disableScrollLock = false\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const externalPaperSlotProps = (_slotProps$paper = slotProps == null ? void 0 : slotProps.paper) != null ? _slotProps$paper : PaperPropsProp;\n const paperRef = React.useRef();\n const handlePaperRef = useForkRef(paperRef, externalPaperSlotProps.ref);\n const ownerState = _extends({}, props, {\n anchorOrigin,\n anchorReference,\n elevation,\n marginThreshold,\n externalPaperSlotProps,\n transformOrigin,\n TransitionComponent,\n transitionDuration: transitionDurationProp,\n TransitionProps\n });\n const classes = useUtilityClasses(ownerState);\n\n // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n const getAnchorOffset = React.useCallback(() => {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '.');\n }\n }\n return anchorPosition;\n }\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n\n // If an anchor element wasn't provided, just use the parent body element of this Popover\n const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n const anchorRect = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n const box = anchorElement.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 return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]);\n\n // Returns the base transform origin using the element\n const getTransformOrigin = React.useCallback(elemRect => {\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical),\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n const getPositioningStyle = React.useCallback(element => {\n const elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n\n // Get the transform origin point on the element itself\n const elemTransformOrigin = getTransformOrigin(elemRect);\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }\n\n // Get the offset of the anchoring element\n const anchorOffset = getAnchorOffset();\n\n // Calculate element positioning\n let top = anchorOffset.top - elemTransformOrigin.vertical;\n let left = anchorOffset.left - elemTransformOrigin.horizontal;\n const bottom = top + elemRect.height;\n const right = left + elemRect.width;\n\n // Use the parent window of the anchorEl if provided\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n\n // Window thresholds taking required margin into account\n const heightThreshold = containerWindow.innerHeight - marginThreshold;\n const widthThreshold = containerWindow.innerWidth - marginThreshold;\n\n // Check if the vertical axis needs shifting\n if (marginThreshold !== null && top < marginThreshold) {\n const diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (marginThreshold !== null && bottom > heightThreshold) {\n const diff = bottom - heightThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n }\n\n // Check if the horizontal axis needs shifting\n if (marginThreshold !== null && left < marginThreshold) {\n const diff = left - marginThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n } else if (right > widthThreshold) {\n const diff = right - widthThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n }\n return {\n top: `${Math.round(top)}px`,\n left: `${Math.round(left)}px`,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);\n const [isPositioned, setIsPositioned] = React.useState(open);\n const setPositioningStyles = React.useCallback(() => {\n const element = paperRef.current;\n if (!element) {\n return;\n }\n const positioning = getPositioningStyle(element);\n if (positioning.top !== null) {\n element.style.top = positioning.top;\n }\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n element.style.transformOrigin = positioning.transformOrigin;\n setIsPositioned(true);\n }, [getPositioningStyle]);\n React.useEffect(() => {\n if (disableScrollLock) {\n window.addEventListener('scroll', setPositioningStyles);\n }\n return () => window.removeEventListener('scroll', setPositioningStyles);\n }, [anchorEl, disableScrollLock, setPositioningStyles]);\n const handleEntering = (element, isAppearing) => {\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n setPositioningStyles();\n };\n const handleExited = () => {\n setIsPositioned(false);\n };\n React.useEffect(() => {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, () => open ? {\n updatePosition: () => {\n setPositioningStyles();\n }\n } : null, [open, setPositioningStyles]);\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n const handleResize = debounce(() => {\n setPositioningStyles();\n });\n const containerWindow = ownerWindow(anchorEl);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [anchorEl, open, setPositioningStyles]);\n let transitionDuration = transitionDurationProp;\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\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 const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n const RootSlot = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : PopoverRoot;\n const PaperSlot = (_slots$paper = slots == null ? void 0 : slots.paper) != null ? _slots$paper : PopoverPaper;\n const paperProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: _extends({}, externalPaperSlotProps, {\n style: isPositioned ? externalPaperSlotProps.style : _extends({}, externalPaperSlotProps.style, {\n opacity: 0\n })\n }),\n additionalProps: {\n elevation,\n ref: handlePaperRef\n },\n ownerState,\n className: clsx(classes.paper, externalPaperSlotProps == null ? void 0 : externalPaperSlotProps.className)\n });\n const _useSlotProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: (slotProps == null ? void 0 : slotProps.root) || {},\n externalForwardedProps: other,\n additionalProps: {\n ref,\n slotProps: {\n backdrop: {\n invisible: true\n }\n },\n container,\n open\n },\n ownerState,\n className: clsx(classes.root, className)\n }),\n {\n slotProps: rootSlotPropsProp\n } = _useSlotProps,\n rootProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded3);\n return /*#__PURE__*/_jsx(RootSlot, _extends({}, rootProps, !isHostComponent(RootSlot) && {\n slotProps: rootSlotPropsProp,\n disableScrollLock\n }, {\n children: /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEntering: handleEntering,\n onExited: handleExited,\n timeout: transitionDuration\n }, TransitionProps, {\n children: /*#__PURE__*/_jsx(PaperSlot, _extends({}, paperProps, {\n children: children\n }))\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.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 * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n /**\n * An HTML element, [PopoverVirtualElement](/material-ui/react-popover/#virtual-element),\n * or a function that returns either.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (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 {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \\`${resolvedAnchorEl}\\` instead.`].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * This is the position that may be used to set the position of the popover.\n * The coordinates are relative to the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n /**\n * This determines which anchor prop to refer to when setting\n * the position of the popover.\n * @default 'anchorEl'\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n /**\n * The content of the component.\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 * An HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's 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 * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * The elevation of the popover.\n * @default 8\n */\n elevation: integerPropType,\n /**\n * Specifies how close to the edge of the window the popover can appear.\n * If null, the popover will not be constrained by the window.\n * @default 16\n */\n marginThreshold: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Props applied to the [`Paper`](/material-ui/api/paper/) element.\n *\n * This prop is an alias for `slotProps.paper` and will be overriden by it if both are used.\n * @deprecated Use `slotProps.paper` instead.\n *\n * @default {}\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\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 * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\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 * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Popover;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"autoFocus\", \"children\", \"className\", \"disableAutoFocusItem\", \"MenuListProps\", \"onClose\", \"open\", \"PaperProps\", \"PopoverClasses\", \"transitionDuration\", \"TransitionProps\", \"variant\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useSlotProps } from '@mui/base/utils';\nimport { HTMLElementType } from '@mui/utils';\nimport MenuList from '../MenuList';\nimport Popover, { PopoverPaper } from '../Popover';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getMenuUtilityClass } from './menuClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const MenuPaper = styled(PopoverPaper, {\n name: 'MuiMenu',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tappable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List',\n overridesResolver: (props, styles) => styles.list\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n var _slots$paper, _slotProps$paper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiMenu'\n });\n const {\n autoFocus = true,\n children,\n className,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n variant = 'selectedMenu',\n slots = {},\n slotProps = {}\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const ownerState = _extends({}, props, {\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, theme);\n }\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const PaperSlot = (_slots$paper = slots.paper) != null ? _slots$paper : MenuPaper;\n const paperExternalSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : PaperProps;\n const rootSlotProps = useSlotProps({\n elementType: slots.root,\n externalSlotProps: slotProps.root,\n ownerState,\n className: [classes.root, className]\n });\n const paperSlotProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: paperExternalSlotProps,\n ownerState,\n className: classes.paper\n });\n return /*#__PURE__*/_jsx(MenuRoot, _extends({\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n slots: {\n paper: PaperSlot,\n root: slots.root\n },\n slotProps: {\n root: rootSlotProps,\n paper: paperSlotProps\n },\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n TransitionProps: _extends({\n onEntering: handleEntering\n }, TransitionProps),\n ownerState: ownerState\n }, other, {\n classes: PopoverClasses,\n children: /*#__PURE__*/_jsx(MenuMenuList, _extends({\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant\n }, MenuListProps, {\n className: clsx(classes.list, MenuListProps.className),\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.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 * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n /**\n * Menu contents, normally `MenuItem`s.\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 * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n /**\n * Props applied to the [`MenuList`](/material-ui/api/menu-list/) element.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n /**\n * `classes` prop applied to the [`Popover`](/material-ui/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\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 * @default {}\n */\n TransitionProps: PropTypes.object,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","import '@/components/mui/context-menu.component.css';\nimport MenuItemList, {\n GroupedMenuPropsBase,\n} from '@/components/mui/grouped-menu-item-list.component';\nimport Menu from '@mui/material/Menu';\nimport React, { PropsWithChildren, useCallback, useMemo } from 'react';\n\nexport type ContextMenuProps = GroupedMenuPropsBase & {\n /** Additional css classes to help with styling of the context menu */\n className?: string;\n};\n\n/**\n * A component that wraps its children, making them the \"target\" of a context menu so that the\n * context menu is displayed when the target is right-clicked.\n *\n * @param {ContextMenuProps & PropsWithChildren} props - The properties for the ContextMenu\n * component which define what menu items to display and supply a command handler for when a menu\n * item is clicked.\n * @returns {JSX.Element} The ContextMenu component (including the wrapped children)\n */\nexport default function ContextMenu({\n className,\n commandHandler,\n menuDefinition,\n children,\n}: PropsWithChildren) {\n const [contextMenuPosition, setContextMenuPosition] = React.useState<\n | {\n mouseX: number;\n mouseY: number;\n }\n | undefined\n >(undefined);\n\n const handleContextMenu = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n setContextMenuPosition(\n contextMenuPosition === undefined\n ? {\n mouseX: event.clientX + 2,\n mouseY: event.clientY - 6,\n }\n : // repeated contextmenu when it is already open closes it with Chrome 84 on Ubuntu\n // Other native context menus might behave different.\n // With this behavior we prevent re-locating existing context menus.\n undefined,\n );\n },\n [contextMenuPosition],\n );\n\n const handleClose = useCallback(() => {\n setContextMenuPosition(undefined);\n }, []);\n\n const anchorPosition = useMemo(() => {\n if (contextMenuPosition !== undefined) {\n return { top: contextMenuPosition.mouseY, left: contextMenuPosition.mouseX };\n }\n return undefined;\n }, [contextMenuPosition]);\n\n // If no menu items or children, we don't want to display the context menu at all.\n return (menuDefinition?.items?.length ?? 0) === 0 || !children ? (\n children\n ) : (\n \n {children}\n \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 { 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 ScriptureReference,\n ScriptureSelection,\n scrRefToBBBCCCVVV,\n} from 'platform-bible-utils';\nimport { MouseEvent, useCallback, 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/**\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 [data, setData] = useState(() => {\n // Initial data extraction from sources\n return sources.flatMap((source) => {\n const src = source.source;\n return source.data.map((item) => ({\n ...item,\n source: src,\n }));\n });\n });\n const [rowSelection, setRowSelection] = useState({});\n\n useEffect(() => {\n // Update data whenever sources change\n setData(() => {\n return sources.flatMap((source) => {\n const src = source.source;\n return source.data.map((item) => ({\n ...item,\n source: src,\n }));\n });\n });\n }, [sources]);\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 toRefOrRange = useCallback(\n (start: ScriptureReference, end: ScriptureReference | undefined) => {\n if (!end || compareScrRefs(start, end) === 0) return `${scrRefToBBBCCCVVV(start)}`;\n return `${scrRefToBBBCCCVVV(start)}-${scrRefToBBBCCCVVV(end)}`;\n },\n [],\n );\n\n const getRowKey = useCallback(\n (row: ScriptureSrcItemDetail) =>\n `${toRefOrRange(row.start, row.end)} ${row.source} ${row.detail}`,\n [toRefOrRange],\n );\n\n const table = useReactTable({\n data,\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 = data.find((row) => getRowKey(row) === keys[0]) || undefined;\n if (selectedRow) onRowSelected(selectedRow);\n }\n }\n }, [rowSelection, data, getRowKey, 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 pr-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 'pr-ps-4';\n default:\n return undefined;\n }\n }\n switch (row.depth) {\n case 1:\n return 'pr-ps-8';\n case 2:\n return 'pr-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 { Input } from '@/components/shadcn-ui/input';\nimport { cn } from '@/utils/shadcn-ui.util';\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\nexport default function SearchBar({ onSearch, placeholder, isFullWidth }: SearchBarProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const handleInputChange = (searchString: string) => {\n setSearchQuery(searchString);\n onSearch(searchString);\n };\n\n return (\n handleInputChange(e.target.value)}\n />\n );\n}\n","import '@/components/mui/slider.component.css';\nimport { Slider as MuiSlider } from '@mui/material';\nimport { SyntheticEvent } from 'react';\n\nexport type SliderProps = {\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 * The component orientation.\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * The minimum allowed value of the slider. Should not be equal to max.\n *\n * @default 0\n */\n min?: number;\n /**\n * The maximum allowed value of the slider. Should not be equal to min.\n *\n * @default 100\n */\n max?: number;\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.) The `min`\n * prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible\n * by the step.\n *\n * @default 1\n */\n step?: number;\n /**\n * Marks indicate predetermined values to which the user can move the slider. If `true` the marks\n * are spaced according the value of the `step` prop.\n *\n * @default false\n */\n showMarks?: boolean;\n /** The default value. Use when the component is not controlled. */\n defaultValue?: number;\n /** The value of the slider. For ranged sliders, provide an array with two values. */\n value?: number | number[];\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n *\n * @default 'off'\n */\n valueLabelDisplay?: 'on' | 'auto' | 'off';\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (any). Warning: This is a generic event not a change event.\n * @param value The new value.\n * @param activeThumb Index of the currently moved thumb.\n */\n onChange?: (event: Event, value: number | number[], activeThumb: number) => void;\n /**\n * Callback function that is fired when the mouseup is triggered.\n *\n * @param event The event source of the callback. Warning: This is a generic event not a change\n * event.\n * @param value The new value.\n */\n onChangeCommitted?: (\n event: Event | SyntheticEvent,\n value: number | number[],\n ) => void;\n};\n\n/**\n * Slider that allows selecting a value from a range\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Slider({\n id,\n isDisabled = false,\n orientation = 'horizontal',\n min = 0,\n max = 100,\n step = 1,\n showMarks = false,\n defaultValue,\n value,\n valueLabelDisplay = 'off',\n className,\n onChange,\n onChangeCommitted,\n}: SliderProps) {\n return (\n \n );\n}\n\nexport default Slider;\n","import '@/components/mui/snackbar.component.css';\nimport { Snackbar as MuiSnackbar, SnackbarCloseReason, SnackbarOrigin } from '@mui/material';\nimport { PropsWithChildren, ReactNode, SyntheticEvent } from 'react';\n\nexport type CloseReason = SnackbarCloseReason;\nexport type AnchorOrigin = SnackbarOrigin;\n\nexport type SnackbarContentProps = {\n /** The action to display, renders after the message */\n action?: ReactNode;\n\n /** The message to display */\n message?: ReactNode;\n\n /** Additional css classes to help with unique styling of the snackbar, internal */\n className?: string;\n};\n\nexport type SnackbarProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n\n /**\n * If true, the component is shown\n *\n * @default false\n */\n isOpen?: boolean;\n\n /**\n * The number of milliseconds to wait before automatically calling onClose()\n *\n * @default undefined\n */\n autoHideDuration?: number;\n\n /** Additional css classes to help with unique styling of the snackbar, external */\n className?: string;\n\n /**\n * Optional, used to control the open prop event: Event | SyntheticEvent, reason:\n * string\n */\n onClose?: (event: Event | SyntheticEvent, reason: CloseReason) => void;\n\n /**\n * The anchor of the `Snackbar`. The horizontal alignment is ignored.\n *\n * @default { vertical: 'bottom', horizontal: 'left' }\n */\n anchorOrigin?: AnchorOrigin;\n\n /** Props applied to the [`SnackbarContent`](/material-ui/api/snackbar-content/) element. */\n ContentProps?: SnackbarContentProps;\n}>;\n\n/**\n * Snackbar that provides brief notifications\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Snackbar({\n autoHideDuration = undefined,\n id,\n isOpen = false,\n className,\n onClose,\n anchorOrigin = { vertical: 'bottom', horizontal: 'left' },\n ContentProps,\n children,\n}: SnackbarProps) {\n const newContentProps: SnackbarContentProps = {\n action: ContentProps?.action || children,\n message: ContentProps?.message,\n className,\n };\n\n return (\n \n );\n}\n\nexport default Snackbar;\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\nexport default function NavigationContentSearch({\n tabList,\n onSearch,\n searchPlaceholder,\n headerTitle,\n isSearchBarFullWidth = false,\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 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

{secondary}

\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 { 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 '@/components/mui/switch.component.css';\nimport { Switch as MuiSwitch } from '@mui/material';\nimport { ChangeEvent } from 'react';\n\nexport type SwitchProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/**\n * Switch to toggle on and off\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Switch({\n id,\n isChecked: checked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: SwitchProps) {\n return (\n \n );\n}\n\nexport default Switch;\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 'pr-text-sm pr-font-medium pr-leading-none peer-disabled:pr-cursor-not-allowed peer-disabled:pr-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 { 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 { 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 * 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*as t from\"react\";function n(){return n=Object.assign?Object.assign.bind():function(t){for(var n=1;n(t[n.toLowerCase()]=n,t),{for:\"htmlFor\"}),o={amp:\"&\",apos:\"'\",gt:\">\",lt:\"<\",nbsp:\" \",quot:\"“\"},c=[\"style\",\"script\"],a=/([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi,_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]]*)\\]:\\s+]+)>?\\s*(\"([^\"]*)\")?/,C=/^!\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/,D=/^\\[([^\\]]*)\\] ?\\[([^\\]]*)\\]/,F=/(\\[|\\])/g,N=/(\\n|^[-*]\\s|^#|^ {2,}|^-{2,}|^>\\s)/,P=/\\t/g,Z=/^ *\\| */,G=/(^ *\\||\\| *$)/g,H=/ *$/,q=/^ *:-+: *$/,U=/^ *:-+ *$/,V=/^ *-+: *$/,W=/^([*_])\\1((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\\1\\1(?!\\1)/,Q=/^([*_])((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\\1(?!\\1|\\w)/,X=/^==((?:\\[.*?\\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,J=/^~~((?:\\[.*?\\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,K=/^\\\\([^0-9A-Za-z\\s])/,Y=/^[\\s\\S]+?(?=[^0-9A-Z\\s\\u00c0-\\uffff&#;.()'\"]|\\d+\\.|\\n\\n| {2,}\\n|\\w+:\\S|$)/i,tt=/^\\n+/,nt=/^([ \\t]*)/,et=/\\\\([^\\\\])/g,rt=/ *\\n+$/,ot=/(?:^|\\n)( *)$/,ct=\"(?:\\\\d+\\\\.)\",at=\"(?:[*+-])\";function _t(t){return\"( *)(\"+(1===t?ct:at)+\") +\"}const ut=_t(1),it=_t(2);function st(t){return new RegExp(\"^\"+(1===t?ut:it))}const lt=st(1),ft=st(2);function dt(t){return new RegExp(\"^\"+(1===t?ut:it)+\"[^\\\\n]*(?:\\\\n(?!\\\\1\"+(1===t?ct:at)+\" )[^\\\\n]*)*(\\\\n|$)\",\"gm\")}const pt=dt(1),mt=dt(2);function gt(t){const n=1===t?ct:at;return new RegExp(\"^( *)(\"+n+\") [\\\\s\\\\S]+?(?:\\\\n{2,}(?! )(?!\\\\1\"+n+\" (?!\"+n+\" ))\\\\n*|\\\\s*\\\\n*$)\")}const yt=gt(1),ht=gt(2);function kt(t,n){const e=1===n,r=e?yt:ht,o=e?pt:mt,c=e?lt:ft;return{t(t,n,e){const o=ot.exec(e);return o&&(n.o||!n._&&!n.u)?r.exec(t=o[1]+t):null},i:Ht.HIGH,l(t,n,r){const a=e?+t[2]:void 0,_=t[0].replace(u,\"\\n\").match(o);let i=!1;return{p:_.map(function(t,e){const o=c.exec(t)[0].length,a=new RegExp(\"^ {1,\"+o+\"}\",\"gm\"),u=t.replace(a,\"\").replace(c,\"\"),s=e===_.length-1,l=-1!==u.indexOf(\"\\n\\n\")||s&&i;i=l;const f=r._,d=r.o;let p;r.o=!0,l?(r._=!1,p=u.replace(rt,\"\\n\\n\")):(r._=!0,p=u.replace(rt,\"\"));const m=n(p,r);return r._=f,r.o=d,m}),m:e,g:a}},h:(n,e,r)=>t(n.m?\"ol\":\"ul\",{key:r.k,start:n.g},n.p.map(function(n,o){return t(\"li\",{key:o},e(n,r))}))}}const xt=/^\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,bt=/^!\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,$t=[i,d,p,$,S,v,A,R,pt,yt,mt,ht],vt=[...$t,/^[^\\n]+(?: \\n|\\n{2,})/,z,L];function St(t){return t.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,\"a\").replace(/[çÇ]/g,\"c\").replace(/[ðÐ]/g,\"d\").replace(/[ÈÉÊËéèêë]/g,\"e\").replace(/[ÏïÎîÍíÌì]/g,\"i\").replace(/[Ññ]/g,\"n\").replace(/[øØœŒÕõÔôÓóÒò]/g,\"o\").replace(/[ÜüÛûÚúÙù]/g,\"u\").replace(/[ŸÿÝý]/g,\"y\").replace(/[^a-z0-9- ]/gi,\"\").replace(/ /gi,\"-\").toLowerCase()}function zt(t){return V.test(t)?\"right\":q.test(t)?\"center\":U.test(t)?\"left\":null}function wt(t,n,e){const r=e.$;e.$=!0;const o=n(t.trim(),e);e.$=r;let c=[[]];return o.forEach(function(t,n){\"tableSeparator\"===t.type?0!==n&&n!==o.length-1&&c.push([]):(\"text\"!==t.type||null!=o[n+1]&&\"tableSeparator\"!==o[n+1].type||(t.v=t.v.replace(H,\"\")),c[c.length-1].push(t))}),c}function At(t,n,e){e._=!0;const r=wt(t[1],n,e),o=t[2].replace(G,\"\").split(\"|\").map(zt),c=function(t,n,e){return t.trim().split(\"\\n\").map(function(t){return wt(t,n,e)})}(t[3],n,e);return e._=!1,{S:o,A:c,L:r,type:\"table\"}}function Et(t,n){return null==t.S[n]?{}:{textAlign:t.S[n]}}function Lt(t){return function(n,e){return e._?t.exec(n):null}}function Mt(t){return function(n,e){return e._||e.u?t.exec(n):null}}function Ot(t){return function(n,e){return e._||e.u?null:t.exec(n)}}function It(t){return function(n){return t.exec(n)}}function jt(t,n,e){if(n._||n.u)return null;if(e&&!e.endsWith(\"\\n\"))return null;let r=\"\";t.split(\"\\n\").every(t=>!$t.some(n=>n.test(t))&&(r+=t+\"\\n\",t.trim()));const o=r.trimEnd();return\"\"==o?null:[r,o]}function Bt(t){try{if(decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,\"\").match(/^\\s*(javascript|vbscript|data(?!:image)):/i))return}catch(t){return null}return t}function Rt(t){return t.replace(et,\"$1\")}function Tt(t,n,e){const r=e._||!1,o=e.u||!1;e._=!0,e.u=!0;const c=t(n,e);return e._=r,e.u=o,c}function Ct(t,n,e){const r=e._||!1,o=e.u||!1;e._=!1,e.u=!0;const c=t(n,e);return e._=r,e.u=o,c}function Dt(t,n,e){return e._=!1,t(n,e)}const Ft=(t,n,e)=>({v:Tt(n,t[1],e)});function Nt(){return{}}function Pt(){return null}function Zt(...t){return t.filter(Boolean).join(\" \")}function Gt(t,n,e){let r=t;const o=n.split(\".\");for(;o.length&&(r=r[o[0]],void 0!==r);)o.shift();return r||e}var Ht;function qt(e,u={}){u.overrides=u.overrides||{},u.slugify=u.slugify||St,u.namedCodesToUnicode=u.namedCodesToUnicode?n({},o,u.namedCodesToUnicode):o;const G=u.createElement||t.createElement;function H(t,e,...r){const o=Gt(u.overrides,`${t}.props`,{});return G(function(t,n){const e=Gt(n,t);return e?\"function\"==typeof e||\"object\"==typeof e&&\"render\"in e?e:Gt(n,`${t}.component`,t):t}(t,u.overrides),n({},e,o,{className:Zt(null==e?void 0:e.className,o.className)||void 0}),...r)}function q(n){let e=!1;u.forceInline?e=!0:u.forceBlock||(e=!1===N.test(n));const r=ct(ot(e?n:`${n.trimEnd().replace(tt,\"\")}\\n\\n`,{_:e}));for(;\"string\"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===u.wrapper)return r;const o=u.wrapper||(e?\"span\":\"div\");let c;if(r.length>1||u.forceWrapper)c=r;else{if(1===r.length)return c=r[0],\"string\"==typeof c?H(\"span\",{key:\"outer\"},c):c;c=null}return t.createElement(o,{key:\"outer\"},c)}function U(n){const e=n.match(a);return e?e.reduce(function(n,e,o){const c=e.indexOf(\"=\");if(-1!==c){const a=function(t){return-1!==t.indexOf(\"-\")&&null===t.match(E)&&(t=t.replace(B,function(t,n){return n.toUpperCase()})),t}(e.slice(0,c)).trim(),_=function(t){const n=t[0];return('\"'===n||\"'\"===n)&&t.length>=2&&t[t.length-1]===n?t.slice(1,-1):t}(e.slice(c+1).trim()),u=r[a]||a,i=n[u]=function(t,n){return\"style\"===t?n.split(/;\\s?/).reduce(function(t,n){const e=n.slice(0,n.indexOf(\":\"));return t[e.replace(/(-[a-z])/g,t=>t[1].toUpperCase())]=n.slice(e.length+1).trim(),t},{}):\"href\"===t?Bt(n):(n.match(M)&&(n=n.slice(1,n.length-1)),\"true\"===n||\"false\"!==n&&n)}(a,_);\"string\"==typeof i&&(z.test(i)||L.test(i))&&(n[u]=t.cloneElement(q(i.trim()),{key:o}))}else\"style\"!==e&&(n[r[e]||e]=!0);return n},{}):null}const V=[],et={},rt={blockQuote:{t:Ot(i),i:Ht.HIGH,l:(t,n,e)=>({v:n(t[0].replace(s,\"\"),e)}),h:(t,n,e)=>H(\"blockquote\",{key:e.k},n(t.v,e))},breakLine:{t:It(l),i:Ht.HIGH,l:Nt,h:(t,n,e)=>H(\"br\",{key:e.k})},breakThematic:{t:Ot(f),i:Ht.HIGH,l:Nt,h:(t,n,e)=>H(\"hr\",{key:e.k})},codeBlock:{t:Ot(p),i:Ht.MAX,l:t=>({v:t[0].replace(/^ {4}/gm,\"\").replace(/\\n+$/,\"\"),M:void 0}),h:(t,e,r)=>H(\"pre\",{key:r.k},H(\"code\",n({},t.O,{className:t.M?`lang-${t.M}`:\"\"}),t.v))},codeFenced:{t:Ot(d),i:Ht.MAX,l:t=>({O:U(t[3]||\"\"),v:t[4],M:t[2]||void 0,type:\"codeBlock\"})},codeInline:{t:Mt(m),i:Ht.LOW,l:t=>({v:t[2]}),h:(t,n,e)=>H(\"code\",{key:e.k},t.v)},footnote:{t:Ot(h),i:Ht.MAX,l:t=>(V.push({I:t[2],j:t[1]}),{}),h:Pt},footnoteReference:{t:Lt(k),i:Ht.HIGH,l:t=>({v:t[1],B:`#${u.slugify(t[1])}`}),h:(t,n,e)=>H(\"a\",{key:e.k,href:Bt(t.B)},H(\"sup\",{key:e.k},t.v))},gfmTask:{t:Lt(b),i:Ht.HIGH,l:t=>({R:\"x\"===t[1].toLowerCase()}),h:(t,n,e)=>H(\"input\",{checked:t.R,key:e.k,readOnly:!0,type:\"checkbox\"})},heading:{t:Ot(u.enforceAtxHeadings?v:$),i:Ht.HIGH,l:(t,n,e)=>({v:Tt(n,t[2],e),T:u.slugify(t[2]),C:t[1].length}),h:(t,n,e)=>H(`h${t.C}`,{id:t.T,key:e.k},n(t.v,e))},headingSetext:{t:Ot(S),i:Ht.MAX,l:(t,n,e)=>({v:Tt(n,t[1],e),C:\"=\"===t[2]?1:2,type:\"heading\"})},htmlComment:{t:It(A),i:Ht.HIGH,l:()=>({}),h:Pt},image:{t:Mt(bt),i:Ht.HIGH,l:t=>({D:t[1],B:Rt(t[2]),F:t[3]}),h:(t,n,e)=>H(\"img\",{key:e.k,alt:t.D||void 0,title:t.F||void 0,src:Bt(t.B)})},link:{t:Lt(xt),i:Ht.LOW,l:(t,n,e)=>({v:Ct(n,t[1],e),B:Rt(t[2]),F:t[3]}),h:(t,n,e)=>H(\"a\",{key:e.k,href:Bt(t.B),title:t.F},n(t.v,e))},linkAngleBraceStyleDetector:{t:Lt(j),i:Ht.MAX,l:t=>({v:[{v:t[1],type:\"text\"}],B:t[1],type:\"link\"})},linkBareUrlDetector:{t:(t,n)=>n.N?null:Lt(O)(t,n),i:Ht.MAX,l:t=>({v:[{v:t[1],type:\"text\"}],B:t[1],F:void 0,type:\"link\"})},linkMailtoDetector:{t:Lt(I),i:Ht.MAX,l(t){let n=t[1],e=t[1];return _.test(e)||(e=\"mailto:\"+e),{v:[{v:n.replace(\"mailto:\",\"\"),type:\"text\"}],B:e,type:\"link\"}}},orderedList:kt(H,1),unorderedList:kt(H,2),newlineCoalescer:{t:Ot(g),i:Ht.LOW,l:Nt,h:()=>\"\\n\"},paragraph:{t:jt,i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"p\",{key:e.k},n(t.v,e))},ref:{t:Lt(T),i:Ht.MAX,l:t=>(et[t[1]]={B:t[2],F:t[4]},{}),h:Pt},refImage:{t:Mt(C),i:Ht.MAX,l:t=>({D:t[1]||void 0,P:t[2]}),h:(t,n,e)=>H(\"img\",{key:e.k,alt:t.D,src:Bt(et[t.P].B),title:et[t.P].F})},refLink:{t:Lt(D),i:Ht.MAX,l:(t,n,e)=>({v:n(t[1],e),Z:n(t[0].replace(F,\"\\\\$1\"),e),P:t[2]}),h:(t,n,e)=>et[t.P]?H(\"a\",{key:e.k,href:Bt(et[t.P].B),title:et[t.P].F},n(t.v,e)):H(\"span\",{key:e.k},n(t.Z,e))},table:{t:Ot(R),i:Ht.HIGH,l:At,h:(t,n,e)=>H(\"table\",{key:e.k},H(\"thead\",null,H(\"tr\",null,t.L.map(function(r,o){return H(\"th\",{key:o,style:Et(t,o)},n(r,e))}))),H(\"tbody\",null,t.A.map(function(r,o){return H(\"tr\",{key:o},r.map(function(r,o){return H(\"td\",{key:o,style:Et(t,o)},n(r,e))}))})))},tableSeparator:{t:function(t,n){return n.$?(n._=!0,Z.exec(t)):null},i:Ht.HIGH,l:function(){return{type:\"tableSeparator\"}},h:()=>\" | \"},text:{t:It(Y),i:Ht.MIN,l:t=>({v:t[0].replace(w,(t,n)=>u.namedCodesToUnicode[n]?u.namedCodesToUnicode[n]:t)}),h:t=>t.v},textBolded:{t:Mt(W),i:Ht.MED,l:(t,n,e)=>({v:n(t[2],e)}),h:(t,n,e)=>H(\"strong\",{key:e.k},n(t.v,e))},textEmphasized:{t:Mt(Q),i:Ht.LOW,l:(t,n,e)=>({v:n(t[2],e)}),h:(t,n,e)=>H(\"em\",{key:e.k},n(t.v,e))},textEscaped:{t:Mt(K),i:Ht.HIGH,l:t=>({v:t[1],type:\"text\"})},textMarked:{t:Mt(X),i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"mark\",{key:e.k},n(t.v,e))},textStrikethroughed:{t:Mt(J),i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"del\",{key:e.k},n(t.v,e))}};!0!==u.disableParsingRawHTML&&(rt.htmlBlock={t:It(z),i:Ht.HIGH,l(t,n,e){const[,r]=t[3].match(nt),o=new RegExp(`^${r}`,\"gm\"),a=t[3].replace(o,\"\"),_=(u=a,vt.some(t=>t.test(u))?Dt:Tt);var u;const i=t[1].toLowerCase(),s=-1!==c.indexOf(i);e.N=e.N||\"a\"===i;const l=s?t[3]:_(n,a,e);return e.N=!1,{O:U(t[2]),v:l,G:s,H:s?i:t[1]}},h:(t,e,r)=>H(t.H,n({key:r.k},t.O),t.G?t.v:e(t.v,r))},rt.htmlSelfClosing={t:It(L),i:Ht.HIGH,l:t=>({O:U(t[2]||\"\"),H:t[1]}),h:(t,e,r)=>H(t.H,n({},t.O,{key:r.k}))});const ot=function(t){let n=Object.keys(t);function e(r,o){let c=[],a=\"\";for(;r;){let _=0;for(;_{let{children:r,options:o}=n,c=function(t,n){if(null==t)return{};var e,r,o={},c=Object.keys(t);for(r=0;r=0||(o[e]=t[e]);return o}(n,e);return t.cloneElement(qt(r,o),c)};export{qt as compiler};\n//# sourceMappingURL=index.modern.js.map\n","import Markdown from 'markdown-to-jsx';\n\ninterface MarkdownRendererProps {\n /** Optional unique identifier */\n id?: string;\n /** The markdown string to render */\n markdown: 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({ id, markdown }: MarkdownRendererProps) {\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=\"pr-text-xs pr-text-gray-500 pr-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=\"pr-text-xs pr-text-gray-500 pr-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","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 React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst alertVariants = cva(\n 'pr-relative pr-w-full pr-rounded-lg pr-border pr-p-4 [&>svg~*]:pr-pl-7 [&>svg+div]:pr-translate-y-[-3px] [&>svg]:pr-absolute [&>svg]:pr-left-4 [&>svg]:pr-top-4 [&>svg]:pr-text-foreground',\n {\n variants: {\n variant: {\n default: 'pr-bg-background pr-text-foreground',\n destructive:\n 'pr-border-destructive/50 pr-text-destructive dark:pr-border-destructive [&>svg]:pr-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 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"],"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","r","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","DataTableViewOptions","table","FilterIcon","column","value","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","getLinesFromUSFM","text","extractNumberFromUSFM","regex","match","extractOccurrences","item","extractItems","scriptureRef","results","lines","currentChapter","currentVerse","line","items","result","OccurrencesTable","selectedItem","scriptureReference","setScriptureReference","localizedStrings","reference","occurrence","tableData","setTableData","INVENTORY_STRING_KEYS","getSortingIcon","sortDirection","ArrowUpIcon","ArrowDownIcon","ArrowUpDownIcon","filterItemData","statusFilter","textFilter","filteredItemData","convertTextToItemData","getInventoryItems","getStatusForItem","itemData","itemIndex","existingItem","entry","newItem","localizeString","strings","Inventory","approvedItems","onApprovedItemsChange","unapprovedItems","onUnapprovedItemsChange","scope","onScopeChange","getColumns","allItemsText","approvedItemsText","unapprovedItemsText","unknownItemsText","scopeBookText","scopeChapterText","scopeVerseText","filterText","setItems","setStatusFilter","setTextFilter","setSelectedItem","statusChangeHandler","changedItems","status","prevTableData","tableEntry","newApprovedItems","validItem","newUnapprovedItems","unapprovedItem","useMemo","rowClickHandler","newScriptureReference","inventoryItemColumn","itemLabel","inventoryCountColumn","countLabel","inventoryStatusColumn","statusLabel","selectedRows","CircleCheckIcon","CircleXIcon","CircleHelpIcon","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","onChange","getOptionLabel","buttonPlaceholder","textPlaceholder","commandEmptyMessage","buttonVariant","dir","setOpen","ChevronsUpDown","ChapterRangeSelector","handleSelectStartChapter","handleSelectEndChapter","isDisabled","chapterCount","startChapter","setStartChapter","setEndChapter","chapterOptions","setChapterOptions","onChangeStartChapter","onChangeEndChapter","Fragment","FormControlLabel","LabelPosition","Checkbox","isChecked","labelText","labelPosition","isIndeterminate","isDefaultChecked","hasError","checkBox","MuiCheckbox","preceding","labelSpan","labelIsInline","label","checkBoxElement","FormLabel","Checklist","legend","listItems","selectedListItems","handleSelectListItem","createLabel","_interopRequireDefault","obj","module","chainPropTypes","propType1","propType2","args","_extends","target","source","isPlainObject","prototype","deepClone","output","deepmerge","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","isSymbol","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","isClassComponent","elementType","acceptingRef","safePropName","warningHint","elementAcceptingRef","PropTypes","elementAcceptingRef$1","elementTypeAcceptingRef","elementTypeAcceptingRef$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","getScrollbarSize","documentWidth","getTypeByValue","valueType","ponyfillIsInteger","isInteger","requiredInteger","other","validatorNoop","integerPropType","resolveProps","defaultProps","defaultSlotProps","slotProps","slotPropName","composeClasses","slots","getUtilityClass","classes","slot","utilityClass","defaultGenerator","createClassNameGenerator","generate","generator","ClassNameGenerator","ClassNameGenerator$1","globalStateClasses","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","clamp","min","max","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","breakpoints","unit","sortedValues","keys","up","down","between","start","end","endIndex","only","not","keyIndex","shape","shape$1","responsivePropType","responsivePropType$1","merge","defaultBreakpoints","handleBreakpoints","styleFromPropValue","theme","themeBreakpoints","index","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","direction","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","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","primary","secondary","info","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","candidatesSelector","getTabIndex","tabindexAttr","isNonTabbableRadio","getRadio","selector","roving","isNodeMatchingSelectorFocusable","defaultGetTabbable","root","regularTabNodes","orderedTabNodes","nodeTabIndex","defaultIsEnabled","FocusTrap","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","rootRef","handleRef","lastKeydown","loopFocus","nativeEvent","contain","rootElement","tabbable","_lastKeydown$current","_lastKeydown$current2","isShiftTab","focusNext","focusPrevious","interval","onFocus","childrenPropsHandler","handleFocusSentinel","getContainer","container","forwardedRef","disablePortal","mountNode","setMountNode","newProps","ReactDOM","isOverflowing","ariaHidden","show","getPaddingRight","isAriaHiddenForbiddenOnElement","isForbiddenTagName","isInputHidden","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","blacklist","isNotExcludedElement","isNotForbiddenElement","findIndexOf","callback","idx","handleContainer","containerInfo","restoreStyle","scrollbarSize","fixedElements","scrollContainer","parent","containerWindow","el","getHiddenSiblings","hiddenSiblings","ModalManager","modal","modalIndex","containerIndex","ariaHiddenState","nextTop","getHasTransition","defaultManager","useModal","disableEscapeKeyDown","disableScrollLock","manager","closeAfterTransition","onTransitionEnter","onTransitionExited","onClose","mountNodeRef","modalRef","exited","setExited","hasTransition","ariaHiddenProp","getDoc","getModal","handleMounted","handleOpen","resolvedContainer","isTopModal","handlePortalRef","handleClose","createHandleKeyDown","otherHandlers","_otherHandlers$onKeyD","createHandleBackdropClick","_otherHandlers$onClic","propsEventHandlers","externalEventHandlers","handleEnter","handleExited","top","bottom","right","left","auto","basePlacements","clippingParents","viewport","popper","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","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","resolvedAnchorEl","display","transitionProps","useThemeSystem","_setPrototypeOf","_inheritsLoose","subClass","superClass","setPrototypeOf","timeoutsShape","TransitionGroupContext","forceReflow","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","context","_this","parentGroup","appear","initialStatus","prevState","nextIn","_proto","prevProps","nextStatus","exit","enter","mounting","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","_this3","nextState","_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","getOverlayAlpha","elevation","alphaValue","getOverlayAlpha$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","onOpen","openProp","PopperComponentProp","PopperProps","title","TransitionComponentProp","isRtl","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","handleLeave","focusVisibleRef","setChildIsFocusVisible","handleBlur","handleFocus","detectTouchStart","childrenProps","handleMouseOver","handleMouseLeave","handleTouchStart","handleTouchEnd","handleMouseMove","nameOrDescProps","titleIsString","interactiveWrapperListeners","_PopperProps$popperOp","tooltipModifiers","PopperComponent","TooltipComponent","ArrowComponent","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","Tooltip$1","getIcon","icon","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","firstItem","divKey","itemInfo","menuItemProps","TopLevelMenu","columnId","MenuColumn","metadata","Grid","List","GridMenu","multiColumnMenu","sortedColumns","columnNumbers","columnName","col","ListContext","ListContext$1","getListUtilityClass","disablePadding","dense","subheader","ListRoot","List$1","nextItem","disableListWrap","previousItem","textCriteriaMatches","nextFocus","textCriteria","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","MenuList","actions","autoFocus","autoFocusItem","onKeyDown","listRef","textCriteriaRef","containerElement","noExplicitWidth","criteria","lowerKey","currTime","keepFocusOnCurrent","activeItemIndex","newChildProps","MenuList$1","Fade","defaultTimeout","Fade$1","getBackdropUtilityClass","invisible","BackdropRoot","Backdrop","_slotProps$root","rootSlotProps","Backdrop$1","getModalUtilityClass","ModalRoot","ModalBackdrop","Modal","_slots$backdrop","_slotProps$backdrop","BackdropComponent","BackdropProps","hideBackdrop","onBackdropClick","propsWithDefaults","getRootProps","getBackdropProps","portalRef","RootSlot","BackdropSlot","backdropSlotProps","backdropProps","Modal$1","getPaperUtilityClass","square","PaperRoot","_theme$vars$overlays","Paper","PaperBase","getPopoverUtilityClass","getOffsetTop","vertical","getOffsetLeft","horizontal","getTransformOriginValue","transformOrigin","PopoverRoot","PopoverPaper","_slotProps$paper","_slots$paper","action","anchorOrigin","anchorPosition","anchorReference","marginThreshold","PaperPropsProp","transitionDurationProp","externalPaperSlotProps","paperRef","handlePaperRef","getAnchorOffset","anchorElement","anchorRect","getTransformOrigin","elemRect","getPositioningStyle","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","diff","isPositioned","setIsPositioned","setPositioningStyles","positioning","handleResize","PaperSlot","paperProps","_useSlotProps","rootSlotPropsProp","Popover$1","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","MenuPaper","MenuMenuList","disableAutoFocusItem","MenuListProps","PaperProps","PopoverClasses","menuListActionsRef","handleListKeyDown","paperExternalSlotProps","paperSlotProps","Menu$1","ContextMenu","contextMenuPosition","setContextMenuPosition","handleContextMenu","MenuItemList","getUsePromiseOptionsDefaults","usePromise","promiseFactoryCallback","defaultValueRef","optionsDefaultedRef","isLoading","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","scrBookColId","scrRefColId","typeColId","detailsColId","defaultScrRefColumnName","defaultScrBookGroupName","defaultTypeColumnName","defaultDetailsColumnName","colInfo","showSourceColumn","showSrcCol","formatScrRef","compareScrRefs","ScriptureResultsViewer","sources","showColumnHeaders","scriptureReferenceColumnName","scriptureBookGroupName","typeColumnName","detailsColumnName","onRowSelected","grouping","setGrouping","setData","src","toRefOrRange","scrRefToBBBCCCVVV","getRowKey","getExpandedRowModel","getGroupedRowModel","selectedRow","scrBookGroupName","typeGroupName","groupingOptions","handleSelectChange","selectedGrouping","handleRowClick","getEvenOrOddBandingStyle","getIndent","groupingState","rowIndex","ChevronLeft","SearchBar","onSearch","placeholder","isFullWidth","handleInputChange","Slider","orientation","showMarks","valueLabelDisplay","onChangeCommitted","MuiSlider","Snackbar","autoHideDuration","isOpen","ContentProps","newContentProps","MuiSnackbar","VerticalTabs","TabsPrimitive","VerticalTabsList","VerticalTabsTrigger","VerticalTabsContent","NavigationContentSearch","tabList","searchPlaceholder","headerTitle","isSearchBarFullWidth","tab","Separator","decorative","SeparatorPrimitive","SettingsList","SettingsListItem","loadingMessage","SettingsListHeader","includeSeparator","Spinner","LoaderCircle","Switch","MuiSwitch","labelVariants","Label","LabelPrimitive","TextField","helperText","onBlur","ShadLabel","Toolbar","AppBar","MuiToolbar","Tabs","TabsList","TabsTrigger","TabsContent","InstallButton","isInstalling","handleClick","buttonText","Download","EnableButton","isEnabling","DisableButton","isDisabling","UpdateButton","isUpdating","$","M","j","F","Z","W","Q","Y","tt","nt","et","rt","ot","ct","at","_t","ut","it","st","lt","ft","dt","mt","gt","yt","ht","kt","Ht","xt","bt","$t","vt","St","zt","wt","At","Et","Lt","Mt","Ot","It","jt","Bt","Rt","Tt","Ct","Dt","Ft","Nt","Pt","Zt","Gt","qt","Markdown","MarkdownRenderer","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","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","alertVariants","Alert","AlertTitle","AlertDescription","SliderPrimitive","SwitchPrimitives"],"mappings":"iqCAGA,MAAMA,GAAgBC,GAAAA,oBAAoB,CAAE,OAAQ,KAAO,CAAA,EA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A,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,aAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,27,28,29,30,31,32,33,34,35,36,37,38,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,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,233,254]} \ 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 1896561957..638c95975d 100644 --- a/lib/platform-bible-react/dist/index.d.ts +++ b/lib/platform-bible-react/dist/index.d.ts @@ -5,6 +5,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; import * as LabelPrimitive from '@radix-ui/react-label'; import { PopoverProps } from '@radix-ui/react-popover'; import * as SelectPrimitive from '@radix-ui/react-select'; +import * as SeparatorPrimitive from '@radix-ui/react-separator'; import * as SliderPrimitive from '@radix-ui/react-slider'; import * as SwitchPrimitives from '@radix-ui/react-switch'; import * as TabsPrimitive from '@radix-ui/react-tabs'; @@ -113,9 +114,15 @@ export type MenuItemContainingSubmenu = MenuItemBase & { export type MenuItemContainingCommand = MenuItemBase & { /** Name of the PAPI command to run when this menu item is selected. */ command: ReferencedItem; - /** Path to the icon to display after the menu text */ + /** + * Uri path to the icon to display after the menu text. Ex: + * `papi-extension://helloWorld/assets/icon.png` + */ iconPathAfter?: string; - /** Path to the icon to display before the menu text */ + /** + * Uri path to the icon to display before the menu text. Ex: + * `papi-extension://helloWorld/assets/icon.png` + */ iconPathBefore?: string; }; /** @@ -797,6 +804,75 @@ export type SnackbarProps = React$1.PropsWithChildren<{ * https://mui.com/material-ui/getting-started/overview/ */ export declare function Snackbar({ autoHideDuration, id, isOpen, className, onClose, anchorOrigin, ContentProps, children, }: SnackbarProps): import("react/jsx-runtime").JSX.Element; +export type TabKeyValueContent = { + key: string; + value: string; + content: React$1.ReactNode; +}; +export type NavigationContentSearchProps = { + /** List of values and keys for each tab this component should provide */ + tabList: TabKeyValueContent[]; + /** Handler to run when the value of the search bar changes */ + onSearch: (searchQuery: string) => void; + /** Optional placeholder for the search bar */ + searchPlaceholder?: string; + /** Optional title to include in the header */ + headerTitle?: string; + /** Optional flag to make the search bar appear full width */ + isSearchBarFullWidth?: boolean; +}; +export function NavigationContentSearch({ tabList, onSearch, searchPlaceholder, headerTitle, isSearchBarFullWidth, }: NavigationContentSearchProps): import("react/jsx-runtime").JSX.Element; +/** Props for the SettingsList component, currently just children */ +export type SettingsListProps = React$1.PropsWithChildren; +/** + * SettingsList component is a wrapper for list items. Rendered with a formatted div + * + * @param children To populate the list with + * @returns Formatted div encompassing the children + */ +export declare function SettingsList({ children }: SettingsListProps): import("react/jsx-runtime").JSX.Element; +/** Props for SettingsListItem component */ +export type SettingsListItemProps = React$1.PropsWithChildren & { + /** Primary text of the list item */ + primary: string; + /** Optional text of the list item */ + secondary?: string | undefined; + /** Optional boolean to display a message if the children aren't loaded yet. Defaults to false */ + isLoading?: boolean; + /** Optional message to display if isLoading */ + loadingMessage?: string; +}; +/** + * SettingsListItem component is a common list item. Rendered with a formatted div + * + * @param primary Primary text of the list item + * @param secondary Optional secondary text of the list item + * @param isLoading Optional, to display a message if the action component isn't generated yet, + * defaults to false + * @param children The action component(s) to provide for this item + * @param loadingMessage Optional, message to display if isLoading + * @returns Formatted div encompassing the list item content + */ +export declare function SettingsListItem({ primary, secondary, children, isLoading, loadingMessage, }: SettingsListItemProps): import("react/jsx-runtime").JSX.Element; +/** Props for SettingsListHeader component */ +export type SettingsListHeaderProps = { + /** The primary text of the list header */ + primary: string; + /** Optional secondary text of the list header */ + secondary?: string | undefined; + /** Optional boolean to include a separator underneath the secondary text. Defaults to false */ + includeSeparator?: boolean; +}; +/** + * SettingsListHeader component displays text above the list + * + * @param primary The primary text of the list header + * @param secondary Optional secondary text of the list header + * @param includeSeparator Optional boolean to include a separator underneath the secondary text. + * Defaults to false + * @returns Formatted div with list header content + */ +export declare function SettingsListHeader({ primary, secondary, includeSeparator, }: SettingsListHeaderProps): import("react/jsx-runtime").JSX.Element; export type SpinnerProps = LucideProps; export declare const Spinner: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export type SwitchProps = { @@ -1029,6 +1105,7 @@ export declare const VerticalTabsTrigger: React$1.ForwardRefExoticComponent, "ref"> & { className?: string | undefined; } & React$1.RefAttributes>; +export declare const Separator: React$1.ForwardRefExoticComponent, "ref"> & React$1.RefAttributes>; export type InstallButtonProps = { /** The installing boolean value determines the state of the button. */ isInstalling: boolean; diff --git a/lib/platform-bible-react/dist/index.js b/lib/platform-bible-react/dist/index.js index acead36f16..967ff7b3d2 100644 --- a/lib/platform-bible-react/dist/index.js +++ b/lib/platform-bible-react/dist/index.js @@ -1,37 +1,38 @@ -import Ll, { jsx as d, jsxs as _, Fragment as wt } from "react/jsx-runtime"; +import Hl, { jsx as d, jsxs as _, Fragment as wt } from "react/jsx-runtime"; import * as N from "react"; -import W, { forwardRef as bn, useCallback as Se, useState as ce, useRef as _t, useEffect as He, useLayoutEffect as ha, useMemo as Mt } from "react"; -import { History as Fl, ChevronRight as Ci, Check as No, Circle as Vl, ArrowDownWideNarrow as zl, Clock as Ul, Bookmark as Hl, FilterIcon as Gl, ChevronDown as vn, ChevronUp as Wl, ArrowLeftIcon as Xl, ChevronLeftIcon as Yl, ChevronRightIcon as ql, ArrowRightIcon as Kl, ArrowUpIcon as Jl, ArrowDownIcon as Zl, ArrowUpDownIcon as Ql, CircleCheckIcon as ga, CircleXIcon as ba, CircleHelpIcon as va, X as ec, Search as tc, ChevronsUpDown as rc, ChevronLeft as nc, LoaderCircle as oc, Download as ac, Filter as ic, User as sc, Link as lc, CircleHelp as cc } from "lucide-react"; -import Ce, { clsx as pc } from "clsx"; -import { extendTailwindMerge as dc } from "tailwind-merge"; +import W, { forwardRef as vn, useCallback as Se, useState as ce, useRef as _t, useEffect as He, useLayoutEffect as ha, useMemo as Mt } from "react"; +import { History as Gl, ChevronRight as Ci, Check as No, Circle as Wl, ArrowDownWideNarrow as Xl, Clock as Yl, Bookmark as ql, FilterIcon as Kl, ChevronDown as yn, ChevronUp as Jl, ArrowLeftIcon as Zl, ChevronLeftIcon as Ql, ChevronRightIcon as ec, ArrowRightIcon as tc, ArrowUpIcon as rc, ArrowDownIcon as nc, ArrowUpDownIcon as oc, CircleCheckIcon as ga, CircleXIcon as ba, CircleHelpIcon as va, X as ac, Search as ic, ChevronsUpDown as sc, ChevronLeft as lc, LoaderCircle as cc, Download as pc, Filter as dc, User as uc, Link as fc, CircleHelp as mc } from "lucide-react"; +import Ce, { clsx as hc } from "clsx"; +import { extendTailwindMerge as gc } from "tailwind-merge"; import * as ge from "@radix-ui/react-dropdown-menu"; -import { DropdownMenuTrigger as uc } from "@radix-ui/react-dropdown-menu"; -import { getChaptersForBook as fc, compareScrRefs as so, scrRefToBBBCCCVVV as zn, formatScrRef as Un, NumberFormat as mc, formatBytes as hc } from "platform-bible-utils"; -import { useReactTable as Oi, getCoreRowModel as Ri, getPaginationRowModel as gc, getSortedRowModel as Pi, getFilteredRowModel as bc, flexRender as kr, getExpandedRowModel as vc, getGroupedRowModel as yc } from "@tanstack/react-table"; -import { Slot as wc } from "@radix-ui/react-slot"; +import { DropdownMenuTrigger as bc } from "@radix-ui/react-dropdown-menu"; +import { getChaptersForBook as vc, compareScrRefs as so, scrRefToBBBCCCVVV as zn, formatScrRef as Un, NumberFormat as yc, formatBytes as wc } from "platform-bible-utils"; +import { useReactTable as Oi, getCoreRowModel as Ri, getPaginationRowModel as xc, getSortedRowModel as Pi, getFilteredRowModel as kc, flexRender as kr, getExpandedRowModel as Ec, getGroupedRowModel as Nc } from "@tanstack/react-table"; +import { Slot as Tc } from "@radix-ui/react-slot"; import { cva as To } from "class-variance-authority"; import * as xe from "@radix-ui/react-select"; -import { FormControlLabel as ya, FormLabel as xc, Checkbox as kc, MenuItem as Ec, ListItemText as Nc, ListItemIcon as $i, Menu as Tc, Grid as _i, List as Sc, IconButton as Ii, Drawer as Cc, Slider as Oc, Snackbar as Rc, Switch as Pc, AppBar as $c, Toolbar as _c } from "@mui/material"; +import { FormControlLabel as ya, FormLabel as Sc, Checkbox as Cc, MenuItem as Oc, ListItemText as Rc, ListItemIcon as $i, Menu as Pc, Grid as _i, List as $c, IconButton as Ii, Drawer as _c, Slider as Ic, Snackbar as Mc, Switch as Ac, AppBar as Dc, Toolbar as jc } from "@mui/material"; import * as Or from "@radix-ui/react-popover"; import { Command as Ae } from "cmdk"; import * as Qe from "@radix-ui/react-dialog"; -import Ic, { ThemeContext as Mc, internal_processStyles as Ac } from "@mui/styled-engine"; -import * as Dc from "react-dom"; -import qr from "react-dom"; -import * as Mi from "@radix-ui/react-label"; +import Bc, { ThemeContext as Lc, internal_processStyles as Fc } from "@mui/styled-engine"; +import * as Vc from "react-dom"; +import Kr from "react-dom"; import * as De from "@radix-ui/react-tabs"; +import * as Mi from "@radix-ui/react-separator"; +import * as Ai from "@radix-ui/react-label"; import * as vr from "@radix-ui/react-slider"; import * as lo from "@radix-ui/react-switch"; -const jc = dc({ prefix: "pr-" }); -function V(...e) { - return jc(pc(e)); +const zc = gc({ prefix: "pr-" }); +function F(...e) { + return zc(hc(e)); } -const yn = W.forwardRef( +const jr = W.forwardRef( ({ className: e, type: t, ...r }, n) => /* @__PURE__ */ d( "input", { type: t, - className: V( + className: F( "pr-flex pr-h-10 pr-rounded-md pr-bg-background pr-px-3 pr-py-2 pr-text-sm pr-ring-offset-background file:pr-border-0 file:pr-bg-transparent file:pr-text-sm file:pr-font-medium placeholder:pr-text-muted-foreground disabled:pr-cursor-not-allowed disabled:pr-opacity-50", e ), @@ -40,11 +41,11 @@ const yn = W.forwardRef( } ) ); -yn.displayName = "Input"; -const Bc = bn( +jr.displayName = "Input"; +const Uc = vn( ({ handleSearch: e, handleKeyDown: t, handleOnClick: r, handleSubmit: n, ...o }, a) => /* @__PURE__ */ _("div", { className: "pr-relative", children: [ /* @__PURE__ */ d( - yn, + jr, { ...o, type: "text", @@ -58,7 +59,7 @@ const Bc = bn( } ), /* @__PURE__ */ d( - Fl, + Gl, { className: "pr-absolute pr-right-3 pr-top-1/2 pr-h-4 pr-w-4 pr--translate-y-1/2 pr-transform pr-cursor-pointer pr-text-gray-500", onClick: () => { @@ -68,7 +69,7 @@ const Bc = bn( ) ] }) ); -var Lc = Object.defineProperty, Fc = (e, t, r) => t in e ? Lc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, oe = (e, t, r) => Fc(e, typeof t != "symbol" ? t + "" : t, r); +var Hc = Object.defineProperty, Gc = (e, t, r) => t in e ? Hc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, oe = (e, t, r) => Gc(e, typeof t != "symbol" ? t + "" : t, r); const At = [ "GEN", "EXO", @@ -230,7 +231,7 @@ const At = [ "GLO", "TDX", "NDX" -], Ai = [ +], Di = [ "Genesis", "Exodus", "Leviticus", @@ -356,57 +357,57 @@ const At = [ "Reproof (Proverbs 25-31)", "4 Baruch (Rest of Baruch)", "Laodiceans" -], wa = Kc(); +], wa = tp(); function or(e, t = !0) { return t && (e = e.toUpperCase()), e in wa ? wa[e] : 0; } function Co(e) { return or(e) > 0; } -function Vc(e) { +function Wc(e) { const t = typeof e == "string" ? or(e) : e; return t >= 40 && t <= 66; } -function zc(e) { +function Xc(e) { return (typeof e == "string" ? or(e) : e) <= 39; } -function Di(e) { +function ji(e) { return e <= 66; } -function Uc(e) { +function Yc(e) { const t = typeof e == "string" ? or(e) : e; - return Li(t) && !Di(t); + return Fi(t) && !ji(t); } -function* Hc() { +function* qc() { for (let e = 1; e <= At.length; e++) yield e; } -const Gc = 1, ji = At.length; -function Wc() { +const Kc = 1, Bi = At.length; +function Jc() { return ["XXA", "XXB", "XXC", "XXD", "XXE", "XXF", "XXG"]; } function Oo(e, t = "***") { const r = e - 1; return r < 0 || r >= At.length ? t : At[r]; } -function Bi(e) { - return e <= 0 || e > ji ? "******" : Ai[e - 1]; +function Li(e) { + return e <= 0 || e > Bi ? "******" : Di[e - 1]; } -function Xc(e) { - return Bi(or(e)); +function Zc(e) { + return Li(or(e)); } -function Li(e) { +function Fi(e) { const t = typeof e == "number" ? Oo(e) : e; return Co(t) && !So.includes(t); } -function Yc(e) { +function Qc(e) { const t = typeof e == "number" ? Oo(e) : e; return Co(t) && So.includes(t); } -function qc(e) { - return Ai[e - 1].includes("*obsolete*"); +function ep(e) { + return Di[e - 1].includes("*obsolete*"); } -function Kc() { +function tp() { const e = {}; for (let t = 0; t < At.length; t++) e[At[t]] = t + 1; @@ -417,20 +418,20 @@ const me = { nonCanonicalIds: So, bookIdToNumber: or, isBookIdValid: Co, - isBookNT: Vc, - isBookOT: zc, - isBookOTNT: Di, - isBookDC: Uc, - allBookNumbers: Hc, - firstBook: Gc, - lastBook: ji, - extraBooks: Wc, + isBookNT: Wc, + isBookOT: Xc, + isBookOTNT: ji, + isBookDC: Yc, + allBookNumbers: qc, + firstBook: Kc, + lastBook: Bi, + extraBooks: Jc, bookNumberToId: Oo, - bookNumberToEnglishName: Bi, - bookIdToEnglishName: Xc, - isCanonical: Li, - isExtraMaterial: Yc, - isObsolete: qc + bookNumberToEnglishName: Li, + bookIdToEnglishName: Zc, + isCanonical: Fi, + isExtraMaterial: Qc, + isObsolete: ep }; var Je = /* @__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))(Je || {}); const Le = class { @@ -455,7 +456,7 @@ function xa(e, t) { e = e.split(t[n]).join(r); return e.split(r); } -var Fi = /* @__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))(Fi || {}); +var Vi = /* @__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))(Vi || {}); const _e = class le { constructor(t, r, n, o) { if (oe(this, "firstChapter"), oe(this, "lastChapter"), oe(this, "lastVerse"), oe(this, "hasSegmentsDefined"), oe(this, "text"), oe(this, "BBBCCCVVVS"), oe(this, "longHashCode"), oe(this, "versification"), oe(this, "rtlMark", "‏"), oe(this, "_bookNum", 0), oe(this, "_chapterNum", 0), oe(this, "_verseNum", 0), oe(this, "_verse"), n == null && o == null) @@ -820,14 +821,14 @@ const _e = class le { oe(_e, "defaultVersification", St.English), oe(_e, "verseRangeSeparator", "-"), oe(_e, "verseSequenceIndicator", ","), oe(_e, "verseRangeSeparators", [_e.verseRangeSeparator]), oe(_e, "verseSequenceIndicators", [_e.verseSequenceIndicator]), oe(_e, "chapterDigitShifter", 1e3), oe(_e, "bookDigitShifter", _e.chapterDigitShifter * _e.chapterDigitShifter), oe(_e, "bcvMaxValue", _e.chapterDigitShifter - 1), /** * The valid status of the VerseRef. */ -oe(_e, "ValidStatusType", Fi); +oe(_e, "ValidStatusType", Vi); let dr = class extends Error { }; -const Ro = ge.Root, Vi = ge.Trigger, Jc = ge.Group, Pv = ge.Portal, $v = ge.Sub, _v = ge.RadioGroup, Zc = W.forwardRef(({ className: e, inset: t, children: r, ...n }, o) => /* @__PURE__ */ _( +const Ro = ge.Root, zi = ge.Trigger, rp = ge.Group, Iv = ge.Portal, Mv = ge.Sub, Av = ge.RadioGroup, np = W.forwardRef(({ className: e, inset: t, children: r, ...n }, o) => /* @__PURE__ */ _( ge.SubTrigger, { ref: o, - className: V( + className: F( "pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none focus:pr-bg-accent data-[state=open]:pr-bg-accent", t && "pr-pl-8", e @@ -839,25 +840,25 @@ const Ro = ge.Root, Vi = ge.Trigger, Jc = ge.Group, Pv = ge.Portal, $v = ge.Sub, ] } )); -Zc.displayName = ge.SubTrigger.displayName; -const Qc = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +np.displayName = ge.SubTrigger.displayName; +const op = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( ge.SubContent, { ref: r, - className: V( + className: F( "pr-z-50 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-p-1 pr-text-popover-foreground pr-shadow-lg data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2", e ), ...t } )); -Qc.displayName = ge.SubContent.displayName; +op.displayName = ge.SubContent.displayName; const wn = W.forwardRef(({ className: e, sideOffset: t = 4, ...r }, n) => /* @__PURE__ */ d(ge.Portal, { children: /* @__PURE__ */ d( ge.Content, { ref: n, sideOffset: t, - className: V( + className: F( /* adding pr-twp because the dropdown content is added to the dom as a sibling to the app root */ "pr-twp pr-z-50 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-p-1 pr-text-popover-foreground pr-shadow-md data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2", e @@ -866,11 +867,11 @@ const wn = W.forwardRef(({ className: e, sideOffset: t = 4, ...r }, n) => /* @__ } ) })); wn.displayName = ge.Content.displayName; -const zi = W.forwardRef(({ className: e, inset: t, ...r }, n) => /* @__PURE__ */ d( +const Ui = W.forwardRef(({ className: e, inset: t, ...r }, n) => /* @__PURE__ */ d( ge.Item, { ref: n, - className: V( + className: F( // removed: pr-relative pr-flex focus:pr-text-accent-foreground "pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50", t && "pr-pl-8", @@ -879,12 +880,12 @@ const zi = W.forwardRef(({ className: e, inset: t, ...r }, n) => /* @__PURE__ */ ...r } )); -zi.displayName = ge.Item.displayName; +Ui.displayName = ge.Item.displayName; const Po = W.forwardRef(({ className: e, children: t, checked: r, ...n }, o) => /* @__PURE__ */ _( ge.CheckboxItem, { ref: o, - className: V( + className: F( "pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50", e ), @@ -897,51 +898,51 @@ const Po = W.forwardRef(({ className: e, children: t, checked: r, ...n }, o) => } )); Po.displayName = ge.CheckboxItem.displayName; -const Ui = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ _( +const Hi = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ _( ge.RadioItem, { ref: n, - className: V( + className: F( "pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none pr-transition-colors focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50", e ), ...r, children: [ - /* @__PURE__ */ d("span", { className: "pr-absolute pr-left-2 pr-flex pr-h-3.5 pr-w-3.5 pr-items-center pr-justify-center", children: /* @__PURE__ */ d(ge.ItemIndicator, { children: /* @__PURE__ */ d(Vl, { className: "pr-h-2 pr-w-2 pr-fill-current" }) }) }), + /* @__PURE__ */ d("span", { className: "pr-absolute pr-left-2 pr-flex pr-h-3.5 pr-w-3.5 pr-items-center pr-justify-center", children: /* @__PURE__ */ d(ge.ItemIndicator, { children: /* @__PURE__ */ d(Wl, { className: "pr-h-2 pr-w-2 pr-fill-current" }) }) }), t ] } )); -Ui.displayName = ge.RadioItem.displayName; -const jr = W.forwardRef(({ className: e, inset: t, ...r }, n) => /* @__PURE__ */ d( +Hi.displayName = ge.RadioItem.displayName; +const Br = W.forwardRef(({ className: e, inset: t, ...r }, n) => /* @__PURE__ */ d( ge.Label, { ref: n, - className: V("pr-px-2 pr-py-1.5 pr-text-sm pr-font-semibold", t && "pr-pl-8", e), + className: F("pr-px-2 pr-py-1.5 pr-text-sm pr-font-semibold", t && "pr-pl-8", e), ...r } )); -jr.displayName = ge.Label.displayName; +Br.displayName = ge.Label.displayName; const xn = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( ge.Separator, { ref: r, - className: V("pr--mx-1 pr-my-1 pr-h-px pr-bg-muted", e), + className: F("pr--mx-1 pr-my-1 pr-h-px pr-bg-muted", e), ...t } )); xn.displayName = ge.Separator.displayName; -function ep({ className: e, ...t }) { +function ap({ className: e, ...t }) { return /* @__PURE__ */ d( "span", { - className: V("pr-ml-auto pr-text-xs pr-tracking-widest pr-opacity-60", e), + className: F("pr-ml-auto pr-text-xs pr-tracking-widest pr-opacity-60", e), ...t } ); } -ep.displayName = "DropdownMenuShortcut"; -const tp = bn( +ap.displayName = "DropdownMenuShortcut"; +const ip = vn( ({ bookId: e, handleSelectBook: t, @@ -951,11 +952,11 @@ const tp = bn( bookType: a, children: i }, l) => /* @__PURE__ */ _( - zi, + Ui, { ref: l, textValue: e, - className: V("pr-font-normal pr-text-slate-700", { + className: F("pr-font-normal pr-text-slate-700", { // Overriding `data-[highlighted]` changes the default gray background that is normally shown on hover "pr-bg-amber-50 pr-text-yellow-900 data-[highlighted]:pr-bg-amber-100": r }), @@ -971,7 +972,7 @@ const tp = bn( /* @__PURE__ */ d( "span", { - className: V( + className: F( "pr-border-b-0 pr-border-l-2 pr-border-r-0 pr-border-t-0 pr-border-solid pr-px-2", { "pr-font-bold": r, @@ -989,7 +990,7 @@ const tp = bn( e ) ); -function rp({ +function sp({ handleSelectChapter: e, endChapter: t, activeChapter: r, @@ -1002,10 +1003,10 @@ function rp({ }, [o] ); - return /* @__PURE__ */ d("div", { className: V("pr-flex pr-flex-wrap pr-items-start pr-justify-start pr-self-stretch"), children: a.map((l) => /* @__PURE__ */ d( + return /* @__PURE__ */ d("div", { className: F("pr-flex pr-flex-wrap pr-items-start pr-justify-start pr-self-stretch"), children: a.map((l) => /* @__PURE__ */ d( "div", { - className: V( + className: F( "pr-flex pr-h-4 pr-w-4 pr-cursor-pointer pr-items-center pr-justify-end pr-rounded-md pr-p-2 pr-text-amber-800", { "pr-font-semibold pr-text-amber-900": l === r, @@ -1026,26 +1027,26 @@ function rp({ l )) }); } -function np({ handleSort: e, handleLocationHistory: t, handleBookmarks: r }) { - return /* @__PURE__ */ _(jr, { className: "pr-flex pr-justify-between", children: [ +function lp({ handleSort: e, handleLocationHistory: t, handleBookmarks: r }) { + return /* @__PURE__ */ _(Br, { className: "pr-flex pr-justify-between", children: [ /* @__PURE__ */ d("p", { className: "pr-inline-block pr-align-middle", children: "Go To" }), /* @__PURE__ */ _("div", { className: "pr-flex pr-items-center", children: [ /* @__PURE__ */ d( - zl, + Xl, { onClick: e, className: "pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2" } ), /* @__PURE__ */ d( - Ul, + Yl, { onClick: t, className: "pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2" } ), /* @__PURE__ */ d( - Hl, + ql, { onClick: r, className: "pr-h-4 pr-w-4 pr-cursor-pointer pr-gap-2 pr-p-2" @@ -1054,40 +1055,40 @@ function np({ handleSort: e, handleLocationHistory: t, handleBookmarks: r }) { ] }) ] }); } -const Er = me.allBookIds, op = { +const Er = me.allBookIds, cp = { OT: "Old Testament", NT: "New Testament", DC: "Deuterocanon" -}, ka = ["OT", "NT", "DC"], ap = 32 + 32 + 32, ip = [ +}, ka = ["OT", "NT", "DC"], pp = 32 + 32 + 32, dp = [ /^(\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 -], sp = (e) => ({ +], up = (e) => ({ OT: Er.filter((r) => me.isBookOT(r)), NT: Er.filter((r) => me.isBookNT(r)), DC: Er.filter((r) => me.isBookDC(r)) -})[e], ur = (e) => fc(me.bookIdToNumber(e)); -function lp() { +})[e], ur = (e) => vc(me.bookIdToNumber(e)); +function fp() { return Er.map((t) => me.bookIdToEnglishName(t)); } -function cp(e) { - return lp().includes(e); +function mp(e) { + return fp().includes(e); } -function pp(e) { +function hp(e) { const t = e.toLowerCase().replace(/^\w/, (r) => r.toUpperCase()); - if (cp(t)) + if (mp(t)) return Er.find((n) => me.bookIdToEnglishName(n) === t); } -function Iv({ scrRef: e, handleSubmit: t }) { +function Dv({ scrRef: e, handleSubmit: t }) { const [r, n] = ce(""), [o, a] = ce( me.bookNumberToId(e.bookNum) ), [i, l] = ce(e.chapterNum ?? 0), [c, f] = ce( me.bookNumberToId(e.bookNum) ), [m, v] = ce(!1), [g, p] = ce(m), h = _t(void 0), u = _t(void 0), b = _t(void 0), x = Se( - ($) => sp($).filter((E) => { + ($) => up($).filter((E) => { const R = me.bookIdToEnglishName(E).toLowerCase(), I = r.replace(/[^a-zA-Z]/g, "").toLowerCase(); return R.includes(I) || // Match book name E.toLowerCase().includes(I); @@ -1119,10 +1120,10 @@ function Iv({ scrRef: e, handleSubmit: t }) { ), T = ($) => { $ <= 0 || $ > ur(o) || y(o, !0, $); }, S = Se(() => { - ip.forEach(($) => { + dp.forEach(($) => { const E = r.match($); if (E) { - const [R, I = void 0, U = void 0] = E.slice(1), B = pp(R); + const [R, I = void 0, U = void 0] = E.slice(1), B = hp(R); (me.isBookIdValid(R) || B) && y( B ?? R, !0, @@ -1177,7 +1178,7 @@ function Iv({ scrRef: e, handleSubmit: t }) { }, [m]), ha(() => { const $ = setTimeout(() => { if (g && u.current && b.current) { - const R = b.current.offsetTop - ap; + const R = b.current.offsetTop - pp; u.current.scrollTo({ top: R, behavior: "instant" }); } }, 10); @@ -1185,8 +1186,8 @@ function Iv({ scrRef: e, handleSubmit: t }) { clearTimeout($); }; }, [g]), /* @__PURE__ */ d("div", { className: "pr-flex", children: /* @__PURE__ */ _(Ro, { modal: !1, open: m, onOpenChange: k, children: [ - /* @__PURE__ */ d(Vi, { asChild: !0, children: /* @__PURE__ */ d( - Bc, + /* @__PURE__ */ d(zi, { asChild: !0, children: /* @__PURE__ */ d( + Uc, { ref: h, value: r, @@ -1212,7 +1213,7 @@ function Iv({ scrRef: e, handleSubmit: t }) { ref: u, children: [ /* @__PURE__ */ d( - np, + lp, { handleSort: () => console.log("sorting"), handleLocationHistory: () => console.log("location history"), @@ -1221,9 +1222,9 @@ function Iv({ scrRef: e, handleSubmit: t }) { ), ka.map( ($, E) => x($).length > 0 && /* @__PURE__ */ _("div", { children: [ - /* @__PURE__ */ d(jr, { className: "pr-font-semibold pr-text-slate-700", children: op[$] }), + /* @__PURE__ */ d(Br, { className: "pr-font-semibold pr-text-slate-700", children: cp[$] }), x($).map((R) => /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d( - tp, + ip, { bookId: R, handleSelectBook: () => y(R, !1), @@ -1235,7 +1236,7 @@ function Iv({ scrRef: e, handleSubmit: t }) { o === R && (b.current = I); }, children: /* @__PURE__ */ d( - rp, + sp, { handleSelectChapter: T, endChapter: ur(R), @@ -1256,7 +1257,7 @@ function Iv({ scrRef: e, handleSubmit: t }) { ) ] }) }); } -const dp = To( +const gp = To( "pr-twp pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-md pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50", { variants: { @@ -1281,17 +1282,17 @@ const dp = To( } } ), we = W.forwardRef( - ({ className: e, variant: t, size: r, asChild: n = !1, ...o }, a) => /* @__PURE__ */ d(n ? wc : "button", { className: V(dp({ variant: t, size: r, className: e })), ref: a, ...o }) + ({ className: e, variant: t, size: r, asChild: n = !1, ...o }, a) => /* @__PURE__ */ d(n ? Tc : "button", { className: F(gp({ variant: t, size: r, className: e })), ref: a, ...o }) ); we.displayName = "Button"; -function up({ table: e }) { +function bp({ table: e }) { return /* @__PURE__ */ _(Ro, { children: [ - /* @__PURE__ */ d(uc, { asChild: !0, children: /* @__PURE__ */ _(we, { variant: "outline", size: "sm", className: "pr-ml-auto pr-hidden pr-h-8 lg:pr-flex", children: [ - /* @__PURE__ */ d(Gl, { className: "pr-mr-2 pr-h-4 pr-w-4" }), + /* @__PURE__ */ d(bc, { asChild: !0, children: /* @__PURE__ */ _(we, { variant: "outline", size: "sm", className: "pr-ml-auto pr-hidden pr-h-8 lg:pr-flex", children: [ + /* @__PURE__ */ d(Kl, { className: "pr-mr-2 pr-h-4 pr-w-4" }), "View" ] }) }), /* @__PURE__ */ _(wn, { align: "end", className: "pr-w-[150px]", children: [ - /* @__PURE__ */ d(jr, { children: "Toggle columns" }), + /* @__PURE__ */ d(Br, { children: "Toggle columns" }), /* @__PURE__ */ d(xn, {}), e.getAllColumns().filter((t) => t.getCanHide()).map((t) => /* @__PURE__ */ d( Po, @@ -1306,47 +1307,47 @@ function up({ table: e }) { ] }) ] }); } -const sn = xe.Root, fp = xe.Group, ln = xe.Value, Rr = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ _( +const ln = xe.Root, vp = xe.Group, cn = xe.Value, Rr = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ _( xe.Trigger, { ref: n, - className: V( + className: F( "pr-flex pr-h-10 pr-w-full pr-items-center pr-justify-between pr-rounded-md pr-border pr-border-input pr-bg-background pr-px-3 pr-py-2 pr-text-sm pr-ring-offset-background placeholder:pr-text-muted-foreground focus:pr-outline-none focus:pr-ring-2 focus:pr-ring-ring focus:pr-ring-offset-2 disabled:pr-cursor-not-allowed disabled:pr-opacity-50 [&>span]:pr-line-clamp-1", e ), ...r, children: [ t, - /* @__PURE__ */ d(xe.Icon, { asChild: !0, children: /* @__PURE__ */ d(vn, { className: "pr-h-4 pr-w-4 pr-opacity-50" }) }) + /* @__PURE__ */ d(xe.Icon, { asChild: !0, children: /* @__PURE__ */ d(yn, { className: "pr-h-4 pr-w-4 pr-opacity-50" }) }) ] } )); Rr.displayName = xe.Trigger.displayName; -const Hi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +const Gi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( xe.ScrollUpButton, { ref: r, - className: V("pr-flex pr-cursor-default pr-items-center pr-justify-center pr-py-1", e), + className: F("pr-flex pr-cursor-default pr-items-center pr-justify-center pr-py-1", e), ...t, - children: /* @__PURE__ */ d(Wl, { className: "pr-h-4 pr-w-4" }) + children: /* @__PURE__ */ d(Jl, { className: "pr-h-4 pr-w-4" }) } )); -Hi.displayName = xe.ScrollUpButton.displayName; -const Gi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +Gi.displayName = xe.ScrollUpButton.displayName; +const Wi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( xe.ScrollDownButton, { ref: r, - className: V("pr-flex pr-cursor-default pr-items-center pr-justify-center pr-py-1", e), + className: F("pr-flex pr-cursor-default pr-items-center pr-justify-center pr-py-1", e), ...t, - children: /* @__PURE__ */ d(vn, { className: "pr-h-4 pr-w-4" }) + children: /* @__PURE__ */ d(yn, { className: "pr-h-4 pr-w-4" }) } )); -Gi.displayName = xe.ScrollDownButton.displayName; +Wi.displayName = xe.ScrollDownButton.displayName; const Pr = W.forwardRef(({ className: e, children: t, position: r = "popper", ...n }, o) => /* @__PURE__ */ d(xe.Portal, { children: /* @__PURE__ */ _( xe.Content, { ref: o, - className: V( + className: F( "pr-twp pr-relative pr-z-50 pr-max-h-96 pr-min-w-[8rem] pr-overflow-hidden pr-rounded-md pr-border pr-bg-popover pr-text-popover-foreground pr-shadow-md data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2", r === "popper" && "data-[side=bottom]:pr-translate-y-1 data-[side=left]:pr--translate-x-1 data-[side=right]:pr-translate-x-1 data-[side=top]:pr--translate-y-1", e @@ -1354,36 +1355,36 @@ const Pr = W.forwardRef(({ className: e, children: t, position: r = "popper", .. position: r, ...n, children: [ - /* @__PURE__ */ d(Hi, {}), + /* @__PURE__ */ d(Gi, {}), /* @__PURE__ */ d( xe.Viewport, { - className: V( + className: F( "pr-p-1", r === "popper" && "pr-h-[var(--radix-select-trigger-height)] pr-w-full pr-min-w-[var(--radix-select-trigger-width)]" ), children: t } ), - /* @__PURE__ */ d(Gi, {}) + /* @__PURE__ */ d(Wi, {}) ] } ) })); Pr.displayName = xe.Content.displayName; -const mp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +const yp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( xe.Label, { ref: r, - className: V("pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-font-semibold", e), + className: F("pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-font-semibold", e), ...t } )); -mp.displayName = xe.Label.displayName; +yp.displayName = xe.Label.displayName; const Ke = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ _( xe.Item, { ref: n, - className: V( + className: F( "pr-relative pr-flex pr-w-full pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-py-1.5 pr-pl-8 pr-pr-2 pr-text-sm pr-outline-none focus:pr-bg-accent focus:pr-text-accent-foreground data-[disabled]:pr-pointer-events-none data-[disabled]:pr-opacity-50", e ), @@ -1395,16 +1396,16 @@ const Ke = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ } )); Ke.displayName = xe.Item.displayName; -const hp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +const wp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( xe.Separator, { ref: r, - className: V("pr--mx-1 pr-my-1 pr-h-px pr-bg-muted", e), + className: F("pr--mx-1 pr-my-1 pr-h-px pr-bg-muted", e), ...t } )); -hp.displayName = xe.Separator.displayName; -function gp({ table: e }) { +wp.displayName = xe.Separator.displayName; +function xp({ table: e }) { return /* @__PURE__ */ d("div", { className: "pr-flex pr-items-center pr-justify-between pr-px-2 pr-pb-3 pr-pt-3", children: /* @__PURE__ */ _("div", { className: "pr-flex pr-items-center pr-space-x-6 lg:pr-space-x-8", children: [ /* @__PURE__ */ _("div", { className: "pr-flex-1 pr-text-sm pr-text-muted-foreground", children: [ e.getFilteredSelectedRowModel().rows.length, @@ -1416,14 +1417,14 @@ function gp({ table: e }) { /* @__PURE__ */ _("div", { className: "pr-flex pr-items-center pr-space-x-2", children: [ /* @__PURE__ */ d("p", { className: "pr-text-nowrap pr-text-sm pr-font-medium", children: "Rows per page" }), /* @__PURE__ */ _( - sn, + ln, { value: `${e.getState().pagination.pageSize}`, onValueChange: (t) => { e.setPageSize(Number(t)); }, children: [ - /* @__PURE__ */ d(Rr, { className: "pr-h-8 pr-w-[70px]", children: /* @__PURE__ */ d(ln, { placeholder: e.getState().pagination.pageSize }) }), + /* @__PURE__ */ d(Rr, { className: "pr-h-8 pr-w-[70px]", children: /* @__PURE__ */ d(cn, { placeholder: e.getState().pagination.pageSize }) }), /* @__PURE__ */ d(Pr, { side: "top", children: [10, 20, 30, 40, 50].map((t) => /* @__PURE__ */ d(Ke, { value: `${t}`, children: t }, t)) }) ] } @@ -1446,7 +1447,7 @@ function gp({ table: e }) { disabled: !e.getCanPreviousPage(), children: [ /* @__PURE__ */ d("span", { className: "pr-sr-only", children: "Go to first page" }), - /* @__PURE__ */ d(Xl, { className: "pr-h-4 pr-w-4" }) + /* @__PURE__ */ d(Zl, { className: "pr-h-4 pr-w-4" }) ] } ), @@ -1460,7 +1461,7 @@ function gp({ table: e }) { disabled: !e.getCanPreviousPage(), children: [ /* @__PURE__ */ d("span", { className: "pr-sr-only", children: "Go to previous page" }), - /* @__PURE__ */ d(Yl, { className: "pr-h-4 pr-w-4" }) + /* @__PURE__ */ d(Ql, { className: "pr-h-4 pr-w-4" }) ] } ), @@ -1474,7 +1475,7 @@ function gp({ table: e }) { disabled: !e.getCanNextPage(), children: [ /* @__PURE__ */ d("span", { className: "pr-sr-only", children: "Go to next page" }), - /* @__PURE__ */ d(ql, { className: "pr-h-4 pr-w-4" }) + /* @__PURE__ */ d(ec, { className: "pr-h-4 pr-w-4" }) ] } ), @@ -1488,18 +1489,18 @@ function gp({ table: e }) { disabled: !e.getCanNextPage(), children: [ /* @__PURE__ */ d("span", { className: "pr-sr-only", children: "Go to last page" }), - /* @__PURE__ */ d(Kl, { className: "pr-h-4 pr-w-4" }) + /* @__PURE__ */ d(tc, { className: "pr-h-4 pr-w-4" }) ] } ) ] }) ] }) }); } -const kn = W.forwardRef(({ className: e, stickyHeader: t, ...r }, n) => /* @__PURE__ */ d("div", { className: V("pr-twp pr-relative pr-w-full", { "pr-overflow-auto": !t }), children: /* @__PURE__ */ d( +const kn = W.forwardRef(({ className: e, stickyHeader: t, ...r }, n) => /* @__PURE__ */ d("div", { className: F("pr-twp pr-relative pr-w-full", { "pr-overflow-auto": !t }), children: /* @__PURE__ */ d( "table", { ref: n, - className: V("pr-w-full pr-caption-bottom pr-text-sm", e), + className: F("pr-w-full pr-caption-bottom pr-text-sm", e), ...r } ) })); @@ -1508,7 +1509,7 @@ const En = W.forwardRef(({ className: e, stickyHeader: t, ...r }, n) => /* @__PU "thead", { ref: n, - className: V( + className: F( { "pr-sticky pr-top-0 pr-bg-muted": t }, "[&_tr]:pr-border-b", e @@ -1517,23 +1518,23 @@ const En = W.forwardRef(({ className: e, stickyHeader: t, ...r }, n) => /* @__PU } )); En.displayName = "TableHeader"; -const Nn = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d("tbody", { ref: r, className: V("[&_tr:last-child]:pr-border-0", e), ...t })); +const Nn = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d("tbody", { ref: r, className: F("[&_tr:last-child]:pr-border-0", e), ...t })); Nn.displayName = "TableBody"; -const bp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +const kp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( "tfoot", { ref: r, - className: V("pr-border-t pr-bg-muted/50 pr-font-medium [&>tr]:last:pr-border-b-0", e), + className: F("pr-border-t pr-bg-muted/50 pr-font-medium [&>tr]:last:pr-border-b-0", e), ...t } )); -bp.displayName = "TableFooter"; +kp.displayName = "TableFooter"; const yt = W.forwardRef( ({ className: e, ...t }, r) => /* @__PURE__ */ d( "tr", { ref: r, - className: V( + className: F( "pr-border-b pr-transition-colors hover:pr-bg-muted/50 data-[state=selected]:pr-bg-muted", e ), @@ -1546,7 +1547,7 @@ const $r = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( "th", { ref: r, - className: V( + className: F( "pr-h-12 pr-px-4 pr-text-start pr-align-middle pr-font-medium pr-text-muted-foreground [&:has([role=checkbox])]:pr-pe-0", e ), @@ -1558,21 +1559,21 @@ const Jt = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( "td", { ref: r, - className: V("pr-p-4 pr-align-middle [&:has([role=checkbox])]:pr-pe-0", e), + className: F("pr-p-4 pr-align-middle [&:has([role=checkbox])]:pr-pe-0", e), ...t } )); Jt.displayName = "TableCell"; -const vp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +const Ep = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( "caption", { ref: r, - className: V("pr-mt-4 pr-text-sm pr-text-muted-foreground", e), + className: F("pr-mt-4 pr-text-sm pr-text-muted-foreground", e), ...t } )); -vp.displayName = "TableCaption"; -function yp({ +Ep.displayName = "TableCaption"; +function Np({ columns: e, data: t, enablePagination: r = !1, @@ -1587,11 +1588,11 @@ function yp({ data: t, columns: e, getCoreRowModel: Ri(), - ...r && { getPaginationRowModel: gc() }, + ...r && { getPaginationRowModel: xc() }, onSortingChange: c, getSortedRowModel: Pi(), onColumnFiltersChange: m, - getFilteredRowModel: bc(), + getFilteredRowModel: kc(), onColumnVisibilityChange: g, onRowSelectionChange: h, state: { @@ -1602,7 +1603,7 @@ function yp({ } }); return /* @__PURE__ */ _("div", { className: "pr-twp pr-font-sans", children: [ - o && /* @__PURE__ */ d(up, { table: u }), + o && /* @__PURE__ */ d(bp, { table: u }), /* @__PURE__ */ _(kn, { stickyHeader: a, children: [ /* @__PURE__ */ d(En, { stickyHeader: a, children: u.getHeaderGroups().map((x) => /* @__PURE__ */ d(yt, { children: x.headers.map((O) => /* @__PURE__ */ d($r, { children: O.isPlaceholder ? void 0 : kr(O.column.columnDef.header, O.getContext()) }, O.id)) }, x.id)) }), /* @__PURE__ */ d(Nn, { children: (b = u.getRowModel().rows) != null && b.length ? u.getRowModel().rows.map((x) => /* @__PURE__ */ d( @@ -1637,16 +1638,16 @@ function yp({ } ) ] }), - r && n && /* @__PURE__ */ d(gp, { table: u }) + r && n && /* @__PURE__ */ d(xp, { table: u }) ] }); } -const wp = (e) => e.split(/(?=\n|\\(?:v|c|id))/g), Ea = (e) => { +const Tp = (e) => e.split(/(?=\n|\\(?:v|c|id))/g), Ea = (e) => { const t = /^\\[vc]\s+(\d+)/, r = e.match(t); return r ? +r[1] : 0; }, Na = (e, t, r, n) => { if (!e || e === "" || t === "") return []; - const o = [], a = wp(e); + const o = [], a = Tp(e); let i = n.chapterNum, l = n.verseNum, c = 0; return a.forEach((f) => { f.startsWith("\\id") && (i = 0, l = 0), f.startsWith("\\c") && (i = Ea(f), l = 0), f.startsWith("\\v") && (l = Ea(f), i === 0 && (i = n.chapterNum)); @@ -1661,7 +1662,7 @@ const wp = (e) => e.split(/(?=\n|\\(?:v|c|id))/g), Ea = (e) => { } }), o; }; -function xp({ +function Sp({ selectedItem: e, text: t, extractItems: r, @@ -1695,7 +1696,7 @@ function xp({ )) }) ] }); } -const Mv = Object.freeze([ +const jv = Object.freeze([ "%webView_inventory_all%", "%webView_inventory_approved%", "%webView_inventory_unapproved%", @@ -1706,12 +1707,12 @@ const Mv = Object.freeze([ "%webView_inventory_filter_text%", "%webView_inventory_occurrences_table_header_reference%", "%webView_inventory_occurrences_table_header_occurrence%" -]), $o = (e) => e === "asc" ? /* @__PURE__ */ d(Jl, { className: "pr-ms-2 pr-h-4 pr-w-4" }) : e === "desc" ? /* @__PURE__ */ d(Zl, { className: "pr-ms-2 pr-h-4 pr-w-4" }) : /* @__PURE__ */ d(Ql, { className: "pr-ms-2 pr-h-4 pr-w-4" }), kp = (e, t, r) => { +]), $o = (e) => e === "asc" ? /* @__PURE__ */ d(rc, { className: "pr-ms-2 pr-h-4 pr-w-4" }) : e === "desc" ? /* @__PURE__ */ d(nc, { className: "pr-ms-2 pr-h-4 pr-w-4" }) : /* @__PURE__ */ d(oc, { className: "pr-ms-2 pr-h-4 pr-w-4" }), Cp = (e, t, r) => { let n = e; return t !== "all" && (n = n.filter( (o) => t === "approved" && o.status === "approved" || t === "unapproved" && o.status === "unapproved" || t === "unknown" && o.status === "unknown" )), r !== "" && (n = n.filter((o) => o.item.includes(r))), n; -}, Ep = (e, t, r) => { +}, Op = (e, t, r) => { const n = [], o = t(e); for (let a = 0; a < o.length; a++) { const i = o[a], l = n.find((c) => c.item === i); @@ -1728,7 +1729,7 @@ const Mv = Object.freeze([ } return n; }, mt = (e, t) => e[t] ?? t; -function Av({ +function Bv({ scriptureReference: e, setScriptureReference: t, localizedStrings: r, @@ -1767,9 +1768,9 @@ function Av({ [o, i] ); He(() => { - c && y(Ep(c, n, R)); + c && y(Op(c, n, R)); }, [n, c, R]); - const I = Mt(() => kp(k, T, M), [k, T, M]); + const I = Mt(() => Cp(k, T, M), [k, T, M]); He(() => { $(""); }, [I]); @@ -1778,8 +1779,8 @@ function Av({ }, B = Mt(() => v(E), [v, E]); return /* @__PURE__ */ _("div", { className: "pr-twp pr-flex pr-h-full pr-flex-col", children: [ /* @__PURE__ */ _("div", { className: "pr-flex", children: [ - /* @__PURE__ */ _(sn, { onValueChange: (L) => S(L), defaultValue: T, children: [ - /* @__PURE__ */ d(Rr, { className: "pr-m-1", children: /* @__PURE__ */ d(ln, { placeholder: "Select filter" }) }), + /* @__PURE__ */ _(ln, { onValueChange: (L) => S(L), defaultValue: T, children: [ + /* @__PURE__ */ d(Rr, { className: "pr-m-1", children: /* @__PURE__ */ d(cn, { placeholder: "Select filter" }) }), /* @__PURE__ */ _(Pr, { className: "pr-font-sans", children: [ /* @__PURE__ */ d(Ke, { value: "all", children: g }), /* @__PURE__ */ d(Ke, { value: "approved", children: p }), @@ -1787,8 +1788,8 @@ function Av({ /* @__PURE__ */ d(Ke, { value: "unknown", children: u }) ] }) ] }), - /* @__PURE__ */ _(sn, { onValueChange: (L) => m(L), defaultValue: f, children: [ - /* @__PURE__ */ d(Rr, { className: "pr-m-1", children: /* @__PURE__ */ d(ln, { placeholder: "Select scope" }) }), + /* @__PURE__ */ _(ln, { onValueChange: (L) => m(L), defaultValue: f, children: [ + /* @__PURE__ */ d(Rr, { className: "pr-m-1", children: /* @__PURE__ */ d(cn, { placeholder: "Select scope" }) }), /* @__PURE__ */ _(Pr, { className: "pr-font-sans", children: [ /* @__PURE__ */ d(Ke, { value: "book", children: b }), /* @__PURE__ */ d(Ke, { value: "chapter", children: x }), @@ -1796,7 +1797,7 @@ function Av({ ] }) ] }), /* @__PURE__ */ d( - yn, + jr, { className: "pr-m-1 pr-rounded-md pr-border", placeholder: w, @@ -1808,7 +1809,7 @@ function Av({ ) ] }), /* @__PURE__ */ d("div", { className: "pr-m-1 pr-flex-1 pr-overflow-auto pr-rounded-md pr-border", children: /* @__PURE__ */ d( - yp, + Np, { columns: B, data: I, @@ -1817,7 +1818,7 @@ function Av({ } ) }), z !== "" && /* @__PURE__ */ d("div", { className: "pr-m-1 pr-flex-1 pr-overflow-auto pr-rounded-md pr-border", children: /* @__PURE__ */ d( - xp, + Sp, { selectedItem: z, text: c, @@ -1829,19 +1830,19 @@ function Av({ ) }) ] }); } -const Dv = (e) => ({ +const Lv = (e) => ({ accessorKey: "item", header: ({ column: t }) => /* @__PURE__ */ _(we, { variant: "ghost", onClick: () => t.toggleSorting(void 0), children: [ e, $o(t.getIsSorted()) ] }) -}), jv = (e) => ({ +}), Fv = (e) => ({ accessorKey: "count", header: ({ column: t }) => /* @__PURE__ */ _(we, { variant: "ghost", onClick: () => t.toggleSorting(void 0), children: [ e, $o(t.getIsSorted()) ] }) -}), Bv = (e, t) => ({ +}), Vv = (e, t) => ({ accessorKey: "status", header: ({ column: r, table: n }) => { const o = n.getSelectedRowModel().rows, a = []; @@ -1899,39 +1900,39 @@ const Dv = (e) => ({ return /* @__PURE__ */ d(va, {}); } } -}), Np = Or.Root, Tp = Or.Trigger, Wi = W.forwardRef(({ className: e, align: t = "center", sideOffset: r = 4, ...n }, o) => /* @__PURE__ */ d(Or.Portal, { children: /* @__PURE__ */ d( +}), Rp = Or.Root, Pp = Or.Trigger, Xi = W.forwardRef(({ className: e, align: t = "center", sideOffset: r = 4, ...n }, o) => /* @__PURE__ */ d(Or.Portal, { children: /* @__PURE__ */ d( Or.Content, { ref: o, align: t, sideOffset: r, - className: V( + className: F( "pr-twp pr-z-50 pr-w-72 pr-rounded-md pr-border pr-bg-popover pr-p-4 pr-text-popover-foreground pr-shadow-md pr-outline-none data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[side=bottom]:pr-slide-in-from-top-2 data-[side=left]:pr-slide-in-from-right-2 data-[side=right]:pr-slide-in-from-left-2 data-[side=top]:pr-slide-in-from-bottom-2", e ), ...n } ) })); -Wi.displayName = Or.Content.displayName; -const Sp = Qe.Portal, Xi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +Xi.displayName = Or.Content.displayName; +const $p = Qe.Portal, Yi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( Qe.Overlay, { ref: r, - className: V( + className: F( "pr- pr-fixed pr-inset-0 pr-z-50 pr-bg-black/80 data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0", e ), ...t } )); -Xi.displayName = Qe.Overlay.displayName; -const Cp = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ _(Sp, { children: [ - /* @__PURE__ */ d(Xi, {}), +Yi.displayName = Qe.Overlay.displayName; +const _p = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ */ _($p, { children: [ + /* @__PURE__ */ d(Yi, {}), /* @__PURE__ */ _( Qe.Content, { ref: n, - className: V( + className: F( "pr-fixed pr-left-[50%] pr-top-[50%] pr-z-50 pr-grid pr-w-full pr-max-w-lg pr-translate-x-[-50%] pr-translate-y-[-50%] pr-gap-4 pr-border pr-bg-background pr-p-6 pr-shadow-lg pr-duration-200 data-[state=open]:pr-animate-in data-[state=closed]:pr-animate-out data-[state=closed]:pr-fade-out-0 data-[state=open]:pr-fade-in-0 data-[state=closed]:pr-zoom-out-95 data-[state=open]:pr-zoom-in-95 data-[state=closed]:pr-slide-out-to-left-1/2 data-[state=closed]:pr-slide-out-to-top-[48%] data-[state=open]:pr-slide-in-from-left-1/2 data-[state=open]:pr-slide-in-from-top-[48%] sm:pr-rounded-lg", e ), @@ -1939,51 +1940,51 @@ const Cp = W.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__ children: [ t, /* @__PURE__ */ _(Qe.Close, { className: "pr-absolute pr-right-4 pr-top-4 pr-rounded-sm pr-opacity-70 pr-ring-offset-background pr-transition-opacity hover:pr-opacity-100 focus:pr-outline-none focus:pr-ring-2 focus:pr-ring-ring focus:pr-ring-offset-2 disabled:pr-pointer-events-none data-[state=open]:pr-bg-accent data-[state=open]:pr-text-muted-foreground", children: [ - /* @__PURE__ */ d(ec, { className: "pr-h-4 pr-w-4" }), + /* @__PURE__ */ d(ac, { className: "pr-h-4 pr-w-4" }), /* @__PURE__ */ d("span", { className: "pr-sr-only", children: "Close" }) ] }) ] } ) ] })); -Cp.displayName = Qe.Content.displayName; -const Op = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +_p.displayName = Qe.Content.displayName; +const Ip = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( Qe.Title, { ref: r, - className: V("pr-text-lg pr-font-semibold pr-leading-none pr-tracking-tight", e), + className: F("pr-text-lg pr-font-semibold pr-leading-none pr-tracking-tight", e), ...t } )); -Op.displayName = Qe.Title.displayName; -const Rp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +Ip.displayName = Qe.Title.displayName; +const Mp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( Qe.Description, { ref: r, - className: V("pr-text-sm pr-text-muted-foreground", e), + className: F("pr-text-sm pr-text-muted-foreground", e), ...t } )); -Rp.displayName = Qe.Description.displayName; -const Yi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +Mp.displayName = Qe.Description.displayName; +const qi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( Ae, { ref: r, - className: V( + className: F( "pr-flex pr-h-full pr-w-full pr-flex-col pr-overflow-hidden pr-rounded-md pr-bg-popover pr-text-popover-foreground", e ), ...t } )); -Yi.displayName = Ae.displayName; -const qi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ _("div", { className: "pr-flex pr-items-center pr-border-b pr-px-3", children: [ - /* @__PURE__ */ d(tc, { className: "pr-me-2 pr-h-4 pr-w-4 pr-shrink-0 pr-opacity-50" }), +qi.displayName = Ae.displayName; +const Ki = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ _("div", { className: "pr-flex pr-items-center pr-border-b pr-px-3", children: [ + /* @__PURE__ */ d(ic, { className: "pr-me-2 pr-h-4 pr-w-4 pr-shrink-0 pr-opacity-50" }), /* @__PURE__ */ d( Ae.Input, { ref: r, - className: V( + className: F( "pr-flex pr-h-11 pr-w-full pr-rounded-md pr-bg-transparent pr-py-3 pr-text-sm pr-outline-none placeholder:pr-text-muted-foreground disabled:pr-cursor-not-allowed disabled:pr-opacity-50", e ), @@ -1991,52 +1992,52 @@ const qi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ _("div", } ) ] })); -qi.displayName = Ae.Input.displayName; -const Ki = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +Ki.displayName = Ae.Input.displayName; +const Ji = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( Ae.List, { ref: r, - className: V("pr-max-h-[300px] pr-overflow-y-auto pr-overflow-x-hidden", e), + className: F("pr-max-h-[300px] pr-overflow-y-auto pr-overflow-x-hidden", e), ...t } )); -Ki.displayName = Ae.List.displayName; -const Ji = W.forwardRef((e, t) => /* @__PURE__ */ d(Ae.Empty, { ref: t, className: "pr-py-6 pr-text-center pr-text-sm", ...e })); -Ji.displayName = Ae.Empty.displayName; -const Pp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +Ji.displayName = Ae.List.displayName; +const Zi = W.forwardRef((e, t) => /* @__PURE__ */ d(Ae.Empty, { ref: t, className: "pr-py-6 pr-text-center pr-text-sm", ...e })); +Zi.displayName = Ae.Empty.displayName; +const Ap = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( Ae.Group, { ref: r, - className: V( + className: F( "pr-overflow-hidden pr-p-1 pr-text-foreground [&_[cmdk-group-heading]]:pr-px-2 [&_[cmdk-group-heading]]:pr-py-1.5 [&_[cmdk-group-heading]]:pr-text-xs [&_[cmdk-group-heading]]:pr-font-medium [&_[cmdk-group-heading]]:pr-text-muted-foreground", e ), ...t } )); -Pp.displayName = Ae.Group.displayName; -const $p = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +Ap.displayName = Ae.Group.displayName; +const Dp = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( Ae.Separator, { ref: r, - className: V("pr--mx-1 pr-h-px pr-bg-border", e), + className: F("pr--mx-1 pr-h-px pr-bg-border", e), ...t } )); -$p.displayName = Ae.Separator.displayName; -const Zi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +Dp.displayName = Ae.Separator.displayName; +const Qi = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( Ae.Item, { ref: r, - className: V( + className: F( "pr-relative pr-flex pr-cursor-default pr-select-none pr-items-center pr-rounded-sm pr-px-2 pr-py-1.5 pr-text-sm pr-outline-none data-[disabled=true]:pr-pointer-events-none data-[selected=true]:pr-bg-accent data-[selected=true]:pr-text-accent-foreground data-[disabled=true]:pr-opacity-50", e ), ...t } )); -Zi.displayName = Ae.Item.displayName; -function _p(e) { +Qi.displayName = Ae.Item.displayName; +function jp(e) { return typeof e == "string" ? e : typeof e == "number" ? e.toString() : e.label; } function Ta({ @@ -2046,7 +2047,7 @@ function Ta({ value: n, onChange: o = () => { }, - getOptionLabel: a = _p, + getOptionLabel: a = jp, buttonPlaceholder: i = "", textPlaceholder: l = "", commandEmptyMessage: c = "No option found", @@ -2055,26 +2056,26 @@ function Ta({ ...v }) { const [g, p] = ce(!1); - return /* @__PURE__ */ _(Np, { open: g, onOpenChange: p, ...v, children: [ - /* @__PURE__ */ d(Tp, { asChild: !0, children: /* @__PURE__ */ _( + return /* @__PURE__ */ _(Rp, { open: g, onOpenChange: p, ...v, children: [ + /* @__PURE__ */ d(Pp, { asChild: !0, children: /* @__PURE__ */ _( we, { variant: f, role: "combobox", "aria-expanded": g, id: e, - className: V("pr-w-[200px] pr-justify-between", r), + className: F("pr-w-[200px] pr-justify-between", r), children: [ n ? a(n) : i, - /* @__PURE__ */ d(rc, { className: "pr-ms-2 pr-h-4 pr-w-4 pr-shrink-0 pr-opacity-50" }) + /* @__PURE__ */ d(sc, { className: "pr-ms-2 pr-h-4 pr-w-4 pr-shrink-0 pr-opacity-50" }) ] } ) }), - /* @__PURE__ */ d(Wi, { className: "pr-w-[200px] pr-p-0", dir: m, children: /* @__PURE__ */ _(Yi, { children: [ - /* @__PURE__ */ d(qi, { dir: m, placeholder: l, className: "pr-text-inherit" }), - /* @__PURE__ */ d(Ji, { children: c }), - /* @__PURE__ */ d(Ki, { children: t.map((h) => /* @__PURE__ */ _( - Zi, + /* @__PURE__ */ d(Xi, { className: "pr-w-[200px] pr-p-0", dir: m, children: /* @__PURE__ */ _(qi, { children: [ + /* @__PURE__ */ d(Ki, { dir: m, placeholder: l, className: "pr-text-inherit" }), + /* @__PURE__ */ d(Zi, { children: c }), + /* @__PURE__ */ d(Ji, { children: t.map((h) => /* @__PURE__ */ _( + Qi, { value: a(h), onSelect: () => { @@ -2084,7 +2085,7 @@ function Ta({ /* @__PURE__ */ d( No, { - className: V("pr-me-2 pr-h-4 pr-w-4", { + className: F("pr-me-2 pr-h-4 pr-w-4", { "pr-opacity-0": !n || a(n) !== a(h) }) } @@ -2097,7 +2098,7 @@ function Ta({ ] }) }) ] }); } -function Lv({ +function zv({ handleSelectStartChapter: e, handleSelectEndChapter: t, isDisabled: r = !1, @@ -2156,7 +2157,7 @@ function Lv({ ] }); } var Yt = /* @__PURE__ */ ((e) => (e.After = "after", e.Before = "before", e.Above = "above", e.Below = "below", e))(Yt || {}); -function Ip({ +function Bp({ id: e, isChecked: t, labelText: r = "", @@ -2169,7 +2170,7 @@ function Ip({ onChange: f }) { const m = /* @__PURE__ */ d( - kc, + Cc, { id: e, checked: t, @@ -2184,7 +2185,7 @@ function Ip({ if (r) { const g = n === Yt.Before || n === Yt.Above, p = /* @__PURE__ */ d("span", { className: `papi-checkbox-label ${l ? "error" : ""} ${c ?? ""}`, children: r }), h = n === Yt.Before || n === Yt.After, u = h ? p : /* @__PURE__ */ d("div", { children: p }), b = h ? m : /* @__PURE__ */ d("div", { children: m }); v = /* @__PURE__ */ _( - xc, + Sc, { className: `papi-checkbox ${n.toString()}`, disabled: i, @@ -2200,7 +2201,7 @@ function Ip({ v = m; return v; } -function Fv({ +function Uv({ id: e, className: t, legend: r, @@ -2212,7 +2213,7 @@ function Fv({ return /* @__PURE__ */ _("fieldset", { id: e, className: t, children: [ r && /* @__PURE__ */ d("legend", { children: r }), n.map((l) => /* @__PURE__ */ d( - Ip, + Bp, { className: "check-item", isChecked: o.includes(l), @@ -2223,10 +2224,10 @@ function Fv({ )) ] }); } -function Mp(e) { +function Lp(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } -function Ap(e) { +function Fp(e) { if (e.__esModule) return e; var t = e.default; @@ -2247,7 +2248,7 @@ function Ap(e) { }); }), r; } -var _o = {}, Qi = { exports: {} }; +var _o = {}, es = { exports: {} }; (function(e) { function t(r) { return r && r.__esModule ? r : { @@ -2255,8 +2256,8 @@ var _o = {}, Qi = { exports: {} }; }; } e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports; -})(Qi); -var Dp = Qi.exports, Hn = {}; +})(es); +var Vp = es.exports, Hn = {}; function ar(e, t) { return process.env.NODE_ENV === "production" ? () => null : function(...n) { return e(...n) || t(...n); @@ -2278,12 +2279,12 @@ function Pt(e) { const t = Object.getPrototypeOf(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); } -function es(e) { +function ts(e) { if (!Pt(e)) return e; const t = {}; return Object.keys(e).forEach((r) => { - t[r] = es(e[r]); + t[r] = ts(e[r]); }), t; } function st(e, t, r = { @@ -2291,10 +2292,10 @@ function st(e, t, r = { }) { const n = r.clone ? P({}, e) : e; return Pt(e) && Pt(t) && Object.keys(t).forEach((o) => { - o !== "__proto__" && (Pt(t[o]) && o in e && Pt(e[o]) ? n[o] = st(e[o], t[o], r) : r.clone ? n[o] = Pt(t[o]) ? es(t[o]) : t[o] : n[o] = t[o]); + o !== "__proto__" && (Pt(t[o]) && o in e && Pt(e[o]) ? n[o] = st(e[o], t[o], r) : r.clone ? n[o] = Pt(t[o]) ? ts(t[o]) : t[o] : n[o] = t[o]); }), n; } -var co = { exports: {} }, Kr = { exports: {} }, pe = {}; +var co = { exports: {} }, Jr = { exports: {} }, pe = {}; /** @license React v16.13.1 * react-is.production.min.js * @@ -2304,7 +2305,7 @@ var co = { exports: {} }, Kr = { exports: {} }, pe = {}; * LICENSE file in the root directory of this source tree. */ var Sa; -function jp() { +function zp() { if (Sa) return pe; Sa = 1; @@ -2380,19 +2381,19 @@ var de = {}; * LICENSE file in the root directory of this source tree. */ var Ca; -function Bp() { +function Up() { return Ca || (Ca = 1, process.env.NODE_ENV !== "production" && function() { var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = 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, f = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, v = e ? Symbol.for("react.suspense") : 60113, g = e ? Symbol.for("react.suspense_list") : 60120, p = e ? Symbol.for("react.memo") : 60115, h = e ? Symbol.for("react.lazy") : 60116, u = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, O = e ? Symbol.for("react.scope") : 60119; - function w(F) { - return typeof F == "string" || typeof F == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - F === n || F === f || F === a || F === o || F === v || F === g || typeof F == "object" && F !== null && (F.$$typeof === h || F.$$typeof === p || F.$$typeof === i || F.$$typeof === l || F.$$typeof === m || F.$$typeof === b || F.$$typeof === x || F.$$typeof === O || F.$$typeof === u); + function w(V) { + return typeof V == "string" || typeof V == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + V === n || V === f || V === a || V === o || V === v || V === g || typeof V == "object" && V !== null && (V.$$typeof === h || V.$$typeof === p || V.$$typeof === i || V.$$typeof === l || V.$$typeof === m || V.$$typeof === b || V.$$typeof === x || V.$$typeof === O || V.$$typeof === u); } - function k(F) { - if (typeof F == "object" && F !== null) { - var re = F.$$typeof; + function k(V) { + if (typeof V == "object" && V !== null) { + var re = V.$$typeof; switch (re) { case t: - var D = F.type; + var D = V.type; switch (D) { case c: case f: @@ -2420,51 +2421,51 @@ function Bp() { } } var y = c, T = f, S = l, M = i, j = t, z = m, $ = n, E = h, R = p, I = r, U = a, B = o, L = v, Z = !1; - function Q(F) { - return Z || (Z = !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.")), C(F) || k(F) === c; + function Q(V) { + return Z || (Z = !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.")), C(V) || k(V) === c; } - function C(F) { - return k(F) === f; + function C(V) { + return k(V) === f; } - function A(F) { - return k(F) === l; + function A(V) { + return k(V) === l; } - function H(F) { - return k(F) === i; + function H(V) { + return k(V) === i; } - function J(F) { - return typeof F == "object" && F !== null && F.$$typeof === t; + function J(V) { + return typeof V == "object" && V !== null && V.$$typeof === t; } - function G(F) { - return k(F) === m; + function G(V) { + return k(V) === m; } - function X(F) { - return k(F) === n; + function X(V) { + return k(V) === n; } - function q(F) { - return k(F) === h; + function q(V) { + return k(V) === h; } - function K(F) { - return k(F) === p; + function K(V) { + return k(V) === p; } - function Y(F) { - return k(F) === r; + function Y(V) { + return k(V) === r; } - function ee(F) { - return k(F) === a; + function ee(V) { + return k(V) === a; } - function te(F) { - return k(F) === o; + function te(V) { + return k(V) === o; } - function ie(F) { - return k(F) === v; + function ie(V) { + return k(V) === v; } de.AsyncMode = y, de.ConcurrentMode = T, de.ContextConsumer = S, de.ContextProvider = M, de.Element = j, de.ForwardRef = z, de.Fragment = $, de.Lazy = E, de.Memo = R, de.Portal = I, de.Profiler = U, de.StrictMode = B, de.Suspense = L, de.isAsyncMode = Q, de.isConcurrentMode = C, de.isContextConsumer = A, de.isContextProvider = H, de.isElement = J, de.isForwardRef = G, de.isFragment = X, de.isLazy = q, de.isMemo = K, de.isPortal = Y, de.isProfiler = ee, de.isStrictMode = te, de.isSuspense = ie, de.isValidElementType = w, de.typeOf = k; }()), de; } var Oa; -function ts() { - return Oa || (Oa = 1, process.env.NODE_ENV === "production" ? Kr.exports = jp() : Kr.exports = Bp()), Kr.exports; +function rs() { + return Oa || (Oa = 1, process.env.NODE_ENV === "production" ? Jr.exports = zp() : Jr.exports = Up()), Jr.exports; } /* object-assign @@ -2472,7 +2473,7 @@ object-assign @license MIT */ var Gn, Ra; -function Lp() { +function Hp() { if (Ra) return Gn; Ra = 1; @@ -2527,18 +2528,18 @@ function Io() { return Wn = e, Wn; } var Xn, $a; -function rs() { +function ns() { return $a || ($a = 1, Xn = Function.call.bind(Object.prototype.hasOwnProperty)), Xn; } var Yn, _a; -function Fp() { +function Gp() { if (_a) return Yn; _a = 1; var e = function() { }; if (process.env.NODE_ENV !== "production") { - var t = Io(), r = {}, n = rs(); + var t = Io(), r = {}, n = ns(); e = function(a) { var i = "Warning: " + a; typeof console < "u" && console.error(i); @@ -2581,11 +2582,11 @@ function Fp() { }, Yn = o, Yn; } var qn, Ia; -function Vp() { +function Wp() { if (Ia) return qn; Ia = 1; - var e = ts(), t = Lp(), r = Io(), n = rs(), o = Fp(), a = function() { + var e = rs(), t = Hp(), r = Io(), n = ns(), o = Gp(), a = function() { }; process.env.NODE_ENV !== "production" && (a = function(l) { var c = "Warning: " + l; @@ -2639,10 +2640,10 @@ function Vp() { function J(X, q, K, Y, ee, te, ie) { if (Y = Y || g, te = te || K, ie !== r) { if (c) { - var F = new Error( + var V = 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 F.name = "Invariant Violation", F; + throw V.name = "Invariant Violation", V; } else if (process.env.NODE_ENV !== "production" && typeof console < "u") { var re = Y + ":" + K; !A[re] && // Avoid spamming the console because they are often not actionable except for lib authors @@ -2732,9 +2733,9 @@ function Vp() { for (var K = H[J], Y = 0; Y < C.length; Y++) if (h(K, C[Y])) return null; - var ee = JSON.stringify(C, function(ie, F) { - var re = L(F); - return re === "symbol" ? String(F) : F; + var ee = JSON.stringify(C, function(ie, V) { + var re = L(V); + return re === "symbol" ? String(V) : V; }); return new u("Invalid " + X + " `" + q + "` of value `" + String(K) + "` " + ("supplied to `" + G + "`, expected one of " + ee + ".")); } @@ -2769,10 +2770,10 @@ function Vp() { } function J(G, X, q, K, Y) { for (var ee = [], te = 0; te < C.length; te++) { - var ie = C[te], F = ie(G, X, q, K, Y, r); - if (F == null) + var ie = C[te], V = ie(G, X, q, K, Y, r); + if (V == null) return null; - F.data && n(F.data, "expectedType") && ee.push(F.data.expectedType); + V.data && n(V.data, "expectedType") && ee.push(V.data.expectedType); } var re = ee.length > 0 ? ", expected one of type [" + ee.join(", ") + "]" : ""; return new u("Invalid " + K + " `" + Y + "` supplied to " + ("`" + q + "`" + re + ".")); @@ -2822,9 +2823,9 @@ function Vp() { "Invalid " + X + " `" + q + "` key `" + te + "` supplied to `" + G + "`.\nBad object: " + JSON.stringify(H[J], null, " ") + ` Valid keys: ` + JSON.stringify(Object.keys(C), null, " ") ); - var F = ie(K, te, G, X, q + "." + te, r); - if (F) - return F; + var V = ie(K, te, G, X, q + "." + te, r); + if (V) + return V; } return null; } @@ -2903,7 +2904,7 @@ Valid keys: ` + JSON.stringify(Object.keys(C), null, " ") }, qn; } var Kn, Ma; -function zp() { +function Xp() { if (Ma) return Kn; Ma = 1; @@ -2952,19 +2953,19 @@ function zp() { }, Kn; } if (process.env.NODE_ENV !== "production") { - var Up = ts(), Hp = !0; - co.exports = Vp()(Up.isElement, Hp); + var Yp = rs(), qp = !0; + co.exports = Wp()(Yp.isElement, qp); } else - co.exports = zp()(); -var Gp = co.exports; -const s = /* @__PURE__ */ Mp(Gp); -function Wp(e) { + co.exports = Xp()(); +var Kp = co.exports; +const s = /* @__PURE__ */ Lp(Kp); +function Jp(e) { const { prototype: t = {} } = e; return !!t.isReactComponent; } -function ns(e, t, r, n, o) { +function os(e, t, r, n, o) { const a = e[t], i = o || t; if (a == null || // When server-side rendering React doesn't warn either. // This is not an accurate check for SSR. @@ -2974,18 +2975,18 @@ function ns(e, t, r, n, o) { return null; let l; const c = a.type; - return typeof c == "function" && !Wp(c) && (l = "Did you accidentally use a plain function component for an element instead?"), l !== void 0 ? new Error(`Invalid ${n} \`${i}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null; + return typeof c == "function" && !Jp(c) && (l = "Did you accidentally use a plain function component for an element instead?"), l !== void 0 ? new Error(`Invalid ${n} \`${i}\` supplied to \`${r}\`. Expected an element that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null; } -const os = ar(s.element, ns); -os.isRequired = ar(s.element.isRequired, ns); -const Br = os; -function Xp(e) { +const as = ar(s.element, os); +as.isRequired = ar(s.element.isRequired, os); +const Lr = as; +function Zp(e) { const { prototype: t = {} } = e; return !!t.isReactComponent; } -function Yp(e, t, r, n, o) { +function Qp(e, t, r, n, o) { const a = e[t], i = o || t; if (a == null || // When server-side rendering React doesn't warn either. // This is not an accurate check for SSR. @@ -2994,12 +2995,12 @@ function Yp(e, t, r, n, o) { typeof window > "u") return null; let l; - return typeof a == "function" && !Xp(a) && (l = "Did you accidentally provide a plain function component instead?"), l !== void 0 ? new Error(`Invalid ${n} \`${i}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null; + return typeof a == "function" && !Zp(a) && (l = "Did you accidentally provide a plain function component instead?"), l !== void 0 ? new Error(`Invalid ${n} \`${i}\` supplied to \`${r}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null; } -const qp = ar(s.elementType, Yp), Kp = "exact-prop: ​"; -function as(e) { +const ed = ar(s.elementType, Qp), td = "exact-prop: ​"; +function is(e) { return process.env.NODE_ENV === "production" ? e : P({}, e, { - [Kp]: (t) => { + [td]: (t) => { const r = Object.keys(t).filter((n) => !e.hasOwnProperty(n)); return r.length > 0 ? new Error(`The following props are not supported: ${r.map((n) => `\`${n}\``).join(", ")}. Please remove them.`) : null; } @@ -3022,7 +3023,7 @@ var po = { exports: {} }, ue = {}; * LICENSE file in the root directory of this source tree. */ var Aa; -function Jp() { +function rd() { if (Aa) return ue; Aa = 1; @@ -3101,7 +3102,7 @@ var fe = {}; * LICENSE file in the root directory of this source tree. */ var Da; -function Zp() { +function nd() { return Da || (Da = 1, process.env.NODE_ENV !== "production" && function() { var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), n = 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"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), v = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), h = !1, u = !1, b = !1, x = !1, O = !1, w; w = Symbol.for("react.module.reference"); @@ -3181,40 +3182,40 @@ function Zp() { function ie(D) { return y(D) === n; } - function F(D) { + function V(D) { return y(D) === f; } function re(D) { return y(D) === m; } - fe.ContextConsumer = T, fe.ContextProvider = S, fe.Element = M, fe.ForwardRef = j, fe.Fragment = z, fe.Lazy = $, fe.Memo = E, fe.Portal = R, fe.Profiler = I, fe.StrictMode = U, fe.Suspense = B, fe.SuspenseList = L, fe.isAsyncMode = C, fe.isConcurrentMode = A, fe.isContextConsumer = H, fe.isContextProvider = J, fe.isElement = G, fe.isForwardRef = X, fe.isFragment = q, fe.isLazy = K, fe.isMemo = Y, fe.isPortal = ee, fe.isProfiler = te, fe.isStrictMode = ie, fe.isSuspense = F, fe.isSuspenseList = re, fe.isValidElementType = k, fe.typeOf = y; + fe.ContextConsumer = T, fe.ContextProvider = S, fe.Element = M, fe.ForwardRef = j, fe.Fragment = z, fe.Lazy = $, fe.Memo = E, fe.Portal = R, fe.Profiler = I, fe.StrictMode = U, fe.Suspense = B, fe.SuspenseList = L, fe.isAsyncMode = C, fe.isConcurrentMode = A, fe.isContextConsumer = H, fe.isContextProvider = J, fe.isElement = G, fe.isForwardRef = X, fe.isFragment = q, fe.isLazy = K, fe.isMemo = Y, fe.isPortal = ee, fe.isProfiler = te, fe.isStrictMode = ie, fe.isSuspense = V, fe.isSuspenseList = re, fe.isValidElementType = k, fe.typeOf = y; }()), fe; } -process.env.NODE_ENV === "production" ? po.exports = Jp() : po.exports = Zp(); -var cn = po.exports; -const Qp = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/; -function ed(e) { - const t = `${e}`.match(Qp); +process.env.NODE_ENV === "production" ? po.exports = rd() : po.exports = nd(); +var pn = po.exports; +const od = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/; +function ad(e) { + const t = `${e}`.match(od); return t && t[1] || ""; } -function is(e, t = "") { - return e.displayName || e.name || ed(e) || t; +function ss(e, t = "") { + return e.displayName || e.name || ad(e) || t; } function ja(e, t, r) { - const n = is(t); + const n = ss(t); return e.displayName || (n !== "" ? `${r}(${n})` : r); } -function td(e) { +function id(e) { if (e != null) { if (typeof e == "string") return e; if (typeof e == "function") - return is(e, "Component"); + return ss(e, "Component"); if (typeof e == "object") switch (e.$$typeof) { - case cn.ForwardRef: + case pn.ForwardRef: return ja(e, e.render, "ForwardRef"); - case cn.Memo: + case pn.Memo: return ja(e, e.type, "memo"); default: return; @@ -3227,7 +3228,7 @@ function lt(e, t, r, n, o) { const a = e[t], i = o || t; return a == null ? null : a && a.nodeType !== 1 ? new Error(`Invalid ${n} \`${i}\` supplied to \`${r}\`. Expected an HTMLElement.`) : null; } -const rd = s.oneOfType([s.func, s.object]), Mo = rd; +const sd = s.oneOfType([s.func, s.object]), Mo = sd; function et(e) { if (typeof e != "string") throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : Zt(7)); @@ -3239,7 +3240,7 @@ function uo(...e) { }, () => { }); } -function ss(e, t = 166) { +function ls(e, t = 166) { let r; function n(...o) { const a = () => { @@ -3251,13 +3252,13 @@ function ss(e, t = 166) { clearTimeout(r); }, n; } -function nd(e, t) { +function ld(e, t) { return process.env.NODE_ENV === "production" ? () => null : (r, n, o, a, i) => { const l = o || "<>", c = i || n; return typeof r[n] < "u" ? new Error(`The ${a} \`${c}\` of \`${l}\` is deprecated. ${t}`) : null; }; } -function od(e, t) { +function cd(e, t) { var r, n; return /* @__PURE__ */ N.isValidElement(e) && t.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName @@ -3272,7 +3273,7 @@ function Oe(e) { function Qt(e) { return Oe(e).defaultView || window; } -function ad(e, t) { +function pd(e, t) { if (process.env.NODE_ENV === "production") return () => null; const r = t ? P({}, t.propTypes) : null; @@ -3286,32 +3287,32 @@ function ad(e, t) { return typeof a[i] < "u" && !a[o] ? new Error(`The prop \`${v}\` of \`${e}\` can only be used together with the \`${o}\` prop.`) : null; }; } -function pn(e, t) { +function dn(e, t) { typeof e == "function" ? e(t) : e && (e.current = t); } -const id = typeof window < "u" ? N.useLayoutEffect : N.useEffect, Dt = id; +const dd = typeof window < "u" ? N.useLayoutEffect : N.useEffect, Dt = dd; let Ba = 0; -function sd(e) { +function ud(e) { const [t, r] = N.useState(e), n = e || t; return N.useEffect(() => { t == null && (Ba += 1, r(`mui-${Ba}`)); }, [t]), n; } const La = N["useId".toString()]; -function ls(e) { +function cs(e) { if (La !== void 0) { const t = La(); return e ?? t; } - return sd(e); + return ud(e); } -function ld(e, t, r, n, o) { +function fd(e, t, r, n, 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 cs({ +function ps({ controlled: e, default: t, name: r, @@ -3350,27 +3351,27 @@ function _r(e) { function We(...e) { return N.useMemo(() => e.every((t) => t == null) ? null : (t) => { e.forEach((r) => { - pn(r, t); + dn(r, t); }); }, e); } const Fa = {}; -function cd(e, t) { +function md(e, t) { const r = N.useRef(Fa); return r.current === Fa && (r.current = e(t)), r; } -const pd = []; -function dd(e) { - N.useEffect(e, pd); +const hd = []; +function gd(e) { + N.useEffect(e, hd); } -class Lr { +class Fr { constructor() { this.currentId = null, this.clear = () => { this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null); }, this.disposeEffect = () => this.clear; } static create() { - return new Lr(); + return new Fr(); } /** * Executes `fn` after `delay`, clearing any previously scheduled call. @@ -3382,11 +3383,11 @@ class Lr { } } function yr() { - const e = cd(Lr.create).current; - return dd(e.disposeEffect), e; + const e = md(Fr.create).current; + return gd(e.disposeEffect), e; } let Tn = !0, fo = !1; -const ud = new Lr(), fd = { +const bd = new Fr(), vd = { text: !0, search: !0, url: !0, @@ -3401,26 +3402,26 @@ const ud = new Lr(), fd = { datetime: !0, "datetime-local": !0 }; -function md(e) { +function yd(e) { const { type: t, tagName: r } = e; - return !!(r === "INPUT" && fd[t] && !e.readOnly || r === "TEXTAREA" && !e.readOnly || e.isContentEditable); + return !!(r === "INPUT" && vd[t] && !e.readOnly || r === "TEXTAREA" && !e.readOnly || e.isContentEditable); } -function hd(e) { +function wd(e) { e.metaKey || e.altKey || e.ctrlKey || (Tn = !0); } function Jn() { Tn = !1; } -function gd() { +function xd() { this.visibilityState === "hidden" && fo && (Tn = !0); } -function bd(e) { - e.addEventListener("keydown", hd, !0), e.addEventListener("mousedown", Jn, !0), e.addEventListener("pointerdown", Jn, !0), e.addEventListener("touchstart", Jn, !0), e.addEventListener("visibilitychange", gd, !0); +function kd(e) { + e.addEventListener("keydown", wd, !0), e.addEventListener("mousedown", Jn, !0), e.addEventListener("pointerdown", Jn, !0), e.addEventListener("touchstart", Jn, !0), e.addEventListener("visibilitychange", xd, !0); } -function vd(e) { +function Ed(e) { const { target: t } = e; @@ -3428,19 +3429,19 @@ function vd(e) { return t.matches(":focus-visible"); } catch { } - return Tn || md(t); + return Tn || yd(t); } -function ps() { +function ds() { const e = N.useCallback((o) => { - o != null && bd(o.ownerDocument); + o != null && kd(o.ownerDocument); }, []), t = N.useRef(!1); function r() { - return t.current ? (fo = !0, ud.start(100, () => { + return t.current ? (fo = !0, bd.start(100, () => { fo = !1; }), t.current = !1, !0) : !1; } function n(o) { - return vd(o) ? (t.current = !0, !0) : !1; + return Ed(o) ? (t.current = !0, !0) : !1; } return { isFocusVisibleRef: t, @@ -3449,11 +3450,11 @@ function ps() { ref: e }; } -function ds(e) { +function us(e) { const t = e.documentElement.clientWidth; return Math.abs(window.innerWidth - t); } -function yd(e) { +function Nd(e) { const t = typeof e; switch (t) { case "number": @@ -3464,28 +3465,28 @@ function yd(e) { return t; } } -function wd(e) { +function Td(e) { return typeof e == "number" && isFinite(e) && Math.floor(e) === e; } -const xd = Number.isInteger || wd; -function us(e, t, r, n) { +const Sd = Number.isInteger || Td; +function fs(e, t, r, n) { const o = e[t]; - if (o == null || !xd(o)) { - const a = yd(o); + if (o == null || !Sd(o)) { + const a = Nd(o); return new RangeError(`Invalid ${n} \`${t}\` of type \`${a}\` supplied to \`${r}\`, expected \`integer\`.`); } return null; } -function fs(e, t, ...r) { - return e[t] === void 0 ? null : us(e, t, ...r); +function ms(e, t, ...r) { + return e[t] === void 0 ? null : fs(e, t, ...r); } function mo() { return null; } -fs.isRequired = us; +ms.isRequired = fs; mo.isRequired = mo; -const ms = process.env.NODE_ENV === "production" ? mo : fs; -function hs(e, t) { +const hs = process.env.NODE_ENV === "production" ? mo : ms; +function gs(e, t) { const r = P({}, t); return Object.keys(e).forEach((n) => { if (n.toString().match(/^(components|slots)$/)) @@ -3493,7 +3494,7 @@ function hs(e, t) { else if (n.toString().match(/^(componentsProps|slotProps)$/)) { const o = e[n] || {}, a = t[n]; r[n] = {}, !a || !Object.keys(a) ? r[n] = o : !o || !Object.keys(o) ? r[n] = a : (r[n] = P({}, a), Object.keys(o).forEach((i) => { - r[n][i] = hs(o[i], a[i]); + r[n][i] = gs(o[i], a[i]); })); } else r[n] === void 0 && (r[n] = e[n]); @@ -3515,7 +3516,7 @@ function dt(e, t, r = void 0) { } ), n; } -const Va = (e) => e, kd = () => { +const Va = (e) => e, Cd = () => { let e = Va; return { configure(t) { @@ -3528,7 +3529,7 @@ const Va = (e) => e, kd = () => { e = Va; } }; -}, Ed = kd(), gs = Ed, bs = { +}, Od = Cd(), bs = Od, vs = { active: "active", checked: "checked", completed: "completed", @@ -3543,8 +3544,8 @@ const Va = (e) => e, kd = () => { selected: "selected" }; function rt(e, t, r = "Mui") { - const n = bs[t]; - return n ? `${r}-${n}` : `${gs.generate(e)}-${t}`; + const n = vs[t]; + return n ? `${r}-${n}` : `${bs.generate(e)}-${t}`; } function xt(e, t, r = "Mui") { const n = {}; @@ -3552,7 +3553,7 @@ function xt(e, t, r = "Mui") { n[o] = rt(e, o, r); }), n; } -function Nd(e, t = Number.MIN_SAFE_INTEGER, r = Number.MAX_SAFE_INTEGER) { +function Rd(e, t = Number.MIN_SAFE_INTEGER, r = Number.MAX_SAFE_INTEGER) { return Math.max(t, Math.min(e, r)); } function he(e, t) { @@ -3563,7 +3564,7 @@ function he(e, t) { o = n[a], !(t.indexOf(o) >= 0) && (r[o] = e[o]); return r; } -const Td = ["values", "unit", "step"], Sd = (e) => { +const Pd = ["values", "unit", "step"], $d = (e) => { const t = Object.keys(e).map((r) => ({ key: r, val: e[r] @@ -3572,7 +3573,7 @@ const Td = ["values", "unit", "step"], Sd = (e) => { [n.key]: n.val }), {}); }; -function Cd(e) { +function _d(e) { const { // The breakpoint **start** at this value. // For instance with the first breakpoint xs: [xs, sm). @@ -3590,7 +3591,7 @@ function Cd(e) { }, unit: r = "px", step: n = 5 - } = e, o = he(e, Td), a = Sd(t), i = Object.keys(a); + } = e, o = he(e, Pd), a = $d(t), i = Object.keys(a); function l(g) { return `@media (min-width:${typeof t[g] == "number" ? t[g] : g}${r})`; } @@ -3619,9 +3620,9 @@ function Cd(e) { unit: r }, o); } -const Od = { +const Id = { borderRadius: 4 -}, Rd = Od, Pd = process.env.NODE_ENV !== "production" ? s.oneOfType([s.number, s.string, s.object, s.array]) : {}, kt = Pd; +}, Md = Id, Ad = process.env.NODE_ENV !== "production" ? s.oneOfType([s.number, s.string, s.object, s.array]) : {}, kt = Ad; function Nr(e, t) { return t ? st(e, t, { clone: !1 @@ -3666,14 +3667,14 @@ function ct(e, t, r) { } return r(t); } -function $d(e = {}) { +function Dd(e = {}) { var t; return ((t = e.keys) == null ? void 0 : t.reduce((n, o) => { const a = e.up(o); return n[a] = {}, n; }, {})) || {}; } -function _d(e, t) { +function jd(e, t) { return e.reduce((r, n) => { const o = r[n]; return (!o || Object.keys(o).length === 0) && delete r[n], r; @@ -3689,7 +3690,7 @@ function Sn(e, t, r = !0) { } return t.split(".").reduce((n, o) => n && n[o] != null ? n[o] : null, e); } -function dn(e, t, r, n = r) { +function un(e, t, r, n = r) { let o; return typeof e == "function" ? o = e(r) : Array.isArray(e) ? o = e[r] || n : o = Sn(e, r) || n, t && (o = t(o, n, e)), o; } @@ -3704,8 +3705,8 @@ function Ee(e) { return null; const l = i[t], c = i.theme, f = Sn(c, n) || {}; return ct(i, l, (v) => { - let g = dn(f, o, v); - return v === g && typeof v == "string" && (g = dn(f, o, `${t}${v === "default" ? "" : et(v)}`, v)), r === !1 ? g : { + let g = un(f, o, v); + return v === g && typeof v == "string" && (g = un(f, o, `${t}${v === "default" ? "" : et(v)}`, v)), r === !1 ? g : { [r]: g }; }); @@ -3714,14 +3715,14 @@ function Ee(e) { [t]: kt } : {}, a.filterProps = [t], a; } -function Id(e) { +function Bd(e) { const t = {}; return (r) => (t[r] === void 0 && (t[r] = e(r)), t[r]); } -const Md = { +const Ld = { m: "margin", p: "padding" -}, Ad = { +}, Fd = { t: "Top", r: "Right", b: "Bottom", @@ -3733,16 +3734,16 @@ const Md = { marginY: "my", paddingX: "px", paddingY: "py" -}, Dd = Id((e) => { +}, Vd = Bd((e) => { if (e.length > 2) if (Ua[e]) e = Ua[e]; else return [e]; - const [t, r] = e.split(""), n = Md[t], o = Ad[r] || ""; + const [t, r] = e.split(""), n = Ld[t], o = Fd[r] || ""; return Array.isArray(o) ? o.map((a) => n + a) : [n + o]; -}), Cn = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"], On = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"], jd = [...Cn, ...On]; -function Fr(e, t, r, n) { +}), Cn = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"], On = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"], zd = [...Cn, ...On]; +function Vr(e, t, r, n) { var o; const a = (o = Sn(e, t, !1)) != null ? o : r; return typeof a == "number" ? (i) => typeof i == "string" ? i : (process.env.NODE_ENV !== "production" && typeof i != "number" && console.error(`MUI: Expected ${n} 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(` @@ -3751,43 +3752,43 @@ function Fr(e, t, r, n) { `)), () => { }); } -function vs(e) { - return Fr(e, "spacing", 8, "spacing"); +function ys(e) { + return Vr(e, "spacing", 8, "spacing"); } -function Vr(e, t) { +function zr(e, t) { if (typeof t == "string" || t == null) return t; const r = Math.abs(t), n = e(r); return t >= 0 ? n : typeof n == "number" ? -n : `-${n}`; } -function Bd(e, t) { - return (r) => e.reduce((n, o) => (n[o] = Vr(t, r), n), {}); +function Ud(e, t) { + return (r) => e.reduce((n, o) => (n[o] = zr(t, r), n), {}); } -function Ld(e, t, r, n) { +function Hd(e, t, r, n) { if (t.indexOf(r) === -1) return null; - const o = Dd(r), a = Bd(o, n), i = e[r]; + const o = Vd(r), a = Ud(o, n), i = e[r]; return ct(e, i, a); } -function ys(e, t) { - const r = vs(e.theme); - return Object.keys(e).map((n) => Ld(e, t, n, r)).reduce(Nr, {}); +function ws(e, t) { + const r = ys(e.theme); + return Object.keys(e).map((n) => Hd(e, t, n, r)).reduce(Nr, {}); } function ve(e) { - return ys(e, Cn); + return ws(e, Cn); } ve.propTypes = process.env.NODE_ENV !== "production" ? Cn.reduce((e, t) => (e[t] = kt, e), {}) : {}; ve.filterProps = Cn; function ye(e) { - return ys(e, On); + return ws(e, On); } ye.propTypes = process.env.NODE_ENV !== "production" ? On.reduce((e, t) => (e[t] = kt, e), {}) : {}; ye.filterProps = On; -process.env.NODE_ENV !== "production" && jd.reduce((e, t) => (e[t] = kt, e), {}); -function Fd(e = 8) { +process.env.NODE_ENV !== "production" && zd.reduce((e, t) => (e[t] = kt, e), {}); +function Gd(e = 8) { if (e.mui) return e; - const t = vs({ + const t = ys({ spacing: e }), r = (...n) => (process.env.NODE_ENV !== "production" && (n.length <= 4 || console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)), (n.length === 0 ? [1] : n).map((a) => { const i = t(a); @@ -3811,10 +3812,10 @@ function qe(e, t) { transform: t }); } -const Vd = qe("border", Ue), zd = qe("borderTop", Ue), Ud = qe("borderRight", Ue), Hd = qe("borderBottom", Ue), Gd = qe("borderLeft", Ue), Wd = qe("borderColor"), Xd = qe("borderTopColor"), Yd = qe("borderRightColor"), qd = qe("borderBottomColor"), Kd = qe("borderLeftColor"), Jd = qe("outline", Ue), Zd = qe("outlineColor"), Pn = (e) => { +const Wd = qe("border", Ue), Xd = qe("borderTop", Ue), Yd = qe("borderRight", Ue), qd = qe("borderBottom", Ue), Kd = qe("borderLeft", Ue), Jd = qe("borderColor"), Zd = qe("borderTopColor"), Qd = qe("borderRightColor"), eu = qe("borderBottomColor"), tu = qe("borderLeftColor"), ru = qe("outline", Ue), nu = qe("outlineColor"), Pn = (e) => { if (e.borderRadius !== void 0 && e.borderRadius !== null) { - const t = Fr(e.theme, "shape.borderRadius", 4, "borderRadius"), r = (n) => ({ - borderRadius: Vr(t, n) + const t = Vr(e.theme, "shape.borderRadius", 4, "borderRadius"), r = (n) => ({ + borderRadius: zr(t, n) }); return ct(e, e.borderRadius, r); } @@ -3824,11 +3825,11 @@ Pn.propTypes = process.env.NODE_ENV !== "production" ? { borderRadius: kt } : {}; Pn.filterProps = ["borderRadius"]; -Rn(Vd, zd, Ud, Hd, Gd, Wd, Xd, Yd, qd, Kd, Pn, Jd, Zd); +Rn(Wd, Xd, Yd, qd, Kd, Jd, Zd, Qd, eu, tu, Pn, ru, nu); const $n = (e) => { if (e.gap !== void 0 && e.gap !== null) { - const t = Fr(e.theme, "spacing", 8, "gap"), r = (n) => ({ - gap: Vr(t, n) + const t = Vr(e.theme, "spacing", 8, "gap"), r = (n) => ({ + gap: zr(t, n) }); return ct(e, e.gap, r); } @@ -3840,8 +3841,8 @@ $n.propTypes = process.env.NODE_ENV !== "production" ? { $n.filterProps = ["gap"]; const _n = (e) => { if (e.columnGap !== void 0 && e.columnGap !== null) { - const t = Fr(e.theme, "spacing", 8, "columnGap"), r = (n) => ({ - columnGap: Vr(t, n) + const t = Vr(e.theme, "spacing", 8, "columnGap"), r = (n) => ({ + columnGap: zr(t, n) }); return ct(e, e.columnGap, r); } @@ -3853,8 +3854,8 @@ _n.propTypes = process.env.NODE_ENV !== "production" ? { _n.filterProps = ["columnGap"]; const In = (e) => { if (e.rowGap !== void 0 && e.rowGap !== null) { - const t = Fr(e.theme, "spacing", 8, "rowGap"), r = (n) => ({ - rowGap: Vr(t, n) + const t = Vr(e.theme, "spacing", 8, "rowGap"), r = (n) => ({ + rowGap: zr(t, n) }); return ct(e, e.rowGap, r); } @@ -3864,48 +3865,48 @@ In.propTypes = process.env.NODE_ENV !== "production" ? { rowGap: kt } : {}; In.filterProps = ["rowGap"]; -const Qd = Ee({ +const ou = Ee({ prop: "gridColumn" -}), eu = Ee({ +}), au = Ee({ prop: "gridRow" -}), tu = Ee({ +}), iu = Ee({ prop: "gridAutoFlow" -}), ru = Ee({ +}), su = Ee({ prop: "gridAutoColumns" -}), nu = Ee({ +}), lu = Ee({ prop: "gridAutoRows" -}), ou = Ee({ +}), cu = Ee({ prop: "gridTemplateColumns" -}), au = Ee({ +}), pu = Ee({ prop: "gridTemplateRows" -}), iu = Ee({ +}), du = Ee({ prop: "gridTemplateAreas" -}), su = Ee({ +}), uu = Ee({ prop: "gridArea" }); -Rn($n, _n, In, Qd, eu, tu, ru, nu, ou, au, iu, su); +Rn($n, _n, In, ou, au, iu, su, lu, cu, pu, du, uu); function Kt(e, t) { return t === "grey" ? t : e; } -const lu = Ee({ +const fu = Ee({ prop: "color", themeKey: "palette", transform: Kt -}), cu = Ee({ +}), mu = Ee({ prop: "bgcolor", cssProperty: "backgroundColor", themeKey: "palette", transform: Kt -}), pu = Ee({ +}), hu = Ee({ prop: "backgroundColor", themeKey: "palette", transform: Kt }); -Rn(lu, cu, pu); +Rn(fu, mu, hu); function Fe(e) { return e <= 1 && e !== 0 ? `${e * 100}%` : e; } -const du = Ee({ +const gu = Ee({ prop: "width", transform: Fe }), Do = (e) => { @@ -3926,16 +3927,16 @@ const du = Ee({ return null; }; Do.filterProps = ["maxWidth"]; -const uu = Ee({ +const bu = Ee({ prop: "minWidth", transform: Fe -}), fu = Ee({ +}), vu = Ee({ prop: "height", transform: Fe -}), mu = Ee({ +}), yu = Ee({ prop: "maxHeight", transform: Fe -}), hu = Ee({ +}), wu = Ee({ prop: "minHeight", transform: Fe }); @@ -3949,11 +3950,11 @@ Ee({ cssProperty: "height", transform: Fe }); -const gu = Ee({ +const xu = Ee({ prop: "boxSizing" }); -Rn(du, Do, uu, fu, mu, hu, gu); -const bu = { +Rn(gu, Do, bu, vu, yu, wu, xu); +const ku = { // borders border: { themeKey: "borders", @@ -4237,15 +4238,15 @@ const bu = { cssProperty: !1, themeKey: "typography" } -}, jo = bu; -function vu(...e) { +}, jo = ku; +function Eu(...e) { const t = e.reduce((n, o) => n.concat(Object.keys(o)), []), r = new Set(t); return e.every((n) => r.size === Object.keys(n).length); } -function yu(e, t) { +function Nu(e, t) { return typeof e == "function" ? e(t) : e; } -function wu() { +function Tu() { function e(r, n, o, a) { const i = { [r]: n, @@ -4269,8 +4270,8 @@ function wu() { }; const g = Sn(o, f) || {}; return v ? v(i) : ct(i, n, (h) => { - let u = dn(g, m, h); - return h === u && typeof h == "string" && (u = dn(g, m, `${r}${h === "default" ? "" : et(h)}`, h)), c === !1 ? u : { + let u = un(g, m, h); + return h === u && typeof h == "string" && (u = un(g, m, `${r}${h === "default" ? "" : et(h)}`, h)), c === !1 ? u : { [c]: u }; }); @@ -4292,10 +4293,10 @@ function wu() { return c; if (!f) return null; - const m = $d(a.breakpoints), v = Object.keys(m); + const m = Dd(a.breakpoints), v = Object.keys(m); let g = m; return Object.keys(f).forEach((p) => { - const h = yu(f[p], a); + const h = Nu(f[p], a); if (h != null) if (typeof h == "object") if (i[p]) @@ -4306,36 +4307,36 @@ function wu() { }, h, (b) => ({ [p]: b })); - vu(u, h) ? g[p] = t({ + Eu(u, h) ? g[p] = t({ sx: h, theme: a }) : g = Nr(g, u); } else g = Nr(g, e(p, h, a, i)); - }), _d(v, g); + }), jd(v, g); } return Array.isArray(o) ? o.map(l) : l(o); } return t; } -const ws = wu(); -ws.filterProps = ["sx"]; -const Bo = ws; -function xu(e, t) { +const xs = Tu(); +xs.filterProps = ["sx"]; +const Bo = xs; +function Su(e, t) { const r = this; return r.vars && typeof r.getColorSchemeSelector == "function" ? { [r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/, "*:where($1)")]: t } : r.palette.mode === e ? t : {}; } -const ku = ["breakpoints", "palette", "spacing", "shape"]; +const Cu = ["breakpoints", "palette", "spacing", "shape"]; function Lo(e = {}, ...t) { const { breakpoints: r = {}, palette: n = {}, spacing: o, shape: a = {} - } = e, i = he(e, ku), l = Cd(r), c = Fd(o); + } = e, i = he(e, Cu), l = _d(r), c = Gd(o); let f = st({ breakpoints: l, direction: "ltr", @@ -4345,66 +4346,66 @@ function Lo(e = {}, ...t) { mode: "light" }, n), spacing: c, - shape: P({}, Rd, a) + shape: P({}, Md, a) }, i); - return f.applyStyles = xu, f = t.reduce((m, v) => st(m, v), f), f.unstable_sxConfig = P({}, jo, i == null ? void 0 : i.unstable_sxConfig), f.unstable_sx = function(v) { + return f.applyStyles = Su, f = t.reduce((m, v) => st(m, v), f), f.unstable_sxConfig = P({}, jo, i == null ? void 0 : i.unstable_sxConfig), f.unstable_sx = function(v) { return Bo({ sx: v, theme: this }); }, f; } -function Eu(e) { +function Ou(e) { return Object.keys(e).length === 0; } -function xs(e = null) { - const t = N.useContext(Mc); - return !t || Eu(t) ? e : t; +function ks(e = null) { + const t = N.useContext(Lc); + return !t || Ou(t) ? e : t; } -const Nu = Lo(); -function ks(e = Nu) { - return xs(e); +const Ru = Lo(); +function Es(e = Ru) { + return ks(e); } -const Tu = ["ownerState"], Su = ["variants"], Cu = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; -function Ou(e) { +const Pu = ["ownerState"], $u = ["variants"], _u = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"]; +function Iu(e) { return Object.keys(e).length === 0; } -function Ru(e) { +function Mu(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 tn(e) { +function rn(e) { return e !== "ownerState" && e !== "theme" && e !== "sx" && e !== "as"; } -const Pu = Lo(), Ha = (e) => e && e.charAt(0).toLowerCase() + e.slice(1); -function Jr({ +const Au = Lo(), Ha = (e) => e && e.charAt(0).toLowerCase() + e.slice(1); +function Zr({ defaultTheme: e, theme: t, themeId: r }) { - return Ou(t) ? e : t[r] || t; + return Iu(t) ? e : t[r] || t; } -function $u(e) { +function Du(e) { return e ? (t, r) => r[e] : null; } -function rn(e, t) { +function nn(e, t) { let { ownerState: r - } = t, n = he(t, Tu); + } = t, n = he(t, Pu); const o = typeof e == "function" ? e(P({ ownerState: r }, n)) : e; if (Array.isArray(o)) - return o.flatMap((a) => rn(a, P({ + return o.flatMap((a) => nn(a, P({ ownerState: r }, n))); if (o && typeof o == "object" && Array.isArray(o.variants)) { const { variants: a = [] } = o; - let l = he(o, Su); + let l = he(o, $u); return a.forEach((c) => { let f = !0; typeof c.props == "function" ? f = c.props(P({ @@ -4418,20 +4419,20 @@ function rn(e, t) { } return o; } -function _u(e = {}) { +function ju(e = {}) { const { themeId: t, - defaultTheme: r = Pu, - rootShouldForwardProp: n = tn, - slotShouldForwardProp: o = tn + defaultTheme: r = Au, + rootShouldForwardProp: n = rn, + slotShouldForwardProp: o = rn } = e, a = (i) => Bo(P({}, i, { - theme: Jr(P({}, i, { + theme: Zr(P({}, i, { defaultTheme: r, themeId: t })) })); return a.__mui_systemSx = !0, (i, l = {}) => { - Ac(i, (y) => y.filter((T) => !(T != null && T.__mui_systemSx))); + Fc(i, (y) => y.filter((T) => !(T != null && T.__mui_systemSx))); const { name: c, slot: f, @@ -4439,21 +4440,21 @@ function _u(e = {}) { skipSx: v, // TODO v6: remove `lowercaseFirstLetter()` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 - overridesResolver: g = $u(Ha(f)) - } = l, p = he(l, Cu), h = m !== void 0 ? m : ( + overridesResolver: g = Du(Ha(f)) + } = l, p = he(l, _u), h = m !== void 0 ? m : ( // TODO v6: remove `Root` in the next major release // For more details: https://github.com/mui/material-ui/pull/37908 f && f !== "Root" && f !== "root" || !1 ), u = v || !1; let b; process.env.NODE_ENV !== "production" && c && (b = `${c}-${Ha(f || "Root")}`); - let x = tn; - f === "Root" || f === "root" ? x = n : f ? x = o : Ru(i) && (x = void 0); - const O = Ic(i, P({ + let x = rn; + f === "Root" || f === "root" ? x = n : f ? x = o : Mu(i) && (x = void 0); + const O = Bc(i, P({ shouldForwardProp: x, label: b - }, p)), w = (y) => typeof y == "function" && y.__emotion_real !== y || Pt(y) ? (T) => rn(y, P({}, T, { - theme: Jr({ + }, p)), w = (y) => typeof y == "function" && y.__emotion_real !== y || Pt(y) ? (T) => nn(y, P({}, T, { + theme: Zr({ theme: T.theme, defaultTheme: r, themeId: t @@ -4462,7 +4463,7 @@ function _u(e = {}) { let S = w(y); const M = T ? T.map(w) : []; c && g && M.push(($) => { - const E = Jr(P({}, $, { + const E = Zr(P({}, $, { defaultTheme: r, themeId: t })); @@ -4470,17 +4471,17 @@ function _u(e = {}) { return null; const R = E.components[c].styleOverrides, I = {}; return Object.entries(R).forEach(([U, B]) => { - I[U] = rn(B, P({}, $, { + I[U] = nn(B, P({}, $, { theme: E })); }), g($, I); }), c && !h && M.push(($) => { var E; - const R = Jr(P({}, $, { + const R = Zr(P({}, $, { defaultTheme: r, themeId: t })), I = R == null || (E = R.components) == null || (E = E[c]) == null ? void 0 : E.variants; - return rn({ + return nn({ variants: I }, P({}, $, { theme: R @@ -4494,38 +4495,38 @@ function _u(e = {}) { const z = O(S, ...M); if (process.env.NODE_ENV !== "production") { let $; - c && ($ = `${c}${et(f || "")}`), $ === void 0 && ($ = `Styled(${td(i)})`), z.displayName = $; + c && ($ = `${c}${et(f || "")}`), $ === void 0 && ($ = `Styled(${id(i)})`), z.displayName = $; } return i.muiName && (z.muiName = i.muiName), z; }; return O.withConfig && (k.withConfig = O.withConfig), k; }; } -function Iu(e) { +function Bu(e) { const { theme: t, name: r, props: n } = e; - return !t || !t.components || !t.components[r] || !t.components[r].defaultProps ? n : hs(t.components[r].defaultProps, n); + return !t || !t.components || !t.components[r] || !t.components[r].defaultProps ? n : gs(t.components[r].defaultProps, n); } -function Mu({ +function Lu({ props: e, name: t, defaultTheme: r, themeId: n }) { - let o = ks(r); - return n && (o = o[n] || o), Iu({ + let o = Es(r); + return n && (o = o[n] || o), Bu({ theme: o, name: t, props: e }); } function Fo(e, t = 0, r = 1) { - return process.env.NODE_ENV !== "production" && (e < t || e > r) && console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`), Nd(e, t, r); + return process.env.NODE_ENV !== "production" && (e < t || e > r) && console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`), Rd(e, t, r); } -function Au(e) { +function Fu(e) { e = e.slice(1); const t = new RegExp(`.{1,${e.length >= 6 ? 2 : 1}}`, "g"); let r = e.match(t); @@ -4535,7 +4536,7 @@ function jt(e) { if (e.type) return e; if (e.charAt(0) === "#") - return jt(Au(e)); + return jt(Fu(e)); const t = e.indexOf("("), r = e.substring(0, t); if (["rgb", "rgba", "hsl", "hsla", "color"].indexOf(r) === -1) throw new Error(process.env.NODE_ENV !== "production" ? `MUI: Unsupported \`${e}\` color. @@ -4563,7 +4564,7 @@ function Mn(e) { } = e; return t.indexOf("rgb") !== -1 ? n = n.map((o, a) => a < 3 ? parseInt(o, 10) : o) : t.indexOf("hsl") !== -1 && (n[1] = `${n[1]}%`, n[2] = `${n[2]}%`), t.indexOf("color") !== -1 ? n = `${r} ${n.join(" ")}` : n = `${n.join(", ")}`, `${t}(${n})`; } -function Du(e) { +function Vu(e) { e = jt(e); const { values: t @@ -4577,17 +4578,17 @@ function Du(e) { } function Ga(e) { e = jt(e); - let t = e.type === "hsl" || e.type === "hsla" ? jt(Du(e)).values : e.values; + let t = e.type === "hsl" || e.type === "hsla" ? jt(Vu(e)).values : e.values; return t = t.map((r) => (e.type !== "color" && (r /= 255), r <= 0.03928 ? r / 12.92 : ((r + 0.055) / 1.055) ** 2.4)), Number((0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2]).toFixed(3)); } function Wa(e, t) { const r = Ga(e), n = Ga(t); return (Math.max(r, n) + 0.05) / (Math.min(r, n) + 0.05); } -function un(e, t) { +function fn(e, t) { return e = jt(e), t = Fo(t), (e.type === "rgb" || e.type === "hsl") && (e.type += "a"), e.type === "color" ? e.values[3] = `/${t}` : e.values[3] = t, Mn(e); } -function ju(e, t) { +function zu(e, t) { if (e = jt(e), t = Fo(t), e.type.indexOf("hsl") !== -1) e.values[2] *= 1 - t; else if (e.type.indexOf("rgb") !== -1 || e.type.indexOf("color") !== -1) @@ -4595,7 +4596,7 @@ function ju(e, t) { e.values[r] *= 1 - t; return Mn(e); } -function Bu(e, t) { +function Uu(e, t) { if (e = jt(e), t = Fo(t), e.type.indexOf("hsl") !== -1) e.values[2] += (100 - e.values[2]) * t; else if (e.type.indexOf("rgb") !== -1) @@ -4606,7 +4607,7 @@ function Bu(e, t) { e.values[r] += (1 - e.values[r]) * t; return Mn(e); } -function Lu(e, t) { +function Hu(e, t) { return P({ toolbar: { minHeight: 56, @@ -4621,10 +4622,10 @@ function Lu(e, t) { } }, t); } -const Fu = { +const Gu = { black: "#000", white: "#fff" -}, Ir = Fu, Vu = { +}, Ir = Gu, Wu = { 50: "#fafafa", 100: "#f5f5f5", 200: "#eeeeee", @@ -4639,7 +4640,7 @@ const Fu = { A200: "#eeeeee", A400: "#bdbdbd", A700: "#616161" -}, zu = Vu, Uu = { +}, Xu = Wu, Yu = { 50: "#f3e5f5", 100: "#e1bee7", 200: "#ce93d8", @@ -4654,7 +4655,7 @@ const Fu = { A200: "#e040fb", A400: "#d500f9", A700: "#aa00ff" -}, Vt = Uu, Hu = { +}, Vt = Yu, qu = { 50: "#ffebee", 100: "#ffcdd2", 200: "#ef9a9a", @@ -4669,7 +4670,7 @@ const Fu = { A200: "#ff5252", A400: "#ff1744", A700: "#d50000" -}, zt = Hu, Gu = { +}, zt = qu, Ku = { 50: "#fff3e0", 100: "#ffe0b2", 200: "#ffcc80", @@ -4684,7 +4685,7 @@ const Fu = { A200: "#ffab40", A400: "#ff9100", A700: "#ff6d00" -}, fr = Gu, Wu = { +}, fr = Ku, Ju = { 50: "#e3f2fd", 100: "#bbdefb", 200: "#90caf9", @@ -4699,7 +4700,7 @@ const Fu = { A200: "#448aff", A400: "#2979ff", A700: "#2962ff" -}, Ut = Wu, Xu = { +}, Ut = Ju, Zu = { 50: "#e1f5fe", 100: "#b3e5fc", 200: "#81d4fa", @@ -4714,7 +4715,7 @@ const Fu = { A200: "#40c4ff", A400: "#00b0ff", A700: "#0091ea" -}, Ht = Xu, Yu = { +}, Ht = Zu, Qu = { 50: "#e8f5e9", 100: "#c8e6c9", 200: "#a5d6a7", @@ -4729,7 +4730,7 @@ const Fu = { A200: "#69f0ae", A400: "#00e676", A700: "#00c853" -}, Gt = Yu, qu = ["mode", "contrastThreshold", "tonalOffset"], Xa = { +}, Gt = Qu, ef = ["mode", "contrastThreshold", "tonalOffset"], Xa = { // The colors used to style the text. text: { // The most important text. @@ -4794,9 +4795,9 @@ const Fu = { }; function Ya(e, t, r, n) { const o = n.light || n, a = n.dark || n * 1.5; - e[t] || (e.hasOwnProperty(r) ? e[t] = e[r] : t === "light" ? e.light = Bu(e.main, o) : t === "dark" && (e.dark = ju(e.main, a))); + e[t] || (e.hasOwnProperty(r) ? e[t] = e[r] : t === "light" ? e.light = Uu(e.main, o) : t === "dark" && (e.dark = zu(e.main, a))); } -function Ku(e = "light") { +function tf(e = "light") { return e === "dark" ? { main: Ut[200], light: Ut[50], @@ -4807,7 +4808,7 @@ function Ku(e = "light") { dark: Ut[800] }; } -function Ju(e = "light") { +function rf(e = "light") { return e === "dark" ? { main: Vt[200], light: Vt[50], @@ -4818,7 +4819,7 @@ function Ju(e = "light") { dark: Vt[700] }; } -function Zu(e = "light") { +function nf(e = "light") { return e === "dark" ? { main: zt[500], light: zt[300], @@ -4829,7 +4830,7 @@ function Zu(e = "light") { dark: zt[800] }; } -function Qu(e = "light") { +function of(e = "light") { return e === "dark" ? { main: Ht[400], light: Ht[300], @@ -4840,7 +4841,7 @@ function Qu(e = "light") { dark: Ht[900] }; } -function ef(e = "light") { +function af(e = "light") { return e === "dark" ? { main: Gt[400], light: Gt[300], @@ -4851,7 +4852,7 @@ function ef(e = "light") { dark: Gt[900] }; } -function tf(e = "light") { +function sf(e = "light") { return e === "dark" ? { main: fr[400], light: fr[300], @@ -4863,12 +4864,12 @@ function tf(e = "light") { dark: fr[900] }; } -function rf(e) { +function lf(e) { const { mode: t = "light", contrastThreshold: r = 3, tonalOffset: n = 0.2 - } = e, o = he(e, qu), a = e.primary || Ku(t), i = e.secondary || Ju(t), l = e.error || Zu(t), c = e.info || Qu(t), f = e.success || ef(t), m = e.warning || tf(t); + } = e, o = he(e, ef), a = e.primary || tf(t), i = e.secondary || rf(t), l = e.error || nf(t), c = e.info || of(t), f = e.success || af(t), m = e.warning || sf(t); function v(u) { const b = Wa(u, Zn.text.primary) >= r ? Zn.text.primary : Xa.text.primary; if (process.env.NODE_ENV !== "production") { @@ -4948,7 +4949,7 @@ const theme2 = createTheme({ palette: { name: "success" }), // The grey colors. - grey: zu, + grey: Xu, // Used by `getContrastText()` to maximize the contrast between // the background and the text. contrastThreshold: r, @@ -4962,14 +4963,14 @@ const theme2 = createTheme({ palette: { tonalOffset: n }, p[t]), o); } -const nf = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]; -function of(e) { +const cf = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]; +function pf(e) { return Math.round(e * 1e5) / 1e5; } const qa = { textTransform: "uppercase" }, Ka = '"Roboto", "Helvetica", "Arial", sans-serif'; -function af(e, t) { +function df(e, t) { const r = typeof t == "function" ? t(e) : t, { fontFamily: n = Ka, // The default font size of the Material Specification. @@ -4985,7 +4986,7 @@ function af(e, t) { // Apply the CSS properties to all the variants. allVariants: m, pxToRem: v - } = r, g = he(r, nf); + } = r, g = he(r, cf); process.env.NODE_ENV !== "production" && (typeof o != "number" && console.error("MUI: `fontSize` is required to be a number."), typeof f != "number" && console.error("MUI: `htmlFontSize` is required to be a number.")); const p = o / 14, h = v || ((x) => `${x / f * p}rem`), u = (x, O, w, k, y) => P({ fontFamily: n, @@ -4994,7 +4995,7 @@ function af(e, t) { // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/ lineHeight: w }, n === Ka ? { - letterSpacing: `${of(k / O)}em` + letterSpacing: `${pf(k / O)}em` } : {}, y, m), b = { h1: u(a, 96, 1.167, -1.5), h2: u(a, 60, 1.2, -0.5), @@ -5032,11 +5033,11 @@ function af(e, t) { // No need to clone deep }); } -const sf = 0.2, lf = 0.14, cf = 0.12; +const uf = 0.2, ff = 0.14, mf = 0.12; function be(...e) { - return [`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${sf})`, `${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${lf})`, `${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${cf})`].join(","); + return [`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${uf})`, `${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${ff})`, `${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${mf})`].join(","); } -const pf = ["none", be(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), be(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), be(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), be(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), be(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), be(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), be(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), be(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), be(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), be(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), be(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), be(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), be(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), be(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), be(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), be(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), be(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), be(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), be(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), be(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), be(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), be(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), be(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), be(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)], df = pf, uf = ["duration", "easing", "delay"], ff = { +const hf = ["none", be(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), be(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), be(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), be(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), be(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), be(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), be(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), be(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), be(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), be(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), be(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), be(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), be(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), be(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), be(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), be(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), be(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), be(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), be(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), be(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), be(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), be(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), be(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), be(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)], gf = hf, bf = ["duration", "easing", "delay"], vf = { // 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 @@ -5046,7 +5047,7 @@ const pf = ["none", be(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), be(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)" -}, mf = { +}, yf = { shortest: 150, shorter: 200, short: 250, @@ -5062,22 +5063,22 @@ const pf = ["none", be(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), be(0, 3, 1, -2, 0, function Ja(e) { return `${Math.round(e)}ms`; } -function hf(e) { +function wf(e) { if (!e) return 0; const t = e / 36; return Math.round((4 + 15 * t ** 0.25 + t / 5) * 10); } -function gf(e) { - const t = P({}, ff, e.easing), r = P({}, mf, e.duration); +function xf(e) { + const t = P({}, vf, e.easing), r = P({}, yf, e.duration); return P({ - getAutoHeightDuration: hf, + getAutoHeightDuration: wf, create: (o = ["all"], a = {}) => { const { duration: i = r.standard, easing: l = t.easeInOut, delay: c = 0 - } = a, f = he(a, uf); + } = a, f = he(a, bf); if (process.env.NODE_ENV !== "production") { const m = (g) => typeof g == "string", v = (g) => !isNaN(parseFloat(g)); !m(o) && !Array.isArray(o) && console.error('MUI: Argument "props" must be a string or Array.'), !v(i) && !m(i) && console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`), m(l) || console.error('MUI: Argument "easing" must be a string.'), !v(c) && !m(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(` @@ -5090,7 +5091,7 @@ function gf(e) { duration: r }); } -const bf = { +const kf = { mobileStepper: 1e3, fab: 1050, speedDial: 1050, @@ -5099,25 +5100,25 @@ const bf = { modal: 1300, snackbar: 1400, tooltip: 1500 -}, vf = bf, yf = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"]; -function wf(e = {}, ...t) { +}, Ef = kf, Nf = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"]; +function Tf(e = {}, ...t) { const { mixins: r = {}, palette: n = {}, transitions: o = {}, typography: a = {} - } = e, i = he(e, yf); + } = e, i = he(e, Nf); 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." : Zt(18)); - const l = rf(n), c = Lo(e); + const l = lf(n), c = Lo(e); let f = st(c, { - mixins: Lu(c.breakpoints, r), + mixins: Hu(c.breakpoints, r), palette: l, // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol. - shadows: df.slice(), - typography: af(l, a), - transitions: gf(o), - zIndex: P({}, vf) + shadows: gf.slice(), + typography: df(l, a), + transitions: xf(o), + zIndex: P({}, Ef) }); if (f = st(f, i), f = t.reduce((m, v) => st(m, v), f), process.env.NODE_ENV !== "production") { const m = ["active", "checked", "completed", "disabled", "error", "expanded", "focused", "focusVisible", "required", "selected"], v = (g, p) => { @@ -5150,28 +5151,28 @@ function wf(e = {}, ...t) { }); }, f; } -const xf = wf(), Vo = xf, zo = "$$material"; +const Sf = Tf(), Vo = Sf, zo = "$$material"; function ut({ props: e, name: t }) { - return Mu({ + return Lu({ props: e, name: t, defaultTheme: Vo, themeId: zo }); } -const Es = (e) => tn(e) && e !== "classes", kf = _u({ +const Ns = (e) => rn(e) && e !== "classes", Cf = ju({ themeId: zo, defaultTheme: Vo, - rootShouldForwardProp: Es -}), Re = kf; -function Ef(e) { + rootShouldForwardProp: Ns +}), Re = Cf; +function Of(e) { return rt("MuiSvgIcon", e); } xt("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]); -const Nf = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], Tf = (e) => { +const Rf = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], Pf = (e) => { const { color: t, fontSize: r, @@ -5179,8 +5180,8 @@ const Nf = ["children", "className", "color", "component", "fontSize", "htmlColo } = e, o = { root: ["root", t !== "inherit" && `color${et(t)}`, `fontSize${et(r)}`] }; - return dt(o, Ef, n); -}, Sf = Re("svg", { + return dt(o, Of, n); +}, $f = Re("svg", { name: "MuiSvgIcon", slot: "Root", overridesResolver: (e, t) => { @@ -5233,7 +5234,7 @@ const Nf = ["children", "className", "color", "component", "fontSize", "htmlColo inheritViewBox: m = !1, titleAccess: v, viewBox: g = "0 0 24 24" - } = n, p = he(n, Nf), h = /* @__PURE__ */ N.isValidElement(o) && o.type === "svg", u = P({}, n, { + } = n, p = he(n, Rf), h = /* @__PURE__ */ N.isValidElement(o) && o.type === "svg", u = P({}, n, { color: i, component: l, fontSize: c, @@ -5243,8 +5244,8 @@ const Nf = ["children", "className", "color", "component", "fontSize", "htmlColo hasSvgAsChild: h }), b = {}; m || (b.viewBox = g); - const x = Tf(u); - return /* @__PURE__ */ _(Sf, P({ + const x = Pf(u); + return /* @__PURE__ */ _($f, P({ as: l, className: Ce(x.root, a), focusable: "false", @@ -5333,7 +5334,7 @@ process.env.NODE_ENV !== "production" && (Uo.propTypes = { }); Uo.muiName = "SvgIcon"; const Za = Uo; -function Ns(e, t) { +function Ts(e, t) { function r(n, o) { return /* @__PURE__ */ d(Za, P({ "data-testid": `${t}Icon`, @@ -5344,34 +5345,34 @@ function Ns(e, t) { } return process.env.NODE_ENV !== "production" && (r.displayName = `${t}Icon`), r.muiName = Za.muiName, /* @__PURE__ */ N.memo(/* @__PURE__ */ N.forwardRef(r)); } -const Cf = { +const _f = { 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(` -`)), gs.configure(e); +`)), bs.configure(e); } -}, Of = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}, If = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, capitalize: et, createChainedFunction: uo, - createSvgIcon: Ns, - debounce: ss, - deprecatedPropType: nd, - isMuiElement: od, + createSvgIcon: Ts, + debounce: ls, + deprecatedPropType: ld, + isMuiElement: cd, ownerDocument: Oe, ownerWindow: Qt, - requirePropFactory: ad, - setRef: pn, - unstable_ClassNameGenerator: Cf, + requirePropFactory: pd, + setRef: dn, + unstable_ClassNameGenerator: _f, unstable_useEnhancedEffect: Dt, - unstable_useId: ls, - unsupportedProp: ld, - useControlled: cs, + unstable_useId: cs, + unsupportedProp: fd, + useControlled: ps, useEventCallback: _r, useForkRef: We, - useIsFocusVisible: ps -}, Symbol.toStringTag, { value: "Module" })), Rf = /* @__PURE__ */ Ap(Of); + useIsFocusVisible: ds +}, Symbol.toStringTag, { value: "Module" })), Mf = /* @__PURE__ */ Fp(If); var Qa; -function Pf() { +function Af() { return Qa || (Qa = 1, function(e) { "use client"; Object.defineProperty(e, "__esModule", { @@ -5382,35 +5383,35 @@ function Pf() { return t.createSvgIcon; } }); - var t = Rf; + var t = Mf; }(Hn)), Hn; } -var $f = Dp; +var Df = Vp; Object.defineProperty(_o, "__esModule", { value: !0 }); -var Ts = _o.default = void 0, _f = $f(Pf()), If = Ll; -Ts = _o.default = (0, _f.default)(/* @__PURE__ */ (0, If.jsx)("path", { +var Ss = _o.default = void 0, jf = Df(Af()), Bf = Hl; +Ss = _o.default = (0, jf.default)(/* @__PURE__ */ (0, Bf.jsx)("path", { d: "m10 17 5-5-5-5z" }), "ArrowRight"); -function Ss(e) { +function Cs(e) { return typeof e == "string"; } function wr(e, t, r) { - return e === void 0 || Ss(e) ? t : P({}, t, { + return e === void 0 || Cs(e) ? t : P({}, t, { ownerState: P({}, t.ownerState, r) }); } -const Mf = { +const Lf = { disableDefaultClasses: !1 -}, Af = /* @__PURE__ */ N.createContext(Mf); -function Df(e) { +}, Ff = /* @__PURE__ */ N.createContext(Lf); +function Vf(e) { const { disableDefaultClasses: t - } = N.useContext(Af); + } = N.useContext(Ff); return (r) => t ? "" : e(r); } -function Cs(e, t = []) { +function Os(e, t = []) { if (e === void 0) return {}; const r = {}; @@ -5418,7 +5419,7 @@ function Cs(e, t = []) { r[n] = e[n]; }), r; } -function jf(e, t, r) { +function zf(e, t, r) { return typeof e == "function" ? e(t, r) : e; } function ei(e) { @@ -5429,7 +5430,7 @@ function ei(e) { t[r] = e[r]; }), t; } -function Bf(e) { +function Uf(e) { const { getSlotProps: t, additionalProps: r, @@ -5444,13 +5445,13 @@ function Bf(e) { internalRef: void 0 }; } - const i = Cs(P({}, o, n)), l = ei(n), c = ei(o), f = t(i), m = Ce(f == null ? void 0 : f.className, r == null ? void 0 : r.className, a, o == null ? void 0 : o.className, n == null ? void 0 : n.className), v = P({}, f == null ? void 0 : f.style, r == null ? void 0 : r.style, o == null ? void 0 : o.style, n == null ? void 0 : n.style), g = P({}, f, r, c, l); + const i = Os(P({}, o, n)), l = ei(n), c = ei(o), f = t(i), m = Ce(f == null ? void 0 : f.className, r == null ? void 0 : r.className, a, o == null ? void 0 : o.className, n == null ? void 0 : n.className), v = P({}, f == null ? void 0 : f.style, r == null ? void 0 : r.style, o == null ? void 0 : o.style, n == null ? void 0 : n.style), g = P({}, f, r, c, l); return m.length > 0 && (g.className = m), Object.keys(v).length > 0 && (g.style = v), { props: g, internalRef: f.ref }; } -const Lf = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"]; +const Hf = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"]; function Bt(e) { var t; const { @@ -5458,70 +5459,70 @@ function Bt(e) { externalSlotProps: n, ownerState: o, skipResolvingSlotProps: a = !1 - } = e, i = he(e, Lf), l = a ? {} : jf(n, o), { + } = e, i = he(e, Hf), l = a ? {} : zf(n, o), { props: c, internalRef: f - } = Bf(P({}, i, { + } = Uf(P({}, i, { externalSlotProps: l })), m = We(f, l == null ? void 0 : l.ref, (t = e.additionalProps) == null ? void 0 : t.ref); return wr(r, P({}, c, { ref: m }), o); } -const Os = "base"; -function Ff(e) { - return `${Os}--${e}`; +const Rs = "base"; +function Gf(e) { + return `${Rs}--${e}`; } -function Vf(e, t) { - return `${Os}-${e}-${t}`; +function Wf(e, t) { + return `${Rs}-${e}-${t}`; } -function Rs(e, t) { - const r = bs[t]; - return r ? Ff(r) : Vf(e, t); +function Ps(e, t) { + const r = vs[t]; + return r ? Gf(r) : Wf(e, t); } -function zf(e, t) { +function Xf(e, t) { const r = {}; return t.forEach((n) => { - r[n] = Rs(e, n); + r[n] = Ps(e, n); }), r; } -const Uf = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(","); -function Hf(e) { +const Yf = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(","); +function qf(e) { const t = parseInt(e.getAttribute("tabindex") || "", 10); return Number.isNaN(t) ? e.contentEditable === "true" || (e.nodeName === "AUDIO" || e.nodeName === "VIDEO" || e.nodeName === "DETAILS") && e.getAttribute("tabindex") === null ? 0 : e.tabIndex : t; } -function Gf(e) { +function Kf(e) { if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name) return !1; const t = (n) => e.ownerDocument.querySelector(`input[type="radio"]${n}`); let r = t(`[name="${e.name}"]:checked`); return r || (r = t(`[name="${e.name}"]`)), r !== e; } -function Wf(e) { - return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Gf(e)); +function Jf(e) { + return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Kf(e)); } -function Xf(e) { +function Zf(e) { const t = [], r = []; - return Array.from(e.querySelectorAll(Uf)).forEach((n, o) => { - const a = Hf(n); - a === -1 || !Wf(n) || (a === 0 ? t.push(n) : r.push({ + return Array.from(e.querySelectorAll(Yf)).forEach((n, o) => { + const a = qf(n); + a === -1 || !Jf(n) || (a === 0 ? t.push(n) : r.push({ documentOrder: o, tabIndex: a, node: n })); }), r.sort((n, o) => n.tabIndex === o.tabIndex ? n.documentOrder - o.documentOrder : n.tabIndex - o.tabIndex).map((n) => n.node).concat(t); } -function Yf() { +function Qf() { return !0; } -function fn(e) { +function mn(e) { const { children: t, disableAutoFocus: r = !1, disableEnforceFocus: n = !1, disableRestoreFocus: o = !1, - getTabbable: a = Xf, - isEnabled: i = Yf, + getTabbable: a = Zf, + isEnabled: i = Qf, open: l } = e, c = N.useRef(!1), f = N.useRef(null), m = N.useRef(null), v = N.useRef(null), g = N.useRef(null), p = N.useRef(!1), h = N.useRef(null), u = We(t.ref, h), b = N.useRef(null); N.useEffect(() => { @@ -5595,7 +5596,7 @@ function fn(e) { })] }); } -process.env.NODE_ENV !== "production" && (fn.propTypes = { +process.env.NODE_ENV !== "production" && (mn.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ @@ -5603,7 +5604,7 @@ process.env.NODE_ENV !== "production" && (fn.propTypes = { /** * A single child content element. */ - children: Br, + children: Lr, /** * If `true`, the focus trap will not automatically shift focus to itself when it opens, and * replace it to the last focused element when it closes. @@ -5649,8 +5650,8 @@ process.env.NODE_ENV !== "production" && (fn.propTypes = { */ open: s.bool.isRequired }); -process.env.NODE_ENV !== "production" && (fn["propTypes"] = as(fn.propTypes)); -function qf(e) { +process.env.NODE_ENV !== "production" && (mn["propTypes"] = is(mn.propTypes)); +function em(e) { return typeof e == "function" ? e() : e; } const Mr = /* @__PURE__ */ N.forwardRef(function(t, r) { @@ -5660,11 +5661,11 @@ const Mr = /* @__PURE__ */ N.forwardRef(function(t, r) { disablePortal: a = !1 } = t, [i, l] = N.useState(null), c = We(/* @__PURE__ */ N.isValidElement(n) ? n.ref : null, r); if (Dt(() => { - a || l(qf(o) || document.body); + a || l(em(o) || document.body); }, [o, a]), Dt(() => { if (i && !a) - return pn(r, i), () => { - pn(r, null); + return dn(r, i), () => { + dn(r, null); }; }, [r, i, a]), a) { if (/* @__PURE__ */ N.isValidElement(n)) { @@ -5678,7 +5679,7 @@ const Mr = /* @__PURE__ */ N.forwardRef(function(t, r) { }); } return /* @__PURE__ */ d(N.Fragment, { - children: i && /* @__PURE__ */ Dc.createPortal(n, i) + children: i && /* @__PURE__ */ Vc.createPortal(n, i) }); }); process.env.NODE_ENV !== "production" && (Mr.propTypes = { @@ -5707,8 +5708,8 @@ process.env.NODE_ENV !== "production" && (Mr.propTypes = { */ disablePortal: s.bool }); -process.env.NODE_ENV !== "production" && (Mr["propTypes"] = as(Mr.propTypes)); -function Kf(e) { +process.env.NODE_ENV !== "production" && (Mr["propTypes"] = is(Mr.propTypes)); +function tm(e) { const t = Oe(e); return t.body === e ? Qt(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight; } @@ -5718,14 +5719,14 @@ function Tr(e, t) { function ti(e) { return parseInt(Qt(e).getComputedStyle(e).paddingRight, 10) || 0; } -function Jf(e) { +function rm(e) { const r = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(e.tagName) !== -1, n = e.tagName === "INPUT" && e.getAttribute("type") === "hidden"; return r || n; } function ri(e, t, r, n, o) { const a = [t, r, ...n]; [].forEach.call(e.children, (i) => { - const l = a.indexOf(i) === -1, c = !Jf(i); + const l = a.indexOf(i) === -1, c = !rm(i); l && c && Tr(i, o); }); } @@ -5733,11 +5734,11 @@ function Qn(e, t) { let r = -1; return e.some((n, o) => t(n) ? (r = o, !0) : !1), r; } -function Zf(e, t) { +function nm(e, t) { const r = [], n = e.container; if (!t.disableScrollLock) { - if (Kf(n)) { - const i = ds(Oe(n)); + if (tm(n)) { + const i = us(Oe(n)); r.push({ value: n.style.paddingRight, property: "padding-right", @@ -5783,13 +5784,13 @@ function Zf(e, t) { }); }; } -function Qf(e) { +function om(e) { const t = []; return [].forEach.call(e.children, (r) => { r.getAttribute("aria-hidden") === "true" && t.push(r); }), t; } -class em { +class am { constructor() { this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = []; } @@ -5798,7 +5799,7 @@ class em { if (n !== -1) return n; n = this.modals.length, this.modals.push(t), t.modalRef && Tr(t.modalRef, !1); - const o = Qf(r); + const o = om(r); ri(r, t.mount, t.modalRef, o, !0); const a = Qn(this.containers, (i) => i.container === r); return a !== -1 ? (this.containers[a].modals.push(t), n) : (this.containers.push({ @@ -5810,7 +5811,7 @@ class em { } mount(t, r) { const n = Qn(this.containers, (a) => a.modals.indexOf(t) !== -1), o = this.containers[n]; - o.restore || (o.restore = Zf(o, r)); + o.restore || (o.restore = nm(o, r)); } remove(t, r = !0) { const n = this.modals.indexOf(t); @@ -5829,20 +5830,20 @@ class em { return this.modals.length > 0 && this.modals[this.modals.length - 1] === t; } } -function tm(e) { +function im(e) { return typeof e == "function" ? e() : e; } -function rm(e) { +function sm(e) { return e ? e.props.hasOwnProperty("in") : !1; } -const nm = new em(); -function om(e) { +const lm = new am(); +function cm(e) { const { container: t, disableEscapeKeyDown: r = !1, disableScrollLock: n = !1, // @ts-ignore internal logic - Base UI supports the manager as a prop too - manager: o = nm, + manager: o = lm, closeAfterTransition: a = !1, onTransitionEnter: i, onTransitionExited: l, @@ -5850,7 +5851,7 @@ function om(e) { onClose: f, open: m, rootRef: v - } = e, g = N.useRef({}), p = N.useRef(null), h = N.useRef(null), u = We(h, v), [b, x] = N.useState(!m), O = rm(c); + } = e, g = N.useRef({}), p = N.useRef(null), h = N.useRef(null), u = We(h, v), [b, x] = N.useState(!m), O = sm(c); let w = !0; (e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (w = !1); const k = () => Oe(p.current), y = () => (g.current.modalRef = h.current, g.current.mount = p.current, g.current), T = () => { @@ -5858,7 +5859,7 @@ function om(e) { disableScrollLock: n }), h.current && (h.current.scrollTop = 0); }, S = _r(() => { - const B = tm(t) || k().body; + const B = im(t) || k().body; o.add(y(), B), h.current && T(); }), M = N.useCallback(() => o.isTopModal(y()), [o]), j = _r((B) => { p.current = B, B && (m && M() ? T() : h.current && Tr(h.current, w)); @@ -5880,7 +5881,7 @@ function om(e) { }; return { getRootProps: (B = {}) => { - const L = Cs(e); + const L = Os(e); delete L.onTransitionEnter, delete L.onTransitionExited; const Z = P({}, L, B); return P({ @@ -5917,11 +5918,11 @@ function om(e) { hasTransition: O }; } -var Ie = "top", Xe = "bottom", Ye = "right", Me = "left", Ho = "auto", zr = [Ie, Xe, Ye, Me], er = "start", Ar = "end", am = "clippingParents", Ps = "viewport", mr = "popper", im = "reference", ni = /* @__PURE__ */ zr.reduce(function(e, t) { +var Ie = "top", Xe = "bottom", Ye = "right", Me = "left", Ho = "auto", Ur = [Ie, Xe, Ye, Me], er = "start", Ar = "end", pm = "clippingParents", $s = "viewport", mr = "popper", dm = "reference", ni = /* @__PURE__ */ Ur.reduce(function(e, t) { return e.concat([t + "-" + er, t + "-" + Ar]); -}, []), $s = /* @__PURE__ */ [].concat(zr, [Ho]).reduce(function(e, t) { +}, []), _s = /* @__PURE__ */ [].concat(Ur, [Ho]).reduce(function(e, t) { return e.concat([t, t + "-" + er, t + "-" + Ar]); -}, []), sm = "beforeRead", lm = "read", cm = "afterRead", pm = "beforeMain", dm = "main", um = "afterMain", fm = "beforeWrite", mm = "write", hm = "afterWrite", gm = [sm, lm, cm, pm, dm, um, fm, mm, hm]; +}, []), um = "beforeRead", fm = "read", mm = "afterRead", hm = "beforeMain", gm = "main", bm = "afterMain", vm = "beforeWrite", ym = "write", wm = "afterWrite", xm = [um, fm, mm, hm, gm, bm, vm, ym, wm]; function tt(e) { return e ? (e.nodeName || "").toLowerCase() : null; } @@ -5948,7 +5949,7 @@ function Go(e) { var t = Ve(e).ShadowRoot; return e instanceof t || e instanceof ShadowRoot; } -function bm(e) { +function km(e) { var t = e.state; Object.keys(t.elements).forEach(function(r) { var n = t.styles[r] || {}, o = t.attributes[r] || {}, a = t.elements[r]; @@ -5958,7 +5959,7 @@ function bm(e) { })); }); } -function vm(e) { +function Em(e) { var t = e.state, r = { popper: { position: t.options.strategy, @@ -5982,32 +5983,32 @@ function vm(e) { }); }; } -const ym = { +const Nm = { name: "applyStyles", enabled: !0, phase: "write", - fn: bm, - effect: vm, + fn: km, + effect: Em, requires: ["computeStyles"] }; function Ze(e) { return e.split("-")[0]; } -var It = Math.max, mn = Math.min, tr = Math.round; +var It = Math.max, hn = Math.min, tr = Math.round; function ho() { 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 _s() { +function Is() { return !/^((?!chrome|android).)*safari/i.test(ho()); } function rr(e, t, r) { t === void 0 && (t = !1), r === void 0 && (r = !1); var n = e.getBoundingClientRect(), o = 1, a = 1; t && Ge(e) && (o = e.offsetWidth > 0 && tr(n.width) / e.offsetWidth || 1, a = e.offsetHeight > 0 && tr(n.height) / e.offsetHeight || 1); - var i = Lt(e) ? Ve(e) : window, l = i.visualViewport, c = !_s() && r, f = (n.left + (c && l ? l.offsetLeft : 0)) / o, m = (n.top + (c && l ? l.offsetTop : 0)) / a, v = n.width / o, g = n.height / a; + var i = Lt(e) ? Ve(e) : window, l = i.visualViewport, c = !Is() && r, f = (n.left + (c && l ? l.offsetLeft : 0)) / o, m = (n.top + (c && l ? l.offsetTop : 0)) / a, v = n.width / o, g = n.height / a; return { width: v, height: g, @@ -6028,7 +6029,7 @@ function Wo(e) { height: n }; } -function Is(e, t) { +function Ms(e, t) { var r = t.getRootNode && t.getRootNode(); if (e.contains(t)) return !0; @@ -6045,7 +6046,7 @@ function Is(e, t) { function pt(e) { return Ve(e).getComputedStyle(e); } -function wm(e) { +function Tm(e) { return ["table", "td", "th"].indexOf(tt(e)) >= 0; } function Et(e) { @@ -6070,7 +6071,7 @@ function oi(e) { return !Ge(e) || // https://github.com/popperjs/popper-core/issues/837 pt(e).position === "fixed" ? null : e.offsetParent; } -function xm(e) { +function Sm(e) { var t = /firefox/i.test(ho()), r = /Trident/i.test(ho()); if (r && Ge(e)) { var n = pt(e); @@ -6086,22 +6087,22 @@ function xm(e) { } return null; } -function Ur(e) { - for (var t = Ve(e), r = oi(e); r && wm(r) && pt(r).position === "static"; ) +function Hr(e) { + for (var t = Ve(e), r = oi(e); r && Tm(r) && pt(r).position === "static"; ) r = oi(r); - return r && (tt(r) === "html" || tt(r) === "body" && pt(r).position === "static") ? t : r || xm(e) || t; + return r && (tt(r) === "html" || tt(r) === "body" && pt(r).position === "static") ? t : r || Sm(e) || t; } function Xo(e) { return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y"; } function Sr(e, t, r) { - return It(e, mn(t, r)); + return It(e, hn(t, r)); } -function km(e, t, r) { +function Cm(e, t, r) { var n = Sr(e, t, r); return n > r ? r : n; } -function Ms() { +function As() { return { top: 0, right: 0, @@ -6109,49 +6110,49 @@ function Ms() { left: 0 }; } -function As(e) { - return Object.assign({}, Ms(), e); +function Ds(e) { + return Object.assign({}, As(), e); } -function Ds(e, t) { +function js(e, t) { return t.reduce(function(r, n) { return r[n] = e, r; }, {}); } -var Em = function(t, r) { +var Om = function(t, r) { return t = typeof t == "function" ? t(Object.assign({}, r.rects, { placement: r.placement - })) : t, As(typeof t != "number" ? t : Ds(t, zr)); + })) : t, Ds(typeof t != "number" ? t : js(t, Ur)); }; -function Nm(e) { +function Rm(e) { var t, r = e.state, n = e.name, o = e.options, a = r.elements.arrow, i = r.modifiersData.popperOffsets, l = Ze(r.placement), c = Xo(l), f = [Me, Ye].indexOf(l) >= 0, m = f ? "height" : "width"; if (!(!a || !i)) { - var v = Em(o.padding, r), g = Wo(a), p = c === "y" ? Ie : Me, h = c === "y" ? Xe : Ye, u = r.rects.reference[m] + r.rects.reference[c] - i[c] - r.rects.popper[m], b = i[c] - r.rects.reference[c], x = Ur(a), O = x ? c === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, w = u / 2 - b / 2, k = v[p], y = O - g[m] - v[h], T = O / 2 - g[m] / 2 + w, S = Sr(k, T, y), M = c; + var v = Om(o.padding, r), g = Wo(a), p = c === "y" ? Ie : Me, h = c === "y" ? Xe : Ye, u = r.rects.reference[m] + r.rects.reference[c] - i[c] - r.rects.popper[m], b = i[c] - r.rects.reference[c], x = Hr(a), O = x ? c === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, w = u / 2 - b / 2, k = v[p], y = O - g[m] - v[h], T = O / 2 - g[m] / 2 + w, S = Sr(k, T, y), M = c; r.modifiersData[n] = (t = {}, t[M] = S, t.centerOffset = S - T, t); } } -function Tm(e) { +function Pm(e) { var t = e.state, r = e.options, n = r.element, o = n === void 0 ? "[data-popper-arrow]" : n; - o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || Is(t.elements.popper, o) && (t.elements.arrow = o)); + o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || Ms(t.elements.popper, o) && (t.elements.arrow = o)); } -const Sm = { +const $m = { name: "arrow", enabled: !0, phase: "main", - fn: Nm, - effect: Tm, + fn: Rm, + effect: Pm, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] }; function nr(e) { return e.split("-")[1]; } -var Cm = { +var _m = { top: "auto", right: "auto", bottom: "auto", left: "auto" }; -function Om(e, t) { +function Im(e, t) { var r = e.x, n = e.y, o = t.devicePixelRatio || 1; return { x: tr(r * o) / o || 0, @@ -6169,7 +6170,7 @@ function ai(e) { p = b.x, u = b.y; var x = i.hasOwnProperty("x"), O = i.hasOwnProperty("y"), w = Me, k = Ie, y = window; if (f) { - var T = Ur(r), S = "clientHeight", M = "clientWidth"; + var T = Hr(r), S = "clientHeight", M = "clientWidth"; if (T === Ve(r) && (T = Et(r), pt(T).position !== "static" && l === "absolute" && (S = "scrollHeight", M = "scrollWidth")), T = T, o === Ie || (o === Me || o === Ye) && a === Ar) { k = Xe; var j = v && T === y && y.visualViewport ? y.visualViewport.height : ( @@ -6189,7 +6190,7 @@ function ai(e) { } var $ = Object.assign({ position: l - }, f && Cm), E = m === !0 ? Om({ + }, f && _m), E = m === !0 ? Im({ x: p, y: u }, Ve(r)) : { @@ -6202,7 +6203,7 @@ function ai(e) { } return Object.assign({}, $, (t = {}, t[k] = O ? u + "px" : "", t[w] = x ? p + "px" : "", t.transform = "", t)); } -function Rm(e) { +function Mm(e) { var t = e.state, r = e.options, n = r.gpuAcceleration, o = n === void 0 ? !0 : n, a = r.adaptive, i = a === void 0 ? !0 : a, l = r.roundOffsets, c = l === void 0 ? !0 : l, f = { placement: Ze(t.placement), variation: nr(t.placement), @@ -6225,53 +6226,53 @@ function Rm(e) { "data-popper-placement": t.placement }); } -const Pm = { +const Am = { name: "computeStyles", enabled: !0, phase: "beforeWrite", - fn: Rm, + fn: Mm, data: {} }; -var Zr = { +var Qr = { passive: !0 }; -function $m(e) { +function Dm(e) { var t = e.state, r = e.instance, n = e.options, o = n.scroll, a = o === void 0 ? !0 : o, i = n.resize, l = i === void 0 ? !0 : i, c = Ve(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper); return a && f.forEach(function(m) { - m.addEventListener("scroll", r.update, Zr); - }), l && c.addEventListener("resize", r.update, Zr), function() { + m.addEventListener("scroll", r.update, Qr); + }), l && c.addEventListener("resize", r.update, Qr), function() { a && f.forEach(function(m) { - m.removeEventListener("scroll", r.update, Zr); - }), l && c.removeEventListener("resize", r.update, Zr); + m.removeEventListener("scroll", r.update, Qr); + }), l && c.removeEventListener("resize", r.update, Qr); }; } -const _m = { +const jm = { name: "eventListeners", enabled: !0, phase: "write", fn: function() { }, - effect: $m, + effect: Dm, data: {} }; -var Im = { +var Bm = { left: "right", right: "left", bottom: "top", top: "bottom" }; -function nn(e) { +function on(e) { return e.replace(/left|right|bottom|top/g, function(t) { - return Im[t]; + return Bm[t]; }); } -var Mm = { +var Lm = { start: "end", end: "start" }; function ii(e) { return e.replace(/start|end/g, function(t) { - return Mm[t]; + return Lm[t]; }); } function Yo(e) { @@ -6284,11 +6285,11 @@ function Yo(e) { function qo(e) { return rr(Et(e)).left + Yo(e).scrollLeft; } -function Am(e, t) { +function Fm(e, t) { var r = Ve(e), n = Et(e), o = r.visualViewport, a = n.clientWidth, i = n.clientHeight, l = 0, c = 0; if (o) { a = o.width, i = o.height; - var f = _s(); + var f = Is(); (f || !f && t === "fixed") && (l = o.offsetLeft, c = o.offsetTop); } return { @@ -6298,7 +6299,7 @@ function Am(e, t) { y: c }; } -function Dm(e) { +function Vm(e) { var t, r = Et(e), n = Yo(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, a = It(r.scrollWidth, r.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = It(r.scrollHeight, r.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), l = -n.scrollLeft + qo(e), c = -n.scrollTop; return pt(o || r).direction === "rtl" && (l += It(r.clientWidth, o ? o.clientWidth : 0) - a), { width: a, @@ -6311,13 +6312,13 @@ function Ko(e) { var t = pt(e), r = t.overflow, n = t.overflowX, o = t.overflowY; return /auto|scroll|overlay|hidden/.test(r + o + n); } -function js(e) { - return ["html", "body", "#document"].indexOf(tt(e)) >= 0 ? e.ownerDocument.body : Ge(e) && Ko(e) ? e : js(An(e)); +function Bs(e) { + return ["html", "body", "#document"].indexOf(tt(e)) >= 0 ? e.ownerDocument.body : Ge(e) && Ko(e) ? e : Bs(An(e)); } function Cr(e, t) { var r; t === void 0 && (t = []); - var n = js(e), o = n === ((r = e.ownerDocument) == null ? void 0 : r.body), a = Ve(n), i = o ? [a].concat(a.visualViewport || [], Ko(n) ? n : []) : n, l = t.concat(i); + var n = Bs(e), o = n === ((r = e.ownerDocument) == null ? void 0 : r.body), a = Ve(n), i = o ? [a].concat(a.visualViewport || [], Ko(n) ? n : []) : n, l = t.concat(i); return o ? l : ( // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here l.concat(Cr(An(i))) @@ -6331,27 +6332,27 @@ function go(e) { bottom: e.y + e.height }); } -function jm(e, t) { +function zm(e, t) { var r = rr(e, !1, t === "fixed"); return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r; } function si(e, t, r) { - return t === Ps ? go(Am(e, r)) : Lt(t) ? jm(t, r) : go(Dm(Et(e))); + return t === $s ? go(Fm(e, r)) : Lt(t) ? zm(t, r) : go(Vm(Et(e))); } -function Bm(e) { - var t = Cr(An(e)), r = ["absolute", "fixed"].indexOf(pt(e).position) >= 0, n = r && Ge(e) ? Ur(e) : e; +function Um(e) { + var t = Cr(An(e)), r = ["absolute", "fixed"].indexOf(pt(e).position) >= 0, n = r && Ge(e) ? Hr(e) : e; return Lt(n) ? t.filter(function(o) { - return Lt(o) && Is(o, n) && tt(o) !== "body"; + return Lt(o) && Ms(o, n) && tt(o) !== "body"; }) : []; } -function Lm(e, t, r, n) { - var o = t === "clippingParents" ? Bm(e) : [].concat(t), a = [].concat(o, [r]), i = a[0], l = a.reduce(function(c, f) { +function Hm(e, t, r, n) { + var o = t === "clippingParents" ? Um(e) : [].concat(t), a = [].concat(o, [r]), i = a[0], l = a.reduce(function(c, f) { var m = si(e, f, n); - return c.top = It(m.top, c.top), c.right = mn(m.right, c.right), c.bottom = mn(m.bottom, c.bottom), c.left = It(m.left, c.left), c; + return c.top = It(m.top, c.top), c.right = hn(m.right, c.right), c.bottom = hn(m.bottom, c.bottom), c.left = It(m.left, c.left), c; }, si(e, i, n)); return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l; } -function Bs(e) { +function Ls(e) { var t = e.reference, r = e.element, n = e.placement, o = n ? Ze(n) : null, a = n ? nr(n) : null, i = t.x + t.width / 2 - r.width / 2, l = t.y + t.height / 2 - r.height / 2, c; switch (o) { case Ie: @@ -6400,7 +6401,7 @@ function Bs(e) { } function Dr(e, t) { t === void 0 && (t = {}); - var r = t, n = r.placement, o = n === void 0 ? e.placement : n, a = r.strategy, i = a === void 0 ? e.strategy : a, l = r.boundary, c = l === void 0 ? am : l, f = r.rootBoundary, m = f === void 0 ? Ps : f, v = r.elementContext, g = v === void 0 ? mr : v, p = r.altBoundary, h = p === void 0 ? !1 : p, u = r.padding, b = u === void 0 ? 0 : u, x = As(typeof b != "number" ? b : Ds(b, zr)), O = g === mr ? im : mr, w = e.rects.popper, k = e.elements[h ? O : g], y = Lm(Lt(k) ? k : k.contextElement || Et(e.elements.popper), c, m, i), T = rr(e.elements.reference), S = Bs({ + var r = t, n = r.placement, o = n === void 0 ? e.placement : n, a = r.strategy, i = a === void 0 ? e.strategy : a, l = r.boundary, c = l === void 0 ? pm : l, f = r.rootBoundary, m = f === void 0 ? $s : f, v = r.elementContext, g = v === void 0 ? mr : v, p = r.altBoundary, h = p === void 0 ? !1 : p, u = r.padding, b = u === void 0 ? 0 : u, x = Ds(typeof b != "number" ? b : js(b, Ur)), O = g === mr ? dm : mr, w = e.rects.popper, k = e.elements[h ? O : g], y = Hm(Lt(k) ? k : k.contextElement || Et(e.elements.popper), c, m, i), T = rr(e.elements.reference), S = Ls({ reference: T, element: w, strategy: "absolute", @@ -6420,11 +6421,11 @@ function Dr(e, t) { } return z; } -function Fm(e, t) { +function Gm(e, t) { t === void 0 && (t = {}); - var r = t, n = r.placement, o = r.boundary, a = r.rootBoundary, i = r.padding, l = r.flipVariations, c = r.allowedAutoPlacements, f = c === void 0 ? $s : c, m = nr(n), v = m ? l ? ni : ni.filter(function(h) { + var r = t, n = r.placement, o = r.boundary, a = r.rootBoundary, i = r.padding, l = r.flipVariations, c = r.allowedAutoPlacements, f = c === void 0 ? _s : c, m = nr(n), v = m ? l ? ni : ni.filter(function(h) { return nr(h) === m; - }) : zr, g = v.filter(function(h) { + }) : Ur, g = v.filter(function(h) { return f.indexOf(h) >= 0; }); g.length === 0 && (g = v); @@ -6440,17 +6441,17 @@ function Fm(e, t) { return p[h] - p[u]; }); } -function Vm(e) { +function Wm(e) { if (Ze(e) === Ho) return []; - var t = nn(e); + var t = on(e); return [ii(e), t, ii(t)]; } -function zm(e) { +function Xm(e) { var t = e.state, r = e.options, n = e.name; if (!t.modifiersData[n]._skip) { - for (var o = r.mainAxis, a = o === void 0 ? !0 : o, i = r.altAxis, l = i === void 0 ? !0 : i, c = r.fallbackPlacements, f = r.padding, m = r.boundary, v = r.rootBoundary, g = r.altBoundary, p = r.flipVariations, h = p === void 0 ? !0 : p, u = r.allowedAutoPlacements, b = t.options.placement, x = Ze(b), O = x === b, w = c || (O || !h ? [nn(b)] : Vm(b)), k = [b].concat(w).reduce(function(G, X) { - return G.concat(Ze(X) === Ho ? Fm(t, { + for (var o = r.mainAxis, a = o === void 0 ? !0 : o, i = r.altAxis, l = i === void 0 ? !0 : i, c = r.fallbackPlacements, f = r.padding, m = r.boundary, v = r.rootBoundary, g = r.altBoundary, p = r.flipVariations, h = p === void 0 ? !0 : p, u = r.allowedAutoPlacements, b = t.options.placement, x = Ze(b), O = x === b, w = c || (O || !h ? [on(b)] : Wm(b)), k = [b].concat(w).reduce(function(G, X) { + return G.concat(Ze(X) === Ho ? Gm(t, { placement: X, boundary: m, rootBoundary: v, @@ -6466,8 +6467,8 @@ function zm(e) { altBoundary: g, padding: f }), L = I ? R ? Ye : Me : R ? Xe : Ie; - y[U] > T[U] && (L = nn(L)); - var Z = nn(L), Q = []; + y[U] > T[U] && (L = on(L)); + var Z = on(L), Q = []; if (a && Q.push(B[E] <= 0), l && Q.push(B[L] <= 0, B[Z] <= 0), Q.every(function(G) { return G; })) { @@ -6495,11 +6496,11 @@ function zm(e) { t.placement !== j && (t.modifiersData[n]._skip = !0, t.placement = j, t.reset = !0); } } -const Um = { +const Ym = { name: "flip", enabled: !0, phase: "main", - fn: zm, + fn: Xm, requiresIfExists: ["offset"], data: { _skip: !1 @@ -6521,7 +6522,7 @@ function ci(e) { return e[t] >= 0; }); } -function Hm(e) { +function qm(e) { var t = e.state, r = e.name, n = t.rects.reference, o = t.rects.popper, a = t.modifiersData.preventOverflow, i = Dr(t, { elementContext: "reference" }), l = Dr(t, { @@ -6537,14 +6538,14 @@ function Hm(e) { "data-popper-escaped": v }); } -const Gm = { +const Km = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], - fn: Hm + fn: qm }; -function Wm(e, t, r) { +function Jm(e, t, r) { var n = Ze(e), o = [Me, Ie].indexOf(n) >= 0 ? -1 : 1, a = typeof r == "function" ? r(Object.assign({}, t, { placement: e })) : r, i = a[0], l = a[1]; @@ -6556,45 +6557,45 @@ function Wm(e, t, r) { y: l }; } -function Xm(e) { - var t = e.state, r = e.options, n = e.name, o = r.offset, a = o === void 0 ? [0, 0] : o, i = $s.reduce(function(m, v) { - return m[v] = Wm(v, t.rects, a), m; +function Zm(e) { + var t = e.state, r = e.options, n = e.name, o = r.offset, a = o === void 0 ? [0, 0] : o, i = _s.reduce(function(m, v) { + return m[v] = Jm(v, t.rects, a), m; }, {}), l = i[t.placement], c = l.x, f = l.y; t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += c, t.modifiersData.popperOffsets.y += f), t.modifiersData[n] = i; } -const Ym = { +const Qm = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], - fn: Xm + fn: Zm }; -function qm(e) { +function eh(e) { var t = e.state, r = e.name; - t.modifiersData[r] = Bs({ + t.modifiersData[r] = Ls({ reference: t.rects.reference, element: t.rects.popper, strategy: "absolute", placement: t.placement }); } -const Km = { +const th = { name: "popperOffsets", enabled: !0, phase: "read", - fn: qm, + fn: eh, data: {} }; -function Jm(e) { +function rh(e) { return e === "x" ? "y" : "x"; } -function Zm(e) { +function nh(e) { var t = e.state, r = e.options, n = e.name, o = r.mainAxis, a = o === void 0 ? !0 : o, i = r.altAxis, l = i === void 0 ? !1 : i, c = r.boundary, f = r.rootBoundary, m = r.altBoundary, v = r.padding, g = r.tether, p = g === void 0 ? !0 : g, h = r.tetherOffset, u = h === void 0 ? 0 : h, b = Dr(t, { boundary: c, rootBoundary: f, padding: v, altBoundary: m - }), x = Ze(t.placement), O = nr(t.placement), w = !O, k = Xo(x), y = Jm(k), T = t.modifiersData.popperOffsets, S = t.rects.reference, M = t.rects.popper, j = typeof u == "function" ? u(Object.assign({}, t.rects, { + }), x = Ze(t.placement), O = nr(t.placement), w = !O, k = Xo(x), y = rh(k), T = t.modifiersData.popperOffsets, S = t.rects.reference, M = t.rects.popper, j = typeof u == "function" ? u(Object.assign({}, t.rects, { placement: t.placement })) : u, z = typeof j == "number" ? { mainAxis: j, @@ -6611,39 +6612,39 @@ function Zm(e) { var R, I = k === "y" ? Ie : Me, U = k === "y" ? Xe : Ye, B = k === "y" ? "height" : "width", L = T[k], Z = L + b[I], Q = L - b[U], C = p ? -M[B] / 2 : 0, A = O === er ? S[B] : M[B], H = O === er ? -M[B] : -S[B], J = t.elements.arrow, G = p && J ? Wo(J) : { width: 0, height: 0 - }, X = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Ms(), q = X[I], K = X[U], Y = Sr(0, S[B], G[B]), ee = w ? S[B] / 2 - C - Y - q - z.mainAxis : A - Y - q - z.mainAxis, te = w ? -S[B] / 2 + C + Y + K + z.mainAxis : H + Y + K + z.mainAxis, ie = t.elements.arrow && Ur(t.elements.arrow), F = ie ? k === "y" ? ie.clientTop || 0 : ie.clientLeft || 0 : 0, re = (R = $ == null ? void 0 : $[k]) != null ? R : 0, D = L + ee - re - F, se = L + te - re, Ne = Sr(p ? mn(Z, D) : Z, L, p ? It(Q, se) : Q); + }, X = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : As(), q = X[I], K = X[U], Y = Sr(0, S[B], G[B]), ee = w ? S[B] / 2 - C - Y - q - z.mainAxis : A - Y - q - z.mainAxis, te = w ? -S[B] / 2 + C + Y + K + z.mainAxis : H + Y + K + z.mainAxis, ie = t.elements.arrow && Hr(t.elements.arrow), V = ie ? k === "y" ? ie.clientTop || 0 : ie.clientLeft || 0 : 0, re = (R = $ == null ? void 0 : $[k]) != null ? R : 0, D = L + ee - re - V, se = L + te - re, Ne = Sr(p ? hn(Z, D) : Z, L, p ? It(Q, se) : Q); T[k] = Ne, E[k] = Ne - L; } if (l) { - var Pe, ke = k === "x" ? Ie : Me, Nt = k === "x" ? Xe : Ye, $e = T[y], nt = y === "y" ? "height" : "width", je = $e + b[ke], ot = $e - b[Nt], Te = [Ie, Me].indexOf(x) !== -1, Ft = (Pe = $ == null ? void 0 : $[y]) != null ? Pe : 0, Tt = Te ? je : $e - S[nt] - M[nt] - Ft + z.altAxis, ir = Te ? $e + S[nt] + M[nt] - Ft - z.altAxis : ot, Wr = p && Te ? km(Tt, $e, ir) : Sr(p ? Tt : je, $e, p ? ir : ot); - T[y] = Wr, E[y] = Wr - $e; + var Pe, ke = k === "x" ? Ie : Me, Nt = k === "x" ? Xe : Ye, $e = T[y], nt = y === "y" ? "height" : "width", je = $e + b[ke], ot = $e - b[Nt], Te = [Ie, Me].indexOf(x) !== -1, Ft = (Pe = $ == null ? void 0 : $[y]) != null ? Pe : 0, Tt = Te ? je : $e - S[nt] - M[nt] - Ft + z.altAxis, ir = Te ? $e + S[nt] + M[nt] - Ft - z.altAxis : ot, Xr = p && Te ? Cm(Tt, $e, ir) : Sr(p ? Tt : je, $e, p ? ir : ot); + T[y] = Xr, E[y] = Xr - $e; } t.modifiersData[n] = E; } } -const Qm = { +const oh = { name: "preventOverflow", enabled: !0, phase: "main", - fn: Zm, + fn: nh, requiresIfExists: ["offset"] }; -function eh(e) { +function ah(e) { return { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop }; } -function th(e) { - return e === Ve(e) || !Ge(e) ? Yo(e) : eh(e); +function ih(e) { + return e === Ve(e) || !Ge(e) ? Yo(e) : ah(e); } -function rh(e) { +function sh(e) { var t = e.getBoundingClientRect(), r = tr(t.width) / e.offsetWidth || 1, n = tr(t.height) / e.offsetHeight || 1; return r !== 1 || n !== 1; } -function nh(e, t, r) { +function lh(e, t, r) { r === void 0 && (r = !1); - var n = Ge(t), o = Ge(t) && rh(t), a = Et(t), i = rr(e, o, r), l = { + var n = Ge(t), o = Ge(t) && sh(t), a = Et(t), i = rr(e, o, r), l = { scrollLeft: 0, scrollTop: 0 }, c = { @@ -6651,14 +6652,14 @@ function nh(e, t, r) { y: 0 }; return (n || !n && !r) && ((tt(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078 - Ko(a)) && (l = th(t)), Ge(t) ? (c = rr(t, !0), c.x += t.clientLeft, c.y += t.clientTop) : a && (c.x = qo(a))), { + Ko(a)) && (l = ih(t)), Ge(t) ? (c = rr(t, !0), c.x += t.clientLeft, c.y += t.clientTop) : a && (c.x = qo(a))), { x: i.left + l.scrollLeft - c.x, y: i.top + l.scrollTop - c.y, width: i.width, height: i.height }; } -function oh(e) { +function ch(e) { var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = []; e.forEach(function(a) { t.set(a.name, a); @@ -6677,15 +6678,15 @@ function oh(e) { r.has(a.name) || o(a); }), n; } -function ah(e) { - var t = oh(e); - return gm.reduce(function(r, n) { +function ph(e) { + var t = ch(e); + return xm.reduce(function(r, n) { return r.concat(t.filter(function(o) { return o.phase === n; })); }, []); } -function ih(e) { +function dh(e) { var t; return function() { return t || (t = new Promise(function(r) { @@ -6695,7 +6696,7 @@ function ih(e) { })), t; }; } -function sh(e) { +function uh(e) { var t = e.reduce(function(r, n) { var o = r[n.name]; return r[n.name] = o ? Object.assign({}, o, n, { @@ -6719,7 +6720,7 @@ function di() { return !(n && typeof n.getBoundingClientRect == "function"); }); } -function lh(e) { +function fh(e) { e === void 0 && (e = {}); var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, o = t.defaultOptions, a = o === void 0 ? pi : o; return function(l, c, f) { @@ -6743,7 +6744,7 @@ function lh(e) { reference: Lt(l) ? Cr(l) : l.contextElement ? Cr(l.contextElement) : [], popper: Cr(c) }; - var w = ah(sh([].concat(n, m.options.modifiers))); + var w = ph(uh([].concat(n, m.options.modifiers))); return m.orderedModifiers = w.filter(function(k) { return k.enabled; }), h(), p.update(); @@ -6758,7 +6759,7 @@ function lh(e) { var x = m.elements, O = x.reference, w = x.popper; if (di(O, w)) { m.rects = { - reference: nh(O, Ur(w), m.options.strategy === "fixed"), + reference: lh(O, Hr(w), m.options.strategy === "fixed"), popper: Wo(w) }, m.reset = !1, m.placement = m.options.placement, m.orderedModifiers.forEach(function(z) { return m.modifiersData[z.name] = Object.assign({}, z.data); @@ -6781,7 +6782,7 @@ function lh(e) { }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) - update: ih(function() { + update: dh(function() { return new Promise(function(b) { p.forceUpdate(), b(m); }); @@ -6818,16 +6819,16 @@ function lh(e) { return p; }; } -var ch = [_m, Km, Pm, ym, Ym, Um, Qm, Sm, Gm], ph = /* @__PURE__ */ lh({ - defaultModifiers: ch +var mh = [jm, th, Am, Nm, Qm, Ym, oh, $m, Km], hh = /* @__PURE__ */ fh({ + defaultModifiers: mh }); -const Ls = "Popper"; -function dh(e) { - return Rs(Ls, e); +const Fs = "Popper"; +function gh(e) { + return Ps(Fs, e); } -zf(Ls, ["root"]); -const uh = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], fh = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"]; -function mh(e, t) { +Xf(Fs, ["root"]); +const bh = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], vh = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"]; +function yh(e, t) { if (t === "ltr") return e; switch (e) { @@ -6843,18 +6844,18 @@ function mh(e, t) { return e; } } -function hn(e) { +function gn(e) { return typeof e == "function" ? e() : e; } function Dn(e) { return e.nodeType !== void 0; } -function hh(e) { +function wh(e) { return !Dn(e); } -const gh = () => dt({ +const xh = () => dt({ root: ["root"] -}, Df(dh)), bh = {}, vh = /* @__PURE__ */ N.forwardRef(function(t, r) { +}, Vf(gh)), kh = {}, Eh = /* @__PURE__ */ N.forwardRef(function(t, r) { var n; const { anchorEl: o, @@ -6871,15 +6872,15 @@ const gh = () => dt({ TransitionProps: u // @ts-ignore internal logic // prevent from spreading to DOM, it can come from the parent component e.g. Select. - } = t, b = he(t, uh), x = N.useRef(null), O = We(x, r), w = N.useRef(null), k = We(w, g), y = N.useRef(k); + } = t, b = he(t, bh), x = N.useRef(null), O = We(x, r), w = N.useRef(null), k = We(w, g), y = N.useRef(k); Dt(() => { y.current = k; }, [k]), N.useImperativeHandle(g, () => w.current, []); - const T = mh(m, i), [S, M] = N.useState(T), [j, z] = N.useState(hn(o)); + const T = yh(m, i), [S, M] = N.useState(T), [j, z] = N.useState(gn(o)); N.useEffect(() => { w.current && w.current.forceUpdate(); }), N.useEffect(() => { - o && z(hn(o)); + o && z(gn(o)); }, [o]), Dt(() => { if (!j || !f) return; @@ -6912,7 +6913,7 @@ const gh = () => dt({ } }]; c != null && (B = B.concat(c)), v && v.modifiers != null && (B = B.concat(v.modifiers)); - const L = ph(j, x.current, P({ + const L = hh(j, x.current, P({ placement: T }, v, { modifiers: B @@ -6925,7 +6926,7 @@ const gh = () => dt({ placement: S }; u !== null && ($.TransitionProps = u); - const E = gh(), R = (n = h.root) != null ? n : "div", I = Bt({ + const E = xh(), R = (n = h.root) != null ? n : "div", I = Bt({ elementType: R, externalSlotProps: p.root, externalForwardedProps: b, @@ -6939,7 +6940,7 @@ const gh = () => dt({ return /* @__PURE__ */ d(R, P({}, I, { children: typeof a == "function" ? a($) : a })); -}), Fs = /* @__PURE__ */ N.forwardRef(function(t, r) { +}), Vs = /* @__PURE__ */ N.forwardRef(function(t, r) { const { anchorEl: n, children: o, @@ -6950,13 +6951,13 @@ const gh = () => dt({ modifiers: f, open: m, placement: v = "bottom", - popperOptions: g = bh, + popperOptions: g = kh, popperRef: p, style: h, transition: u = !1, slotProps: b = {}, slots: x = {} - } = t, O = he(t, fh), [w, k] = N.useState(!0), y = () => { + } = t, O = he(t, vh), [w, k] = N.useState(!0), y = () => { k(!1); }, T = () => { k(!0); @@ -6967,7 +6968,7 @@ const gh = () => dt({ if (a) S = a; else if (n) { - const z = hn(n); + const z = gn(n); S = z && Dn(z) ? Oe(z).body : Oe(null).body; } const M = !m && c && (!u || w) ? "none" : void 0, j = u ? { @@ -6978,7 +6979,7 @@ const gh = () => dt({ return /* @__PURE__ */ d(Mr, { disablePortal: l, container: S, - children: /* @__PURE__ */ d(vh, P({ + children: /* @__PURE__ */ d(Eh, P({ anchorEl: n, direction: i, disablePortal: l, @@ -7004,7 +7005,7 @@ const gh = () => dt({ })) }); }); -process.env.NODE_ENV !== "production" && (Fs.propTypes = { +process.env.NODE_ENV !== "production" && (Vs.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ @@ -7017,13 +7018,13 @@ process.env.NODE_ENV !== "production" && (Fs.propTypes = { */ anchorEl: ar(s.oneOfType([lt, s.object, s.func]), (e) => { if (e.open) { - const t = hn(e.anchorEl); + const t = gn(e.anchorEl); if (t && Dn(t) && t.nodeType === 1) { const r = t.getBoundingClientRect(); if (process.env.NODE_ENV !== "test" && r.top === 0 && r.left === 0 && r.right === 0 && r.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" || hh(t) && t.contextElement != null && t.contextElement.nodeType !== 1) + } else if (!t || typeof t.getBoundingClientRect != "function" || wh(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(` `)); } @@ -7125,8 +7126,8 @@ process.env.NODE_ENV !== "production" && (Fs.propTypes = { */ transition: s.bool }); -function Hr() { - const e = ks(Vo); +function Gr() { + const e = Es(Vo); return process.env.NODE_ENV !== "production" && N.useDebugValue(e), e[zo] || e; } function bo(e, t) { @@ -7134,13 +7135,13 @@ function bo(e, t) { return n.__proto__ = o, n; }, bo(e, t); } -function yh(e, t) { +function Nh(e, t) { e.prototype = Object.create(t.prototype), e.prototype.constructor = e, bo(e, t); } const ui = { disabled: !1 }; -var wh = process.env.NODE_ENV !== "production" ? s.oneOfType([s.number, s.shape({ +var Th = process.env.NODE_ENV !== "production" ? s.oneOfType([s.number, s.shape({ enter: s.number, exit: s.number, appear: s.number @@ -7157,11 +7158,11 @@ process.env.NODE_ENV !== "production" && s.oneOfType([s.string, s.shape({ exitDone: s.string, exitActive: s.string })]); -const Vs = W.createContext(null); -var xh = function(t) { +const zs = W.createContext(null); +var Sh = function(t) { return t.scrollTop; }, xr = "unmounted", Ct = "exited", Ot = "entering", qt = "entered", vo = "exiting", ft = /* @__PURE__ */ function(e) { - yh(t, e); + Nh(t, e); function t(n, o) { var a; a = e.call(this, n, o) || this; @@ -7199,8 +7200,8 @@ var xh = function(t) { if (o === void 0 && (o = !1), a !== null) if (this.cancelNextCallback(), a === Ot) { if (this.props.unmountOnExit || this.props.mountOnEnter) { - var i = this.props.nodeRef ? this.props.nodeRef.current : qr.findDOMNode(this); - i && xh(i); + var i = this.props.nodeRef ? this.props.nodeRef.current : Kr.findDOMNode(this); + i && Sh(i); } this.performEnter(o); } else @@ -7210,7 +7211,7 @@ var xh = function(t) { status: xr }); }, r.performEnter = function(o) { - var a = this, i = this.props.enter, l = this.context ? this.context.isMounting : o, c = this.props.nodeRef ? [l] : [qr.findDOMNode(this), l], f = c[0], m = c[1], v = this.getTimeouts(), g = l ? v.appear : v.enter; + var a = this, i = this.props.enter, l = this.context ? this.context.isMounting : o, c = this.props.nodeRef ? [l] : [Kr.findDOMNode(this), l], f = c[0], m = c[1], v = this.getTimeouts(), g = l ? v.appear : v.enter; if (!o && !i || ui.disabled) { this.safeSetState({ status: qt @@ -7231,7 +7232,7 @@ var xh = function(t) { }); }); }, r.performExit = function() { - var o = this, a = this.props.exit, i = this.getTimeouts(), l = this.props.nodeRef ? void 0 : qr.findDOMNode(this); + var o = this, a = this.props.exit, i = this.getTimeouts(), l = this.props.nodeRef ? void 0 : Kr.findDOMNode(this); if (!a || ui.disabled) { this.safeSetState({ status: Ct @@ -7264,7 +7265,7 @@ var xh = function(t) { }, this.nextCallback; }, r.onTransitionEnd = function(o, a) { this.setNextCallback(a); - var i = this.props.nodeRef ? this.props.nodeRef.current : qr.findDOMNode(this), l = o == null && !this.props.addEndListener; + var i = this.props.nodeRef ? this.props.nodeRef.current : Kr.findDOMNode(this), l = o == null && !this.props.addEndListener; if (!i || l) { setTimeout(this.nextCallback, 0); return; @@ -7283,13 +7284,13 @@ var xh = function(t) { var l = he(a, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]); return ( // allows for nested Transitions - /* @__PURE__ */ W.createElement(Vs.Provider, { + /* @__PURE__ */ W.createElement(zs.Provider, { value: null }, typeof i == "function" ? i(o, l) : W.cloneElement(W.Children.only(i), l)) ); }, t; }(W.Component); -ft.contextType = Vs; +ft.contextType = zs; ft.propTypes = process.env.NODE_ENV !== "production" ? { /** * A React reference to DOM element that need to transition: @@ -7386,7 +7387,7 @@ ft.propTypes = process.env.NODE_ENV !== "production" ? { * @type {number | { enter?: number, exit?: number, appear?: number }} */ timeout: function(t) { - var r = wh; + var r = Th; t.addEndListener || (r = r.isRequired); for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++) o[a - 1] = arguments[a]; @@ -7480,8 +7481,8 @@ ft.EXITED = Ct; ft.ENTERING = Ot; ft.ENTERED = qt; ft.EXITING = vo; -const zs = ft, Us = (e) => e.scrollTop; -function gn(e, t) { +const Us = ft, Hs = (e) => e.scrollTop; +function bn(e, t) { var r, n; const { timeout: o, @@ -7494,11 +7495,11 @@ function gn(e, t) { delay: i.transitionDelay }; } -const kh = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]; +const Ch = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]; function yo(e) { return `scale(${e}, ${e ** 2})`; } -const Eh = { +const Oh = { entering: { opacity: 1, transform: yo(1) @@ -7523,19 +7524,19 @@ const Eh = { style: h, timeout: u = "auto", // eslint-disable-next-line react/prop-types - TransitionComponent: b = zs - } = t, x = he(t, kh), O = yr(), w = N.useRef(), k = Hr(), y = N.useRef(null), T = We(y, a.ref, r), S = (U) => (B) => { + TransitionComponent: b = Us + } = t, x = he(t, Ch), O = yr(), w = N.useRef(), k = Gr(), y = N.useRef(null), T = We(y, a.ref, r), S = (U) => (B) => { if (U) { const L = y.current; B === void 0 ? U(L) : U(L, B); } }, M = S(m), j = S((U, B) => { - Us(U); + Hs(U); const { duration: L, delay: Z, easing: Q - } = gn({ + } = bn({ style: h, timeout: u, easing: i @@ -7556,7 +7557,7 @@ const Eh = { duration: B, delay: L, easing: Z - } = gn({ + } = bn({ style: h, timeout: u, easing: i @@ -7593,7 +7594,7 @@ const Eh = { opacity: 0, transform: yo(0.75), visibility: U === "exited" && !l ? "hidden" : void 0 - }, Eh[U], h, a.props.style), + }, Oh[U], h, a.props.style), ref: T }, B)) })); @@ -7618,7 +7619,7 @@ process.env.NODE_ENV !== "production" && (Jo.propTypes = { /** * A single child content element. */ - children: Br.isRequired, + children: Lr.isRequired, /** * The transition timing function. * You may specify a single easing or a object containing enter and exit values. @@ -7673,16 +7674,16 @@ process.env.NODE_ENV !== "production" && (Jo.propTypes = { })]) }); Jo.muiSupportAuto = !0; -const wo = Jo, Nh = (e) => { +const wo = Jo, Rh = (e) => { let t; return e < 1 ? t = 5.11916 * e ** 2 : t = 4.5 * Math.log(e + 1) + 2, (t / 100).toFixed(2); -}, fi = Nh, Th = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"], Sh = Re(Fs, { +}, fi = Rh, Ph = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"], $h = Re(Vs, { name: "MuiPopper", slot: "Root", overridesResolver: (e, t) => t.root -})({}), Hs = /* @__PURE__ */ N.forwardRef(function(t, r) { +})({}), Gs = /* @__PURE__ */ N.forwardRef(function(t, r) { var n; - const o = xs(), a = ut({ + const o = ks(), a = ut({ props: t, name: "MuiPopper" }), { @@ -7701,7 +7702,7 @@ const wo = Jo, Nh = (e) => { transition: O, slots: w, slotProps: k - } = a, y = he(a, Th), T = (n = w == null ? void 0 : w.root) != null ? n : c == null ? void 0 : c.Root, S = P({ + } = a, y = he(a, Ph), T = (n = w == null ? void 0 : w.root) != null ? n : c == null ? void 0 : c.Root, S = P({ anchorEl: i, container: m, disablePortal: v, @@ -7713,7 +7714,7 @@ const wo = Jo, Nh = (e) => { popperRef: x, transition: O }, y); - return /* @__PURE__ */ d(Sh, P({ + return /* @__PURE__ */ d($h, P({ as: l, direction: o == null ? void 0 : o.direction, slots: { @@ -7724,7 +7725,7 @@ const wo = Jo, Nh = (e) => { ref: r })); }); -process.env.NODE_ENV !== "production" && (Hs.propTypes = { +process.env.NODE_ENV !== "production" && (Gs.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │ @@ -7851,15 +7852,15 @@ process.env.NODE_ENV !== "production" && (Hs.propTypes = { */ transition: s.bool }); -const Gs = Hs; -function Ch(e) { +const Ws = Gs; +function _h(e) { return rt("MuiTooltip", e); } -const Oh = xt("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]), vt = Oh, Rh = ["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 Ph(e) { +const Ih = xt("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]), vt = Ih, Mh = ["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 Ah(e) { return Math.round(e * 1e5) / 1e5; } -const $h = (e) => { +const Dh = (e) => { const { classes: t, disableInteractive: r, @@ -7871,8 +7872,8 @@ const $h = (e) => { tooltip: ["tooltip", n && "tooltipArrow", o && "touch", `tooltipPlacement${et(a.split("-")[0])}`], arrow: ["arrow"] }; - return dt(i, Ch, t); -}, _h = Re(Gs, { + return dt(i, _h, t); +}, jh = Re(Ws, { name: "MuiTooltip", slot: "Popper", overridesResolver: (e, t) => { @@ -7933,7 +7934,7 @@ const $h = (e) => { transformOrigin: "0 0" } }) -})), Ih = Re("div", { +})), Bh = Re("div", { name: "MuiTooltip", slot: "Tooltip", overridesResolver: (e, t) => { @@ -7946,7 +7947,7 @@ const $h = (e) => { theme: e, ownerState: t }) => P({ - backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : un(e.palette.grey[700], 0.92), + backgroundColor: e.vars ? e.vars.palette.Tooltip.bg : fn(e.palette.grey[700], 0.92), borderRadius: (e.vars || e).shape.borderRadius, color: (e.vars || e).palette.common.white, fontFamily: e.typography.fontFamily, @@ -7962,7 +7963,7 @@ const $h = (e) => { }, t.touch && { padding: "8px 16px", fontSize: e.typography.pxToRem(14), - lineHeight: `${Ph(16 / 14)}em`, + lineHeight: `${Ah(16 / 14)}em`, fontWeight: e.typography.fontWeightRegular }, { [`.${vt.popper}[data-popper-placement*="left"] &`]: P({ @@ -7999,7 +8000,7 @@ const $h = (e) => { }, t.touch && { marginTop: "24px" }) -})), Mh = Re("span", { +})), Lh = Re("span", { name: "MuiTooltip", slot: "Arrow", overridesResolver: (e, t) => t.arrow @@ -8011,7 +8012,7 @@ const $h = (e) => { width: "1em", height: "0.71em", boxSizing: "border-box", - color: e.vars ? e.vars.palette.Tooltip.bg : un(e.palette.grey[700], 0.9), + color: e.vars ? e.vars.palette.Tooltip.bg : fn(e.palette.grey[700], 0.9), "&::before": { content: '""', margin: "auto", @@ -8022,18 +8023,18 @@ const $h = (e) => { transform: "rotate(45deg)" } })); -let Qr = !1; -const mi = new Lr(); +let en = !1; +const mi = new Fr(); let hr = { x: 0, y: 0 }; -function en(e, t) { +function tn(e, t) { return (r) => { t && t(r), e(r); }; } -const Ws = /* @__PURE__ */ N.forwardRef(function(t, r) { +const Xs = /* @__PURE__ */ N.forwardRef(function(t, r) { var n, o, a, i, l, c, f, m, v, g, p, h, u, b, x, O, w, k, y; const T = ut({ props: t, @@ -8064,17 +8065,17 @@ const Ws = /* @__PURE__ */ N.forwardRef(function(t, r) { slotProps: ee = {}, slots: te = {}, title: ie, - TransitionComponent: F = wo, + TransitionComponent: V = wo, TransitionProps: re - } = T, D = he(T, Rh), se = /* @__PURE__ */ N.isValidElement(M) ? M : /* @__PURE__ */ d("span", { + } = T, D = he(T, Mh), se = /* @__PURE__ */ N.isValidElement(M) ? M : /* @__PURE__ */ d("span", { children: M - }), Ne = Hr(), Pe = Ne.direction === "rtl", [ke, Nt] = N.useState(), [$e, nt] = N.useState(null), je = N.useRef(!1), ot = I || Q, Te = yr(), Ft = yr(), Tt = yr(), ir = yr(), [Wr, ta] = cs({ + }), Ne = Gr(), Pe = Ne.direction === "rtl", [ke, Nt] = N.useState(), [$e, nt] = N.useState(null), je = N.useRef(!1), ot = I || Q, Te = yr(), Ft = yr(), Tt = yr(), ir = yr(), [Xr, ta] = ps({ controlled: X, default: !1, name: "Tooltip", state: "open" }); - let at = Wr; + let at = Xr; if (process.env.NODE_ENV !== "production") { const { current: ne @@ -8084,66 +8085,66 @@ const Ws = /* @__PURE__ */ N.forwardRef(function(t, r) { `)); }, [ie, ke, ne]); } - const jn = ls(C), sr = N.useRef(), Xr = _r(() => { + const jn = cs(C), sr = N.useRef(), Yr = _r(() => { sr.current !== void 0 && (document.body.style.WebkitUserSelect = sr.current, sr.current = void 0), ir.clear(); }); - N.useEffect(() => Xr, [Xr]); + N.useEffect(() => Yr, [Yr]); const ra = (ne) => { - mi.clear(), Qr = !0, ta(!0), G && !at && G(ne); - }, Yr = _r( + mi.clear(), en = !0, ta(!0), G && !at && G(ne); + }, qr = _r( /** * @param {React.SyntheticEvent | Event} event */ (ne) => { mi.start(800 + A, () => { - Qr = !1; + en = !1; }), ta(!1), J && at && J(ne), Te.start(Ne.transitions.duration.shortest, () => { je.current = !1; }); } ), Bn = (ne) => { - je.current && ne.type !== "touchstart" || (ke && ke.removeAttribute("title"), Ft.clear(), Tt.clear(), B || Qr && L ? Ft.start(Qr ? L : B, () => { + je.current && ne.type !== "touchstart" || (ke && ke.removeAttribute("title"), Ft.clear(), Tt.clear(), B || en && L ? Ft.start(en ? L : B, () => { ra(ne); }) : ra(ne)); }, na = (ne) => { Ft.clear(), Tt.start(A, () => { - Yr(ne); + qr(ne); }); }, { isFocusVisibleRef: oa, - onBlur: Cl, - onFocus: Ol, - ref: Rl - } = ps(), [, aa] = N.useState(!1), ia = (ne) => { - Cl(ne), oa.current === !1 && (aa(!1), na(ne)); + onBlur: _l, + onFocus: Il, + ref: Ml + } = ds(), [, aa] = N.useState(!1), ia = (ne) => { + _l(ne), oa.current === !1 && (aa(!1), na(ne)); }, sa = (ne) => { - ke || Nt(ne.currentTarget), Ol(ne), oa.current === !0 && (aa(!0), Bn(ne)); + ke || Nt(ne.currentTarget), Il(ne), oa.current === !0 && (aa(!0), Bn(ne)); }, la = (ne) => { je.current = !0; const Be = se.props; Be.onTouchStart && Be.onTouchStart(ne); - }, ca = Bn, pa = na, Pl = (ne) => { - la(ne), Tt.clear(), Te.clear(), Xr(), sr.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", ir.start(Z, () => { + }, ca = Bn, pa = na, Al = (ne) => { + la(ne), Tt.clear(), Te.clear(), Yr(), sr.current = document.body.style.WebkitUserSelect, document.body.style.WebkitUserSelect = "none", ir.start(Z, () => { document.body.style.WebkitUserSelect = sr.current, Bn(ne); }); - }, $l = (ne) => { - se.props.onTouchEnd && se.props.onTouchEnd(ne), Xr(), Tt.start(H, () => { - Yr(ne); + }, Dl = (ne) => { + se.props.onTouchEnd && se.props.onTouchEnd(ne), Yr(), Tt.start(H, () => { + qr(ne); }); }; N.useEffect(() => { if (!at) return; function ne(Be) { - (Be.key === "Escape" || Be.key === "Esc") && Yr(Be); + (Be.key === "Escape" || Be.key === "Esc") && qr(Be); } return document.addEventListener("keydown", ne), () => { document.removeEventListener("keydown", ne); }; - }, [Yr, at]); - const _l = We(se.ref, Rl, Nt, r); + }, [qr, at]); + const jl = We(se.ref, Ml, Nt, r); !ie && ie !== 0 && (at = !1); - const Ln = N.useRef(), Il = (ne) => { + const Ln = N.useRef(), Bl = (ne) => { const Be = se.props; Be.onMouseMove && Be.onMouseMove(ne), hr = { x: ne.clientX, @@ -8154,18 +8155,18 @@ const Ws = /* @__PURE__ */ N.forwardRef(function(t, r) { const ze = P({}, lr, D, se.props, { className: Ce(D.className, se.props.className), onTouchStart: la, - ref: _l + ref: jl }, Q ? { - onMouseMove: Il + onMouseMove: Bl } : {}); process.env.NODE_ENV !== "production" && (ze["data-mui-internal-clone-element"] = !0, N.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(` `)); }, [ke])); const cr = {}; - U || (ze.onTouchStart = Pl, ze.onTouchEnd = $l), R || (ze.onMouseOver = en(ca, ze.onMouseOver), ze.onMouseLeave = en(pa, ze.onMouseLeave), ot || (cr.onMouseOver = ca, cr.onMouseLeave = pa)), E || (ze.onFocus = en(sa, ze.onFocus), ze.onBlur = en(ia, ze.onBlur), ot || (cr.onFocus = sa, cr.onBlur = ia)), process.env.NODE_ENV !== "production" && se.props.title && console.error(["MUI: You have provided a `title` prop to the child of .", `Remove this title prop \`${se.props.title}\` or the Tooltip component.`].join(` + U || (ze.onTouchStart = Al, ze.onTouchEnd = Dl), R || (ze.onMouseOver = tn(ca, ze.onMouseOver), ze.onMouseLeave = tn(pa, ze.onMouseLeave), ot || (cr.onMouseOver = ca, cr.onMouseLeave = pa)), E || (ze.onFocus = tn(sa, ze.onFocus), ze.onBlur = tn(ia, ze.onBlur), ot || (cr.onFocus = sa, cr.onBlur = ia)), process.env.NODE_ENV !== "production" && se.props.title && console.error(["MUI: You have provided a `title` prop to the child of .", `Remove this title prop \`${se.props.title}\` or the Tooltip component.`].join(` `)); - const Ml = N.useMemo(() => { + const Ll = N.useMemo(() => { var ne; let Be = [{ name: "arrow", @@ -8185,16 +8186,16 @@ const Ws = /* @__PURE__ */ N.forwardRef(function(t, r) { placement: q, PopperComponentProp: K, touch: je.current - }), Vn = $h(pr), da = (n = (o = te.popper) != null ? o : j.Popper) != null ? n : _h, ua = (a = (i = (l = te.transition) != null ? l : j.Transition) != null ? i : F) != null ? a : wo, fa = (c = (f = te.tooltip) != null ? f : j.Tooltip) != null ? c : Ih, ma = (m = (v = te.arrow) != null ? v : j.Arrow) != null ? m : Mh, Al = wr(da, P({}, Y, (g = ee.popper) != null ? g : z.popper, { + }), Vn = Dh(pr), da = (n = (o = te.popper) != null ? o : j.Popper) != null ? n : jh, ua = (a = (i = (l = te.transition) != null ? l : j.Transition) != null ? i : V) != null ? a : wo, fa = (c = (f = te.tooltip) != null ? f : j.Tooltip) != null ? c : Bh, ma = (m = (v = te.arrow) != null ? v : j.Arrow) != null ? m : Lh, Fl = wr(da, P({}, Y, (g = ee.popper) != null ? g : z.popper, { className: Ce(Vn.popper, Y == null ? void 0 : Y.className, (p = (h = ee.popper) != null ? h : z.popper) == null ? void 0 : p.className) - }), pr), Dl = wr(ua, P({}, re, (u = ee.transition) != null ? u : z.transition), pr), jl = wr(fa, P({}, (b = ee.tooltip) != null ? b : z.tooltip, { + }), pr), Vl = wr(ua, P({}, re, (u = ee.transition) != null ? u : z.transition), pr), zl = wr(fa, P({}, (b = ee.tooltip) != null ? b : z.tooltip, { className: Ce(Vn.tooltip, (x = (O = ee.tooltip) != null ? O : z.tooltip) == null ? void 0 : x.className) - }), pr), Bl = wr(ma, P({}, (w = ee.arrow) != null ? w : z.arrow, { + }), pr), Ul = wr(ma, P({}, (w = ee.arrow) != null ? w : z.arrow, { className: Ce(Vn.arrow, (k = (y = ee.arrow) != null ? y : z.arrow) == null ? void 0 : k.className) }), pr); return /* @__PURE__ */ _(N.Fragment, { children: [/* @__PURE__ */ N.cloneElement(se, ze), /* @__PURE__ */ d(da, P({ - as: K ?? Gs, + as: K ?? Ws, placement: q, anchorEl: Q ? { getBoundingClientRect: () => ({ @@ -8210,15 +8211,15 @@ const Ws = /* @__PURE__ */ N.forwardRef(function(t, r) { open: ke ? at : !1, id: jn, transition: !0 - }, cr, Al, { - popperOptions: Ml, + }, cr, Fl, { + popperOptions: Ll, children: ({ TransitionProps: ne }) => /* @__PURE__ */ d(ua, P({ timeout: Ne.transitions.duration.shorter - }, ne, Dl, { - children: /* @__PURE__ */ _(fa, P({}, jl, { - children: [ie, S ? /* @__PURE__ */ d(ma, P({}, Bl, { + }, ne, Vl, { + children: /* @__PURE__ */ _(fa, P({}, zl, { + children: [ie, S ? /* @__PURE__ */ d(ma, P({}, Ul, { ref: nt })) : null] })) @@ -8226,7 +8227,7 @@ const Ws = /* @__PURE__ */ N.forwardRef(function(t, r) { }))] }); }); -process.env.NODE_ENV !== "production" && (Ws.propTypes = { +process.env.NODE_ENV !== "production" && (Xs.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -8239,7 +8240,7 @@ process.env.NODE_ENV !== "production" && (Ws.propTypes = { /** * Tooltip reference element. */ - children: Br.isRequired, + children: Lr.isRequired, /** * Override or extend the styles applied to the component. */ @@ -8419,11 +8420,11 @@ process.env.NODE_ENV !== "production" && (Ws.propTypes = { */ TransitionProps: s.object }); -const Ah = Ws; +const Fh = Xs; function hi(e, t, r) { return e ? /* @__PURE__ */ d($i, { className: `papi-menu-icon-${r ? "leading" : "trailing"}`, children: /* @__PURE__ */ d("img", { src: e, alt: `${r ? "Leading" : "Trailing"} icon for ${t}` }) }) : void 0; } -function Xs(e) { +function Ys(e) { const { onClick: t, label: r, @@ -8442,7 +8443,7 @@ function Xs(e) { id: u, children: b } = e, x = /* @__PURE__ */ d( - Ec, + Oc, { sx: { lineHeight: 0.8 }, autoFocus: l, @@ -8456,23 +8457,23 @@ function Xs(e) { id: u, children: r ? /* @__PURE__ */ _(wt, { children: [ hi(a, r, !0), - /* @__PURE__ */ d(Nc, { primary: r, inset: !a && o }), - v ? /* @__PURE__ */ d($i, { className: "papi-menu-icon-trailing", children: /* @__PURE__ */ d(Ts, {}) }) : hi(i, r, !1) + /* @__PURE__ */ d(Rc, { primary: r, inset: !a && o }), + v ? /* @__PURE__ */ d($i, { className: "papi-menu-icon-trailing", children: /* @__PURE__ */ d(Ss, {}) }) : hi(i, r, !1) ] }) : b } ); - return n ? /* @__PURE__ */ d(Ah, { title: n, placement: "right", children: /* @__PURE__ */ d("div", { children: x }) }) : x; + return n ? /* @__PURE__ */ d(Fh, { title: n, placement: "right", children: /* @__PURE__ */ d("div", { children: x }) }) : x; } -function Ys(e) { +function qs(e) { return Object.entries(e.groups).map(([r, n]) => ({ id: r, group: n })); } -function Dh(e) { +function Vh(e) { const [t, r] = ce(void 0), { parentMenuItem: n, parentItemProps: o, menuDefinition: a } = e, i = (f) => { r(f.currentTarget); }, l = () => { r(void 0); }, c = () => { - let f = Ys(a).filter((m) => "menuItem" in m.group); + let f = qs(a).filter((m) => "menuItem" in m.group); if (!(n != null && n.id)) throw new Error("A valid parent menu item is required for submenus."); return f = f.filter( @@ -8480,9 +8481,9 @@ function Dh(e) { ), /* @__PURE__ */ d(Zo, { ...e, includedGroups: f }); }; return /* @__PURE__ */ _(wt, { children: [ - /* @__PURE__ */ d(Xs, { onClick: i, ...o, isSubMenuParent: !0 }), + /* @__PURE__ */ d(Ys, { onClick: i, ...o, isSubMenuParent: !0 }), /* @__PURE__ */ d( - Tc, + Pc, { anchorEl: t, open: !!t, @@ -8501,18 +8502,18 @@ function Dh(e) { ) ] }); } -const jh = (e, t) => t.filter((o) => o.group === e).sort((o, a) => (o.order || 0) - (a.order || 0)); +const zh = (e, t) => t.filter((o) => o.group === e).sort((o, a) => (o.order || 0) - (a.order || 0)); function Zo(e) { const { menuDefinition: t, onClick: r, commandHandler: n, includedGroups: o } = e, { items: a, allowForLeadingIcons: i } = Mt(() => { const m = 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. - Ys(t).filter((h) => !("menuItem" in h.group)) + qs(t).filter((h) => !("menuItem" in h.group)) ), v = Object.values(m).sort( (h, u) => (h.group.order || 0) - (u.group.order || 0) ), g = []; v.forEach((h) => { - jh(h.id, t.items).forEach( + zh(h.id, t.items).forEach( (u) => g.push({ item: u, isLastItemInGroup: !1 }) ), g.length > 0 && (g[g.length - 1].isLastItemInGroup = !0); }), g.length > 0 && (g[g.length - 1].isLastItemInGroup = !1); @@ -8538,7 +8539,7 @@ function Zo(e) { if ("command" in g) { const h = g.group + v; return /* @__PURE__ */ d( - Xs, + Ys, { onClick: (u) => { r == null || r(u), n(g); @@ -8549,7 +8550,7 @@ function Zo(e) { ); } return /* @__PURE__ */ d( - Dh, + Vh, { parentMenuItem: g, parentItemProps: p, @@ -8559,7 +8560,7 @@ function Zo(e) { ); }) }, f); } -function Bh(e) { +function Uh(e) { const { menuDefinition: t, columnId: r } = e; let a = Object.entries(t.groups).map(([i, l]) => ({ id: i, group: l })).filter((i) => "column" in i.group); return r && "columns" in t && // Without this type assertion, TS doesn't know what columns is. @@ -8568,7 +8569,7 @@ function Bh(e) { (i) => "column" in i.group && i.group.column === r )), /* @__PURE__ */ d(Zo, { ...e, includedGroups: a }); } -function Lh({ +function Hh({ commandHandler: e, menuDefinition: t, id: r, @@ -8587,8 +8588,8 @@ function Lh({ className: `papi-menu-column ${a ?? ""}`, children: [ /* @__PURE__ */ d("h3", { "aria-label": n.label, className: `papi-menu-column-header ${a ?? ""}`, children: n.label }), - /* @__PURE__ */ d(Sc, { id: r, dense: !0, className: a ?? "", children: /* @__PURE__ */ d( - Bh, + /* @__PURE__ */ d($c, { id: r, dense: !0, className: a ?? "", children: /* @__PURE__ */ d( + Uh, { commandHandler: e, menuDefinition: t, @@ -8600,7 +8601,7 @@ function Lh({ } ); } -function Fh({ +function Gh({ commandHandler: e, className: t, multiColumnMenu: r, @@ -8628,7 +8629,7 @@ function Fh({ "aria-label": "GridMenu", id: n, children: a.map((i, l) => /* @__PURE__ */ d( - Lh, + Hh, { commandHandler: e, menuDefinition: r, @@ -8640,14 +8641,14 @@ function Fh({ } ); } -const qs = /* @__PURE__ */ N.createContext({}); -process.env.NODE_ENV !== "production" && (qs.displayName = "ListContext"); -const Vh = qs; -function zh(e) { +const Ks = /* @__PURE__ */ N.createContext({}); +process.env.NODE_ENV !== "production" && (Ks.displayName = "ListContext"); +const Wh = Ks; +function Xh(e) { return rt("MuiList", e); } xt("MuiList", ["root", "padding", "dense", "subheader"]); -const Uh = ["children", "className", "component", "dense", "disablePadding", "subheader"], Hh = (e) => { +const Yh = ["children", "className", "component", "dense", "disablePadding", "subheader"], qh = (e) => { const { classes: t, disablePadding: r, @@ -8656,8 +8657,8 @@ const Uh = ["children", "className", "component", "dense", "disablePadding", "su } = e; return dt({ root: ["root", !r && "padding", n && "dense", o && "subheader"] - }, zh, t); -}, Gh = Re("ul", { + }, Xh, t); +}, Kh = Re("ul", { name: "MuiList", slot: "Root", overridesResolver: (e, t) => { @@ -8678,7 +8679,7 @@ const Uh = ["children", "className", "component", "dense", "disablePadding", "su paddingBottom: 8 }, e.subheader && { paddingTop: 0 -})), Ks = /* @__PURE__ */ N.forwardRef(function(t, r) { +})), Js = /* @__PURE__ */ N.forwardRef(function(t, r) { const n = ut({ props: t, name: "MuiList" @@ -8689,16 +8690,16 @@ const Uh = ["children", "className", "component", "dense", "disablePadding", "su dense: l = !1, disablePadding: c = !1, subheader: f - } = n, m = he(n, Uh), v = N.useMemo(() => ({ + } = n, m = he(n, Yh), v = N.useMemo(() => ({ dense: l }), [l]), g = P({}, n, { component: i, dense: l, disablePadding: c - }), p = Hh(g); - return /* @__PURE__ */ d(Vh.Provider, { + }), p = qh(g); + return /* @__PURE__ */ d(Wh.Provider, { value: v, - children: /* @__PURE__ */ _(Gh, P({ + children: /* @__PURE__ */ _(Kh, P({ as: i, className: Ce(p.root, a), ref: r, @@ -8708,7 +8709,7 @@ const Uh = ["children", "className", "component", "dense", "disablePadding", "su })) }); }); -process.env.NODE_ENV !== "production" && (Ks.propTypes = { +process.env.NODE_ENV !== "production" && (Js.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -8751,14 +8752,14 @@ process.env.NODE_ENV !== "production" && (Ks.propTypes = { */ sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object]) }); -const Wh = Ks, Xh = ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"]; +const Jh = Js, Zh = ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"]; function to(e, t, r) { return e === t ? e.firstChild : t && t.nextElementSibling ? t.nextElementSibling : r ? null : e.firstChild; } function gi(e, t, r) { return e === t ? r ? e.firstChild : e.lastChild : t && t.previousElementSibling ? t.previousElementSibling : r ? null : e.lastChild; } -function Js(e, t) { +function Zs(e, t) { if (t === void 0) return !0; let r = e.innerText; @@ -8773,14 +8774,14 @@ function gr(e, t, r, n, o, a) { i = !0; } const c = n ? !1 : l.disabled || l.getAttribute("aria-disabled") === "true"; - if (!l.hasAttribute("tabindex") || !Js(l, a) || c) + if (!l.hasAttribute("tabindex") || !Zs(l, a) || c) l = o(e, l, r); else return l.focus(), !0; } return !1; } -const Zs = /* @__PURE__ */ N.forwardRef(function(t, r) { +const Qs = /* @__PURE__ */ N.forwardRef(function(t, r) { const { // private // eslint-disable-next-line react/prop-types @@ -8793,7 +8794,7 @@ const Zs = /* @__PURE__ */ N.forwardRef(function(t, r) { disableListWrap: f = !1, onKeyDown: m, variant: v = "selectedMenu" - } = t, g = he(t, Xh), p = N.useRef(null), h = N.useRef({ + } = t, g = he(t, Zh), p = N.useRef(null), h = N.useRef({ keys: [], repeating: !0, previousKeyMatched: !0, @@ -8805,7 +8806,7 @@ const Zs = /* @__PURE__ */ N.forwardRef(function(t, r) { adjustStyleForScrollbar: (w, k) => { const y = !p.current.style.width; if (w.clientHeight < p.current.clientHeight && y) { - const T = `${ds(Oe(w))}px`; + const T = `${us(Oe(w))}px`; p.current.style[k.direction === "rtl" ? "paddingLeft" : "paddingRight"] = T, p.current.style.width = `calc(100% + ${T})`; } return p.current; @@ -8824,7 +8825,7 @@ const Zs = /* @__PURE__ */ N.forwardRef(function(t, r) { else if (y.length === 1) { const S = h.current, M = y.toLowerCase(), j = performance.now(); S.keys.length > 0 && (j - S.lastTime > 500 ? (S.keys = [], S.repeating = !0, S.previousKeyMatched = !0) : S.repeating && M !== S.keys[0] && (S.repeating = !1)), S.lastTime = j, S.keys.push(M); - const z = T && !S.repeating && Js(T, S); + const z = T && !S.repeating && Zs(T, S); S.previousKeyMatched && (z || gr(k, T, !1, c, to, S)) ? w.preventDefault() : S.previousKeyMatched = !1; } m && m(w); @@ -8835,7 +8836,7 @@ const Zs = /* @__PURE__ */ N.forwardRef(function(t, r) { x === k && (x += 1, x >= i.length && (x = -1)); return; } - process.env.NODE_ENV !== "production" && cn.isFragment(w) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(` + process.env.NODE_ENV !== "production" && pn.isFragment(w) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(` `)), w.props.disabled || (v === "selectedMenu" && w.props.selected || x === -1) && (x = k), x === k && (w.props.disabled || w.props.muiSkipListHighlight || w.type.muiSkipListHighlight) && (x += 1, x >= i.length && (x = -1)); }); const O = N.Children.map(i, (w, k) => { @@ -8845,7 +8846,7 @@ const Zs = /* @__PURE__ */ N.forwardRef(function(t, r) { } return w; }); - return /* @__PURE__ */ d(Wh, P({ + return /* @__PURE__ */ d(Jh, P({ role: "menu", ref: b, className: l, @@ -8855,7 +8856,7 @@ const Zs = /* @__PURE__ */ N.forwardRef(function(t, r) { children: O })); }); -process.env.NODE_ENV !== "production" && (Zs.propTypes = { +process.env.NODE_ENV !== "production" && (Qs.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -8900,15 +8901,15 @@ process.env.NODE_ENV !== "production" && (Zs.propTypes = { */ variant: s.oneOf(["menu", "selectedMenu"]) }); -const Yh = Zs, qh = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"], Kh = { +const Qh = Qs, eg = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"], tg = { entering: { opacity: 1 }, entered: { opacity: 1 } -}, Qs = /* @__PURE__ */ N.forwardRef(function(t, r) { - const n = Hr(), o = { +}, el = /* @__PURE__ */ N.forwardRef(function(t, r) { + const n = Gr(), o = { enter: n.transitions.duration.enteringScreen, exit: n.transitions.duration.leavingScreen }, { @@ -8926,15 +8927,15 @@ const Yh = Zs, qh = ["addEndListener", "appear", "children", "easing", "in", "on style: b, timeout: x = o, // eslint-disable-next-line react/prop-types - TransitionComponent: O = zs - } = t, w = he(t, qh), k = N.useRef(null), y = We(k, l.ref, r), T = (I) => (U) => { + TransitionComponent: O = Us + } = t, w = he(t, eg), k = N.useRef(null), y = We(k, l.ref, r), T = (I) => (U) => { if (I) { const B = k.current; U === void 0 ? I(B) : I(B, U); } }, S = T(g), M = T((I, U) => { - Us(I); - const B = gn({ + Hs(I); + const B = bn({ style: b, timeout: x, easing: c @@ -8943,7 +8944,7 @@ const Yh = Zs, qh = ["addEndListener", "appear", "children", "easing", "in", "on }); I.style.webkitTransition = n.transitions.create("opacity", B), I.style.transition = n.transitions.create("opacity", B), m && m(I, U); }), j = T(v), z = T(u), $ = T((I) => { - const U = gn({ + const U = bn({ style: b, timeout: x, easing: c @@ -8971,12 +8972,12 @@ const Yh = Zs, qh = ["addEndListener", "appear", "children", "easing", "in", "on style: P({ opacity: 0, visibility: I === "exited" && !f ? "hidden" : void 0 - }, Kh[I], b, l.props.style), + }, tg[I], b, l.props.style), ref: y }, U)) })); }); -process.env.NODE_ENV !== "production" && (Qs.propTypes = { +process.env.NODE_ENV !== "production" && (el.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -8996,7 +8997,7 @@ process.env.NODE_ENV !== "production" && (Qs.propTypes = { /** * A single child content element. */ - children: Br.isRequired, + children: Lr.isRequired, /** * The transition timing function. * You may specify a single easing or a object containing enter and exit values. @@ -9051,20 +9052,20 @@ process.env.NODE_ENV !== "production" && (Qs.propTypes = { exit: s.number })]) }); -const Jh = Qs; -function Zh(e) { +const rg = el; +function ng(e) { return rt("MuiBackdrop", e); } xt("MuiBackdrop", ["root", "invisible"]); -const Qh = ["children", "className", "component", "components", "componentsProps", "invisible", "open", "slotProps", "slots", "TransitionComponent", "transitionDuration"], eg = (e) => { +const og = ["children", "className", "component", "components", "componentsProps", "invisible", "open", "slotProps", "slots", "TransitionComponent", "transitionDuration"], ag = (e) => { const { classes: t, invisible: r } = e; return dt({ root: ["root", r && "invisible"] - }, Zh, t); -}, tg = Re("div", { + }, ng, t); +}, ig = Re("div", { name: "MuiBackdrop", slot: "Root", overridesResolver: (e, t) => { @@ -9088,7 +9089,7 @@ const Qh = ["children", "className", "component", "components", "componentsProps WebkitTapHighlightColor: "transparent" }, e.invisible && { backgroundColor: "transparent" -})), el = /* @__PURE__ */ N.forwardRef(function(t, r) { +})), tl = /* @__PURE__ */ N.forwardRef(function(t, r) { var n, o, a; const i = ut({ props: t, @@ -9103,17 +9104,17 @@ const Qh = ["children", "className", "component", "components", "componentsProps open: p, slotProps: h = {}, slots: u = {}, - TransitionComponent: b = Jh, + TransitionComponent: b = rg, transitionDuration: x - } = i, O = he(i, Qh), w = P({}, i, { + } = i, O = he(i, og), w = P({}, i, { component: f, invisible: g - }), k = eg(w), y = (n = h.root) != null ? n : v.root; + }), k = ag(w), y = (n = h.root) != null ? n : v.root; return /* @__PURE__ */ d(b, P({ in: p, timeout: x }, O, { - children: /* @__PURE__ */ d(tg, P({ + children: /* @__PURE__ */ d(ig, P({ "aria-hidden": !0 }, y, { as: (o = (a = u.root) != null ? a : m.Root) != null ? o : f, @@ -9125,7 +9126,7 @@ const Qh = ["children", "className", "component", "components", "componentsProps })) })); }); -process.env.NODE_ENV !== "production" && (el.propTypes = { +process.env.NODE_ENV !== "production" && (tl.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -9221,12 +9222,12 @@ process.env.NODE_ENV !== "production" && (el.propTypes = { exit: s.number })]) }); -const rg = el; -function ng(e) { +const sg = tl; +function lg(e) { return rt("MuiModal", e); } xt("MuiModal", ["root", "hidden", "backdrop"]); -const og = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"], ag = (e) => { +const cg = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"], pg = (e) => { const { open: t, exited: r, @@ -9235,8 +9236,8 @@ const og = ["BackdropComponent", "BackdropProps", "classes", "className", "close return dt({ root: ["root", !t && r && "hidden"], backdrop: ["backdrop"] - }, ng, n); -}, ig = Re("div", { + }, lg, n); +}, dg = Re("div", { name: "MuiModal", slot: "Root", overridesResolver: (e, t) => { @@ -9257,19 +9258,19 @@ const og = ["BackdropComponent", "BackdropProps", "classes", "className", "close left: 0 }, !t.open && t.exited && { visibility: "hidden" -})), sg = Re(rg, { +})), ug = Re(sg, { name: "MuiModal", slot: "Backdrop", overridesResolver: (e, t) => t.backdrop })({ zIndex: -1 -}), tl = /* @__PURE__ */ N.forwardRef(function(t, r) { +}), rl = /* @__PURE__ */ N.forwardRef(function(t, r) { var n, o, a, i, l, c; const f = ut({ name: "MuiModal", props: t }), { - BackdropComponent: m = sg, + BackdropComponent: m = ug, BackdropProps: v, className: g, closeAfterTransition: p = !1, @@ -9291,7 +9292,7 @@ const og = ["BackdropComponent", "BackdropProps", "classes", "className", "close slotProps: R, slots: I // eslint-disable-next-line react/prop-types - } = f, U = he(f, og), B = P({}, f, { + } = f, U = he(f, cg), B = P({}, f, { closeAfterTransition: p, disableAutoFocus: w, disableEnforceFocus: k, @@ -9309,11 +9310,11 @@ const og = ["BackdropComponent", "BackdropProps", "classes", "className", "close isTopModal: A, exited: H, hasTransition: J - } = om(P({}, B, { + } = cm(P({}, B, { rootRef: r })), G = P({}, B, { exited: H - }), X = ag(G), q = {}; + }), X = pg(G), q = {}; if (h.props.tabIndex === void 0 && (q.tabIndex = "-1"), J) { const { onEnter: re, @@ -9321,7 +9322,7 @@ const og = ["BackdropComponent", "BackdropProps", "classes", "className", "close } = Q(); q.onEnter = re, q.onExited = D; } - const K = (n = (o = I == null ? void 0 : I.root) != null ? o : x.Root) != null ? n : ig, Y = (a = (i = I == null ? void 0 : I.backdrop) != null ? i : x.Backdrop) != null ? a : m, ee = (l = R == null ? void 0 : R.root) != null ? l : O.root, te = (c = R == null ? void 0 : R.backdrop) != null ? c : O.backdrop, ie = Bt({ + const K = (n = (o = I == null ? void 0 : I.root) != null ? o : x.Root) != null ? n : dg, Y = (a = (i = I == null ? void 0 : I.backdrop) != null ? i : x.Backdrop) != null ? a : m, ee = (l = R == null ? void 0 : R.root) != null ? l : O.root, te = (c = R == null ? void 0 : R.backdrop) != null ? c : O.backdrop, ie = Bt({ elementType: K, externalSlotProps: ee, externalForwardedProps: U, @@ -9332,7 +9333,7 @@ const og = ["BackdropComponent", "BackdropProps", "classes", "className", "close }, ownerState: G, className: Ce(g, ee == null ? void 0 : ee.className, X == null ? void 0 : X.root, !G.open && G.exited && (X == null ? void 0 : X.hidden)) - }), F = Bt({ + }), V = Bt({ elementType: Y, externalSlotProps: te, additionalProps: v, @@ -9349,7 +9350,7 @@ const og = ["BackdropComponent", "BackdropProps", "classes", "className", "close container: u, disablePortal: T, children: /* @__PURE__ */ _(K, P({}, ie, { - children: [!j && m ? /* @__PURE__ */ d(Y, P({}, F)) : null, /* @__PURE__ */ d(fn, { + children: [!j && m ? /* @__PURE__ */ d(Y, P({}, V)) : null, /* @__PURE__ */ d(mn, { disableEnforceFocus: k, disableAutoFocus: w, disableRestoreFocus: S, @@ -9360,7 +9361,7 @@ const og = ["BackdropComponent", "BackdropProps", "classes", "className", "close })) }); }); -process.env.NODE_ENV !== "production" && (tl.propTypes = { +process.env.NODE_ENV !== "production" && (rl.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -9388,7 +9389,7 @@ process.env.NODE_ENV !== "production" && (tl.propTypes = { /** * A single child content element. */ - children: Br.isRequired, + children: Lr.isRequired, /** * Override or extend the styles applied to the component. */ @@ -9541,12 +9542,12 @@ process.env.NODE_ENV !== "production" && (tl.propTypes = { */ sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object]) }); -const lg = tl; -function cg(e) { +const fg = rl; +function mg(e) { return rt("MuiPaper", e); } xt("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]); -const pg = ["className", "component", "elevation", "square", "variant"], dg = (e) => { +const hg = ["className", "component", "elevation", "square", "variant"], gg = (e) => { const { square: t, elevation: r, @@ -9555,8 +9556,8 @@ const pg = ["className", "component", "elevation", "square", "variant"], dg = (e } = e, a = { root: ["root", n, !t && "rounded", n === "elevation" && `elevation${r}`] }; - return dt(a, cg, o); -}, ug = Re("div", { + return dt(a, mg, o); +}, bg = Re("div", { name: "MuiPaper", slot: "Root", overridesResolver: (e, t) => { @@ -9581,11 +9582,11 @@ const pg = ["className", "component", "elevation", "square", "variant"], dg = (e }, t.variant === "elevation" && P({ boxShadow: (e.vars || e).shadows[t.elevation] }, !e.vars && e.palette.mode === "dark" && { - backgroundImage: `linear-gradient(${un("#fff", fi(t.elevation))}, ${un("#fff", fi(t.elevation))})` + backgroundImage: `linear-gradient(${fn("#fff", fi(t.elevation))}, ${fn("#fff", fi(t.elevation))})` }, e.vars && { backgroundImage: (r = e.vars.overlays) == null ? void 0 : r[t.elevation] })); -}), rl = /* @__PURE__ */ N.forwardRef(function(t, r) { +}), nl = /* @__PURE__ */ N.forwardRef(function(t, r) { const n = ut({ props: t, name: "MuiPaper" @@ -9595,21 +9596,21 @@ const pg = ["className", "component", "elevation", "square", "variant"], dg = (e elevation: i = 1, square: l = !1, variant: c = "elevation" - } = n, f = he(n, pg), m = P({}, n, { + } = n, f = he(n, hg), m = P({}, n, { component: a, elevation: i, square: l, variant: c - }), v = dg(m); - return process.env.NODE_ENV !== "production" && Hr().shadows[i] === void 0 && console.error([`MUI: The elevation provided is not available in the theme.`, `Please make sure that \`theme.shadows[${i}]\` is defined.`].join(` -`)), /* @__PURE__ */ d(ug, P({ + }), v = gg(m); + return process.env.NODE_ENV !== "production" && Gr().shadows[i] === void 0 && console.error([`MUI: The elevation provided is not available in the theme.`, `Please make sure that \`theme.shadows[${i}]\` is defined.`].join(` +`)), /* @__PURE__ */ d(bg, P({ as: a, ownerState: m, className: Ce(v.root, o), ref: r }, f)); }); -process.env.NODE_ENV !== "production" && (rl.propTypes = { +process.env.NODE_ENV !== "production" && (nl.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -9636,7 +9637,7 @@ process.env.NODE_ENV !== "production" && (rl.propTypes = { * It accepts values between 0 and 24 inclusive. * @default 1 */ - elevation: ar(ms, (e) => { + elevation: ar(hs, (e) => { const { elevation: t, variant: r @@ -9658,12 +9659,12 @@ process.env.NODE_ENV !== "production" && (rl.propTypes = { */ variant: s.oneOfType([s.oneOf(["elevation", "outlined"]), s.string]) }); -const fg = rl; -function mg(e) { +const vg = nl; +function yg(e) { return rt("MuiPopover", e); } xt("MuiPopover", ["root", "paper"]); -const hg = ["onEntering"], gg = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"], bg = ["slotProps"]; +const wg = ["onEntering"], xg = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"], kg = ["slotProps"]; function bi(e, t) { let r = 0; return typeof t == "number" ? r = t : t === "center" ? r = e.height / 2 : t === "bottom" && (r = e.height), r; @@ -9675,22 +9676,22 @@ function vi(e, t) { function yi(e) { return [e.horizontal, e.vertical].map((t) => typeof t == "number" ? `${t}px` : t).join(" "); } -function on(e) { +function an(e) { return typeof e == "function" ? e() : e; } -const vg = (e) => { +const Eg = (e) => { const { classes: t } = e; return dt({ root: ["root"], paper: ["paper"] - }, mg, t); -}, yg = Re(lg, { + }, yg, t); +}, Ng = Re(fg, { name: "MuiPopover", slot: "Root", overridesResolver: (e, t) => t.root -})({}), nl = Re(fg, { +})({}), ol = Re(vg, { name: "MuiPopover", slot: "Paper", overridesResolver: (e, t) => t.paper @@ -9706,7 +9707,7 @@ const vg = (e) => { maxHeight: "calc(100% - 32px)", // We disable the focus ring for mouse, touch and keyboard users. outline: 0 -}), ol = /* @__PURE__ */ N.forwardRef(function(t, r) { +}), al = /* @__PURE__ */ N.forwardRef(function(t, r) { var n, o, a; const i = ut({ props: t, @@ -9739,7 +9740,7 @@ const vg = (e) => { onEntering: M } = {}, disableScrollLock: j = !1 - } = i, z = he(i.TransitionProps, hg), $ = he(i, gg), E = (n = k == null ? void 0 : k.paper) != null ? n : O, R = N.useRef(), I = We(R, E.ref), U = P({}, i, { + } = i, z = he(i.TransitionProps, wg), $ = he(i, xg), E = (n = k == null ? void 0 : k.paper) != null ? n : O, R = N.useRef(), I = We(R, E.ref), U = P({}, i, { anchorOrigin: f, anchorReference: v, elevation: u, @@ -9749,10 +9750,10 @@ const vg = (e) => { TransitionComponent: T, transitionDuration: S, TransitionProps: z - }), B = vg(U), L = N.useCallback(() => { + }), B = Eg(U), L = N.useCallback(() => { if (v === "anchorPosition") return process.env.NODE_ENV !== "production" && (m || console.error('MUI: You need to provide a `anchorPosition` prop when using .')), m; - const re = on(c), D = re && re.nodeType === 1 ? re : Oe(R.current).body, se = D.getBoundingClientRect(); + const re = an(c), D = re && re.nodeType === 1 ? re : Oe(R.current).body, se = D.getBoundingClientRect(); if (process.env.NODE_ENV !== "production") { const Ne = D.getBoundingClientRect(); process.env.NODE_ENV !== "test" && Ne.top === 0 && Ne.left === 0 && Ne.right === 0 && Ne.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(` @@ -9778,7 +9779,7 @@ const vg = (e) => { }; const Ne = L(); let Pe = Ne.top - se.vertical, ke = Ne.left - se.horizontal; - const Nt = Pe + D.height, $e = ke + D.width, nt = Qt(on(c)), je = nt.innerHeight - b, ot = nt.innerWidth - b; + const Nt = Pe + D.height, $e = ke + D.width, nt = Qt(an(c)), je = nt.innerHeight - b, ot = nt.innerWidth - b; if (b !== null && Pe < b) { const Te = Pe - b; Pe -= Te, se.vertical += Te; @@ -9821,7 +9822,7 @@ const vg = (e) => { } : null, [x, H]), N.useEffect(() => { if (!x) return; - const re = ss(() => { + const re = ls(() => { H(); }), D = Qt(c); return D.addEventListener("resize", re), () => { @@ -9830,7 +9831,7 @@ const vg = (e) => { }, [c, x, H]); let X = S; S === "auto" && !T.muiSupportAuto && (X = void 0); - const q = h || (c ? Oe(on(c)).body : void 0), K = (o = w == null ? void 0 : w.root) != null ? o : yg, Y = (a = w == null ? void 0 : w.paper) != null ? a : nl, ee = Bt({ + const q = h || (c ? Oe(an(c)).body : void 0), K = (o = w == null ? void 0 : w.root) != null ? o : Ng, Y = (a = w == null ? void 0 : w.paper) != null ? a : ol, ee = Bt({ elementType: Y, externalSlotProps: P({}, E, { style: C ? E.style : P({}, E.style, { @@ -9861,8 +9862,8 @@ const vg = (e) => { className: Ce(B.root, p) }), { slotProps: ie - } = te, F = he(te, bg); - return /* @__PURE__ */ d(K, P({}, F, !Ss(K) && { + } = te, V = he(te, kg); + return /* @__PURE__ */ d(K, P({}, V, !Cs(K) && { slotProps: ie, disableScrollLock: j }, { @@ -9879,7 +9880,7 @@ const vg = (e) => { })) })); }); -process.env.NODE_ENV !== "production" && (ol.propTypes = { +process.env.NODE_ENV !== "production" && (al.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -9896,7 +9897,7 @@ process.env.NODE_ENV !== "production" && (ol.propTypes = { */ anchorEl: ar(s.oneOfType([lt, s.func]), (e) => { if (e.open && (!e.anchorReference || e.anchorReference === "anchorEl")) { - const t = on(e.anchorEl); + const t = an(e.anchorEl); if (t && t.nodeType === 1) { const r = t.getBoundingClientRect(); if (process.env.NODE_ENV !== "test" && r.top === 0 && r.left === 0 && r.right === 0 && r.bottom === 0) @@ -9968,7 +9969,7 @@ process.env.NODE_ENV !== "production" && (ol.propTypes = { * The elevation of the popover. * @default 8 */ - elevation: ms, + elevation: hs, /** * Specifies how close to the edge of the window the popover can appear. * If null, the popover will not be constrained by the window. @@ -9993,7 +9994,7 @@ process.env.NODE_ENV !== "production" && (ol.propTypes = { * @default {} */ PaperProps: s.shape({ - component: qp + component: ed }), /** * The extra props for the slot components. @@ -10056,18 +10057,18 @@ process.env.NODE_ENV !== "production" && (ol.propTypes = { */ TransitionProps: s.object }); -const wg = ol; -function xg(e) { +const Tg = al; +function Sg(e) { return rt("MuiMenu", e); } xt("MuiMenu", ["root", "paper", "list"]); -const kg = ["onEntering"], Eg = ["autoFocus", "children", "className", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant", "slots", "slotProps"], Ng = { +const Cg = ["onEntering"], Og = ["autoFocus", "children", "className", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant", "slots", "slotProps"], Rg = { vertical: "top", horizontal: "right" -}, Tg = { +}, Pg = { vertical: "top", horizontal: "left" -}, Sg = (e) => { +}, $g = (e) => { const { classes: t } = e; @@ -10075,13 +10076,13 @@ const kg = ["onEntering"], Eg = ["autoFocus", "children", "className", "disableA root: ["root"], paper: ["paper"], list: ["list"] - }, xg, t); -}, Cg = Re(wg, { - shouldForwardProp: (e) => Es(e) || e === "classes", + }, Sg, t); +}, _g = Re(Tg, { + shouldForwardProp: (e) => Ns(e) || e === "classes", name: "MuiMenu", slot: "Root", overridesResolver: (e, t) => t.root -})({}), Og = Re(nl, { +})({}), Ig = Re(ol, { name: "MuiMenu", slot: "Paper", overridesResolver: (e, t) => t.paper @@ -10092,14 +10093,14 @@ const kg = ["onEntering"], Eg = ["autoFocus", "children", "className", "disableA maxHeight: "calc(100% - 96px)", // Add iOS momentum scrolling for iOS < 13.0 WebkitOverflowScrolling: "touch" -}), Rg = Re(Yh, { +}), Mg = Re(Qh, { name: "MuiMenu", slot: "List", overridesResolver: (e, t) => t.list })({ // We disable the focus ring for mouse, touch and keyboard users. outline: 0 -}), al = /* @__PURE__ */ N.forwardRef(function(t, r) { +}), il = /* @__PURE__ */ N.forwardRef(function(t, r) { var n, o; const a = ut({ props: t, @@ -10121,7 +10122,7 @@ const kg = ["onEntering"], Eg = ["autoFocus", "children", "className", "disableA variant: x = "selectedMenu", slots: O = {}, slotProps: w = {} - } = a, k = he(a.TransitionProps, kg), y = he(a, Eg), T = Hr(), S = T.direction === "rtl", M = P({}, a, { + } = a, k = he(a.TransitionProps, Cg), y = he(a, Og), T = Gr(), S = T.direction === "rtl", M = P({}, a, { autoFocus: i, disableAutoFocusItem: f, MenuListProps: m, @@ -10130,17 +10131,17 @@ const kg = ["onEntering"], Eg = ["autoFocus", "children", "className", "disableA transitionDuration: u, TransitionProps: k, variant: x - }), j = Sg(M), z = i && !f && g, $ = N.useRef(null), E = (Q, C) => { + }), j = $g(M), z = i && !f && g, $ = N.useRef(null), E = (Q, C) => { $.current && $.current.adjustStyleForScrollbar(Q, T), b && b(Q, C); }, R = (Q) => { Q.key === "Tab" && (Q.preventDefault(), v && v(Q, "tabKeyDown")); }; let I = -1; N.Children.map(l, (Q, C) => { - /* @__PURE__ */ N.isValidElement(Q) && (process.env.NODE_ENV !== "production" && cn.isFragment(Q) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(` + /* @__PURE__ */ N.isValidElement(Q) && (process.env.NODE_ENV !== "production" && pn.isFragment(Q) && console.error(["MUI: The Menu component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(` `)), Q.props.disabled || (x === "selectedMenu" && Q.props.selected || I === -1) && (I = C)); }); - const U = (n = O.paper) != null ? n : Og, B = (o = w.paper) != null ? o : p, L = Bt({ + const U = (n = O.paper) != null ? n : Ig, B = (o = w.paper) != null ? o : p, L = Bt({ elementType: O.root, externalSlotProps: w.root, ownerState: M, @@ -10151,13 +10152,13 @@ const kg = ["onEntering"], Eg = ["autoFocus", "children", "className", "disableA ownerState: M, className: j.paper }); - return /* @__PURE__ */ d(Cg, P({ + return /* @__PURE__ */ d(_g, P({ onClose: v, anchorOrigin: { vertical: "bottom", horizontal: S ? "right" : "left" }, - transformOrigin: S ? Ng : Tg, + transformOrigin: S ? Rg : Pg, slots: { paper: U, root: O.root @@ -10175,7 +10176,7 @@ const kg = ["onEntering"], Eg = ["autoFocus", "children", "className", "disableA ownerState: M }, y, { classes: h, - children: /* @__PURE__ */ d(Rg, P({ + children: /* @__PURE__ */ d(Mg, P({ onKeyDown: R, actions: $, autoFocus: i && (I === -1 || f), @@ -10187,7 +10188,7 @@ const kg = ["onEntering"], Eg = ["autoFocus", "children", "className", "disableA })) })); }); -process.env.NODE_ENV !== "production" && (al.propTypes = { +process.env.NODE_ENV !== "production" && (il.propTypes = { // ┌────────────────────────────── Warning ──────────────────────────────┐ // │ These PropTypes are generated from the TypeScript type definitions. │ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │ @@ -10293,8 +10294,8 @@ process.env.NODE_ENV !== "production" && (al.propTypes = { */ variant: s.oneOf(["menu", "selectedMenu"]) }); -const Pg = al; -function Vv({ +const Ag = il; +function Hv({ className: e, commandHandler: t, menuDefinition: r, @@ -10330,7 +10331,7 @@ function Vv({ children: [ n, /* @__PURE__ */ d( - Pg, + Ag, { className: `papi-context-menu ${e ?? ""}`, open: o !== void 0, @@ -10351,7 +10352,7 @@ function Vv({ } ); } -function $g(e) { +function Dg(e) { return { preserveValue: !0, ...e @@ -10361,7 +10362,7 @@ const xo = (e, t, r = {}) => { const n = _t(t); n.current = t; const o = _t(r); - o.current = $g(o.current); + o.current = Dg(o.current); const [a, i] = ce(() => n.current), [l, c] = ce(!0); return He(() => { let f = !0; @@ -10374,10 +10375,10 @@ const xo = (e, t, r = {}) => { f = !1, o.current.preserveValue || i(() => n.current); }; }, [e]), [a, l]; -}, _g = Ns(/* @__PURE__ */ d("path", { +}, jg = Ts(/* @__PURE__ */ d("path", { d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z" }), "Menu"); -function Ig({ +function Bg({ menuProvider: e, normalMenu: t, fullMenu: r, @@ -10427,11 +10428,11 @@ function Ig({ color: "inherit", "aria-label": `${i ?? ""} menu button`, onClick: p, - children: l ?? /* @__PURE__ */ d(_g, {}) + children: l ?? /* @__PURE__ */ d(jg, {}) } ), /* @__PURE__ */ d( - Cc, + _c, { className: `papi-menu-drawer ${a ?? ""}`, anchor: "left", @@ -10446,7 +10447,7 @@ function Ig({ } }, children: w ? /* @__PURE__ */ d( - Fh, + Gh, { className: a, id: `${i ?? ""} main menu`, @@ -10458,7 +10459,7 @@ function Ig({ ) ] }); } -function zv({ +function Gv({ id: e, label: t, isDisabled: r = !1, @@ -10485,14 +10486,14 @@ function zv({ } ); } -const bt = "scrBook", Mg = "scrRef", Rt = "source", Ag = "details", Dg = "Scripture Reference", jg = "Scripture Book", il = "Type", Bg = "Details"; -function Lg(e, t) { +const bt = "scrBook", Lg = "scrRef", Rt = "source", Fg = "details", Vg = "Scripture Reference", zg = "Scripture Book", sl = "Type", Ug = "Details"; +function Hg(e, t) { const r = t ?? !1; return [ { accessorFn: (n) => `${me.bookNumberToId(n.start.bookNum)} ${n.start.chapterNum}:${n.start.verseNum}`, id: bt, - header: (e == null ? void 0 : e.scriptureReferenceColumnName) ?? Dg, + header: (e == null ? void 0 : e.scriptureReferenceColumnName) ?? Vg, cell: (n) => { const o = n.row.original; return n.row.getIsGrouped() ? me.bookNumberToEnglishName(o.start.bookNum) : n.row.groupingColumnId === bt ? Un(o.start) : void 0; @@ -10503,7 +10504,7 @@ function Lg(e, t) { }, { accessorFn: (n) => Un(n.start), - id: Mg, + id: Lg, header: void 0, cell: (n) => { const o = n.row.original; @@ -10515,7 +10516,7 @@ function Lg(e, t) { { accessorFn: (n) => n.source.displayName, id: Rt, - header: r ? (e == null ? void 0 : e.typeColumnName) ?? il : void 0, + header: r ? (e == null ? void 0 : e.typeColumnName) ?? sl : void 0, cell: (n) => r || n.row.getIsGrouped() ? n.getValue() : void 0, getGroupingValue: (n) => n.source.id, sortingFn: (n, o) => n.original.source.displayName.localeCompare(o.original.source.displayName), @@ -10523,14 +10524,14 @@ function Lg(e, t) { }, { accessorFn: (n) => n.detail, - id: Ag, - header: (e == null ? void 0 : e.detailsColumnName) ?? Bg, + id: Fg, + header: (e == null ? void 0 : e.detailsColumnName) ?? Ug, cell: (n) => n.getValue(), enableGrouping: !1 } ]; } -function Uv({ +function Wv({ sources: e, showColumnHeaders: t = !1, showSourceColumn: r = !1, @@ -10558,7 +10559,7 @@ function Uv({ })); }, [e]); const x = Mt( - () => Lg( + () => Hg( { scriptureReferenceColumnName: n, typeColumnName: a, @@ -10591,8 +10592,8 @@ function Uv({ onGroupingChange: m, onSortingChange: g, onRowSelectionChange: b, - getExpandedRowModel: vc(), - getGroupedRowModel: yc(), + getExpandedRowModel: Ec(), + getGroupedRowModel: Nc(), getCoreRowModel: Ri(), getSortedRowModel: Pi(), getRowId: w, @@ -10609,7 +10610,7 @@ function Uv({ } } }, [u, p, w, l, k]); - const y = o ?? jg, T = a ?? il, S = [ + const y = o ?? zg, T = a ?? sl, S = [ { label: "No Grouping", value: [] }, { label: `Group by ${y}`, value: [bt] }, { label: `Group by ${T}`, value: [Rt] }, @@ -10625,7 +10626,7 @@ function Uv({ m(JSON.parse(E)); }, j = (E, R) => { !E.getIsGrouped() && !E.getIsSelected() && E.getToggleSelectedHandler()(R); - }, z = (E, R) => E.getIsGrouped() ? "" : V("banded-row", R % 2 === 0 ? "even" : "odd"), $ = (E, R, I) => { + }, z = (E, R) => E.getIsGrouped() ? "" : F("banded-row", R % 2 === 0 ? "even" : "odd"), $ = (E, R, I) => { if (!((E == null ? void 0 : E.length) === 0 || R.depth < I.column.getGroupedIndex())) { if (R.getIsGrouped()) switch (R.depth) { @@ -10646,15 +10647,15 @@ function Uv({ }; return /* @__PURE__ */ _("div", { className: "pr-twp pr-flex pr-h-full pr-w-full pr-flex-col", children: [ !t && /* @__PURE__ */ _( - sn, + ln, { value: JSON.stringify(f), onValueChange: (E) => { M(E); }, children: [ - /* @__PURE__ */ d(Rr, { className: "pr-mb-1 pr-mt-2", children: /* @__PURE__ */ d(ln, {}) }), - /* @__PURE__ */ d(Pr, { position: "item-aligned", children: /* @__PURE__ */ d(fp, { children: S.map((E) => /* @__PURE__ */ d(Ke, { value: JSON.stringify(E.value), children: E.label }, E.label)) }) }) + /* @__PURE__ */ d(Rr, { className: "pr-mb-1 pr-mt-2", children: /* @__PURE__ */ d(cn, {}) }), + /* @__PURE__ */ d(Pr, { position: "item-aligned", children: /* @__PURE__ */ d(vp, { children: S.map((E) => /* @__PURE__ */ d(Ke, { value: JSON.stringify(E.value), children: E.label }, E.label)) }) }) ] } ), @@ -10680,14 +10681,14 @@ function Uv({ yt, { "data-state": E.getIsSelected() ? "selected" : "", - className: V(z(E, R)), + className: F(z(E, R)), onClick: (I) => j(E, I), children: E.getVisibleCells().map((I) => { if (!(I.getIsPlaceholder() || I.column.columnDef.enableGrouping && !I.getIsGrouped() && (I.column.columnDef.id !== Rt || !r))) return /* @__PURE__ */ d( Jt, { - className: V( + className: F( I.column.columnDef.id, "pr-p-[1px]", $(f, E, I) @@ -10699,8 +10700,8 @@ function Uv({ onClick: E.getToggleExpandedHandler(), type: "button", children: [ - E.getIsExpanded() && /* @__PURE__ */ d(vn, {}), - !E.getIsExpanded() && (c === "ltr" ? /* @__PURE__ */ d(Ci, {}) : /* @__PURE__ */ d(nc, {})), + E.getIsExpanded() && /* @__PURE__ */ d(yn, {}), + !E.getIsExpanded() && (c === "ltr" ? /* @__PURE__ */ d(Ci, {}) : /* @__PURE__ */ d(lc, {})), " ", kr(I.column.columnDef.cell, I.getContext()), " (", @@ -10719,72 +10720,24 @@ function Uv({ ] }) ] }); } -const Fg = To( - "pr-text-sm pr-font-medium pr-leading-none peer-disabled:pr-cursor-not-allowed peer-disabled:pr-opacity-70" -), sl = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(Mi.Root, { ref: r, className: V(Fg(), e), ...t })); -sl.displayName = Mi.Root.displayName; -function Vg({ - id: e, - isDisabled: t = !1, - hasError: r = !1, - isFullWidth: n = !1, - helperText: o, - label: a, - placeholder: i, - isRequired: l = !1, - className: c, - defaultValue: f, - value: m, - onChange: v, - onFocus: g, - onBlur: p -}) { - return /* @__PURE__ */ _("div", { className: V("pr-inline-grid pr-items-center pr-gap-1.5", { "pr-w-full": n }), children: [ - /* @__PURE__ */ d( - sl, - { - htmlFor: e, - className: V({ - "pr-text-red-600": r, - "pr-hidden": !a - }), - children: `${a}${l ? "*" : ""}` - } - ), - /* @__PURE__ */ d( - yn, - { - id: e, - disabled: t, - placeholder: i, - required: l, - className: V(c, { "pr-border-red-600": r }), - defaultValue: f, - value: m, - onChange: v, - onFocus: g, - onBlur: p - } - ), - /* @__PURE__ */ d("p", { className: V({ "pr-hidden": !o }), children: o }) - ] }); -} -function Hv({ onSearch: e, placeholder: t, isFullWidth: r }) { +function Gg({ onSearch: e, placeholder: t, isFullWidth: r }) { const [n, o] = ce(""), a = (i) => { o(i), e(i); }; return /* @__PURE__ */ d( - Vg, + jr, { - isFullWidth: r, - className: "search-bar-input", + className: F( + "pr-flex pr-h-10 pr-rounded-md pr-border pr-border-input pr-bg-background pr-px-3 pr-py-2 pr-text-sm pr-ring-offset-background file:pr-border-0 file:pr-bg-transparent file:pr-text-sm file:pr-font-medium placeholder:pr-text-muted-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-[color:hsl(240,5%,64.9%)] focus-visible:pr-ring-offset-2 disabled:pr-cursor-not-allowed disabled:pr-opacity-50", + { "pr-w-full": r } + ), placeholder: t, value: n, onChange: (i) => a(i.target.value) } ); } -function Gv({ +function Xv({ id: e, isDisabled: t = !1, orientation: r = "horizontal", @@ -10800,7 +10753,7 @@ function Gv({ onChangeCommitted: g }) { return /* @__PURE__ */ d( - Oc, + Ic, { id: e, disabled: t, @@ -10818,7 +10771,7 @@ function Gv({ } ); } -function Wv({ +function Yv({ autoHideDuration: e = void 0, id: t, isOpen: r = !1, @@ -10834,7 +10787,7 @@ function Wv({ className: n }; return /* @__PURE__ */ d( - Rc, + Mc, { autoHideDuration: e ?? void 0, open: r, @@ -10845,142 +10798,263 @@ function Wv({ } ); } -const Gr = bn(({ className: e, ...t }, r) => /* @__PURE__ */ d(oc, { size: 35, className: V("pr-animate-spin", e), ...t, ref: r })); -Gr.displayName = "Spinner"; -function Xv({ - id: e, - isChecked: t, - isDisabled: r = !1, - hasError: n = !1, - className: o, - onChange: a -}) { - return /* @__PURE__ */ d( - Pc, - { - id: e, - checked: t, - disabled: r, - className: `papi-switch ${n ? "error" : ""} ${o ?? ""}`, - onChange: a - } - ); -} -function Yv({ - menuProvider: e, - commandHandler: t, - className: r, - id: n, - children: o -}) { - const a = _t(void 0); - return /* @__PURE__ */ d("div", { ref: a, style: { position: "relative" }, children: /* @__PURE__ */ d($c, { position: "static", id: n, children: /* @__PURE__ */ _(_c, { className: `papi-toolbar ${r ?? ""}`, variant: "dense", children: [ - e ? /* @__PURE__ */ d( - Ig, - { - commandHandler: t, - containerRef: a, - menuProvider: e - } - ) : void 0, - o ? /* @__PURE__ */ d("div", { className: "papi-toolbar-children", children: o }) : void 0 - ] }) }) }); -} -const qv = De.Root, zg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( - De.List, - { - ref: r, - className: V( - "pr-inline-flex pr-h-10 pr-items-center pr-justify-center pr-rounded-md pr-bg-muted pr-p-1 pr-text-muted-foreground", - e - ), - ...t - } -)); -zg.displayName = De.List.displayName; -const Ug = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( - De.Trigger, - { - ref: r, - className: V( - "pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-sm pr-px-3 pr-py-1.5 pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-all hover:pr-text-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50 data-[state=active]:pr-bg-background data-[state=active]:pr-text-foreground data-[state=active]:pr-shadow-sm", - e - ), - ...t - } -)); -Ug.displayName = De.Trigger.displayName; -const Hg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( - De.Content, - { - ref: r, - className: V( - "pr-mt-2 pr-ring-offset-background focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2", - e - ), - ...t - } -)); -Hg.displayName = De.Content.displayName; -const Gg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +const ll = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( De.Root, { orientation: "vertical", ref: r, - className: V("pr-flex pr-gap-1 pr-rounded-md pr-text-muted-foreground", e), + className: F("pr-flex pr-gap-1 pr-rounded-md pr-text-muted-foreground", e), ...t } )); -Gg.displayName = De.List.displayName; -const Wg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +ll.displayName = De.List.displayName; +const cl = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( De.List, { ref: r, - className: V( + className: F( "pr-flex-fit pr-mlk-items-center pr-w-[124px] pr-justify-center pr-rounded-md pr-bg-muted pr-p-1 pr-text-muted-foreground", e ), ...t } )); -Wg.displayName = De.List.displayName; -const Kv = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +cl.displayName = De.List.displayName; +const Wg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( De.Trigger, { ref: r, ...t, - className: V( + className: F( "overflow-clip pr-inline-flex pr-w-[116px] pr-cursor-pointer pr-items-center pr-justify-center pr-break-words pr-rounded-sm pr-border-0 pr-bg-muted pr-px-3 pr-py-1.5 pr-text-sm pr-font-medium pr-text-inherit pr-ring-offset-background pr-transition-all hover:pr-text-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50 data-[state=active]:pr-bg-background data-[state=active]:pr-text-foreground data-[state=active]:pr-shadow-sm", e ) } -)), Xg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( +)), pl = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( De.Content, { ref: r, - className: V( + className: F( "mt-2 pr-ms-5 pr-flex-grow pr-text-foreground pr-ring-offset-background focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2", e ), ...t } )); -Xg.displayName = De.Content.displayName; -function Jv({ - isInstalling: e, - handleClick: t, - buttonText: r, - className: n, - ...o +pl.displayName = De.Content.displayName; +function qv({ + tabList: e, + onSearch: t, + searchPlaceholder: r, + headerTitle: n, + isSearchBarFullWidth: o = !1 }) { - return /* @__PURE__ */ d( - we, - { - className: V( - "pr-h-8 pr-rounded-md pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700", + return /* @__PURE__ */ _("div", { className: "pr-twp", children: [ + /* @__PURE__ */ _("div", { className: "pr-space-y-2 pr-pb-2", children: [ + n ? /* @__PURE__ */ d("h1", { children: n }) : "", + /* @__PURE__ */ d( + Gg, { - "pr-cursor-not-allowed pr-bg-blue-700": e, - "pr-bg-blue-600": !e, + isFullWidth: o, + onSearch: t, + placeholder: r + } + ) + ] }), + /* @__PURE__ */ _(ll, { children: [ + /* @__PURE__ */ d(cl, { children: e.map((a) => /* @__PURE__ */ d(Wg, { value: a.value, children: a.value }, a.key)) }), + e.map((a) => /* @__PURE__ */ d(pl, { value: a.value, children: a.content }, a.key)) + ] }) + ] }); +} +const dl = W.forwardRef(({ className: e, orientation: t = "horizontal", decorative: r = !0, ...n }, o) => /* @__PURE__ */ d( + Mi.Root, + { + ref: o, + decorative: r, + orientation: t, + className: F( + "pr-twp pr-shrink-0 pr-bg-border", + t === "horizontal" ? "pr-h-[1px] pr-w-full" : "pr-h-full pr-w-[1px]", + e + ), + ...n + } +)); +dl.displayName = Mi.Root.displayName; +function Kv({ children: e }) { + return /* @__PURE__ */ d("div", { className: "pr-twp pr-grid", children: e }); +} +function Jv({ + primary: e, + secondary: t, + children: r, + isLoading: n = !1, + loadingMessage: o +}) { + return /* @__PURE__ */ _("div", { className: "pr-flex pr-items-center pr-justify-between pr-space-x-4 pr-py-2", children: [ + /* @__PURE__ */ _("div", { children: [ + /* @__PURE__ */ d("p", { className: "pr-text-sm pr-font-medium pr-leading-none", children: e }), + /* @__PURE__ */ d("p", { className: "pr-text-sm pr-text-muted-foreground", children: t }) + ] }), + n ? /* @__PURE__ */ d("p", { className: "pr-text-sm pr-text-muted-foreground", children: o }) : /* @__PURE__ */ d("div", { children: r }) + ] }); +} +function Zv({ + primary: e, + secondary: t, + includeSeparator: r = !1 +}) { + return /* @__PURE__ */ _("div", { className: "pr-space-y-4 pr-py-2", children: [ + /* @__PURE__ */ _("div", { children: [ + /* @__PURE__ */ d("h3", { className: "pr-text-lg pr-font-medium", children: e }), + /* @__PURE__ */ d("p", { className: "pr-text-sm pr-text-muted-foreground", children: t }) + ] }), + r ? /* @__PURE__ */ d(dl, {}) : "" + ] }); +} +const Wr = vn(({ className: e, ...t }, r) => /* @__PURE__ */ d(cc, { size: 35, className: F("pr-animate-spin", e), ...t, ref: r })); +Wr.displayName = "Spinner"; +function Qv({ + id: e, + isChecked: t, + isDisabled: r = !1, + hasError: n = !1, + className: o, + onChange: a +}) { + return /* @__PURE__ */ d( + Ac, + { + id: e, + checked: t, + disabled: r, + className: `papi-switch ${n ? "error" : ""} ${o ?? ""}`, + onChange: a + } + ); +} +const Xg = To( + "pr-text-sm pr-font-medium pr-leading-none peer-disabled:pr-cursor-not-allowed peer-disabled:pr-opacity-70" +), ul = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(Ai.Root, { ref: r, className: F(Xg(), e), ...t })); +ul.displayName = Ai.Root.displayName; +function e0({ + id: e, + isDisabled: t = !1, + hasError: r = !1, + isFullWidth: n = !1, + helperText: o, + label: a, + placeholder: i, + isRequired: l = !1, + className: c, + defaultValue: f, + value: m, + onChange: v, + onFocus: g, + onBlur: p +}) { + return /* @__PURE__ */ _("div", { className: F("pr-inline-grid pr-items-center pr-gap-1.5", { "pr-w-full": n }), children: [ + /* @__PURE__ */ d( + ul, + { + htmlFor: e, + className: F({ + "pr-text-red-600": r, + "pr-hidden": !a + }), + children: `${a}${l ? "*" : ""}` + } + ), + /* @__PURE__ */ d( + jr, + { + id: e, + disabled: t, + placeholder: i, + required: l, + className: F(c, { "pr-border-red-600": r }), + defaultValue: f, + value: m, + onChange: v, + onFocus: g, + onBlur: p + } + ), + /* @__PURE__ */ d("p", { className: F({ "pr-hidden": !o }), children: o }) + ] }); +} +function t0({ + menuProvider: e, + commandHandler: t, + className: r, + id: n, + children: o +}) { + const a = _t(void 0); + return /* @__PURE__ */ d("div", { ref: a, style: { position: "relative" }, children: /* @__PURE__ */ d(Dc, { position: "static", id: n, children: /* @__PURE__ */ _(jc, { className: `papi-toolbar ${r ?? ""}`, variant: "dense", children: [ + e ? /* @__PURE__ */ d( + Bg, + { + commandHandler: t, + containerRef: a, + menuProvider: e + } + ) : void 0, + o ? /* @__PURE__ */ d("div", { className: "papi-toolbar-children", children: o }) : void 0 + ] }) }) }); +} +const r0 = De.Root, Yg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( + De.List, + { + ref: r, + className: F( + "pr-inline-flex pr-h-10 pr-items-center pr-justify-center pr-rounded-md pr-bg-muted pr-p-1 pr-text-muted-foreground", + e + ), + ...t + } +)); +Yg.displayName = De.List.displayName; +const qg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( + De.Trigger, + { + ref: r, + className: F( + "pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-sm pr-px-3 pr-py-1.5 pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-all hover:pr-text-foreground focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50 data-[state=active]:pr-bg-background data-[state=active]:pr-text-foreground data-[state=active]:pr-shadow-sm", + e + ), + ...t + } +)); +qg.displayName = De.Trigger.displayName; +const Kg = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( + De.Content, + { + ref: r, + className: F( + "pr-mt-2 pr-ring-offset-background focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2", + e + ), + ...t + } +)); +Kg.displayName = De.Content.displayName; +function n0({ + isInstalling: e, + handleClick: t, + buttonText: r, + className: n, + ...o +}) { + return /* @__PURE__ */ d( + we, + { + className: F( + "pr-h-8 pr-rounded-md pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700", + { + "pr-cursor-not-allowed pr-bg-blue-700": e, + "pr-bg-blue-600": !e, "pr-bg-white pr-text-blue-600 hover:pr-text-white": !r, "pr-w-20": r }, @@ -10988,14 +11062,14 @@ function Jv({ ), onClick: t, ...o, - children: e ? /* @__PURE__ */ d(Gr, { size: 15 }) : /* @__PURE__ */ _(wt, { children: [ - /* @__PURE__ */ d(ac, { size: 25, className: V("pr-h-4 pr-w-4", { "pr-mr-1": r }) }), + children: e ? /* @__PURE__ */ d(Wr, { size: 15 }) : /* @__PURE__ */ _(wt, { children: [ + /* @__PURE__ */ d(pc, { size: 25, className: F("pr-h-4 pr-w-4", { "pr-mr-1": r }) }), r ] }) } ); } -function Zv({ +function o0({ isEnabling: e, handleClick: t, className: r, @@ -11004,7 +11078,7 @@ function Zv({ return /* @__PURE__ */ d( we, { - className: V( + className: F( "pr-h-8 pr-rounded-md pr-bg-blue-600 pr-px-4 pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700", { "pr-cursor-not-allowed pr-bg-blue-700": e @@ -11014,13 +11088,13 @@ function Zv({ onClick: t, ...n, children: e ? /* @__PURE__ */ _(wt, { children: [ - /* @__PURE__ */ d(Gr, { size: 15, className: "pr-mr-1 pr-text-white" }), + /* @__PURE__ */ d(Wr, { size: 15, className: "pr-mr-1 pr-text-white" }), "Enabling..." ] }) : "Enable" } ); } -function Qv({ +function a0({ isDisabling: e, handleClick: t, className: r, @@ -11029,7 +11103,7 @@ function Qv({ return /* @__PURE__ */ d( we, { - className: V( + className: F( "pr-h-8 pr-rounded-md pr-bg-gray-300 pr-text-black pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-gray-400", { "pr-cursor-not-allowed pr-bg-gray-400": e @@ -11039,13 +11113,13 @@ function Qv({ onClick: t, ...n, children: e ? /* @__PURE__ */ _(wt, { children: [ - /* @__PURE__ */ d(Gr, { size: 15, className: "pr-mr-1 pr-text-black" }), + /* @__PURE__ */ d(Wr, { size: 15, className: "pr-mr-1 pr-text-black" }), "Disabling..." ] }) : "Disable" } ); } -function e0({ +function i0({ isUpdating: e, handleClick: t, className: r, @@ -11054,7 +11128,7 @@ function e0({ return /* @__PURE__ */ d( we, { - className: V( + className: F( "pr-h-8 pr-rounded-md pr-bg-blue-600 pr-px-4 pr-text-white pr-transition pr-duration-300 pr-ease-in-out hover:pr-bg-blue-700 hover:pr-text-white", { "pr-cursor-not-allowed pr-bg-blue-700": e @@ -11064,7 +11138,7 @@ function e0({ onClick: t, ...n, children: e ? /* @__PURE__ */ _(wt, { children: [ - /* @__PURE__ */ d(Gr, { size: 15, className: "pr-mr-1 pr-text-white" }), + /* @__PURE__ */ d(Wr, { size: 15, className: "pr-mr-1 pr-text-white" }), "Updating..." ] }) : "Update" } @@ -11080,31 +11154,31 @@ function $t() { return e; }, $t.apply(this, arguments); } -const Yg = ["children", "options"], wi = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "className", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { for: "htmlFor" }), xi = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, qg = ["style", "script"], Kg = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Jg = /mailto:/i, Zg = /\n{2,}$/, ll = /^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/, Qg = /^ *> ?/gm, eb = /^ {2,}\n/, tb = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, cl = /^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/, pl = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, rb = /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, nb = /^(?:\n *)*\n/, ob = /\r\n?/g, ab = /^\[\^([^\]]+)](:.*)\n/, ib = /^\[\^([^\]]+)]/, sb = /\f/g, lb = /^\s*?\[(x|\s)\]/, dl = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, ul = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, fl = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ko = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i, cb = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, ml = /^)/, pb = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Eo = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, db = /^\{.*\}$/, ub = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, fb = /^<([^ >]+@[^ >]+)>/, mb = /^<([^ >]+:\/[^ >]+)>/, hb = /-([a-z])?/gi, hl = /^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/, gb = /^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/, bb = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, vb = /^\[([^\]]*)\] ?\[([^\]]*)\]/, yb = /(\[|\])/g, wb = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, xb = /\t/g, kb = /^ *\| */, Eb = /(^ *\||\| *$)/g, Nb = / *$/, Tb = /^ *:-+: *$/, Sb = /^ *:-+ *$/, Cb = /^ *-+: *$/, Ob = /^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/, Rb = /^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/, Pb = /^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/, $b = /^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/, _b = /^\\([^0-9A-Za-z\s])/, Ib = /^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i, Mb = /^\n+/, Ab = /^([ \t]*)/, Db = /\\([^\\])/g, ki = / *\n+$/, jb = /(?:^|\n)( *)$/, Qo = "(?:\\d+\\.)", ea = "(?:[*+-])"; -function gl(e) { +const Jg = ["children", "options"], wi = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "className", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { for: "htmlFor" }), xi = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Zg = ["style", "script"], Qg = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, eb = /mailto:/i, tb = /\n{2,}$/, fl = /^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/, rb = /^ *> ?/gm, nb = /^ {2,}\n/, ob = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, ml = /^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/, hl = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, ab = /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, ib = /^(?:\n *)*\n/, sb = /\r\n?/g, lb = /^\[\^([^\]]+)](:.*)\n/, cb = /^\[\^([^\]]+)]/, pb = /\f/g, db = /^\s*?\[(x|\s)\]/, gl = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, bl = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, vl = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, ko = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i, ub = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, yl = /^)/, fb = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Eo = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, mb = /^\{.*\}$/, hb = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, gb = /^<([^ >]+@[^ >]+)>/, bb = /^<([^ >]+:\/[^ >]+)>/, vb = /-([a-z])?/gi, wl = /^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/, yb = /^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/, wb = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, xb = /^\[([^\]]*)\] ?\[([^\]]*)\]/, kb = /(\[|\])/g, Eb = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Nb = /\t/g, Tb = /^ *\| */, Sb = /(^ *\||\| *$)/g, Cb = / *$/, Ob = /^ *:-+: *$/, Rb = /^ *:-+ *$/, Pb = /^ *-+: *$/, $b = /^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/, _b = /^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/, Ib = /^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/, Mb = /^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/, Ab = /^\\([^0-9A-Za-z\s])/, Db = /^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i, jb = /^\n+/, Bb = /^([ \t]*)/, Lb = /\\([^\\])/g, ki = / *\n+$/, Fb = /(?:^|\n)( *)$/, Qo = "(?:\\d+\\.)", ea = "(?:[*+-])"; +function xl(e) { return "( *)(" + (e === 1 ? Qo : ea) + ") +"; } -const bl = gl(1), vl = gl(2); -function yl(e) { - return new RegExp("^" + (e === 1 ? bl : vl)); +const kl = xl(1), El = xl(2); +function Nl(e) { + return new RegExp("^" + (e === 1 ? kl : El)); } -const Bb = yl(1), Lb = yl(2); -function wl(e) { - return new RegExp("^" + (e === 1 ? bl : vl) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Qo : ea) + " )[^\\n]*)*(\\n|$)", "gm"); +const Vb = Nl(1), zb = Nl(2); +function Tl(e) { + return new RegExp("^" + (e === 1 ? kl : El) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Qo : ea) + " )[^\\n]*)*(\\n|$)", "gm"); } -const xl = wl(1), kl = wl(2); -function El(e) { +const Sl = Tl(1), Cl = Tl(2); +function Ol(e) { const t = e === 1 ? Qo : ea; return new RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)"); } -const Nl = El(1), Tl = El(2); +const Rl = Ol(1), Pl = Ol(2); function Ei(e, t) { - const r = t === 1, n = r ? Nl : Tl, o = r ? xl : kl, a = r ? Bb : Lb; + const r = t === 1, n = r ? Rl : Pl, o = r ? Sl : Cl, a = r ? Vb : zb; return { t(i, l, c) { - const f = jb.exec(c); + const f = Fb.exec(c); return f && (l.o || !l._ && !l.u) ? n.exec(i = f[1] + i) : null; }, i: ae.HIGH, l(i, l, c) { - const f = r ? +i[2] : void 0, m = i[0].replace(Zg, ` + const f = r ? +i[2] : void 0, m = i[0].replace(tb, ` `).match(o); let v = !1; return { p: m.map(function(g, p) { @@ -11124,12 +11198,12 @@ function Ei(e, t) { return e("li", { key: m }, l(f, c)); })) }; } -const Fb = /^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Vb = /^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Sl = [ll, cl, pl, dl, fl, ul, ml, hl, xl, Nl, kl, Tl], zb = [...Sl, /^[^\n]+(?: \n|\n{2,})/, ko, Eo]; -function Ub(e) { +const Ub = /^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, Hb = /^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, $l = [fl, ml, hl, gl, vl, bl, yl, wl, Sl, Rl, Cl, Pl], Gb = [...$l, /^[^\n]+(?: \n|\n{2,})/, ko, Eo]; +function Wb(e) { return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase(); } -function Hb(e) { - return Cb.test(e) ? "right" : Tb.test(e) ? "center" : Sb.test(e) ? "left" : null; +function Xb(e) { + return Pb.test(e) ? "right" : Ob.test(e) ? "center" : Rb.test(e) ? "left" : null; } function Ni(e, t, r) { const n = r.$; @@ -11138,12 +11212,12 @@ function Ni(e, t, r) { r.$ = n; let a = [[]]; return o.forEach(function(i, l) { - i.type === "tableSeparator" ? l !== 0 && l !== o.length - 1 && a.push([]) : (i.type !== "text" || o[l + 1] != null && o[l + 1].type !== "tableSeparator" || (i.v = i.v.replace(Nb, "")), a[a.length - 1].push(i)); + i.type === "tableSeparator" ? l !== 0 && l !== o.length - 1 && a.push([]) : (i.type !== "text" || o[l + 1] != null && o[l + 1].type !== "tableSeparator" || (i.v = i.v.replace(Cb, "")), a[a.length - 1].push(i)); }), a; } -function Gb(e, t, r) { +function Yb(e, t, r) { r._ = !0; - const n = Ni(e[1], t, r), o = e[2].replace(Eb, "").split("|").map(Hb), a = function(i, l, c) { + const n = Ni(e[1], t, r), o = e[2].replace(Sb, "").split("|").map(Xb), a = function(i, l, c) { return i.trim().split(` `).map(function(f) { return Ni(f, l, c); @@ -11174,13 +11248,13 @@ function br(e) { return e.exec(t); }; } -function Wb(e, t, r) { +function qb(e, t, r) { if (t._ || t.u || r && !r.endsWith(` `)) return null; let n = ""; e.split(` -`).every((a) => !Sl.some((i) => i.test(a)) && (n += a + ` +`).every((a) => !$l.some((i) => i.test(a)) && (n += a + ` `, a.trim())); const o = n.trimEnd(); return o == "" ? null : [n, o]; @@ -11195,31 +11269,31 @@ function Xt(e) { return e; } function Si(e) { - return e.replace(Db, "$1"); + return e.replace(Lb, "$1"); } -function an(e, t, r) { +function sn(e, t, r) { const n = r._ || !1, o = r.u || !1; r._ = !0, r.u = !0; const a = e(t, r); return r._ = n, r.u = o, a; } -function Xb(e, t, r) { +function Kb(e, t, r) { const n = r._ || !1, o = r.u || !1; r._ = !1, r.u = !0; const a = e(t, r); return r._ = n, r.u = o, a; } -function Yb(e, t, r) { +function Jb(e, t, r) { return r._ = !1, e(t, r); } -const ro = (e, t, r) => ({ v: an(t, e[1], r) }); +const ro = (e, t, r) => ({ v: sn(t, e[1], r) }); function no() { return {}; } function oo() { return null; } -function qb(...e) { +function Zb(...e) { return e.filter(Boolean).join(" "); } function ao(e, t, r) { @@ -11230,20 +11304,20 @@ function ao(e, t, r) { return n || r; } var ae; -function Kb(e, t = {}) { - t.overrides = t.overrides || {}, t.slugify = t.slugify || Ub, t.namedCodesToUnicode = t.namedCodesToUnicode ? $t({}, xi, t.namedCodesToUnicode) : xi; +function Qb(e, t = {}) { + t.overrides = t.overrides || {}, t.slugify = t.slugify || Wb, t.namedCodesToUnicode = t.namedCodesToUnicode ? $t({}, xi, t.namedCodesToUnicode) : xi; const r = t.createElement || N.createElement; function n(p, h, ...u) { const b = ao(t.overrides, `${p}.props`, {}); return r(function(x, O) { const w = ao(O, x); return w ? typeof w == "function" || typeof w == "object" && "render" in w ? w : ao(O, `${x}.component`, x) : x; - }(p, t.overrides), $t({}, h, b, { className: qb(h == null ? void 0 : h.className, b.className) || void 0 }), ...u); + }(p, t.overrides), $t({}, h, b, { className: Zb(h == null ? void 0 : h.className, b.className) || void 0 }), ...u); } function o(p) { let h = !1; - t.forceInline ? h = !0 : t.forceBlock || (h = wb.test(p) === !1); - const u = m(f(h ? p : `${p.trimEnd().replace(Mb, "")} + t.forceInline ? h = !0 : t.forceBlock || (h = Eb.test(p) === !1); + const u = m(f(h ? p : `${p.trimEnd().replace(jb, "")} `, { _: h })); for (; typeof u[u.length - 1] == "string" && !u[u.length - 1].trim(); ) @@ -11262,12 +11336,12 @@ function Kb(e, t = {}) { return N.createElement(b, { key: "outer" }, x); } function a(p) { - const h = p.match(Kg); + const h = p.match(Qg); return h ? h.reduce(function(u, b, x) { const O = b.indexOf("="); if (O !== -1) { const w = function(S) { - return S.indexOf("-") !== -1 && S.match(pb) === null && (S = S.replace(hb, function(M, j) { + return S.indexOf("-") !== -1 && S.match(fb) === null && (S = S.replace(vb, function(M, j) { return j.toUpperCase(); })), S; }(b.slice(0, O)).trim(), k = function(S) { @@ -11277,7 +11351,7 @@ function Kb(e, t = {}) { return S === "style" ? M.split(/;\s?/).reduce(function(j, z) { const $ = z.slice(0, z.indexOf(":")); return j[$.replace(/(-[a-z])/g, (E) => E[1].toUpperCase())] = z.slice($.length + 1).trim(), j; - }, {}) : S === "href" ? Xt(M) : (M.match(db) && (M = M.slice(1, M.length - 1)), M === "true" || M !== "false" && M); + }, {}) : S === "href" ? Xt(M) : (M.match(mb) && (M = M.slice(1, M.length - 1)), M === "true" || M !== "false" && M); }(w, k); typeof T == "string" && (ko.test(T) || Eo.test(T)) && (u[y] = N.cloneElement(o(T.trim()), { key: x })); } else @@ -11285,25 +11359,25 @@ function Kb(e, t = {}) { return u; }, {}) : null; } - const i = [], l = {}, c = { blockQuote: { t: it(ll), i: ae.HIGH, l: (p, h, u) => ({ v: h(p[0].replace(Qg, ""), u) }), h: (p, h, u) => n("blockquote", { key: u.k }, h(p.v, u)) }, breakLine: { t: br(eb), i: ae.HIGH, l: no, h: (p, h, u) => n("br", { key: u.k }) }, breakThematic: { t: it(tb), i: ae.HIGH, l: no, h: (p, h, u) => n("hr", { key: u.k }) }, codeBlock: { t: it(pl), i: ae.MAX, l: (p) => ({ v: p[0].replace(/^ {4}/gm, "").replace(/\n+$/, ""), M: void 0 }), h: (p, h, u) => n("pre", { key: u.k }, n("code", $t({}, p.O, { className: p.M ? `lang-${p.M}` : "" }), p.v)) }, codeFenced: { t: it(cl), i: ae.MAX, l: (p) => ({ O: a(p[3] || ""), v: p[4], M: p[2] || void 0, type: "codeBlock" }) }, codeInline: { t: gt(rb), i: ae.LOW, l: (p) => ({ v: p[2] }), h: (p, h, u) => n("code", { key: u.k }, p.v) }, footnote: { t: it(ab), i: ae.MAX, l: (p) => (i.push({ I: p[2], j: p[1] }), {}), h: oo }, footnoteReference: { t: ht(ib), i: ae.HIGH, l: (p) => ({ v: p[1], B: `#${t.slugify(p[1])}` }), h: (p, h, u) => n("a", { key: u.k, href: Xt(p.B) }, n("sup", { key: u.k }, p.v)) }, gfmTask: { t: ht(lb), i: ae.HIGH, l: (p) => ({ R: p[1].toLowerCase() === "x" }), h: (p, h, u) => n("input", { checked: p.R, key: u.k, readOnly: !0, type: "checkbox" }) }, heading: { t: it(t.enforceAtxHeadings ? ul : dl), i: ae.HIGH, l: (p, h, u) => ({ v: an(h, p[2], u), T: t.slugify(p[2]), C: p[1].length }), h: (p, h, u) => n(`h${p.C}`, { id: p.T, key: u.k }, h(p.v, u)) }, headingSetext: { t: it(fl), i: ae.MAX, l: (p, h, u) => ({ v: an(h, p[1], u), C: p[2] === "=" ? 1 : 2, type: "heading" }) }, htmlComment: { t: br(ml), i: ae.HIGH, l: () => ({}), h: oo }, image: { t: gt(Vb), i: ae.HIGH, l: (p) => ({ D: p[1], B: Si(p[2]), F: p[3] }), h: (p, h, u) => n("img", { key: u.k, alt: p.D || void 0, title: p.F || void 0, src: Xt(p.B) }) }, link: { t: ht(Fb), i: ae.LOW, l: (p, h, u) => ({ v: Xb(h, p[1], u), B: Si(p[2]), F: p[3] }), h: (p, h, u) => n("a", { key: u.k, href: Xt(p.B), title: p.F }, h(p.v, u)) }, linkAngleBraceStyleDetector: { t: ht(mb), i: ae.MAX, l: (p) => ({ v: [{ v: p[1], type: "text" }], B: p[1], type: "link" }) }, linkBareUrlDetector: { t: (p, h) => h.N ? null : ht(ub)(p, h), i: ae.MAX, l: (p) => ({ v: [{ v: p[1], type: "text" }], B: p[1], F: void 0, type: "link" }) }, linkMailtoDetector: { t: ht(fb), i: ae.MAX, l(p) { + const i = [], l = {}, c = { blockQuote: { t: it(fl), i: ae.HIGH, l: (p, h, u) => ({ v: h(p[0].replace(rb, ""), u) }), h: (p, h, u) => n("blockquote", { key: u.k }, h(p.v, u)) }, breakLine: { t: br(nb), i: ae.HIGH, l: no, h: (p, h, u) => n("br", { key: u.k }) }, breakThematic: { t: it(ob), i: ae.HIGH, l: no, h: (p, h, u) => n("hr", { key: u.k }) }, codeBlock: { t: it(hl), i: ae.MAX, l: (p) => ({ v: p[0].replace(/^ {4}/gm, "").replace(/\n+$/, ""), M: void 0 }), h: (p, h, u) => n("pre", { key: u.k }, n("code", $t({}, p.O, { className: p.M ? `lang-${p.M}` : "" }), p.v)) }, codeFenced: { t: it(ml), i: ae.MAX, l: (p) => ({ O: a(p[3] || ""), v: p[4], M: p[2] || void 0, type: "codeBlock" }) }, codeInline: { t: gt(ab), i: ae.LOW, l: (p) => ({ v: p[2] }), h: (p, h, u) => n("code", { key: u.k }, p.v) }, footnote: { t: it(lb), i: ae.MAX, l: (p) => (i.push({ I: p[2], j: p[1] }), {}), h: oo }, footnoteReference: { t: ht(cb), i: ae.HIGH, l: (p) => ({ v: p[1], B: `#${t.slugify(p[1])}` }), h: (p, h, u) => n("a", { key: u.k, href: Xt(p.B) }, n("sup", { key: u.k }, p.v)) }, gfmTask: { t: ht(db), i: ae.HIGH, l: (p) => ({ R: p[1].toLowerCase() === "x" }), h: (p, h, u) => n("input", { checked: p.R, key: u.k, readOnly: !0, type: "checkbox" }) }, heading: { t: it(t.enforceAtxHeadings ? bl : gl), i: ae.HIGH, l: (p, h, u) => ({ v: sn(h, p[2], u), T: t.slugify(p[2]), C: p[1].length }), h: (p, h, u) => n(`h${p.C}`, { id: p.T, key: u.k }, h(p.v, u)) }, headingSetext: { t: it(vl), i: ae.MAX, l: (p, h, u) => ({ v: sn(h, p[1], u), C: p[2] === "=" ? 1 : 2, type: "heading" }) }, htmlComment: { t: br(yl), i: ae.HIGH, l: () => ({}), h: oo }, image: { t: gt(Hb), i: ae.HIGH, l: (p) => ({ D: p[1], B: Si(p[2]), F: p[3] }), h: (p, h, u) => n("img", { key: u.k, alt: p.D || void 0, title: p.F || void 0, src: Xt(p.B) }) }, link: { t: ht(Ub), i: ae.LOW, l: (p, h, u) => ({ v: Kb(h, p[1], u), B: Si(p[2]), F: p[3] }), h: (p, h, u) => n("a", { key: u.k, href: Xt(p.B), title: p.F }, h(p.v, u)) }, linkAngleBraceStyleDetector: { t: ht(bb), i: ae.MAX, l: (p) => ({ v: [{ v: p[1], type: "text" }], B: p[1], type: "link" }) }, linkBareUrlDetector: { t: (p, h) => h.N ? null : ht(hb)(p, h), i: ae.MAX, l: (p) => ({ v: [{ v: p[1], type: "text" }], B: p[1], F: void 0, type: "link" }) }, linkMailtoDetector: { t: ht(gb), i: ae.MAX, l(p) { let h = p[1], u = p[1]; - return Jg.test(u) || (u = "mailto:" + u), { v: [{ v: h.replace("mailto:", ""), type: "text" }], B: u, type: "link" }; - } }, orderedList: Ei(n, 1), unorderedList: Ei(n, 2), newlineCoalescer: { t: it(nb), i: ae.LOW, l: no, h: () => ` -` }, paragraph: { t: Wb, i: ae.LOW, l: ro, h: (p, h, u) => n("p", { key: u.k }, h(p.v, u)) }, ref: { t: ht(gb), i: ae.MAX, l: (p) => (l[p[1]] = { B: p[2], F: p[4] }, {}), h: oo }, refImage: { t: gt(bb), i: ae.MAX, l: (p) => ({ D: p[1] || void 0, P: p[2] }), h: (p, h, u) => n("img", { key: u.k, alt: p.D, src: Xt(l[p.P].B), title: l[p.P].F }) }, refLink: { t: ht(vb), i: ae.MAX, l: (p, h, u) => ({ v: h(p[1], u), Z: h(p[0].replace(yb, "\\$1"), u), P: p[2] }), h: (p, h, u) => l[p.P] ? n("a", { key: u.k, href: Xt(l[p.P].B), title: l[p.P].F }, h(p.v, u)) : n("span", { key: u.k }, h(p.Z, u)) }, table: { t: it(hl), i: ae.HIGH, l: Gb, h: (p, h, u) => n("table", { key: u.k }, n("thead", null, n("tr", null, p.L.map(function(b, x) { + return eb.test(u) || (u = "mailto:" + u), { v: [{ v: h.replace("mailto:", ""), type: "text" }], B: u, type: "link" }; + } }, orderedList: Ei(n, 1), unorderedList: Ei(n, 2), newlineCoalescer: { t: it(ib), i: ae.LOW, l: no, h: () => ` +` }, paragraph: { t: qb, i: ae.LOW, l: ro, h: (p, h, u) => n("p", { key: u.k }, h(p.v, u)) }, ref: { t: ht(yb), i: ae.MAX, l: (p) => (l[p[1]] = { B: p[2], F: p[4] }, {}), h: oo }, refImage: { t: gt(wb), i: ae.MAX, l: (p) => ({ D: p[1] || void 0, P: p[2] }), h: (p, h, u) => n("img", { key: u.k, alt: p.D, src: Xt(l[p.P].B), title: l[p.P].F }) }, refLink: { t: ht(xb), i: ae.MAX, l: (p, h, u) => ({ v: h(p[1], u), Z: h(p[0].replace(kb, "\\$1"), u), P: p[2] }), h: (p, h, u) => l[p.P] ? n("a", { key: u.k, href: Xt(l[p.P].B), title: l[p.P].F }, h(p.v, u)) : n("span", { key: u.k }, h(p.Z, u)) }, table: { t: it(wl), i: ae.HIGH, l: Yb, h: (p, h, u) => n("table", { key: u.k }, n("thead", null, n("tr", null, p.L.map(function(b, x) { return n("th", { key: x, style: Ti(p, x) }, h(b, u)); }))), n("tbody", null, p.A.map(function(b, x) { return n("tr", { key: x }, b.map(function(O, w) { return n("td", { key: w, style: Ti(p, w) }, h(O, u)); })); }))) }, tableSeparator: { t: function(p, h) { - return h.$ ? (h._ = !0, kb.exec(p)) : null; + return h.$ ? (h._ = !0, Tb.exec(p)) : null; }, i: ae.HIGH, l: function() { return { type: "tableSeparator" }; - }, h: () => " | " }, text: { t: br(Ib), i: ae.MIN, l: (p) => ({ v: p[0].replace(cb, (h, u) => t.namedCodesToUnicode[u] ? t.namedCodesToUnicode[u] : h) }), h: (p) => p.v }, textBolded: { t: gt(Ob), i: ae.MED, l: (p, h, u) => ({ v: h(p[2], u) }), h: (p, h, u) => n("strong", { key: u.k }, h(p.v, u)) }, textEmphasized: { t: gt(Rb), i: ae.LOW, l: (p, h, u) => ({ v: h(p[2], u) }), h: (p, h, u) => n("em", { key: u.k }, h(p.v, u)) }, textEscaped: { t: gt(_b), i: ae.HIGH, l: (p) => ({ v: p[1], type: "text" }) }, textMarked: { t: gt(Pb), i: ae.LOW, l: ro, h: (p, h, u) => n("mark", { key: u.k }, h(p.v, u)) }, textStrikethroughed: { t: gt($b), i: ae.LOW, l: ro, h: (p, h, u) => n("del", { key: u.k }, h(p.v, u)) } }; + }, h: () => " | " }, text: { t: br(Db), i: ae.MIN, l: (p) => ({ v: p[0].replace(ub, (h, u) => t.namedCodesToUnicode[u] ? t.namedCodesToUnicode[u] : h) }), h: (p) => p.v }, textBolded: { t: gt($b), i: ae.MED, l: (p, h, u) => ({ v: h(p[2], u) }), h: (p, h, u) => n("strong", { key: u.k }, h(p.v, u)) }, textEmphasized: { t: gt(_b), i: ae.LOW, l: (p, h, u) => ({ v: h(p[2], u) }), h: (p, h, u) => n("em", { key: u.k }, h(p.v, u)) }, textEscaped: { t: gt(Ab), i: ae.HIGH, l: (p) => ({ v: p[1], type: "text" }) }, textMarked: { t: gt(Ib), i: ae.LOW, l: ro, h: (p, h, u) => n("mark", { key: u.k }, h(p.v, u)) }, textStrikethroughed: { t: gt(Mb), i: ae.LOW, l: ro, h: (p, h, u) => n("del", { key: u.k }, h(p.v, u)) } }; t.disableParsingRawHTML !== !0 && (c.htmlBlock = { t: br(ko), i: ae.HIGH, l(p, h, u) { - const [, b] = p[3].match(Ab), x = new RegExp(`^${b}`, "gm"), O = p[3].replace(x, ""), w = (k = O, zb.some((M) => M.test(k)) ? Yb : an); + const [, b] = p[3].match(Bb), x = new RegExp(`^${b}`, "gm"), O = p[3].replace(x, ""), w = (k = O, Gb.some((M) => M.test(k)) ? Jb : sn); var k; - const y = p[1].toLowerCase(), T = qg.indexOf(y) !== -1; + const y = p[1].toLowerCase(), T = Zg.indexOf(y) !== -1; u.N = u.N || y === "a"; const S = T ? p[3] : w(h, O, u); return u.N = !1, { O: a(p[2]), v: S, G: T, H: T ? y : p[1] }; @@ -11333,8 +11407,8 @@ function Kb(e, t = {}) { return O !== w ? O - w : b < x ? -1 : 1; }), function(b, x) { return u(function(O) { - return O.replace(ob, ` -`).replace(sb, "").replace(xb, " "); + return O.replace(sb, ` +`).replace(pb, "").replace(Nb, " "); }(b), x); }; }(c), m = (v = function(p) { @@ -11363,7 +11437,7 @@ function Kb(e, t = {}) { (function(e) { e[e.MAX = 0] = "MAX", e[e.HIGH = 1] = "HIGH", e[e.MED = 2] = "MED", e[e.LOW = 3] = "LOW", e[e.MIN = 4] = "MIN"; })(ae || (ae = {})); -const Jb = (e) => { +const ev = (e) => { let { children: t, options: r } = e, n = function(o, a) { if (o == null) return {}; @@ -11371,23 +11445,23 @@ const Jb = (e) => { for (l = 0; l < f.length; l++) a.indexOf(i = f[l]) >= 0 || (c[i] = o[i]); return c; - }(e, Yg); - return N.cloneElement(Kb(t, r), n); + }(e, Jg); + return N.cloneElement(Qb(t, r), n); }; -function t0({ id: e, markdown: t }) { - return /* @__PURE__ */ d("div", { id: e, className: "pr-prose", children: /* @__PURE__ */ d(Jb, { children: t }) }); +function s0({ id: e, markdown: t }) { + return /* @__PURE__ */ d("div", { id: e, className: "pr-prose", children: /* @__PURE__ */ d(ev, { children: t }) }); } -const Zb = bn((e, t) => /* @__PURE__ */ _( +const tv = vn((e, t) => /* @__PURE__ */ _( we, { ref: t, className: "pr-rounded-md pr-border pr-border-dashed pr-border-gray-400 pr-bg-white pr-px-4 pr-py-2 pr-text-black pr-transition pr-duration-300 pr-ease-in-out hover:pr-border-blue-600 hover:pr-bg-white hover:pr-text-blue-600", ...e, children: [ - /* @__PURE__ */ d(ic, { size: 16, className: "pr-mr-2 pr-h-4 pr-w-4 pr-text-gray-700 hover:pr-text-blue-600" }), + /* @__PURE__ */ d(dc, { size: 16, className: "pr-mr-2 pr-h-4 pr-w-4 pr-text-gray-700 hover:pr-text-blue-600" }), "Filter", /* @__PURE__ */ d( - vn, + yn, { size: 16, className: "pr-ml-2 pr-h-4 pr-w-4 pr-text-gray-700 hover:pr-text-blue-600" @@ -11396,28 +11470,28 @@ const Zb = bn((e, t) => /* @__PURE__ */ _( ] } )); -var Qb = /* @__PURE__ */ ((e) => (e[e.Check = 0] = "Check", e[e.Radio = 1] = "Radio", e))(Qb || {}); -function r0({ id: e, groups: t }) { +var rv = /* @__PURE__ */ ((e) => (e[e.Check = 0] = "Check", e[e.Radio = 1] = "Radio", e))(rv || {}); +function l0({ id: e, groups: t }) { return /* @__PURE__ */ d("div", { id: e, children: /* @__PURE__ */ _(Ro, { children: [ - /* @__PURE__ */ d(Vi, { asChild: !0, children: /* @__PURE__ */ d(Zb, {}) }), + /* @__PURE__ */ d(zi, { asChild: !0, children: /* @__PURE__ */ d(tv, {}) }), /* @__PURE__ */ d(wn, { children: t.map((r) => /* @__PURE__ */ _("div", { children: [ - /* @__PURE__ */ d(jr, { children: r.label }), - /* @__PURE__ */ d(Jc, { children: r.items.map((n) => /* @__PURE__ */ d("div", { children: n.itemType === 0 ? /* @__PURE__ */ d(Po, { onClick: n.onClick, children: n.label }) : /* @__PURE__ */ d(Ui, { onClick: n.onClick, value: n.label, children: n.label }) }, n.label)) }), + /* @__PURE__ */ d(Br, { children: r.label }), + /* @__PURE__ */ d(rp, { children: r.items.map((n) => /* @__PURE__ */ d("div", { children: n.itemType === 0 ? /* @__PURE__ */ d(Po, { onClick: n.onClick, children: n.label }) : /* @__PURE__ */ d(Hi, { onClick: n.onClick, value: n.label, children: n.label }) }, n.label)) }), /* @__PURE__ */ d(xn, {}) ] }, r.label)) }) ] }) }); } -function n0({ id: e, message: t }) { +function c0({ id: e, message: t }) { return /* @__PURE__ */ d("div", { id: e, className: "pr-mb-20 pr-mt-20 pr-flex pr-items-center pr-justify-center", children: /* @__PURE__ */ d("div", { className: "pr-w-3/4 pr-rounded-lg pr-bg-gray-100 pr-p-8 pr-text-center", children: /* @__PURE__ */ d("p", { className: "pr-text-lg pr-text-gray-800", children: t }) }) }); } -function o0({ +function p0({ id: e, category: t, downloads: r, languages: n, moreInfoUrl: o }) { - const a = new mc("en", { + const a = new yc("en", { notation: "compact", compactDisplay: "short" }).format(Object.values(r).reduce((l, c) => l + c, 0)), i = () => { @@ -11436,7 +11510,7 @@ function o0({ /* @__PURE__ */ d("div", { className: "pr-mx-2 pr-h-10 pr-border-l pr-border-gray-300" }), /* @__PURE__ */ _("div", { className: "pr-flex pr-flex-col pr-items-center", children: [ /* @__PURE__ */ _("div", { className: "pr-flex pr-items-center pr-rounded-md pr-bg-gray-100 pr-px-2 pr-py-1", children: [ - /* @__PURE__ */ d(sc, { className: "pr-mr-1 pr-h-4 pr-w-4" }), + /* @__PURE__ */ d(uc, { className: "pr-mr-1 pr-h-4 pr-w-4" }), /* @__PURE__ */ d("span", { className: "pr-text-xs pr-font-semibold pr-text-gray-700", children: a }) ] }), /* @__PURE__ */ d("span", { className: "pr-text-xs pr-text-gray-500", children: "USERS" }) @@ -11471,21 +11545,25 @@ function o0({ "a", { href: o, + target: "_blank", + rel: "noreferrer", className: "pr-flex pr-items-center pr-text-xs pr-font-semibold pr-text-gray-500 pr-underline", children: [ "Website", - /* @__PURE__ */ d(lc, { className: "pr-ml-1 pr-inline pr-h-4 pr-w-4" }) + /* @__PURE__ */ d(fc, { className: "pr-ml-1 pr-inline pr-h-4 pr-w-4" }) ] } ), /* @__PURE__ */ _( "a", { - href: "https://placeholder.com", + href: "https://example.com", + target: "_blank", + rel: "noreferrer", className: "pr-flex pr-items-center pr-text-xs pr-font-semibold pr-text-gray-500 pr-underline", children: [ "Support", - /* @__PURE__ */ d(cc, { className: "pr-ml-1 pr-inline pr-h-4 pr-w-4" }) + /* @__PURE__ */ d(mc, { className: "pr-ml-1 pr-inline pr-h-4 pr-w-4" }) ] } ) @@ -11494,7 +11572,7 @@ function o0({ } ); } -function ev({ id: e, versionHistory: t }) { +function nv({ id: e, versionHistory: t }) { const [r, n] = ce(!1), o = /* @__PURE__ */ new Date(); function a(l) { const c = new Date(l), f = new Date(o.getTime() - c.getTime()), m = f.getUTCFullYear() - 1970, v = f.getUTCMonth(), g = f.getUTCDate() - 1; @@ -11525,19 +11603,19 @@ function ev({ id: e, versionHistory: t }) { ) ] }); } -function a0({ +function d0({ id: e, publisherDisplayName: t, fileSize: r, locales: n, versionHistory: o }) { - const a = Mt(() => hc(r), [r]), l = ((c) => { + const a = Mt(() => wc(r), [r]), l = ((c) => { const f = new Intl.DisplayNames(navigator.language, { type: "language" }); return c.map((m) => f.of(m)); })(n); return /* @__PURE__ */ d("div", { id: e, className: "pr-border-t pr-pb-4 pr-pt-4", children: /* @__PURE__ */ _("div", { className: "pr-md:flex-row pr-md:space-x-8 pr-flex pr-flex-col pr-space-x-0", children: [ - /* @__PURE__ */ d(ev, { versionHistory: o }), + /* @__PURE__ */ d(nv, { versionHistory: o }), /* @__PURE__ */ d("div", { className: "pr-md:border-t-0 pr-md:border-l pr-md-h-auto pr-md-ml-8 pr-mt-4 pr-border-t pr-border-gray-300" }), /* @__PURE__ */ _("div", { className: "pr-md:mt-0 pr-mt-4 pr-flex-1 pr-space-y-3", children: [ /* @__PURE__ */ d("h2", { className: "pr-text-md pr-font-semibold", children: "Information" }), @@ -11556,7 +11634,7 @@ function a0({ ] }) ] }) }); } -const i0 = (e, t) => { +const u0 = (e, t) => { He(() => { if (!e) return () => { @@ -11566,7 +11644,7 @@ const i0 = (e, t) => { r(); }; }, [e, t]); -}, io = () => !1, s0 = (e, t) => { +}, io = () => !1, f0 = (e, t) => { const [r] = xo( Se(async () => { if (!e) @@ -11582,12 +11660,12 @@ const i0 = (e, t) => { He(() => () => { r !== io && r(); }, [r]); -}, tv = W.forwardRef( +}, ov = W.forwardRef( ({ className: e, ...t }, r) => /* @__PURE__ */ d( "div", { ref: r, - className: V( + className: F( "pr-rounded-lg pr-border pr-bg-card pr-text-card-foreground pr-shadow-sm", e ), @@ -11595,41 +11673,41 @@ const i0 = (e, t) => { } ) ); -tv.displayName = "Card"; -const rv = W.forwardRef( +ov.displayName = "Card"; +const av = W.forwardRef( ({ className: e, ...t }, r) => /* @__PURE__ */ d( "div", { ref: r, - className: V("pr-flex pr-flex-col pr-space-y-1.5 pr-p-6", e), + className: F("pr-flex pr-flex-col pr-space-y-1.5 pr-p-6", e), ...t } ) ); -rv.displayName = "CardHeader"; -const nv = W.forwardRef( +av.displayName = "CardHeader"; +const iv = W.forwardRef( ({ className: e, ...t }, r) => /* @__PURE__ */ d( "h3", { ref: r, - className: V("pr-text-2xl pr-font-semibold pr-leading-none pr-tracking-tight", e), + className: F("pr-text-2xl pr-font-semibold pr-leading-none pr-tracking-tight", e), ...t, children: t.children } ) ); -nv.displayName = "CardTitle"; -const ov = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d("p", { ref: r, className: V("pr-text-sm pr-text-muted-foreground", e), ...t })); -ov.displayName = "CardDescription"; -const av = W.forwardRef( - ({ className: e, ...t }, r) => /* @__PURE__ */ d("div", { ref: r, className: V("pr-p-6 pr-pt-0", e), ...t }) +iv.displayName = "CardTitle"; +const sv = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d("p", { ref: r, className: F("pr-text-sm pr-text-muted-foreground", e), ...t })); +sv.displayName = "CardDescription"; +const lv = W.forwardRef( + ({ className: e, ...t }, r) => /* @__PURE__ */ d("div", { ref: r, className: F("pr-p-6 pr-pt-0", e), ...t }) ); -av.displayName = "CardContent"; -const iv = W.forwardRef( - ({ className: e, ...t }, r) => /* @__PURE__ */ d("div", { ref: r, className: V("pr-flex pr-items-center pr-p-6 pr-pt-0", e), ...t }) +lv.displayName = "CardContent"; +const cv = W.forwardRef( + ({ className: e, ...t }, r) => /* @__PURE__ */ d("div", { ref: r, className: F("pr-flex pr-items-center pr-p-6 pr-pt-0", e), ...t }) ); -iv.displayName = "CardFooter"; -const sv = To( +cv.displayName = "CardFooter"; +const pv = To( "pr-relative pr-w-full pr-rounded-lg pr-border pr-p-4 [&>svg~*]:pr-pl-7 [&>svg+div]:pr-translate-y-[-3px] [&>svg]:pr-absolute [&>svg]:pr-left-4 [&>svg]:pr-top-4 [&>svg]:pr-text-foreground", { variants: { @@ -11642,211 +11720,68 @@ const sv = To( variant: "default" } } -), lv = W.forwardRef(({ className: e, variant: t, ...r }, n) => /* @__PURE__ */ d("div", { ref: n, role: "alert", className: V(sv({ variant: t }), e), ...r })); -lv.displayName = "Alert"; -const cv = W.forwardRef( +), dv = W.forwardRef(({ className: e, variant: t, ...r }, n) => /* @__PURE__ */ d("div", { ref: n, role: "alert", className: F(pv({ variant: t }), e), ...r })); +dv.displayName = "Alert"; +const uv = W.forwardRef( ({ className: e, ...t }, r) => /* @__PURE__ */ _( "h5", { ref: r, - className: V("pr-mb-1 pr-font-medium pr-leading-none pr-tracking-tight", e), + className: F("pr-mb-1 pr-font-medium pr-leading-none pr-tracking-tight", e), ...t, children: [ t.children, " " ] } - ) -); -cv.displayName = "AlertTitle"; -const pv = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d("div", { ref: r, className: V("pr-text-sm [&_p]:pr-leading-relaxed", e), ...t })); -pv.displayName = "AlertDescription"; -const dv = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ _( - vr.Root, - { - ref: r, - className: V( - "pr-relative pr-flex pr-w-full pr-touch-none pr-select-none pr-items-center", - e - ), - ...t, - children: [ - /* @__PURE__ */ d(vr.Track, { className: "pr-relative pr-h-2 pr-w-full pr-grow pr-overflow-hidden pr-rounded-full pr-bg-secondary", children: /* @__PURE__ */ d(vr.Range, { className: "pr-absolute pr-h-full pr-bg-primary" }) }), - /* @__PURE__ */ d(vr.Thumb, { className: "pr-block pr-h-5 pr-w-5 pr-rounded-full pr-border-2 pr-border-primary pr-bg-background pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50" }) - ] - } -)); -dv.displayName = vr.Root.displayName; -const uv = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( - lo.Root, - { - className: V( - "pr-peer pr-inline-flex pr-h-6 pr-w-11 pr-shrink-0 pr-cursor-pointer pr-items-center pr-rounded-full pr-border-2 pr-border-transparent pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 focus-visible:pr-ring-offset-background disabled:pr-cursor-not-allowed disabled:pr-opacity-50 data-[state=checked]:pr-bg-primary data-[state=unchecked]:pr-bg-input", - e - ), - ...t, - ref: r, - children: /* @__PURE__ */ d( - lo.Thumb, - { - className: V( - "pr-pointer-events-none pr-block pr-h-5 pr-w-5 pr-rounded-full pr-bg-background pr-shadow-lg pr-ring-0 pr-transition-transform data-[state=checked]:pr-translate-x-5 data-[state=unchecked]:pr-translate-x-0" - ) - } - ) - } -)); -uv.displayName = lo.Root.displayName; -function fv(e, t = "top") { - if (!e || typeof document > "u") - return; - const r = document.head || document.querySelector("head"), n = r.querySelector(":first-child"), o = document.createElement("style"); - o.appendChild(document.createTextNode(e)), t === "top" && n ? r.insertBefore(o, n) : r.appendChild(o); -} -fv(`.papi-icon-button { - border: 0; - border-radius: 3em; - cursor: pointer; - display: inline-block; -} - -.papi-icon-button.primary { - background-color: #1ea7fd; - color: white; -} - -.papi-icon-button.secondary { - background-color: transparent; - color: #333; -} - -.papi-icon-button.paratext { - background-color: darkgreen; - color: greenyellow; -} - -.papi-icon-button.paratext.bright { - background-color: greenyellow; - color: darkgreen; -} -.papi-snackbar { - font-family: Arial, Helvetica, sans-serif; -} - -.papi-snackbar.primary { - background: #1ea7fd; - color: white; -} - -.papi-snackbar.external { - background-color: lightsteelblue; - border-color: white; - border-style: dotted; - padding: 2%; - width: 30%; -} - -.papi-snackbar.secondary { - background: transparent; - color: #333; -} - -.papi-snackbar.alert { - background: lightcoral; -} - -.papi-snackbar.paratext { - background: darkgreen; - color: greenyellow; -} - -.papi-snackbar.bright { - background: greenyellow; - color: darkgreen; -} -.check-item { - flex-wrap: wrap; - vertical-align: middle; -} - -.papi-checkbox { - display: block; -} -.papi-checkbox { - background-color: transparent; -} - -.papi-checkbox.error { - color: #f00; -} - -.papi-checkbox.error:hover { - background-color: rgba(255, 0, 0, 0.2); -} - -.papi-checkbox.paratext { - color: greenyellow; -} - -.papi-checkbox-label.paratext { - color: darkgreen; -} - -.papi-checkbox.paratext:hover { - background-color: rgba(0, 100, 0, 0.3); -} - -.papi-checkbox.paratext.bright { - color: darkgreen; -} - -.papi-checkbox-label.paratext.bright { - background-color: greenyellow; -} - -.papi-checkbox.paratext.bright:hover { - background-color: rgba(173, 255, 47, 0.3); -} - -.papi-checkbox.below, -.papi-checkbox.above { - text-align: center; -} -.papi-multi-column-menu { - background-color: rgb(222, 222, 222); - display: flex; - flex-direction: column; - padding-left: 3px; - padding-right: 3px; -} - -.papi-menu-column { - font-size: 11pt; - font-weight: 600; - padding-bottom: 2px; -} - -.papi-menu-column ul { - padding-top: 0; -} - -.papi-menu-column-header { - background-color: rgb(181, 181, 181); - padding-left: 24px; - margin-top: 0; - margin-bottom: 0; -} - -.papi-multi-column-menu.paratext { - background-color: rgb(76, 106, 76); - color: rgb(214, 255, 152); -} - -.papi-multi-column-menu.paratext.bright { - color: rgb(76, 106, 76); - background-color: rgb(214, 255, 152); + ) +); +uv.displayName = "AlertTitle"; +const fv = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d("div", { ref: r, className: F("pr-text-sm [&_p]:pr-leading-relaxed", e), ...t })); +fv.displayName = "AlertDescription"; +const mv = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ _( + vr.Root, + { + ref: r, + className: F( + "pr-relative pr-flex pr-w-full pr-touch-none pr-select-none pr-items-center", + e + ), + ...t, + children: [ + /* @__PURE__ */ d(vr.Track, { className: "pr-relative pr-h-2 pr-w-full pr-grow pr-overflow-hidden pr-rounded-full pr-bg-secondary", children: /* @__PURE__ */ d(vr.Range, { className: "pr-absolute pr-h-full pr-bg-primary" }) }), + /* @__PURE__ */ d(vr.Thumb, { className: "pr-block pr-h-5 pr-w-5 pr-rounded-full pr-border-2 pr-border-primary pr-bg-background pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50" }) + ] + } +)); +mv.displayName = vr.Root.displayName; +const hv = W.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d( + lo.Root, + { + className: F( + "pr-peer pr-inline-flex pr-h-6 pr-w-11 pr-shrink-0 pr-cursor-pointer pr-items-center pr-rounded-full pr-border-2 pr-border-transparent pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 focus-visible:pr-ring-offset-background disabled:pr-cursor-not-allowed disabled:pr-opacity-50 data-[state=checked]:pr-bg-primary data-[state=unchecked]:pr-bg-input", + e + ), + ...t, + ref: r, + children: /* @__PURE__ */ d( + lo.Thumb, + { + className: F( + "pr-pointer-events-none pr-block pr-h-5 pr-w-5 pr-rounded-full pr-bg-background pr-shadow-lg pr-ring-0 pr-transition-transform data-[state=checked]:pr-translate-x-5 data-[state=unchecked]:pr-translate-x-0" + ) + } + ) + } +)); +hv.displayName = lo.Root.displayName; +function gv(e, t = "top") { + if (!e || typeof document > "u") + return; + const r = document.head || document.querySelector("head"), n = r.querySelector(":first-child"), o = document.createElement("style"); + o.appendChild(document.createTextNode(e)), t === "top" && n ? r.insertBefore(o, n) : r.appendChild(o); } -/* +gv(`/* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) */ @@ -12746,6 +12681,9 @@ video:where(.pr-twp,.pr-twp *) { .pr-h-\\[100\\%\\] { height: 100%; } +.pr-h-\\[1px\\] { + height: 1px; +} .pr-h-\\[405px\\] { height: 405px; } @@ -12827,6 +12765,9 @@ video:where(.pr-twp,.pr-twp *) { .pr-w-\\[150px\\] { width: 150px; } +.pr-w-\\[1px\\] { + width: 1px; +} .pr-w-\\[200px\\] { width: 200px; } @@ -13359,6 +13300,9 @@ video:where(.pr-twp,.pr-twp *) { padding-top: 1.5rem; padding-bottom: 1.5rem; } +.pr-pb-2 { + padding-bottom: 0.5rem; +} .pr-pb-3 { padding-bottom: 0.75rem; } @@ -14250,21 +14194,141 @@ video:where(.pr-twp,.pr-twp *) { .\\[\\&_tr\\]\\:pr-border-b tr { border-bottom-width: 1px; } -.papi-slider { +.papi-checkbox { background-color: transparent; - color: #1ea7fd; } -.papi-slider.vertical { - min-height: 200px; +.papi-checkbox.error { + color: #f00; } -.papi-slider.paratext { +.papi-checkbox.error:hover { + background-color: rgba(255, 0, 0, 0.2); +} + +.papi-checkbox.paratext { + color: greenyellow; +} + +.papi-checkbox-label.paratext { + color: darkgreen; +} + +.papi-checkbox.paratext:hover { + background-color: rgba(0, 100, 0, 0.3); +} + +.papi-checkbox.paratext.bright { + color: darkgreen; +} + +.papi-checkbox-label.paratext.bright { + background-color: greenyellow; +} + +.papi-checkbox.paratext.bright:hover { + background-color: rgba(173, 255, 47, 0.3); +} + +.papi-checkbox.below, +.papi-checkbox.above { + text-align: center; +} +.check-item { + flex-wrap: wrap; + vertical-align: middle; +} + +.papi-checkbox { + display: block; +} +.papi-multi-column-menu { + background-color: rgb(222, 222, 222); + display: flex; + flex-direction: column; + padding-left: 3px; + padding-right: 3px; +} + +.papi-menu-column { + font-size: 11pt; + font-weight: 600; + padding-bottom: 2px; +} + +.papi-menu-column ul { + padding-top: 0; +} + +.papi-menu-column-header { + background-color: rgb(181, 181, 181); + padding-left: 24px; + margin-top: 0; + margin-bottom: 0; +} + +.papi-multi-column-menu.paratext { + background-color: rgb(76, 106, 76); + color: rgb(214, 255, 152); +} + +.papi-multi-column-menu.paratext.bright { + color: rgb(76, 106, 76); + background-color: rgb(214, 255, 152); +} +.papi-context-menu-target { + white-space: nowrap; + cursor: context-menu; +} + +.papi-context-menu-target * { + white-space: normal; +} + +.papi-context-menu-target:hover { + box-shadow: 0 0 10px rgba(0, 0, 0, 0.07); /* Faint shadowy background */ +} + +.papi-context-menu-target.paratext:hover { + box-shadow: 0 0 10px rgba(0, 100, 0, 0.07); /* Faint shadowy background */ +} + +.papi-context-menu-target.paratext.bright:hover { + box-shadow: 0 0 10px rgba(173, 255, 47, 0.07); /* Faint shadowy background */ +} + +.papi-context-menu.paratext ul { + background-color: rgb(76, 106, 76); + color: rgb(214, 255, 152); +} + +.papi-context-menu.paratext.bright ul { + color: rgb(76, 106, 76); + background-color: rgb(214, 255, 152); +} +.papi-icon-button { + border: 0; + border-radius: 3em; + cursor: pointer; + display: inline-block; +} + +.papi-icon-button.primary { + background-color: #1ea7fd; + color: white; +} + +.papi-icon-button.secondary { + background-color: transparent; + color: #333; +} + +.papi-icon-button.paratext { background-color: darkgreen; color: greenyellow; } -.papi-slider.paratext.bright { +.papi-icon-button.paratext.bright { background-color: greenyellow; color: darkgreen; } @@ -14281,6 +14345,59 @@ video:where(.pr-twp,.pr-twp *) { max-width: 24px; max-height: 24px; } +.papi-slider { + background-color: transparent; + color: #1ea7fd; +} + +.papi-slider.vertical { + min-height: 200px; +} + +.papi-slider.paratext { + background-color: darkgreen; + color: greenyellow; +} + +.papi-slider.paratext.bright { + background-color: greenyellow; + color: darkgreen; +} +.papi-snackbar { + font-family: Arial, Helvetica, sans-serif; +} + +.papi-snackbar.primary { + background: #1ea7fd; + color: white; +} + +.papi-snackbar.external { + background-color: lightsteelblue; + border-color: white; + border-style: dotted; + padding: 2%; + width: 30%; +} + +.papi-snackbar.secondary { + background: transparent; + color: #333; +} + +.papi-snackbar.alert { + background: lightcoral; +} + +.papi-snackbar.paratext { + background: darkgreen; + color: greenyellow; +} + +.papi-snackbar.bright { + background: greenyellow; + color: darkgreen; +} .banded-row:hover { cursor: pointer; } @@ -14337,134 +14454,109 @@ video:where(.pr-twp,.pr-twp *) { padding: 10px; position: relative; } -.papi-context-menu-target { - white-space: nowrap; - cursor: context-menu; -} - -.papi-context-menu-target * { - white-space: normal; -} - -.papi-context-menu-target:hover { - box-shadow: 0 0 10px rgba(0, 0, 0, 0.07); /* Faint shadowy background */ -} - -.papi-context-menu-target.paratext:hover { - box-shadow: 0 0 10px rgba(0, 100, 0, 0.07); /* Faint shadowy background */ -} - -.papi-context-menu-target.paratext.bright:hover { - box-shadow: 0 0 10px rgba(173, 255, 47, 0.07); /* Faint shadowy background */ -} - -.papi-context-menu.paratext ul { - background-color: rgb(76, 106, 76); - color: rgb(214, 255, 152); -} - -.papi-context-menu.paratext.bright ul { - color: rgb(76, 106, 76); - background-color: rgb(214, 255, 152); -} `, "top"); export { - lv as Alert, - pv as AlertDescription, - cv as AlertTitle, - Iv as BookChapterControl, + dv as Alert, + fv as AlertDescription, + uv as AlertTitle, + Dv as BookChapterControl, we as Button, - tv as Card, - av as CardContent, - ov as CardDescription, - iv as CardFooter, - rv as CardHeader, - nv as CardTitle, - Lv as ChapterRangeSelector, - Ip as Checkbox, - Fv as Checklist, + ov as Card, + lv as CardContent, + sv as CardDescription, + cv as CardFooter, + av as CardHeader, + iv as CardTitle, + zv as ChapterRangeSelector, + Bp as Checkbox, + Uv as Checklist, Ta as ComboBox, - Vv as ContextMenu, - yp as DataTable, - Qv as DisableButton, + Hv as ContextMenu, + Np as DataTable, + a0 as DisableButton, Ro as DropdownMenu, Po as DropdownMenuCheckboxItem, wn as DropdownMenuContent, - Jc as DropdownMenuGroup, - zi as DropdownMenuItem, - Qb as DropdownMenuItemType, - jr as DropdownMenuLabel, - Pv as DropdownMenuPortal, - _v as DropdownMenuRadioGroup, - Ui as DropdownMenuRadioItem, + rp as DropdownMenuGroup, + Ui as DropdownMenuItem, + rv as DropdownMenuItemType, + Br as DropdownMenuLabel, + Iv as DropdownMenuPortal, + Av as DropdownMenuRadioGroup, + Hi as DropdownMenuRadioItem, xn as DropdownMenuSeparator, - ep as DropdownMenuShortcut, - $v as DropdownMenuSub, - Qc as DropdownMenuSubContent, - Zc as DropdownMenuSubTrigger, - Vi as DropdownMenuTrigger, - Zv as EnableButton, - Zb as FilterButton, - r0 as FilterDropdown, - a0 as Footer, - Fh as GridMenu, - Ig as HamburgerMenuButton, - Mv as INVENTORY_STRING_KEYS, - zv as IconButton, - yn as Input, - Jv as InstallButton, - Av as Inventory, - sl as Label, + ap as DropdownMenuShortcut, + Mv as DropdownMenuSub, + op as DropdownMenuSubContent, + np as DropdownMenuSubTrigger, + zi as DropdownMenuTrigger, + o0 as EnableButton, + tv as FilterButton, + l0 as FilterDropdown, + d0 as Footer, + Gh as GridMenu, + Bg as HamburgerMenuButton, + jv as INVENTORY_STRING_KEYS, + Gv as IconButton, + jr as Input, + n0 as InstallButton, + Bv as Inventory, + ul as Label, Yt as LabelPosition, - t0 as MarkdownRenderer, - Xs as MenuItem, - o0 as MoreInfo, - n0 as NoExtensionsFound, - Uv as ScriptureResultsViewer, - Hv as SearchBar, - sn as Select, + s0 as MarkdownRenderer, + Ys as MenuItem, + p0 as MoreInfo, + qv as NavigationContentSearch, + c0 as NoExtensionsFound, + Wv as ScriptureResultsViewer, + Gg as SearchBar, + ln as Select, Pr as SelectContent, - fp as SelectGroup, + vp as SelectGroup, Ke as SelectItem, - mp as SelectLabel, - Gi as SelectScrollDownButton, - Hi as SelectScrollUpButton, - hp as SelectSeparator, + yp as SelectLabel, + Wi as SelectScrollDownButton, + Gi as SelectScrollUpButton, + wp as SelectSeparator, Rr as SelectTrigger, - ln as SelectValue, - dv as ShadCnSlider, - uv as ShadCnSwitch, - Gv as Slider, - Wv as Snackbar, - Gr as Spinner, - Xv as Switch, + cn as SelectValue, + dl as Separator, + Kv as SettingsList, + Zv as SettingsListHeader, + Jv as SettingsListItem, + mv as ShadCnSlider, + hv as ShadCnSwitch, + Xv as Slider, + Yv as Snackbar, + Wr as Spinner, + Qv as Switch, kn as Table, Nn as TableBody, - vp as TableCaption, + Ep as TableCaption, Jt as TableCell, - bp as TableFooter, + kp as TableFooter, $r as TableHead, En as TableHeader, yt as TableRow, - qv as Tabs, - Hg as TabsContent, - zg as TabsList, - Ug as TabsTrigger, - Vg as TextField, - Yv as Toolbar, - e0 as UpdateButton, - ev as VersionHistory, - Gg as VerticalTabs, - Xg as VerticalTabsContent, - Wg as VerticalTabsList, - Kv as VerticalTabsTrigger, - dp as buttonVariants, + r0 as Tabs, + Kg as TabsContent, + Yg as TabsList, + qg as TabsTrigger, + e0 as TextField, + t0 as Toolbar, + i0 as UpdateButton, + nv as VersionHistory, + ll as VerticalTabs, + pl as VerticalTabsContent, + cl as VerticalTabsList, + Wg as VerticalTabsTrigger, + gp as buttonVariants, $o as getSortingIcon, - jv as inventoryCountColumn, - Dv as inventoryItemColumn, - Bv as inventoryStatusColumn, - i0 as useEvent, - s0 as useEventAsync, + Fv as inventoryCountColumn, + Lv as inventoryItemColumn, + Vv as inventoryStatusColumn, + u0 as useEvent, + f0 as useEventAsync, xo 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 2546c4f0f0..b9d9285fce 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/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/inventory-utils.ts","../src/components/advanced/inventory/occurrences-table.component.tsx","../src/components/advanced/inventory/inventory.component.tsx","../src/components/advanced/inventory/inventory-columns.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/mui/chapter-range-selector.component.tsx","../src/components/mui/label-position.model.ts","../src/components/mui/checkbox.component.tsx","../src/components/mui/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/elementTypeAcceptingRef/elementTypeAcceptingRef.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/getScrollbarSize/getScrollbarSize.js","../../../node_modules/@mui/utils/integerPropType/integerPropType.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/FocusTrap/FocusTrap.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@mui/base/unstable_useModal/ModalManager.js","../../../node_modules/@mui/base/unstable_useModal/useModal.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/styles/getOverlayAlpha.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","../../../node_modules/@mui/material/List/ListContext.js","../../../node_modules/@mui/material/List/listClasses.js","../../../node_modules/@mui/material/List/List.js","../../../node_modules/@mui/material/MenuList/MenuList.js","../../../node_modules/@mui/material/Fade/Fade.js","../../../node_modules/@mui/material/Backdrop/backdropClasses.js","../../../node_modules/@mui/material/Backdrop/Backdrop.js","../../../node_modules/@mui/material/Modal/modalClasses.js","../../../node_modules/@mui/material/Modal/Modal.js","../../../node_modules/@mui/material/Paper/paperClasses.js","../../../node_modules/@mui/material/Paper/Paper.js","../../../node_modules/@mui/material/Popover/popoverClasses.js","../../../node_modules/@mui/material/Popover/Popover.js","../../../node_modules/@mui/material/Menu/menuClasses.js","../../../node_modules/@mui/material/Menu/Menu.js","../src/components/mui/context-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/advanced/scripture-results-viewer/scripture-results-viewer.component.tsx","../src/components/shadcn-ui/label.tsx","../src/components/basics/text-field.component.tsx","../src/components/basics/search-bar.component.tsx","../src/components/mui/slider.component.tsx","../src/components/mui/snackbar.component.tsx","../src/components/basics/spinner.component.tsx","../src/components/mui/switch.component.tsx","../src/components/mui/toolbar.component.tsx","../src/components/shadcn-ui/tabs.tsx","../src/components/basics/tabs-vertical.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","../../../node_modules/markdown-to-jsx/dist/index.modern.js","../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","../src/components/shadcn-ui/card.tsx","../src/components/shadcn-ui/alert.tsx","../src/components/shadcn-ui/slider.tsx","../src/components/shadcn-ui/switch.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst twMergeCustom = extendTailwindMerge({ prefix: 'pr-' });\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 pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-md pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50',\n {\n variants: {\n variant: {\n default: 'pr-bg-primary pr-text-primary-foreground hover:pr-bg-primary/90',\n destructive: 'pr-bg-destructive pr-text-destructive-foreground hover:pr-bg-destructive/90',\n outline:\n 'pr-border pr-border-input pr-bg-background hover:pr-bg-accent hover:pr-text-accent-foreground',\n secondary: 'pr-bg-secondary pr-text-secondary-foreground hover:pr-bg-secondary/80',\n ghost: 'hover:pr-bg-accent hover:pr-text-accent-foreground',\n link: 'pr-text-primary pr-underline-offset-4 hover:pr-underline',\n },\n size: {\n default: 'pr-h-10 pr-px-4 pr-py-2',\n sm: 'pr-h-9 pr-rounded-md pr-px-3',\n lg: 'pr-h-11 pr-rounded-md pr-px-8',\n icon: 'pr-h-10 pr-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 { 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]:pr-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:pr-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 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;\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\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","export const getLinesFromUSFM = (text: string) => {\n return text.split(/(?=\\n|\\\\(?:v|c|id))/g);\n};\n\nexport const extractNumberFromUSFM = (text: string): number => {\n const regex = /^\\\\[vc]\\s+(\\d+)/;\n const match = text.match(regex);\n if (match) {\n return +match[1];\n }\n return 0;\n};\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 { LanguageStrings, ScriptureReference } from 'platform-bible-utils';\nimport { useEffect, useState } from 'react';\nimport { extractNumberFromUSFM, getLinesFromUSFM } from './inventory-utils';\n\ntype SearchResult = {\n reference: ScriptureReference;\n snippet: string;\n key: number;\n};\n\nconst extractOccurrences = (\n text: string | undefined,\n item: string,\n extractItems: (text: string, item?: string | undefined) => string[],\n scriptureRef: ScriptureReference,\n): SearchResult[] => {\n if (!text || text === '' || item === '') return [];\n\n const results: SearchResult[] = [];\n const lines = getLinesFromUSFM(text);\n\n let currentChapter: number = scriptureRef.chapterNum;\n let currentVerse: number = scriptureRef.verseNum;\n let key: number = 0;\n\n lines.forEach((line) => {\n if (line.startsWith('\\\\id')) {\n currentChapter = 0;\n currentVerse = 0;\n }\n if (line.startsWith('\\\\c')) {\n currentChapter = extractNumberFromUSFM(line);\n currentVerse = 0;\n }\n if (line.startsWith('\\\\v')) {\n currentVerse = extractNumberFromUSFM(line);\n if (currentChapter === 0) {\n currentChapter = scriptureRef.chapterNum;\n }\n }\n\n const items: string[] = extractItems(line, item);\n\n for (let i = 0; i < items.length; i++) {\n const result: SearchResult = {\n reference: { ...scriptureRef, chapterNum: +currentChapter, verseNum: +currentVerse },\n snippet: line,\n key,\n };\n key += 1;\n results.push(result);\n }\n });\n\n return results;\n};\n\ninterface OccurrencesTableProps {\n selectedItem: string;\n text: string | undefined;\n extractItems: (text: string, item?: string | undefined) => string[];\n scriptureReference: ScriptureReference;\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n localizedStrings: LanguageStrings;\n}\n\nfunction OccurrencesTable({\n selectedItem,\n text,\n extractItems,\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n}: OccurrencesTableProps) {\n const reference = localizedStrings['%webView_inventory_occurrences_table_header_reference%'];\n const occurrence = localizedStrings['%webView_inventory_occurrences_table_header_occurrence%'];\n const [tableData, setTableData] = useState(\n extractOccurrences(text, selectedItem, extractItems, scriptureReference),\n );\n\n useEffect(\n () => setTableData(extractOccurrences(text, selectedItem, extractItems, scriptureReference)),\n [text, selectedItem, scriptureReference, extractItems],\n );\n\n return (\n \n \n \n {reference}\n {occurrence}\n \n \n \n {tableData.map((result) => (\n {\n setScriptureReference(result.reference);\n }}\n >\n {`${Canon.bookNumberToEnglishName(result.reference.bookNum)} ${result.reference.chapterNum}:${result.reference.verseNum}`}\n {result.snippet}\n \n ))}\n \n
\n );\n}\n\nexport default OccurrencesTable;\n","import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';\nimport { LocalizedStringValue, ScriptureReference } from 'platform-bible-utils';\nimport { Input } from '@/components/shadcn-ui/input';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport DataTable, {\n ColumnDef,\n RowContents,\n SortDirection,\n TableContents,\n} from '@/components/advanced/data-table/data-table.component';\nimport OccurrencesTable from '@/components/advanced/inventory/occurrences-table.component';\nimport { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from 'lucide-react';\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_book%',\n '%webView_inventory_scope_chapter%',\n '%webView_inventory_scope_verse%',\n '%webView_inventory_filter_text%',\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\nexport type Status = 'approved' | 'unapproved' | 'unknown';\n\nexport type ItemData = {\n item: string;\n count: number;\n status: Status;\n};\n\nexport const getSortingIcon = (sortDirection: false | SortDirection): ReactNode => {\n if (sortDirection === 'asc') {\n return ;\n }\n if (sortDirection === 'desc') {\n return ;\n }\n return ;\n};\n\nconst filterItemData = (\n items: ItemData[],\n statusFilter: string,\n textFilter: string,\n): ItemData[] => {\n let filteredItemData: ItemData[] = items;\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.item.includes(textFilter));\n\n return filteredItemData;\n};\n\nconst convertTextToItemData = (\n text: string,\n getInventoryItems: (text: string) => string[],\n getStatusForItem: (item: string) => Status,\n): ItemData[] => {\n const itemData: ItemData[] = [];\n\n const items: string[] = getInventoryItems(text);\n\n for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n const item = items[itemIndex];\n const existingItem = itemData.find((entry) => {\n return entry.item === item;\n });\n if (existingItem) {\n existingItem.count += 1;\n } else {\n const newItem: ItemData = {\n item,\n count: 1,\n status: getStatusForItem(item),\n };\n itemData.push(newItem);\n }\n }\n\n return itemData;\n};\n\nconst localizeString = (\n strings: InventoryLocalizedStrings,\n key: keyof InventoryLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\ninterface InventoryProps {\n scriptureReference: ScriptureReference;\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n localizedStrings: InventoryLocalizedStrings;\n extractItems: (text: string, item?: string | undefined) => string[];\n approvedItems: string[];\n onApprovedItemsChange: (items: string[]) => void;\n unapprovedItems: string[];\n onUnapprovedItemsChange: (items: string[]) => void;\n text: string | undefined;\n scope: string;\n onScopeChange: (scope: string) => void;\n getColumns: (\n onStatusChange: (newItems: string[], status: Status) => void,\n ) => ColumnDef[];\n}\n\nfunction Inventory({\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n extractItems,\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n text,\n scope,\n onScopeChange,\n getColumns,\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_book%');\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\n const [items, setItems] = useState([]);\n const [statusFilter, setStatusFilter] = useState('all');\n const [textFilter, setTextFilter] = useState('');\n const [selectedItem, setSelectedItem] = useState('');\n\n const statusChangeHandler = useCallback(\n (changedItems: string[], status: Status) => {\n setItems((prevTableData) => {\n let tableData: ItemData[] = [];\n changedItems.forEach((item) => {\n tableData = prevTableData.map((tableEntry) => {\n if (tableEntry.item === item && tableEntry.status !== status)\n return { ...tableEntry, status };\n return tableEntry;\n });\n });\n return tableData;\n });\n\n let newApprovedItems: string[] = [...approvedItems];\n changedItems.forEach((item) => {\n if (status === '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 (status === 'unapproved') {\n if (!newUnapprovedItems.includes(item)) {\n newUnapprovedItems.push(item);\n }\n } else {\n newUnapprovedItems = newUnapprovedItems.filter(\n (unapprovedItem) => unapprovedItem !== item,\n );\n }\n });\n onUnapprovedItemsChange(newUnapprovedItems);\n },\n [approvedItems, onApprovedItemsChange, unapprovedItems, onUnapprovedItemsChange],\n );\n\n const getStatusForItem = useCallback(\n (item: string): Status => {\n if (approvedItems.includes(item)) return 'approved';\n if (unapprovedItems.includes(item)) return 'unapproved';\n return 'unknown';\n },\n [approvedItems, unapprovedItems],\n );\n\n useEffect(() => {\n if (!text) return;\n setItems(convertTextToItemData(text, extractItems, getStatusForItem));\n }, [extractItems, text, getStatusForItem]);\n\n const filteredItemData = useMemo(() => {\n return filterItemData(items, statusFilter, textFilter);\n }, [items, statusFilter, textFilter]);\n\n useEffect(() => {\n setSelectedItem('');\n }, [filteredItemData]);\n\n const rowClickHandler = (row: RowContents, table: TableContents) => {\n table.toggleAllRowsSelected(false); // this is pretty hacky, and also prevents us from selecting multiple rows\n row.toggleSelected(undefined);\n\n setSelectedItem(row.getValue('item'));\n };\n\n const columns = useMemo(() => getColumns(statusChangeHandler), [getColumns, statusChangeHandler]);\n\n return (\n
\n
\n \n \n {\n setTextFilter(event.target.value);\n }}\n />\n
\n
\n \n
\n {selectedItem !== '' && (\n
\n \n setScriptureReference(newScriptureReference)\n }\n localizedStrings={localizedStrings}\n />\n
\n )}\n
\n );\n}\n\nexport default Inventory;\n","import { CircleCheckIcon, CircleHelpIcon, CircleXIcon } from 'lucide-react';\nimport { Button } from '@/components/shadcn-ui/button';\nimport { ColumnDef } from '../data-table/data-table.component';\nimport { getSortingIcon, ItemData, Status } from './inventory.component';\n\nexport const inventoryItemColumn = (itemLabel: string): ColumnDef => {\n return {\n accessorKey: 'item',\n header: ({ column }) => (\n \n ),\n };\n};\n\nexport const inventoryCountColumn = (countLabel: string): ColumnDef => {\n return {\n accessorKey: 'count',\n header: ({ column }) => (\n \n ),\n };\n};\n\nexport const inventoryStatusColumn = (\n statusLabel: string,\n statusChangeHandler: (items: string[], status: Status) => void,\n): ColumnDef => {\n return {\n accessorKey: 'status',\n header: ({ column, table }) => {\n const selectedRows = table.getSelectedRowModel().rows;\n\n const items: string[] = [];\n selectedRows.forEach((row) => {\n items.push(row.getValue('item'));\n });\n\n return (\n
\n
\n column.toggleSorting(undefined)}\n >\n {statusLabel}\n {getSortingIcon(column.getIsSorted())}\n \n
\n
\n \n \n \n
\n
\n );\n },\n cell: ({ row }) => {\n const status: Status = row.getValue('status');\n switch (status) {\n case 'approved':\n return ;\n case 'unapproved':\n return ;\n case 'unknown':\n default:\n return ;\n }\n },\n };\n};\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 { 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 /** 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 /** Text direction ltr or rtl */\n dir?: Direction;\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 buttonPlaceholder = '',\n textPlaceholder = '',\n commandEmptyMessage = 'No option found',\n buttonVariant = 'outline',\n dir = 'ltr',\n ...props\n}: ComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n return (\n \n \n \n {value ? getOptionLabel(value) : buttonPlaceholder}\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 { useEffect, useState } from 'react';\nimport { FormControlLabel } from '@mui/material';\nimport ComboBox from '@/components/basics/combo-box.component';\n\nexport type ChapterRangeSelectorProps = {\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled = false,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const [startChapter, setStartChapter] = useState(1);\n const [endChapter, setEndChapter] = useState(chapterCount);\n const [chapterOptions, setChapterOptions] = useState(\n Array.from({ length: chapterCount }, (_, i) => i + 1),\n );\n\n useEffect(() => {\n setStartChapter(1);\n handleSelectStartChapter(1);\n setEndChapter(chapterCount);\n handleSelectEndChapter(chapterCount);\n setChapterOptions(Array.from({ length: chapterCount }, (_, i) => i + 1));\n }, [chapterCount, handleSelectEndChapter, handleSelectStartChapter]);\n\n const onChangeStartChapter = (value: number) => {\n setStartChapter(value);\n handleSelectStartChapter(value);\n if (value > endChapter) {\n setEndChapter(value);\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (value: number) => {\n setEndChapter(value);\n handleSelectEndChapter(value);\n if (value < startChapter) {\n setStartChapter(value);\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n option.toString()}\n value={startChapter}\n />\n }\n label=\"Chapters\"\n labelPlacement=\"start\"\n />\n option.toString()}\n value={endChapter}\n />\n }\n label=\"to\"\n labelPlacement=\"start\"\n />\n \n );\n}\n","enum LabelPosition {\n After = 'after',\n Before = 'before',\n Above = 'above',\n Below = 'below',\n}\n\nexport default LabelPosition;\n","import '@/components/mui/checkbox.component.css';\nimport LabelPosition from '@/components/mui/label-position.model';\nimport { FormLabel, Checkbox as MuiCheckbox } from '@mui/material';\nimport { ChangeEvent } from 'react';\n\nexport type CheckboxProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * If specified, the label that will appear associated with the checkbox.\n *\n * @default '' (no label will be shown)\n */\n labelText?: string;\n /**\n * Indicates the position of the label relative to the checkbox.\n *\n * @default 'after'\n */\n labelPosition?: LabelPosition;\n /**\n * If `true`, the component is in the indeterminate state.\n *\n * @default false\n */\n isIndeterminate?: boolean;\n /** If `true`, the component is checked by default. */\n isDefaultChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/* function CheckboxContainer({ labelText? = '', isDisabled : boolean, hasError : boolean, children? }) {\n return (\n \n {children}\n labelText\n \n );\n} */\n\n/** Primary UI component for user interaction */\nfunction Checkbox({\n id,\n isChecked,\n labelText = '',\n labelPosition = LabelPosition.After,\n isIndeterminate = false,\n isDefaultChecked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: CheckboxProps) {\n const checkBox = (\n \n );\n\n let result;\n\n if (labelText) {\n const preceding =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.Above;\n\n const labelSpan = (\n \n {labelText}\n \n );\n\n const labelIsInline =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.After;\n\n const label = labelIsInline ? labelSpan :
{labelSpan}
;\n\n const checkBoxElement = labelIsInline ? checkBox :
{checkBox}
;\n\n result = (\n \n {preceding && label}\n {checkBoxElement}\n {!preceding && label}\n \n );\n } else {\n result = checkBox;\n }\n return result;\n}\n\nexport default Checkbox;\n","import Checkbox from '@/components/mui/checkbox.component';\nimport '@/components/mui/checklist.component.css';\n\nexport type ChecklistProps = {\n /** Optional string representing the id attribute of the fieldset element */\n id?: string;\n /** Optional string representing CSS class name(s) for styling */\n className?: string;\n /** Optional string representing legend for fieldset element */\n legend?: string;\n /** Array of strings representing the legend text for the fieldset element */\n listItems: string[];\n /** Array of strings representing items to be displayed as checkboxes in the checklist */\n selectedListItems: string[];\n /** Function that takes a string param and is called when a checkbox item is selected or deselected */\n handleSelectListItem: (item: string) => void;\n /**\n * Optional function that takes a string param and returns a string representing the label text\n * for the checkbox associated with that item\n */\n createLabel?: (item: string) => string;\n};\n\n/**\n * Renders a list of checkboxes wrapped in a fieldset element. Each checkbox corresponds to an item\n * from the `listItems` array.\n */\nexport default function Checklist({\n id,\n className,\n legend,\n listItems,\n selectedListItems,\n handleSelectListItem,\n createLabel,\n}: ChecklistProps) {\n return (\n
\n {legend && {legend}}\n {listItems.map((item) => (\n handleSelectListItem(item)}\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 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 elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == 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\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 propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","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}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}","export function getTypeByValue(value) {\n const valueType = typeof value;\n switch (valueType) {\n case 'number':\n if (Number.isNaN(value)) {\n return 'NaN';\n }\n if (!Number.isFinite(value)) {\n return 'Infinity';\n }\n if (value !== Math.floor(value)) {\n return 'float';\n }\n return 'number';\n case 'object':\n if (value === null) {\n return 'null';\n }\n return value.constructor.name;\n default:\n return valueType;\n }\n}\n\n// IE 11 support\nfunction ponyfillIsInteger(x) {\n // eslint-disable-next-line no-restricted-globals\n return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;\n}\nconst isInteger = Number.isInteger || ponyfillIsInteger;\nfunction requiredInteger(props, propName, componentName, location) {\n const propValue = props[propName];\n if (propValue == null || !isInteger(propValue)) {\n const propType = getTypeByValue(propValue);\n return new RangeError(`Invalid ${location} \\`${propName}\\` of type \\`${propType}\\` supplied to \\`${componentName}\\`, expected \\`integer\\`.`);\n }\n return null;\n}\nfunction validator(props, propName, ...other) {\n const propValue = props[propName];\n if (propValue === undefined) {\n return null;\n }\n return requiredInteger(props, propName, ...other);\n}\nfunction validatorNoop() {\n return null;\n}\nvalidator.isRequired = requiredInteger;\nvalidatorNoop.isRequired = validatorNoop;\nexport default process.env.NODE_ENV === 'production' ? validatorNoop : validator;","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\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome,
, and elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n return node.tabIndex;\n}\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n if (!node.name) {\n return false;\n }\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n return roving !== node;\n}\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n return true;\n}\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node: node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\nfunction defaultIsEnabled() {\n return true;\n}\n\n/**\n * Utility component that locks focus inside the component.\n *\n * Demos:\n *\n * - [Focus Trap](https://mui.com/base-ui/react-focus-trap/)\n *\n * API:\n *\n * - [FocusTrap API](https://mui.com/base-ui/react-focus-trap/components-api/#focus-trap)\n */\nfunction FocusTrap(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef(false);\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null);\n // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef(children.ref, rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n if (!rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n rootRef.current.setAttribute('tabIndex', '-1');\n }\n if (activated.current) {\n rootRef.current.focus();\n }\n }\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n nodeToRestore.current = null;\n }\n };\n // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open FocusTrap\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n }\n\n // Make sure the next tab starts from the right place.\n // doc.activeElement refers to the origin.\n if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (sentinelEnd.current) {\n sentinelEnd.current.focus();\n }\n }\n };\n const contain = () => {\n const rootElement = rootRef.current;\n\n // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) {\n return;\n }\n if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n // The focus is already inside\n if (rootElement.contains(doc.activeElement)) {\n return;\n }\n\n // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)\n if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {\n return;\n }\n\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (doc.activeElement !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n if (!activated.current) {\n return;\n }\n let tabbable = [];\n if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n // one of the sentinel nodes was focused, so move the focus\n // to the first/last tabbable element inside the focus trap\n if (tabbable.length > 0) {\n var _lastKeydown$current, _lastKeydown$current2;\n const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n }\n // no tabbable elements in the trap focus or the focus was outside of the focus trap\n } else {\n rootElement.focus();\n }\n };\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true);\n\n // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n const interval = setInterval(() => {\n if (doc.activeElement && doc.activeElement.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-testid\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-testid\": \"sentinelEnd\"\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? FocusTrap.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n /**\n * If `true`, the focus trap will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not restore focus to previously focused element once\n * focus trap is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple focus trap mounted at the same time.\n * @default function defaultIsEnabled(): boolean {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n FocusTrap['propTypes' + ''] = exactProp(FocusTrap.propTypes);\n}\nexport { FocusTrap };","'use client';\n\nimport * 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 };","import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, show) {\n if (show) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = blacklist.indexOf(element) === -1;\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, show);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerDocument(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.containers = void 0;\n this.modals = void 0;\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_createChainedFunction as createChainedFunction } from '@mui/utils';\nimport { extractEventHandlers } from '../utils';\nimport { ModalManager, ariaHidden } from './ModalManager';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst defaultManager = new ModalManager();\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/base-ui/react-modal/#hook)\n *\n * API:\n *\n * - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal)\n */\nexport function useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n // @ts-ignore internal logic - Base UI supports the manager as a prop too\n manager = defaultManager,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp, manager]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || event.which === 229 ||\n // Wait until IME is settled.\n !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n var _otherHandlers$onClic;\n (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers);\n return _extends({\n role: 'presentation'\n }, externalEventHandlers, {\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n });\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return _extends({\n 'aria-hidden': true\n }, externalEventHandlers, {\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n });\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children == null ? void 0 : children.props.onEnter),\n onExited: createChainedFunction(handleExited, children == null ? void 0 : children.props.onExited)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}","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;","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nconst getOverlayAlpha = elevation => {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return (alphaValue / 100).toFixed(2);\n};\nexport default getOverlayAlpha;","'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","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"dense\", \"disablePadding\", \"subheader\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport ListContext from './ListContext';\nimport { getListUtilityClass } from './listClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})(({\n ownerState\n}) => _extends({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative'\n}, !ownerState.disablePadding && {\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.subheader && {\n paddingTop: 0\n}));\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = _extends({}, props, {\n component,\n dense,\n disablePadding\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: [subheader, children]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.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 * The content of the component.\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 component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"actions\", \"autoFocus\", \"autoFocusItem\", \"children\", \"className\", \"disabledItemsFocusable\", \"disableListWrap\", \"onKeyDown\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport List from '../List';\nimport getScrollbarSize from '../utils/getScrollbarSize';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.indexOf(textCriteria.keys.join('')) === 0;\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, theme) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerDocument(containerElement))}px`;\n listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = ownerDocument(list).activeElement;\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, _extends({\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1\n }, other, {\n children: items\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.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`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","'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 { Transition } from 'react-transition-group';\nimport { elementAcceptingRef } from '@mui/utils';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\n\n/**\n * The Fade transition is used by the [Modal](/material-ui/react-modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const theme = useTheme();\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\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 = defaultTimeout,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const enableStrictModeCompat = true;\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 transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\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 transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\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: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\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\" ? Fade.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 * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"invisible\", \"open\", \"slotProps\", \"slots\", \"TransitionComponent\", \"transitionDuration\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Fade from '../Fade';\nimport { getBackdropUtilityClass } from './backdropClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})(({\n ownerState\n}) => _extends({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n}, ownerState.invisible && {\n backgroundColor: 'transparent'\n}));\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n var _slotProps$root, _ref, _slots$root;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n const {\n children,\n className,\n component = 'div',\n components = {},\n componentsProps = {},\n invisible = false,\n open,\n slotProps = {},\n slots = {},\n TransitionComponent = Fade,\n transitionDuration\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n invisible\n });\n const classes = useUtilityClasses(ownerState);\n const rootSlotProps = (_slotProps$root = slotProps.root) != null ? _slotProps$root : componentsProps.root;\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n in: open,\n timeout: transitionDuration\n }, other, {\n children: /*#__PURE__*/_jsx(BackdropRoot, _extends({\n \"aria-hidden\": true\n }, rootSlotProps, {\n as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,\n className: clsx(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),\n ownerState: _extends({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),\n classes: classes,\n ref: ref,\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.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 * The content of the component.\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 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.\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 Root: 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 root: PropTypes.object\n }),\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\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 root: 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 root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The 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 Fade\n */\n TransitionComponent: PropTypes.elementType,\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 transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getModalUtilityClass(slot) {\n return generateUtilityClass('MuiModal', slot);\n}\nconst modalClasses = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);\nexport default modalClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"BackdropComponent\", \"BackdropProps\", \"classes\", \"className\", \"closeAfterTransition\", \"children\", \"container\", \"component\", \"components\", \"componentsProps\", \"disableAutoFocus\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\", \"onBackdropClick\", \"onClose\", \"onTransitionEnter\", \"onTransitionExited\", \"open\", \"slotProps\", \"slots\", \"theme\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, HTMLElementType } from '@mui/utils';\nimport { useSlotProps } from '@mui/base';\nimport { unstable_useModal as useModal } from '@mui/base/unstable_useModal';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport FocusTrap from '../Unstable_TrapFocus';\nimport Portal from '../Portal';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Backdrop from '../Backdrop';\nimport { getModalUtilityClass } from './modalClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open,\n exited,\n classes\n } = ownerState;\n const slots = {\n root: ['root', !open && exited && 'hidden'],\n backdrop: ['backdrop']\n };\n return composeClasses(slots, getModalUtilityClass, classes);\n};\nconst ModalRoot = styled('div', {\n name: 'MuiModal',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.open && ownerState.exited && styles.hidden];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'fixed',\n zIndex: (theme.vars || theme).zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0\n}, !ownerState.open && ownerState.exited && {\n visibility: 'hidden'\n}));\nconst ModalBackdrop = styled(Backdrop, {\n name: 'MuiModal',\n slot: 'Backdrop',\n overridesResolver: (props, styles) => {\n return styles.backdrop;\n }\n})({\n zIndex: -1\n});\n\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/material-ui/api/dialog/)\n * - [Drawer](/material-ui/api/drawer/)\n * - [Menu](/material-ui/api/menu/)\n * - [Popover](/material-ui/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/material-ui/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n var _ref, _slots$root, _ref2, _slots$backdrop, _slotProps$root, _slotProps$backdrop;\n const props = useThemeProps({\n name: 'MuiModal',\n props: inProps\n });\n const {\n BackdropComponent = ModalBackdrop,\n BackdropProps,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n components = {},\n componentsProps = {},\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n onBackdropClick,\n open,\n slotProps,\n slots\n // eslint-disable-next-line react/prop-types\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const propsWithDefaults = _extends({}, props, {\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n });\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n isTopModal,\n exited,\n hasTransition\n } = useModal(_extends({}, propsWithDefaults, {\n rootRef: ref\n }));\n const ownerState = _extends({}, propsWithDefaults, {\n exited\n });\n const classes = useUtilityClasses(ownerState);\n const childProps = {};\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = '-1';\n }\n\n // It's a Transition like component\n if (hasTransition) {\n const {\n onEnter,\n onExited\n } = getTransitionProps();\n childProps.onEnter = onEnter;\n childProps.onExited = onExited;\n }\n const RootSlot = (_ref = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref : ModalRoot;\n const BackdropSlot = (_ref2 = (_slots$backdrop = slots == null ? void 0 : slots.backdrop) != null ? _slots$backdrop : components.Backdrop) != null ? _ref2 : BackdropComponent;\n const rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;\n const backdropSlotProps = (_slotProps$backdrop = slotProps == null ? void 0 : slotProps.backdrop) != null ? _slotProps$backdrop : componentsProps.backdrop;\n const rootProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: rootSlotProps,\n externalForwardedProps: other,\n getSlotProps: getRootProps,\n additionalProps: {\n ref,\n as: component\n },\n ownerState,\n className: clsx(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))\n });\n const backdropProps = useSlotProps({\n elementType: BackdropSlot,\n externalSlotProps: backdropSlotProps,\n additionalProps: BackdropProps,\n getSlotProps: otherHandlers => {\n return getBackdropProps(_extends({}, otherHandlers, {\n onClick: e => {\n if (onBackdropClick) {\n onBackdropClick(e);\n }\n if (otherHandlers != null && otherHandlers.onClick) {\n otherHandlers.onClick(e);\n }\n }\n }));\n },\n className: clsx(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop),\n ownerState\n });\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, _extends({}, rootProps, {\n children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/React.cloneElement(children, childProps)\n })]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead.\n */\n BackdropProps: PropTypes.object,\n /**\n * A single child content 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 * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\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.\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 Backdrop: PropTypes.elementType,\n Root: 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 backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\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 * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * A function called when a transition enters.\n */\n onTransitionEnter: PropTypes.func,\n /**\n * A function called when a transition has exited.\n */\n onTransitionExited: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Modal;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"component\", \"elevation\", \"square\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes, integerPropType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport getOverlayAlpha from '../styles/getOverlayAlpha';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport { getPaperUtilityClass } from './paperClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$vars$overlays;\n return _extends({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow')\n }, !ownerState.square && {\n borderRadius: theme.shape.borderRadius\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }, ownerState.variant === 'elevation' && _extends({\n boxShadow: (theme.vars || theme).shadows[ownerState.elevation]\n }, !theme.vars && theme.palette.mode === 'dark' && {\n backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`\n }, theme.vars && {\n backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]\n }));\n});\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n elevation,\n square,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const theme = useTheme();\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.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 * The content of the component.\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 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 * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopoverUtilityClass(slot) {\n return generateUtilityClass('MuiPopover', slot);\n}\nconst popoverClasses = generateUtilityClasses('MuiPopover', ['root', 'paper']);\nexport default popoverClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"action\", \"anchorEl\", \"anchorOrigin\", \"anchorPosition\", \"anchorReference\", \"children\", \"className\", \"container\", \"elevation\", \"marginThreshold\", \"open\", \"PaperProps\", \"slots\", \"slotProps\", \"transformOrigin\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"disableScrollLock\"],\n _excluded3 = [\"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses, useSlotProps, isHostComponent } from '@mui/base';\nimport { chainPropTypes, integerPropType, elementTypeAcceptingRef, refType, HTMLElementType } from '@mui/utils';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport debounce from '../utils/debounce';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport useForkRef from '../utils/useForkRef';\nimport Grow from '../Grow';\nimport Modal from '../Modal';\nimport PaperBase from '../Paper';\nimport { getPopoverUtilityClass } from './popoverClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getOffsetTop(rect, vertical) {\n let offset = 0;\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n let offset = 0;\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n return offset;\n}\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(n => typeof n === 'number' ? `${n}px` : n).join(' ');\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPopoverUtilityClass, classes);\n};\nexport const PopoverRoot = styled(Modal, {\n name: 'MuiPopover',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const PopoverPaper = styled(PaperBase, {\n name: 'MuiPopover',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {\n var _slotProps$paper, _slots$root, _slots$paper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopover'\n });\n const {\n action,\n anchorEl,\n anchorOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n anchorPosition,\n anchorReference = 'anchorEl',\n children,\n className,\n container: containerProp,\n elevation = 8,\n marginThreshold = 16,\n open,\n PaperProps: PaperPropsProp = {},\n slots,\n slotProps,\n transformOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n TransitionComponent = Grow,\n transitionDuration: transitionDurationProp = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n disableScrollLock = false\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const externalPaperSlotProps = (_slotProps$paper = slotProps == null ? void 0 : slotProps.paper) != null ? _slotProps$paper : PaperPropsProp;\n const paperRef = React.useRef();\n const handlePaperRef = useForkRef(paperRef, externalPaperSlotProps.ref);\n const ownerState = _extends({}, props, {\n anchorOrigin,\n anchorReference,\n elevation,\n marginThreshold,\n externalPaperSlotProps,\n transformOrigin,\n TransitionComponent,\n transitionDuration: transitionDurationProp,\n TransitionProps\n });\n const classes = useUtilityClasses(ownerState);\n\n // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n const getAnchorOffset = React.useCallback(() => {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '.');\n }\n }\n return anchorPosition;\n }\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n\n // If an anchor element wasn't provided, just use the parent body element of this Popover\n const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n const anchorRect = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n const box = anchorElement.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 return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]);\n\n // Returns the base transform origin using the element\n const getTransformOrigin = React.useCallback(elemRect => {\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical),\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n const getPositioningStyle = React.useCallback(element => {\n const elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n\n // Get the transform origin point on the element itself\n const elemTransformOrigin = getTransformOrigin(elemRect);\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }\n\n // Get the offset of the anchoring element\n const anchorOffset = getAnchorOffset();\n\n // Calculate element positioning\n let top = anchorOffset.top - elemTransformOrigin.vertical;\n let left = anchorOffset.left - elemTransformOrigin.horizontal;\n const bottom = top + elemRect.height;\n const right = left + elemRect.width;\n\n // Use the parent window of the anchorEl if provided\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n\n // Window thresholds taking required margin into account\n const heightThreshold = containerWindow.innerHeight - marginThreshold;\n const widthThreshold = containerWindow.innerWidth - marginThreshold;\n\n // Check if the vertical axis needs shifting\n if (marginThreshold !== null && top < marginThreshold) {\n const diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (marginThreshold !== null && bottom > heightThreshold) {\n const diff = bottom - heightThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n }\n\n // Check if the horizontal axis needs shifting\n if (marginThreshold !== null && left < marginThreshold) {\n const diff = left - marginThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n } else if (right > widthThreshold) {\n const diff = right - widthThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n }\n return {\n top: `${Math.round(top)}px`,\n left: `${Math.round(left)}px`,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);\n const [isPositioned, setIsPositioned] = React.useState(open);\n const setPositioningStyles = React.useCallback(() => {\n const element = paperRef.current;\n if (!element) {\n return;\n }\n const positioning = getPositioningStyle(element);\n if (positioning.top !== null) {\n element.style.top = positioning.top;\n }\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n element.style.transformOrigin = positioning.transformOrigin;\n setIsPositioned(true);\n }, [getPositioningStyle]);\n React.useEffect(() => {\n if (disableScrollLock) {\n window.addEventListener('scroll', setPositioningStyles);\n }\n return () => window.removeEventListener('scroll', setPositioningStyles);\n }, [anchorEl, disableScrollLock, setPositioningStyles]);\n const handleEntering = (element, isAppearing) => {\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n setPositioningStyles();\n };\n const handleExited = () => {\n setIsPositioned(false);\n };\n React.useEffect(() => {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, () => open ? {\n updatePosition: () => {\n setPositioningStyles();\n }\n } : null, [open, setPositioningStyles]);\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n const handleResize = debounce(() => {\n setPositioningStyles();\n });\n const containerWindow = ownerWindow(anchorEl);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [anchorEl, open, setPositioningStyles]);\n let transitionDuration = transitionDurationProp;\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\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 const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n const RootSlot = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : PopoverRoot;\n const PaperSlot = (_slots$paper = slots == null ? void 0 : slots.paper) != null ? _slots$paper : PopoverPaper;\n const paperProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: _extends({}, externalPaperSlotProps, {\n style: isPositioned ? externalPaperSlotProps.style : _extends({}, externalPaperSlotProps.style, {\n opacity: 0\n })\n }),\n additionalProps: {\n elevation,\n ref: handlePaperRef\n },\n ownerState,\n className: clsx(classes.paper, externalPaperSlotProps == null ? void 0 : externalPaperSlotProps.className)\n });\n const _useSlotProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: (slotProps == null ? void 0 : slotProps.root) || {},\n externalForwardedProps: other,\n additionalProps: {\n ref,\n slotProps: {\n backdrop: {\n invisible: true\n }\n },\n container,\n open\n },\n ownerState,\n className: clsx(classes.root, className)\n }),\n {\n slotProps: rootSlotPropsProp\n } = _useSlotProps,\n rootProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded3);\n return /*#__PURE__*/_jsx(RootSlot, _extends({}, rootProps, !isHostComponent(RootSlot) && {\n slotProps: rootSlotPropsProp,\n disableScrollLock\n }, {\n children: /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEntering: handleEntering,\n onExited: handleExited,\n timeout: transitionDuration\n }, TransitionProps, {\n children: /*#__PURE__*/_jsx(PaperSlot, _extends({}, paperProps, {\n children: children\n }))\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.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 * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n /**\n * An HTML element, [PopoverVirtualElement](/material-ui/react-popover/#virtual-element),\n * or a function that returns either.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (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 {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \\`${resolvedAnchorEl}\\` instead.`].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * This is the position that may be used to set the position of the popover.\n * The coordinates are relative to the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n /**\n * This determines which anchor prop to refer to when setting\n * the position of the popover.\n * @default 'anchorEl'\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n /**\n * The content of the component.\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 * An HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's 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 * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * The elevation of the popover.\n * @default 8\n */\n elevation: integerPropType,\n /**\n * Specifies how close to the edge of the window the popover can appear.\n * If null, the popover will not be constrained by the window.\n * @default 16\n */\n marginThreshold: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Props applied to the [`Paper`](/material-ui/api/paper/) element.\n *\n * This prop is an alias for `slotProps.paper` and will be overriden by it if both are used.\n * @deprecated Use `slotProps.paper` instead.\n *\n * @default {}\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\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 * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\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 * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Popover;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"autoFocus\", \"children\", \"className\", \"disableAutoFocusItem\", \"MenuListProps\", \"onClose\", \"open\", \"PaperProps\", \"PopoverClasses\", \"transitionDuration\", \"TransitionProps\", \"variant\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useSlotProps } from '@mui/base/utils';\nimport { HTMLElementType } from '@mui/utils';\nimport MenuList from '../MenuList';\nimport Popover, { PopoverPaper } from '../Popover';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getMenuUtilityClass } from './menuClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const MenuPaper = styled(PopoverPaper, {\n name: 'MuiMenu',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tappable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List',\n overridesResolver: (props, styles) => styles.list\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n var _slots$paper, _slotProps$paper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiMenu'\n });\n const {\n autoFocus = true,\n children,\n className,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n variant = 'selectedMenu',\n slots = {},\n slotProps = {}\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const ownerState = _extends({}, props, {\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, theme);\n }\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const PaperSlot = (_slots$paper = slots.paper) != null ? _slots$paper : MenuPaper;\n const paperExternalSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : PaperProps;\n const rootSlotProps = useSlotProps({\n elementType: slots.root,\n externalSlotProps: slotProps.root,\n ownerState,\n className: [classes.root, className]\n });\n const paperSlotProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: paperExternalSlotProps,\n ownerState,\n className: classes.paper\n });\n return /*#__PURE__*/_jsx(MenuRoot, _extends({\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n slots: {\n paper: PaperSlot,\n root: slots.root\n },\n slotProps: {\n root: rootSlotProps,\n paper: paperSlotProps\n },\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n TransitionProps: _extends({\n onEntering: handleEntering\n }, TransitionProps),\n ownerState: ownerState\n }, other, {\n classes: PopoverClasses,\n children: /*#__PURE__*/_jsx(MenuMenuList, _extends({\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant\n }, MenuListProps, {\n className: clsx(classes.list, MenuListProps.className),\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.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 * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n /**\n * Menu contents, normally `MenuItem`s.\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 * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n /**\n * Props applied to the [`MenuList`](/material-ui/api/menu-list/) element.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n /**\n * `classes` prop applied to the [`Popover`](/material-ui/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\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 * @default {}\n */\n TransitionProps: PropTypes.object,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","import '@/components/mui/context-menu.component.css';\nimport MenuItemList, {\n GroupedMenuPropsBase,\n} from '@/components/mui/grouped-menu-item-list.component';\nimport Menu from '@mui/material/Menu';\nimport React, { PropsWithChildren, useCallback, useMemo } from 'react';\n\nexport type ContextMenuProps = GroupedMenuPropsBase & {\n /** Additional css classes to help with styling of the context menu */\n className?: string;\n};\n\n/**\n * A component that wraps its children, making them the \"target\" of a context menu so that the\n * context menu is displayed when the target is right-clicked.\n *\n * @param {ContextMenuProps & PropsWithChildren} props - The properties for the ContextMenu\n * component which define what menu items to display and supply a command handler for when a menu\n * item is clicked.\n * @returns {JSX.Element} The ContextMenu component (including the wrapped children)\n */\nexport default function ContextMenu({\n className,\n commandHandler,\n menuDefinition,\n children,\n}: PropsWithChildren) {\n const [contextMenuPosition, setContextMenuPosition] = React.useState<\n | {\n mouseX: number;\n mouseY: number;\n }\n | undefined\n >(undefined);\n\n const handleContextMenu = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n setContextMenuPosition(\n contextMenuPosition === undefined\n ? {\n mouseX: event.clientX + 2,\n mouseY: event.clientY - 6,\n }\n : // repeated contextmenu when it is already open closes it with Chrome 84 on Ubuntu\n // Other native context menus might behave different.\n // With this behavior we prevent re-locating existing context menus.\n undefined,\n );\n },\n [contextMenuPosition],\n );\n\n const handleClose = useCallback(() => {\n setContextMenuPosition(undefined);\n }, []);\n\n const anchorPosition = useMemo(() => {\n if (contextMenuPosition !== undefined) {\n return { top: contextMenuPosition.mouseY, left: contextMenuPosition.mouseX };\n }\n return undefined;\n }, [contextMenuPosition]);\n\n // If no menu items or children, we don't want to display the context menu at all.\n return (menuDefinition?.items?.length ?? 0) === 0 || !children ? (\n children\n ) : (\n \n {children}\n \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 { 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 ScriptureReference,\n ScriptureSelection,\n scrRefToBBBCCCVVV,\n} from 'platform-bible-utils';\nimport { MouseEvent, useCallback, 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/**\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 [data, setData] = useState(() => {\n // Initial data extraction from sources\n return sources.flatMap((source) => {\n const src = source.source;\n return source.data.map((item) => ({\n ...item,\n source: src,\n }));\n });\n });\n const [rowSelection, setRowSelection] = useState({});\n\n useEffect(() => {\n // Update data whenever sources change\n setData(() => {\n return sources.flatMap((source) => {\n const src = source.source;\n return source.data.map((item) => ({\n ...item,\n source: src,\n }));\n });\n });\n }, [sources]);\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 toRefOrRange = useCallback(\n (start: ScriptureReference, end: ScriptureReference | undefined) => {\n if (!end || compareScrRefs(start, end) === 0) return `${scrRefToBBBCCCVVV(start)}`;\n return `${scrRefToBBBCCCVVV(start)}-${scrRefToBBBCCCVVV(end)}`;\n },\n [],\n );\n\n const getRowKey = useCallback(\n (row: ScriptureSrcItemDetail) =>\n `${toRefOrRange(row.start, row.end)} ${row.source} ${row.detail}`,\n [toRefOrRange],\n );\n\n const table = useReactTable({\n data,\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 = data.find((row) => getRowKey(row) === keys[0]) || undefined;\n if (selectedRow) onRowSelected(selectedRow);\n }\n }\n }, [rowSelection, data, getRowKey, 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 pr-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 'pr-ps-4';\n default:\n return undefined;\n }\n }\n switch (row.depth) {\n case 1:\n return 'pr-ps-8';\n case 2:\n return 'pr-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 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 'pr-text-sm pr-font-medium pr-leading-none peer-disabled:pr-cursor-not-allowed peer-disabled:pr-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 { 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 TextField from '@/components/basics/text-field.component';\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\nexport default function SearchBar({ onSearch, placeholder, isFullWidth }: SearchBarProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const handleInputChange = (searchString: string) => {\n setSearchQuery(searchString);\n onSearch(searchString);\n };\n\n return (\n handleInputChange(e.target.value)}\n />\n );\n}\n","import '@/components/mui/slider.component.css';\nimport { Slider as MuiSlider } from '@mui/material';\nimport { SyntheticEvent } from 'react';\n\nexport type SliderProps = {\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 * The component orientation.\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * The minimum allowed value of the slider. Should not be equal to max.\n *\n * @default 0\n */\n min?: number;\n /**\n * The maximum allowed value of the slider. Should not be equal to min.\n *\n * @default 100\n */\n max?: number;\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.) The `min`\n * prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible\n * by the step.\n *\n * @default 1\n */\n step?: number;\n /**\n * Marks indicate predetermined values to which the user can move the slider. If `true` the marks\n * are spaced according the value of the `step` prop.\n *\n * @default false\n */\n showMarks?: boolean;\n /** The default value. Use when the component is not controlled. */\n defaultValue?: number;\n /** The value of the slider. For ranged sliders, provide an array with two values. */\n value?: number | number[];\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n *\n * @default 'off'\n */\n valueLabelDisplay?: 'on' | 'auto' | 'off';\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (any). Warning: This is a generic event not a change event.\n * @param value The new value.\n * @param activeThumb Index of the currently moved thumb.\n */\n onChange?: (event: Event, value: number | number[], activeThumb: number) => void;\n /**\n * Callback function that is fired when the mouseup is triggered.\n *\n * @param event The event source of the callback. Warning: This is a generic event not a change\n * event.\n * @param value The new value.\n */\n onChangeCommitted?: (\n event: Event | SyntheticEvent,\n value: number | number[],\n ) => void;\n};\n\n/**\n * Slider that allows selecting a value from a range\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Slider({\n id,\n isDisabled = false,\n orientation = 'horizontal',\n min = 0,\n max = 100,\n step = 1,\n showMarks = false,\n defaultValue,\n value,\n valueLabelDisplay = 'off',\n className,\n onChange,\n onChangeCommitted,\n}: SliderProps) {\n return (\n \n );\n}\n\nexport default Slider;\n","import '@/components/mui/snackbar.component.css';\nimport { Snackbar as MuiSnackbar, SnackbarCloseReason, SnackbarOrigin } from '@mui/material';\nimport { PropsWithChildren, ReactNode, SyntheticEvent } from 'react';\n\nexport type CloseReason = SnackbarCloseReason;\nexport type AnchorOrigin = SnackbarOrigin;\n\nexport type SnackbarContentProps = {\n /** The action to display, renders after the message */\n action?: ReactNode;\n\n /** The message to display */\n message?: ReactNode;\n\n /** Additional css classes to help with unique styling of the snackbar, internal */\n className?: string;\n};\n\nexport type SnackbarProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n\n /**\n * If true, the component is shown\n *\n * @default false\n */\n isOpen?: boolean;\n\n /**\n * The number of milliseconds to wait before automatically calling onClose()\n *\n * @default undefined\n */\n autoHideDuration?: number;\n\n /** Additional css classes to help with unique styling of the snackbar, external */\n className?: string;\n\n /**\n * Optional, used to control the open prop event: Event | SyntheticEvent, reason:\n * string\n */\n onClose?: (event: Event | SyntheticEvent, reason: CloseReason) => void;\n\n /**\n * The anchor of the `Snackbar`. The horizontal alignment is ignored.\n *\n * @default { vertical: 'bottom', horizontal: 'left' }\n */\n anchorOrigin?: AnchorOrigin;\n\n /** Props applied to the [`SnackbarContent`](/material-ui/api/snackbar-content/) element. */\n ContentProps?: SnackbarContentProps;\n}>;\n\n/**\n * Snackbar that provides brief notifications\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Snackbar({\n autoHideDuration = undefined,\n id,\n isOpen = false,\n className,\n onClose,\n anchorOrigin = { vertical: 'bottom', horizontal: 'left' },\n ContentProps,\n children,\n}: SnackbarProps) {\n const newContentProps: SnackbarContentProps = {\n action: ContentProps?.action || children,\n message: ContentProps?.message,\n className,\n };\n\n return (\n \n );\n}\n\nexport default Snackbar;\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 '@/components/mui/switch.component.css';\nimport { Switch as MuiSwitch } from '@mui/material';\nimport { ChangeEvent } from 'react';\n\nexport type SwitchProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/**\n * Switch to toggle on and off\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Switch({\n id,\n isChecked: checked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: SwitchProps) {\n return (\n \n );\n}\n\nexport default Switch;\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 { 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 * 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","// 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 { 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*as t from\"react\";function n(){return n=Object.assign?Object.assign.bind():function(t){for(var n=1;n(t[n.toLowerCase()]=n,t),{for:\"htmlFor\"}),o={amp:\"&\",apos:\"'\",gt:\">\",lt:\"<\",nbsp:\" \",quot:\"“\"},c=[\"style\",\"script\"],a=/([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi,_=/mailto:/i,u=/\\n{2,}$/,i=/^( *>[^\\n]+(\\n[^\\n]+)*\\n*)+\\n{2,}/,s=/^ *> ?/gm,l=/^ {2,}\\n/,f=/^(?:( *[-*_])){3,} *(?:\\n *)+\\n/,d=/^\\s*(`{3,}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s|^#|^ {2,}|^-{2,}|^>\\s)/,P=/\\t/g,Z=/^ *\\| */,G=/(^ *\\||\\| *$)/g,H=/ *$/,q=/^ *:-+: *$/,U=/^ *:-+ *$/,V=/^ *-+: *$/,W=/^([*_])\\1((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\\1\\1(?!\\1)/,Q=/^([*_])((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\\1(?!\\1|\\w)/,X=/^==((?:\\[.*?\\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,J=/^~~((?:\\[.*?\\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,K=/^\\\\([^0-9A-Za-z\\s])/,Y=/^[\\s\\S]+?(?=[^0-9A-Z\\s\\u00c0-\\uffff&#;.()'\"]|\\d+\\.|\\n\\n| {2,}\\n|\\w+:\\S|$)/i,tt=/^\\n+/,nt=/^([ \\t]*)/,et=/\\\\([^\\\\])/g,rt=/ *\\n+$/,ot=/(?:^|\\n)( *)$/,ct=\"(?:\\\\d+\\\\.)\",at=\"(?:[*+-])\";function _t(t){return\"( *)(\"+(1===t?ct:at)+\") +\"}const ut=_t(1),it=_t(2);function st(t){return new RegExp(\"^\"+(1===t?ut:it))}const lt=st(1),ft=st(2);function dt(t){return new RegExp(\"^\"+(1===t?ut:it)+\"[^\\\\n]*(?:\\\\n(?!\\\\1\"+(1===t?ct:at)+\" )[^\\\\n]*)*(\\\\n|$)\",\"gm\")}const pt=dt(1),mt=dt(2);function gt(t){const n=1===t?ct:at;return new RegExp(\"^( *)(\"+n+\") [\\\\s\\\\S]+?(?:\\\\n{2,}(?! )(?!\\\\1\"+n+\" (?!\"+n+\" ))\\\\n*|\\\\s*\\\\n*$)\")}const yt=gt(1),ht=gt(2);function kt(t,n){const e=1===n,r=e?yt:ht,o=e?pt:mt,c=e?lt:ft;return{t(t,n,e){const o=ot.exec(e);return o&&(n.o||!n._&&!n.u)?r.exec(t=o[1]+t):null},i:Ht.HIGH,l(t,n,r){const a=e?+t[2]:void 0,_=t[0].replace(u,\"\\n\").match(o);let i=!1;return{p:_.map(function(t,e){const o=c.exec(t)[0].length,a=new RegExp(\"^ {1,\"+o+\"}\",\"gm\"),u=t.replace(a,\"\").replace(c,\"\"),s=e===_.length-1,l=-1!==u.indexOf(\"\\n\\n\")||s&&i;i=l;const f=r._,d=r.o;let p;r.o=!0,l?(r._=!1,p=u.replace(rt,\"\\n\\n\")):(r._=!0,p=u.replace(rt,\"\"));const m=n(p,r);return r._=f,r.o=d,m}),m:e,g:a}},h:(n,e,r)=>t(n.m?\"ol\":\"ul\",{key:r.k,start:n.g},n.p.map(function(n,o){return t(\"li\",{key:o},e(n,r))}))}}const xt=/^\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,bt=/^!\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,$t=[i,d,p,$,S,v,A,R,pt,yt,mt,ht],vt=[...$t,/^[^\\n]+(?: \\n|\\n{2,})/,z,L];function St(t){return t.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,\"a\").replace(/[çÇ]/g,\"c\").replace(/[ðÐ]/g,\"d\").replace(/[ÈÉÊËéèêë]/g,\"e\").replace(/[ÏïÎîÍíÌì]/g,\"i\").replace(/[Ññ]/g,\"n\").replace(/[øØœŒÕõÔôÓóÒò]/g,\"o\").replace(/[ÜüÛûÚúÙù]/g,\"u\").replace(/[ŸÿÝý]/g,\"y\").replace(/[^a-z0-9- ]/gi,\"\").replace(/ /gi,\"-\").toLowerCase()}function zt(t){return V.test(t)?\"right\":q.test(t)?\"center\":U.test(t)?\"left\":null}function wt(t,n,e){const r=e.$;e.$=!0;const o=n(t.trim(),e);e.$=r;let c=[[]];return o.forEach(function(t,n){\"tableSeparator\"===t.type?0!==n&&n!==o.length-1&&c.push([]):(\"text\"!==t.type||null!=o[n+1]&&\"tableSeparator\"!==o[n+1].type||(t.v=t.v.replace(H,\"\")),c[c.length-1].push(t))}),c}function At(t,n,e){e._=!0;const r=wt(t[1],n,e),o=t[2].replace(G,\"\").split(\"|\").map(zt),c=function(t,n,e){return t.trim().split(\"\\n\").map(function(t){return wt(t,n,e)})}(t[3],n,e);return e._=!1,{S:o,A:c,L:r,type:\"table\"}}function Et(t,n){return null==t.S[n]?{}:{textAlign:t.S[n]}}function Lt(t){return function(n,e){return e._?t.exec(n):null}}function Mt(t){return function(n,e){return e._||e.u?t.exec(n):null}}function Ot(t){return function(n,e){return e._||e.u?null:t.exec(n)}}function It(t){return function(n){return t.exec(n)}}function jt(t,n,e){if(n._||n.u)return null;if(e&&!e.endsWith(\"\\n\"))return null;let r=\"\";t.split(\"\\n\").every(t=>!$t.some(n=>n.test(t))&&(r+=t+\"\\n\",t.trim()));const o=r.trimEnd();return\"\"==o?null:[r,o]}function Bt(t){try{if(decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,\"\").match(/^\\s*(javascript|vbscript|data(?!:image)):/i))return}catch(t){return null}return t}function Rt(t){return t.replace(et,\"$1\")}function Tt(t,n,e){const r=e._||!1,o=e.u||!1;e._=!0,e.u=!0;const c=t(n,e);return e._=r,e.u=o,c}function Ct(t,n,e){const r=e._||!1,o=e.u||!1;e._=!1,e.u=!0;const c=t(n,e);return e._=r,e.u=o,c}function Dt(t,n,e){return e._=!1,t(n,e)}const Ft=(t,n,e)=>({v:Tt(n,t[1],e)});function Nt(){return{}}function Pt(){return null}function Zt(...t){return t.filter(Boolean).join(\" \")}function Gt(t,n,e){let r=t;const o=n.split(\".\");for(;o.length&&(r=r[o[0]],void 0!==r);)o.shift();return r||e}var Ht;function qt(e,u={}){u.overrides=u.overrides||{},u.slugify=u.slugify||St,u.namedCodesToUnicode=u.namedCodesToUnicode?n({},o,u.namedCodesToUnicode):o;const G=u.createElement||t.createElement;function H(t,e,...r){const o=Gt(u.overrides,`${t}.props`,{});return G(function(t,n){const e=Gt(n,t);return e?\"function\"==typeof e||\"object\"==typeof e&&\"render\"in e?e:Gt(n,`${t}.component`,t):t}(t,u.overrides),n({},e,o,{className:Zt(null==e?void 0:e.className,o.className)||void 0}),...r)}function q(n){let e=!1;u.forceInline?e=!0:u.forceBlock||(e=!1===N.test(n));const r=ct(ot(e?n:`${n.trimEnd().replace(tt,\"\")}\\n\\n`,{_:e}));for(;\"string\"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===u.wrapper)return r;const o=u.wrapper||(e?\"span\":\"div\");let c;if(r.length>1||u.forceWrapper)c=r;else{if(1===r.length)return c=r[0],\"string\"==typeof c?H(\"span\",{key:\"outer\"},c):c;c=null}return t.createElement(o,{key:\"outer\"},c)}function U(n){const e=n.match(a);return e?e.reduce(function(n,e,o){const c=e.indexOf(\"=\");if(-1!==c){const a=function(t){return-1!==t.indexOf(\"-\")&&null===t.match(E)&&(t=t.replace(B,function(t,n){return n.toUpperCase()})),t}(e.slice(0,c)).trim(),_=function(t){const n=t[0];return('\"'===n||\"'\"===n)&&t.length>=2&&t[t.length-1]===n?t.slice(1,-1):t}(e.slice(c+1).trim()),u=r[a]||a,i=n[u]=function(t,n){return\"style\"===t?n.split(/;\\s?/).reduce(function(t,n){const e=n.slice(0,n.indexOf(\":\"));return t[e.replace(/(-[a-z])/g,t=>t[1].toUpperCase())]=n.slice(e.length+1).trim(),t},{}):\"href\"===t?Bt(n):(n.match(M)&&(n=n.slice(1,n.length-1)),\"true\"===n||\"false\"!==n&&n)}(a,_);\"string\"==typeof i&&(z.test(i)||L.test(i))&&(n[u]=t.cloneElement(q(i.trim()),{key:o}))}else\"style\"!==e&&(n[r[e]||e]=!0);return n},{}):null}const V=[],et={},rt={blockQuote:{t:Ot(i),i:Ht.HIGH,l:(t,n,e)=>({v:n(t[0].replace(s,\"\"),e)}),h:(t,n,e)=>H(\"blockquote\",{key:e.k},n(t.v,e))},breakLine:{t:It(l),i:Ht.HIGH,l:Nt,h:(t,n,e)=>H(\"br\",{key:e.k})},breakThematic:{t:Ot(f),i:Ht.HIGH,l:Nt,h:(t,n,e)=>H(\"hr\",{key:e.k})},codeBlock:{t:Ot(p),i:Ht.MAX,l:t=>({v:t[0].replace(/^ {4}/gm,\"\").replace(/\\n+$/,\"\"),M:void 0}),h:(t,e,r)=>H(\"pre\",{key:r.k},H(\"code\",n({},t.O,{className:t.M?`lang-${t.M}`:\"\"}),t.v))},codeFenced:{t:Ot(d),i:Ht.MAX,l:t=>({O:U(t[3]||\"\"),v:t[4],M:t[2]||void 0,type:\"codeBlock\"})},codeInline:{t:Mt(m),i:Ht.LOW,l:t=>({v:t[2]}),h:(t,n,e)=>H(\"code\",{key:e.k},t.v)},footnote:{t:Ot(h),i:Ht.MAX,l:t=>(V.push({I:t[2],j:t[1]}),{}),h:Pt},footnoteReference:{t:Lt(k),i:Ht.HIGH,l:t=>({v:t[1],B:`#${u.slugify(t[1])}`}),h:(t,n,e)=>H(\"a\",{key:e.k,href:Bt(t.B)},H(\"sup\",{key:e.k},t.v))},gfmTask:{t:Lt(b),i:Ht.HIGH,l:t=>({R:\"x\"===t[1].toLowerCase()}),h:(t,n,e)=>H(\"input\",{checked:t.R,key:e.k,readOnly:!0,type:\"checkbox\"})},heading:{t:Ot(u.enforceAtxHeadings?v:$),i:Ht.HIGH,l:(t,n,e)=>({v:Tt(n,t[2],e),T:u.slugify(t[2]),C:t[1].length}),h:(t,n,e)=>H(`h${t.C}`,{id:t.T,key:e.k},n(t.v,e))},headingSetext:{t:Ot(S),i:Ht.MAX,l:(t,n,e)=>({v:Tt(n,t[1],e),C:\"=\"===t[2]?1:2,type:\"heading\"})},htmlComment:{t:It(A),i:Ht.HIGH,l:()=>({}),h:Pt},image:{t:Mt(bt),i:Ht.HIGH,l:t=>({D:t[1],B:Rt(t[2]),F:t[3]}),h:(t,n,e)=>H(\"img\",{key:e.k,alt:t.D||void 0,title:t.F||void 0,src:Bt(t.B)})},link:{t:Lt(xt),i:Ht.LOW,l:(t,n,e)=>({v:Ct(n,t[1],e),B:Rt(t[2]),F:t[3]}),h:(t,n,e)=>H(\"a\",{key:e.k,href:Bt(t.B),title:t.F},n(t.v,e))},linkAngleBraceStyleDetector:{t:Lt(j),i:Ht.MAX,l:t=>({v:[{v:t[1],type:\"text\"}],B:t[1],type:\"link\"})},linkBareUrlDetector:{t:(t,n)=>n.N?null:Lt(O)(t,n),i:Ht.MAX,l:t=>({v:[{v:t[1],type:\"text\"}],B:t[1],F:void 0,type:\"link\"})},linkMailtoDetector:{t:Lt(I),i:Ht.MAX,l(t){let n=t[1],e=t[1];return _.test(e)||(e=\"mailto:\"+e),{v:[{v:n.replace(\"mailto:\",\"\"),type:\"text\"}],B:e,type:\"link\"}}},orderedList:kt(H,1),unorderedList:kt(H,2),newlineCoalescer:{t:Ot(g),i:Ht.LOW,l:Nt,h:()=>\"\\n\"},paragraph:{t:jt,i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"p\",{key:e.k},n(t.v,e))},ref:{t:Lt(T),i:Ht.MAX,l:t=>(et[t[1]]={B:t[2],F:t[4]},{}),h:Pt},refImage:{t:Mt(C),i:Ht.MAX,l:t=>({D:t[1]||void 0,P:t[2]}),h:(t,n,e)=>H(\"img\",{key:e.k,alt:t.D,src:Bt(et[t.P].B),title:et[t.P].F})},refLink:{t:Lt(D),i:Ht.MAX,l:(t,n,e)=>({v:n(t[1],e),Z:n(t[0].replace(F,\"\\\\$1\"),e),P:t[2]}),h:(t,n,e)=>et[t.P]?H(\"a\",{key:e.k,href:Bt(et[t.P].B),title:et[t.P].F},n(t.v,e)):H(\"span\",{key:e.k},n(t.Z,e))},table:{t:Ot(R),i:Ht.HIGH,l:At,h:(t,n,e)=>H(\"table\",{key:e.k},H(\"thead\",null,H(\"tr\",null,t.L.map(function(r,o){return H(\"th\",{key:o,style:Et(t,o)},n(r,e))}))),H(\"tbody\",null,t.A.map(function(r,o){return H(\"tr\",{key:o},r.map(function(r,o){return H(\"td\",{key:o,style:Et(t,o)},n(r,e))}))})))},tableSeparator:{t:function(t,n){return n.$?(n._=!0,Z.exec(t)):null},i:Ht.HIGH,l:function(){return{type:\"tableSeparator\"}},h:()=>\" | \"},text:{t:It(Y),i:Ht.MIN,l:t=>({v:t[0].replace(w,(t,n)=>u.namedCodesToUnicode[n]?u.namedCodesToUnicode[n]:t)}),h:t=>t.v},textBolded:{t:Mt(W),i:Ht.MED,l:(t,n,e)=>({v:n(t[2],e)}),h:(t,n,e)=>H(\"strong\",{key:e.k},n(t.v,e))},textEmphasized:{t:Mt(Q),i:Ht.LOW,l:(t,n,e)=>({v:n(t[2],e)}),h:(t,n,e)=>H(\"em\",{key:e.k},n(t.v,e))},textEscaped:{t:Mt(K),i:Ht.HIGH,l:t=>({v:t[1],type:\"text\"})},textMarked:{t:Mt(X),i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"mark\",{key:e.k},n(t.v,e))},textStrikethroughed:{t:Mt(J),i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"del\",{key:e.k},n(t.v,e))}};!0!==u.disableParsingRawHTML&&(rt.htmlBlock={t:It(z),i:Ht.HIGH,l(t,n,e){const[,r]=t[3].match(nt),o=new RegExp(`^${r}`,\"gm\"),a=t[3].replace(o,\"\"),_=(u=a,vt.some(t=>t.test(u))?Dt:Tt);var u;const i=t[1].toLowerCase(),s=-1!==c.indexOf(i);e.N=e.N||\"a\"===i;const l=s?t[3]:_(n,a,e);return e.N=!1,{O:U(t[2]),v:l,G:s,H:s?i:t[1]}},h:(t,e,r)=>H(t.H,n({key:r.k},t.O),t.G?t.v:e(t.v,r))},rt.htmlSelfClosing={t:It(L),i:Ht.HIGH,l:t=>({O:U(t[2]||\"\"),H:t[1]}),h:(t,e,r)=>H(t.H,n({},t.O,{key:r.k}))});const ot=function(t){let n=Object.keys(t);function e(r,o){let c=[],a=\"\";for(;r;){let _=0;for(;_{let{children:r,options:o}=n,c=function(t,n){if(null==t)return{};var e,r,o={},c=Object.keys(t);for(r=0;r=0||(o[e]=t[e]);return o}(n,e);return t.cloneElement(qt(r,o),c)};export{qt as compiler};\n//# sourceMappingURL=index.modern.js.map\n","import Markdown from 'markdown-to-jsx';\n\ninterface MarkdownRendererProps {\n /** Optional unique identifier */\n id?: string;\n /** The markdown string to render */\n markdown: 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({ id, markdown }: MarkdownRendererProps) {\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=\"pr-text-xs pr-text-gray-500 pr-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=\"pr-text-xs pr-text-gray-500 pr-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","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 React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst alertVariants = cva(\n 'pr-relative pr-w-full pr-rounded-lg pr-border pr-p-4 [&>svg~*]:pr-pl-7 [&>svg+div]:pr-translate-y-[-3px] [&>svg]:pr-absolute [&>svg]:pr-left-4 [&>svg]:pr-top-4 [&>svg]:pr-text-foreground',\n {\n variants: {\n variant: {\n default: 'pr-bg-background pr-text-foreground',\n destructive:\n 'pr-border-destructive/50 pr-text-destructive dark:pr-border-destructive [&>svg]:pr-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 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"],"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","r","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","DataTableViewOptions","table","FilterIcon","column","value","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","getLinesFromUSFM","text","extractNumberFromUSFM","regex","match","extractOccurrences","item","extractItems","scriptureRef","results","lines","currentChapter","currentVerse","line","items","result","OccurrencesTable","selectedItem","scriptureReference","setScriptureReference","localizedStrings","reference","occurrence","tableData","setTableData","INVENTORY_STRING_KEYS","getSortingIcon","sortDirection","ArrowUpIcon","ArrowDownIcon","ArrowUpDownIcon","filterItemData","statusFilter","textFilter","filteredItemData","convertTextToItemData","getInventoryItems","getStatusForItem","itemData","itemIndex","existingItem","entry","newItem","localizeString","strings","Inventory","approvedItems","onApprovedItemsChange","unapprovedItems","onUnapprovedItemsChange","scope","onScopeChange","getColumns","allItemsText","approvedItemsText","unapprovedItemsText","unknownItemsText","scopeBookText","scopeChapterText","scopeVerseText","filterText","setItems","setStatusFilter","setTextFilter","setSelectedItem","statusChangeHandler","changedItems","status","prevTableData","tableEntry","newApprovedItems","validItem","newUnapprovedItems","unapprovedItem","useMemo","rowClickHandler","newScriptureReference","inventoryItemColumn","itemLabel","inventoryCountColumn","countLabel","inventoryStatusColumn","statusLabel","selectedRows","CircleCheckIcon","CircleXIcon","CircleHelpIcon","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","onChange","getOptionLabel","buttonPlaceholder","textPlaceholder","commandEmptyMessage","buttonVariant","dir","setOpen","ChevronsUpDown","ChapterRangeSelector","handleSelectStartChapter","handleSelectEndChapter","isDisabled","chapterCount","startChapter","setStartChapter","setEndChapter","chapterOptions","setChapterOptions","Fragment","FormControlLabel","LabelPosition","Checkbox","isChecked","labelText","labelPosition","isIndeterminate","isDefaultChecked","hasError","checkBox","MuiCheckbox","preceding","labelSpan","labelIsInline","label","checkBoxElement","FormLabel","Checklist","legend","listItems","selectedListItems","handleSelectListItem","createLabel","_interopRequireDefault","obj","module","chainPropTypes","propType1","propType2","args","_extends","target","source","isPlainObject","prototype","deepClone","output","deepmerge","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","isSymbol","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","isClassComponent","elementType","acceptingRef","safePropName","warningHint","elementAcceptingRef","PropTypes","elementAcceptingRef$1","elementTypeAcceptingRef","elementTypeAcceptingRef$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","getScrollbarSize","documentWidth","getTypeByValue","valueType","ponyfillIsInteger","isInteger","requiredInteger","other","validatorNoop","integerPropType","resolveProps","defaultProps","defaultSlotProps","slotProps","slotPropName","composeClasses","slots","getUtilityClass","classes","slot","utilityClass","defaultGenerator","createClassNameGenerator","generate","generator","ClassNameGenerator","ClassNameGenerator$1","globalStateClasses","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","clamp","min","max","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","breakpoints","unit","sortedValues","keys","up","down","between","start","end","endIndex","only","not","keyIndex","shape","shape$1","responsivePropType","responsivePropType$1","merge","defaultBreakpoints","handleBreakpoints","styleFromPropValue","theme","themeBreakpoints","index","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","direction","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","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","primary","secondary","info","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","candidatesSelector","getTabIndex","tabindexAttr","isNonTabbableRadio","getRadio","selector","roving","isNodeMatchingSelectorFocusable","defaultGetTabbable","root","regularTabNodes","orderedTabNodes","nodeTabIndex","defaultIsEnabled","FocusTrap","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","rootRef","handleRef","lastKeydown","loopFocus","nativeEvent","contain","rootElement","tabbable","_lastKeydown$current","_lastKeydown$current2","isShiftTab","focusNext","focusPrevious","interval","onFocus","childrenPropsHandler","handleFocusSentinel","getContainer","container","forwardedRef","disablePortal","mountNode","setMountNode","newProps","ReactDOM","isOverflowing","ariaHidden","show","getPaddingRight","isAriaHiddenForbiddenOnElement","isForbiddenTagName","isInputHidden","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","blacklist","isNotExcludedElement","isNotForbiddenElement","findIndexOf","callback","idx","handleContainer","containerInfo","restoreStyle","scrollbarSize","fixedElements","scrollContainer","parent","containerWindow","el","getHiddenSiblings","hiddenSiblings","ModalManager","modal","modalIndex","containerIndex","ariaHiddenState","nextTop","getHasTransition","defaultManager","useModal","disableEscapeKeyDown","disableScrollLock","manager","closeAfterTransition","onTransitionEnter","onTransitionExited","onClose","mountNodeRef","modalRef","exited","setExited","hasTransition","ariaHiddenProp","getDoc","getModal","handleMounted","handleOpen","resolvedContainer","isTopModal","handlePortalRef","handleClose","createHandleKeyDown","otherHandlers","_otherHandlers$onKeyD","createHandleBackdropClick","_otherHandlers$onClic","propsEventHandlers","externalEventHandlers","handleEnter","handleExited","top","bottom","right","left","auto","basePlacements","clippingParents","viewport","popper","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","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","resolvedAnchorEl","display","transitionProps","useThemeSystem","_setPrototypeOf","_inheritsLoose","subClass","superClass","setPrototypeOf","timeoutsShape","TransitionGroupContext","forceReflow","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","context","_this","parentGroup","appear","initialStatus","prevState","nextIn","_proto","prevProps","nextStatus","exit","enter","mounting","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","_this3","nextState","_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","getOverlayAlpha","elevation","alphaValue","getOverlayAlpha$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","onOpen","openProp","PopperComponentProp","PopperProps","title","TransitionComponentProp","isRtl","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","handleLeave","focusVisibleRef","setChildIsFocusVisible","handleBlur","handleFocus","detectTouchStart","childrenProps","handleMouseOver","handleMouseLeave","handleTouchStart","handleTouchEnd","handleMouseMove","nameOrDescProps","titleIsString","interactiveWrapperListeners","_PopperProps$popperOp","tooltipModifiers","PopperComponent","TooltipComponent","ArrowComponent","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","Tooltip$1","getIcon","icon","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","firstItem","divKey","itemInfo","menuItemProps","TopLevelMenu","columnId","MenuColumn","metadata","Grid","List","GridMenu","multiColumnMenu","sortedColumns","columnNumbers","columnName","col","ListContext","ListContext$1","getListUtilityClass","disablePadding","dense","subheader","ListRoot","List$1","nextItem","disableListWrap","previousItem","textCriteriaMatches","nextFocus","textCriteria","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","MenuList","actions","autoFocus","autoFocusItem","onKeyDown","listRef","textCriteriaRef","containerElement","noExplicitWidth","criteria","lowerKey","currTime","keepFocusOnCurrent","activeItemIndex","newChildProps","MenuList$1","Fade","defaultTimeout","Fade$1","getBackdropUtilityClass","invisible","BackdropRoot","Backdrop","_slotProps$root","rootSlotProps","Backdrop$1","getModalUtilityClass","ModalRoot","ModalBackdrop","Modal","_slots$backdrop","_slotProps$backdrop","BackdropComponent","BackdropProps","hideBackdrop","onBackdropClick","propsWithDefaults","getRootProps","getBackdropProps","portalRef","RootSlot","BackdropSlot","backdropSlotProps","backdropProps","Modal$1","getPaperUtilityClass","square","PaperRoot","_theme$vars$overlays","Paper","PaperBase","getPopoverUtilityClass","getOffsetTop","vertical","getOffsetLeft","horizontal","getTransformOriginValue","transformOrigin","PopoverRoot","PopoverPaper","_slotProps$paper","_slots$paper","action","anchorOrigin","anchorPosition","anchorReference","marginThreshold","PaperPropsProp","transitionDurationProp","externalPaperSlotProps","paperRef","handlePaperRef","getAnchorOffset","anchorElement","anchorRect","getTransformOrigin","elemRect","getPositioningStyle","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","diff","isPositioned","setIsPositioned","setPositioningStyles","positioning","handleResize","PaperSlot","paperProps","_useSlotProps","rootSlotPropsProp","Popover$1","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","MenuPaper","MenuMenuList","disableAutoFocusItem","MenuListProps","PaperProps","PopoverClasses","menuListActionsRef","handleListKeyDown","paperExternalSlotProps","paperSlotProps","Menu$1","ContextMenu","contextMenuPosition","setContextMenuPosition","handleContextMenu","MenuItemList","getUsePromiseOptionsDefaults","usePromise","promiseFactoryCallback","defaultValueRef","optionsDefaultedRef","isLoading","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","scrBookColId","scrRefColId","typeColId","detailsColId","defaultScrRefColumnName","defaultScrBookGroupName","defaultTypeColumnName","defaultDetailsColumnName","colInfo","showSourceColumn","showSrcCol","formatScrRef","compareScrRefs","ScriptureResultsViewer","sources","showColumnHeaders","scriptureReferenceColumnName","scriptureBookGroupName","typeColumnName","detailsColumnName","onRowSelected","grouping","setGrouping","setData","src","toRefOrRange","scrRefToBBBCCCVVV","getRowKey","getExpandedRowModel","getGroupedRowModel","selectedRow","scrBookGroupName","typeGroupName","groupingOptions","handleSelectChange","selectedGrouping","handleRowClick","getEvenOrOddBandingStyle","getIndent","groupingState","rowIndex","ChevronLeft","labelVariants","Label","LabelPrimitive","TextField","isFullWidth","helperText","placeholder","onBlur","ShadLabel","SearchBar","onSearch","handleInputChange","Slider","orientation","showMarks","valueLabelDisplay","onChangeCommitted","MuiSlider","Snackbar","autoHideDuration","isOpen","ContentProps","newContentProps","MuiSnackbar","Spinner","LoaderCircle","Switch","MuiSwitch","Toolbar","AppBar","MuiToolbar","Tabs","TabsPrimitive","TabsList","TabsTrigger","TabsContent","VerticalTabs","VerticalTabsList","VerticalTabsTrigger","VerticalTabsContent","InstallButton","isInstalling","handleClick","buttonText","Download","EnableButton","isEnabling","DisableButton","isDisabling","UpdateButton","isUpdating","$","M","j","F","Z","W","Q","Y","tt","nt","et","rt","ot","ct","at","_t","ut","it","st","lt","ft","dt","mt","gt","yt","ht","kt","Ht","xt","bt","$t","vt","St","zt","wt","At","Et","Lt","Mt","Ot","It","jt","Bt","Rt","Tt","Ct","Dt","Ft","Nt","Pt","Zt","Gt","qt","Markdown","MarkdownRenderer","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","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","alertVariants","Alert","AlertTitle","AlertDescription","SliderPrimitive","SwitchPrimitives"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,KAAgBC,GAAoB,EAAE,QAAQ,MAAO,CAAA;AAIpD,SAASC,KAAMC,GAAsB;AACnC,SAAAH,GAAcI,GAAKD,CAAM,CAAC;AACnC;ACJO,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,GAA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EACA;AAAA;AAAA,EAEA;AAAA,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;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;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[3,27,28,29,30,31,32,33,34,35,36,37,38,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,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,233,251]} \ 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/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/inventory-utils.ts","../src/components/advanced/inventory/occurrences-table.component.tsx","../src/components/advanced/inventory/inventory.component.tsx","../src/components/advanced/inventory/inventory-columns.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/mui/chapter-range-selector.component.tsx","../src/components/mui/label-position.model.ts","../src/components/mui/checkbox.component.tsx","../src/components/mui/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/elementTypeAcceptingRef/elementTypeAcceptingRef.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/getScrollbarSize/getScrollbarSize.js","../../../node_modules/@mui/utils/integerPropType/integerPropType.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/FocusTrap/FocusTrap.js","../../../node_modules/@mui/base/Portal/Portal.js","../../../node_modules/@mui/base/unstable_useModal/ModalManager.js","../../../node_modules/@mui/base/unstable_useModal/useModal.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/styles/getOverlayAlpha.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","../../../node_modules/@mui/material/List/ListContext.js","../../../node_modules/@mui/material/List/listClasses.js","../../../node_modules/@mui/material/List/List.js","../../../node_modules/@mui/material/MenuList/MenuList.js","../../../node_modules/@mui/material/Fade/Fade.js","../../../node_modules/@mui/material/Backdrop/backdropClasses.js","../../../node_modules/@mui/material/Backdrop/Backdrop.js","../../../node_modules/@mui/material/Modal/modalClasses.js","../../../node_modules/@mui/material/Modal/Modal.js","../../../node_modules/@mui/material/Paper/paperClasses.js","../../../node_modules/@mui/material/Paper/Paper.js","../../../node_modules/@mui/material/Popover/popoverClasses.js","../../../node_modules/@mui/material/Popover/Popover.js","../../../node_modules/@mui/material/Menu/menuClasses.js","../../../node_modules/@mui/material/Menu/Menu.js","../src/components/mui/context-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/advanced/scripture-results-viewer/scripture-results-viewer.component.tsx","../src/components/basics/search-bar.component.tsx","../src/components/mui/slider.component.tsx","../src/components/mui/snackbar.component.tsx","../src/components/basics/tabs-vertical.tsx","../src/components/advanced/navigation-content-search.component.tsx","../src/components/shadcn-ui/separator.tsx","../src/components/advanced/settings-components/settings-list.component.tsx","../src/components/basics/spinner.component.tsx","../src/components/mui/switch.component.tsx","../src/components/shadcn-ui/label.tsx","../src/components/basics/text-field.component.tsx","../src/components/mui/toolbar.component.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","../../../node_modules/markdown-to-jsx/dist/index.modern.js","../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","../src/components/shadcn-ui/card.tsx","../src/components/shadcn-ui/alert.tsx","../src/components/shadcn-ui/slider.tsx","../src/components/shadcn-ui/switch.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\nconst twMergeCustom = extendTailwindMerge({ prefix: 'pr-' });\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 pr-inline-flex pr-items-center pr-justify-center pr-whitespace-nowrap pr-rounded-md pr-text-sm pr-font-medium pr-ring-offset-background pr-transition-colors focus-visible:pr-outline-none focus-visible:pr-ring-2 focus-visible:pr-ring-ring focus-visible:pr-ring-offset-2 disabled:pr-pointer-events-none disabled:pr-opacity-50',\n {\n variants: {\n variant: {\n default: 'pr-bg-primary pr-text-primary-foreground hover:pr-bg-primary/90',\n destructive: 'pr-bg-destructive pr-text-destructive-foreground hover:pr-bg-destructive/90',\n outline:\n 'pr-border pr-border-input pr-bg-background hover:pr-bg-accent hover:pr-text-accent-foreground',\n secondary: 'pr-bg-secondary pr-text-secondary-foreground hover:pr-bg-secondary/80',\n ghost: 'hover:pr-bg-accent hover:pr-text-accent-foreground',\n link: 'pr-text-primary pr-underline-offset-4 hover:pr-underline',\n },\n size: {\n default: 'pr-h-10 pr-px-4 pr-py-2',\n sm: 'pr-h-9 pr-rounded-md pr-px-3',\n lg: 'pr-h-11 pr-rounded-md pr-px-8',\n icon: 'pr-h-10 pr-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 { 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]:pr-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:pr-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 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;\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\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","export const getLinesFromUSFM = (text: string) => {\n return text.split(/(?=\\n|\\\\(?:v|c|id))/g);\n};\n\nexport const extractNumberFromUSFM = (text: string): number => {\n const regex = /^\\\\[vc]\\s+(\\d+)/;\n const match = text.match(regex);\n if (match) {\n return +match[1];\n }\n return 0;\n};\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 { LanguageStrings, ScriptureReference } from 'platform-bible-utils';\nimport { useEffect, useState } from 'react';\nimport { extractNumberFromUSFM, getLinesFromUSFM } from './inventory-utils';\n\ntype SearchResult = {\n reference: ScriptureReference;\n snippet: string;\n key: number;\n};\n\nconst extractOccurrences = (\n text: string | undefined,\n item: string,\n extractItems: (text: string, item?: string | undefined) => string[],\n scriptureRef: ScriptureReference,\n): SearchResult[] => {\n if (!text || text === '' || item === '') return [];\n\n const results: SearchResult[] = [];\n const lines = getLinesFromUSFM(text);\n\n let currentChapter: number = scriptureRef.chapterNum;\n let currentVerse: number = scriptureRef.verseNum;\n let key: number = 0;\n\n lines.forEach((line) => {\n if (line.startsWith('\\\\id')) {\n currentChapter = 0;\n currentVerse = 0;\n }\n if (line.startsWith('\\\\c')) {\n currentChapter = extractNumberFromUSFM(line);\n currentVerse = 0;\n }\n if (line.startsWith('\\\\v')) {\n currentVerse = extractNumberFromUSFM(line);\n if (currentChapter === 0) {\n currentChapter = scriptureRef.chapterNum;\n }\n }\n\n const items: string[] = extractItems(line, item);\n\n for (let i = 0; i < items.length; i++) {\n const result: SearchResult = {\n reference: { ...scriptureRef, chapterNum: +currentChapter, verseNum: +currentVerse },\n snippet: line,\n key,\n };\n key += 1;\n results.push(result);\n }\n });\n\n return results;\n};\n\ninterface OccurrencesTableProps {\n selectedItem: string;\n text: string | undefined;\n extractItems: (text: string, item?: string | undefined) => string[];\n scriptureReference: ScriptureReference;\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n localizedStrings: LanguageStrings;\n}\n\nfunction OccurrencesTable({\n selectedItem,\n text,\n extractItems,\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n}: OccurrencesTableProps) {\n const reference = localizedStrings['%webView_inventory_occurrences_table_header_reference%'];\n const occurrence = localizedStrings['%webView_inventory_occurrences_table_header_occurrence%'];\n const [tableData, setTableData] = useState(\n extractOccurrences(text, selectedItem, extractItems, scriptureReference),\n );\n\n useEffect(\n () => setTableData(extractOccurrences(text, selectedItem, extractItems, scriptureReference)),\n [text, selectedItem, scriptureReference, extractItems],\n );\n\n return (\n \n \n \n {reference}\n {occurrence}\n \n \n \n {tableData.map((result) => (\n {\n setScriptureReference(result.reference);\n }}\n >\n {`${Canon.bookNumberToEnglishName(result.reference.bookNum)} ${result.reference.chapterNum}:${result.reference.verseNum}`}\n {result.snippet}\n \n ))}\n \n
\n );\n}\n\nexport default OccurrencesTable;\n","import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';\nimport { LocalizedStringValue, ScriptureReference } from 'platform-bible-utils';\nimport { Input } from '@/components/shadcn-ui/input';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/components/shadcn-ui/select';\nimport DataTable, {\n ColumnDef,\n RowContents,\n SortDirection,\n TableContents,\n} from '@/components/advanced/data-table/data-table.component';\nimport OccurrencesTable from '@/components/advanced/inventory/occurrences-table.component';\nimport { ArrowDownIcon, ArrowUpDownIcon, ArrowUpIcon } from 'lucide-react';\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_book%',\n '%webView_inventory_scope_chapter%',\n '%webView_inventory_scope_verse%',\n '%webView_inventory_filter_text%',\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\nexport type Status = 'approved' | 'unapproved' | 'unknown';\n\nexport type ItemData = {\n item: string;\n count: number;\n status: Status;\n};\n\nexport const getSortingIcon = (sortDirection: false | SortDirection): ReactNode => {\n if (sortDirection === 'asc') {\n return ;\n }\n if (sortDirection === 'desc') {\n return ;\n }\n return ;\n};\n\nconst filterItemData = (\n items: ItemData[],\n statusFilter: string,\n textFilter: string,\n): ItemData[] => {\n let filteredItemData: ItemData[] = items;\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.item.includes(textFilter));\n\n return filteredItemData;\n};\n\nconst convertTextToItemData = (\n text: string,\n getInventoryItems: (text: string) => string[],\n getStatusForItem: (item: string) => Status,\n): ItemData[] => {\n const itemData: ItemData[] = [];\n\n const items: string[] = getInventoryItems(text);\n\n for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {\n const item = items[itemIndex];\n const existingItem = itemData.find((entry) => {\n return entry.item === item;\n });\n if (existingItem) {\n existingItem.count += 1;\n } else {\n const newItem: ItemData = {\n item,\n count: 1,\n status: getStatusForItem(item),\n };\n itemData.push(newItem);\n }\n }\n\n return itemData;\n};\n\nconst localizeString = (\n strings: InventoryLocalizedStrings,\n key: keyof InventoryLocalizedStrings,\n) => {\n return strings[key] ?? key;\n};\n\ninterface InventoryProps {\n scriptureReference: ScriptureReference;\n setScriptureReference: (scriptureReference: ScriptureReference) => void;\n localizedStrings: InventoryLocalizedStrings;\n extractItems: (text: string, item?: string | undefined) => string[];\n approvedItems: string[];\n onApprovedItemsChange: (items: string[]) => void;\n unapprovedItems: string[];\n onUnapprovedItemsChange: (items: string[]) => void;\n text: string | undefined;\n scope: string;\n onScopeChange: (scope: string) => void;\n getColumns: (\n onStatusChange: (newItems: string[], status: Status) => void,\n ) => ColumnDef[];\n}\n\nfunction Inventory({\n scriptureReference,\n setScriptureReference,\n localizedStrings,\n extractItems,\n approvedItems,\n onApprovedItemsChange,\n unapprovedItems,\n onUnapprovedItemsChange,\n text,\n scope,\n onScopeChange,\n getColumns,\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_book%');\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\n const [items, setItems] = useState([]);\n const [statusFilter, setStatusFilter] = useState('all');\n const [textFilter, setTextFilter] = useState('');\n const [selectedItem, setSelectedItem] = useState('');\n\n const statusChangeHandler = useCallback(\n (changedItems: string[], status: Status) => {\n setItems((prevTableData) => {\n let tableData: ItemData[] = [];\n changedItems.forEach((item) => {\n tableData = prevTableData.map((tableEntry) => {\n if (tableEntry.item === item && tableEntry.status !== status)\n return { ...tableEntry, status };\n return tableEntry;\n });\n });\n return tableData;\n });\n\n let newApprovedItems: string[] = [...approvedItems];\n changedItems.forEach((item) => {\n if (status === '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 (status === 'unapproved') {\n if (!newUnapprovedItems.includes(item)) {\n newUnapprovedItems.push(item);\n }\n } else {\n newUnapprovedItems = newUnapprovedItems.filter(\n (unapprovedItem) => unapprovedItem !== item,\n );\n }\n });\n onUnapprovedItemsChange(newUnapprovedItems);\n },\n [approvedItems, onApprovedItemsChange, unapprovedItems, onUnapprovedItemsChange],\n );\n\n const getStatusForItem = useCallback(\n (item: string): Status => {\n if (approvedItems.includes(item)) return 'approved';\n if (unapprovedItems.includes(item)) return 'unapproved';\n return 'unknown';\n },\n [approvedItems, unapprovedItems],\n );\n\n useEffect(() => {\n if (!text) return;\n setItems(convertTextToItemData(text, extractItems, getStatusForItem));\n }, [extractItems, text, getStatusForItem]);\n\n const filteredItemData = useMemo(() => {\n return filterItemData(items, statusFilter, textFilter);\n }, [items, statusFilter, textFilter]);\n\n useEffect(() => {\n setSelectedItem('');\n }, [filteredItemData]);\n\n const rowClickHandler = (row: RowContents, table: TableContents) => {\n table.toggleAllRowsSelected(false); // this is pretty hacky, and also prevents us from selecting multiple rows\n row.toggleSelected(undefined);\n\n setSelectedItem(row.getValue('item'));\n };\n\n const columns = useMemo(() => getColumns(statusChangeHandler), [getColumns, statusChangeHandler]);\n\n return (\n
\n
\n \n \n {\n setTextFilter(event.target.value);\n }}\n />\n
\n
\n \n
\n {selectedItem !== '' && (\n
\n \n setScriptureReference(newScriptureReference)\n }\n localizedStrings={localizedStrings}\n />\n
\n )}\n
\n );\n}\n\nexport default Inventory;\n","import { CircleCheckIcon, CircleHelpIcon, CircleXIcon } from 'lucide-react';\nimport { Button } from '@/components/shadcn-ui/button';\nimport { ColumnDef } from '../data-table/data-table.component';\nimport { getSortingIcon, ItemData, Status } from './inventory.component';\n\nexport const inventoryItemColumn = (itemLabel: string): ColumnDef => {\n return {\n accessorKey: 'item',\n header: ({ column }) => (\n \n ),\n };\n};\n\nexport const inventoryCountColumn = (countLabel: string): ColumnDef => {\n return {\n accessorKey: 'count',\n header: ({ column }) => (\n \n ),\n };\n};\n\nexport const inventoryStatusColumn = (\n statusLabel: string,\n statusChangeHandler: (items: string[], status: Status) => void,\n): ColumnDef => {\n return {\n accessorKey: 'status',\n header: ({ column, table }) => {\n const selectedRows = table.getSelectedRowModel().rows;\n\n const items: string[] = [];\n selectedRows.forEach((row) => {\n items.push(row.getValue('item'));\n });\n\n return (\n
\n
\n column.toggleSorting(undefined)}\n >\n {statusLabel}\n {getSortingIcon(column.getIsSorted())}\n \n
\n
\n \n \n \n
\n
\n );\n },\n cell: ({ row }) => {\n const status: Status = row.getValue('status');\n switch (status) {\n case 'approved':\n return ;\n case 'unapproved':\n return ;\n case 'unknown':\n default:\n return ;\n }\n },\n };\n};\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 { 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 /** 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 /** Text direction ltr or rtl */\n dir?: Direction;\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 buttonPlaceholder = '',\n textPlaceholder = '',\n commandEmptyMessage = 'No option found',\n buttonVariant = 'outline',\n dir = 'ltr',\n ...props\n}: ComboBoxProps) {\n const [open, setOpen] = useState(false);\n\n return (\n \n \n \n {value ? getOptionLabel(value) : buttonPlaceholder}\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 { useEffect, useState } from 'react';\nimport { FormControlLabel } from '@mui/material';\nimport ComboBox from '@/components/basics/combo-box.component';\n\nexport type ChapterRangeSelectorProps = {\n handleSelectStartChapter: (chapter: number) => void;\n handleSelectEndChapter: (chapter: number) => void;\n isDisabled?: boolean;\n chapterCount: number;\n};\n\nexport default function ChapterRangeSelector({\n handleSelectStartChapter,\n handleSelectEndChapter,\n isDisabled = false,\n chapterCount,\n}: ChapterRangeSelectorProps) {\n const [startChapter, setStartChapter] = useState(1);\n const [endChapter, setEndChapter] = useState(chapterCount);\n const [chapterOptions, setChapterOptions] = useState(\n Array.from({ length: chapterCount }, (_, i) => i + 1),\n );\n\n useEffect(() => {\n setStartChapter(1);\n handleSelectStartChapter(1);\n setEndChapter(chapterCount);\n handleSelectEndChapter(chapterCount);\n setChapterOptions(Array.from({ length: chapterCount }, (_, i) => i + 1));\n }, [chapterCount, handleSelectEndChapter, handleSelectStartChapter]);\n\n const onChangeStartChapter = (value: number) => {\n setStartChapter(value);\n handleSelectStartChapter(value);\n if (value > endChapter) {\n setEndChapter(value);\n handleSelectEndChapter(value);\n }\n };\n\n const onChangeEndChapter = (value: number) => {\n setEndChapter(value);\n handleSelectEndChapter(value);\n if (value < startChapter) {\n setStartChapter(value);\n handleSelectStartChapter(value);\n }\n };\n\n return (\n <>\n option.toString()}\n value={startChapter}\n />\n }\n label=\"Chapters\"\n labelPlacement=\"start\"\n />\n option.toString()}\n value={endChapter}\n />\n }\n label=\"to\"\n labelPlacement=\"start\"\n />\n \n );\n}\n","enum LabelPosition {\n After = 'after',\n Before = 'before',\n Above = 'above',\n Below = 'below',\n}\n\nexport default LabelPosition;\n","import '@/components/mui/checkbox.component.css';\nimport LabelPosition from '@/components/mui/label-position.model';\nimport { FormLabel, Checkbox as MuiCheckbox } from '@mui/material';\nimport { ChangeEvent } from 'react';\n\nexport type CheckboxProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * If specified, the label that will appear associated with the checkbox.\n *\n * @default '' (no label will be shown)\n */\n labelText?: string;\n /**\n * Indicates the position of the label relative to the checkbox.\n *\n * @default 'after'\n */\n labelPosition?: LabelPosition;\n /**\n * If `true`, the component is in the indeterminate state.\n *\n * @default false\n */\n isIndeterminate?: boolean;\n /** If `true`, the component is checked by default. */\n isDefaultChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/* function CheckboxContainer({ labelText? = '', isDisabled : boolean, hasError : boolean, children? }) {\n return (\n \n {children}\n labelText\n \n );\n} */\n\n/** Primary UI component for user interaction */\nfunction Checkbox({\n id,\n isChecked,\n labelText = '',\n labelPosition = LabelPosition.After,\n isIndeterminate = false,\n isDefaultChecked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: CheckboxProps) {\n const checkBox = (\n \n );\n\n let result;\n\n if (labelText) {\n const preceding =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.Above;\n\n const labelSpan = (\n \n {labelText}\n \n );\n\n const labelIsInline =\n labelPosition === LabelPosition.Before || labelPosition === LabelPosition.After;\n\n const label = labelIsInline ? labelSpan :
{labelSpan}
;\n\n const checkBoxElement = labelIsInline ? checkBox :
{checkBox}
;\n\n result = (\n \n {preceding && label}\n {checkBoxElement}\n {!preceding && label}\n \n );\n } else {\n result = checkBox;\n }\n return result;\n}\n\nexport default Checkbox;\n","import Checkbox from '@/components/mui/checkbox.component';\nimport '@/components/mui/checklist.component.css';\n\nexport type ChecklistProps = {\n /** Optional string representing the id attribute of the fieldset element */\n id?: string;\n /** Optional string representing CSS class name(s) for styling */\n className?: string;\n /** Optional string representing legend for fieldset element */\n legend?: string;\n /** Array of strings representing the legend text for the fieldset element */\n listItems: string[];\n /** Array of strings representing items to be displayed as checkboxes in the checklist */\n selectedListItems: string[];\n /** Function that takes a string param and is called when a checkbox item is selected or deselected */\n handleSelectListItem: (item: string) => void;\n /**\n * Optional function that takes a string param and returns a string representing the label text\n * for the checkbox associated with that item\n */\n createLabel?: (item: string) => string;\n};\n\n/**\n * Renders a list of checkboxes wrapped in a fieldset element. Each checkbox corresponds to an item\n * from the `listItems` array.\n */\nexport default function Checklist({\n id,\n className,\n legend,\n listItems,\n selectedListItems,\n handleSelectListItem,\n createLabel,\n}: ChecklistProps) {\n return (\n
\n {legend && {legend}}\n {listItems.map((item) => (\n handleSelectListItem(item)}\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 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 elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const safePropName = propFullName || propName;\n if (propValue == 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\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 propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n if (warningHint !== undefined) {\n return new Error(`Invalid ${location} \\`${safePropName}\\` supplied to \\`${componentName}\\`. ` + `Expected an element type that can hold a ref. ${warningHint} ` + 'For more information see https://mui.com/r/caveat-with-refs-guide');\n }\n return null;\n}\nexport default chainPropTypes(PropTypes.elementType, elementTypeAcceptingRef);","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}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}","export function getTypeByValue(value) {\n const valueType = typeof value;\n switch (valueType) {\n case 'number':\n if (Number.isNaN(value)) {\n return 'NaN';\n }\n if (!Number.isFinite(value)) {\n return 'Infinity';\n }\n if (value !== Math.floor(value)) {\n return 'float';\n }\n return 'number';\n case 'object':\n if (value === null) {\n return 'null';\n }\n return value.constructor.name;\n default:\n return valueType;\n }\n}\n\n// IE 11 support\nfunction ponyfillIsInteger(x) {\n // eslint-disable-next-line no-restricted-globals\n return typeof x === 'number' && isFinite(x) && Math.floor(x) === x;\n}\nconst isInteger = Number.isInteger || ponyfillIsInteger;\nfunction requiredInteger(props, propName, componentName, location) {\n const propValue = props[propName];\n if (propValue == null || !isInteger(propValue)) {\n const propType = getTypeByValue(propValue);\n return new RangeError(`Invalid ${location} \\`${propName}\\` of type \\`${propType}\\` supplied to \\`${componentName}\\`, expected \\`integer\\`.`);\n }\n return null;\n}\nfunction validator(props, propName, ...other) {\n const propValue = props[propName];\n if (propValue === undefined) {\n return null;\n }\n return requiredInteger(props, propName, ...other);\n}\nfunction validatorNoop() {\n return null;\n}\nvalidator.isRequired = requiredInteger;\nvalidatorNoop.isRequired = validatorNoop;\nexport default process.env.NODE_ENV === 'production' ? validatorNoop : validator;","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\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome,
, and elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n return node.tabIndex;\n}\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n if (!node.name) {\n return false;\n }\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n return roving !== node;\n}\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n return true;\n}\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node: node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\nfunction defaultIsEnabled() {\n return true;\n}\n\n/**\n * Utility component that locks focus inside the component.\n *\n * Demos:\n *\n * - [Focus Trap](https://mui.com/base-ui/react-focus-trap/)\n *\n * API:\n *\n * - [FocusTrap API](https://mui.com/base-ui/react-focus-trap/components-api/#focus-trap)\n */\nfunction FocusTrap(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef(false);\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null);\n // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n // @ts-expect-error TODO upstream fix\n const handleRef = useForkRef(children.ref, rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n if (!rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n rootRef.current.setAttribute('tabIndex', '-1');\n }\n if (activated.current) {\n rootRef.current.focus();\n }\n }\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n nodeToRestore.current = null;\n }\n };\n // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open FocusTrap\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n }\n\n // Make sure the next tab starts from the right place.\n // doc.activeElement refers to the origin.\n if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (sentinelEnd.current) {\n sentinelEnd.current.focus();\n }\n }\n };\n const contain = () => {\n const rootElement = rootRef.current;\n\n // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) {\n return;\n }\n if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n // The focus is already inside\n if (rootElement.contains(doc.activeElement)) {\n return;\n }\n\n // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)\n if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {\n return;\n }\n\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (doc.activeElement !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n if (!activated.current) {\n return;\n }\n let tabbable = [];\n if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n // one of the sentinel nodes was focused, so move the focus\n // to the first/last tabbable element inside the focus trap\n if (tabbable.length > 0) {\n var _lastKeydown$current, _lastKeydown$current2;\n const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n }\n // no tabbable elements in the trap focus or the focus was outside of the focus trap\n } else {\n rootElement.focus();\n }\n };\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true);\n\n // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n const interval = setInterval(() => {\n if (doc.activeElement && doc.activeElement.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-testid\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-testid\": \"sentinelEnd\"\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? FocusTrap.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n /**\n * If `true`, the focus trap will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not restore focus to previously focused element once\n * focus trap is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple focus trap mounted at the same time.\n * @default function defaultIsEnabled(): boolean {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n FocusTrap['propTypes' + ''] = exactProp(FocusTrap.propTypes);\n}\nexport { FocusTrap };","'use client';\n\nimport * 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 };","import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, show) {\n if (show) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = blacklist.indexOf(element) === -1;\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, show);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerDocument(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = (parent == null ? void 0 : parent.nodeName) === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.containers = void 0;\n this.modals = void 0;\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_createChainedFunction as createChainedFunction } from '@mui/utils';\nimport { extractEventHandlers } from '../utils';\nimport { ModalManager, ariaHidden } from './ModalManager';\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst defaultManager = new ModalManager();\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/base-ui/react-modal/#hook)\n *\n * API:\n *\n * - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal)\n */\nexport function useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n // @ts-ignore internal logic - Base UI supports the manager as a prop too\n manager = defaultManager,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp, manager]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || event.which === 229 ||\n // Wait until IME is settled.\n !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n var _otherHandlers$onClic;\n (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers);\n return _extends({\n role: 'presentation'\n }, externalEventHandlers, {\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n });\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return _extends({\n 'aria-hidden': true\n }, externalEventHandlers, {\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n });\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children == null ? void 0 : children.props.onEnter),\n onExited: createChainedFunction(handleExited, children == null ? void 0 : children.props.onExited)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}","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;","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nconst getOverlayAlpha = elevation => {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return (alphaValue / 100).toFixed(2);\n};\nexport default getOverlayAlpha;","'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","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"dense\", \"disablePadding\", \"subheader\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport ListContext from './ListContext';\nimport { getListUtilityClass } from './listClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})(({\n ownerState\n}) => _extends({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative'\n}, !ownerState.disablePadding && {\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.subheader && {\n paddingTop: 0\n}));\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = _extends({}, props, {\n component,\n dense,\n disablePadding\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: [subheader, children]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.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 * The content of the component.\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 component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"actions\", \"autoFocus\", \"autoFocusItem\", \"children\", \"className\", \"disabledItemsFocusable\", \"disableListWrap\", \"onKeyDown\", \"variant\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport List from '../List';\nimport getScrollbarSize from '../utils/getScrollbarSize';\nimport useForkRef from '../utils/useForkRef';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.indexOf(textCriteria.keys.join('')) === 0;\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, theme) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerDocument(containerElement))}px`;\n listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = ownerDocument(list).activeElement;\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, _extends({\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1\n }, other, {\n children: items\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.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`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","'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 { Transition } from 'react-transition-group';\nimport { elementAcceptingRef } from '@mui/utils';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\n\n/**\n * The Fade transition is used by the [Modal](/material-ui/react-modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const theme = useTheme();\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\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 = defaultTimeout,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const enableStrictModeCompat = true;\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 transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\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 transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\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: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout\n }, other, {\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\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\" ? Fade.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 * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"invisible\", \"open\", \"slotProps\", \"slots\", \"TransitionComponent\", \"transitionDuration\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Fade from '../Fade';\nimport { getBackdropUtilityClass } from './backdropClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})(({\n ownerState\n}) => _extends({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n}, ownerState.invisible && {\n backgroundColor: 'transparent'\n}));\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n var _slotProps$root, _ref, _slots$root;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n const {\n children,\n className,\n component = 'div',\n components = {},\n componentsProps = {},\n invisible = false,\n open,\n slotProps = {},\n slots = {},\n TransitionComponent = Fade,\n transitionDuration\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n invisible\n });\n const classes = useUtilityClasses(ownerState);\n const rootSlotProps = (_slotProps$root = slotProps.root) != null ? _slotProps$root : componentsProps.root;\n return /*#__PURE__*/_jsx(TransitionComponent, _extends({\n in: open,\n timeout: transitionDuration\n }, other, {\n children: /*#__PURE__*/_jsx(BackdropRoot, _extends({\n \"aria-hidden\": true\n }, rootSlotProps, {\n as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,\n className: clsx(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),\n ownerState: _extends({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),\n classes: classes,\n ref: ref,\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.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 * The content of the component.\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 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.\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 Root: 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 root: PropTypes.object\n }),\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\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 root: 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 root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The 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 Fade\n */\n TransitionComponent: PropTypes.elementType,\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 transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getModalUtilityClass(slot) {\n return generateUtilityClass('MuiModal', slot);\n}\nconst modalClasses = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);\nexport default modalClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"BackdropComponent\", \"BackdropProps\", \"classes\", \"className\", \"closeAfterTransition\", \"children\", \"container\", \"component\", \"components\", \"componentsProps\", \"disableAutoFocus\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\", \"onBackdropClick\", \"onClose\", \"onTransitionEnter\", \"onTransitionExited\", \"open\", \"slotProps\", \"slots\", \"theme\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { elementAcceptingRef, HTMLElementType } from '@mui/utils';\nimport { useSlotProps } from '@mui/base';\nimport { unstable_useModal as useModal } from '@mui/base/unstable_useModal';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport FocusTrap from '../Unstable_TrapFocus';\nimport Portal from '../Portal';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport Backdrop from '../Backdrop';\nimport { getModalUtilityClass } from './modalClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open,\n exited,\n classes\n } = ownerState;\n const slots = {\n root: ['root', !open && exited && 'hidden'],\n backdrop: ['backdrop']\n };\n return composeClasses(slots, getModalUtilityClass, classes);\n};\nconst ModalRoot = styled('div', {\n name: 'MuiModal',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.open && ownerState.exited && styles.hidden];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n position: 'fixed',\n zIndex: (theme.vars || theme).zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0\n}, !ownerState.open && ownerState.exited && {\n visibility: 'hidden'\n}));\nconst ModalBackdrop = styled(Backdrop, {\n name: 'MuiModal',\n slot: 'Backdrop',\n overridesResolver: (props, styles) => {\n return styles.backdrop;\n }\n})({\n zIndex: -1\n});\n\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/material-ui/api/dialog/)\n * - [Drawer](/material-ui/api/drawer/)\n * - [Menu](/material-ui/api/menu/)\n * - [Popover](/material-ui/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/material-ui/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n var _ref, _slots$root, _ref2, _slots$backdrop, _slotProps$root, _slotProps$backdrop;\n const props = useThemeProps({\n name: 'MuiModal',\n props: inProps\n });\n const {\n BackdropComponent = ModalBackdrop,\n BackdropProps,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n components = {},\n componentsProps = {},\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n onBackdropClick,\n open,\n slotProps,\n slots\n // eslint-disable-next-line react/prop-types\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const propsWithDefaults = _extends({}, props, {\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n });\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n isTopModal,\n exited,\n hasTransition\n } = useModal(_extends({}, propsWithDefaults, {\n rootRef: ref\n }));\n const ownerState = _extends({}, propsWithDefaults, {\n exited\n });\n const classes = useUtilityClasses(ownerState);\n const childProps = {};\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = '-1';\n }\n\n // It's a Transition like component\n if (hasTransition) {\n const {\n onEnter,\n onExited\n } = getTransitionProps();\n childProps.onEnter = onEnter;\n childProps.onExited = onExited;\n }\n const RootSlot = (_ref = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref : ModalRoot;\n const BackdropSlot = (_ref2 = (_slots$backdrop = slots == null ? void 0 : slots.backdrop) != null ? _slots$backdrop : components.Backdrop) != null ? _ref2 : BackdropComponent;\n const rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;\n const backdropSlotProps = (_slotProps$backdrop = slotProps == null ? void 0 : slotProps.backdrop) != null ? _slotProps$backdrop : componentsProps.backdrop;\n const rootProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: rootSlotProps,\n externalForwardedProps: other,\n getSlotProps: getRootProps,\n additionalProps: {\n ref,\n as: component\n },\n ownerState,\n className: clsx(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))\n });\n const backdropProps = useSlotProps({\n elementType: BackdropSlot,\n externalSlotProps: backdropSlotProps,\n additionalProps: BackdropProps,\n getSlotProps: otherHandlers => {\n return getBackdropProps(_extends({}, otherHandlers, {\n onClick: e => {\n if (onBackdropClick) {\n onBackdropClick(e);\n }\n if (otherHandlers != null && otherHandlers.onClick) {\n otherHandlers.onClick(e);\n }\n }\n }));\n },\n className: clsx(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop),\n ownerState\n });\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, _extends({}, rootProps, {\n children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, _extends({}, backdropProps)) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/React.cloneElement(children, childProps)\n })]\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead.\n */\n BackdropProps: PropTypes.object,\n /**\n * A single child content 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 * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\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.\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 Backdrop: PropTypes.elementType,\n Root: 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 backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\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 * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * A function called when a transition enters.\n */\n onTransitionEnter: PropTypes.func,\n /**\n * A function called when a transition has exited.\n */\n onTransitionExited: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Modal;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"component\", \"elevation\", \"square\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes, integerPropType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport getOverlayAlpha from '../styles/getOverlayAlpha';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport { getPaperUtilityClass } from './paperClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(({\n theme,\n ownerState\n}) => {\n var _theme$vars$overlays;\n return _extends({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow')\n }, !ownerState.square && {\n borderRadius: theme.shape.borderRadius\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }, ownerState.variant === 'elevation' && _extends({\n boxShadow: (theme.vars || theme).shadows[ownerState.elevation]\n }, !theme.vars && theme.palette.mode === 'dark' && {\n backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`\n }, theme.vars && {\n backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]\n }));\n});\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n component,\n elevation,\n square,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const theme = useTheme();\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, _extends({\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.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 * The content of the component.\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 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 * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopoverUtilityClass(slot) {\n return generateUtilityClass('MuiPopover', slot);\n}\nconst popoverClasses = generateUtilityClasses('MuiPopover', ['root', 'paper']);\nexport default popoverClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"action\", \"anchorEl\", \"anchorOrigin\", \"anchorPosition\", \"anchorReference\", \"children\", \"className\", \"container\", \"elevation\", \"marginThreshold\", \"open\", \"PaperProps\", \"slots\", \"slotProps\", \"transformOrigin\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"disableScrollLock\"],\n _excluded3 = [\"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses, useSlotProps, isHostComponent } from '@mui/base';\nimport { chainPropTypes, integerPropType, elementTypeAcceptingRef, refType, HTMLElementType } from '@mui/utils';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport debounce from '../utils/debounce';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport useForkRef from '../utils/useForkRef';\nimport Grow from '../Grow';\nimport Modal from '../Modal';\nimport PaperBase from '../Paper';\nimport { getPopoverUtilityClass } from './popoverClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getOffsetTop(rect, vertical) {\n let offset = 0;\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n let offset = 0;\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n return offset;\n}\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(n => typeof n === 'number' ? `${n}px` : n).join(' ');\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPopoverUtilityClass, classes);\n};\nexport const PopoverRoot = styled(Modal, {\n name: 'MuiPopover',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const PopoverPaper = styled(PaperBase, {\n name: 'MuiPopover',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {\n var _slotProps$paper, _slots$root, _slots$paper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPopover'\n });\n const {\n action,\n anchorEl,\n anchorOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n anchorPosition,\n anchorReference = 'anchorEl',\n children,\n className,\n container: containerProp,\n elevation = 8,\n marginThreshold = 16,\n open,\n PaperProps: PaperPropsProp = {},\n slots,\n slotProps,\n transformOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n TransitionComponent = Grow,\n transitionDuration: transitionDurationProp = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n disableScrollLock = false\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const externalPaperSlotProps = (_slotProps$paper = slotProps == null ? void 0 : slotProps.paper) != null ? _slotProps$paper : PaperPropsProp;\n const paperRef = React.useRef();\n const handlePaperRef = useForkRef(paperRef, externalPaperSlotProps.ref);\n const ownerState = _extends({}, props, {\n anchorOrigin,\n anchorReference,\n elevation,\n marginThreshold,\n externalPaperSlotProps,\n transformOrigin,\n TransitionComponent,\n transitionDuration: transitionDurationProp,\n TransitionProps\n });\n const classes = useUtilityClasses(ownerState);\n\n // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n const getAnchorOffset = React.useCallback(() => {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '.');\n }\n }\n return anchorPosition;\n }\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n\n // If an anchor element wasn't provided, just use the parent body element of this Popover\n const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n const anchorRect = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n const box = anchorElement.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 return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]);\n\n // Returns the base transform origin using the element\n const getTransformOrigin = React.useCallback(elemRect => {\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical),\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n const getPositioningStyle = React.useCallback(element => {\n const elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n\n // Get the transform origin point on the element itself\n const elemTransformOrigin = getTransformOrigin(elemRect);\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }\n\n // Get the offset of the anchoring element\n const anchorOffset = getAnchorOffset();\n\n // Calculate element positioning\n let top = anchorOffset.top - elemTransformOrigin.vertical;\n let left = anchorOffset.left - elemTransformOrigin.horizontal;\n const bottom = top + elemRect.height;\n const right = left + elemRect.width;\n\n // Use the parent window of the anchorEl if provided\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n\n // Window thresholds taking required margin into account\n const heightThreshold = containerWindow.innerHeight - marginThreshold;\n const widthThreshold = containerWindow.innerWidth - marginThreshold;\n\n // Check if the vertical axis needs shifting\n if (marginThreshold !== null && top < marginThreshold) {\n const diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (marginThreshold !== null && bottom > heightThreshold) {\n const diff = bottom - heightThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n }\n\n // Check if the horizontal axis needs shifting\n if (marginThreshold !== null && left < marginThreshold) {\n const diff = left - marginThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n } else if (right > widthThreshold) {\n const diff = right - widthThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n }\n return {\n top: `${Math.round(top)}px`,\n left: `${Math.round(left)}px`,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);\n const [isPositioned, setIsPositioned] = React.useState(open);\n const setPositioningStyles = React.useCallback(() => {\n const element = paperRef.current;\n if (!element) {\n return;\n }\n const positioning = getPositioningStyle(element);\n if (positioning.top !== null) {\n element.style.top = positioning.top;\n }\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n element.style.transformOrigin = positioning.transformOrigin;\n setIsPositioned(true);\n }, [getPositioningStyle]);\n React.useEffect(() => {\n if (disableScrollLock) {\n window.addEventListener('scroll', setPositioningStyles);\n }\n return () => window.removeEventListener('scroll', setPositioningStyles);\n }, [anchorEl, disableScrollLock, setPositioningStyles]);\n const handleEntering = (element, isAppearing) => {\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n setPositioningStyles();\n };\n const handleExited = () => {\n setIsPositioned(false);\n };\n React.useEffect(() => {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, () => open ? {\n updatePosition: () => {\n setPositioningStyles();\n }\n } : null, [open, setPositioningStyles]);\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n const handleResize = debounce(() => {\n setPositioningStyles();\n });\n const containerWindow = ownerWindow(anchorEl);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [anchorEl, open, setPositioningStyles]);\n let transitionDuration = transitionDurationProp;\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\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 const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n const RootSlot = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : PopoverRoot;\n const PaperSlot = (_slots$paper = slots == null ? void 0 : slots.paper) != null ? _slots$paper : PopoverPaper;\n const paperProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: _extends({}, externalPaperSlotProps, {\n style: isPositioned ? externalPaperSlotProps.style : _extends({}, externalPaperSlotProps.style, {\n opacity: 0\n })\n }),\n additionalProps: {\n elevation,\n ref: handlePaperRef\n },\n ownerState,\n className: clsx(classes.paper, externalPaperSlotProps == null ? void 0 : externalPaperSlotProps.className)\n });\n const _useSlotProps = useSlotProps({\n elementType: RootSlot,\n externalSlotProps: (slotProps == null ? void 0 : slotProps.root) || {},\n externalForwardedProps: other,\n additionalProps: {\n ref,\n slotProps: {\n backdrop: {\n invisible: true\n }\n },\n container,\n open\n },\n ownerState,\n className: clsx(classes.root, className)\n }),\n {\n slotProps: rootSlotPropsProp\n } = _useSlotProps,\n rootProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded3);\n return /*#__PURE__*/_jsx(RootSlot, _extends({}, rootProps, !isHostComponent(RootSlot) && {\n slotProps: rootSlotPropsProp,\n disableScrollLock\n }, {\n children: /*#__PURE__*/_jsx(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEntering: handleEntering,\n onExited: handleExited,\n timeout: transitionDuration\n }, TransitionProps, {\n children: /*#__PURE__*/_jsx(PaperSlot, _extends({}, paperProps, {\n children: children\n }))\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.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 * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n /**\n * An HTML element, [PopoverVirtualElement](/material-ui/react-popover/#virtual-element),\n * or a function that returns either.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (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 {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \\`${resolvedAnchorEl}\\` instead.`].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * This is the position that may be used to set the position of the popover.\n * The coordinates are relative to the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n /**\n * This determines which anchor prop to refer to when setting\n * the position of the popover.\n * @default 'anchorEl'\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n /**\n * The content of the component.\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 * An HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's 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 * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * The elevation of the popover.\n * @default 8\n */\n elevation: integerPropType,\n /**\n * Specifies how close to the edge of the window the popover can appear.\n * If null, the popover will not be constrained by the window.\n * @default 16\n */\n marginThreshold: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Props applied to the [`Paper`](/material-ui/api/paper/) element.\n *\n * This prop is an alias for `slotProps.paper` and will be overriden by it if both are used.\n * @deprecated Use `slotProps.paper` instead.\n *\n * @default {}\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\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 * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\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 * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Popover;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onEntering\"],\n _excluded2 = [\"autoFocus\", \"children\", \"className\", \"disableAutoFocusItem\", \"MenuListProps\", \"onClose\", \"open\", \"PaperProps\", \"PopoverClasses\", \"transitionDuration\", \"TransitionProps\", \"variant\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useSlotProps } from '@mui/base/utils';\nimport { HTMLElementType } from '@mui/utils';\nimport MenuList from '../MenuList';\nimport Popover, { PopoverPaper } from '../Popover';\nimport styled, { rootShouldForwardProp } from '../styles/styled';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getMenuUtilityClass } from './menuClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const MenuPaper = styled(PopoverPaper, {\n name: 'MuiMenu',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tappable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List',\n overridesResolver: (props, styles) => styles.list\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n var _slots$paper, _slotProps$paper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiMenu'\n });\n const {\n autoFocus = true,\n children,\n className,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering\n } = {},\n variant = 'selectedMenu',\n slots = {},\n slotProps = {}\n } = props,\n TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n const ownerState = _extends({}, props, {\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, theme);\n }\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const PaperSlot = (_slots$paper = slots.paper) != null ? _slots$paper : MenuPaper;\n const paperExternalSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : PaperProps;\n const rootSlotProps = useSlotProps({\n elementType: slots.root,\n externalSlotProps: slotProps.root,\n ownerState,\n className: [classes.root, className]\n });\n const paperSlotProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: paperExternalSlotProps,\n ownerState,\n className: classes.paper\n });\n return /*#__PURE__*/_jsx(MenuRoot, _extends({\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n slots: {\n paper: PaperSlot,\n root: slots.root\n },\n slotProps: {\n root: rootSlotProps,\n paper: paperSlotProps\n },\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n TransitionProps: _extends({\n onEntering: handleEntering\n }, TransitionProps),\n ownerState: ownerState\n }, other, {\n classes: PopoverClasses,\n children: /*#__PURE__*/_jsx(MenuMenuList, _extends({\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant\n }, MenuListProps, {\n className: clsx(classes.list, MenuListProps.className),\n children: children\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.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 * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n /**\n * Menu contents, normally `MenuItem`s.\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 * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n /**\n * Props applied to the [`MenuList`](/material-ui/api/menu-list/) element.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n /**\n * `classes` prop applied to the [`Popover`](/material-ui/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\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 * @default {}\n */\n TransitionProps: PropTypes.object,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","import '@/components/mui/context-menu.component.css';\nimport MenuItemList, {\n GroupedMenuPropsBase,\n} from '@/components/mui/grouped-menu-item-list.component';\nimport Menu from '@mui/material/Menu';\nimport React, { PropsWithChildren, useCallback, useMemo } from 'react';\n\nexport type ContextMenuProps = GroupedMenuPropsBase & {\n /** Additional css classes to help with styling of the context menu */\n className?: string;\n};\n\n/**\n * A component that wraps its children, making them the \"target\" of a context menu so that the\n * context menu is displayed when the target is right-clicked.\n *\n * @param {ContextMenuProps & PropsWithChildren} props - The properties for the ContextMenu\n * component which define what menu items to display and supply a command handler for when a menu\n * item is clicked.\n * @returns {JSX.Element} The ContextMenu component (including the wrapped children)\n */\nexport default function ContextMenu({\n className,\n commandHandler,\n menuDefinition,\n children,\n}: PropsWithChildren) {\n const [contextMenuPosition, setContextMenuPosition] = React.useState<\n | {\n mouseX: number;\n mouseY: number;\n }\n | undefined\n >(undefined);\n\n const handleContextMenu = useCallback(\n (event: React.MouseEvent) => {\n event.preventDefault();\n setContextMenuPosition(\n contextMenuPosition === undefined\n ? {\n mouseX: event.clientX + 2,\n mouseY: event.clientY - 6,\n }\n : // repeated contextmenu when it is already open closes it with Chrome 84 on Ubuntu\n // Other native context menus might behave different.\n // With this behavior we prevent re-locating existing context menus.\n undefined,\n );\n },\n [contextMenuPosition],\n );\n\n const handleClose = useCallback(() => {\n setContextMenuPosition(undefined);\n }, []);\n\n const anchorPosition = useMemo(() => {\n if (contextMenuPosition !== undefined) {\n return { top: contextMenuPosition.mouseY, left: contextMenuPosition.mouseX };\n }\n return undefined;\n }, [contextMenuPosition]);\n\n // If no menu items or children, we don't want to display the context menu at all.\n return (menuDefinition?.items?.length ?? 0) === 0 || !children ? (\n children\n ) : (\n \n {children}\n \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 { 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 ScriptureReference,\n ScriptureSelection,\n scrRefToBBBCCCVVV,\n} from 'platform-bible-utils';\nimport { MouseEvent, useCallback, 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/**\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 [data, setData] = useState(() => {\n // Initial data extraction from sources\n return sources.flatMap((source) => {\n const src = source.source;\n return source.data.map((item) => ({\n ...item,\n source: src,\n }));\n });\n });\n const [rowSelection, setRowSelection] = useState({});\n\n useEffect(() => {\n // Update data whenever sources change\n setData(() => {\n return sources.flatMap((source) => {\n const src = source.source;\n return source.data.map((item) => ({\n ...item,\n source: src,\n }));\n });\n });\n }, [sources]);\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 toRefOrRange = useCallback(\n (start: ScriptureReference, end: ScriptureReference | undefined) => {\n if (!end || compareScrRefs(start, end) === 0) return `${scrRefToBBBCCCVVV(start)}`;\n return `${scrRefToBBBCCCVVV(start)}-${scrRefToBBBCCCVVV(end)}`;\n },\n [],\n );\n\n const getRowKey = useCallback(\n (row: ScriptureSrcItemDetail) =>\n `${toRefOrRange(row.start, row.end)} ${row.source} ${row.detail}`,\n [toRefOrRange],\n );\n\n const table = useReactTable({\n data,\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 = data.find((row) => getRowKey(row) === keys[0]) || undefined;\n if (selectedRow) onRowSelected(selectedRow);\n }\n }\n }, [rowSelection, data, getRowKey, 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 pr-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 'pr-ps-4';\n default:\n return undefined;\n }\n }\n switch (row.depth) {\n case 1:\n return 'pr-ps-8';\n case 2:\n return 'pr-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 { Input } from '@/components/shadcn-ui/input';\nimport { cn } from '@/utils/shadcn-ui.util';\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\nexport default function SearchBar({ onSearch, placeholder, isFullWidth }: SearchBarProps) {\n const [searchQuery, setSearchQuery] = useState('');\n\n const handleInputChange = (searchString: string) => {\n setSearchQuery(searchString);\n onSearch(searchString);\n };\n\n return (\n handleInputChange(e.target.value)}\n />\n );\n}\n","import '@/components/mui/slider.component.css';\nimport { Slider as MuiSlider } from '@mui/material';\nimport { SyntheticEvent } from 'react';\n\nexport type SliderProps = {\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 * The component orientation.\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * The minimum allowed value of the slider. Should not be equal to max.\n *\n * @default 0\n */\n min?: number;\n /**\n * The maximum allowed value of the slider. Should not be equal to min.\n *\n * @default 100\n */\n max?: number;\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.) The `min`\n * prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible\n * by the step.\n *\n * @default 1\n */\n step?: number;\n /**\n * Marks indicate predetermined values to which the user can move the slider. If `true` the marks\n * are spaced according the value of the `step` prop.\n *\n * @default false\n */\n showMarks?: boolean;\n /** The default value. Use when the component is not controlled. */\n defaultValue?: number;\n /** The value of the slider. For ranged sliders, provide an array with two values. */\n value?: number | number[];\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n *\n * @default 'off'\n */\n valueLabelDisplay?: 'on' | 'auto' | 'off';\n /** Additional css classes to help with unique styling of the button */\n className?: string;\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (any). Warning: This is a generic event not a change event.\n * @param value The new value.\n * @param activeThumb Index of the currently moved thumb.\n */\n onChange?: (event: Event, value: number | number[], activeThumb: number) => void;\n /**\n * Callback function that is fired when the mouseup is triggered.\n *\n * @param event The event source of the callback. Warning: This is a generic event not a change\n * event.\n * @param value The new value.\n */\n onChangeCommitted?: (\n event: Event | SyntheticEvent,\n value: number | number[],\n ) => void;\n};\n\n/**\n * Slider that allows selecting a value from a range\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Slider({\n id,\n isDisabled = false,\n orientation = 'horizontal',\n min = 0,\n max = 100,\n step = 1,\n showMarks = false,\n defaultValue,\n value,\n valueLabelDisplay = 'off',\n className,\n onChange,\n onChangeCommitted,\n}: SliderProps) {\n return (\n \n );\n}\n\nexport default Slider;\n","import '@/components/mui/snackbar.component.css';\nimport { Snackbar as MuiSnackbar, SnackbarCloseReason, SnackbarOrigin } from '@mui/material';\nimport { PropsWithChildren, ReactNode, SyntheticEvent } from 'react';\n\nexport type CloseReason = SnackbarCloseReason;\nexport type AnchorOrigin = SnackbarOrigin;\n\nexport type SnackbarContentProps = {\n /** The action to display, renders after the message */\n action?: ReactNode;\n\n /** The message to display */\n message?: ReactNode;\n\n /** Additional css classes to help with unique styling of the snackbar, internal */\n className?: string;\n};\n\nexport type SnackbarProps = PropsWithChildren<{\n /** Optional unique identifier */\n id?: string;\n\n /**\n * If true, the component is shown\n *\n * @default false\n */\n isOpen?: boolean;\n\n /**\n * The number of milliseconds to wait before automatically calling onClose()\n *\n * @default undefined\n */\n autoHideDuration?: number;\n\n /** Additional css classes to help with unique styling of the snackbar, external */\n className?: string;\n\n /**\n * Optional, used to control the open prop event: Event | SyntheticEvent, reason:\n * string\n */\n onClose?: (event: Event | SyntheticEvent, reason: CloseReason) => void;\n\n /**\n * The anchor of the `Snackbar`. The horizontal alignment is ignored.\n *\n * @default { vertical: 'bottom', horizontal: 'left' }\n */\n anchorOrigin?: AnchorOrigin;\n\n /** Props applied to the [`SnackbarContent`](/material-ui/api/snackbar-content/) element. */\n ContentProps?: SnackbarContentProps;\n}>;\n\n/**\n * Snackbar that provides brief notifications\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Snackbar({\n autoHideDuration = undefined,\n id,\n isOpen = false,\n className,\n onClose,\n anchorOrigin = { vertical: 'bottom', horizontal: 'left' },\n ContentProps,\n children,\n}: SnackbarProps) {\n const newContentProps: SnackbarContentProps = {\n action: ContentProps?.action || children,\n message: ContentProps?.message,\n className,\n };\n\n return (\n \n );\n}\n\nexport default Snackbar;\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\nexport default function NavigationContentSearch({\n tabList,\n onSearch,\n searchPlaceholder,\n headerTitle,\n isSearchBarFullWidth = false,\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 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

{secondary}

\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 { 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 '@/components/mui/switch.component.css';\nimport { Switch as MuiSwitch } from '@mui/material';\nimport { ChangeEvent } from 'react';\n\nexport type SwitchProps = {\n /** Optional unique identifier */\n id?: string;\n /** If `true`, the component is checked. */\n isChecked?: boolean;\n /**\n * Enabled status of switch\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * True when (input related to) switch is erroneous\n *\n * @default false\n */\n hasError?: boolean;\n /** Additional css classes to help with unique styling of the switch */\n className?: string;\n /**\n * Callback fired when the state is changed.\n *\n * @param event The event source of the callback. You can pull out the new value by accessing\n * event.target.value (string). You can pull out the new checked state by accessing\n * event.target.checked (boolean).\n */\n onChange?: (event: ChangeEvent) => void;\n};\n\n/**\n * Switch to toggle on and off\n *\n * Thanks to MUI for heavy inspiration and documentation\n * https://mui.com/material-ui/getting-started/overview/\n */\nfunction Switch({\n id,\n isChecked: checked,\n isDisabled = false,\n hasError = false,\n className,\n onChange,\n}: SwitchProps) {\n return (\n \n );\n}\n\nexport default Switch;\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 'pr-text-sm pr-font-medium pr-leading-none peer-disabled:pr-cursor-not-allowed peer-disabled:pr-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 { 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 { 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 * 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*as t from\"react\";function n(){return n=Object.assign?Object.assign.bind():function(t){for(var n=1;n(t[n.toLowerCase()]=n,t),{for:\"htmlFor\"}),o={amp:\"&\",apos:\"'\",gt:\">\",lt:\"<\",nbsp:\" \",quot:\"“\"},c=[\"style\",\"script\"],a=/([-A-Z0-9_:]+)(?:\\s*=\\s*(?:(?:\"((?:\\\\.|[^\"])*)\")|(?:'((?:\\\\.|[^'])*)')|(?:\\{((?:\\\\.|{[^}]*?}|[^}])*)\\})))?/gi,_=/mailto:/i,u=/\\n{2,}$/,i=/^( *>[^\\n]+(\\n[^\\n]+)*\\n*)+\\n{2,}/,s=/^ *> ?/gm,l=/^ {2,}\\n/,f=/^(?:( *[-*_])){3,} *(?:\\n *)+\\n/,d=/^\\s*(`{3,}|~{3,}) *(\\S+)?([^\\n]*?)?\\n([\\s\\S]+?)\\s*\\1 *(?:\\n *)*\\n?/,p=/^(?: {4}[^\\n]+\\n*)+(?:\\n *)+\\n?/,m=/^(`+)\\s*([\\s\\S]*?[^`])\\s*\\1(?!`)/,g=/^(?:\\n *)*\\n/,y=/\\r\\n?/g,h=/^\\[\\^([^\\]]+)](:.*)\\n/,k=/^\\[\\^([^\\]]+)]/,x=/\\f/g,b=/^\\s*?\\[(x|\\s)\\]/,$=/^ *(#{1,6}) *([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/,v=/^ *(#{1,6}) +([^\\n]+?)(?: +#*)?(?:\\n *)*(?:\\n|$)/,S=/^([^\\n]+)\\n *(=|-){3,} *(?:\\n *)+\\n/,z=/^ *(?!<[a-z][^ >/]* ?\\/>)<([a-z][^ >/]*) ?([^>]*)\\/{0}>\\n?(\\s*(?:<\\1[^>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d+\\.|\\n\\n| {2,}\\n|\\w+:\\S|$)/i,tt=/^\\n+/,nt=/^([ \\t]*)/,et=/\\\\([^\\\\])/g,rt=/ *\\n+$/,ot=/(?:^|\\n)( *)$/,ct=\"(?:\\\\d+\\\\.)\",at=\"(?:[*+-])\";function _t(t){return\"( *)(\"+(1===t?ct:at)+\") +\"}const ut=_t(1),it=_t(2);function st(t){return new RegExp(\"^\"+(1===t?ut:it))}const lt=st(1),ft=st(2);function dt(t){return new RegExp(\"^\"+(1===t?ut:it)+\"[^\\\\n]*(?:\\\\n(?!\\\\1\"+(1===t?ct:at)+\" )[^\\\\n]*)*(\\\\n|$)\",\"gm\")}const pt=dt(1),mt=dt(2);function gt(t){const n=1===t?ct:at;return new RegExp(\"^( *)(\"+n+\") [\\\\s\\\\S]+?(?:\\\\n{2,}(?! )(?!\\\\1\"+n+\" (?!\"+n+\" ))\\\\n*|\\\\s*\\\\n*$)\")}const yt=gt(1),ht=gt(2);function kt(t,n){const e=1===n,r=e?yt:ht,o=e?pt:mt,c=e?lt:ft;return{t(t,n,e){const o=ot.exec(e);return o&&(n.o||!n._&&!n.u)?r.exec(t=o[1]+t):null},i:Ht.HIGH,l(t,n,r){const a=e?+t[2]:void 0,_=t[0].replace(u,\"\\n\").match(o);let i=!1;return{p:_.map(function(t,e){const o=c.exec(t)[0].length,a=new RegExp(\"^ {1,\"+o+\"}\",\"gm\"),u=t.replace(a,\"\").replace(c,\"\"),s=e===_.length-1,l=-1!==u.indexOf(\"\\n\\n\")||s&&i;i=l;const f=r._,d=r.o;let p;r.o=!0,l?(r._=!1,p=u.replace(rt,\"\\n\\n\")):(r._=!0,p=u.replace(rt,\"\"));const m=n(p,r);return r._=f,r.o=d,m}),m:e,g:a}},h:(n,e,r)=>t(n.m?\"ol\":\"ul\",{key:r.k,start:n.g},n.p.map(function(n,o){return t(\"li\",{key:o},e(n,r))}))}}const xt=/^\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,bt=/^!\\[([^\\]]*)]\\( *((?:\\([^)]*\\)|[^() ])*) *\"?([^)\"]*)?\"?\\)/,$t=[i,d,p,$,S,v,A,R,pt,yt,mt,ht],vt=[...$t,/^[^\\n]+(?: \\n|\\n{2,})/,z,L];function St(t){return t.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,\"a\").replace(/[çÇ]/g,\"c\").replace(/[ðÐ]/g,\"d\").replace(/[ÈÉÊËéèêë]/g,\"e\").replace(/[ÏïÎîÍíÌì]/g,\"i\").replace(/[Ññ]/g,\"n\").replace(/[øØœŒÕõÔôÓóÒò]/g,\"o\").replace(/[ÜüÛûÚúÙù]/g,\"u\").replace(/[ŸÿÝý]/g,\"y\").replace(/[^a-z0-9- ]/gi,\"\").replace(/ /gi,\"-\").toLowerCase()}function zt(t){return V.test(t)?\"right\":q.test(t)?\"center\":U.test(t)?\"left\":null}function wt(t,n,e){const r=e.$;e.$=!0;const o=n(t.trim(),e);e.$=r;let c=[[]];return o.forEach(function(t,n){\"tableSeparator\"===t.type?0!==n&&n!==o.length-1&&c.push([]):(\"text\"!==t.type||null!=o[n+1]&&\"tableSeparator\"!==o[n+1].type||(t.v=t.v.replace(H,\"\")),c[c.length-1].push(t))}),c}function At(t,n,e){e._=!0;const r=wt(t[1],n,e),o=t[2].replace(G,\"\").split(\"|\").map(zt),c=function(t,n,e){return t.trim().split(\"\\n\").map(function(t){return wt(t,n,e)})}(t[3],n,e);return e._=!1,{S:o,A:c,L:r,type:\"table\"}}function Et(t,n){return null==t.S[n]?{}:{textAlign:t.S[n]}}function Lt(t){return function(n,e){return e._?t.exec(n):null}}function Mt(t){return function(n,e){return e._||e.u?t.exec(n):null}}function Ot(t){return function(n,e){return e._||e.u?null:t.exec(n)}}function It(t){return function(n){return t.exec(n)}}function jt(t,n,e){if(n._||n.u)return null;if(e&&!e.endsWith(\"\\n\"))return null;let r=\"\";t.split(\"\\n\").every(t=>!$t.some(n=>n.test(t))&&(r+=t+\"\\n\",t.trim()));const o=r.trimEnd();return\"\"==o?null:[r,o]}function Bt(t){try{if(decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,\"\").match(/^\\s*(javascript|vbscript|data(?!:image)):/i))return}catch(t){return null}return t}function Rt(t){return t.replace(et,\"$1\")}function Tt(t,n,e){const r=e._||!1,o=e.u||!1;e._=!0,e.u=!0;const c=t(n,e);return e._=r,e.u=o,c}function Ct(t,n,e){const r=e._||!1,o=e.u||!1;e._=!1,e.u=!0;const c=t(n,e);return e._=r,e.u=o,c}function Dt(t,n,e){return e._=!1,t(n,e)}const Ft=(t,n,e)=>({v:Tt(n,t[1],e)});function Nt(){return{}}function Pt(){return null}function Zt(...t){return t.filter(Boolean).join(\" \")}function Gt(t,n,e){let r=t;const o=n.split(\".\");for(;o.length&&(r=r[o[0]],void 0!==r);)o.shift();return r||e}var Ht;function qt(e,u={}){u.overrides=u.overrides||{},u.slugify=u.slugify||St,u.namedCodesToUnicode=u.namedCodesToUnicode?n({},o,u.namedCodesToUnicode):o;const G=u.createElement||t.createElement;function H(t,e,...r){const o=Gt(u.overrides,`${t}.props`,{});return G(function(t,n){const e=Gt(n,t);return e?\"function\"==typeof e||\"object\"==typeof e&&\"render\"in e?e:Gt(n,`${t}.component`,t):t}(t,u.overrides),n({},e,o,{className:Zt(null==e?void 0:e.className,o.className)||void 0}),...r)}function q(n){let e=!1;u.forceInline?e=!0:u.forceBlock||(e=!1===N.test(n));const r=ct(ot(e?n:`${n.trimEnd().replace(tt,\"\")}\\n\\n`,{_:e}));for(;\"string\"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===u.wrapper)return r;const o=u.wrapper||(e?\"span\":\"div\");let c;if(r.length>1||u.forceWrapper)c=r;else{if(1===r.length)return c=r[0],\"string\"==typeof c?H(\"span\",{key:\"outer\"},c):c;c=null}return t.createElement(o,{key:\"outer\"},c)}function U(n){const e=n.match(a);return e?e.reduce(function(n,e,o){const c=e.indexOf(\"=\");if(-1!==c){const a=function(t){return-1!==t.indexOf(\"-\")&&null===t.match(E)&&(t=t.replace(B,function(t,n){return n.toUpperCase()})),t}(e.slice(0,c)).trim(),_=function(t){const n=t[0];return('\"'===n||\"'\"===n)&&t.length>=2&&t[t.length-1]===n?t.slice(1,-1):t}(e.slice(c+1).trim()),u=r[a]||a,i=n[u]=function(t,n){return\"style\"===t?n.split(/;\\s?/).reduce(function(t,n){const e=n.slice(0,n.indexOf(\":\"));return t[e.replace(/(-[a-z])/g,t=>t[1].toUpperCase())]=n.slice(e.length+1).trim(),t},{}):\"href\"===t?Bt(n):(n.match(M)&&(n=n.slice(1,n.length-1)),\"true\"===n||\"false\"!==n&&n)}(a,_);\"string\"==typeof i&&(z.test(i)||L.test(i))&&(n[u]=t.cloneElement(q(i.trim()),{key:o}))}else\"style\"!==e&&(n[r[e]||e]=!0);return n},{}):null}const V=[],et={},rt={blockQuote:{t:Ot(i),i:Ht.HIGH,l:(t,n,e)=>({v:n(t[0].replace(s,\"\"),e)}),h:(t,n,e)=>H(\"blockquote\",{key:e.k},n(t.v,e))},breakLine:{t:It(l),i:Ht.HIGH,l:Nt,h:(t,n,e)=>H(\"br\",{key:e.k})},breakThematic:{t:Ot(f),i:Ht.HIGH,l:Nt,h:(t,n,e)=>H(\"hr\",{key:e.k})},codeBlock:{t:Ot(p),i:Ht.MAX,l:t=>({v:t[0].replace(/^ {4}/gm,\"\").replace(/\\n+$/,\"\"),M:void 0}),h:(t,e,r)=>H(\"pre\",{key:r.k},H(\"code\",n({},t.O,{className:t.M?`lang-${t.M}`:\"\"}),t.v))},codeFenced:{t:Ot(d),i:Ht.MAX,l:t=>({O:U(t[3]||\"\"),v:t[4],M:t[2]||void 0,type:\"codeBlock\"})},codeInline:{t:Mt(m),i:Ht.LOW,l:t=>({v:t[2]}),h:(t,n,e)=>H(\"code\",{key:e.k},t.v)},footnote:{t:Ot(h),i:Ht.MAX,l:t=>(V.push({I:t[2],j:t[1]}),{}),h:Pt},footnoteReference:{t:Lt(k),i:Ht.HIGH,l:t=>({v:t[1],B:`#${u.slugify(t[1])}`}),h:(t,n,e)=>H(\"a\",{key:e.k,href:Bt(t.B)},H(\"sup\",{key:e.k},t.v))},gfmTask:{t:Lt(b),i:Ht.HIGH,l:t=>({R:\"x\"===t[1].toLowerCase()}),h:(t,n,e)=>H(\"input\",{checked:t.R,key:e.k,readOnly:!0,type:\"checkbox\"})},heading:{t:Ot(u.enforceAtxHeadings?v:$),i:Ht.HIGH,l:(t,n,e)=>({v:Tt(n,t[2],e),T:u.slugify(t[2]),C:t[1].length}),h:(t,n,e)=>H(`h${t.C}`,{id:t.T,key:e.k},n(t.v,e))},headingSetext:{t:Ot(S),i:Ht.MAX,l:(t,n,e)=>({v:Tt(n,t[1],e),C:\"=\"===t[2]?1:2,type:\"heading\"})},htmlComment:{t:It(A),i:Ht.HIGH,l:()=>({}),h:Pt},image:{t:Mt(bt),i:Ht.HIGH,l:t=>({D:t[1],B:Rt(t[2]),F:t[3]}),h:(t,n,e)=>H(\"img\",{key:e.k,alt:t.D||void 0,title:t.F||void 0,src:Bt(t.B)})},link:{t:Lt(xt),i:Ht.LOW,l:(t,n,e)=>({v:Ct(n,t[1],e),B:Rt(t[2]),F:t[3]}),h:(t,n,e)=>H(\"a\",{key:e.k,href:Bt(t.B),title:t.F},n(t.v,e))},linkAngleBraceStyleDetector:{t:Lt(j),i:Ht.MAX,l:t=>({v:[{v:t[1],type:\"text\"}],B:t[1],type:\"link\"})},linkBareUrlDetector:{t:(t,n)=>n.N?null:Lt(O)(t,n),i:Ht.MAX,l:t=>({v:[{v:t[1],type:\"text\"}],B:t[1],F:void 0,type:\"link\"})},linkMailtoDetector:{t:Lt(I),i:Ht.MAX,l(t){let n=t[1],e=t[1];return _.test(e)||(e=\"mailto:\"+e),{v:[{v:n.replace(\"mailto:\",\"\"),type:\"text\"}],B:e,type:\"link\"}}},orderedList:kt(H,1),unorderedList:kt(H,2),newlineCoalescer:{t:Ot(g),i:Ht.LOW,l:Nt,h:()=>\"\\n\"},paragraph:{t:jt,i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"p\",{key:e.k},n(t.v,e))},ref:{t:Lt(T),i:Ht.MAX,l:t=>(et[t[1]]={B:t[2],F:t[4]},{}),h:Pt},refImage:{t:Mt(C),i:Ht.MAX,l:t=>({D:t[1]||void 0,P:t[2]}),h:(t,n,e)=>H(\"img\",{key:e.k,alt:t.D,src:Bt(et[t.P].B),title:et[t.P].F})},refLink:{t:Lt(D),i:Ht.MAX,l:(t,n,e)=>({v:n(t[1],e),Z:n(t[0].replace(F,\"\\\\$1\"),e),P:t[2]}),h:(t,n,e)=>et[t.P]?H(\"a\",{key:e.k,href:Bt(et[t.P].B),title:et[t.P].F},n(t.v,e)):H(\"span\",{key:e.k},n(t.Z,e))},table:{t:Ot(R),i:Ht.HIGH,l:At,h:(t,n,e)=>H(\"table\",{key:e.k},H(\"thead\",null,H(\"tr\",null,t.L.map(function(r,o){return H(\"th\",{key:o,style:Et(t,o)},n(r,e))}))),H(\"tbody\",null,t.A.map(function(r,o){return H(\"tr\",{key:o},r.map(function(r,o){return H(\"td\",{key:o,style:Et(t,o)},n(r,e))}))})))},tableSeparator:{t:function(t,n){return n.$?(n._=!0,Z.exec(t)):null},i:Ht.HIGH,l:function(){return{type:\"tableSeparator\"}},h:()=>\" | \"},text:{t:It(Y),i:Ht.MIN,l:t=>({v:t[0].replace(w,(t,n)=>u.namedCodesToUnicode[n]?u.namedCodesToUnicode[n]:t)}),h:t=>t.v},textBolded:{t:Mt(W),i:Ht.MED,l:(t,n,e)=>({v:n(t[2],e)}),h:(t,n,e)=>H(\"strong\",{key:e.k},n(t.v,e))},textEmphasized:{t:Mt(Q),i:Ht.LOW,l:(t,n,e)=>({v:n(t[2],e)}),h:(t,n,e)=>H(\"em\",{key:e.k},n(t.v,e))},textEscaped:{t:Mt(K),i:Ht.HIGH,l:t=>({v:t[1],type:\"text\"})},textMarked:{t:Mt(X),i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"mark\",{key:e.k},n(t.v,e))},textStrikethroughed:{t:Mt(J),i:Ht.LOW,l:Ft,h:(t,n,e)=>H(\"del\",{key:e.k},n(t.v,e))}};!0!==u.disableParsingRawHTML&&(rt.htmlBlock={t:It(z),i:Ht.HIGH,l(t,n,e){const[,r]=t[3].match(nt),o=new RegExp(`^${r}`,\"gm\"),a=t[3].replace(o,\"\"),_=(u=a,vt.some(t=>t.test(u))?Dt:Tt);var u;const i=t[1].toLowerCase(),s=-1!==c.indexOf(i);e.N=e.N||\"a\"===i;const l=s?t[3]:_(n,a,e);return e.N=!1,{O:U(t[2]),v:l,G:s,H:s?i:t[1]}},h:(t,e,r)=>H(t.H,n({key:r.k},t.O),t.G?t.v:e(t.v,r))},rt.htmlSelfClosing={t:It(L),i:Ht.HIGH,l:t=>({O:U(t[2]||\"\"),H:t[1]}),h:(t,e,r)=>H(t.H,n({},t.O,{key:r.k}))});const ot=function(t){let n=Object.keys(t);function e(r,o){let c=[],a=\"\";for(;r;){let _=0;for(;_{let{children:r,options:o}=n,c=function(t,n){if(null==t)return{};var e,r,o={},c=Object.keys(t);for(r=0;r=0||(o[e]=t[e]);return o}(n,e);return t.cloneElement(qt(r,o),c)};export{qt as compiler};\n//# sourceMappingURL=index.modern.js.map\n","import Markdown from 'markdown-to-jsx';\n\ninterface MarkdownRendererProps {\n /** Optional unique identifier */\n id?: string;\n /** The markdown string to render */\n markdown: 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({ id, markdown }: MarkdownRendererProps) {\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=\"pr-text-xs pr-text-gray-500 pr-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=\"pr-text-xs pr-text-gray-500 pr-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","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 React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/utils/shadcn-ui.util';\n\nconst alertVariants = cva(\n 'pr-relative pr-w-full pr-rounded-lg pr-border pr-p-4 [&>svg~*]:pr-pl-7 [&>svg+div]:pr-translate-y-[-3px] [&>svg]:pr-absolute [&>svg]:pr-left-4 [&>svg]:pr-top-4 [&>svg]:pr-text-foreground',\n {\n variants: {\n variant: {\n default: 'pr-bg-background pr-text-foreground',\n destructive:\n 'pr-border-destructive/50 pr-text-destructive dark:pr-border-destructive [&>svg]:pr-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 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"],"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","r","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","DataTableViewOptions","table","FilterIcon","column","value","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","getLinesFromUSFM","text","extractNumberFromUSFM","regex","match","extractOccurrences","item","extractItems","scriptureRef","results","lines","currentChapter","currentVerse","line","items","result","OccurrencesTable","selectedItem","scriptureReference","setScriptureReference","localizedStrings","reference","occurrence","tableData","setTableData","INVENTORY_STRING_KEYS","getSortingIcon","sortDirection","ArrowUpIcon","ArrowDownIcon","ArrowUpDownIcon","filterItemData","statusFilter","textFilter","filteredItemData","convertTextToItemData","getInventoryItems","getStatusForItem","itemData","itemIndex","existingItem","entry","newItem","localizeString","strings","Inventory","approvedItems","onApprovedItemsChange","unapprovedItems","onUnapprovedItemsChange","scope","onScopeChange","getColumns","allItemsText","approvedItemsText","unapprovedItemsText","unknownItemsText","scopeBookText","scopeChapterText","scopeVerseText","filterText","setItems","setStatusFilter","setTextFilter","setSelectedItem","statusChangeHandler","changedItems","status","prevTableData","tableEntry","newApprovedItems","validItem","newUnapprovedItems","unapprovedItem","useMemo","rowClickHandler","newScriptureReference","inventoryItemColumn","itemLabel","inventoryCountColumn","countLabel","inventoryStatusColumn","statusLabel","selectedRows","CircleCheckIcon","CircleXIcon","CircleHelpIcon","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","onChange","getOptionLabel","buttonPlaceholder","textPlaceholder","commandEmptyMessage","buttonVariant","dir","setOpen","ChevronsUpDown","ChapterRangeSelector","handleSelectStartChapter","handleSelectEndChapter","isDisabled","chapterCount","startChapter","setStartChapter","setEndChapter","chapterOptions","setChapterOptions","Fragment","FormControlLabel","LabelPosition","Checkbox","isChecked","labelText","labelPosition","isIndeterminate","isDefaultChecked","hasError","checkBox","MuiCheckbox","preceding","labelSpan","labelIsInline","label","checkBoxElement","FormLabel","Checklist","legend","listItems","selectedListItems","handleSelectListItem","createLabel","_interopRequireDefault","obj","module","chainPropTypes","propType1","propType2","args","_extends","target","source","isPlainObject","prototype","deepClone","output","deepmerge","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","isSymbol","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","propTypesModule","isClassComponent","elementType","acceptingRef","safePropName","warningHint","elementAcceptingRef","PropTypes","elementAcceptingRef$1","elementTypeAcceptingRef","elementTypeAcceptingRef$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","getScrollbarSize","documentWidth","getTypeByValue","valueType","ponyfillIsInteger","isInteger","requiredInteger","other","validatorNoop","integerPropType","resolveProps","defaultProps","defaultSlotProps","slotProps","slotPropName","composeClasses","slots","getUtilityClass","classes","slot","utilityClass","defaultGenerator","createClassNameGenerator","generate","generator","ClassNameGenerator","ClassNameGenerator$1","globalStateClasses","generateUtilityClass","globalStatePrefix","globalStateClass","generateUtilityClasses","clamp","min","max","_objectWithoutPropertiesLoose","excluded","sourceKeys","_excluded","sortBreakpointsValues","breakpointsAsArray","breakpoint1","breakpoint2","createBreakpoints","breakpoints","unit","sortedValues","keys","up","down","between","start","end","endIndex","only","not","keyIndex","shape","shape$1","responsivePropType","responsivePropType$1","merge","defaultBreakpoints","handleBreakpoints","styleFromPropValue","theme","themeBreakpoints","index","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","direction","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","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","primary","secondary","info","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","candidatesSelector","getTabIndex","tabindexAttr","isNonTabbableRadio","getRadio","selector","roving","isNodeMatchingSelectorFocusable","defaultGetTabbable","root","regularTabNodes","orderedTabNodes","nodeTabIndex","defaultIsEnabled","FocusTrap","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","rootRef","handleRef","lastKeydown","loopFocus","nativeEvent","contain","rootElement","tabbable","_lastKeydown$current","_lastKeydown$current2","isShiftTab","focusNext","focusPrevious","interval","onFocus","childrenPropsHandler","handleFocusSentinel","getContainer","container","forwardedRef","disablePortal","mountNode","setMountNode","newProps","ReactDOM","isOverflowing","ariaHidden","show","getPaddingRight","isAriaHiddenForbiddenOnElement","isForbiddenTagName","isInputHidden","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","blacklist","isNotExcludedElement","isNotForbiddenElement","findIndexOf","callback","idx","handleContainer","containerInfo","restoreStyle","scrollbarSize","fixedElements","scrollContainer","parent","containerWindow","el","getHiddenSiblings","hiddenSiblings","ModalManager","modal","modalIndex","containerIndex","ariaHiddenState","nextTop","getHasTransition","defaultManager","useModal","disableEscapeKeyDown","disableScrollLock","manager","closeAfterTransition","onTransitionEnter","onTransitionExited","onClose","mountNodeRef","modalRef","exited","setExited","hasTransition","ariaHiddenProp","getDoc","getModal","handleMounted","handleOpen","resolvedContainer","isTopModal","handlePortalRef","handleClose","createHandleKeyDown","otherHandlers","_otherHandlers$onKeyD","createHandleBackdropClick","_otherHandlers$onClic","propsEventHandlers","externalEventHandlers","handleEnter","handleExited","top","bottom","right","left","auto","basePlacements","clippingParents","viewport","popper","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","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","resolvedAnchorEl","display","transitionProps","useThemeSystem","_setPrototypeOf","_inheritsLoose","subClass","superClass","setPrototypeOf","timeoutsShape","TransitionGroupContext","forceReflow","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","Transition","_React$Component","context","_this","parentGroup","appear","initialStatus","prevState","nextIn","_proto","prevProps","nextStatus","exit","enter","mounting","_this2","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","_this3","nextState","_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","getOverlayAlpha","elevation","alphaValue","getOverlayAlpha$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","onOpen","openProp","PopperComponentProp","PopperProps","title","TransitionComponentProp","isRtl","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","openState","setOpenState","prevUserSelect","stopTouchInteraction","handleLeave","focusVisibleRef","setChildIsFocusVisible","handleBlur","handleFocus","detectTouchStart","childrenProps","handleMouseOver","handleMouseLeave","handleTouchStart","handleTouchEnd","handleMouseMove","nameOrDescProps","titleIsString","interactiveWrapperListeners","_PopperProps$popperOp","tooltipModifiers","PopperComponent","TooltipComponent","ArrowComponent","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","Tooltip$1","getIcon","icon","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","firstItem","divKey","itemInfo","menuItemProps","TopLevelMenu","columnId","MenuColumn","metadata","Grid","List","GridMenu","multiColumnMenu","sortedColumns","columnNumbers","columnName","col","ListContext","ListContext$1","getListUtilityClass","disablePadding","dense","subheader","ListRoot","List$1","nextItem","disableListWrap","previousItem","textCriteriaMatches","nextFocus","textCriteria","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","MenuList","actions","autoFocus","autoFocusItem","onKeyDown","listRef","textCriteriaRef","containerElement","noExplicitWidth","criteria","lowerKey","currTime","keepFocusOnCurrent","activeItemIndex","newChildProps","MenuList$1","Fade","defaultTimeout","Fade$1","getBackdropUtilityClass","invisible","BackdropRoot","Backdrop","_slotProps$root","rootSlotProps","Backdrop$1","getModalUtilityClass","ModalRoot","ModalBackdrop","Modal","_slots$backdrop","_slotProps$backdrop","BackdropComponent","BackdropProps","hideBackdrop","onBackdropClick","propsWithDefaults","getRootProps","getBackdropProps","portalRef","RootSlot","BackdropSlot","backdropSlotProps","backdropProps","Modal$1","getPaperUtilityClass","square","PaperRoot","_theme$vars$overlays","Paper","PaperBase","getPopoverUtilityClass","getOffsetTop","vertical","getOffsetLeft","horizontal","getTransformOriginValue","transformOrigin","PopoverRoot","PopoverPaper","_slotProps$paper","_slots$paper","action","anchorOrigin","anchorPosition","anchorReference","marginThreshold","PaperPropsProp","transitionDurationProp","externalPaperSlotProps","paperRef","handlePaperRef","getAnchorOffset","anchorElement","anchorRect","getTransformOrigin","elemRect","getPositioningStyle","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","diff","isPositioned","setIsPositioned","setPositioningStyles","positioning","handleResize","PaperSlot","paperProps","_useSlotProps","rootSlotPropsProp","Popover$1","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","MenuPaper","MenuMenuList","disableAutoFocusItem","MenuListProps","PaperProps","PopoverClasses","menuListActionsRef","handleListKeyDown","paperExternalSlotProps","paperSlotProps","Menu$1","ContextMenu","contextMenuPosition","setContextMenuPosition","handleContextMenu","MenuItemList","getUsePromiseOptionsDefaults","usePromise","promiseFactoryCallback","defaultValueRef","optionsDefaultedRef","isLoading","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","scrBookColId","scrRefColId","typeColId","detailsColId","defaultScrRefColumnName","defaultScrBookGroupName","defaultTypeColumnName","defaultDetailsColumnName","colInfo","showSourceColumn","showSrcCol","formatScrRef","compareScrRefs","ScriptureResultsViewer","sources","showColumnHeaders","scriptureReferenceColumnName","scriptureBookGroupName","typeColumnName","detailsColumnName","onRowSelected","grouping","setGrouping","setData","src","toRefOrRange","scrRefToBBBCCCVVV","getRowKey","getExpandedRowModel","getGroupedRowModel","selectedRow","scrBookGroupName","typeGroupName","groupingOptions","handleSelectChange","selectedGrouping","handleRowClick","getEvenOrOddBandingStyle","getIndent","groupingState","rowIndex","ChevronLeft","SearchBar","onSearch","placeholder","isFullWidth","handleInputChange","Slider","orientation","showMarks","valueLabelDisplay","onChangeCommitted","MuiSlider","Snackbar","autoHideDuration","isOpen","ContentProps","newContentProps","MuiSnackbar","VerticalTabs","TabsPrimitive","VerticalTabsList","VerticalTabsTrigger","VerticalTabsContent","NavigationContentSearch","tabList","searchPlaceholder","headerTitle","isSearchBarFullWidth","tab","Separator","decorative","SeparatorPrimitive","SettingsList","SettingsListItem","loadingMessage","SettingsListHeader","includeSeparator","Spinner","LoaderCircle","Switch","MuiSwitch","labelVariants","Label","LabelPrimitive","TextField","helperText","onBlur","ShadLabel","Toolbar","AppBar","MuiToolbar","Tabs","TabsList","TabsTrigger","TabsContent","InstallButton","isInstalling","handleClick","buttonText","Download","EnableButton","isEnabling","DisableButton","isDisabling","UpdateButton","isUpdating","$","M","j","F","Z","W","Q","Y","tt","nt","et","rt","ot","ct","at","_t","ut","it","st","lt","ft","dt","mt","gt","yt","ht","kt","Ht","xt","bt","$t","vt","St","zt","wt","At","Et","Lt","Mt","Ot","It","jt","Bt","Rt","Tt","Ct","Dt","Ft","Nt","Pt","Zt","Gt","qt","Markdown","MarkdownRenderer","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","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","alertVariants","Alert","AlertTitle","AlertDescription","SliderPrimitive","SwitchPrimitives"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,KAAgBC,GAAoB,EAAE,QAAQ,MAAO,CAAA;AAIpD,SAASC,KAAMC,GAAsB;AACnC,SAAAH,GAAcI,GAAKD,CAAM,CAAC;AACnC;ACJO,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,KAE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A;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;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;AACF,GAAGC,KAAIC;AACP,SAASC,GAAER,GAAGJ,IAAI,IAAI;AACpB,SAAOA,MAAMI,IAAIA,EAAE,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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,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,233,254]} \ No newline at end of file diff --git a/lib/platform-bible-react/package.json b/lib/platform-bible-react/package.json index bdd5e294bb..f8dc0c05ad 100644 --- a/lib/platform-bible-react/package.json +++ b/lib/platform-bible-react/package.json @@ -25,7 +25,9 @@ "main": "dist/index.cjs", "module": "dist/index.js", "types": "dist/index.d.ts", - "files": ["dist"], + "files": [ + "dist" + ], "scripts": { "start": "vite --host --open", "build:basic": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts", @@ -52,8 +54,9 @@ "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-popover": "^1.1.1", - "@radix-ui/react-slider": "^1.2.0", "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.1.0", + "@radix-ui/react-slider": "^1.2.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-switch": "^1.1.0", "@radix-ui/react-tabs": "^1.0.4", diff --git a/lib/platform-bible-react/src/components/advanced/extension-marketplace/more-info.component.tsx b/lib/platform-bible-react/src/components/advanced/extension-marketplace/more-info.component.tsx index 1268f4615c..707e980889 100644 --- a/lib/platform-bible-react/src/components/advanced/extension-marketplace/more-info.component.tsx +++ b/lib/platform-bible-react/src/components/advanced/extension-marketplace/more-info.component.tsx @@ -97,13 +97,17 @@ export default function MoreInfo({
Website Support diff --git a/lib/platform-bible-react/src/components/advanced/navigation-content-search.component.tsx b/lib/platform-bible-react/src/components/advanced/navigation-content-search.component.tsx new file mode 100644 index 0000000000..7276ed72de --- /dev/null +++ b/lib/platform-bible-react/src/components/advanced/navigation-content-search.component.tsx @@ -0,0 +1,66 @@ +import SearchBar from '@/components/basics/search-bar.component'; +import { + VerticalTabs, + VerticalTabsContent, + VerticalTabsList, + VerticalTabsTrigger, +} from '@/components/basics/tabs-vertical'; +import { ReactNode } from 'react'; + +export type TabKeyValueContent = { + key: string; + value: string; + content: ReactNode; +}; + +export type NavigationContentSearchProps = { + /** List of values and keys for each tab this component should provide */ + tabList: TabKeyValueContent[]; + + /** Handler to run when the value of the search bar changes */ + onSearch: (searchQuery: string) => void; + + /** Optional placeholder for the search bar */ + searchPlaceholder?: string; + + /** Optional title to include in the header */ + headerTitle?: string; + + /** Optional flag to make the search bar appear full width */ + isSearchBarFullWidth?: boolean; +}; + +export default function NavigationContentSearch({ + tabList, + onSearch, + searchPlaceholder, + headerTitle, + isSearchBarFullWidth = false, +}: NavigationContentSearchProps) { + return ( +
+
+ {headerTitle ?

{headerTitle}

: ''} + +
+ + + {tabList.map((tab) => ( + + {tab.value} + + ))} + + {tabList.map((tab) => ( + + {tab.content} + + ))} + +
+ ); +} diff --git a/lib/platform-bible-react/src/components/advanced/settings-components/settings-list.component.tsx b/lib/platform-bible-react/src/components/advanced/settings-components/settings-list.component.tsx new file mode 100644 index 0000000000..69dadd6633 --- /dev/null +++ b/lib/platform-bible-react/src/components/advanced/settings-components/settings-list.component.tsx @@ -0,0 +1,101 @@ +import { PropsWithChildren } from 'react'; +import { Separator } from '@/components/shadcn-ui/separator'; + +/** Props for the SettingsList component, currently just children */ +type SettingsListProps = PropsWithChildren; + +/** + * SettingsList component is a wrapper for list items. Rendered with a formatted div + * + * @param children To populate the list with + * @returns Formatted div encompassing the children + */ +export function SettingsList({ children }: SettingsListProps) { + return
{children}
; +} + +/** Props for SettingsListItem component */ +type SettingsListItemProps = PropsWithChildren & { + /** Primary text of the list item */ + primary: string; + + /** Optional text of the list item */ + secondary?: string | undefined; + + /** Optional boolean to display a message if the children aren't loaded yet. Defaults to false */ + isLoading?: boolean; + + /** Optional message to display if isLoading */ + loadingMessage?: string; +}; + +/** + * SettingsListItem component is a common list item. Rendered with a formatted div + * + * @param primary Primary text of the list item + * @param secondary Optional secondary text of the list item + * @param isLoading Optional, to display a message if the action component isn't generated yet, + * defaults to false + * @param children The action component(s) to provide for this item + * @param loadingMessage Optional, message to display if isLoading + * @returns Formatted div encompassing the list item content + */ +export function SettingsListItem({ + primary, + secondary, + children, + isLoading = false, + loadingMessage, +}: SettingsListItemProps) { + return ( +
+
+

{primary}

+

{secondary}

+
+ + {isLoading ? ( +

{loadingMessage}

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

{primary}

+

{secondary}

+
+ {includeSeparator ? : ''} +
+ ); +} diff --git a/lib/platform-bible-react/src/components/basics/search-bar.component.tsx b/lib/platform-bible-react/src/components/basics/search-bar.component.tsx index ca72b53882..6ada2ca296 100644 --- a/lib/platform-bible-react/src/components/basics/search-bar.component.tsx +++ b/lib/platform-bible-react/src/components/basics/search-bar.component.tsx @@ -1,4 +1,5 @@ -import TextField from '@/components/basics/text-field.component'; +import { Input } from '@/components/shadcn-ui/input'; +import { cn } from '@/utils/shadcn-ui.util'; import { useState } from 'react'; export type SearchBarProps = { @@ -25,9 +26,11 @@ export default function SearchBar({ onSearch, placeholder, isFullWidth }: Search }; return ( - handleInputChange(e.target.value)} diff --git a/lib/platform-bible-react/src/components/shadcn-ui/separator.tsx b/lib/platform-bible-react/src/components/shadcn-ui/separator.tsx new file mode 100644 index 0000000000..193c79e0f2 --- /dev/null +++ b/lib/platform-bible-react/src/components/shadcn-ui/separator.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import * as SeparatorPrimitive from '@radix-ui/react-separator'; + +import { cn } from '@/utils/shadcn-ui.util'; + +const Separator = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => ( + +)); +Separator.displayName = SeparatorPrimitive.Root.displayName; + +export { Separator }; diff --git a/lib/platform-bible-react/src/index.ts b/lib/platform-bible-react/src/index.ts index 4e700c1fd1..f7b36e6a6c 100644 --- a/lib/platform-bible-react/src/index.ts +++ b/lib/platform-bible-react/src/index.ts @@ -62,6 +62,15 @@ export type { SearchBarProps } from './components/basics/search-bar.component'; export { default as Slider } from './components/mui/slider.component'; export type { SliderProps } from './components/mui/slider.component'; export { default as Snackbar } from './components/mui/snackbar.component'; +export { + default as NavigationContentSearch, + type TabKeyValueContent, +} from './components/advanced/navigation-content-search.component'; +export { + SettingsList, + SettingsListHeader, + SettingsListItem, +} from './components/advanced/settings-components/settings-list.component'; export type { AnchorOrigin, CloseReason, @@ -89,6 +98,7 @@ export { VerticalTabsContent, VerticalTabsTrigger, } from './components/basics/tabs-vertical'; +export { Separator } from '@/components/shadcn-ui/separator'; export { default as InstallButton } from './components/advanced/extension-marketplace/buttons/install-button.component'; export { default as EnableButton } from './components/advanced/extension-marketplace/buttons/enable-button.component'; diff --git a/lib/platform-bible-react/src/preview/pages/components/advanced.component.tsx b/lib/platform-bible-react/src/preview/pages/components/advanced.component.tsx index 8bd31022bb..86a0ab7d1e 100644 --- a/lib/platform-bible-react/src/preview/pages/components/advanced.component.tsx +++ b/lib/platform-bible-react/src/preview/pages/components/advanced.component.tsx @@ -10,11 +10,13 @@ import { HasDirection } from '@/preview/preview-components/direction-toggle'; import ThemeToggle from '@/preview/preview-components/theme-toggle.component'; import { ScriptureReference } from 'platform-bible-utils'; import { useState } from 'react'; +import NavigationContentSearch from '@/components/advanced/navigation-content-search.component'; import MarketplaceButtonExamples from './advanced/marketplace-buttons.example.component'; import ScriptureResultsViewerExample from './advanced/scripture-results-viewer.examples.component'; import { columns, data } from './data-sources/data-table-content'; import MarketplaceExamples from './advanced/marketplace.example.component'; import InventoryExample from './advanced/inventory-example.component'; +import SettingsListExamples from './advanced/settings-list.examples.component'; const defaultScrRef: ScriptureReference = { bookNum: 1, @@ -24,6 +26,41 @@ const defaultScrRef: ScriptureReference = { function Compositions({ direction }: HasDirection) { const [scrRef, setScrRef] = useState(defaultScrRef); + const [searchValue, setSearchValue] = useState(''); + + const tabList = [ + { + key: 'tab1', + value: 'tab1', + content: ( +
+

TAB 1 CONTENT

+
+ ), + }, + { + key: 'tab2', + value: 'tab2', + content: ( +
+

TAB 2 CONTENT

+
+ ), + }, + { + key: 'tab3', + value: 'tab3', + content: ( +
+

TAB 3 CONTENT

+
+ ), + }, + ]; + + const handleSearchChange = (newSearchValue: string) => { + setSearchValue(newSearchValue); + }; return (
@@ -40,6 +77,10 @@ function Compositions({ direction }: HasDirection) { Marketplace Result List Inventory + + Navigation Content Search + + Settings Components @@ -83,6 +124,20 @@ function Compositions({ direction }: HasDirection) { + + + + + + + +
); diff --git a/lib/platform-bible-react/src/preview/pages/components/advanced/settings-list.examples.component.tsx b/lib/platform-bible-react/src/preview/pages/components/advanced/settings-list.examples.component.tsx new file mode 100644 index 0000000000..b7c4ab717c --- /dev/null +++ b/lib/platform-bible-react/src/preview/pages/components/advanced/settings-list.examples.component.tsx @@ -0,0 +1,50 @@ +import { + SettingsList, + SettingsListHeader, + SettingsListItem, +} from '@/components/advanced/settings-components/settings-list.component'; +import { Input } from '@/components/shadcn-ui/input'; + +export default function SettingsListExamples() { + const generateComponent = (placeholder: string) => { + return ( + <> + {' '} + + ); + }; + + return ( + + + + {generateComponent('Red')} + + + {generateComponent('56')} + + + {generateComponent('color')} + + + ); +} diff --git a/lib/platform-bible-react/src/preview/pages/layouts/dashboard5.layout.component.tsx b/lib/platform-bible-react/src/preview/pages/layouts/dashboard5.layout.component.tsx index 678b249c06..e8f473f371 100644 --- a/lib/platform-bible-react/src/preview/pages/layouts/dashboard5.layout.component.tsx +++ b/lib/platform-bible-react/src/preview/pages/layouts/dashboard5.layout.component.tsx @@ -226,7 +226,7 @@ export default function Dashboard5Examples({ direction }: HasDirection) { max={100} step={1} disabled - onValueChange={(value) => setProgress(value)} + onValueChange={(value: number[]) => setProgress(value)} aria-label={`${progress[0]}% increase`} /> diff --git a/lib/platform-bible-utils/dist/index.cjs b/lib/platform-bible-utils/dist/index.cjs index 3ca339611a..4058aa786d 100644 --- a/lib/platform-bible-utils/dist/index.cjs +++ b/lib/platform-bible-utils/dist/index.cjs @@ -1,2 +1,2 @@ -"use strict";var et=Object.defineProperty;var tt=(t,e,r)=>e in t?et(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var d=(t,e,r)=>(tt(t,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const rt=require("async-mutex");class st{constructor(e,r=1e4){d(this,"variableName");d(this,"promiseToValue");d(this,"resolver");d(this,"rejecter");this.variableName=e,this.promiseToValue=new Promise((s,n)=>{this.resolver=s,this.rejecter=n}),r>0&&setTimeout(()=>{this.rejecter&&(this.rejecter(`Timeout reached when waiting for ${this.variableName} to settle`),this.complete())},r),Object.seal(this)}get promise(){return this.promiseToValue}get hasSettled(){return Object.isFrozen(this)}resolveToValue(e,r=!1){if(this.resolver)console.debug(`${this.variableName} is being resolved now`),this.resolver(e),this.complete();else{if(r)throw Error(`${this.variableName} was already settled`);console.debug(`Ignoring subsequent resolution of ${this.variableName}`)}}rejectWithReason(e,r=!1){if(this.rejecter)console.debug(`${this.variableName} is being rejected now`),this.rejecter(e),this.complete();else{if(r)throw Error(`${this.variableName} was already settled`);console.debug(`Ignoring subsequent rejection of ${this.variableName}`)}}complete(){this.resolver=void 0,this.rejecter=void 0,Object.freeze(this)}}class nt{constructor(e,r){d(this,"collator");this.collator=new Intl.Collator(e,r)}compare(e,r){return this.collator.compare(e,r)}resolvedOptions(){return this.collator.resolvedOptions()}}class pe{constructor(e,r){d(this,"dateTimeFormatter");this.dateTimeFormatter=new Intl.DateTimeFormat(e,r)}format(e){return this.dateTimeFormatter.format(e)}formatRange(e,r){return this.dateTimeFormatter.formatRange(e,r)}formatRangeToParts(e,r){return this.dateTimeFormatter.formatRangeToParts(e,r)}formatToParts(e){return this.dateTimeFormatter.formatToParts(e)}resolvedOptions(){return this.dateTimeFormatter.resolvedOptions()}}class de{constructor(){d(this,"subscribe",this.event);d(this,"subscriptions");d(this,"lazyEvent");d(this,"isDisposed",!1);d(this,"dispose",()=>this.disposeFn());d(this,"emit",e=>{this.emitFn(e)})}get event(){return this.assertNotDisposed(),this.lazyEvent||(this.lazyEvent=e=>{if(!e||typeof e!="function")throw new Error("Event handler callback must be a function!");return this.subscriptions||(this.subscriptions=[]),this.subscriptions.push(e),()=>{if(!this.subscriptions)return!1;const r=this.subscriptions.indexOf(e);return r<0?!1:(this.subscriptions.splice(r,1),!0)}}),this.lazyEvent}emitFn(e){this.assertNotDisposed(),[...this.subscriptions??[]].forEach(s=>s(e))}assertNotDisposed(){if(this.isDisposed)throw new Error("Emitter is disposed")}disposeFn(){return this.assertNotDisposed(),this.isDisposed=!0,this.subscriptions=void 0,this.lazyEvent=void 0,Promise.resolve(!0)}}function it(){return"00-0-4-1-000".replace(/[^-]/g,t=>((Math.random()+~~t)*65536>>t).toString(16).padStart(4,"0"))}function me(t){return typeof t=="string"||t instanceof String}function T(t){return JSON.parse(JSON.stringify(t))}function ot(t,e=300){if(me(t))throw new Error("Tried to debounce a string! Could be XSS");let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>t(...s),e)}}function at(t,e,r){const s=new Map;return t.forEach(n=>{const i=e(n),o=s.get(i),a=r?r(n,i):n;o?o.push(a):s.set(i,[a])}),s}function ut(t){return typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"}function lt(t){if(ut(t))return t;try{return new Error(JSON.stringify(t))}catch{return new Error(String(t))}}function ct(t){return lt(t).message}function ge(t){return new Promise(e=>setTimeout(e,t))}function ft(t,e){const r=ge(e).then(()=>{});return Promise.any([r,t()])}function ht(t,e="obj"){const r=new Set;Object.getOwnPropertyNames(t).forEach(n=>{try{typeof t[n]=="function"&&r.add(n)}catch{}});let s=Object.getPrototypeOf(t);for(;s&&Object.getPrototypeOf(s);)Object.getOwnPropertyNames(s).forEach(n=>{try{typeof t[n]=="function"&&r.add(n)}catch{}}),s=Object.getPrototypeOf(s);return r}function pt(t,e={}){return new Proxy(e,{get(r,s){return s in r?r[s]:async(...n)=>(await t())[s](...n)}})}class be{constructor(e,r){d(this,"baseDocument");d(this,"contributions",new Map);d(this,"latestOutput");d(this,"options");d(this,"onDidRebuildEmitter",new de);d(this,"onDidRebuild",this.onDidRebuildEmitter.subscribe);this.baseDocument=e,this.options=r,this.updateBaseDocument(e)}updateBaseDocument(e){return this.validateBaseDocument(e),this.baseDocument=this.options.copyDocuments?T(e):e,this.baseDocument=this.transformBaseDocumentAfterValidation(this.baseDocument),this.rebuild()}addOrUpdateContribution(e,r){this.validateContribution(e,r);const s=this.contributions.get(e);let n=this.options.copyDocuments&&r?T(r):r;n=this.transformContributionAfterValidation(e,n),this.contributions.set(e,n);try{return this.rebuild()}catch(i){throw s?this.contributions.set(e,s):this.contributions.delete(e),new Error(`Error when setting the document named ${e}: ${i}`)}}deleteContribution(e){const r=this.contributions.get(e);if(!r)throw new Error(`${e} does not exist`);this.contributions.delete(e);try{return this.rebuild()}catch(s){throw this.contributions.set(e,r),new Error(`Error when deleting the document named ${e}: ${s}`)}}deleteAllContributions(){if(this.contributions.size<=0)return this.latestOutput;const e=[...this.contributions.entries()];e.forEach(([r])=>this.contributions.delete(r));try{return this.rebuild()}catch(r){throw e.forEach(([s,n])=>this.contributions.set(s,n)),new Error(`Error when deleting all contributions: ${r}`)}}rebuild(){if(this.contributions.size===0){let r=T(this.baseDocument);return r=this.transformFinalOutputBeforeValidation(r),this.validateOutput(r),this.latestOutput=r,this.onDidRebuildEmitter.emit(void 0),this.latestOutput}let e=this.baseDocument;return this.contributions.forEach(r=>{e=dt(e,r,this.options.ignoreDuplicateProperties),this.validateOutput(e)}),e=this.transformFinalOutputBeforeValidation(e),this.validateOutput(e),this.latestOutput=e,this.onDidRebuildEmitter.emit(void 0),this.latestOutput}transformBaseDocumentAfterValidation(e){return e}transformContributionAfterValidation(e,r){return r}validateBaseDocument(e){}validateContribution(e,r){}validateOutput(e){}transformFinalOutputBeforeValidation(e){return e}}function Q(...t){let e=!0;return t.forEach(r=>{(!r||typeof r!="object"||Array.isArray(r))&&(e=!1)}),e}function ee(...t){let e=!0;return t.forEach(r=>{(!r||typeof r!="object"||!Array.isArray(r))&&(e=!1)}),e}function dt(t,e,r){const s=T(t);return e?ye(s,T(e),r):s}function ye(t,e,r){if(!e)return t;if(Q(t,e)){const s=t,n=e;Object.keys(n).forEach(i=>{if(Object.hasOwn(s,i)){if(Q(s[i],n[i]))s[i]=ye(s[i],n[i],r);else if(ee(s[i],n[i]))s[i]=s[i].concat(n[i]);else if(!r)throw new Error(`Cannot merge objects: key "${i}" already exists in the target object`)}else s[i]=n[i]})}else ee(t,e)&&t.push(...e);return t}class ve extends rt.Mutex{}class mt{constructor(){d(this,"mutexesByID",new Map)}get(e){let r=this.mutexesByID.get(e);return r||(r=new ve,this.mutexesByID.set(e,r),r)}}class gt extends be{constructor(e,r){super(e,r)}get output(){return this.latestOutput}}class Ne{constructor(e,r){d(this,"numberFormatter");this.numberFormatter=new Intl.NumberFormat(e,r)}format(e){return this.numberFormatter.format(e)}formatRange(e,r){return this.numberFormatter.formatRange(e,r)}formatRangeToParts(e,r){return this.numberFormatter.formatRangeToParts(e,r)}formatToParts(e){return this.numberFormatter.formatToParts(e)}resolvedOptions(){return this.numberFormatter.resolvedOptions()}}class bt{constructor(e="Anonymous"){d(this,"unsubscribers",new Set);this.name=e}add(...e){e.forEach(r=>{"dispose"in r?this.unsubscribers.add(r.dispose):this.unsubscribers.add(r)})}async runAllUnsubscribers(){const e=[...this.unsubscribers].map(s=>s()),r=await Promise.all(e);return this.unsubscribers.clear(),r.every((s,n)=>(s||console.error(`UnsubscriberAsyncList ${this.name}: Unsubscriber at index ${n} failed!`),s))}}var yt=Object.defineProperty,vt=(t,e,r)=>e in t?yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e,r)=>vt(t,typeof e!="symbol"?e+"":e,r);const C=["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"],G=["XXA","XXB","XXC","XXD","XXE","XXF","XXG","FRT","BAK","OTH","INT","CNC","GLO","TDX","NDX"],we=["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"],te=Tt();function P(t,e=!0){return e&&(t=t.toUpperCase()),t in te?te[t]:0}function K(t){return P(t)>0}function Nt(t){const e=typeof t=="string"?P(t):t;return e>=40&&e<=66}function wt(t){return(typeof t=="string"?P(t):t)<=39}function Ee(t){return t<=66}function Et(t){const e=typeof t=="string"?P(t):t;return $e(e)&&!Ee(e)}function*St(){for(let t=1;t<=C.length;t++)yield t}const Ot=1,Se=C.length;function $t(){return["XXA","XXB","XXC","XXD","XXE","XXF","XXG"]}function U(t,e="***"){const r=t-1;return r<0||r>=C.length?e:C[r]}function Oe(t){return t<=0||t>Se?"******":we[t-1]}function jt(t){return Oe(P(t))}function $e(t){const e=typeof t=="number"?U(t):t;return K(e)&&!G.includes(e)}function Ct(t){const e=typeof t=="number"?U(t):t;return K(e)&&G.includes(e)}function It(t){return we[t-1].includes("*obsolete*")}function Tt(){const t={};for(let e=0;e(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))(S||{});const N=class{constructor(e){if(l(this,"name"),l(this,"fullPath"),l(this,"isPresent"),l(this,"hasVerseSegments"),l(this,"isCustomized"),l(this,"baseVersification"),l(this,"scriptureBooks"),l(this,"_type"),e==null)throw new Error("Argument undefined");typeof e=="string"?(this.name=e,this._type=S[e]):(this._type=e,this.name=S[e])}get type(){return this._type}equals(e){return!e.type||!this.type?!1:e.type===this.type}};l(N,"Original",new N(S.Original)),l(N,"Septuagint",new N(S.Septuagint)),l(N,"Vulgate",new N(S.Vulgate)),l(N,"English",new N(S.English)),l(N,"RussianProtestant",new N(S.RussianProtestant)),l(N,"RussianOrthodox",new N(S.RussianOrthodox));let $=N;function re(t,e){const r=e[0];for(let s=1;s(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))(je||{});const y=class f{constructor(e,r,s,n){if(l(this,"firstChapter"),l(this,"lastChapter"),l(this,"lastVerse"),l(this,"hasSegmentsDefined"),l(this,"text"),l(this,"BBBCCCVVVS"),l(this,"longHashCode"),l(this,"versification"),l(this,"rtlMark","‏"),l(this,"_bookNum",0),l(this,"_chapterNum",0),l(this,"_verseNum",0),l(this,"_verse"),s==null&&n==null)if(e!=null&&typeof e=="string"){const i=e,o=r!=null&&r instanceof $?r:void 0;this.setEmpty(o),this.parse(i)}else if(e!=null&&typeof e=="number"){const i=r!=null&&r instanceof $?r:void 0;this.setEmpty(i),this._verseNum=e%f.chapterDigitShifter,this._chapterNum=Math.floor(e%f.bookDigitShifter/f.chapterDigitShifter),this._bookNum=Math.floor(e/f.bookDigitShifter)}else if(r==null)if(e!=null&&e instanceof f){const i=e;this._bookNum=i.bookNum,this._chapterNum=i.chapterNum,this._verseNum=i.verseNum,this._verse=i.verse,this.versification=i.versification}else{if(e==null)return;const i=e instanceof $?e:f.defaultVersification;this.setEmpty(i)}else throw new Error("VerseRef constructor not supported.");else if(e!=null&&r!=null&&s!=null)if(typeof e=="string"&&typeof r=="string"&&typeof s=="string")this.setEmpty(n),this.updateInternal(e,r,s);else if(typeof e=="number"&&typeof r=="number"&&typeof s=="number")this._bookNum=e,this._chapterNum=r,this._verseNum=s,this.versification=n??f.defaultVersification;else throw new Error("VerseRef constructor not supported.");else throw new Error("VerseRef constructor not supported.")}static isVerseParseable(e){return e.length>0&&"0123456789".includes(e[0])&&!e.endsWith(this.verseRangeSeparator)&&!e.endsWith(this.verseSequenceIndicator)}static tryParse(e){let r;try{return r=new f(e),{success:!0,verseRef:r}}catch(s){if(s instanceof D)return r=new f,{success:!1,verseRef:r};throw s}}static getBBBCCCVVV(e,r,s){return e%f.bcvMaxValue*f.bookDigitShifter+(r>=0?r%f.bcvMaxValue*f.chapterDigitShifter:0)+(s>=0?s%f.bcvMaxValue:0)}static fromJSON(e){const{book:r,chapterNum:s,verseNum:n,verse:i,versificationStr:o}=e,a=i||n.toString();let h;return o&&(h=new $(o)),r?new f(r,s.toString(),a,h):new f}static tryGetVerseNum(e){let r;if(!e)return r=-1,{success:!0,vNum:r};r=0;let s;for(let n=0;n"9")return n===0&&(r=-1),{success:!1,vNum:r};if(r=r*10+ +s-0,r>f.bcvMaxValue)return r=-1,{success:!1,vNum:r}}return{success:!0,vNum:r}}get isDefault(){return this.bookNum===0&&this.chapterNum===0&&this.verseNum===0&&this.versification==null}get hasMultiple(){return this._verse!=null&&(this._verse.includes(f.verseRangeSeparator)||this._verse.includes(f.verseSequenceIndicator))}get book(){return E.bookNumberToId(this.bookNum,"")}set book(e){this.bookNum=E.bookIdToNumber(e)}get chapter(){return this.isDefault||this._chapterNum<0?"":this._chapterNum.toString()}set chapter(e){const r=+e;this._chapterNum=Number.isInteger(r)?r:-1}get verse(){return this._verse!=null?this._verse:this.isDefault||this._verseNum<0?"":this._verseNum.toString()}set verse(e){const{success:r,vNum:s}=f.tryGetVerseNum(e);this._verse=r?void 0:e.replace(this.rtlMark,""),this._verseNum=s,!(this._verseNum>=0)&&({vNum:this._verseNum}=f.tryGetVerseNum(this._verse))}get bookNum(){return this._bookNum}set bookNum(e){if(e<=0||e>E.lastBook)throw new D("BookNum must be greater than zero and less than or equal to last book");this._bookNum=e}get chapterNum(){return this._chapterNum}set chapterNum(e){this.chapterNum=e}get verseNum(){return this._verseNum}set verseNum(e){this._verseNum=e}get versificationStr(){var e;return(e=this.versification)==null?void 0:e.name}set versificationStr(e){this.versification=this.versification!=null?new $(e):void 0}get valid(){return this.validStatus===0}get validStatus(){return this.validateVerse(f.verseRangeSeparators,f.verseSequenceIndicators)}get BBBCCC(){return f.getBBBCCCVVV(this._bookNum,this._chapterNum,0)}get BBBCCCVVV(){return f.getBBBCCCVVV(this._bookNum,this._chapterNum,this._verseNum)}get isExcluded(){return!1}parse(e){if(e=e.replace(this.rtlMark,""),e.includes("/")){const i=e.split("/");if(e=i[0],i.length>1)try{const o=+i[1].trim();this.versification=new $(S[o])}catch{throw new D("Invalid reference : "+e)}}const r=e.trim().split(" ");if(r.length!==2)throw new D("Invalid reference : "+e);const s=r[1].split(":"),n=+s[0];if(s.length!==2||E.bookIdToNumber(r[0])===0||!Number.isInteger(n)||n<0||!f.isVerseParseable(s[1]))throw new D("Invalid reference : "+e);this.updateInternal(r[0],s[0],s[1])}simplify(){this._verse=void 0}clone(){return new f(this)}toString(){const e=this.book;return e===""?"":`${e} ${this.chapter}:${this.verse}`}toJSON(){let e=this.verse;(e===""||e===this.verseNum.toString())&&(e=void 0);const r={book:this.book,chapterNum:this.chapterNum,verseNum:this.verseNum,verse:e,versificationStr:this.versificationStr};return e||delete r.verse,r}equals(e){return e instanceof f?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}allVerses(e=!1,r=f.verseRangeSeparators,s=f.verseSequenceIndicators){if(this._verse==null||this.chapterNum<=0)return[this.clone()];const n=[],i=re(this._verse,s);for(const o of i.map(a=>re(a,r))){const a=this.clone();a.verse=o[0];const h=a.verseNum;if(n.push(a),o.length>1){const p=this.clone();if(p.verse=o[1],!e)for(let u=h+1;uo)return 3;if(s===o)return 4;s=o}return 0}get internalValid(){return this.versification==null?1:this._bookNum<=0||this._bookNum>E.lastBook?2:(E.isCanonical(this._bookNum),0)}setEmpty(e=f.defaultVersification){this._bookNum=0,this._chapterNum=-1,this._verse=void 0,this.versification=e}updateInternal(e,r,s){this.bookNum=E.bookIdToNumber(e),this.chapter=r,this.verse=s}};l(y,"defaultVersification",$.English),l(y,"verseRangeSeparator","-"),l(y,"verseSequenceIndicator",","),l(y,"verseRangeSeparators",[y.verseRangeSeparator]),l(y,"verseSequenceIndicators",[y.verseSequenceIndicator]),l(y,"chapterDigitShifter",1e3),l(y,"bookDigitShifter",y.chapterDigitShifter*y.chapterDigitShifter),l(y,"bcvMaxValue",y.chapterDigitShifter-1),l(y,"ValidStatusType",je);let At=y;class D extends Error{}var se=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},I={},Pt=()=>{const t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",n="\\u1ab0-\\u1aff",i="\\u1dc0-\\u1dff",o=e+r+s+n+i,a="\\ufe0e\\ufe0f",h="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",p=`[${t}]`,u=`[${o}]`,c="\\ud83c[\\udffb-\\udfff]",m=`(?:${u}|${c})`,v=`[^${t}]`,b="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",M="[\\ud800-\\udbff][\\udc00-\\udfff]",q="\\u200d",He="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",We=`[${h}]`,Z=`${m}?`,Y=`[${a}]?`,Ze=`(?:${q}(?:${[v,b,M].join("|")})${Y+Z})*`,Ye=Y+Z+Ze,Qe=`(?:${[`${v}${u}?`,u,b,M,p,We].join("|")})`;return new RegExp(`${He}|${c}(?=${c})|${Qe+Ye}`,"g")},Bt=se&&se.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(I,"__esModule",{value:!0});var k=Bt(Pt);function z(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(k.default())||[]}var Mt=I.toArray=z;function X(t){if(typeof t!="string")throw new Error("Input must be a string");var e=t.match(k.default());return e===null?0:e.length}var Dt=I.length=X;function Ce(t,e,r){if(e===void 0&&(e=0),typeof t!="string")throw new Error("Input must be a string");(typeof e!="number"||e<0)&&(e=0),typeof r=="number"&&r<0&&(r=0);var s=t.match(k.default());return s?s.slice(e,r).join(""):""}var Rt=I.substring=Ce;function xt(t,e,r){if(e===void 0&&(e=0),typeof t!="string")throw new Error("Input must be a string");var s=X(t);if(typeof e!="number"&&(e=parseInt(e,10)),e>=s)return"";e<0&&(e+=s);var n;typeof r>"u"?n=s:(typeof r!="number"&&(r=parseInt(r,10)),n=r>=0?r+e:e);var i=t.match(k.default());return i?i.slice(e,n).join(""):""}var kt=I.substr=xt;function Vt(t,e,r,s){if(e===void 0&&(e=16),r===void 0&&(r="#"),s===void 0&&(s="right"),typeof t!="string"||typeof e!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(s)===-1)throw new Error("Pad position should be either left or right");typeof r!="string"&&(r=String(r));var n=X(t);if(n>e)return Ce(t,0,e);if(n=s.length)return e===""?s.length:-1;if(e==="")return r;var n=z(e),i=!1,o;for(o=r;og(t)||e<-g(t)))return V(t,e,1)}function j(t,e){return e<0||e>g(t)-1?"":V(t,e,1)}function Jt(t,e){if(!(e<0||e>g(t)-1))return V(t,e,1).codePointAt(0)}function Te(t,e,r=g(t)){const s=Pe(t,e);return!(s===-1||s+g(e)!==r)}function Ft(t,e,r){if(e<0)return-1;if(r){if(j(t,e)==="}"&&j(t,e-1)==="\\")return e;const i=A(t,"\\}",e);return i>=0?i+1:i}let s=e;const n=g(t);for(;s=n?-1:s}function Gt(t,e){let r=t,s=0;for(;s=0){const i=w(r,s+1,n),o=i in e?`${e[i]}`:i;r=`${w(r,0,s)}${o}${w(r,n+1)}`,s=n+g(o)-g(i)-2}}else r=`${w(r,0,s-1)}${w(r,s)}`,s-=1;break;case"}":j(r,s-1)!=="\\"||(r=`${w(r,0,s-1)}${w(r,s)}`,s-=1);break}s+=1}return r}function Ae(t,e,r=0){const s=w(t,r);return A(s,e)!==-1}function A(t,e,r=0){return zt(t,e,r)}function Pe(t,e,r){let s=r===void 0?g(t):r;s<0?s=0:s>=g(t)&&(s=g(t)-1);for(let n=s;n>=0;n--)if(V(t,n,g(e))===e)return n;return-1}function g(t){return Dt(t)}function Kt(t,e){const r=e.toUpperCase();return r==="NONE"?t:t.normalize(r)}function Ut(t,e,r){return t.localeCompare(e,"en",r)}function Xt(t,e,r=" "){return e<=g(t)?t:Ie(t,e,r,"right")}function Lt(t,e,r=" "){return e<=g(t)?t:Ie(t,e,r,"left")}function ne(t,e){return e>t?t:e<-t?0:e<0?e+t:e}function Ht(t,e,r){const s=g(t);if(e>s||r&&(e>r&&!(e>=0&&e-s)||r<-s))return"";const n=ne(s,e),i=r?ne(s,r):void 0;return w(t,n,i)}function _(t,e,r){const s=[];if(r!==void 0&&r<=0)return[t];if(e==="")return Be(t).slice(0,r);let n=e;(typeof e=="string"||e instanceof RegExp&&!Ae(e.flags,"g"))&&(n=new RegExp(e,"g"));const i=t.match(n);let o=0;if(!i)return[t];for(let a=0;a<(r?r-1:i.length);a++){const h=A(t,i[a],o),p=g(i[a]);if(s.push(w(t,o,h)),o=h+p,r!==void 0&&s.length===r)break}return s.push(w(t,o)),s}function L(t,e,r=0){return A(t,e,r)===r}function V(t,e=0,r=g(t)-e){return kt(t,e,r)}function w(t,e,r=g(t)){return Rt(t,e,r)}function Be(t){return Mt(t)}function Wt(t){return L(t,"%")&&Te(t,"%")}function Zt(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Me=[{shortName:"ERR",fullNames:["ERROR"],chapters:-1},{shortName:"GEN",fullNames:["Genesis"],chapters:50},{shortName:"EXO",fullNames:["Exodus"],chapters:40},{shortName:"LEV",fullNames:["Leviticus"],chapters:27},{shortName:"NUM",fullNames:["Numbers"],chapters:36},{shortName:"DEU",fullNames:["Deuteronomy"],chapters:34},{shortName:"JOS",fullNames:["Joshua"],chapters:24},{shortName:"JDG",fullNames:["Judges"],chapters:21},{shortName:"RUT",fullNames:["Ruth"],chapters:4},{shortName:"1SA",fullNames:["1 Samuel"],chapters:31},{shortName:"2SA",fullNames:["2 Samuel"],chapters:24},{shortName:"1KI",fullNames:["1 Kings"],chapters:22},{shortName:"2KI",fullNames:["2 Kings"],chapters:25},{shortName:"1CH",fullNames:["1 Chronicles"],chapters:29},{shortName:"2CH",fullNames:["2 Chronicles"],chapters:36},{shortName:"EZR",fullNames:["Ezra"],chapters:10},{shortName:"NEH",fullNames:["Nehemiah"],chapters:13},{shortName:"EST",fullNames:["Esther"],chapters:10},{shortName:"JOB",fullNames:["Job"],chapters:42},{shortName:"PSA",fullNames:["Psalm","Psalms"],chapters:150},{shortName:"PRO",fullNames:["Proverbs"],chapters:31},{shortName:"ECC",fullNames:["Ecclesiastes"],chapters:12},{shortName:"SNG",fullNames:["Song of Solomon","Song of Songs"],chapters:8},{shortName:"ISA",fullNames:["Isaiah"],chapters:66},{shortName:"JER",fullNames:["Jeremiah"],chapters:52},{shortName:"LAM",fullNames:["Lamentations"],chapters:5},{shortName:"EZK",fullNames:["Ezekiel"],chapters:48},{shortName:"DAN",fullNames:["Daniel"],chapters:12},{shortName:"HOS",fullNames:["Hosea"],chapters:14},{shortName:"JOL",fullNames:["Joel"],chapters:3},{shortName:"AMO",fullNames:["Amos"],chapters:9},{shortName:"OBA",fullNames:["Obadiah"],chapters:1},{shortName:"JON",fullNames:["Jonah"],chapters:4},{shortName:"MIC",fullNames:["Micah"],chapters:7},{shortName:"NAM",fullNames:["Nahum"],chapters:3},{shortName:"HAB",fullNames:["Habakkuk"],chapters:3},{shortName:"ZEP",fullNames:["Zephaniah"],chapters:3},{shortName:"HAG",fullNames:["Haggai"],chapters:2},{shortName:"ZEC",fullNames:["Zechariah"],chapters:14},{shortName:"MAL",fullNames:["Malachi"],chapters:4},{shortName:"MAT",fullNames:["Matthew"],chapters:28},{shortName:"MRK",fullNames:["Mark"],chapters:16},{shortName:"LUK",fullNames:["Luke"],chapters:24},{shortName:"JHN",fullNames:["John"],chapters:21},{shortName:"ACT",fullNames:["Acts"],chapters:28},{shortName:"ROM",fullNames:["Romans"],chapters:16},{shortName:"1CO",fullNames:["1 Corinthians"],chapters:16},{shortName:"2CO",fullNames:["2 Corinthians"],chapters:13},{shortName:"GAL",fullNames:["Galatians"],chapters:6},{shortName:"EPH",fullNames:["Ephesians"],chapters:6},{shortName:"PHP",fullNames:["Philippians"],chapters:4},{shortName:"COL",fullNames:["Colossians"],chapters:4},{shortName:"1TH",fullNames:["1 Thessalonians"],chapters:5},{shortName:"2TH",fullNames:["2 Thessalonians"],chapters:3},{shortName:"1TI",fullNames:["1 Timothy"],chapters:6},{shortName:"2TI",fullNames:["2 Timothy"],chapters:4},{shortName:"TIT",fullNames:["Titus"],chapters:3},{shortName:"PHM",fullNames:["Philemon"],chapters:1},{shortName:"HEB",fullNames:["Hebrews"],chapters:13},{shortName:"JAS",fullNames:["James"],chapters:5},{shortName:"1PE",fullNames:["1 Peter"],chapters:5},{shortName:"2PE",fullNames:["2 Peter"],chapters:3},{shortName:"1JN",fullNames:["1 John"],chapters:5},{shortName:"2JN",fullNames:["2 John"],chapters:1},{shortName:"3JN",fullNames:["3 John"],chapters:1},{shortName:"JUD",fullNames:["Jude"],chapters:1},{shortName:"REV",fullNames:["Revelation"],chapters:22}],De=1,Re=Me.length-1,xe=1,ke=1,Ve=t=>{var e;return((e=Me[t])==null?void 0:e.chapters)??-1},Yt=(t,e)=>({bookNum:Math.max(De,Math.min(t.bookNum+e,Re)),chapterNum:1,verseNum:1}),Qt=(t,e)=>({...t,chapterNum:Math.min(Math.max(xe,t.chapterNum+e),Ve(t.bookNum)),verseNum:1}),er=(t,e)=>({...t,verseNum:Math.max(ke,t.verseNum+e)});async function tr(t,e,r){const s=E.bookNumberToId(t);if(!L(Intl.getCanonicalLocales(e)[0],"zh"))return r({localizeKey:`LocalizedId.${s}`,languagesToSearch:[e]});const n=await r({localizeKey:`Book.${s}`,languagesToSearch:[e]}),i=_(n,"-");return _(i[0],"ÿ08")[0].trim()}function J(t){return new At(t.bookNum,t.chapterNum,t.verseNum).BBBCCCVVV}function rr(t,e){return J(t)-J(e)}function sr(t,e,r,s){let n;switch(e??"id"){case"English":n=E.bookNumberToEnglishName(t.bookNum);break;case"id":n=E.bookNumberToId(t.bookNum);break;default:n=e??"";break}return`${n}${s??" "}${t.chapterNum}${r??":"}${t.verseNum}`}const nr=t=>(...e)=>t.map(s=>s(...e)).every(s=>s),ir=t=>async(...e)=>{const r=t.map(async s=>s(...e));return(await Promise.all(r)).every(s=>s)};var or=Object.getOwnPropertyNames,ar=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty;function ie(t,e){return function(s,n,i){return t(s,n,i)&&e(s,n,i)}}function x(t){return function(r,s,n){if(!r||!s||typeof r!="object"||typeof s!="object")return t(r,s,n);var i=n.cache,o=i.get(r),a=i.get(s);if(o&&a)return o===s&&a===r;i.set(r,s),i.set(s,r);var h=t(r,s,n);return i.delete(r),i.delete(s),h}}function oe(t){return or(t).concat(ar(t))}var qe=Object.hasOwn||function(t,e){return ur.call(t,e)};function B(t,e){return t||e?t===e:t===e||t!==t&&e!==e}var ze="_owner",ae=Object.getOwnPropertyDescriptor,ue=Object.keys;function lr(t,e,r){var s=t.length;if(e.length!==s)return!1;for(;s-- >0;)if(!r.equals(t[s],e[s],s,s,t,e,r))return!1;return!0}function cr(t,e){return B(t.getTime(),e.getTime())}function le(t,e,r){if(t.size!==e.size)return!1;for(var s={},n=t.entries(),i=0,o,a;(o=n.next())&&!o.done;){for(var h=e.entries(),p=!1,u=0;(a=h.next())&&!a.done;){var c=o.value,m=c[0],v=c[1],b=a.value,M=b[0],q=b[1];!p&&!s[u]&&(p=r.equals(m,M,i,u,t,e,r)&&r.equals(v,q,m,M,t,e,r))&&(s[u]=!0),u++}if(!p)return!1;i++}return!0}function fr(t,e,r){var s=ue(t),n=s.length;if(ue(e).length!==n)return!1;for(var i;n-- >0;)if(i=s[n],i===ze&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!qe(e,i)||!r.equals(t[i],e[i],i,i,t,e,r))return!1;return!0}function R(t,e,r){var s=oe(t),n=s.length;if(oe(e).length!==n)return!1;for(var i,o,a;n-- >0;)if(i=s[n],i===ze&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!qe(e,i)||!r.equals(t[i],e[i],i,i,t,e,r)||(o=ae(t,i),a=ae(e,i),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function hr(t,e){return B(t.valueOf(),e.valueOf())}function pr(t,e){return t.source===e.source&&t.flags===e.flags}function ce(t,e,r){if(t.size!==e.size)return!1;for(var s={},n=t.values(),i,o;(i=n.next())&&!i.done;){for(var a=e.values(),h=!1,p=0;(o=a.next())&&!o.done;)!h&&!s[p]&&(h=r.equals(i.value,o.value,i.value,o.value,t,e,r))&&(s[p]=!0),p++;if(!h)return!1}return!0}function dr(t,e){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}var mr="[object Arguments]",gr="[object Boolean]",br="[object Date]",yr="[object Map]",vr="[object Number]",Nr="[object Object]",wr="[object RegExp]",Er="[object Set]",Sr="[object String]",Or=Array.isArray,fe=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,he=Object.assign,$r=Object.prototype.toString.call.bind(Object.prototype.toString);function jr(t){var e=t.areArraysEqual,r=t.areDatesEqual,s=t.areMapsEqual,n=t.areObjectsEqual,i=t.arePrimitiveWrappersEqual,o=t.areRegExpsEqual,a=t.areSetsEqual,h=t.areTypedArraysEqual;return function(u,c,m){if(u===c)return!0;if(u==null||c==null||typeof u!="object"||typeof c!="object")return u!==u&&c!==c;var v=u.constructor;if(v!==c.constructor)return!1;if(v===Object)return n(u,c,m);if(Or(u))return e(u,c,m);if(fe!=null&&fe(u))return h(u,c,m);if(v===Date)return r(u,c,m);if(v===RegExp)return o(u,c,m);if(v===Map)return s(u,c,m);if(v===Set)return a(u,c,m);var b=$r(u);return b===br?r(u,c,m):b===wr?o(u,c,m):b===yr?s(u,c,m):b===Er?a(u,c,m):b===Nr?typeof u.then!="function"&&typeof c.then!="function"&&n(u,c,m):b===mr?n(u,c,m):b===gr||b===vr||b===Sr?i(u,c,m):!1}}function Cr(t){var e=t.circular,r=t.createCustomConfig,s=t.strict,n={areArraysEqual:s?R:lr,areDatesEqual:cr,areMapsEqual:s?ie(le,R):le,areObjectsEqual:s?R:fr,arePrimitiveWrappersEqual:hr,areRegExpsEqual:pr,areSetsEqual:s?ie(ce,R):ce,areTypedArraysEqual:s?R:dr};if(r&&(n=he({},n,r(n))),e){var i=x(n.areArraysEqual),o=x(n.areMapsEqual),a=x(n.areObjectsEqual),h=x(n.areSetsEqual);n=he({},n,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:h})}return n}function Ir(t){return function(e,r,s,n,i,o,a){return t(e,r,a)}}function Tr(t){var e=t.circular,r=t.comparator,s=t.createState,n=t.equals,i=t.strict;if(s)return function(h,p){var u=s(),c=u.cache,m=c===void 0?e?new WeakMap:void 0:c,v=u.meta;return r(h,p,{cache:m,equals:n,meta:v,strict:i})};if(e)return function(h,p){return r(h,p,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};var o={cache:void 0,equals:n,meta:void 0,strict:i};return function(h,p){return r(h,p,o)}}var Ar=O();O({strict:!0});O({circular:!0});O({circular:!0,strict:!0});O({createInternalComparator:function(){return B}});O({strict:!0,createInternalComparator:function(){return B}});O({circular:!0,createInternalComparator:function(){return B}});O({circular:!0,createInternalComparator:function(){return B},strict:!0});function O(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,s=t.createInternalComparator,n=t.createState,i=t.strict,o=i===void 0?!1:i,a=Cr(t),h=jr(a),p=s?s(h):Ir(h);return Tr({circular:r,comparator:h,createState:n,equals:p,strict:o})}function _e(t,e){return Ar(t,e)}function Je(t,e){if(typeof t!=typeof e)return!1;if(!t&&!e)return!0;if(Array.isArray(t)){const i=e,o=t;return i.length===0?!0:i.every(a=>o.includes(a))}if(typeof t!="object")return _e(t,e);const r=e,s=t;let n=!0;return Object.keys(r).forEach(i=>{n&&(Object.hasOwn(s,i)&&Je(s[i],r[i])||(n=!1))}),n}function F(t,e,r){return JSON.stringify(t,(n,i)=>{let o=i;return e&&(o=e(n,o)),o===void 0&&(o=null),o},r)}function Fe(t,e){function r(n){return Object.keys(n).forEach(i=>{n[i]===null?n[i]=void 0:typeof n[i]=="object"&&(n[i]=r(n[i]))}),n}const s=JSON.parse(t,e);if(s!==null)return typeof s=="object"?r(s):s}function Pr(t){try{const e=F(t);return e===F(Fe(e))}catch{return!1}}const Br=t=>t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/");function Mr(){return typeof navigator<"u"&&navigator.languages?navigator.languages[0]:new pe().resolvedOptions().locale}function Dr(t,e=2){if(t===0)return"0 Bytes";const r=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(t)/Math.log(1024)),n=r[s];return`${new Ne("en",{style:"decimal",maximumFractionDigits:e,minimumFractionDigits:0}).format(t/1024**s)} ${n}`}const H={projectSettingsContribution:{description:"The data an extension provides to inform Platform.Bible of the project settings it provides",anyOf:[{$ref:"#/$defs/projectSettingsGroup"},{type:"array",items:{$ref:"#/$defs/projectSettingsGroup"}}]},projectSettingsGroup:{description:"Group of related settings definitions",type:"object",properties:{label:{description:"localizeKey that displays in the project settings dialog as the group name",$ref:"#/$defs/localizeKey"},description:{description:"localizeKey that displays in the project settings dialog to describe the group",$ref:"#/$defs/localizeKey"},properties:{$ref:"#/$defs/projectSettingProperties"}},required:["label","properties"]},projectSettingProperties:{description:"Object whose keys are setting IDs and whose values are settings objects",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{$ref:"#/$defs/projectSetting"}},additionalProperties:!1},projectSetting:{description:"A description of an extension's setting entry",anyOf:[{$ref:"#/$defs/extensionControlledProjectSetting"}]},extensionControlledProjectSetting:{description:"Setting definition that is validated by the extension.",allOf:[{$ref:"#/$defs/projectSettingBase"},{$ref:"#/$defs/modifierExtensionControlled"}]},projectSettingBase:{description:"Base information needed to describe a project setting entry",allOf:[{$ref:"#/$defs/settingBase"},{$ref:"#/$defs/modifierProject"}]},modifierProject:{description:"Modifies setting type to be project setting",type:"object",properties:{includeProjectInterfaces:{description:"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should be included.\n\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to pass):\n\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition\n\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\n\nDefaults to all {@link ProjectInterfaces}, so all projects that do not match `excludeProjectInterfaces` will be included\n\n@example\n\n```typescript\nincludeProjectInterfaces: ['one', ['two', 'three']];\n```\n\nThis filter condition will succeed on projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\n\n- Include `one`\n- Include both `two` and `three`.",anyOf:[{type:"null"},{type:"string"},{type:"array",items:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}]},excludeProjectInterfaces:{description:"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should absolutely not be included even if they match with `includeProjectInterfaces`.\n\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to exclude the project):\n\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition and exclude the project\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition and exclude the project\n\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\n\nDefaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces` will be included\n\n@example\n\n```typescript\nexcludeProjectInterfaces: ['one', ['two', 'three']];\n```\n\nThis filter condition will succeed and exclude projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\n\n- Include `one`\n- Include both `two` and `three`.",anyOf:[{type:"null"},{type:"string"},{type:"array",items:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}]},includePdpFactoryIds:{description:"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should be included.\n\nDefaults to all Project Data Provider Factory Ids, so all projects that do not match `excludePdpFactoryIds` will be included",anyOf:[{type:"null"},{type:"string"},{type:"array",items:{type:"string"}}]},excludePdpFactoryIds:{description:"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should absolutely not be included even if they match with `includeProjectInterfaces`.\n\nDefaults to none, so all projects that match `includePdpFactoryIds` will be included",anyOf:[{type:"null"},{type:"string"},{type:"array",items:{type:"string"}}]}}},settingsContribution:{description:"The data an extension provides to inform Platform.Bible of the settings it provides",anyOf:[{$ref:"#/$defs/settingsGroup"},{type:"array",items:{$ref:"#/$defs/settingsGroup"}}]},settingsGroup:{description:"Group of related settings definitions",type:"object",properties:{label:{description:"localizeKey that displays in the settings dialog as the group name",$ref:"#/$defs/localizeKey"},description:{description:"localizeKey that displays in the settings dialog to describe the group",$ref:"#/$defs/localizeKey"},properties:{$ref:"#/$defs/settingProperties"}},required:["label","properties"]},settingProperties:{description:"Object whose keys are setting IDs and whose values are settings objects",type:"object",patternProperties:{"^[\\w-]+\\.[\\w-]+$":{$ref:"#/$defs/setting"}},additionalProperties:!1},setting:{description:"A description of an extension's setting entry",anyOf:[{$ref:"#/$defs/extensionControlledSetting"}]},extensionControlledSetting:{description:"Setting definition that is validated by the extension.",allOf:[{$ref:"#/$defs/settingBase"},{$ref:"#/$defs/modifierExtensionControlled"}]},settingBase:{description:"Base information needed to describe a setting entry",allOf:[{$ref:"#/$defs/stateBase"},{type:"object",properties:{label:{description:"localizeKey that displays in the settings dialog as the setting name",$ref:"#/$defs/localizeKey"},description:{description:"localizeKey that displays in the settings dialog to describe the setting",$ref:"#/$defs/localizeKey"}},required:["label"]}]},projectStateContribution:{description:"The data an extension provides to inform Platform.Bible of the project state it provides",$ref:"#/$defs/userStateProperties"},userStateContribution:{description:"The data an extension provides to inform Platform.Bible of the user state it provides",$ref:"#/$defs/userStateProperties"},userStateProperties:{description:"Object whose keys are state IDs and whose values are state objects",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{$ref:"#/$defs/userState"}},additionalProperties:!1},userState:{description:"A description of an extension's user state entry",anyOf:[{$ref:"#/$defs/extensionControlledState"}]},extensionControlledState:{description:"State definition that is validated by the extension.",allOf:[{$ref:"#/$defs/stateBase"},{$ref:"#/$defs/modifierExtensionControlled"}]},modifierExtensionControlled:{description:'Modifies state/setting type to be extension-controlled. "Extension-controlled" means the extension provides the component and the validator for the state/setting, so the state/setting is controlled by the extension.',not:{anyOf:[{type:"object",required:["platformType"]},{type:"object",required:["type"]}]}},stateBase:{description:"Base information needed to describe a state entry",type:"object",properties:{default:{description:"default value for the state/setting",type:"any"},derivesFrom:{description:"a state/setting ID whose value to set to this state/setting's starting value the first time this state/setting is loaded",$ref:"#/$defs/id"}},required:["default"]},localizeKey:{description:"Identifier for a string that will be localized based on the user's UI language",type:"string",pattern:"^%[\\w\\-\\.]+%$",tsType:"LocalizeKey"},id:{description:"",type:"string",pattern:"^[\\w\\-]+\\.[\\w\\-]+$",tsType:"Id"}};function W(t){t&&Object.values(t).forEach(e=>{if(e.type){if("tsType"in e&&delete e.tsType,e.type==="any"){delete e.type;return}e.type==="object"&&W(e.properties)}})}W(H);const Ge={$schema:"https://json-schema.org/draft/2020-12/schema",title:"Project Settings Contribution",description:"The data an extension provides to inform Platform.Bible of the project settings it provides",anyOf:[{$ref:"#/$defs/projectSettingsGroup"},{type:"array",items:{$ref:"#/$defs/projectSettingsGroup"}}],$defs:H};Object.freeze(Ge);const Ke={$schema:"https://json-schema.org/draft/2020-12/schema",title:"Settings Contribution",description:"The data an extension provides to inform Platform.Bible of the settings it provides",anyOf:[{$ref:"#/$defs/settingsGroup"},{type:"array",items:{$ref:"#/$defs/settingsGroup"}}],$defs:H};Object.freeze(Ke);const Ue={languageStrings:{description:"Map whose keys are localized string keys and whose values provide information about how to localize strings for the localized string key",type:"object",patternProperties:{"^%[\\w\\-\\.]+%$":{$ref:"#/$defs/localizedStringValue"}},additionalProperties:!1},localizedStringValue:{description:"Localized string value associated with this key",type:"string"},stringsMetadata:{description:"Map whose keys are localized string keys and whose values provide additional non-locale-specific information about the localized string key",type:"object",patternProperties:{"^%[\\w\\-\\.]+%$":{$ref:"#/$defs/stringMetadata"}},additionalProperties:!1},stringMetadata:{description:"Additional non-locale-specific information about a localized string key",type:"object",properties:{fallbackKey:{description:"Localized string key from which to get this value if one does not exist in the specified language. If a new key/value pair needs to be made to replace an existing one, this could help smooth over the transition if the meanings are close enough.\nYou can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a backslash `\\`.",type:"string",pattern:"^%[\\w\\-\\.;&,' (){}#:/\\\\?%⋮|[\\]“”‘’!~* +=•`…​↑↓]+%$",tsType:"LocalizeKey"},notes:{description:"Additional information provided by developers in English to help the translator to know how to translate this localized string accurately",type:"string"}}},localizeKey:{description:"Identifier for a string that will be localized based on the user's UI language",type:"string",pattern:"^%[\\w\\-\\.]+%$",tsType:"LocalizeKey"}};W(Ue);const Xe={$schema:"https://json-schema.org/draft/2020-12/schema",title:"Localized String Data Contribution",description:"The data an extension provides to inform Platform.Bible of the localized strings it provides.",type:"object",properties:{metadata:{$ref:"#/$defs/stringsMetadata"},localizedStrings:{type:"object",additionalProperties:{$ref:"#/$defs/languageStrings"}}},$defs:Ue};Object.freeze(Xe);const Le={title:"Platform.Bible menus",type:"object",properties:{mainMenu:{description:"Top level menu for the application",$ref:"#/$defs/multiColumnMenu"},defaultWebViewTopMenu:{description:"Default top menu for web views that don't specify their own",$ref:"#/$defs/multiColumnMenu"},defaultWebViewContextMenu:{description:"Default context menu for web views that don't specify their own",$ref:"#/$defs/singleColumnMenu"},webViewMenus:{description:"Menus that apply per web view in the application",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{$ref:"#/$defs/menusForOneWebView"}},additionalProperties:!1}},required:["mainMenu","defaultWebViewTopMenu","defaultWebViewContextMenu","webViewMenus"],additionalProperties:!1,$defs:{localizeKey:{description:"Identifier for a string that will be localized in a menu based on the user's UI language",type:"string",pattern:"^%[\\w\\-\\.]+%$"},referencedItem:{description:"Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command)",type:"string",pattern:"^[\\w\\-]+\\.[\\w\\-]+$"},columnsWithHeaders:{description:"Group of columns that can be combined with other columns to form a multi-column menu",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{description:"Single column with a header string",type:"object",properties:{label:{description:"Header text for this this column in the UI",$ref:"#/$defs/localizeKey"},localizeNotes:{description:"Additional information provided by developers to help people who perform localization",type:"string"},order:{description:"Relative order of this column compared to other columns (sorted ascending)",type:"number"},isExtensible:{description:"Defines whether contributions are allowed to add menu groups to this column",type:"boolean"}},required:["label","order"],additionalProperties:!1}},properties:{isExtensible:{description:"Defines whether contributions are allowed to add columns to this multi-column menu",type:"boolean"}}},menuGroups:{description:"Group of menu items that can be combined with other groups to form a single menu/submenu. Groups are separated using a line within the menu/submenu.",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{description:"Single group that contains menu items",type:"object",oneOf:[{properties:{column:{description:"Column where this group belongs, not required for single column menus",$ref:"#/$defs/referencedItem"},order:{description:"Relative order of this group compared to other groups in the same column or submenu (sorted ascending)",type:"number"},isExtensible:{description:"Defines whether contributions are allowed to add menu items to this menu group",type:"boolean"}},required:["order"],additionalProperties:!1},{properties:{menuItem:{description:"Menu item that anchors the submenu where this group belongs",$ref:"#/$defs/referencedItem"},order:{description:"Relative order of this group compared to other groups in the same column or submenu (sorted ascending)",type:"number"},isExtensible:{description:"Defines whether contributions are allowed to add menu items to this menu group",type:"boolean"}},required:["menuItem","order"],additionalProperties:!1}]}},additionalProperties:!1},menuItem:{description:"Single item in a menu that can be clicked on to take an action or can be the parent of a submenu",type:"object",oneOf:[{properties:{id:{description:"ID for this menu item that holds a submenu",$ref:"#/$defs/referencedItem"}},required:["id"]},{properties:{command:{description:"Name of the PAPI command to run when this menu item is selected.",$ref:"#/$defs/referencedItem"},iconPathBefore:{description:"Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`",type:"string"},iconPathAfter:{description:"Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`",type:"string"}},required:["command"]}],properties:{label:{description:"Key that represents the text of this menu item to display",$ref:"#/$defs/localizeKey"},tooltip:{description:"Key that represents the text to display if a mouse pointer hovers over the menu item",$ref:"#/$defs/localizeKey"},searchTerms:{description:"Key that represents additional words the platform should reference when users are searching for menu items",$ref:"#/$defs/localizeKey"},localizeNotes:{description:"Additional information provided by developers to help people who perform localization",type:"string"},group:{description:"Group to which this menu item belongs",$ref:"#/$defs/referencedItem"},order:{description:"Relative order of this menu item compared to other menu items in the same group (sorted ascending)",type:"number"}},required:["label","group","order"],unevaluatedProperties:!1},groupsAndItems:{description:"Core schema for a column",type:"object",properties:{groups:{description:"Groups that belong in this menu",$ref:"#/$defs/menuGroups"},items:{description:"List of menu items that belong in this menu",type:"array",items:{$ref:"#/$defs/menuItem"},uniqueItems:!0}},required:["groups","items"]},singleColumnMenu:{description:"Menu that contains a column without a header",type:"object",allOf:[{$ref:"#/$defs/groupsAndItems"}],unevaluatedProperties:!1},multiColumnMenu:{description:"Menu that can contain multiple columns with headers",type:"object",allOf:[{$ref:"#/$defs/groupsAndItems"},{properties:{columns:{description:"Columns that belong in this menu",$ref:"#/$defs/columnsWithHeaders"}},required:["columns"]}],unevaluatedProperties:!1},menusForOneWebView:{description:"Set of menus that are associated with a single tab",type:"object",properties:{includeDefaults:{description:"Indicates whether the platform default menus should be included for this webview",type:"boolean"},topMenu:{description:"Menu that opens when you click on the top left corner of a tab",$ref:"#/$defs/multiColumnMenu"},contextMenu:{description:"Menu that opens when you right click on the main body/area of a tab",$ref:"#/$defs/singleColumnMenu"}},additionalProperties:!1}}};Object.freeze(Le);exports.AsyncVariable=st;exports.Collator=nt;exports.DateTimeFormat=pe;exports.DocumentCombiner=be;exports.FIRST_SCR_BOOK_NUM=De;exports.FIRST_SCR_CHAPTER_NUM=xe;exports.FIRST_SCR_VERSE_NUM=ke;exports.LAST_SCR_BOOK_NUM=Re;exports.Mutex=ve;exports.MutexMap=mt;exports.NonValidatingDocumentCombiner=gt;exports.NumberFormat=Ne;exports.PlatformEventEmitter=de;exports.UnsubscriberAsyncList=bt;exports.aggregateUnsubscriberAsyncs=ir;exports.aggregateUnsubscribers=nr;exports.at=_t;exports.charAt=j;exports.codePointAt=Jt;exports.compareScrRefs=rr;exports.createSyncProxyForAsyncObject=pt;exports.debounce=ot;exports.deepClone=T;exports.deepEqual=_e;exports.deserialize=Fe;exports.endsWith=Te;exports.escapeStringRegexp=Zt;exports.formatBytes=Dr;exports.formatReplacementString=Gt;exports.formatScrRef=sr;exports.getAllObjectFunctionNames=ht;exports.getChaptersForBook=Ve;exports.getCurrentLocale=Mr;exports.getErrorMessage=ct;exports.getLocalizedIdFromBookNumber=tr;exports.groupBy=at;exports.htmlEncode=Br;exports.includes=Ae;exports.indexOf=A;exports.isLocalizeKey=Wt;exports.isSerializable=Pr;exports.isString=me;exports.isSubset=Je;exports.lastIndexOf=Pe;exports.localizedStringsDocumentSchema=Xe;exports.menuDocumentSchema=Le;exports.newGuid=it;exports.normalize=Kt;exports.offsetBook=Yt;exports.offsetChapter=Qt;exports.offsetVerse=er;exports.ordinalCompare=Ut;exports.padEnd=Xt;exports.padStart=Lt;exports.projectSettingsDocumentSchema=Ge;exports.scrRefToBBBCCCVVV=J;exports.serialize=F;exports.settingsDocumentSchema=Ke;exports.slice=Ht;exports.split=_;exports.startsWith=L;exports.stringLength=g;exports.substring=w;exports.toArray=Be;exports.wait=ge;exports.waitForDuration=ft; +"use strict";var tt=Object.defineProperty;var rt=(t,e,r)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var d=(t,e,r)=>(rt(t,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const st=require("async-mutex");class nt{constructor(e,r=1e4){d(this,"variableName");d(this,"promiseToValue");d(this,"resolver");d(this,"rejecter");this.variableName=e,this.promiseToValue=new Promise((s,n)=>{this.resolver=s,this.rejecter=n}),r>0&&setTimeout(()=>{this.rejecter&&(this.rejecter(`Timeout reached when waiting for ${this.variableName} to settle`),this.complete())},r),Object.seal(this)}get promise(){return this.promiseToValue}get hasSettled(){return Object.isFrozen(this)}resolveToValue(e,r=!1){if(this.resolver)console.debug(`${this.variableName} is being resolved now`),this.resolver(e),this.complete();else{if(r)throw Error(`${this.variableName} was already settled`);console.debug(`Ignoring subsequent resolution of ${this.variableName}`)}}rejectWithReason(e,r=!1){if(this.rejecter)console.debug(`${this.variableName} is being rejected now`),this.rejecter(e),this.complete();else{if(r)throw Error(`${this.variableName} was already settled`);console.debug(`Ignoring subsequent rejection of ${this.variableName}`)}}complete(){this.resolver=void 0,this.rejecter=void 0,Object.freeze(this)}}class it{constructor(e,r){d(this,"collator");this.collator=new Intl.Collator(e,r)}compare(e,r){return this.collator.compare(e,r)}resolvedOptions(){return this.collator.resolvedOptions()}}class de{constructor(e,r){d(this,"dateTimeFormatter");this.dateTimeFormatter=new Intl.DateTimeFormat(e,r)}format(e){return this.dateTimeFormatter.format(e)}formatRange(e,r){return this.dateTimeFormatter.formatRange(e,r)}formatRangeToParts(e,r){return this.dateTimeFormatter.formatRangeToParts(e,r)}formatToParts(e){return this.dateTimeFormatter.formatToParts(e)}resolvedOptions(){return this.dateTimeFormatter.resolvedOptions()}}class me{constructor(){d(this,"subscribe",this.event);d(this,"subscriptions");d(this,"lazyEvent");d(this,"isDisposed",!1);d(this,"dispose",()=>this.disposeFn());d(this,"emit",e=>{this.emitFn(e)})}get event(){return this.assertNotDisposed(),this.lazyEvent||(this.lazyEvent=e=>{if(!e||typeof e!="function")throw new Error("Event handler callback must be a function!");return this.subscriptions||(this.subscriptions=[]),this.subscriptions.push(e),()=>{if(!this.subscriptions)return!1;const r=this.subscriptions.indexOf(e);return r<0?!1:(this.subscriptions.splice(r,1),!0)}}),this.lazyEvent}emitFn(e){this.assertNotDisposed(),[...this.subscriptions??[]].forEach(s=>s(e))}assertNotDisposed(){if(this.isDisposed)throw new Error("Emitter is disposed")}disposeFn(){return this.assertNotDisposed(),this.isDisposed=!0,this.subscriptions=void 0,this.lazyEvent=void 0,Promise.resolve(!0)}}function ot(){return"00-0-4-1-000".replace(/[^-]/g,t=>((Math.random()+~~t)*65536>>t).toString(16).padStart(4,"0"))}function ge(t){return typeof t=="string"||t instanceof String}function I(t){return JSON.parse(JSON.stringify(t))}function at(t,e=300){if(ge(t))throw new Error("Tried to debounce a string! Could be XSS");let r;return(...s)=>{clearTimeout(r),r=setTimeout(()=>t(...s),e)}}function ut(t,e,r){const s=new Map;return t.forEach(n=>{const i=e(n),o=s.get(i),a=r?r(n,i):n;o?o.push(a):s.set(i,[a])}),s}function lt(t){return typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"}function ct(t){if(lt(t))return t;try{return new Error(JSON.stringify(t))}catch{return new Error(String(t))}}function ft(t){return ct(t).message}function be(t){return new Promise(e=>setTimeout(e,t))}function ht(t,e){const r=be(e).then(()=>{});return Promise.any([r,t()])}function pt(t,e="obj"){const r=new Set;Object.getOwnPropertyNames(t).forEach(n=>{try{typeof t[n]=="function"&&r.add(n)}catch{}});let s=Object.getPrototypeOf(t);for(;s&&Object.getPrototypeOf(s);)Object.getOwnPropertyNames(s).forEach(n=>{try{typeof t[n]=="function"&&r.add(n)}catch{}}),s=Object.getPrototypeOf(s);return r}function dt(t,e={}){return new Proxy(e,{get(r,s){return s in r?r[s]:async(...n)=>(await t())[s](...n)}})}class ye{constructor(e,r){d(this,"baseDocument");d(this,"contributions",new Map);d(this,"latestOutput");d(this,"options");d(this,"onDidRebuildEmitter",new me);d(this,"onDidRebuild",this.onDidRebuildEmitter.subscribe);this.baseDocument=e,this.options=r,this.updateBaseDocument(e)}updateBaseDocument(e){return this.validateBaseDocument(e),this.baseDocument=this.options.copyDocuments?I(e):e,this.baseDocument=this.transformBaseDocumentAfterValidation(this.baseDocument),this.rebuild()}addOrUpdateContribution(e,r){this.validateContribution(e,r);const s=this.contributions.get(e);let n=this.options.copyDocuments&&r?I(r):r;n=this.transformContributionAfterValidation(e,n),this.contributions.set(e,n);try{return this.rebuild()}catch(i){throw s?this.contributions.set(e,s):this.contributions.delete(e),new Error(`Error when setting the document named ${e}: ${i}`)}}deleteContribution(e){const r=this.contributions.get(e);if(!r)throw new Error(`${e} does not exist`);this.contributions.delete(e);try{return this.rebuild()}catch(s){throw this.contributions.set(e,r),new Error(`Error when deleting the document named ${e}: ${s}`)}}deleteAllContributions(){if(this.contributions.size<=0)return this.latestOutput;const e=[...this.contributions.entries()];e.forEach(([r])=>this.contributions.delete(r));try{return this.rebuild()}catch(r){throw e.forEach(([s,n])=>this.contributions.set(s,n)),new Error(`Error when deleting all contributions: ${r}`)}}rebuild(){if(this.contributions.size===0){let r=I(this.baseDocument);return r=this.transformFinalOutputBeforeValidation(r),this.validateOutput(r),this.latestOutput=r,this.onDidRebuildEmitter.emit(void 0),this.latestOutput}let e=this.baseDocument;return this.contributions.forEach(r=>{e=mt(e,r,this.options.ignoreDuplicateProperties),this.validateOutput(e)}),e=this.transformFinalOutputBeforeValidation(e),this.validateOutput(e),this.latestOutput=e,this.onDidRebuildEmitter.emit(void 0),this.latestOutput}transformBaseDocumentAfterValidation(e){return e}transformContributionAfterValidation(e,r){return r}validateBaseDocument(e){}validateContribution(e,r){}validateOutput(e){}transformFinalOutputBeforeValidation(e){return e}}function ee(...t){let e=!0;return t.forEach(r=>{(!r||typeof r!="object"||Array.isArray(r))&&(e=!1)}),e}function te(...t){let e=!0;return t.forEach(r=>{(!r||typeof r!="object"||!Array.isArray(r))&&(e=!1)}),e}function mt(t,e,r){const s=I(t);return e?ve(s,I(e),r):s}function ve(t,e,r){if(!e)return t;if(ee(t,e)){const s=t,n=e;Object.keys(n).forEach(i=>{if(Object.hasOwn(s,i)){if(ee(s[i],n[i]))s[i]=ve(s[i],n[i],r);else if(te(s[i],n[i]))s[i]=s[i].concat(n[i]);else if(!r)throw new Error(`Cannot merge objects: key "${i}" already exists in the target object`)}else s[i]=n[i]})}else te(t,e)&&t.push(...e);return t}class Ne extends st.Mutex{}class gt{constructor(){d(this,"mutexesByID",new Map)}get(e){let r=this.mutexesByID.get(e);return r||(r=new Ne,this.mutexesByID.set(e,r),r)}}class bt extends ye{constructor(e,r){super(e,r)}get output(){return this.latestOutput}}class we{constructor(e,r){d(this,"numberFormatter");this.numberFormatter=new Intl.NumberFormat(e,r)}format(e){return this.numberFormatter.format(e)}formatRange(e,r){return this.numberFormatter.formatRange(e,r)}formatRangeToParts(e,r){return this.numberFormatter.formatRangeToParts(e,r)}formatToParts(e){return this.numberFormatter.formatToParts(e)}resolvedOptions(){return this.numberFormatter.resolvedOptions()}}class yt{constructor(e="Anonymous"){d(this,"unsubscribers",new Set);this.name=e}add(...e){e.forEach(r=>{"dispose"in r?this.unsubscribers.add(r.dispose):this.unsubscribers.add(r)})}async runAllUnsubscribers(){const e=[...this.unsubscribers].map(s=>s()),r=await Promise.all(e);return this.unsubscribers.clear(),r.every((s,n)=>(s||console.error(`UnsubscriberAsyncList ${this.name}: Unsubscriber at index ${n} failed!`),s))}}var vt=Object.defineProperty,Nt=(t,e,r)=>e in t?vt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);const C=["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"],G=["XXA","XXB","XXC","XXD","XXE","XXF","XXG","FRT","BAK","OTH","INT","CNC","GLO","TDX","NDX"],Ee=["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"],re=Tt();function P(t,e=!0){return e&&(t=t.toUpperCase()),t in re?re[t]:0}function K(t){return P(t)>0}function wt(t){const e=typeof t=="string"?P(t):t;return e>=40&&e<=66}function Et(t){return(typeof t=="string"?P(t):t)<=39}function Se(t){return t<=66}function St(t){const e=typeof t=="string"?P(t):t;return je(e)&&!Se(e)}function*Ot(){for(let t=1;t<=C.length;t++)yield t}const $t=1,Oe=C.length;function jt(){return["XXA","XXB","XXC","XXD","XXE","XXF","XXG"]}function U(t,e="***"){const r=t-1;return r<0||r>=C.length?e:C[r]}function $e(t){return t<=0||t>Oe?"******":Ee[t-1]}function Ct(t){return $e(P(t))}function je(t){const e=typeof t=="number"?U(t):t;return K(e)&&!G.includes(e)}function At(t){const e=typeof t=="number"?U(t):t;return K(e)&&G.includes(e)}function It(t){return Ee[t-1].includes("*obsolete*")}function Tt(){const t={};for(let e=0;e(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))(S||{});const N=class{constructor(e){if(l(this,"name"),l(this,"fullPath"),l(this,"isPresent"),l(this,"hasVerseSegments"),l(this,"isCustomized"),l(this,"baseVersification"),l(this,"scriptureBooks"),l(this,"_type"),e==null)throw new Error("Argument undefined");typeof e=="string"?(this.name=e,this._type=S[e]):(this._type=e,this.name=S[e])}get type(){return this._type}equals(e){return!e.type||!this.type?!1:e.type===this.type}};l(N,"Original",new N(S.Original)),l(N,"Septuagint",new N(S.Septuagint)),l(N,"Vulgate",new N(S.Vulgate)),l(N,"English",new N(S.English)),l(N,"RussianProtestant",new N(S.RussianProtestant)),l(N,"RussianOrthodox",new N(S.RussianOrthodox));let $=N;function se(t,e){const r=e[0];for(let s=1;s(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))(Ce||{});const y=class f{constructor(e,r,s,n){if(l(this,"firstChapter"),l(this,"lastChapter"),l(this,"lastVerse"),l(this,"hasSegmentsDefined"),l(this,"text"),l(this,"BBBCCCVVVS"),l(this,"longHashCode"),l(this,"versification"),l(this,"rtlMark","‏"),l(this,"_bookNum",0),l(this,"_chapterNum",0),l(this,"_verseNum",0),l(this,"_verse"),s==null&&n==null)if(e!=null&&typeof e=="string"){const i=e,o=r!=null&&r instanceof $?r:void 0;this.setEmpty(o),this.parse(i)}else if(e!=null&&typeof e=="number"){const i=r!=null&&r instanceof $?r:void 0;this.setEmpty(i),this._verseNum=e%f.chapterDigitShifter,this._chapterNum=Math.floor(e%f.bookDigitShifter/f.chapterDigitShifter),this._bookNum=Math.floor(e/f.bookDigitShifter)}else if(r==null)if(e!=null&&e instanceof f){const i=e;this._bookNum=i.bookNum,this._chapterNum=i.chapterNum,this._verseNum=i.verseNum,this._verse=i.verse,this.versification=i.versification}else{if(e==null)return;const i=e instanceof $?e:f.defaultVersification;this.setEmpty(i)}else throw new Error("VerseRef constructor not supported.");else if(e!=null&&r!=null&&s!=null)if(typeof e=="string"&&typeof r=="string"&&typeof s=="string")this.setEmpty(n),this.updateInternal(e,r,s);else if(typeof e=="number"&&typeof r=="number"&&typeof s=="number")this._bookNum=e,this._chapterNum=r,this._verseNum=s,this.versification=n??f.defaultVersification;else throw new Error("VerseRef constructor not supported.");else throw new Error("VerseRef constructor not supported.")}static isVerseParseable(e){return e.length>0&&"0123456789".includes(e[0])&&!e.endsWith(this.verseRangeSeparator)&&!e.endsWith(this.verseSequenceIndicator)}static tryParse(e){let r;try{return r=new f(e),{success:!0,verseRef:r}}catch(s){if(s instanceof x)return r=new f,{success:!1,verseRef:r};throw s}}static getBBBCCCVVV(e,r,s){return e%f.bcvMaxValue*f.bookDigitShifter+(r>=0?r%f.bcvMaxValue*f.chapterDigitShifter:0)+(s>=0?s%f.bcvMaxValue:0)}static fromJSON(e){const{book:r,chapterNum:s,verseNum:n,verse:i,versificationStr:o}=e,a=i||n.toString();let h;return o&&(h=new $(o)),r?new f(r,s.toString(),a,h):new f}static tryGetVerseNum(e){let r;if(!e)return r=-1,{success:!0,vNum:r};r=0;let s;for(let n=0;n"9")return n===0&&(r=-1),{success:!1,vNum:r};if(r=r*10+ +s-0,r>f.bcvMaxValue)return r=-1,{success:!1,vNum:r}}return{success:!0,vNum:r}}get isDefault(){return this.bookNum===0&&this.chapterNum===0&&this.verseNum===0&&this.versification==null}get hasMultiple(){return this._verse!=null&&(this._verse.includes(f.verseRangeSeparator)||this._verse.includes(f.verseSequenceIndicator))}get book(){return E.bookNumberToId(this.bookNum,"")}set book(e){this.bookNum=E.bookIdToNumber(e)}get chapter(){return this.isDefault||this._chapterNum<0?"":this._chapterNum.toString()}set chapter(e){const r=+e;this._chapterNum=Number.isInteger(r)?r:-1}get verse(){return this._verse!=null?this._verse:this.isDefault||this._verseNum<0?"":this._verseNum.toString()}set verse(e){const{success:r,vNum:s}=f.tryGetVerseNum(e);this._verse=r?void 0:e.replace(this.rtlMark,""),this._verseNum=s,!(this._verseNum>=0)&&({vNum:this._verseNum}=f.tryGetVerseNum(this._verse))}get bookNum(){return this._bookNum}set bookNum(e){if(e<=0||e>E.lastBook)throw new x("BookNum must be greater than zero and less than or equal to last book");this._bookNum=e}get chapterNum(){return this._chapterNum}set chapterNum(e){this.chapterNum=e}get verseNum(){return this._verseNum}set verseNum(e){this._verseNum=e}get versificationStr(){var e;return(e=this.versification)==null?void 0:e.name}set versificationStr(e){this.versification=this.versification!=null?new $(e):void 0}get valid(){return this.validStatus===0}get validStatus(){return this.validateVerse(f.verseRangeSeparators,f.verseSequenceIndicators)}get BBBCCC(){return f.getBBBCCCVVV(this._bookNum,this._chapterNum,0)}get BBBCCCVVV(){return f.getBBBCCCVVV(this._bookNum,this._chapterNum,this._verseNum)}get isExcluded(){return!1}parse(e){if(e=e.replace(this.rtlMark,""),e.includes("/")){const i=e.split("/");if(e=i[0],i.length>1)try{const o=+i[1].trim();this.versification=new $(S[o])}catch{throw new x("Invalid reference : "+e)}}const r=e.trim().split(" ");if(r.length!==2)throw new x("Invalid reference : "+e);const s=r[1].split(":"),n=+s[0];if(s.length!==2||E.bookIdToNumber(r[0])===0||!Number.isInteger(n)||n<0||!f.isVerseParseable(s[1]))throw new x("Invalid reference : "+e);this.updateInternal(r[0],s[0],s[1])}simplify(){this._verse=void 0}clone(){return new f(this)}toString(){const e=this.book;return e===""?"":`${e} ${this.chapter}:${this.verse}`}toJSON(){let e=this.verse;(e===""||e===this.verseNum.toString())&&(e=void 0);const r={book:this.book,chapterNum:this.chapterNum,verseNum:this.verseNum,verse:e,versificationStr:this.versificationStr};return e||delete r.verse,r}equals(e){return e instanceof f?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}allVerses(e=!1,r=f.verseRangeSeparators,s=f.verseSequenceIndicators){if(this._verse==null||this.chapterNum<=0)return[this.clone()];const n=[],i=se(this._verse,s);for(const o of i.map(a=>se(a,r))){const a=this.clone();a.verse=o[0];const h=a.verseNum;if(n.push(a),o.length>1){const p=this.clone();if(p.verse=o[1],!e)for(let u=h+1;uo)return 3;if(s===o)return 4;s=o}return 0}get internalValid(){return this.versification==null?1:this._bookNum<=0||this._bookNum>E.lastBook?2:(E.isCanonical(this._bookNum),0)}setEmpty(e=f.defaultVersification){this._bookNum=0,this._chapterNum=-1,this._verse=void 0,this.versification=e}updateInternal(e,r,s){this.bookNum=E.bookIdToNumber(e),this.chapter=r,this.verse=s}};l(y,"defaultVersification",$.English),l(y,"verseRangeSeparator","-"),l(y,"verseSequenceIndicator",","),l(y,"verseRangeSeparators",[y.verseRangeSeparator]),l(y,"verseSequenceIndicators",[y.verseSequenceIndicator]),l(y,"chapterDigitShifter",1e3),l(y,"bookDigitShifter",y.chapterDigitShifter*y.chapterDigitShifter),l(y,"bcvMaxValue",y.chapterDigitShifter-1),l(y,"ValidStatusType",Ce);let Pt=y;class x extends Error{}var ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},A={},Bt=()=>{const t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",n="\\u1ab0-\\u1aff",i="\\u1dc0-\\u1dff",o=e+r+s+n+i,a="\\ufe0e\\ufe0f",h="\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93",p=`[${t}]`,u=`[${o}]`,c="\\ud83c[\\udffb-\\udfff]",m=`(?:${u}|${c})`,v=`[^${t}]`,b="(?:\\uD83C[\\uDDE6-\\uDDFF]){2}",R="[\\ud800-\\udbff][\\udc00-\\udfff]",q="\\u200d",We="(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)",Ze=`[${h}]`,Y=`${m}?`,Q=`[${a}]?`,Ye=`(?:${q}(?:${[v,b,R].join("|")})${Q+Y})*`,Qe=Q+Y+Ye,et=`(?:${[`${v}${u}?`,u,b,R,p,Ze].join("|")})`;return new RegExp(`${We}|${c}(?=${c})|${et+Qe}`,"g")},Rt=ne&&ne.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A,"__esModule",{value:!0});var k=Rt(Bt);function z(t){if(typeof t!="string")throw new Error("A string is expected as input");return t.match(k.default())||[]}var xt=A.toArray=z;function X(t){if(typeof t!="string")throw new Error("Input must be a string");var e=t.match(k.default());return e===null?0:e.length}var Dt=A.length=X;function Ae(t,e,r){if(e===void 0&&(e=0),typeof t!="string")throw new Error("Input must be a string");(typeof e!="number"||e<0)&&(e=0),typeof r=="number"&&r<0&&(r=0);var s=t.match(k.default());return s?s.slice(e,r).join(""):""}var Mt=A.substring=Ae;function kt(t,e,r){if(e===void 0&&(e=0),typeof t!="string")throw new Error("Input must be a string");var s=X(t);if(typeof e!="number"&&(e=parseInt(e,10)),e>=s)return"";e<0&&(e+=s);var n;typeof r>"u"?n=s:(typeof r!="number"&&(r=parseInt(r,10)),n=r>=0?r+e:e);var i=t.match(k.default());return i?i.slice(e,n).join(""):""}var Vt=A.substr=kt;function qt(t,e,r,s){if(e===void 0&&(e=16),r===void 0&&(r="#"),s===void 0&&(s="right"),typeof t!="string"||typeof e!="number")throw new Error("Invalid arguments specified");if(["left","right"].indexOf(s)===-1)throw new Error("Pad position should be either left or right");typeof r!="string"&&(r=String(r));var n=X(t);if(n>e)return Ae(t,0,e);if(n=s.length)return e===""?s.length:-1;if(e==="")return r;var n=z(e),i=!1,o;for(o=r;og(t)||e<-g(t)))return V(t,e,1)}function j(t,e){return e<0||e>g(t)-1?"":V(t,e,1)}function Ft(t,e){if(!(e<0||e>g(t)-1))return V(t,e,1).codePointAt(0)}function Te(t,e,r=g(t)){const s=Be(t,e);return!(s===-1||s+g(e)!==r)}function Gt(t,e,r){if(e<0)return-1;if(r){if(j(t,e)==="}"&&j(t,e-1)==="\\")return e;const i=T(t,"\\}",e);return i>=0?i+1:i}let s=e;const n=g(t);for(;s=n?-1:s}function Kt(t,e){let r=t,s=0;for(;s=0){const i=w(r,s+1,n),o=i in e?`${e[i]}`:i;r=`${w(r,0,s)}${o}${w(r,n+1)}`,s=n+g(o)-g(i)-2}}else r=`${w(r,0,s-1)}${w(r,s)}`,s-=1;break;case"}":j(r,s-1)!=="\\"||(r=`${w(r,0,s-1)}${w(r,s)}`,s-=1);break}s+=1}return r}function Pe(t,e,r=0){const s=w(t,r);return T(s,e)!==-1}function T(t,e,r=0){return _t(t,e,r)}function Be(t,e,r){let s=r===void 0?g(t):r;s<0?s=0:s>=g(t)&&(s=g(t)-1);for(let n=s;n>=0;n--)if(V(t,n,g(e))===e)return n;return-1}function g(t){return Dt(t)}function Ut(t,e){const r=e.toUpperCase();return r==="NONE"?t:t.normalize(r)}function Xt(t,e,r){return t.localeCompare(e,"en",r)}function Lt(t,e,r=" "){return e<=g(t)?t:Ie(t,e,r,"right")}function Ht(t,e,r=" "){return e<=g(t)?t:Ie(t,e,r,"left")}function ie(t,e){return e>t?t:e<-t?0:e<0?e+t:e}function Wt(t,e,r){const s=g(t);if(e>s||r&&(e>r&&!(e>=0&&e-s)||r<-s))return"";const n=ie(s,e),i=r?ie(s,r):void 0;return w(t,n,i)}function _(t,e,r){const s=[];if(r!==void 0&&r<=0)return[t];if(e==="")return Re(t).slice(0,r);let n=e;(typeof e=="string"||e instanceof RegExp&&!Pe(e.flags,"g"))&&(n=new RegExp(e,"g"));const i=t.match(n);let o=0;if(!i)return[t];for(let a=0;a<(r?r-1:i.length);a++){const h=T(t,i[a],o),p=g(i[a]);if(s.push(w(t,o,h)),o=h+p,r!==void 0&&s.length===r)break}return s.push(w(t,o)),s}function H(t,e,r=0){return T(t,e,r)===r}function V(t,e=0,r=g(t)-e){return Vt(t,e,r)}function w(t,e,r=g(t)){return Mt(t,e,r)}function Re(t){return xt(t)}function Zt(t){return H(t,"%")&&Te(t,"%")}function Yt(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Qt(t){return t?L(t).map(s=>Array.isArray(s)?s.map(n=>new RegExp(n)):new RegExp(s)):[]}function er(t){return t?L(t).map(s=>new RegExp(s)):[]}const xe=[{shortName:"ERR",fullNames:["ERROR"],chapters:-1},{shortName:"GEN",fullNames:["Genesis"],chapters:50},{shortName:"EXO",fullNames:["Exodus"],chapters:40},{shortName:"LEV",fullNames:["Leviticus"],chapters:27},{shortName:"NUM",fullNames:["Numbers"],chapters:36},{shortName:"DEU",fullNames:["Deuteronomy"],chapters:34},{shortName:"JOS",fullNames:["Joshua"],chapters:24},{shortName:"JDG",fullNames:["Judges"],chapters:21},{shortName:"RUT",fullNames:["Ruth"],chapters:4},{shortName:"1SA",fullNames:["1 Samuel"],chapters:31},{shortName:"2SA",fullNames:["2 Samuel"],chapters:24},{shortName:"1KI",fullNames:["1 Kings"],chapters:22},{shortName:"2KI",fullNames:["2 Kings"],chapters:25},{shortName:"1CH",fullNames:["1 Chronicles"],chapters:29},{shortName:"2CH",fullNames:["2 Chronicles"],chapters:36},{shortName:"EZR",fullNames:["Ezra"],chapters:10},{shortName:"NEH",fullNames:["Nehemiah"],chapters:13},{shortName:"EST",fullNames:["Esther"],chapters:10},{shortName:"JOB",fullNames:["Job"],chapters:42},{shortName:"PSA",fullNames:["Psalm","Psalms"],chapters:150},{shortName:"PRO",fullNames:["Proverbs"],chapters:31},{shortName:"ECC",fullNames:["Ecclesiastes"],chapters:12},{shortName:"SNG",fullNames:["Song of Solomon","Song of Songs"],chapters:8},{shortName:"ISA",fullNames:["Isaiah"],chapters:66},{shortName:"JER",fullNames:["Jeremiah"],chapters:52},{shortName:"LAM",fullNames:["Lamentations"],chapters:5},{shortName:"EZK",fullNames:["Ezekiel"],chapters:48},{shortName:"DAN",fullNames:["Daniel"],chapters:12},{shortName:"HOS",fullNames:["Hosea"],chapters:14},{shortName:"JOL",fullNames:["Joel"],chapters:3},{shortName:"AMO",fullNames:["Amos"],chapters:9},{shortName:"OBA",fullNames:["Obadiah"],chapters:1},{shortName:"JON",fullNames:["Jonah"],chapters:4},{shortName:"MIC",fullNames:["Micah"],chapters:7},{shortName:"NAM",fullNames:["Nahum"],chapters:3},{shortName:"HAB",fullNames:["Habakkuk"],chapters:3},{shortName:"ZEP",fullNames:["Zephaniah"],chapters:3},{shortName:"HAG",fullNames:["Haggai"],chapters:2},{shortName:"ZEC",fullNames:["Zechariah"],chapters:14},{shortName:"MAL",fullNames:["Malachi"],chapters:4},{shortName:"MAT",fullNames:["Matthew"],chapters:28},{shortName:"MRK",fullNames:["Mark"],chapters:16},{shortName:"LUK",fullNames:["Luke"],chapters:24},{shortName:"JHN",fullNames:["John"],chapters:21},{shortName:"ACT",fullNames:["Acts"],chapters:28},{shortName:"ROM",fullNames:["Romans"],chapters:16},{shortName:"1CO",fullNames:["1 Corinthians"],chapters:16},{shortName:"2CO",fullNames:["2 Corinthians"],chapters:13},{shortName:"GAL",fullNames:["Galatians"],chapters:6},{shortName:"EPH",fullNames:["Ephesians"],chapters:6},{shortName:"PHP",fullNames:["Philippians"],chapters:4},{shortName:"COL",fullNames:["Colossians"],chapters:4},{shortName:"1TH",fullNames:["1 Thessalonians"],chapters:5},{shortName:"2TH",fullNames:["2 Thessalonians"],chapters:3},{shortName:"1TI",fullNames:["1 Timothy"],chapters:6},{shortName:"2TI",fullNames:["2 Timothy"],chapters:4},{shortName:"TIT",fullNames:["Titus"],chapters:3},{shortName:"PHM",fullNames:["Philemon"],chapters:1},{shortName:"HEB",fullNames:["Hebrews"],chapters:13},{shortName:"JAS",fullNames:["James"],chapters:5},{shortName:"1PE",fullNames:["1 Peter"],chapters:5},{shortName:"2PE",fullNames:["2 Peter"],chapters:3},{shortName:"1JN",fullNames:["1 John"],chapters:5},{shortName:"2JN",fullNames:["2 John"],chapters:1},{shortName:"3JN",fullNames:["3 John"],chapters:1},{shortName:"JUD",fullNames:["Jude"],chapters:1},{shortName:"REV",fullNames:["Revelation"],chapters:22}],De=1,Me=xe.length-1,ke=1,Ve=1,qe=t=>{var e;return((e=xe[t])==null?void 0:e.chapters)??-1},tr=(t,e)=>({bookNum:Math.max(De,Math.min(t.bookNum+e,Me)),chapterNum:1,verseNum:1}),rr=(t,e)=>({...t,chapterNum:Math.min(Math.max(ke,t.chapterNum+e),qe(t.bookNum)),verseNum:1}),sr=(t,e)=>({...t,verseNum:Math.max(Ve,t.verseNum+e)});async function nr(t,e,r){const s=E.bookNumberToId(t);if(!H(Intl.getCanonicalLocales(e)[0],"zh"))return r({localizeKey:`LocalizedId.${s}`,languagesToSearch:[e]});const n=await r({localizeKey:`Book.${s}`,languagesToSearch:[e]}),i=_(n,"-");return _(i[0],"ÿ08")[0].trim()}function J(t){return new Pt(t.bookNum,t.chapterNum,t.verseNum).BBBCCCVVV}function ir(t,e){return J(t)-J(e)}function or(t,e,r,s){let n;switch(e??"id"){case"English":n=E.bookNumberToEnglishName(t.bookNum);break;case"id":n=E.bookNumberToId(t.bookNum);break;default:n=e??"";break}return`${n}${s??" "}${t.chapterNum}${r??":"}${t.verseNum}`}const ar=t=>(...e)=>t.map(s=>s(...e)).every(s=>s),ur=t=>async(...e)=>{const r=t.map(async s=>s(...e));return(await Promise.all(r)).every(s=>s)};var lr=Object.getOwnPropertyNames,cr=Object.getOwnPropertySymbols,fr=Object.prototype.hasOwnProperty;function oe(t,e){return function(s,n,i){return t(s,n,i)&&e(s,n,i)}}function M(t){return function(r,s,n){if(!r||!s||typeof r!="object"||typeof s!="object")return t(r,s,n);var i=n.cache,o=i.get(r),a=i.get(s);if(o&&a)return o===s&&a===r;i.set(r,s),i.set(s,r);var h=t(r,s,n);return i.delete(r),i.delete(s),h}}function ae(t){return lr(t).concat(cr(t))}var ze=Object.hasOwn||function(t,e){return fr.call(t,e)};function B(t,e){return t||e?t===e:t===e||t!==t&&e!==e}var _e="_owner",ue=Object.getOwnPropertyDescriptor,le=Object.keys;function hr(t,e,r){var s=t.length;if(e.length!==s)return!1;for(;s-- >0;)if(!r.equals(t[s],e[s],s,s,t,e,r))return!1;return!0}function pr(t,e){return B(t.getTime(),e.getTime())}function ce(t,e,r){if(t.size!==e.size)return!1;for(var s={},n=t.entries(),i=0,o,a;(o=n.next())&&!o.done;){for(var h=e.entries(),p=!1,u=0;(a=h.next())&&!a.done;){var c=o.value,m=c[0],v=c[1],b=a.value,R=b[0],q=b[1];!p&&!s[u]&&(p=r.equals(m,R,i,u,t,e,r)&&r.equals(v,q,m,R,t,e,r))&&(s[u]=!0),u++}if(!p)return!1;i++}return!0}function dr(t,e,r){var s=le(t),n=s.length;if(le(e).length!==n)return!1;for(var i;n-- >0;)if(i=s[n],i===_e&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!ze(e,i)||!r.equals(t[i],e[i],i,i,t,e,r))return!1;return!0}function D(t,e,r){var s=ae(t),n=s.length;if(ae(e).length!==n)return!1;for(var i,o,a;n-- >0;)if(i=s[n],i===_e&&(t.$$typeof||e.$$typeof)&&t.$$typeof!==e.$$typeof||!ze(e,i)||!r.equals(t[i],e[i],i,i,t,e,r)||(o=ue(t,i),a=ue(e,i),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function mr(t,e){return B(t.valueOf(),e.valueOf())}function gr(t,e){return t.source===e.source&&t.flags===e.flags}function fe(t,e,r){if(t.size!==e.size)return!1;for(var s={},n=t.values(),i,o;(i=n.next())&&!i.done;){for(var a=e.values(),h=!1,p=0;(o=a.next())&&!o.done;)!h&&!s[p]&&(h=r.equals(i.value,o.value,i.value,o.value,t,e,r))&&(s[p]=!0),p++;if(!h)return!1}return!0}function br(t,e){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}var yr="[object Arguments]",vr="[object Boolean]",Nr="[object Date]",wr="[object Map]",Er="[object Number]",Sr="[object Object]",Or="[object RegExp]",$r="[object Set]",jr="[object String]",Cr=Array.isArray,he=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,pe=Object.assign,Ar=Object.prototype.toString.call.bind(Object.prototype.toString);function Ir(t){var e=t.areArraysEqual,r=t.areDatesEqual,s=t.areMapsEqual,n=t.areObjectsEqual,i=t.arePrimitiveWrappersEqual,o=t.areRegExpsEqual,a=t.areSetsEqual,h=t.areTypedArraysEqual;return function(u,c,m){if(u===c)return!0;if(u==null||c==null||typeof u!="object"||typeof c!="object")return u!==u&&c!==c;var v=u.constructor;if(v!==c.constructor)return!1;if(v===Object)return n(u,c,m);if(Cr(u))return e(u,c,m);if(he!=null&&he(u))return h(u,c,m);if(v===Date)return r(u,c,m);if(v===RegExp)return o(u,c,m);if(v===Map)return s(u,c,m);if(v===Set)return a(u,c,m);var b=Ar(u);return b===Nr?r(u,c,m):b===Or?o(u,c,m):b===wr?s(u,c,m):b===$r?a(u,c,m):b===Sr?typeof u.then!="function"&&typeof c.then!="function"&&n(u,c,m):b===yr?n(u,c,m):b===vr||b===Er||b===jr?i(u,c,m):!1}}function Tr(t){var e=t.circular,r=t.createCustomConfig,s=t.strict,n={areArraysEqual:s?D:hr,areDatesEqual:pr,areMapsEqual:s?oe(ce,D):ce,areObjectsEqual:s?D:dr,arePrimitiveWrappersEqual:mr,areRegExpsEqual:gr,areSetsEqual:s?oe(fe,D):fe,areTypedArraysEqual:s?D:br};if(r&&(n=pe({},n,r(n))),e){var i=M(n.areArraysEqual),o=M(n.areMapsEqual),a=M(n.areObjectsEqual),h=M(n.areSetsEqual);n=pe({},n,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:h})}return n}function Pr(t){return function(e,r,s,n,i,o,a){return t(e,r,a)}}function Br(t){var e=t.circular,r=t.comparator,s=t.createState,n=t.equals,i=t.strict;if(s)return function(h,p){var u=s(),c=u.cache,m=c===void 0?e?new WeakMap:void 0:c,v=u.meta;return r(h,p,{cache:m,equals:n,meta:v,strict:i})};if(e)return function(h,p){return r(h,p,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};var o={cache:void 0,equals:n,meta:void 0,strict:i};return function(h,p){return r(h,p,o)}}var Rr=O();O({strict:!0});O({circular:!0});O({circular:!0,strict:!0});O({createInternalComparator:function(){return B}});O({strict:!0,createInternalComparator:function(){return B}});O({circular:!0,createInternalComparator:function(){return B}});O({circular:!0,createInternalComparator:function(){return B},strict:!0});function O(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,s=t.createInternalComparator,n=t.createState,i=t.strict,o=i===void 0?!1:i,a=Tr(t),h=Ir(a),p=s?s(h):Pr(h);return Br({circular:r,comparator:h,createState:n,equals:p,strict:o})}function Je(t,e){return Rr(t,e)}function Fe(t,e){if(typeof t!=typeof e)return!1;if(!t&&!e)return!0;if(Array.isArray(t)){const i=e,o=t;return i.length===0?!0:i.every(a=>o.includes(a))}if(typeof t!="object")return Je(t,e);const r=e,s=t;let n=!0;return Object.keys(r).forEach(i=>{n&&(Object.hasOwn(s,i)&&Fe(s[i],r[i])||(n=!1))}),n}function F(t,e,r){return JSON.stringify(t,(n,i)=>{let o=i;return e&&(o=e(n,o)),o===void 0&&(o=null),o},r)}function Ge(t,e){function r(n){return Object.keys(n).forEach(i=>{n[i]===null?n[i]=void 0:typeof n[i]=="object"&&(n[i]=r(n[i]))}),n}const s=JSON.parse(t,e);if(s!==null)return typeof s=="object"?r(s):s}function xr(t){try{const e=F(t);return e===F(Ge(e))}catch{return!1}}const Dr=t=>t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/");function Mr(){return typeof navigator<"u"&&navigator.languages?navigator.languages[0]:new de().resolvedOptions().locale}function kr(t,e=2){if(t===0)return"0 Bytes";const r=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(t)/Math.log(1024)),n=r[s];return`${new we("en",{style:"decimal",maximumFractionDigits:e,minimumFractionDigits:0}).format(t/1024**s)} ${n}`}const W={projectSettingsContribution:{description:"The data an extension provides to inform Platform.Bible of the project settings it provides",anyOf:[{$ref:"#/$defs/projectSettingsGroup"},{type:"array",items:{$ref:"#/$defs/projectSettingsGroup"}}]},projectSettingsGroup:{description:"Group of related settings definitions",type:"object",properties:{label:{description:"localizeKey that displays in the project settings dialog as the group name",$ref:"#/$defs/localizeKey"},description:{description:"localizeKey that displays in the project settings dialog to describe the group",$ref:"#/$defs/localizeKey"},properties:{$ref:"#/$defs/projectSettingProperties"}},required:["label","properties"]},projectSettingProperties:{description:"Object whose keys are setting IDs and whose values are settings objects",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{$ref:"#/$defs/projectSetting"}},additionalProperties:!1},projectSetting:{description:"A description of an extension's setting entry",anyOf:[{$ref:"#/$defs/extensionControlledProjectSetting"}]},extensionControlledProjectSetting:{description:"Setting definition that is validated by the extension.",allOf:[{$ref:"#/$defs/projectSettingBase"},{$ref:"#/$defs/modifierExtensionControlled"}]},projectSettingBase:{description:"Base information needed to describe a project setting entry",allOf:[{$ref:"#/$defs/settingBase"},{$ref:"#/$defs/modifierProject"}]},modifierProject:{description:"Modifies setting type to be project setting",type:"object",properties:{includeProjectInterfaces:{description:"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should be included.\n\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to pass):\n\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition\n\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\n\nDefaults to all {@link ProjectInterfaces}, so all projects that do not match `excludeProjectInterfaces` will be included\n\n@example\n\n```typescript\nincludeProjectInterfaces: ['one', ['two', 'three']];\n```\n\nThis filter condition will succeed on projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\n\n- Include `one`\n- Include both `two` and `three`.",anyOf:[{type:"null"},{type:"string"},{type:"array",items:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}]},excludeProjectInterfaces:{description:"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should absolutely not be included even if they match with `includeProjectInterfaces`.\n\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to exclude the project):\n\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition and exclude the project\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition and exclude the project\n\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\n\nDefaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces` will be included\n\n@example\n\n```typescript\nexcludeProjectInterfaces: ['one', ['two', 'three']];\n```\n\nThis filter condition will succeed and exclude projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\n\n- Include `one`\n- Include both `two` and `three`.",anyOf:[{type:"null"},{type:"string"},{type:"array",items:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}]},includePdpFactoryIds:{description:"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should be included.\n\nDefaults to all Project Data Provider Factory Ids, so all projects that do not match `excludePdpFactoryIds` will be included",anyOf:[{type:"null"},{type:"string"},{type:"array",items:{type:"string"}}]},excludePdpFactoryIds:{description:"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should absolutely not be included even if they match with `includeProjectInterfaces`.\n\nDefaults to none, so all projects that match `includePdpFactoryIds` will be included",anyOf:[{type:"null"},{type:"string"},{type:"array",items:{type:"string"}}]}}},settingsContribution:{description:"The data an extension provides to inform Platform.Bible of the settings it provides",anyOf:[{$ref:"#/$defs/settingsGroup"},{type:"array",items:{$ref:"#/$defs/settingsGroup"}}]},settingsGroup:{description:"Group of related settings definitions",type:"object",properties:{label:{description:"localizeKey that displays in the settings dialog as the group name",$ref:"#/$defs/localizeKey"},description:{description:"localizeKey that displays in the settings dialog to describe the group",$ref:"#/$defs/localizeKey"},properties:{$ref:"#/$defs/settingProperties"}},required:["label","properties"]},settingProperties:{description:"Object whose keys are setting IDs and whose values are settings objects",type:"object",patternProperties:{"^[\\w-]+\\.[\\w-]+$":{$ref:"#/$defs/setting"}},additionalProperties:!1},setting:{description:"A description of an extension's setting entry",anyOf:[{$ref:"#/$defs/extensionControlledSetting"}]},extensionControlledSetting:{description:"Setting definition that is validated by the extension.",allOf:[{$ref:"#/$defs/settingBase"},{$ref:"#/$defs/modifierExtensionControlled"}]},settingBase:{description:"Base information needed to describe a setting entry",allOf:[{$ref:"#/$defs/stateBase"},{type:"object",properties:{label:{description:"localizeKey that displays in the settings dialog as the setting name",$ref:"#/$defs/localizeKey"},description:{description:"localizeKey that displays in the settings dialog to describe the setting",$ref:"#/$defs/localizeKey"}},required:["label"]}]},projectStateContribution:{description:"The data an extension provides to inform Platform.Bible of the project state it provides",$ref:"#/$defs/userStateProperties"},userStateContribution:{description:"The data an extension provides to inform Platform.Bible of the user state it provides",$ref:"#/$defs/userStateProperties"},userStateProperties:{description:"Object whose keys are state IDs and whose values are state objects",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{$ref:"#/$defs/userState"}},additionalProperties:!1},userState:{description:"A description of an extension's user state entry",anyOf:[{$ref:"#/$defs/extensionControlledState"}]},extensionControlledState:{description:"State definition that is validated by the extension.",allOf:[{$ref:"#/$defs/stateBase"},{$ref:"#/$defs/modifierExtensionControlled"}]},modifierExtensionControlled:{description:'Modifies state/setting type to be extension-controlled. "Extension-controlled" means the extension provides the component and the validator for the state/setting, so the state/setting is controlled by the extension.',not:{anyOf:[{type:"object",required:["platformType"]},{type:"object",required:["type"]}]}},stateBase:{description:"Base information needed to describe a state entry",type:"object",properties:{default:{description:"default value for the state/setting",type:"any"},derivesFrom:{description:"a state/setting ID whose value to set to this state/setting's starting value the first time this state/setting is loaded",$ref:"#/$defs/id"}},required:["default"]},localizeKey:{description:"Identifier for a string that will be localized based on the user's UI language",type:"string",pattern:"^%[\\w\\-\\.]+%$",tsType:"LocalizeKey"},id:{description:"",type:"string",pattern:"^[\\w\\-]+\\.[\\w\\-]+$",tsType:"Id"}};function Z(t){t&&Object.values(t).forEach(e=>{if(e.type){if("tsType"in e&&delete e.tsType,e.type==="any"){delete e.type;return}e.type==="object"&&Z(e.properties)}})}Z(W);const Ke={$schema:"https://json-schema.org/draft/2020-12/schema",title:"Project Settings Contribution",description:"The data an extension provides to inform Platform.Bible of the project settings it provides",anyOf:[{$ref:"#/$defs/projectSettingsGroup"},{type:"array",items:{$ref:"#/$defs/projectSettingsGroup"}}],$defs:W};Object.freeze(Ke);const Ue={$schema:"https://json-schema.org/draft/2020-12/schema",title:"Settings Contribution",description:"The data an extension provides to inform Platform.Bible of the settings it provides",anyOf:[{$ref:"#/$defs/settingsGroup"},{type:"array",items:{$ref:"#/$defs/settingsGroup"}}],$defs:W};Object.freeze(Ue);const Xe={languageStrings:{description:"Map whose keys are localized string keys and whose values provide information about how to localize strings for the localized string key",type:"object",patternProperties:{"^%[\\w\\-\\.]+%$":{$ref:"#/$defs/localizedStringValue"}},additionalProperties:!1},localizedStringValue:{description:"Localized string value associated with this key",type:"string"},stringsMetadata:{description:"Map whose keys are localized string keys and whose values provide additional non-locale-specific information about the localized string key",type:"object",patternProperties:{"^%[\\w\\-\\.]+%$":{$ref:"#/$defs/stringMetadata"}},additionalProperties:!1},stringMetadata:{description:"Additional non-locale-specific information about a localized string key",type:"object",properties:{fallbackKey:{description:"Localized string key from which to get this value if one does not exist in the specified language. If a new key/value pair needs to be made to replace an existing one, this could help smooth over the transition if the meanings are close enough.\nYou can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a backslash `\\`.",type:"string",pattern:"^%[\\w\\-\\.;&,' (){}#:/\\\\?%⋮|[\\]“”‘’!~* +=•`…​↑↓]+%$",tsType:"LocalizeKey"},notes:{description:"Additional information provided by developers in English to help the translator to know how to translate this localized string accurately",type:"string"}}},localizeKey:{description:"Identifier for a string that will be localized based on the user's UI language",type:"string",pattern:"^%[\\w\\-\\.]+%$",tsType:"LocalizeKey"}};Z(Xe);const Le={$schema:"https://json-schema.org/draft/2020-12/schema",title:"Localized String Data Contribution",description:"The data an extension provides to inform Platform.Bible of the localized strings it provides.",type:"object",properties:{metadata:{$ref:"#/$defs/stringsMetadata"},localizedStrings:{type:"object",additionalProperties:{$ref:"#/$defs/languageStrings"}}},$defs:Xe};Object.freeze(Le);const He={title:"Platform.Bible menus",type:"object",properties:{mainMenu:{description:"Top level menu for the application",$ref:"#/$defs/multiColumnMenu"},defaultWebViewTopMenu:{description:"Default top menu for web views that don't specify their own",$ref:"#/$defs/multiColumnMenu"},defaultWebViewContextMenu:{description:"Default context menu for web views that don't specify their own",$ref:"#/$defs/singleColumnMenu"},webViewMenus:{description:"Menus that apply per web view in the application",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{$ref:"#/$defs/menusForOneWebView"}},additionalProperties:!1}},required:["mainMenu","defaultWebViewTopMenu","defaultWebViewContextMenu","webViewMenus"],additionalProperties:!1,$defs:{localizeKey:{description:"Identifier for a string that will be localized in a menu based on the user's UI language",type:"string",pattern:"^%[\\w\\-\\.]+%$"},referencedItem:{description:"Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command)",type:"string",pattern:"^[\\w\\-]+\\.[\\w\\-]+$"},columnsWithHeaders:{description:"Group of columns that can be combined with other columns to form a multi-column menu",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{description:"Single column with a header string",type:"object",properties:{label:{description:"Header text for this this column in the UI",$ref:"#/$defs/localizeKey"},localizeNotes:{description:"Additional information provided by developers to help people who perform localization",type:"string"},order:{description:"Relative order of this column compared to other columns (sorted ascending)",type:"number"},isExtensible:{description:"Defines whether contributions are allowed to add menu groups to this column",type:"boolean"}},required:["label","order"],additionalProperties:!1}},properties:{isExtensible:{description:"Defines whether contributions are allowed to add columns to this multi-column menu",type:"boolean"}}},menuGroups:{description:"Group of menu items that can be combined with other groups to form a single menu/submenu. Groups are separated using a line within the menu/submenu.",type:"object",patternProperties:{"^[\\w\\-]+\\.[\\w\\-]+$":{description:"Single group that contains menu items",type:"object",oneOf:[{properties:{column:{description:"Column where this group belongs, not required for single column menus",$ref:"#/$defs/referencedItem"},order:{description:"Relative order of this group compared to other groups in the same column or submenu (sorted ascending)",type:"number"},isExtensible:{description:"Defines whether contributions are allowed to add menu items to this menu group",type:"boolean"}},required:["order"],additionalProperties:!1},{properties:{menuItem:{description:"Menu item that anchors the submenu where this group belongs",$ref:"#/$defs/referencedItem"},order:{description:"Relative order of this group compared to other groups in the same column or submenu (sorted ascending)",type:"number"},isExtensible:{description:"Defines whether contributions are allowed to add menu items to this menu group",type:"boolean"}},required:["menuItem","order"],additionalProperties:!1}]}},additionalProperties:!1},menuItem:{description:"Single item in a menu that can be clicked on to take an action or can be the parent of a submenu",type:"object",oneOf:[{properties:{id:{description:"ID for this menu item that holds a submenu",$ref:"#/$defs/referencedItem"}},required:["id"]},{properties:{command:{description:"Name of the PAPI command to run when this menu item is selected.",$ref:"#/$defs/referencedItem"},iconPathBefore:{description:"Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`",type:"string"},iconPathAfter:{description:"Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`",type:"string"}},required:["command"]}],properties:{label:{description:"Key that represents the text of this menu item to display",$ref:"#/$defs/localizeKey"},tooltip:{description:"Key that represents the text to display if a mouse pointer hovers over the menu item",$ref:"#/$defs/localizeKey"},searchTerms:{description:"Key that represents additional words the platform should reference when users are searching for menu items",$ref:"#/$defs/localizeKey"},localizeNotes:{description:"Additional information provided by developers to help people who perform localization",type:"string"},group:{description:"Group to which this menu item belongs",$ref:"#/$defs/referencedItem"},order:{description:"Relative order of this menu item compared to other menu items in the same group (sorted ascending)",type:"number"}},required:["label","group","order"],unevaluatedProperties:!1},groupsAndItems:{description:"Core schema for a column",type:"object",properties:{groups:{description:"Groups that belong in this menu",$ref:"#/$defs/menuGroups"},items:{description:"List of menu items that belong in this menu",type:"array",items:{$ref:"#/$defs/menuItem"},uniqueItems:!0}},required:["groups","items"]},singleColumnMenu:{description:"Menu that contains a column without a header",type:"object",allOf:[{$ref:"#/$defs/groupsAndItems"}],unevaluatedProperties:!1},multiColumnMenu:{description:"Menu that can contain multiple columns with headers",type:"object",allOf:[{$ref:"#/$defs/groupsAndItems"},{properties:{columns:{description:"Columns that belong in this menu",$ref:"#/$defs/columnsWithHeaders"}},required:["columns"]}],unevaluatedProperties:!1},menusForOneWebView:{description:"Set of menus that are associated with a single tab",type:"object",properties:{includeDefaults:{description:"Indicates whether the platform default menus should be included for this webview",type:"boolean"},topMenu:{description:"Menu that opens when you click on the top left corner of a tab",$ref:"#/$defs/multiColumnMenu"},contextMenu:{description:"Menu that opens when you right click on the main body/area of a tab",$ref:"#/$defs/singleColumnMenu"}},additionalProperties:!1}}};Object.freeze(He);exports.AsyncVariable=nt;exports.Collator=it;exports.DateTimeFormat=de;exports.DocumentCombiner=ye;exports.FIRST_SCR_BOOK_NUM=De;exports.FIRST_SCR_CHAPTER_NUM=ke;exports.FIRST_SCR_VERSE_NUM=Ve;exports.LAST_SCR_BOOK_NUM=Me;exports.Mutex=Ne;exports.MutexMap=gt;exports.NonValidatingDocumentCombiner=bt;exports.NumberFormat=we;exports.PlatformEventEmitter=me;exports.UnsubscriberAsyncList=yt;exports.aggregateUnsubscriberAsyncs=ur;exports.aggregateUnsubscribers=ar;exports.at=Jt;exports.charAt=j;exports.codePointAt=Ft;exports.compareScrRefs=ir;exports.createSyncProxyForAsyncObject=dt;exports.debounce=at;exports.deepClone=I;exports.deepEqual=Je;exports.deserialize=Ge;exports.endsWith=Te;exports.ensureArray=L;exports.escapeStringRegexp=Yt;exports.formatBytes=kr;exports.formatReplacementString=Kt;exports.formatScrRef=or;exports.getAllObjectFunctionNames=pt;exports.getChaptersForBook=qe;exports.getCurrentLocale=Mr;exports.getErrorMessage=ft;exports.getLocalizedIdFromBookNumber=nr;exports.groupBy=ut;exports.htmlEncode=Dr;exports.includes=Pe;exports.indexOf=T;exports.isLocalizeKey=Zt;exports.isSerializable=xr;exports.isString=ge;exports.isSubset=Fe;exports.lastIndexOf=Be;exports.localizedStringsDocumentSchema=Le;exports.menuDocumentSchema=He;exports.newGuid=ot;exports.normalize=Ut;exports.offsetBook=tr;exports.offsetChapter=rr;exports.offsetVerse=sr;exports.ordinalCompare=Xt;exports.padEnd=Lt;exports.padStart=Ht;exports.projectSettingsDocumentSchema=Ke;exports.scrRefToBBBCCCVVV=J;exports.serialize=F;exports.settingsDocumentSchema=Ue;exports.slice=Wt;exports.split=_;exports.startsWith=H;exports.stringLength=g;exports.substring=w;exports.toArray=Re;exports.transformAndEnsureRegExpArray=er;exports.transformAndEnsureRegExpRegExpArray=Qt;exports.wait=be;exports.waitForDuration=ht; //# sourceMappingURL=index.cjs.map diff --git a/lib/platform-bible-utils/dist/index.cjs.map b/lib/platform-bible-utils/dist/index.cjs.map index b24ce937e8..c3651b343a 100644 --- a/lib/platform-bible-utils/dist/index.cjs.map +++ b/lib/platform-bible-utils/dist/index.cjs.map @@ -1 +1 @@ -{"version":3,"file":"index.cjs","sources":["../src/async-variable.ts","../src/intl-collator.ts","../src/intl-date-time-format.ts","../src/platform-event-emitter.model.ts","../src/util.ts","../src/document-combiner.ts","../src/mutex.ts","../src/mutex-map.ts","../src/non-validating-document-combiner.ts","../src/intl-number-format.ts","../src/unsubscriber-async-list.ts","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../../../node_modules/char-regex/index.js","../../../node_modules/stringz/dist/index.js","../src/string-util.ts","../src/scripture-util.ts","../src/unsubscriber.ts","../../../node_modules/fast-equals/dist/esm/index.mjs","../src/equality-checking.ts","../src/subset-checking.ts","../src/serialization.ts","../src/intl-util.ts","../src/number-utils.ts","../src/settings.model.ts","../src/localized-strings.model.ts","../src/menus.model.ts"],"sourcesContent":["/** This class provides a convenient way for one task to wait on a variable that another task sets. */\nexport default class AsyncVariable {\n private readonly variableName: string;\n private readonly promiseToValue: Promise;\n private resolver: ((value: T) => void) | undefined;\n private rejecter: ((reason: string | undefined) => void) | undefined;\n\n /**\n * Creates an instance of the class\n *\n * @param variableName Name to use when logging about this variable\n * @param rejectIfNotSettledWithinMS Milliseconds to wait before verifying if the promise was\n * settled (resolved or rejected); will reject if it has not settled by that time. Use -1 if you\n * do not want a timeout at all. Defaults to 10000 ms\n */\n constructor(variableName: string, rejectIfNotSettledWithinMS: number = 10000) {\n this.variableName = variableName;\n this.promiseToValue = new Promise((resolve, reject) => {\n this.resolver = resolve;\n this.rejecter = reject;\n });\n if (rejectIfNotSettledWithinMS > 0) {\n setTimeout(() => {\n if (this.rejecter) {\n this.rejecter(`Timeout reached when waiting for ${this.variableName} to settle`);\n this.complete();\n }\n }, rejectIfNotSettledWithinMS);\n }\n Object.seal(this);\n }\n\n /**\n * Get this variable's promise to a value. This always returns the same promise even after the\n * value has been resolved or rejected.\n *\n * @returns The promise for the value to be set\n */\n get promise(): Promise {\n return this.promiseToValue;\n }\n\n /**\n * A simple way to see if this variable's promise was resolved or rejected already\n *\n * @returns Whether the variable was already resolved or rejected\n */\n get hasSettled(): boolean {\n return Object.isFrozen(this);\n }\n\n /**\n * Resolve this variable's promise to the given value\n *\n * @param value This variable's promise will resolve to this value\n * @param throwIfAlreadySettled Determines whether to throw if the variable was already resolved\n * or rejected. Defaults to `false`\n */\n resolveToValue(value: T, throwIfAlreadySettled: boolean = false): void {\n if (this.resolver) {\n console.debug(`${this.variableName} is being resolved now`);\n this.resolver(value);\n this.complete();\n } else {\n if (throwIfAlreadySettled) throw Error(`${this.variableName} was already settled`);\n console.debug(`Ignoring subsequent resolution of ${this.variableName}`);\n }\n }\n\n /**\n * Reject this variable's promise for the value with the given reason\n *\n * @param reason This variable's promise will be rejected with this reason\n * @param throwIfAlreadySettled Determines whether to throw if the variable was already resolved\n * or rejected. Defaults to `false`\n */\n rejectWithReason(reason: string, throwIfAlreadySettled: boolean = false): void {\n if (this.rejecter) {\n console.debug(`${this.variableName} is being rejected now`);\n this.rejecter(reason);\n this.complete();\n } else {\n if (throwIfAlreadySettled) throw Error(`${this.variableName} was already settled`);\n console.debug(`Ignoring subsequent rejection of ${this.variableName}`);\n }\n }\n\n /** Prevent any further updates to this variable */\n private complete(): void {\n this.resolver = undefined;\n this.rejecter = undefined;\n Object.freeze(this);\n }\n}\n","/** Enables language-sensitive string comparison. Wraps Intl.Collator */\nexport default class Collator {\n private collator: Intl.Collator;\n\n constructor(locales?: string | string[], options?: Intl.CollatorOptions) {\n this.collator = new Intl.Collator(locales, options);\n }\n\n /**\n * Compares two strings according to the sort order of this Collator object\n *\n * @param string1 String to compare\n * @param string2 String to compare\n * @returns A number indicating how string1 and string2 compare to each other according to the\n * sort order of this Collator object. Negative value if string1 comes before string2. Positive\n * value if string1 comes after string2. 0 if they are considered equal.\n */\n compare(string1: string, string2: string): number {\n return this.collator.compare(string1, string2);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and collation options computed\n * during initialization of this collator object.\n *\n * @returns ResolvedCollatorOptions object\n */\n resolvedOptions(): Intl.ResolvedCollatorOptions {\n return this.collator.resolvedOptions();\n }\n}\n","/** Enables language-sensitive data and time formatting. Wraps Intl.DateTimeFormat */\nexport default class DateTimeFormat {\n private dateTimeFormatter: Intl.DateTimeFormat;\n\n constructor(locales?: string | string[], options?: Intl.DateTimeFormatOptions) {\n this.dateTimeFormatter = new Intl.DateTimeFormat(locales, options);\n }\n\n /**\n * Formats a date according to the locale and formatting option for this DateTimeFormat object\n *\n * @param date The date to format\n * @returns String representing the given date formatted according to the locale and formatting\n * options of this DateTimeFormat object\n */\n format(date: Date): string {\n return this.dateTimeFormatter.format(date);\n }\n\n /**\n * Formats a date range in the most concise way based on the locales and options provided when\n * instantiating this DateTimeFormat object\n *\n * @param startDate Date object representing start of the date range\n * @param endDate Date object representing the end of the date range\n * @returns String representing the given date range formatted according to the locale and\n * formatting options of this DateTimeFormat object\n */\n formatRange(startDate: Date, endDate: Date): string {\n return this.dateTimeFormatter.formatRange(startDate, endDate);\n }\n\n /**\n * Returns an array of locale-specific tokens representing each part of the formatted date range\n * produced by this DateTimeFormat object\n *\n * @param startDate Date object representing start of the date range\n * @param endDate Date object representing the end of the date range\n * @returns Array of DateTimeRangeFormatPart objects\n */\n formatRangeToParts(startDate: Date, endDate: Date): Intl.DateTimeRangeFormatPart[] {\n return this.dateTimeFormatter.formatRangeToParts(startDate, endDate);\n }\n\n /**\n * Allows locale-aware formatting of strings produced by this DateTimeFormat object\n *\n * @param date The date to format\n * @returns Array of DateTimeFormatPart objects\n */\n formatToParts(date: Date): Intl.DateTimeFormatPart[] {\n return this.dateTimeFormatter.formatToParts(date);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and date and time formatting options\n * computed during initialization of this DateTimeFormat object\n *\n * @returns ResolvedDateTimeFormatOptions object\n */\n resolvedOptions(): Intl.ResolvedDateTimeFormatOptions {\n return this.dateTimeFormatter.resolvedOptions();\n }\n}\n","/** Interfaces, classes, and functions related to events and event emitters */\n\nimport { Dispose } from './disposal.model';\nimport { PlatformEvent, PlatformEventHandler } from './platform-event';\n\n/**\n * Event manager - accepts subscriptions to an event and runs the subscription callbacks when the\n * event is emitted Use eventEmitter.event(callback) to subscribe to the event. Use\n * eventEmitter.emit(event) to run the subscriptions. Generally, this EventEmitter should be\n * private, and its event should be public. That way, the emitter is not publicized, but anyone can\n * subscribe to the event.\n */\nexport default class PlatformEventEmitter implements Dispose {\n /**\n * Subscribes a function to run when this event is emitted.\n *\n * @param callback Function to run with the event when it is emitted\n * @returns Unsubscriber function to run to stop calling the passed-in function when the event is\n * emitted\n * @alias event\n */\n subscribe = this.event;\n\n /** All callback functions that will run when this event is emitted. Lazy loaded */\n private subscriptions?: PlatformEventHandler[];\n /** Event for listeners to subscribe to. Lazy loaded */\n private lazyEvent?: PlatformEvent;\n /** Whether this emitter has been disposed */\n private isDisposed = false;\n\n /**\n * Event for listeners to subscribe to. Subscribes a function to run when this event is emitted.\n * Use like `const unsubscriber = event(callback)`\n *\n * @param callback Function to run with the event when it is emitted\n * @returns Unsubscriber function to run to stop calling the passed-in function when the event is\n * emitted\n */\n get event(): PlatformEvent {\n this.assertNotDisposed();\n\n if (!this.lazyEvent) {\n this.lazyEvent = (callback) => {\n if (!callback || typeof callback !== 'function')\n throw new Error(`Event handler callback must be a function!`);\n\n // Initialize this.subscriptions if it does not exist\n if (!this.subscriptions) this.subscriptions = [];\n\n this.subscriptions.push(callback);\n\n return () => {\n if (!this.subscriptions) return false; // Did not find any subscribed callbacks\n\n const callbackIndex = this.subscriptions.indexOf(callback);\n\n if (callbackIndex < 0) return false; // Did not find this callback in the subscriptions\n\n // Remove the callback\n this.subscriptions.splice(callbackIndex, 1);\n\n return true;\n };\n };\n }\n return this.lazyEvent;\n }\n\n /** Disposes of this event, preparing it to release from memory */\n dispose = () => {\n return this.disposeFn();\n };\n\n /**\n * Runs the subscriptions for the event\n *\n * @param event Event data to provide to subscribed callbacks\n */\n emit = (event: T) => {\n // Do not do anything other than emitFn here. This emit is just binding `this` to emitFn\n this.emitFn(event);\n };\n\n /**\n * Function that runs the subscriptions for the event. Added here so children can override emit\n * and still call the base functionality. See NetworkEventEmitter.emit for example\n */\n protected emitFn(event: T) {\n this.assertNotDisposed();\n\n // Clone the subscriptions array before iterating over the callbacks so the callback index\n // doesn't get messed up if someone subscribes or unsubscribes inside one of the callbacks\n const emitCallbacks = [...(this.subscriptions ?? [])];\n emitCallbacks.forEach((callback) => callback(event));\n }\n\n /** Check to make sure this emitter is not disposed. Throw if it is */\n protected assertNotDisposed() {\n if (this.isDisposed) throw new Error('Emitter is disposed');\n }\n\n /**\n * Disposes of this event, preparing it to release from memory. Added here so children can\n * override emit and still call the base functionality.\n */\n protected disposeFn() {\n this.assertNotDisposed();\n\n this.isDisposed = true;\n this.subscriptions = undefined;\n this.lazyEvent = undefined;\n return Promise.resolve(true);\n }\n}\n","/** Collection of functions, objects, and types that are used as helpers in other services. */\n\n// Thanks to blubberdiblub at https://stackoverflow.com/a/68141099/217579\nexport function newGuid(): string {\n return '00-0-4-1-000'.replace(/[^-]/g, (s) =>\n // @ts-expect-error ts(2363) this works fine\n // eslint-disable-next-line no-bitwise\n (((Math.random() + ~~s) * 0x10000) >> s).toString(16).padStart(4, '0'),\n );\n}\n\n// thanks to DRAX at https://stackoverflow.com/a/9436948\n/**\n * Determine whether the object is a string\n *\n * @param o Object to determine if it is a string\n * @returns True if the object is a string; false otherwise\n */\nexport function isString(o: unknown): o is string {\n return typeof o === 'string' || o instanceof String;\n}\n\n/**\n * If deepClone isn't used when copying properties between objects, you may be left with dangling\n * references between the source and target of property copying operations.\n *\n * @param obj Object to clone\n * @returns Duplicate copy of `obj` without any references back to the original one\n */\nexport function deepClone(obj: T): T {\n // Assert the return type matches what is expected\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return JSON.parse(JSON.stringify(obj)) as T;\n}\n\n/**\n * Get a function that reduces calls to the function passed in\n *\n * @param fn The function to debounce\n * @param delay How much delay in milliseconds after the most recent call to the debounced function\n * to call the function\n * @returns Function that, when called, only calls the function passed in at maximum every delay ms\n */\n// We don't know the parameter types since this function can be anything\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function debounce void>(fn: T, delay = 300): T {\n if (isString(fn)) throw new Error('Tried to debounce a string! Could be XSS');\n let timeout: ReturnType;\n // Ensure the right return type.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return ((...args) => {\n clearTimeout(timeout);\n timeout = setTimeout(() => fn(...args), delay);\n }) as T;\n}\n\n/**\n * Groups each item in the array of items into a map according to the keySelector\n *\n * @param items Array of items to group by\n * @param keySelector Function to run on each item to get the key for the group to which it belongs\n * @param valueSelector Function to run on each item to get the value it should have in the group\n * (like map function). If not provided, uses the item itself\n * @returns Map of keys to groups of values corresponding to each item\n */\nexport function groupBy(items: T[], keySelector: (item: T) => K): Map>;\nexport function groupBy(\n items: T[],\n keySelector: (item: T) => K,\n valueSelector: (item: T, key: K) => V,\n): Map>;\nexport function groupBy(\n items: T[],\n keySelector: (item: T) => K,\n valueSelector?: (item: T, key: K) => V,\n): Map> {\n const map = new Map>();\n items.forEach((item) => {\n const key = keySelector(item);\n const group = map.get(key);\n const value = valueSelector ? valueSelector(item, key) : item;\n if (group) group.push(value);\n else map.set(key, [value]);\n });\n return map;\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\ntype ErrorWithMessage = {\n message: string;\n};\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\nfunction isErrorWithMessage(error: unknown): error is ErrorWithMessage {\n return (\n typeof error === 'object' &&\n // We're potentially dealing with objects we didn't create, so they might contain `null`\n // eslint-disable-next-line no-null/no-null\n error !== null &&\n 'message' in error &&\n // Type assert `error` to check it's `message`.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n typeof (error as Record).message === 'string'\n );\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\n/**\n * Function to get an error from the object (useful for getting an error in a catch block)\n *\n * @param error Error object whose message to get\n * @returns Message of the error - if object has message, returns message. Otherwise tries to\n * stringify\n */\nfunction toErrorWithMessage(maybeError: unknown): ErrorWithMessage {\n if (isErrorWithMessage(maybeError)) return maybeError;\n\n try {\n return new Error(JSON.stringify(maybeError));\n } catch {\n // fallback in case there's an error stringifying the maybeError\n // like with circular references for example.\n return new Error(String(maybeError));\n }\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\n/**\n * Function to get an error message from the object (useful for getting error message in a catch\n * block)\n *\n * @example `try {...} catch (e) { logger.info(getErrorMessage(e)) }`\n *\n * @param error Error object whose message to get\n * @returns Message of the error - if object has message, returns message. Otherwise tries to\n * stringify\n */\nexport function getErrorMessage(error: unknown) {\n return toErrorWithMessage(error).message;\n}\n\n/** Asynchronously waits for the specified number of milliseconds. (wraps setTimeout in a promise) */\nexport function wait(ms: number) {\n // eslint-disable-next-line no-promise-executor-return\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Runs the specified function and will timeout if it takes longer than the specified wait time\n *\n * @param fn The function to run\n * @param maxWaitTimeInMS The maximum amount of time to wait for the function to resolve\n * @returns Promise that resolves to the resolved value of the function or undefined if it ran\n * longer than the specified wait time\n */\nexport function waitForDuration(fn: () => Promise, maxWaitTimeInMS: number) {\n const timeout = wait(maxWaitTimeInMS).then(() => undefined);\n return Promise.any([timeout, fn()]);\n}\n\n/**\n * Get all functions on an object and its prototype chain (so we don't miss any class methods or any\n * object methods). Note that the functions on the final item in the prototype chain (i.e., Object)\n * are skipped to avoid including functions like `__defineGetter__`, `__defineSetter__`, `toString`,\n * etc.\n *\n * @param obj Object whose functions to get\n * @param _objId Optional ID of the object to use for debug logging\n * @returns Array of all function names on an object\n */\n// Note: lodash has something that MIGHT do the same thing as this. Investigate for https://github.com/paranext/paranext-core/issues/134\nexport function getAllObjectFunctionNames(\n obj: { [property: string]: unknown },\n // Leaving it here for debugging\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _objId: string = 'obj',\n): Set {\n const objectFunctionNames = new Set();\n\n // Get all function properties directly defined on the object\n Object.getOwnPropertyNames(obj).forEach((property) => {\n try {\n if (typeof obj[property] === 'function') objectFunctionNames.add(property);\n } catch (error) {\n // Too noisy - only reenable if you need more details\n // console.trace(`Skipping ${property} on ${objId} due to error: ${error}`);\n }\n });\n\n // Walk up the prototype chain and get additional function properties, skipping the functions\n // provided by the final (Object) prototype\n let objectPrototype = Object.getPrototypeOf(obj);\n while (objectPrototype && Object.getPrototypeOf(objectPrototype)) {\n Object.getOwnPropertyNames(objectPrototype).forEach((property) => {\n try {\n if (typeof obj[property] === 'function') objectFunctionNames.add(property);\n } catch (error) {\n // Too noisy - only reenable if you need more details\n // console.trace(`Skipping ${property} on ${objId}'s prototype due to error: ${error}`);\n }\n });\n objectPrototype = Object.getPrototypeOf(objectPrototype);\n }\n\n return objectFunctionNames;\n}\n\n/**\n * Creates a synchronous proxy for an asynchronous object. The proxy allows calling methods on an\n * object that is asynchronously fetched using a provided asynchronous function.\n *\n * @param getObject - A function that returns a promise resolving to the object whose asynchronous\n * methods to call.\n * @param objectToProxy - An optional object that is the object that is proxied. If a property is\n * accessed that does exist on this object, it will be returned. If a property is accessed that\n * does not exist on this object, it will be considered to be an asynchronous method called on the\n * object returned from getObject.\n * @returns A synchronous proxy for the asynchronous object.\n */\nexport function createSyncProxyForAsyncObject(\n getObject: (args?: unknown[]) => Promise,\n objectToProxy: Partial = {},\n): T {\n // objectToProxy will have only the synchronously accessed properties of T on it, and this proxy\n // makes the async methods that do not exist yet available synchronously so we have all of T\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return new Proxy(objectToProxy as T, {\n get(target, prop) {\n // We don't have any type information for T, so we assume methodName exists on it and will let JavaScript throw if it doesn't exist\n // @ts-expect-error 7053\n if (prop in target) return target[prop];\n return async (...args: unknown[]) => {\n // 7053: We don't have any type information for T, so we assume methodName exists on it and will let JavaScript throw if it doesn't exist\n // 2556: The args here are the parameters for the method specified\n // @ts-expect-error 7053 2556\n return (await getObject())[prop](...args);\n };\n },\n });\n}\n\n/** Within type T, recursively change all properties to be optional */\nexport type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial } : T;\n\n/** Within type T, recursively change properties that were of type A to be of type B */\nexport type ReplaceType = T extends A\n ? B\n : T extends object\n ? { [K in keyof T]: ReplaceType }\n : T;\n\n// Thanks to jcalz at https://stackoverflow.com/a/50375286\n/**\n * Converts a union type to an intersection type (`|` to `&`).\n *\n * Note: this utility type is for use on object types. It may fail on other types.\n *\n * @example\n *\n * ```typescript\n * type TypeOne = { one: string };\n * type TypeTwo = { two: number };\n * type TypeThree = { three: string };\n *\n * type TypeNums = { one: TypeOne; two: TypeTwo; three: TypeThree };\n * const numNames = ['one', 'two'] as const;\n * type TypeNumNames = typeof numNames;\n *\n * // Same as `TypeOne | TypeTwo`\n * // `{ one: string } | { two: number }`\n * type TypeOneTwoUnion = TypeNums[TypeNumNames[number]];\n *\n * // Same as `TypeOne & TypeTwo`\n * // `{ one: string; two: number }`\n * type TypeOneTwoIntersection = UnionToIntersection;\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type UnionToIntersection = (U extends any ? (x: U) => void : never) extends (\n x: infer I,\n) => void\n ? I\n : never;\n","import PlatformEventEmitter from './platform-event-emitter.model';\nimport { deepClone } from './util';\n\ntype JsonObjectLike = { [key: string]: unknown };\ntype JsonArrayLike = unknown[];\n\nexport type JsonDocumentLike = JsonObjectLike | JsonArrayLike;\n\n/**\n * Options for DocumentCombiner objects\n *\n * - `copyDocuments`: If true, this instance will perform a deep copy of all provided documents before\n * composing the output. If false, then changes made to provided documents after they are\n * contributed will be reflected in the next time output is composed.\n * - `ignoreDuplicateProperties`: If true, then duplicate properties are skipped if they are seen in\n * contributed documents. If false, then throw when duplicate properties are seen in contributed\n * documents.\n */\nexport type DocumentCombinerOptions = {\n copyDocuments: boolean;\n ignoreDuplicateProperties: boolean;\n};\n\n/**\n * Base class for any code that wants to compose JSON documents (primarily in the form of JS objects\n * or arrays) together into a single output document.\n */\nexport default class DocumentCombiner {\n protected baseDocument: JsonDocumentLike;\n protected readonly contributions = new Map();\n protected latestOutput: JsonDocumentLike | undefined;\n protected readonly options: DocumentCombinerOptions;\n private readonly onDidRebuildEmitter = new PlatformEventEmitter();\n /** Event that emits to announce that the document has been rebuilt and the output has been updated */\n // Need `onDidRebuildEmitter` to be instantiated before this line\n // eslint-disable-next-line @typescript-eslint/member-ordering\n readonly onDidRebuild = this.onDidRebuildEmitter.subscribe;\n\n /**\n * Create a DocumentCombiner instance\n *\n * @param baseDocument This is the first document that will be used when composing the output\n * @param options Options used by this object when combining documents\n */\n protected constructor(baseDocument: JsonDocumentLike, options: DocumentCombinerOptions) {\n // Setting baseDocument redundantly because TS doesn't understand that updateBaseDocument does it\n this.baseDocument = baseDocument;\n this.options = options;\n this.updateBaseDocument(baseDocument);\n }\n\n /**\n * Update the starting document for composition process\n *\n * @param baseDocument Base JSON document/JS object that all other documents are added to\n * @returns Recalculated output document given the new starting state and existing other documents\n */\n updateBaseDocument(baseDocument: JsonDocumentLike): JsonDocumentLike | undefined {\n this.validateBaseDocument(baseDocument);\n this.baseDocument = this.options.copyDocuments ? deepClone(baseDocument) : baseDocument;\n this.baseDocument = this.transformBaseDocumentAfterValidation(this.baseDocument);\n return this.rebuild();\n }\n\n /**\n * Add or update one of the contribution documents for the composition process\n *\n * Note: the order in which contribution documents are added can be considered to be indeterminate\n * as it is currently ordered by however `Map.forEach` provides the contributions. The order\n * matters when merging two arrays into one. Also, when `options.ignoreDuplicateProperties` is\n * `true`, the order also matters when adding the same property to an object that is already\n * provided previously. Please let us know if you have trouble because of indeterminate\n * contribution ordering.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine\n * @returns Recalculated output document given the new or updated contribution and existing other\n * documents\n */\n addOrUpdateContribution(\n documentName: string,\n document: JsonDocumentLike,\n ): JsonDocumentLike | undefined {\n this.validateContribution(documentName, document);\n const previousDocumentVersion = this.contributions.get(documentName);\n let documentToSet = this.options.copyDocuments && !!document ? deepClone(document) : document;\n documentToSet = this.transformContributionAfterValidation(documentName, documentToSet);\n this.contributions.set(documentName, documentToSet);\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after adding/updating the contribution, put it back how it was\n if (previousDocumentVersion) this.contributions.set(documentName, previousDocumentVersion);\n else this.contributions.delete(documentName);\n throw new Error(`Error when setting the document named ${documentName}: ${error}`);\n }\n }\n\n /**\n * Delete one of the contribution documents for the composition process\n *\n * @param documentName Name of the contributed document to delete\n * @returns Recalculated output document given the remaining other documents\n */\n deleteContribution(documentName: string): JsonDocumentLike | undefined {\n const document = this.contributions.get(documentName);\n if (!document) throw new Error(`${documentName} does not exist`);\n this.contributions.delete(documentName);\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after deleting the contribution, put it back and rethrow\n this.contributions.set(documentName, document);\n throw new Error(`Error when deleting the document named ${documentName}: ${error}`);\n }\n }\n\n /**\n * Delete all present contribution documents for the composition process and return to the base\n * document\n *\n * @returns Recalculated output document consisting only of the base document\n */\n deleteAllContributions(): JsonDocumentLike | undefined {\n if (this.contributions.size <= 0) return this.latestOutput;\n\n // Save out all contributions\n const contributions = [...this.contributions.entries()];\n\n // Delete all contributions\n contributions.forEach(([contributionName]) => this.contributions.delete(contributionName));\n\n // Rebuild with no contributions\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after deleting all contributions, put them back and rethrow\n contributions.forEach(([contributionName, document]) =>\n this.contributions.set(contributionName, document),\n );\n throw new Error(`Error when deleting all contributions: ${error}`);\n }\n }\n\n /**\n * Run the document composition process given the starting document and all contributions. Throws\n * if the output document fails to validate properly.\n *\n * @returns Recalculated output document given the starting and contributed documents\n */\n rebuild(): JsonDocumentLike | undefined {\n // The starting document is the output if there are no other contributions\n if (this.contributions.size === 0) {\n let potentialOutput = deepClone(this.baseDocument);\n potentialOutput = this.transformFinalOutputBeforeValidation(potentialOutput);\n this.validateOutput(potentialOutput);\n this.latestOutput = potentialOutput;\n this.onDidRebuildEmitter.emit(undefined);\n return this.latestOutput;\n }\n\n // Compose the output by validating each document one at a time to pinpoint errors better\n let outputIteration = this.baseDocument;\n this.contributions.forEach((contribution: JsonDocumentLike) => {\n outputIteration = mergeObjects(\n outputIteration,\n contribution,\n this.options.ignoreDuplicateProperties,\n );\n this.validateOutput(outputIteration);\n });\n outputIteration = this.transformFinalOutputBeforeValidation(outputIteration);\n this.validateOutput(outputIteration);\n this.latestOutput = outputIteration;\n this.onDidRebuildEmitter.emit(undefined);\n return this.latestOutput;\n }\n\n /**\n * Transform the starting document that is given to the combiner. This transformation occurs after\n * validating the base document and before combining any contributions.\n *\n * WARNING: If you do not create the combiner with option `copyDocuments: true` or clone inside\n * this method, this method will directly modify the `baseDocument` passed in.\n *\n * @param baseDocument Initial input document. Already validated via `validateBaseDocument`\n * @returns Transformed base document\n */\n // We just don't need `this` here. This is basically a no-op function that is available to child\n // classes to override\n // eslint-disable-next-line class-methods-use-this\n protected transformBaseDocumentAfterValidation(baseDocument: JsonDocumentLike): JsonDocumentLike {\n return baseDocument;\n }\n\n /**\n * Transform the contributed document associated with `documentName`. This transformation occurs\n * after validating the contributed document and before combining with other documents.\n *\n * WARNING: If you do not create the combiner with option `copyDocuments: true` or clone inside\n * this method, this method will directly modify the contributed `document` passed in.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine. Already validated via\n * `validateContribution`\n * @returns Transformed contributed document\n */\n // We just don't need `this` here. This is basically a no-op function that is available to child\n // classes to override\n // eslint-disable-next-line class-methods-use-this\n protected transformContributionAfterValidation(\n // @ts-expect-error this parameter is unused but may be used in child classes\n documentName: string,\n document: JsonDocumentLike,\n ): JsonDocumentLike {\n return document;\n }\n\n /**\n * Throw an error if the provided document is not a valid starting document.\n *\n * @param baseDocument Base JSON document/JS object that all other documents are added to\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateBaseDocument(baseDocument: JsonDocumentLike): void {}\n\n /**\n * Throw an error if the provided document is not a valid contribution document.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateContribution(documentName: string, document: JsonDocumentLike): void {}\n\n /**\n * Throw an error if the provided output is not valid.\n *\n * @param output Output document that could potentially be returned to callers\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateOutput(output: JsonDocumentLike): void {}\n\n /**\n * Transform the document that is the composition of the base document and all contribution\n * documents. This is the last step that will be run prior to validation via `validateOutput`\n * before `this.latestOutput` is updated to the new output.\n *\n * @param finalOutput Final output document that could potentially be returned to callers. \"Final\"\n * means no further contribution documents will be merged.\n */\n // no-op intended to be overridden by child classes. Can't be static\n // eslint-disable-next-line class-methods-use-this\n protected transformFinalOutputBeforeValidation(finalOutput: JsonDocumentLike): JsonDocumentLike {\n return finalOutput;\n }\n}\n\n// #region Helper functions\n\n/**\n * Determines if the input values are objects but not arrays\n *\n * @param values Objects to check\n * @returns True if all the values are objects but not arrays\n */\nfunction areNonArrayObjects(...values: unknown[]): boolean {\n let allMatch = true;\n values.forEach((value: unknown) => {\n if (!value || typeof value !== 'object' || Array.isArray(value)) allMatch = false;\n });\n return allMatch;\n}\n\n/**\n * Determines if the input values are arrays\n *\n * @param value Objects to check\n * @returns True if the values are arrays\n */\nfunction areArrayObjects(...values: unknown[]): boolean {\n let allMatch = true;\n values.forEach((value: unknown) => {\n if (!value || typeof value !== 'object' || !Array.isArray(value)) allMatch = false;\n });\n return allMatch;\n}\n\n/**\n * Deep clone and recursively merge the properties of one object (copyFrom) into another\n * (startingPoint). Throws if copyFrom would overwrite values already existing in startingPoint.\n *\n * Does not modify the objects passed in.\n *\n * @param startingPoint Object that is the starting point for the return value\n * @param copyFrom Object whose values are copied into the return value\n * @param ignoreDuplicateProperties Whether to ignore object properties that are present in\n * `copyFrom` that are already present in `startingPoint`. If `false`, throws when an object\n * property in `copyFrom` is already present in `startingPoint`\n * @returns Object that is the combination of the two documents\n */\nfunction mergeObjects(\n startingPoint: JsonDocumentLike,\n copyFrom: JsonDocumentLike,\n ignoreDuplicateProperties: boolean,\n): JsonDocumentLike {\n const retVal = deepClone(startingPoint);\n\n if (!copyFrom) return retVal;\n\n return mergeObjectsInternal(retVal, deepClone(copyFrom), ignoreDuplicateProperties);\n}\n\n/**\n * Recursively merge the properties of one object (copyFrom) into another (startingPoint). Throws if\n * copyFrom would overwrite values already existing in startingPoint.\n *\n * WARNING: Modifies the argument objects in some way. Recommended to use `mergeObjects`\n *\n * @param startingPoint Object that is the starting point for the return value\n * @param copyFrom Object whose values are copied into the return value\n * @param ignoreDuplicateProperties Whether to ignore object properties that are present in\n * `copyFrom` that are already present in `startingPoint`. If `false`, throws when an object\n * property in `copyFrom` is already present in `startingPoint`\n * @returns Object that is the combination of the two documents\n */\nfunction mergeObjectsInternal(\n startingPoint: JsonDocumentLike,\n copyFrom: JsonDocumentLike,\n ignoreDuplicateProperties: boolean,\n): JsonDocumentLike {\n if (!copyFrom) return startingPoint;\n\n if (areNonArrayObjects(startingPoint, copyFrom)) {\n // Merge properties since they are both objects\n\n // We know these are objects from the `if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n const startingPointObj = startingPoint as JsonObjectLike;\n const copyFromObj = copyFrom as JsonObjectLike;\n /* eslint-enable no-type-assertion/no-type-assertion */\n Object.keys(copyFromObj).forEach((key: string | number) => {\n if (Object.hasOwn(startingPointObj, key)) {\n if (areNonArrayObjects(startingPointObj[key], copyFromObj[key])) {\n startingPointObj[key] = mergeObjectsInternal(\n // We know these are objects from the `if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n startingPointObj[key] as JsonObjectLike,\n copyFromObj[key] as JsonObjectLike,\n ignoreDuplicateProperties,\n /* eslint-enable no-type-assertion/no-type-assertion */\n );\n } else if (areArrayObjects(startingPointObj[key], copyFromObj[key])) {\n // Concat the arrays since they are both arrays\n\n // We know these are arrays from the `else if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n startingPointObj[key] = (startingPointObj[key] as JsonArrayLike).concat(\n copyFromObj[key] as JsonArrayLike,\n );\n /* eslint-enable no-type-assertion/no-type-assertion */\n } else if (!ignoreDuplicateProperties)\n throw new Error(`Cannot merge objects: key \"${key}\" already exists in the target object`);\n // Note that the first non-object non-array value that gets placed in a property stays.\n // New values do not override existing ones\n } else {\n startingPointObj[key] = copyFromObj[key];\n }\n });\n } else if (areArrayObjects(startingPoint, copyFrom)) {\n // Concat the arrays since they are both arrays\n\n // Push the contents of copyFrom into startingPoint since it is a const and was already deep cloned\n // We know these are objects from the `else if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n (startingPoint as JsonArrayLike).push(...(copyFrom as JsonArrayLike));\n /* eslint-enable no-type-assertion/no-type-assertion */\n }\n\n // Note that nothing happens if `startingPoint` is not an object or an array or if `startingPoint`\n // and `copyFrom` are not both object or both arrays. Should we throw? Should we push `copyFrom`'s\n // values into the array? Other? Maybe one day we can add some options to decide what to do in\n // this situation, but YAGNI for now\n\n return startingPoint;\n}\n\n// #endregion\n","import { Mutex as AsyncMutex } from 'async-mutex';\n\n// Extending Mutex from async-mutex so we can add JSDoc\n\n/**\n * Class that allows calling asynchronous functions multiple times at once while only running one at\n * a time.\n *\n * @example\n *\n * ```typescript\n * const mutex = new Mutex();\n *\n * mutex.runExclusive(async () => {\n * // Do some asynchronous stuff\n * console.log('These run one-at-a-time');\n * });\n *\n * mutex.runExclusive(async () => {\n * // Do some asynchronous stuff\n * console.log('These run one-at-a-time');\n * });\n * ```\n *\n * See [`async-mutex`](https://www.npmjs.com/package/async-mutex) for more information.\n */\nclass Mutex extends AsyncMutex {}\n\nexport default Mutex;\n","import Mutex from './mutex';\n\n/** Map of {@link Mutex}es that automatically (lazily) generates a new {@link Mutex} for any new key */\nclass MutexMap {\n private mutexesByID = new Map();\n\n get(mutexID: string): Mutex {\n let retVal = this.mutexesByID.get(mutexID);\n if (retVal) return retVal;\n\n retVal = new Mutex();\n this.mutexesByID.set(mutexID, retVal);\n return retVal;\n }\n}\n\nexport default MutexMap;\n","import DocumentCombiner, { DocumentCombinerOptions, JsonDocumentLike } from './document-combiner';\n\nexport default class NonValidatingDocumentCombiner extends DocumentCombiner {\n // Making the protected base constructor public\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(baseDocument: JsonDocumentLike, options: DocumentCombinerOptions) {\n super(baseDocument, options);\n }\n\n get output(): JsonDocumentLike | undefined {\n return this.latestOutput;\n }\n}\n","/** Enables language-sensitive number formatting. Wraps Intl.NumberFormat */\nexport default class NumberFormat {\n private numberFormatter: Intl.NumberFormat;\n\n constructor(locales?: string | string[], options?: Intl.NumberFormatOptions) {\n this.numberFormatter = new Intl.NumberFormat(locales, options);\n }\n\n /**\n * Formats a number according to the locale and formatting options of this NumberFormat object\n *\n * @param value Number or BigInt to format\n * @returns String representing the given number formatted according to the locale and formatting\n * options of this NumberFormat object\n */\n format(value: number | bigint): string {\n return this.numberFormatter.format(value);\n }\n\n /**\n * Formats a range of numbers according to the locale and formatting options of this NumberFormat\n * object\n *\n * @param startRange Number or bigint representing the start of the range\n * @param endRange Number or bigint representing the end of the range\n * @returns String representing the given range of numbers formatted according to the locale and\n * formatting options of this NumberFormat object\n */\n formatRange(startRange: number | bigint, endRange: number | bigint): string {\n return this.numberFormatter.formatRange(startRange, endRange);\n }\n\n /**\n * Returns an array of objects containing the locale-specific tokens from which it is possible to\n * build custom strings while preserving the locale-specific parts.\n *\n * @param startRange Number or bigint representing start of the range\n * @param endRange Number or bigint representing end of the range\n * @returns Array of NumberRangeFormatPart objects containing the formatted range of numbers in\n * parts\n */\n formatRangeToParts(\n startRange: number | bigint,\n endRange: number | bigint,\n ): Intl.NumberRangeFormatPart[] {\n return this.numberFormatter.formatRangeToParts(startRange, endRange);\n }\n\n /**\n * Allows locale-aware formatting of strings produced by this NumberFormat object\n *\n * @param value Number or bigint to format\n * @returns Array of NumberFormatPart objects containing the formatted number in parts\n */\n formatToParts(value: number | bigint): Intl.NumberFormatPart[] {\n return this.numberFormatter.formatToParts(value);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and number formatting options\n * computed during initialization of this NumberFormat object\n *\n * @returns ResolvedNumberFormatOptions object\n */\n resolvedOptions(): Intl.ResolvedNumberFormatOptions {\n return this.numberFormatter.resolvedOptions();\n }\n}\n","import { Dispose } from './disposal.model';\nimport { Unsubscriber, UnsubscriberAsync } from './unsubscriber';\n\n/** Simple collection for UnsubscriberAsync objects that also provides an easy way to run them. */\nexport default class UnsubscriberAsyncList {\n readonly unsubscribers = new Set();\n\n constructor(private name = 'Anonymous') {}\n\n /**\n * Add unsubscribers to the list. Note that duplicates are not added twice.\n *\n * @param unsubscribers - Objects that were returned from a registration process.\n */\n add(...unsubscribers: (UnsubscriberAsync | Unsubscriber | Dispose)[]) {\n unsubscribers.forEach((unsubscriber) => {\n if ('dispose' in unsubscriber) this.unsubscribers.add(unsubscriber.dispose);\n else this.unsubscribers.add(unsubscriber);\n });\n }\n\n /**\n * Run all unsubscribers added to this list and then clear the list.\n *\n * @returns `true` if all unsubscribers succeeded, `false` otherwise.\n */\n async runAllUnsubscribers(): Promise {\n const unsubs = [...this.unsubscribers].map((unsubscriber) => unsubscriber());\n const results = await Promise.all(unsubs);\n this.unsubscribers.clear();\n return results.every((unsubscriberSucceeded, index) => {\n if (!unsubscriberSucceeded)\n console.error(`UnsubscriberAsyncList ${this.name}: Unsubscriber at index ${index} failed!`);\n\n return unsubscriberSucceeded;\n });\n }\n}\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","\"use strict\"\r\n\r\n// Based on: https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js\r\n\r\nmodule.exports = () => {\r\n\t// Used to compose unicode character classes.\r\n\tconst astralRange = \"\\\\ud800-\\\\udfff\"\r\n\tconst comboMarksRange = \"\\\\u0300-\\\\u036f\"\r\n\tconst comboHalfMarksRange = \"\\\\ufe20-\\\\ufe2f\"\r\n\tconst comboSymbolsRange = \"\\\\u20d0-\\\\u20ff\"\r\n\tconst comboMarksExtendedRange = \"\\\\u1ab0-\\\\u1aff\"\r\n\tconst comboMarksSupplementRange = \"\\\\u1dc0-\\\\u1dff\"\r\n\tconst comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange\r\n\tconst varRange = \"\\\\ufe0e\\\\ufe0f\"\r\n\tconst familyRange = \"\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFB\\\\u200D\\\\uD83C\\\\uDF93\"\r\n\r\n\t// Used to compose unicode capture groups.\r\n\tconst astral = `[${astralRange}]`\r\n\tconst combo = `[${comboRange}]`\r\n\tconst fitz = \"\\\\ud83c[\\\\udffb-\\\\udfff]\"\r\n\tconst modifier = `(?:${combo}|${fitz})`\r\n\tconst nonAstral = `[^${astralRange}]`\r\n\tconst regional = \"(?:\\\\uD83C[\\\\uDDE6-\\\\uDDFF]){2}\"\r\n\tconst surrogatePair = \"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\"\r\n\tconst zwj = \"\\\\u200d\"\r\n\tconst blackFlag = \"(?:\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40(?:\\\\udc65|\\\\udc73|\\\\udc77)\\\\udb40(?:\\\\udc6e|\\\\udc63|\\\\udc6c)\\\\udb40(?:\\\\udc67|\\\\udc74|\\\\udc73)\\\\udb40\\\\udc7f)\"\r\n\tconst family = `[${familyRange}]`\r\n\r\n\t// Used to compose unicode regexes.\r\n\tconst optModifier = `${modifier}?`\r\n\tconst optVar = `[${varRange}]?`\r\n\tconst optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join(\"|\")})${optVar + optModifier})*`\r\n\tconst seq = optVar + optModifier + optJoin\r\n\tconst nonAstralCombo = `${nonAstral}${combo}?`\r\n\tconst symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join(\"|\")})`\r\n\r\n\t// Used to match [String symbols](https://mathiasbynens.be/notes/javascript-unicode).\r\n\treturn new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, \"g\")\r\n}\r\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// @ts-ignore\nvar char_regex_1 = __importDefault(require(\"char-regex\"));\n/**\n * Converts a string to an array of string chars\n * @param {string} str The string to turn into array\n * @returns {string[]}\n */\nfunction toArray(str) {\n if (typeof str !== 'string') {\n throw new Error('A string is expected as input');\n }\n return str.match(char_regex_1.default()) || [];\n}\nexports.toArray = toArray;\n/**\n * Returns the length of a string\n *\n * @export\n * @param {string} str\n * @returns {number}\n */\nfunction length(str) {\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n var match = str.match(char_regex_1.default());\n return match === null ? 0 : match.length;\n}\nexports.length = length;\n/**\n * Returns a substring by providing start and end position\n *\n * @export\n * @param {string} str\n * @param {number} [begin=0] Starting position\n * @param {number} end End position\n * @returns {string}\n */\nfunction substring(str, begin, end) {\n if (begin === void 0) { begin = 0; }\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n // Even though negative numbers work here, theyre not in the spec\n if (typeof begin !== 'number' || begin < 0) {\n begin = 0;\n }\n if (typeof end === 'number' && end < 0) {\n end = 0;\n }\n var match = str.match(char_regex_1.default());\n if (!match)\n return '';\n return match.slice(begin, end).join('');\n}\nexports.substring = substring;\n/**\n * Returns a substring by providing start position and length\n *\n * @export\n * @param {string} str\n * @param {number} [begin=0] Starting position\n * @param {number} len Desired length\n * @returns {string}\n */\nfunction substr(str, begin, len) {\n if (begin === void 0) { begin = 0; }\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n var strLength = length(str);\n // Fix type\n if (typeof begin !== 'number') {\n begin = parseInt(begin, 10);\n }\n // Return zero-length string if got oversize number.\n if (begin >= strLength) {\n return '';\n }\n // Calculating postive version of negative value.\n if (begin < 0) {\n begin += strLength;\n }\n var end;\n if (typeof len === 'undefined') {\n end = strLength;\n }\n else {\n // Fix type\n if (typeof len !== 'number') {\n len = parseInt(len, 10);\n }\n end = len >= 0 ? len + begin : begin;\n }\n var match = str.match(char_regex_1.default());\n if (!match)\n return '';\n return match.slice(begin, end).join('');\n}\nexports.substr = substr;\n/**\n * Enforces a string to be a certain length by\n * adding or removing characters\n *\n * @export\n * @param {string} str\n * @param {number} [limit=16] Limit\n * @param {string} [padString='#'] The Pad String\n * @param {string} [padPosition='right'] The Pad Position\n * @returns {string}\n */\nfunction limit(str, limit, padString, padPosition) {\n if (limit === void 0) { limit = 16; }\n if (padString === void 0) { padString = '#'; }\n if (padPosition === void 0) { padPosition = 'right'; }\n // Input should be a string, limit should be a number\n if (typeof str !== 'string' || typeof limit !== 'number') {\n throw new Error('Invalid arguments specified');\n }\n // Pad position should be either left or right\n if (['left', 'right'].indexOf(padPosition) === -1) {\n throw new Error('Pad position should be either left or right');\n }\n // Pad string can be anything, we convert it to string\n if (typeof padString !== 'string') {\n padString = String(padString);\n }\n // Calculate string length considering astral code points\n var strLength = length(str);\n if (strLength > limit) {\n return substring(str, 0, limit);\n }\n else if (strLength < limit) {\n var padRepeats = padString.repeat(limit - strLength);\n return padPosition === 'left' ? padRepeats + str : str + padRepeats;\n }\n return str;\n}\nexports.limit = limit;\n/**\n * Returns the index of the first occurrence of a given string\n *\n * @export\n * @param {string} str\n * @param {string} [searchStr] the string to search\n * @param {number} [pos] starting position\n * @returns {number}\n */\nfunction indexOf(str, searchStr, pos) {\n if (pos === void 0) { pos = 0; }\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n if (str === '') {\n if (searchStr === '') {\n return 0;\n }\n return -1;\n }\n // fix type\n pos = Number(pos);\n pos = isNaN(pos) ? 0 : pos;\n searchStr = String(searchStr);\n var strArr = toArray(str);\n if (pos >= strArr.length) {\n if (searchStr === '') {\n return strArr.length;\n }\n return -1;\n }\n if (searchStr === '') {\n return pos;\n }\n var searchArr = toArray(searchStr);\n var finded = false;\n var index;\n for (index = pos; index < strArr.length; index += 1) {\n var searchIndex = 0;\n while (searchIndex < searchArr.length &&\n searchArr[searchIndex] === strArr[index + searchIndex]) {\n searchIndex += 1;\n }\n if (searchIndex === searchArr.length &&\n searchArr[searchIndex - 1] === strArr[index + searchIndex - 1]) {\n finded = true;\n break;\n }\n }\n return finded ? index : -1;\n}\nexports.indexOf = indexOf;\n","import { LocalizeKey } from 'menus.model';\nimport {\n indexOf as stringzIndexOf,\n substring as stringzSubstring,\n length as stringzLength,\n toArray as stringzToArray,\n limit as stringzLimit,\n substr as stringzSubstr,\n} from 'stringz';\n\n/**\n * This function mirrors the `at` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Finds the Unicode code point at the given index.\n *\n * @param string String to index\n * @param index Position of the character to be returned in range of -length(string) to\n * length(string)\n * @returns New string consisting of the Unicode code point located at the specified offset,\n * undefined if index is out of bounds\n */\nexport function at(string: string, index: number): string | undefined {\n if (index > stringLength(string) || index < -stringLength(string)) return undefined;\n return substr(string, index, 1);\n}\n\n/**\n * This function mirrors the `charAt` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a new string consisting of the single unicode code point at the given index.\n *\n * @param string String to index\n * @param index Position of the string character to be returned, in the range of 0 to\n * length(string)-1\n * @returns New string consisting of the Unicode code point located at the specified offset, empty\n * string if index is out of bounds\n */\nexport function charAt(string: string, index: number): string {\n if (index < 0 || index > stringLength(string) - 1) return '';\n return substr(string, index, 1);\n}\n\n/**\n * This function mirrors the `codePointAt` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a non-negative integer that is the Unicode code point value of the character starting at\n * the given index.\n *\n * @param string String to index\n * @param index Position of the string character to be returned, in the range of 0 to\n * length(string)-1\n * @returns Non-negative integer representing the code point value of the character at the given\n * index, or undefined if there is no element at that position\n */\nexport function codePointAt(string: string, index: number): number | undefined {\n if (index < 0 || index > stringLength(string) - 1) return undefined;\n return substr(string, index, 1).codePointAt(0);\n}\n\n/**\n * This function mirrors the `endsWith` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Determines whether a string ends with the characters of this string.\n *\n * @param string String to search through\n * @param searchString Characters to search for at the end of the string\n * @param endPosition End position where searchString is expected to be found. Default is\n * `length(string)`\n * @returns True if it ends with searchString, false if it does not\n */\nexport function endsWith(\n string: string,\n searchString: string,\n endPosition: number = stringLength(string),\n): boolean {\n const lastIndexOfSearchString = lastIndexOf(string, searchString);\n if (lastIndexOfSearchString === -1) return false;\n if (lastIndexOfSearchString + stringLength(searchString) !== endPosition) return false;\n return true;\n}\n\n/**\n * Get the index of the closest closing curly brace in a string.\n *\n * Note: when escaped, gets the index of the curly brace, not the backslash before it.\n *\n * @param str String to search\n * @param index Index at which to start searching. Inclusive of this index\n * @param escaped Whether to search for an escaped or an unescaped closing curly brace\n * @returns Index of closest closing curly brace or -1 if not found\n */\nfunction indexOfClosestClosingCurlyBrace(str: string, index: number, escaped: boolean) {\n if (index < 0) return -1;\n if (escaped) {\n if (charAt(str, index) === '}' && charAt(str, index - 1) === '\\\\') return index;\n const closeCurlyBraceIndex = indexOf(str, '\\\\}', index);\n return closeCurlyBraceIndex >= 0 ? closeCurlyBraceIndex + 1 : closeCurlyBraceIndex;\n }\n\n let i = index;\n const strLength = stringLength(str);\n while (i < strLength) {\n i = indexOf(str, '}', i);\n\n if (i === -1 || charAt(str, i - 1) !== '\\\\') break;\n\n // Didn't find an un-escaped close brace, so keep looking\n i += 1;\n }\n\n return i >= strLength ? -1 : i;\n}\n\n/**\n * Formats a string, replacing `{replacer key}` with the value in the `replacers` at that replacer\n * key (or multiple replacer values if there are multiple in the string). Will also remove \\ before\n * curly braces if curly braces are escaped with a backslash in order to preserve the curly braces.\n * E.g. 'Hi, this is {name}! I like `\\{curly braces\\}`! would become Hi, this is Jim! I like {curly\n * braces}!\n *\n * If the key in unescaped braces is not found, returns the key without the braces. Empty unescaped\n * curly braces will just return a string without the braces e.g. ('I am {Nemo}', { 'name': 'Jim'})\n * would return 'I am Nemo'.\n *\n * @example\n *\n * ```typescript\n * formatReplacementString(\n * 'Hi, this is {name}! I like \\{curly braces\\}! I have a {carColor} car. My favorite food is {food}.',\n * { name: 'Bill', carColor: 'blue' }\n * );\n *\n * =>\n *\n * 'Hi, this is Bill! I like {curly braces}! I have a blue car. My favorite food is food.'\n * ```\n *\n * @param str String to format\n * @param replacers Object whose keys are replacer keys and whose values are the values with which\n * to replace `{replacer key}`s found in the string to format. Will be coerced to strings using\n * `${replacerValue}`\n * @returns Formatted string\n */\nexport function formatReplacementString(\n str: string,\n replacers: { [key: string | number]: string | unknown } | object,\n): string {\n let updatedStr = str;\n\n let i = 0;\n while (i < stringLength(updatedStr)) {\n switch (charAt(updatedStr, i)) {\n case '{':\n if (charAt(updatedStr, i - 1) !== '\\\\') {\n // This character is an un-escaped open curly brace. Try to match and replace\n const closeCurlyBraceIndex = indexOfClosestClosingCurlyBrace(updatedStr, i, false);\n if (closeCurlyBraceIndex >= 0) {\n // We have matching open and close indices. Try to replace the contents\n const replacerKey = substring(updatedStr, i + 1, closeCurlyBraceIndex);\n // Replace with the replacer string or just remove the curly braces\n const replacerString =\n replacerKey in replacers\n ? // We're getting a value.toString() with any type from an object with any keys\n // here. TypeScript doesn't need to carefully and precisely track the exact type.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n `${replacers[replacerKey as keyof typeof replacers]}`\n : replacerKey;\n\n updatedStr = `${substring(updatedStr, 0, i)}${replacerString}${substring(updatedStr, closeCurlyBraceIndex + 1)}`;\n // Put our index at the closing brace adjusted for the new string length minus two\n // because we are removing the curly braces\n // Ex: \"stuff {and} things\"\n // Replacer for and: n'\n // closeCurlyBraceIndex is 10\n // \"stuff n' things\"\n // i = 10 + 2 - 3 - 2 = 7\n i = closeCurlyBraceIndex + stringLength(replacerString) - stringLength(replacerKey) - 2;\n } else {\n // This is an unexpected un-escaped open curly brace with no matching closing curly\n // brace. Just ignore, I guess\n }\n } else {\n // This character is an escaped open curly brace. Remove the escape\n updatedStr = `${substring(updatedStr, 0, i - 1)}${substring(updatedStr, i)}`;\n // Adjust our index because we removed the escape\n i -= 1;\n }\n break;\n case '}':\n if (charAt(updatedStr, i - 1) !== '\\\\') {\n // This character is an un-escaped closing curly brace with no matching open curly\n // brace. Just ignore, I guess\n } else {\n // This character is an escaped closing curly brace. Remove the escape\n updatedStr = `${substring(updatedStr, 0, i - 1)}${substring(updatedStr, i)}`;\n // Adjust our index because we removed the escape\n i -= 1;\n }\n break;\n default:\n // No need to do anything with other characters at this point\n break;\n }\n\n i += 1;\n }\n\n return updatedStr;\n}\n/**\n * This function mirrors the `includes` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Performs a case-sensitive search to determine if searchString is found in string.\n *\n * @param string String to search through\n * @param searchString String to search for\n * @param position Position within the string to start searching for searchString. Default is `0`\n * @returns True if search string is found, false if it is not\n */\nexport function includes(string: string, searchString: string, position: number = 0): boolean {\n const partialString = substring(string, position);\n const indexOfSearchString = indexOf(partialString, searchString);\n if (indexOfSearchString === -1) return false;\n return true;\n}\n\n/**\n * This function mirrors the `indexOf` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns the index of the first occurrence of a given string.\n *\n * @param string String to search through\n * @param searchString The string to search for\n * @param position Start of searching. Default is `0`\n * @returns Index of the first occurrence of a given string\n */\nexport function indexOf(\n string: string,\n searchString: string,\n position: number | undefined = 0,\n): number {\n return stringzIndexOf(string, searchString, position);\n}\n\n/**\n * This function mirrors the `lastIndexOf` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Searches this string and returns the index of the last occurrence of the specified substring.\n *\n * @param string String to search through\n * @param searchString Substring to search for\n * @param position The index at which to begin searching. If omitted, the search begins at the end\n * of the string. Default is `undefined`\n * @returns Index of the last occurrence of searchString found, or -1 if not found.\n */\nexport function lastIndexOf(string: string, searchString: string, position?: number): number {\n let validatedPosition = position === undefined ? stringLength(string) : position;\n\n if (validatedPosition < 0) {\n validatedPosition = 0;\n } else if (validatedPosition >= stringLength(string)) {\n validatedPosition = stringLength(string) - 1;\n }\n\n for (let index = validatedPosition; index >= 0; index--) {\n if (substr(string, index, stringLength(searchString)) === searchString) {\n return index;\n }\n }\n\n return -1;\n}\n\n/**\n * This function mirrors the `length` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes. Since `length` appears to be a\n * reserved keyword, the function was renamed to `stringLength`\n *\n * Returns the length of a string.\n *\n * @param string String to return the length for\n * @returns Number that is length of the starting string\n */\nexport function stringLength(string: string): number {\n return stringzLength(string);\n}\n\n/**\n * This function mirrors the `normalize` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns the Unicode Normalization Form of this string.\n *\n * @param string The starting string\n * @param form Form specifying the Unicode Normalization Form. Default is `'NFC'`\n * @returns A string containing the Unicode Normalization Form of the given string.\n */\nexport function normalize(string: string, form: 'NFC' | 'NFD' | 'NFKC' | 'NFKD' | 'none'): string {\n const upperCaseForm = form.toUpperCase();\n if (upperCaseForm === 'NONE') {\n return string;\n }\n return string.normalize(upperCaseForm);\n}\n\n/**\n * Compares two strings using an ordinal comparison approach based on the specified collation\n * options. This function uses the built-in `localeCompare` method with the 'en' locale and the\n * provided collation options to compare the strings.\n *\n * @param string1 The first string to compare.\n * @param string2 The second string to compare.\n * @param options Optional. The collation options used for comparison.\n * @returns A number indicating the result of the comparison: - Negative value if string1 precedes\n * string2 in sorting order. - Zero if string1 and string2 are equivalent in sorting order. -\n * Positive value if string1 follows string2 in sorting order.\n */\nexport function ordinalCompare(\n string1: string,\n string2: string,\n options?: Intl.CollatorOptions,\n): number {\n return string1.localeCompare(string2, 'en', options);\n}\n\n/**\n * This function mirrors the `padEnd` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Pads this string with another string (multiple times, if needed) until the resulting string\n * reaches the given length. The padding is applied from the end of this string.\n *\n * @param string String to add padding too\n * @param targetLength The length of the resulting string once the starting string has been padded.\n * If value is less than or equal to length(string), then string is returned as is.\n * @param padString The string to pad the current string with. If padString is too long to stay\n * within targetLength, it will be truncated. Default is `\" \"`\n * @returns String with appropriate padding at the end\n */\n// Note: Limit with padString only works when length(padString) = 1, will be fixed with https://github.com/sallar/stringz/pull/59\nexport function padEnd(string: string, targetLength: number, padString: string = ' '): string {\n if (targetLength <= stringLength(string)) return string;\n return stringzLimit(string, targetLength, padString, 'right');\n}\n\n/**\n * This function mirrors the `padStart` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Pads this string with another string (multiple times, if needed) until the resulting string\n * reaches the given length. The padding is applied from the start of this string.\n *\n * @param string String to add padding too\n * @param targetLength The length of the resulting string once the starting string has been padded.\n * If value is less than or equal to length(string), then string is returned as is.\n * @param padString The string to pad the current string with. If padString is too long to stay\n * within the targetLength, it will be truncated from the end. Default is `\" \"`\n * @returns String with of specified targetLength with padString applied from the start\n */\n// Note: Limit with padString only works when length(padString) = 1, will be fixed with https://github.com/sallar/stringz/pull/59\nexport function padStart(string: string, targetLength: number, padString: string = ' '): string {\n if (targetLength <= stringLength(string)) return string;\n return stringzLimit(string, targetLength, padString, 'left');\n}\n\n// This is a helper function that performs a correction on the slice index to make sure it\n// cannot go out of bounds\nfunction correctSliceIndex(length: number, index: number) {\n if (index > length) return length;\n if (index < -length) return 0;\n if (index < 0) return index + length;\n return index;\n}\n\n/**\n * This function mirrors the `slice` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Extracts a section of this string and returns it as a new string, without modifying the original\n * string.\n *\n * @param string The starting string\n * @param indexStart The index of the first character to include in the returned substring.\n * @param indexEnd The index of the first character to exclude from the returned substring.\n * @returns A new string containing the extracted section of the string.\n */\nexport function slice(string: string, indexStart: number, indexEnd?: number): string {\n const length: number = stringLength(string);\n if (\n indexStart > length ||\n (indexEnd &&\n ((indexStart > indexEnd &&\n !(indexStart >= 0 && indexStart < length && indexEnd < 0 && indexEnd > -length)) ||\n indexEnd < -length))\n )\n return '';\n\n const newStart = correctSliceIndex(length, indexStart);\n const newEnd = indexEnd ? correctSliceIndex(length, indexEnd) : undefined;\n\n return substring(string, newStart, newEnd);\n}\n\n/**\n * This function mirrors the `split` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Takes a pattern and divides the string into an ordered list of substrings by searching for the\n * pattern, puts these substrings into an array, and returns the array.\n *\n * @param string The string to split\n * @param separator The pattern describing where each split should occur\n * @param splitLimit Limit on the number of substrings to be included in the array. Splits the\n * string at each occurrence of specified separator, but stops when limit entries have been placed\n * in the array.\n * @returns An array of strings, split at each point where separator occurs in the starting string.\n * Returns undefined if separator is not found in string.\n */\nexport function split(string: string, separator: string | RegExp, splitLimit?: number): string[] {\n const result: string[] = [];\n\n if (splitLimit !== undefined && splitLimit <= 0) {\n return [string];\n }\n\n if (separator === '') return toArray(string).slice(0, splitLimit);\n\n let regexSeparator = separator;\n if (\n typeof separator === 'string' ||\n (separator instanceof RegExp && !includes(separator.flags, 'g'))\n ) {\n regexSeparator = new RegExp(separator, 'g');\n }\n\n const matches: RegExpMatchArray | null = string.match(regexSeparator);\n\n let currentIndex = 0;\n\n if (!matches) return [string];\n\n for (let index = 0; index < (splitLimit ? splitLimit - 1 : matches.length); index++) {\n const matchIndex = indexOf(string, matches[index], currentIndex);\n const matchLength = stringLength(matches[index]);\n\n result.push(substring(string, currentIndex, matchIndex));\n currentIndex = matchIndex + matchLength;\n\n if (splitLimit !== undefined && result.length === splitLimit) {\n break;\n }\n }\n\n result.push(substring(string, currentIndex));\n\n return result;\n}\n\n/**\n * This function mirrors the `startsWith` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Determines whether the string begins with the characters of a specified string, returning true or\n * false as appropriate.\n *\n * @param string String to search through\n * @param searchString The characters to be searched for at the start of this string.\n * @param position The start position at which searchString is expected to be found (the index of\n * searchString's first character). Default is `0`\n * @returns True if the given characters are found at the beginning of the string, including when\n * searchString is an empty string; otherwise, false.\n */\nexport function startsWith(string: string, searchString: string, position: number = 0): boolean {\n const indexOfSearchString = indexOf(string, searchString, position);\n if (indexOfSearchString !== position) return false;\n return true;\n}\n\n/**\n * This function mirrors the `substr` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a substring by providing start and length. This function is not exported because it is\n * considered deprecated, however it is still useful as a local helper function.\n *\n * @param string String to be divided\n * @param begin Start position. Default is `Start of string`\n * @param len Length of result. Default is `String length minus start parameter`. Default is `String\n * length minus start parameter`\n * @returns Substring from starting string\n */\nfunction substr(\n string: string,\n begin: number = 0,\n len: number = stringLength(string) - begin,\n): string {\n return stringzSubstr(string, begin, len);\n}\n\n/**\n * This function mirrors the `substring` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a substring by providing start and end position.\n *\n * @param string String to be divided\n * @param begin Start position\n * @param end End position. Default is `End of string`\n * @returns Substring from starting string\n */\nexport function substring(\n string: string,\n begin: number,\n end: number = stringLength(string),\n): string {\n return stringzSubstring(string, begin, end);\n}\n\n/**\n * This function mirrors the `toArray` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Converts a string to an array of string characters.\n *\n * @param string String to convert to array\n * @returns An array of characters from the starting string\n */\nexport function toArray(string: string): string[] {\n return stringzToArray(string);\n}\n\n/** Determine whether the string is a `LocalizeKey` meant to be localized in Platform.Bible. */\nexport function isLocalizeKey(str: string): str is LocalizeKey {\n return startsWith(str, '%') && endsWith(str, '%');\n}\n\n/**\n * Escape RegExp special characters.\n *\n * You can also use this to escape a string that is inserted into the middle of a regex, for\n * example, into a character class.\n *\n * All credit to [`escape-string-regexp`](https://www.npmjs.com/package/escape-string-regexp) - this\n * function is simply copied directly from there to allow a common js export\n *\n * @example\n *\n * import escapeStringRegexp from 'platform-bible-utils';\n *\n * const escapedString = escapeStringRegexp('How much $ for a 🦄?');\n * //=> 'How much \\\\$ for a 🦄\\\\?'\n *\n * new RegExp(escapedString);\n */\nexport function escapeStringRegexp(string: string): string {\n if (typeof string !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n // Escape characters with special meaning either inside or outside character sets.\n // Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n\n/** This is an internal-only export for testing purposes and should not be used in development */\nexport const testingStringUtils = {\n indexOfClosestClosingCurlyBrace,\n};\n","import { Canon, VerseRef } from '@sillsdev/scripture';\nimport { BookInfo, ScriptureReference } from './scripture.model';\nimport { split, startsWith } from './string-util';\n\nconst scrBookData: BookInfo[] = [\n { shortName: 'ERR', fullNames: ['ERROR'], chapters: -1 },\n { shortName: 'GEN', fullNames: ['Genesis'], chapters: 50 },\n { shortName: 'EXO', fullNames: ['Exodus'], chapters: 40 },\n { shortName: 'LEV', fullNames: ['Leviticus'], chapters: 27 },\n { shortName: 'NUM', fullNames: ['Numbers'], chapters: 36 },\n { shortName: 'DEU', fullNames: ['Deuteronomy'], chapters: 34 },\n { shortName: 'JOS', fullNames: ['Joshua'], chapters: 24 },\n { shortName: 'JDG', fullNames: ['Judges'], chapters: 21 },\n { shortName: 'RUT', fullNames: ['Ruth'], chapters: 4 },\n { shortName: '1SA', fullNames: ['1 Samuel'], chapters: 31 },\n { shortName: '2SA', fullNames: ['2 Samuel'], chapters: 24 },\n { shortName: '1KI', fullNames: ['1 Kings'], chapters: 22 },\n { shortName: '2KI', fullNames: ['2 Kings'], chapters: 25 },\n { shortName: '1CH', fullNames: ['1 Chronicles'], chapters: 29 },\n { shortName: '2CH', fullNames: ['2 Chronicles'], chapters: 36 },\n { shortName: 'EZR', fullNames: ['Ezra'], chapters: 10 },\n { shortName: 'NEH', fullNames: ['Nehemiah'], chapters: 13 },\n { shortName: 'EST', fullNames: ['Esther'], chapters: 10 },\n { shortName: 'JOB', fullNames: ['Job'], chapters: 42 },\n { shortName: 'PSA', fullNames: ['Psalm', 'Psalms'], chapters: 150 },\n { shortName: 'PRO', fullNames: ['Proverbs'], chapters: 31 },\n { shortName: 'ECC', fullNames: ['Ecclesiastes'], chapters: 12 },\n { shortName: 'SNG', fullNames: ['Song of Solomon', 'Song of Songs'], chapters: 8 },\n { shortName: 'ISA', fullNames: ['Isaiah'], chapters: 66 },\n { shortName: 'JER', fullNames: ['Jeremiah'], chapters: 52 },\n { shortName: 'LAM', fullNames: ['Lamentations'], chapters: 5 },\n { shortName: 'EZK', fullNames: ['Ezekiel'], chapters: 48 },\n { shortName: 'DAN', fullNames: ['Daniel'], chapters: 12 },\n { shortName: 'HOS', fullNames: ['Hosea'], chapters: 14 },\n { shortName: 'JOL', fullNames: ['Joel'], chapters: 3 },\n { shortName: 'AMO', fullNames: ['Amos'], chapters: 9 },\n { shortName: 'OBA', fullNames: ['Obadiah'], chapters: 1 },\n { shortName: 'JON', fullNames: ['Jonah'], chapters: 4 },\n { shortName: 'MIC', fullNames: ['Micah'], chapters: 7 },\n { shortName: 'NAM', fullNames: ['Nahum'], chapters: 3 },\n { shortName: 'HAB', fullNames: ['Habakkuk'], chapters: 3 },\n { shortName: 'ZEP', fullNames: ['Zephaniah'], chapters: 3 },\n { shortName: 'HAG', fullNames: ['Haggai'], chapters: 2 },\n { shortName: 'ZEC', fullNames: ['Zechariah'], chapters: 14 },\n { shortName: 'MAL', fullNames: ['Malachi'], chapters: 4 },\n { shortName: 'MAT', fullNames: ['Matthew'], chapters: 28 },\n { shortName: 'MRK', fullNames: ['Mark'], chapters: 16 },\n { shortName: 'LUK', fullNames: ['Luke'], chapters: 24 },\n { shortName: 'JHN', fullNames: ['John'], chapters: 21 },\n { shortName: 'ACT', fullNames: ['Acts'], chapters: 28 },\n { shortName: 'ROM', fullNames: ['Romans'], chapters: 16 },\n { shortName: '1CO', fullNames: ['1 Corinthians'], chapters: 16 },\n { shortName: '2CO', fullNames: ['2 Corinthians'], chapters: 13 },\n { shortName: 'GAL', fullNames: ['Galatians'], chapters: 6 },\n { shortName: 'EPH', fullNames: ['Ephesians'], chapters: 6 },\n { shortName: 'PHP', fullNames: ['Philippians'], chapters: 4 },\n { shortName: 'COL', fullNames: ['Colossians'], chapters: 4 },\n { shortName: '1TH', fullNames: ['1 Thessalonians'], chapters: 5 },\n { shortName: '2TH', fullNames: ['2 Thessalonians'], chapters: 3 },\n { shortName: '1TI', fullNames: ['1 Timothy'], chapters: 6 },\n { shortName: '2TI', fullNames: ['2 Timothy'], chapters: 4 },\n { shortName: 'TIT', fullNames: ['Titus'], chapters: 3 },\n { shortName: 'PHM', fullNames: ['Philemon'], chapters: 1 },\n { shortName: 'HEB', fullNames: ['Hebrews'], chapters: 13 },\n { shortName: 'JAS', fullNames: ['James'], chapters: 5 },\n { shortName: '1PE', fullNames: ['1 Peter'], chapters: 5 },\n { shortName: '2PE', fullNames: ['2 Peter'], chapters: 3 },\n { shortName: '1JN', fullNames: ['1 John'], chapters: 5 },\n { shortName: '2JN', fullNames: ['2 John'], chapters: 1 },\n { shortName: '3JN', fullNames: ['3 John'], chapters: 1 },\n { shortName: 'JUD', fullNames: ['Jude'], chapters: 1 },\n { shortName: 'REV', fullNames: ['Revelation'], chapters: 22 },\n];\n\nexport const FIRST_SCR_BOOK_NUM = 1;\nexport const LAST_SCR_BOOK_NUM = scrBookData.length - 1;\nexport const FIRST_SCR_CHAPTER_NUM = 1;\nexport const FIRST_SCR_VERSE_NUM = 1;\n\nexport const getChaptersForBook = (bookNum: number): number => {\n return scrBookData[bookNum]?.chapters ?? -1;\n};\n\nexport const offsetBook = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n bookNum: Math.max(FIRST_SCR_BOOK_NUM, Math.min(scrRef.bookNum + offset, LAST_SCR_BOOK_NUM)),\n chapterNum: 1,\n verseNum: 1,\n});\n\nexport const offsetChapter = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n ...scrRef,\n chapterNum: Math.min(\n Math.max(FIRST_SCR_CHAPTER_NUM, scrRef.chapterNum + offset),\n getChaptersForBook(scrRef.bookNum),\n ),\n verseNum: 1,\n});\n\nexport const offsetVerse = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n ...scrRef,\n verseNum: Math.max(FIRST_SCR_VERSE_NUM, scrRef.verseNum + offset),\n});\n\n/**\n * https://github.com/ubsicap/Paratext/blob/master/ParatextData/SILScriptureExtensions.cs#L72\n *\n * Convert book number to a localized Id (a short description of the book). This should be used\n * whenever a book ID (short code) is shown to the user. It is primarily needed for people who do\n * not read Roman script well and need to have books identified in a alternate script (e.g. Chinese\n * or Russian)\n *\n * @param bookNumber\n * @param localizationLanguage In BCP 47 format\n * @param getLocalizedString Function that provides the localized versions of the book ids and names\n * asynchronously.\n * @returns\n */\nexport async function getLocalizedIdFromBookNumber(\n bookNumber: number,\n localizationLanguage: string,\n getLocalizedString: (item: {\n localizeKey: string;\n languagesToSearch?: string[];\n }) => Promise,\n) {\n const id = Canon.bookNumberToId(bookNumber);\n\n if (!startsWith(Intl.getCanonicalLocales(localizationLanguage)[0], 'zh'))\n return getLocalizedString({\n localizeKey: `LocalizedId.${id}`,\n languagesToSearch: [localizationLanguage],\n });\n\n // For Chinese the normal book name is already fairly short.\n const bookName = await getLocalizedString({\n localizeKey: `Book.${id}`,\n languagesToSearch: [localizationLanguage],\n });\n const parts = split(bookName, '-');\n // some entries had a second name inside ideographic parenthesis\n const parts2 = split(parts[0], '\\xff08');\n const retVal = parts2[0].trim();\n return retVal;\n}\n\n/**\n * Get the Scripture reference as an easily comparable/sortable integer.\n *\n * @param scrRef The Scripture reference.\n * @returns An integer where the first three digits represent the book, the next three represent the\n * chapter and the last three represent the verse.\n */\nexport function scrRefToBBBCCCVVV(scrRef: ScriptureReference): number {\n return new VerseRef(scrRef.bookNum, scrRef.chapterNum, scrRef.verseNum).BBBCCCVVV;\n}\n\n/**\n * Compares two Scripture references canonically.\n *\n * @param scrRef1 The first Scripture reference to compare.\n * @param scrRef2 The second Scripture reference to compare.\n * @returns A number indicating the result of the comparison: - Negative value if scrRef1 precedes\n * scrRef2 in sorting order. - Zero if scrRef1 and scrRef2 are equivalent in sorting order. -\n * Positive value if scrRef1 follows scrRef2 in sorting order.\n */\nexport function compareScrRefs(scrRef1: ScriptureReference, scrRef2: ScriptureReference): number {\n // TODO: consider edge cases for invalid references (current implementation should suffice for\n // all but the most extreme cases)\n return scrRefToBBBCCCVVV(scrRef1) - scrRefToBBBCCCVVV(scrRef2);\n}\n\n/**\n * Formats a Scripture reference.\n *\n * @param scrRef The Scripture reference to format.\n * @param optionOrLocalizedBookName Either 'id' (the default) to format using the \"standard\" (as\n * defined by SIL/UBS) 3-letter book ID, 'English' to format using the English book name spelled\n * out, or some other string (e.g., a localized book name, vernacular abbreviation, FCBH book id,\n * etc.) to use.\n * @param chapterVerseSeparator The character used to separate the chapter number from the verse\n * number. Default is a colon (:). Note: More than one character is allowed.\n * @param bookChapterSeparator The character used to separate the book from the chapter number.\n * Default is a single space. Note: More than one character is allowed.\n * @returns The formatted reference.\n */\nexport function formatScrRef(\n scrRef: ScriptureReference,\n optionOrLocalizedBookName?: 'id' | 'English' | string,\n chapterVerseSeparator?: string,\n bookChapterSeparator?: string,\n): string {\n let book: string;\n switch (optionOrLocalizedBookName ?? 'id') {\n case 'English':\n book = Canon.bookNumberToEnglishName(scrRef.bookNum);\n break;\n case 'id':\n book = Canon.bookNumberToId(scrRef.bookNum);\n break;\n default:\n // We already dealt with undefined about in the switch, but TS is getting confused.\n book = optionOrLocalizedBookName ?? '';\n break;\n }\n return `${book}${bookChapterSeparator ?? ' '}${scrRef.chapterNum}${chapterVerseSeparator ?? ':'}${scrRef.verseNum}`;\n}\n","/** Function to run to dispose of something. Returns true if successfully unsubscribed */\nexport type Unsubscriber = () => boolean;\n\n/**\n * Returns an Unsubscriber function that combines all the unsubscribers passed in.\n *\n * @param unsubscribers All unsubscribers to aggregate into one unsubscriber\n * @returns Function that unsubscribes from all passed in unsubscribers when run\n */\nexport const aggregateUnsubscribers = (unsubscribers: Unsubscriber[]): Unsubscriber => {\n return (...args) => {\n // Run the unsubscriber for each handler\n const unsubs = unsubscribers.map((unsubscriber) => unsubscriber(...args));\n\n // If all the unsubscribers resolve to truthiness, we succeed\n return unsubs.every((success) => success);\n };\n};\n\n/**\n * Function to run to dispose of something that runs asynchronously. The promise resolves to true if\n * successfully unsubscribed\n */\nexport type UnsubscriberAsync = () => Promise;\n\n/**\n * Returns an UnsubscriberAsync function that combines all the unsubscribers passed in.\n *\n * @param unsubscribers - All unsubscribers to aggregate into one unsubscriber.\n * @returns Function that unsubscribes from all passed in unsubscribers when run\n */\nexport const aggregateUnsubscriberAsyncs = (\n unsubscribers: (UnsubscriberAsync | Unsubscriber)[],\n): UnsubscriberAsync => {\n return async (...args) => {\n // Run the unsubscriber for each handler\n const unsubPromises = unsubscribers.map(async (unsubscriber) => unsubscriber(...args));\n\n // If all the unsubscribers resolve to truthiness, we succeed\n return (await Promise.all(unsubPromises)).every((success) => success);\n };\n};\n","var getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Combine two comparators into a single comparators.\n */\nfunction combineComparators(comparatorA, comparatorB) {\n return function isEqual(a, b, state) {\n return comparatorA(a, b, state) && comparatorB(a, b, state);\n };\n}\n/**\n * Wrap the provided `areItemsEqual` method to manage the circular state, allowing\n * for circular references to be safely included in the comparison without creating\n * stack overflows.\n */\nfunction createIsCircular(areItemsEqual) {\n return function isCircular(a, b, state) {\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return areItemsEqual(a, b, state);\n }\n var cache = state.cache;\n var cachedA = cache.get(a);\n var cachedB = cache.get(b);\n if (cachedA && cachedB) {\n return cachedA === b && cachedB === a;\n }\n cache.set(a, b);\n cache.set(b, a);\n var result = areItemsEqual(a, b, state);\n cache.delete(a);\n cache.delete(b);\n return result;\n };\n}\n/**\n * Get the properties to strictly examine, which include both own properties that are\n * not enumerable and symbol properties.\n */\nfunction getStrictProperties(object) {\n return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));\n}\n/**\n * Whether the object contains the property passed as an own property.\n */\nvar hasOwn = Object.hasOwn ||\n (function (object, property) {\n return hasOwnProperty.call(object, property);\n });\n/**\n * Whether the values passed are strictly equal or both NaN.\n */\nfunction sameValueZeroEqual(a, b) {\n return a || b ? a === b : a === b || (a !== a && b !== b);\n}\n\nvar OWNER = '_owner';\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, keys = Object.keys;\n/**\n * Whether the arrays are equal in value.\n */\nfunction areArraysEqual(a, b, state) {\n var index = a.length;\n if (b.length !== index) {\n return false;\n }\n while (index-- > 0) {\n if (!state.equals(a[index], b[index], index, index, a, b, state)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the dates passed are equal in value.\n */\nfunction areDatesEqual(a, b) {\n return sameValueZeroEqual(a.getTime(), b.getTime());\n}\n/**\n * Whether the `Map`s are equal in value.\n */\nfunction areMapsEqual(a, b, state) {\n if (a.size !== b.size) {\n return false;\n }\n var matchedIndices = {};\n var aIterable = a.entries();\n var index = 0;\n var aResult;\n var bResult;\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n var bIterable = b.entries();\n var hasMatch = false;\n var matchIndex = 0;\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n var _a = aResult.value, aKey = _a[0], aValue = _a[1];\n var _b = bResult.value, bKey = _b[0], bValue = _b[1];\n if (!hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch =\n state.equals(aKey, bKey, index, matchIndex, a, b, state) &&\n state.equals(aValue, bValue, aKey, bKey, a, b, state))) {\n matchedIndices[matchIndex] = true;\n }\n matchIndex++;\n }\n if (!hasMatch) {\n return false;\n }\n index++;\n }\n return true;\n}\n/**\n * Whether the objects are equal in value.\n */\nfunction areObjectsEqual(a, b, state) {\n var properties = keys(a);\n var index = properties.length;\n if (keys(b).length !== index) {\n return false;\n }\n var property;\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index];\n if (property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof) {\n return false;\n }\n if (!hasOwn(b, property) ||\n !state.equals(a[property], b[property], property, property, a, b, state)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the objects are equal in value with strict property checking.\n */\nfunction areObjectsEqualStrict(a, b, state) {\n var properties = getStrictProperties(a);\n var index = properties.length;\n if (getStrictProperties(b).length !== index) {\n return false;\n }\n var property;\n var descriptorA;\n var descriptorB;\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index];\n if (property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof) {\n return false;\n }\n if (!hasOwn(b, property)) {\n return false;\n }\n if (!state.equals(a[property], b[property], property, property, a, b, state)) {\n return false;\n }\n descriptorA = getOwnPropertyDescriptor(a, property);\n descriptorB = getOwnPropertyDescriptor(b, property);\n if ((descriptorA || descriptorB) &&\n (!descriptorA ||\n !descriptorB ||\n descriptorA.configurable !== descriptorB.configurable ||\n descriptorA.enumerable !== descriptorB.enumerable ||\n descriptorA.writable !== descriptorB.writable)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the primitive wrappers passed are equal in value.\n */\nfunction arePrimitiveWrappersEqual(a, b) {\n return sameValueZeroEqual(a.valueOf(), b.valueOf());\n}\n/**\n * Whether the regexps passed are equal in value.\n */\nfunction areRegExpsEqual(a, b) {\n return a.source === b.source && a.flags === b.flags;\n}\n/**\n * Whether the `Set`s are equal in value.\n */\nfunction areSetsEqual(a, b, state) {\n if (a.size !== b.size) {\n return false;\n }\n var matchedIndices = {};\n var aIterable = a.values();\n var aResult;\n var bResult;\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n var bIterable = b.values();\n var hasMatch = false;\n var matchIndex = 0;\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n if (!hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch = state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state))) {\n matchedIndices[matchIndex] = true;\n }\n matchIndex++;\n }\n if (!hasMatch) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the TypedArray instances are equal in value.\n */\nfunction areTypedArraysEqual(a, b) {\n var index = a.length;\n if (b.length !== index) {\n return false;\n }\n while (index-- > 0) {\n if (a[index] !== b[index]) {\n return false;\n }\n }\n return true;\n}\n\nvar ARGUMENTS_TAG = '[object Arguments]';\nvar BOOLEAN_TAG = '[object Boolean]';\nvar DATE_TAG = '[object Date]';\nvar MAP_TAG = '[object Map]';\nvar NUMBER_TAG = '[object Number]';\nvar OBJECT_TAG = '[object Object]';\nvar REG_EXP_TAG = '[object RegExp]';\nvar SET_TAG = '[object Set]';\nvar STRING_TAG = '[object String]';\nvar isArray = Array.isArray;\nvar isTypedArray = typeof ArrayBuffer === 'function' && ArrayBuffer.isView\n ? ArrayBuffer.isView\n : null;\nvar assign = Object.assign;\nvar getTag = Object.prototype.toString.call.bind(Object.prototype.toString);\n/**\n * Create a comparator method based on the type-specific equality comparators passed.\n */\nfunction createEqualityComparator(_a) {\n var areArraysEqual = _a.areArraysEqual, areDatesEqual = _a.areDatesEqual, areMapsEqual = _a.areMapsEqual, areObjectsEqual = _a.areObjectsEqual, arePrimitiveWrappersEqual = _a.arePrimitiveWrappersEqual, areRegExpsEqual = _a.areRegExpsEqual, areSetsEqual = _a.areSetsEqual, areTypedArraysEqual = _a.areTypedArraysEqual;\n /**\n * compare the value of the two objects and return true if they are equivalent in values\n */\n return function comparator(a, b, state) {\n // If the items are strictly equal, no need to do a value comparison.\n if (a === b) {\n return true;\n }\n // If the items are not non-nullish objects, then the only possibility\n // of them being equal but not strictly is if they are both `NaN`. Since\n // `NaN` is uniquely not equal to itself, we can use self-comparison of\n // both objects, which is faster than `isNaN()`.\n if (a == null ||\n b == null ||\n typeof a !== 'object' ||\n typeof b !== 'object') {\n return a !== a && b !== b;\n }\n var constructor = a.constructor;\n // Checks are listed in order of commonality of use-case:\n // 1. Common complex object types (plain object, array)\n // 2. Common data values (date, regexp)\n // 3. Less-common complex object types (map, set)\n // 4. Less-common data values (promise, primitive wrappers)\n // Inherently this is both subjective and assumptive, however\n // when reviewing comparable libraries in the wild this order\n // appears to be generally consistent.\n // Constructors should match, otherwise there is potential for false positives\n // between class and subclass or custom object and POJO.\n if (constructor !== b.constructor) {\n return false;\n }\n // `isPlainObject` only checks against the object's own realm. Cross-realm\n // comparisons are rare, and will be handled in the ultimate fallback, so\n // we can avoid capturing the string tag.\n if (constructor === Object) {\n return areObjectsEqual(a, b, state);\n }\n // `isArray()` works on subclasses and is cross-realm, so we can avoid capturing\n // the string tag or doing an `instanceof` check.\n if (isArray(a)) {\n return areArraysEqual(a, b, state);\n }\n // `isTypedArray()` works on all possible TypedArray classes, so we can avoid\n // capturing the string tag or comparing against all possible constructors.\n if (isTypedArray != null && isTypedArray(a)) {\n return areTypedArraysEqual(a, b, state);\n }\n // Try to fast-path equality checks for other complex object types in the\n // same realm to avoid capturing the string tag. Strict equality is used\n // instead of `instanceof` because it is more performant for the common\n // use-case. If someone is subclassing a native class, it will be handled\n // with the string tag comparison.\n if (constructor === Date) {\n return areDatesEqual(a, b, state);\n }\n if (constructor === RegExp) {\n return areRegExpsEqual(a, b, state);\n }\n if (constructor === Map) {\n return areMapsEqual(a, b, state);\n }\n if (constructor === Set) {\n return areSetsEqual(a, b, state);\n }\n // Since this is a custom object, capture the string tag to determing its type.\n // This is reasonably performant in modern environments like v8 and SpiderMonkey.\n var tag = getTag(a);\n if (tag === DATE_TAG) {\n return areDatesEqual(a, b, state);\n }\n if (tag === REG_EXP_TAG) {\n return areRegExpsEqual(a, b, state);\n }\n if (tag === MAP_TAG) {\n return areMapsEqual(a, b, state);\n }\n if (tag === SET_TAG) {\n return areSetsEqual(a, b, state);\n }\n if (tag === OBJECT_TAG) {\n // The exception for value comparison is custom `Promise`-like class instances. These should\n // be treated the same as standard `Promise` objects, which means strict equality, and if\n // it reaches this point then that strict equality comparison has already failed.\n return (typeof a.then !== 'function' &&\n typeof b.then !== 'function' &&\n areObjectsEqual(a, b, state));\n }\n // If an arguments tag, it should be treated as a standard object.\n if (tag === ARGUMENTS_TAG) {\n return areObjectsEqual(a, b, state);\n }\n // As the penultimate fallback, check if the values passed are primitive wrappers. This\n // is very rare in modern JS, which is why it is deprioritized compared to all other object\n // types.\n if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {\n return arePrimitiveWrappersEqual(a, b, state);\n }\n // If not matching any tags that require a specific type of comparison, then we hard-code false because\n // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:\n // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only\n // comparison that can be made.\n // - For types that can be introspected, but rarely have requirements to be compared\n // (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common\n // use-cases (may be included in a future release, if requested enough).\n // - For types that can be introspected but do not have an objective definition of what\n // equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.\n // In all cases, these decisions should be reevaluated based on changes to the language and\n // common development practices.\n return false;\n };\n}\n/**\n * Create the configuration object used for building comparators.\n */\nfunction createEqualityComparatorConfig(_a) {\n var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;\n var config = {\n areArraysEqual: strict\n ? areObjectsEqualStrict\n : areArraysEqual,\n areDatesEqual: areDatesEqual,\n areMapsEqual: strict\n ? combineComparators(areMapsEqual, areObjectsEqualStrict)\n : areMapsEqual,\n areObjectsEqual: strict\n ? areObjectsEqualStrict\n : areObjectsEqual,\n arePrimitiveWrappersEqual: arePrimitiveWrappersEqual,\n areRegExpsEqual: areRegExpsEqual,\n areSetsEqual: strict\n ? combineComparators(areSetsEqual, areObjectsEqualStrict)\n : areSetsEqual,\n areTypedArraysEqual: strict\n ? areObjectsEqualStrict\n : areTypedArraysEqual,\n };\n if (createCustomConfig) {\n config = assign({}, config, createCustomConfig(config));\n }\n if (circular) {\n var areArraysEqual$1 = createIsCircular(config.areArraysEqual);\n var areMapsEqual$1 = createIsCircular(config.areMapsEqual);\n var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);\n var areSetsEqual$1 = createIsCircular(config.areSetsEqual);\n config = assign({}, config, {\n areArraysEqual: areArraysEqual$1,\n areMapsEqual: areMapsEqual$1,\n areObjectsEqual: areObjectsEqual$1,\n areSetsEqual: areSetsEqual$1,\n });\n }\n return config;\n}\n/**\n * Default equality comparator pass-through, used as the standard `isEqual` creator for\n * use inside the built comparator.\n */\nfunction createInternalEqualityComparator(compare) {\n return function (a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {\n return compare(a, b, state);\n };\n}\n/**\n * Create the `isEqual` function used by the consuming application.\n */\nfunction createIsEqual(_a) {\n var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;\n if (createState) {\n return function isEqual(a, b) {\n var _a = createState(), _b = _a.cache, cache = _b === void 0 ? circular ? new WeakMap() : undefined : _b, meta = _a.meta;\n return comparator(a, b, {\n cache: cache,\n equals: equals,\n meta: meta,\n strict: strict,\n });\n };\n }\n if (circular) {\n return function isEqual(a, b) {\n return comparator(a, b, {\n cache: new WeakMap(),\n equals: equals,\n meta: undefined,\n strict: strict,\n });\n };\n }\n var state = {\n cache: undefined,\n equals: equals,\n meta: undefined,\n strict: strict,\n };\n return function isEqual(a, b) {\n return comparator(a, b, state);\n };\n}\n\n/**\n * Whether the items passed are deeply-equal in value.\n */\nvar deepEqual = createCustomEqual();\n/**\n * Whether the items passed are deeply-equal in value based on strict comparison.\n */\nvar strictDeepEqual = createCustomEqual({ strict: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references.\n */\nvar circularDeepEqual = createCustomEqual({ circular: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references,\n * based on strict comparison.\n */\nvar strictCircularDeepEqual = createCustomEqual({\n circular: true,\n strict: true,\n});\n/**\n * Whether the items passed are shallowly-equal in value.\n */\nvar shallowEqual = createCustomEqual({\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nvar strictShallowEqual = createCustomEqual({\n strict: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nvar circularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references,\n * based on strict comparison.\n */\nvar strictCircularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n strict: true,\n});\n/**\n * Create a custom equality comparison method.\n *\n * This can be done to create very targeted comparisons in extreme hot-path scenarios\n * where the standard methods are not performant enough, but can also be used to provide\n * support for legacy environments that do not support expected features like\n * `RegExp.prototype.flags` out of the box.\n */\nfunction createCustomEqual(options) {\n if (options === void 0) { options = {}; }\n var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b;\n var config = createEqualityComparatorConfig(options);\n var comparator = createEqualityComparator(config);\n var equals = createCustomInternalComparator\n ? createCustomInternalComparator(comparator)\n : createInternalEqualityComparator(comparator);\n return createIsEqual({ circular: circular, comparator: comparator, createState: createState, equals: equals, strict: strict });\n}\n\nexport { circularDeepEqual, circularShallowEqual, createCustomEqual, deepEqual, sameValueZeroEqual, shallowEqual, strictCircularDeepEqual, strictCircularShallowEqual, strictDeepEqual, strictShallowEqual };\n//# sourceMappingURL=index.mjs.map\n","// There is a circular version https://www.npmjs.com/package/fast-equals#circulardeepequal that I\n// think allows comparing React refs (which have circular references in particular places that this\n// library would ignore). Maybe we can change to that version sometime if needed.\nimport { deepEqual as isEqualDeep } from 'fast-equals';\n\n/**\n * Check that two objects are deeply equal, comparing members of each object and such\n *\n * @param a The first object to compare\n * @param b The second object to compare\n *\n * WARNING: Objects like arrays from different iframes have different constructor function\n * references even if they do the same thing, so this deep equality comparison fails objects that\n * look the same but have different constructors because different constructors could produce\n * false positives in [a few specific\n * situations](https://github.com/planttheidea/fast-equals/blob/a41afc0a240ad5a472e47b53791e9be017f52281/src/comparator.ts#L96).\n * This means that two objects like arrays from different iframes that look the same will fail\n * this check. Please use some other means to check deep equality in those situations.\n *\n * Note: This deep equality check considers `undefined` values on keys of objects NOT to be equal to\n * not specifying the key at all. For example, `{ stuff: 3, things: undefined }` and `{ stuff: 3\n * }` are not considered equal in this case\n *\n * - For more information and examples, see [this\n * CodeSandbox](https://codesandbox.io/s/deepequallibrarycomparison-4g4kk4?file=/src/index.mjs).\n *\n * @returns True if a and b are deeply equal; false otherwise\n */\nexport default function deepEqual(a: unknown, b: unknown) {\n return isEqualDeep(a, b);\n}\n","import deepEqual from './equality-checking';\n\n/**\n * Check if one object is a subset of the other object. \"Subset\" means that all properties of one\n * object are present in the other object, and if they are present that all values of those\n * properties are deeply equal. Sub-objects are also checked to be subsets of the corresponding\n * sub-object in the other object.\n *\n * @example ObjB is a subset of objA given these objects:\n *\n * ```ts\n * objA = { name: 'Alice', age: 30, address: { city: 'Seattle', state: 'Washington' } };\n * objB = { name: 'Alice', address: { city: 'Seattle' } };\n * ```\n *\n * It is important to note that only arrays of primitives (i.e., booleans, numbers, strings) are\n * supported. In particular, objects in arrays will not be checked for deep equality. Also, presence\n * in an array is all this checks, not the number of times that an item appears in an array. `[1,\n * 1]` is a subset of `[1]`.\n *\n * @param objectWithAllProperties Object to be checked if it is a superset of\n * `objectWithPartialProperties`\n * @param objectWithPartialProperties Object to be checked if it is a subset of\n * `objectWithAllProperties`\n * @returns True if `objectWithAllProperties` contains all the properties of\n * `objectWithPartialProperties` and all values of those properties are deeply equal\n */\nexport default function isSubset(\n objectWithAllProperties: unknown,\n objectWithPartialProperties: unknown,\n): boolean {\n if (typeof objectWithAllProperties !== typeof objectWithPartialProperties) return false;\n\n // For this function we're saying that all falsy things of the same type are equal to each other\n if (!objectWithAllProperties && !objectWithPartialProperties) return true;\n\n if (Array.isArray(objectWithAllProperties)) {\n // We know these are arrays from the line above\n /* eslint-disable no-type-assertion/no-type-assertion */\n const partialArray = objectWithPartialProperties as Array;\n const allArray = objectWithAllProperties as Array;\n /* eslint-enable no-type-assertion/no-type-assertion */\n\n if (partialArray.length === 0) return true;\n\n // This only works with arrays of primitives.\n // If someone cares about checking arrays of objects this needs updating.\n return partialArray.every((item) => allArray.includes(item));\n }\n\n if (typeof objectWithAllProperties !== 'object')\n return deepEqual(objectWithAllProperties, objectWithPartialProperties);\n\n // We know these are objects that potentially have properties because of the earlier checks\n /* eslint-disable no-type-assertion/no-type-assertion */\n const partialObj = objectWithPartialProperties as Record;\n const allObj = objectWithAllProperties as Record;\n /* eslint-enable no-type-assertion/no-type-assertion */\n\n let retVal = true;\n Object.keys(partialObj).forEach((key) => {\n if (!retVal) return;\n if (!Object.hasOwn(allObj, key)) retVal = false;\n else if (!isSubset(allObj[key], partialObj[key])) retVal = false;\n });\n return retVal;\n}\n","/**\n * Converts a JavaScript value to a JSON string, changing `undefined` properties in the JavaScript\n * object to `null` properties in the JSON string.\n *\n * WARNING: `null` values will become `undefined` values after passing through {@link serialize} then\n * {@link deserialize}. For example, `{ a: 1, b: undefined, c: null }` will become `{ a: 1, b:\n * undefined, c: undefined }`. If you are passing around user data that needs to retain `null`\n * values, you should wrap them yourself in a string before using this function. Alternatively, you\n * can write your own replacer that will preserve `null` in a way that you can recover later.\n *\n * @param value A JavaScript value, usually an object or array, to be converted.\n * @param replacer A function that transforms the results. Note that all `undefined` values returned\n * by the replacer will be further transformed into `null` in the JSON string.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON\n * text to make it easier to read. See the `space` parameter of `JSON.stringify` for more\n * details.\n */\nexport function serialize(\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string {\n const undefinedReplacer = (replacerKey: string, replacerValue: unknown) => {\n let newValue = replacerValue;\n if (replacer) newValue = replacer(replacerKey, newValue);\n // All `undefined` values become `null` on the way from JS objects into JSON strings\n // eslint-disable-next-line no-null/no-null\n if (newValue === undefined) newValue = null;\n return newValue;\n };\n return JSON.stringify(value, undefinedReplacer, space);\n}\n\n/**\n * Converts a JSON string into a value, converting all `null` properties from JSON into `undefined`\n * in the returned JavaScript value/object.\n *\n * WARNING: `null` values will become `undefined` values after passing through {@link serialize} then\n * {@link deserialize}. For example, `{ a: 1, b: undefined, c: null }` will become `{ a: 1, b:\n * undefined, c: undefined }`. If you are passing around user data that needs to retain `null`\n * values, you should wrap them yourself in a string before using this function. Alternatively, you\n * can write your own replacer that will preserve `null` in a way that you can recover later.\n *\n * @param value A valid JSON string.\n * @param reviver A function that transforms the results. This function is called for each member of\n * the object. If a member contains nested objects, the nested objects are transformed before the\n * parent object is. Note that `null` values are converted into `undefined` values after the\n * reviver has run.\n */\nexport function deserialize(\n value: string,\n reviver?: (this: unknown, key: string, value: unknown) => unknown,\n // Need to use `any` instead of `unknown` here to match the signature of JSON.parse\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // Helper function to replace `null` with `undefined` on a per property basis. This can't be done\n // with our own reviver because `JSON.parse` removes `undefined` properties from the return value.\n function replaceNull(obj: Record): Record {\n Object.keys(obj).forEach((key: string | number) => {\n // We only want to replace `null`, not other falsy values\n // eslint-disable-next-line no-null/no-null\n if (obj[key] === null) obj[key] = undefined;\n // If the property is an object, recursively call the helper function on it\n else if (typeof obj[key] === 'object')\n // Since the object came from a string, we know the keys will not be symbols\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n obj[key] = replaceNull(obj[key] as Record);\n });\n return obj;\n }\n\n const parsedObject = JSON.parse(value, reviver);\n // Explicitly convert the value 'null' that isn't stored as a property on an object to 'undefined'\n // eslint-disable-next-line no-null/no-null\n if (parsedObject === null) return undefined;\n if (typeof parsedObject === 'object') return replaceNull(parsedObject);\n return parsedObject;\n}\n\n/**\n * Check to see if the value is serializable without losing information\n *\n * @param value Value to test\n * @returns True if serializable; false otherwise\n *\n * Note: the values `undefined` and `null` are serializable (on their own or in an array), but\n * `null` values get transformed into `undefined` when serializing/deserializing.\n *\n * WARNING: This is inefficient right now as it stringifies, parses, stringifies, and === the value.\n * Please only use this if you need to\n *\n * DISCLAIMER: this does not successfully detect that values are not serializable in some cases:\n *\n * - Losses of removed properties like functions and `Map`s\n * - Class instances (not deserializable into class instances without special code)\n *\n * We intend to improve this in the future if it becomes important to do so. See [`JSON.stringify`\n * documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description)\n * for more information.\n */\nexport function isSerializable(value: unknown): boolean {\n try {\n const serializedValue = serialize(value);\n return serializedValue === serialize(deserialize(serializedValue));\n } catch (e) {\n return false;\n }\n}\n\n/**\n * HTML Encodes the provided string. Thanks to ChatGPT\n *\n * @param str String to HTML encode\n * @returns HTML-encoded string\n */\nexport const htmlEncode = (str: string): string =>\n str\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(/\\//g, '/');\n","import DateTimeFormat from './intl-date-time-format';\n\n/**\n * Retrieves the current locale of the user's environment.\n *\n * @returns A string representing the current locale. If the locale cannot be determined, the\n * function returns an empty string.\n */\nexport default function getCurrentLocale(): string {\n // Use navigator when available\n if (typeof navigator !== 'undefined' && navigator.languages) {\n return navigator.languages[0];\n }\n // For Node.js\n return new DateTimeFormat().resolvedOptions().locale;\n}\n","import NumberFormat from './intl-number-format';\n\n/**\n * Formats a number according to the locale and formatting options of this NumberFormat object\n *\n * @example FormatBytes(1024) => \"1 KB\"\n *\n * @example FormatBytes(1024, 0) => \"1 KB\"\n *\n * @param fileSize Number to format\n * @param decimals Number of decimal places to round to\n * @returns String representing the given number formatted according to the locale and formatting\n * options of this NumberFormat object\n */\nexport default function formatBytes(fileSize: number, decimals: number = 2): string {\n if (fileSize === 0) return '0 Bytes';\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n const i = Math.floor(Math.log(fileSize) / Math.log(1024));\n const sizeToUse = sizes[i];\n const formattingFileSize = new NumberFormat('en', {\n style: 'decimal',\n maximumFractionDigits: decimals,\n minimumFractionDigits: 0,\n }).format(fileSize / 1024 ** i);\n return `${formattingFileSize} ${sizeToUse}`;\n}\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { LocalizeKey, ReferencedItem } from 'menus.model';\n\n/** The data an extension provides to inform Platform.Bible of the settings it provides */\nexport type SettingsContribution = SettingsGroup | SettingsGroup[];\n/** A description of an extension's setting entry */\nexport type Setting = ExtensionControlledSetting;\n/** Setting definition that is validated by the extension. */\nexport type ExtensionControlledSetting = SettingBase & ModifierExtensionControlled;\n/** Base information needed to describe a setting entry */\nexport type SettingBase = StateBase & {\n [k: string]: unknown;\n /** LocalizeKey that displays in the settings dialog as the setting name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the settings dialog to describe the setting */\n description?: LocalizeKey;\n};\n/** The data an extension provides to inform Platform.Bible of the project settings it provides */\nexport type ProjectSettingsContribution = ProjectSettingsGroup | ProjectSettingsGroup[];\n/** A description of an extension's setting entry */\nexport type ProjectSetting = ExtensionControlledProjectSetting;\n/** Setting definition that is validated by the extension. */\nexport type ExtensionControlledProjectSetting = ProjectSettingBase & ModifierExtensionControlled;\n/** Base information needed to describe a project setting entry */\nexport type ProjectSettingBase = SettingBase & ModifierProject;\n/** A description of an extension's user state entry */\nexport type UserState = ExtensionControlledState;\n/** State definition that is validated by the extension. */\nexport type ExtensionControlledState = StateBase & ModifierExtensionControlled;\n/** Group of related settings definitions */\nexport interface SettingsGroup {\n [k: string]: unknown;\n /** LocalizeKey that displays in the settings dialog as the group name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the settings dialog to describe the group */\n description?: LocalizeKey;\n properties: SettingProperties;\n}\n/** Object whose keys are setting IDs and whose values are settings objects */\nexport interface SettingProperties {\n [k: ReferencedItem]: Setting;\n}\n/** Base information needed to describe a state entry */\nexport interface StateBase {\n [k: string]: unknown;\n /** Default value for the state/setting */\n default: unknown;\n /**\n * A state/setting ID whose value to set to this state/setting's starting value the first time\n * this state/setting is loaded\n */\n derivesFrom?: ReferencedItem;\n}\n/**\n * Modifies state/setting type to be extension-controlled. \"Extension-controlled\" means the\n * extension provides the component and the validator for the state/setting, so the state/setting is\n * controlled by the extension.\n */\nexport interface ModifierExtensionControlled {\n [k: string]: unknown;\n platformType?: undefined;\n type?: undefined;\n}\n/** Group of related settings definitions */\nexport interface ProjectSettingsGroup {\n [k: string]: unknown;\n /** LocalizeKey that displays in the project settings dialog as the group name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the project settings dialog to describe the group */\n description?: LocalizeKey;\n properties: ProjectSettingProperties;\n}\n/** Object whose keys are setting IDs and whose values are settings objects */\nexport interface ProjectSettingProperties {\n [k: ReferencedItem]: ProjectSetting;\n}\n\n// Note: we removed the index signature on ModifierProject to avoid having it on\n// `ProjectMetadataFilterOptions`. Unfortunately adding \"additionalProperties\": false on the json\n// schema messes up validation. Please remove the index signature again in the future if you\n// regenerate types\nexport interface ModifierProject {\n /**\n * String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s\n * (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if they should be included.\n *\n * If this is one string, it will be matched against `projectInterface`s. If this is an array,\n * each entry is handled based on its type (at least one entry must match for this filter\n * condition to pass):\n *\n * - If the entry is a string, it will be matched against each `projectInterface`. If any match, the\n * project will pass this filter condition\n * - If the entry is an array of strings, each will be matched against each `projectInterface`. If\n * every string matches against at least one `projectInterface`, the project will pass this\n * filter condition\n *\n * In other words, each entry in the first-level array is `OR`'ed together. Each entry in\n * second-level arrays (arrays within the first-level array) are `AND`'ed together.\n *\n * Defaults to all {@link ProjectInterfaces}, so all projects that do not match\n * `excludeProjectInterfaces` will be included\n *\n * @example\n *\n * ```typescript\n * includeProjectInterfaces: ['one', ['two', 'three']];\n * ```\n *\n * This filter condition will succeed on projects whose `projectInterface`s fulfill at least one\n * of the following conditions (At least one entry in the array must match):\n *\n * - Include `one`\n * - Include both `two` and `three`.\n */\n includeProjectInterfaces?: undefined | string | (string | string[])[];\n /**\n * String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s\n * (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if they should absolutely not be included even if they match with\n * `includeProjectInterfaces`.\n *\n * If this is one string, it will be matched against `projectInterface`s. If this is an array,\n * each entry is handled based on its type (at least one entry must match for this filter\n * condition to exclude the project):\n *\n * - If the entry is a string, it will be matched against each `projectInterface`. If any match, the\n * project will pass this filter condition and exclude the project\n * - If the entry is an array of strings, each will be matched against each `projectInterface`. If\n * every string matches against at least one `projectInterface`, the project will pass this\n * filter condition and exclude the project\n *\n * In other words, each entry in the first-level array is `OR`'ed together. Each entry in\n * second-level arrays (arrays within the first-level array) are `AND`'ed together.\n *\n * Defaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces`\n * will be included\n *\n * @example\n *\n * ```typescript\n * excludeProjectInterfaces: ['one', ['two', 'three']];\n * ```\n *\n * This filter condition will succeed and exclude projects whose `projectInterface`s fulfill at\n * least one of the following conditions (At least one entry in the array must match):\n *\n * - Include `one`\n * - Include both `two` and `three`.\n */\n excludeProjectInterfaces?: undefined | string | (string | string[])[];\n /**\n * String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory\n * Ids that provided each project's metadata (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if the projects should be included.\n *\n * Defaults to all Project Data Provider Factory Ids, so all projects that do not match\n * `excludePdpFactoryIds` will be included\n */\n includePdpFactoryIds?: undefined | string | string[];\n /**\n * String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory\n * Ids that provided each project's metadata (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if the projects should absolutely not be included even if they match\n * with `includeProjectInterfaces`.\n *\n * Defaults to none, so all projects that match `includePdpFactoryIds` will be included\n */\n excludePdpFactoryIds?: undefined | string | string[];\n}\n\n/** The data an extension provides to inform Platform.Bible of the user state it provides */\nexport interface UserStateContribution {\n [k: ReferencedItem]: UserState;\n}\n/** The data an extension provides to inform Platform.Bible of the project state it provides */\nexport interface ProjectStateContribution {\n [k: ReferencedItem]: UserState;\n}\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\nconst settingsDefs = {\n projectSettingsContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the project settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/projectSettingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/projectSettingsGroup',\n },\n },\n ],\n },\n projectSettingsGroup: {\n description: 'Group of related settings definitions',\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the project settings dialog as the group name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description:\n 'localizeKey that displays in the project settings dialog to describe the group',\n $ref: '#/$defs/localizeKey',\n },\n properties: {\n $ref: '#/$defs/projectSettingProperties',\n },\n },\n required: ['label', 'properties'],\n },\n projectSettingProperties: {\n description: 'Object whose keys are setting IDs and whose values are settings objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/projectSetting',\n },\n },\n additionalProperties: false,\n },\n projectSetting: {\n description: \"A description of an extension's setting entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledProjectSetting',\n },\n ],\n },\n extensionControlledProjectSetting: {\n description: 'Setting definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/projectSettingBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n projectSettingBase: {\n description: 'Base information needed to describe a project setting entry',\n allOf: [\n {\n $ref: '#/$defs/settingBase',\n },\n {\n $ref: '#/$defs/modifierProject',\n },\n ],\n },\n modifierProject: {\n description: 'Modifies setting type to be project setting',\n type: 'object',\n properties: {\n includeProjectInterfaces: {\n description:\n \"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should be included.\\n\\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to pass):\\n\\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition\\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition\\n\\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\\n\\nDefaults to all {@link ProjectInterfaces}, so all projects that do not match `excludeProjectInterfaces` will be included\\n\\n@example\\n\\n```typescript\\nincludeProjectInterfaces: ['one', ['two', 'three']];\\n```\\n\\nThis filter condition will succeed on projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\\n\\n- Include `one`\\n- Include both `two` and `three`.\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n ],\n },\n excludeProjectInterfaces: {\n description:\n \"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should absolutely not be included even if they match with `includeProjectInterfaces`.\\n\\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to exclude the project):\\n\\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition and exclude the project\\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition and exclude the project\\n\\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\\n\\nDefaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces` will be included\\n\\n@example\\n\\n```typescript\\nexcludeProjectInterfaces: ['one', ['two', 'three']];\\n```\\n\\nThis filter condition will succeed and exclude projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\\n\\n- Include `one`\\n- Include both `two` and `three`.\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n ],\n },\n includePdpFactoryIds: {\n description:\n \"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should be included.\\n\\nDefaults to all Project Data Provider Factory Ids, so all projects that do not match `excludePdpFactoryIds` will be included\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n excludePdpFactoryIds: {\n description:\n \"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should absolutely not be included even if they match with `includeProjectInterfaces`.\\n\\nDefaults to none, so all projects that match `includePdpFactoryIds` will be included\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n },\n settingsContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/settingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/settingsGroup',\n },\n },\n ],\n },\n settingsGroup: {\n description: 'Group of related settings definitions',\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the settings dialog as the group name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description: 'localizeKey that displays in the settings dialog to describe the group',\n $ref: '#/$defs/localizeKey',\n },\n properties: {\n $ref: '#/$defs/settingProperties',\n },\n },\n required: ['label', 'properties'],\n },\n settingProperties: {\n description: 'Object whose keys are setting IDs and whose values are settings objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w-]+\\\\.[\\\\w-]+$': {\n $ref: '#/$defs/setting',\n },\n },\n additionalProperties: false,\n },\n setting: {\n description: \"A description of an extension's setting entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledSetting',\n },\n ],\n },\n extensionControlledSetting: {\n description: 'Setting definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/settingBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n settingBase: {\n description: 'Base information needed to describe a setting entry',\n allOf: [\n {\n $ref: '#/$defs/stateBase',\n },\n {\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the settings dialog as the setting name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description: 'localizeKey that displays in the settings dialog to describe the setting',\n $ref: '#/$defs/localizeKey',\n },\n },\n required: ['label'],\n },\n ],\n },\n projectStateContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the project state it provides',\n $ref: '#/$defs/userStateProperties',\n },\n userStateContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the user state it provides',\n $ref: '#/$defs/userStateProperties',\n },\n userStateProperties: {\n description: 'Object whose keys are state IDs and whose values are state objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/userState',\n },\n },\n additionalProperties: false,\n },\n userState: {\n description: \"A description of an extension's user state entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledState',\n },\n ],\n },\n extensionControlledState: {\n description: 'State definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/stateBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n modifierExtensionControlled: {\n description:\n 'Modifies state/setting type to be extension-controlled. \"Extension-controlled\" means the extension provides the component and the validator for the state/setting, so the state/setting is controlled by the extension.',\n not: {\n anyOf: [\n {\n type: 'object',\n required: ['platformType'],\n },\n {\n type: 'object',\n required: ['type'],\n },\n ],\n },\n },\n stateBase: {\n description: 'Base information needed to describe a state entry',\n type: 'object',\n properties: {\n default: {\n description: 'default value for the state/setting',\n type: 'any',\n },\n derivesFrom: {\n description:\n \"a state/setting ID whose value to set to this state/setting's starting value the first time this state/setting is loaded\",\n $ref: '#/$defs/id',\n },\n },\n required: ['default'],\n },\n localizeKey: {\n description: \"Identifier for a string that will be localized based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n tsType: 'LocalizeKey',\n },\n id: {\n description: '',\n type: 'string',\n pattern: '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$',\n tsType: 'Id',\n },\n};\n\n/**\n * Json-schema-to-typescript has some added stuff that isn't actually compatible with JSON schema,\n * so we remove them here\n *\n * @param defs The `$defs` property of a JSON schema (will be modified in place)\n */\n// JSON schema types are weird, so we'll just be careful\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function removeJsonToTypeScriptTypesStuff(defs: any) {\n if (!defs) return;\n\n // JSON schema types are weird, so we'll just be careful\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Object.values(defs).forEach((def: any) => {\n if (!def.type) return;\n\n if ('tsType' in def) delete def.tsType;\n\n if (def.type === 'any') {\n delete def.type;\n return;\n }\n\n if (def.type === 'object') {\n removeJsonToTypeScriptTypesStuff(def.properties);\n }\n });\n}\n\nremoveJsonToTypeScriptTypesStuff(settingsDefs);\n\n/** JSON schema object that aligns with the ProjectSettingsContribution type */\nexport const projectSettingsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Project Settings Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the project settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/projectSettingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/projectSettingsGroup',\n },\n },\n ],\n\n $defs: settingsDefs,\n};\n\nObject.freeze(projectSettingsDocumentSchema);\n\n/** JSON schema object that aligns with the {@link SettingsContribution} type */\nexport const settingsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Settings Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/settingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/settingsGroup',\n },\n },\n ],\n\n $defs: settingsDefs,\n};\n\nObject.freeze(settingsDocumentSchema);\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { LocalizeKey } from 'menus.model';\nimport { removeJsonToTypeScriptTypesStuff } from './settings.model';\n\n/** Localized string value associated with this key */\nexport type LocalizedStringValue = string;\n\n/** The data an extension provides to inform Platform.Bible of the localized strings it provides. */\nexport interface LocalizedStringDataContribution {\n [k: string]: unknown;\n metadata?: StringsMetadata;\n localizedStrings?: {\n [k: string]: LanguageStrings;\n };\n}\n/**\n * Map whose keys are localized string keys and whose values provide additional non-locale-specific\n * information about the localized string key\n */\nexport interface StringsMetadata {\n [k: LocalizeKey]: StringMetadata;\n}\n/** Additional non-locale-specific information about a localized string key */\nexport interface StringMetadata {\n [k: string]: unknown;\n /**\n * Localized string key from which to get this value if one does not exist in the specified\n * language. If a new key/value pair needs to be made to replace an existing one, this could help\n * smooth over the transition if the meanings are close enough\n *\n * You can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a\n * backslash `\\`.\n */\n fallbackKey?: LocalizeKey;\n /**\n * Additional information provided by developers in English to help the translator to know how to\n * translate this localized string accurately\n */\n notes?: string;\n}\n/**\n * Map whose keys are localized string keys and whose values provide information about how to\n * localize strings for the localized string key\n */\nexport interface LanguageStrings {\n [k: LocalizeKey]: LocalizedStringValue;\n}\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\n\nconst localizedStringsDefs = {\n languageStrings: {\n description:\n 'Map whose keys are localized string keys and whose values provide information about how to localize strings for the localized string key',\n type: 'object',\n patternProperties: {\n '^%[\\\\w\\\\-\\\\.]+%$': {\n $ref: '#/$defs/localizedStringValue',\n },\n },\n additionalProperties: false,\n },\n localizedStringValue: {\n description: 'Localized string value associated with this key',\n type: 'string',\n },\n stringsMetadata: {\n description:\n 'Map whose keys are localized string keys and whose values provide additional non-locale-specific information about the localized string key',\n type: 'object',\n patternProperties: {\n '^%[\\\\w\\\\-\\\\.]+%$': {\n $ref: '#/$defs/stringMetadata',\n },\n },\n additionalProperties: false,\n },\n stringMetadata: {\n description: 'Additional non-locale-specific information about a localized string key',\n type: 'object',\n properties: {\n fallbackKey: {\n description:\n 'Localized string key from which to get this value if one does not exist in the specified language. If a new key/value pair needs to be made to replace an existing one, this could help smooth over the transition if the meanings are close enough.\\nYou can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a backslash `\\\\`.',\n type: 'string',\n pattern: \"^%[\\\\w\\\\-\\\\.;&,' (){}#:/\\\\\\\\?%⋮|[\\\\]“”‘’!~*\\u00A0+=•`…\\u200B↑↓]+%$\",\n tsType: 'LocalizeKey',\n },\n notes: {\n description:\n 'Additional information provided by developers in English to help the translator to know how to translate this localized string accurately',\n type: 'string',\n },\n },\n },\n localizeKey: {\n description: \"Identifier for a string that will be localized based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n tsType: 'LocalizeKey',\n },\n};\n\nremoveJsonToTypeScriptTypesStuff(localizedStringsDefs);\n\n/** JSON schema object that aligns with the LocalizedStringDataContribution type */\nexport const localizedStringsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Localized String Data Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the localized strings it provides.',\n type: 'object',\n properties: {\n metadata: {\n $ref: '#/$defs/stringsMetadata',\n },\n localizedStrings: {\n type: 'object',\n additionalProperties: {\n $ref: '#/$defs/languageStrings',\n },\n },\n },\n $defs: localizedStringsDefs,\n};\n\nObject.freeze(localizedStringsDocumentSchema);\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { ReplaceType } from './util';\n\n/** Identifier for a string that will be localized in a menu based on the user's UI language */\nexport type LocalizeKey = `%${string}%`;\n\n/** Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command) */\nexport type ReferencedItem = `${string}.${string}`;\n\nexport type OrderedItem = {\n /** Relative order of this item compared to other items in the same parent/scope (sorted ascending) */\n order: number;\n};\n\nexport type OrderedExtensibleContainer = OrderedItem & {\n /** Determines whether other items can be added to this after it has been defined */\n isExtensible?: boolean;\n};\n\n/** Group of menu items that belongs in a column */\nexport type MenuGroupDetailsInColumn = OrderedExtensibleContainer & {\n /** ID of column in which this group resides */\n column: ReferencedItem;\n};\n\n/** Group of menu items that belongs in a submenu */\nexport type MenuGroupDetailsInSubMenu = OrderedExtensibleContainer & {\n /** ID of menu item hosting the submenu in which this group resides */\n menuItem: ReferencedItem;\n};\n\n/** Column that includes header text in a menu */\nexport type MenuColumnWithHeader = OrderedExtensibleContainer & {\n /** Key that represents the text of the header text of the column */\n label: LocalizeKey;\n};\n\nexport type MenuItemBase = OrderedItem & {\n /** Menu group to which this menu item belongs */\n group: ReferencedItem;\n /** Key that represents the text of this menu item to display */\n label: LocalizeKey;\n /** Key that represents words the platform should reference when users are searching for menu items */\n searchTerms?: LocalizeKey;\n /** Key that represents the text to display if a mouse pointer hovers over the menu item */\n tooltip?: LocalizeKey;\n /** Additional information provided by developers to help people who perform localization */\n localizeNotes: string;\n};\n\n/** Menu item that hosts a submenu */\nexport type MenuItemContainingSubmenu = MenuItemBase & {\n /** ID for this menu item that holds a submenu */\n id: ReferencedItem;\n};\n\n/** Menu item that runs a command */\nexport type MenuItemContainingCommand = MenuItemBase & {\n /** Name of the PAPI command to run when this menu item is selected. */\n command: ReferencedItem;\n /** Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png` */\n iconPathAfter?: string;\n /** Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png` */\n iconPathBefore?: string;\n};\n\n/**\n * Group of menu items that can be combined with other groups to form a single context menu/submenu.\n * Groups are separated using a line within the menu/submenu.\n */\nexport type GroupsInSingleColumnMenu = {\n /** Named menu group */\n [property: ReferencedItem]: OrderedExtensibleContainer | MenuGroupDetailsInSubMenu;\n};\n\n/**\n * Group of menu items that can be combined with other groups to form a single menu/submenu within a\n * multi-column menu. Groups are separated using a line within the menu/submenu.\n */\nexport type GroupsInMultiColumnMenu = {\n /** Named menu group */\n [property: ReferencedItem]: MenuGroupDetailsInColumn | MenuGroupDetailsInSubMenu;\n};\n\n/** Group of columns that can be combined with other columns to form a multi-column menu */\nexport type ColumnsWithHeaders = {\n /** Named column of a menu */\n [property: ReferencedItem]: MenuColumnWithHeader;\n /** Defines whether columns can be added to this multi-column menu */\n isExtensible?: boolean;\n};\n\n/** Menu that contains a column without a header */\nexport type SingleColumnMenu = {\n /** Groups that belong in this menu */\n groups: GroupsInSingleColumnMenu;\n /** List of menu items that belong in this menu */\n items: (MenuItemContainingCommand | MenuItemContainingSubmenu)[];\n};\n\n/** Menu that contains multiple columns with headers */\nexport type MultiColumnMenu = {\n /** Columns that belong in this menu */\n columns: ColumnsWithHeaders;\n /** Groups that belong in this menu */\n groups: GroupsInMultiColumnMenu;\n /** List of menu items that belong in this menu */\n items: (MenuItemContainingCommand | MenuItemContainingSubmenu)[];\n};\n\n/** Menus for one single web view */\nexport type WebViewMenu = {\n /** Indicates whether the platform default menus should be included for this webview */\n includeDefaults: boolean | undefined;\n /** Menu that opens when you click on the top left corner of a tab */\n topMenu: MultiColumnMenu | undefined;\n /** Menu that opens when you right click on the main body/area of a tab */\n contextMenu: SingleColumnMenu | undefined;\n};\n\n/** Menus for all web views */\nexport type WebViewMenus = {\n /** Named web view */\n [property: ReferencedItem]: WebViewMenu;\n};\n\n/** Platform.Bible menus before they are localized */\nexport type PlatformMenus = {\n /** Top level menu for the application */\n mainMenu: MultiColumnMenu;\n /** Menus that apply per web view in the application */\n webViewMenus: WebViewMenus;\n /** Default context menu for web views that don't specify their own */\n defaultWebViewContextMenu: SingleColumnMenu;\n /** Default top menu for web views that don't specify their own */\n defaultWebViewTopMenu: MultiColumnMenu;\n};\n\n/**\n * Type that converts any menu type before it is localized to what it is after it is localized. This\n * can be applied to any menu type as needed.\n */\nexport type Localized = ReplaceType, ReferencedItem, string>;\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\n/** JSON schema object that aligns with the PlatformMenus type */\nexport const menuDocumentSchema = {\n title: 'Platform.Bible menus',\n type: 'object',\n properties: {\n mainMenu: {\n description: 'Top level menu for the application',\n $ref: '#/$defs/multiColumnMenu',\n },\n defaultWebViewTopMenu: {\n description: \"Default top menu for web views that don't specify their own\",\n $ref: '#/$defs/multiColumnMenu',\n },\n defaultWebViewContextMenu: {\n description: \"Default context menu for web views that don't specify their own\",\n $ref: '#/$defs/singleColumnMenu',\n },\n webViewMenus: {\n description: 'Menus that apply per web view in the application',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/menusForOneWebView',\n },\n },\n additionalProperties: false,\n },\n },\n required: ['mainMenu', 'defaultWebViewTopMenu', 'defaultWebViewContextMenu', 'webViewMenus'],\n additionalProperties: false,\n $defs: {\n localizeKey: {\n description:\n \"Identifier for a string that will be localized in a menu based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n },\n referencedItem: {\n description:\n 'Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command)',\n type: 'string',\n pattern: '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$',\n },\n columnsWithHeaders: {\n description:\n 'Group of columns that can be combined with other columns to form a multi-column menu',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n description: 'Single column with a header string',\n type: 'object',\n properties: {\n label: {\n description: 'Header text for this this column in the UI',\n $ref: '#/$defs/localizeKey',\n },\n localizeNotes: {\n description:\n 'Additional information provided by developers to help people who perform localization',\n type: 'string',\n },\n order: {\n description:\n 'Relative order of this column compared to other columns (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu groups to this column',\n type: 'boolean',\n },\n },\n required: ['label', 'order'],\n additionalProperties: false,\n },\n },\n properties: {\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add columns to this multi-column menu',\n type: 'boolean',\n },\n },\n },\n menuGroups: {\n description:\n 'Group of menu items that can be combined with other groups to form a single menu/submenu. Groups are separated using a line within the menu/submenu.',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n description: 'Single group that contains menu items',\n type: 'object',\n oneOf: [\n {\n properties: {\n column: {\n description:\n 'Column where this group belongs, not required for single column menus',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this group compared to other groups in the same column or submenu (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu items to this menu group',\n type: 'boolean',\n },\n },\n required: ['order'],\n additionalProperties: false,\n },\n {\n properties: {\n menuItem: {\n description: 'Menu item that anchors the submenu where this group belongs',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this group compared to other groups in the same column or submenu (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu items to this menu group',\n type: 'boolean',\n },\n },\n required: ['menuItem', 'order'],\n additionalProperties: false,\n },\n ],\n },\n },\n additionalProperties: false,\n },\n menuItem: {\n description:\n 'Single item in a menu that can be clicked on to take an action or can be the parent of a submenu',\n type: 'object',\n oneOf: [\n {\n properties: {\n id: {\n description: 'ID for this menu item that holds a submenu',\n $ref: '#/$defs/referencedItem',\n },\n },\n required: ['id'],\n },\n {\n properties: {\n command: {\n description: 'Name of the PAPI command to run when this menu item is selected.',\n $ref: '#/$defs/referencedItem',\n },\n iconPathBefore: {\n description: 'Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`',\n type: 'string',\n },\n iconPathAfter: {\n description: 'Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`',\n type: 'string',\n },\n },\n required: ['command'],\n },\n ],\n properties: {\n label: {\n description: 'Key that represents the text of this menu item to display',\n $ref: '#/$defs/localizeKey',\n },\n tooltip: {\n description:\n 'Key that represents the text to display if a mouse pointer hovers over the menu item',\n $ref: '#/$defs/localizeKey',\n },\n searchTerms: {\n description:\n 'Key that represents additional words the platform should reference when users are searching for menu items',\n $ref: '#/$defs/localizeKey',\n },\n localizeNotes: {\n description:\n 'Additional information provided by developers to help people who perform localization',\n type: 'string',\n },\n group: {\n description: 'Group to which this menu item belongs',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this menu item compared to other menu items in the same group (sorted ascending)',\n type: 'number',\n },\n },\n required: ['label', 'group', 'order'],\n unevaluatedProperties: false,\n },\n groupsAndItems: {\n description: 'Core schema for a column',\n type: 'object',\n properties: {\n groups: {\n description: 'Groups that belong in this menu',\n $ref: '#/$defs/menuGroups',\n },\n items: {\n description: 'List of menu items that belong in this menu',\n type: 'array',\n items: { $ref: '#/$defs/menuItem' },\n uniqueItems: true,\n },\n },\n required: ['groups', 'items'],\n },\n singleColumnMenu: {\n description: 'Menu that contains a column without a header',\n type: 'object',\n allOf: [{ $ref: '#/$defs/groupsAndItems' }],\n unevaluatedProperties: false,\n },\n multiColumnMenu: {\n description: 'Menu that can contain multiple columns with headers',\n type: 'object',\n allOf: [\n { $ref: '#/$defs/groupsAndItems' },\n {\n properties: {\n columns: {\n description: 'Columns that belong in this menu',\n $ref: '#/$defs/columnsWithHeaders',\n },\n },\n required: ['columns'],\n },\n ],\n unevaluatedProperties: false,\n },\n menusForOneWebView: {\n description: 'Set of menus that are associated with a single tab',\n type: 'object',\n properties: {\n includeDefaults: {\n description:\n 'Indicates whether the platform default menus should be included for this webview',\n type: 'boolean',\n },\n topMenu: {\n description: 'Menu that opens when you click on the top left corner of a tab',\n $ref: '#/$defs/multiColumnMenu',\n },\n contextMenu: {\n description: 'Menu that opens when you right click on the main body/area of a tab',\n $ref: '#/$defs/singleColumnMenu',\n },\n },\n additionalProperties: false,\n },\n },\n};\n\nObject.freeze(menuDocumentSchema);\n"],"names":["AsyncVariable","variableName","rejectIfNotSettledWithinMS","__publicField","resolve","reject","value","throwIfAlreadySettled","reason","Collator","locales","options","string1","string2","DateTimeFormat","date","startDate","endDate","PlatformEventEmitter","event","callback","callbackIndex","newGuid","s","isString","o","deepClone","obj","debounce","fn","delay","timeout","args","groupBy","items","keySelector","valueSelector","map","item","key","group","isErrorWithMessage","error","toErrorWithMessage","maybeError","getErrorMessage","wait","ms","waitForDuration","maxWaitTimeInMS","getAllObjectFunctionNames","_objId","objectFunctionNames","property","objectPrototype","createSyncProxyForAsyncObject","getObject","objectToProxy","target","prop","DocumentCombiner","baseDocument","documentName","document","previousDocumentVersion","documentToSet","contributions","contributionName","potentialOutput","outputIteration","contribution","mergeObjects","output","finalOutput","areNonArrayObjects","values","allMatch","areArrayObjects","startingPoint","copyFrom","ignoreDuplicateProperties","retVal","mergeObjectsInternal","startingPointObj","copyFromObj","Mutex","AsyncMutex","MutexMap","mutexID","NonValidatingDocumentCombiner","NumberFormat","startRange","endRange","UnsubscriberAsyncList","name","unsubscribers","unsubscriber","unsubs","results","unsubscriberSucceeded","index","P","R","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","r","D","i","a","u","v","f","d","b","p","J","M","charRegex","astralRange","comboMarksRange","comboHalfMarksRange","comboSymbolsRange","comboMarksExtendedRange","comboMarksSupplementRange","comboRange","varRange","familyRange","astral","combo","fitz","modifier","nonAstral","regional","surrogatePair","zwj","blackFlag","family","optModifier","optVar","optJoin","seq","symbol","__importDefault","this","mod","dist","char_regex_1","require$$0","toArray","str","toArray_1","length","match","length_1","substring","begin","end","substring_1","substr","len","strLength","substr_1","limit","padString","padPosition","padRepeats","limit_1","indexOf","searchStr","pos","strArr","searchArr","finded","searchIndex","indexOf_1","at","string","stringLength","charAt","codePointAt","endsWith","searchString","endPosition","lastIndexOfSearchString","lastIndexOf","indexOfClosestClosingCurlyBrace","escaped","closeCurlyBraceIndex","formatReplacementString","replacers","updatedStr","replacerKey","replacerString","includes","position","partialString","stringzIndexOf","validatedPosition","stringzLength","normalize","form","upperCaseForm","ordinalCompare","padEnd","targetLength","stringzLimit","padStart","correctSliceIndex","slice","indexStart","indexEnd","newStart","newEnd","split","separator","splitLimit","result","regexSeparator","matches","currentIndex","matchIndex","matchLength","startsWith","stringzSubstr","stringzSubstring","stringzToArray","isLocalizeKey","escapeStringRegexp","scrBookData","FIRST_SCR_BOOK_NUM","LAST_SCR_BOOK_NUM","FIRST_SCR_CHAPTER_NUM","FIRST_SCR_VERSE_NUM","getChaptersForBook","bookNum","_a","offsetBook","scrRef","offset","offsetChapter","offsetVerse","getLocalizedIdFromBookNumber","bookNumber","localizationLanguage","getLocalizedString","id","Canon","bookName","parts","scrRefToBBBCCCVVV","VerseRef","compareScrRefs","scrRef1","scrRef2","formatScrRef","optionOrLocalizedBookName","chapterVerseSeparator","bookChapterSeparator","book","aggregateUnsubscribers","success","aggregateUnsubscriberAsyncs","unsubPromises","getOwnPropertyNames","getOwnPropertySymbols","hasOwnProperty","combineComparators","comparatorA","comparatorB","state","createIsCircular","areItemsEqual","cache","cachedA","cachedB","getStrictProperties","object","hasOwn","sameValueZeroEqual","OWNER","getOwnPropertyDescriptor","keys","areArraysEqual","areDatesEqual","areMapsEqual","matchedIndices","aIterable","aResult","bResult","bIterable","hasMatch","aKey","aValue","_b","bKey","bValue","areObjectsEqual","properties","areObjectsEqualStrict","descriptorA","descriptorB","arePrimitiveWrappersEqual","areRegExpsEqual","areSetsEqual","areTypedArraysEqual","ARGUMENTS_TAG","BOOLEAN_TAG","DATE_TAG","MAP_TAG","NUMBER_TAG","OBJECT_TAG","REG_EXP_TAG","SET_TAG","STRING_TAG","isArray","isTypedArray","assign","getTag","createEqualityComparator","constructor","tag","createEqualityComparatorConfig","circular","createCustomConfig","strict","config","areArraysEqual$1","areMapsEqual$1","areObjectsEqual$1","areSetsEqual$1","createInternalEqualityComparator","compare","_indexOrKeyA","_indexOrKeyB","_parentA","_parentB","createIsEqual","comparator","createState","equals","meta","deepEqual","createCustomEqual","createCustomInternalComparator","isEqualDeep","isSubset","objectWithAllProperties","objectWithPartialProperties","partialArray","allArray","partialObj","allObj","serialize","replacer","space","replacerValue","newValue","deserialize","reviver","replaceNull","parsedObject","isSerializable","serializedValue","htmlEncode","getCurrentLocale","formatBytes","fileSize","decimals","sizes","sizeToUse","settingsDefs","removeJsonToTypeScriptTypesStuff","defs","def","projectSettingsDocumentSchema","settingsDocumentSchema","localizedStringsDefs","localizedStringsDocumentSchema","menuDocumentSchema"],"mappings":"4RACA,MAAqBA,EAAiB,CAcpC,YAAYC,EAAsBC,EAAqC,IAAO,CAb7DC,EAAA,qBACAA,EAAA,uBACTA,EAAA,iBACAA,EAAA,iBAWN,KAAK,aAAeF,EACpB,KAAK,eAAiB,IAAI,QAAW,CAACG,EAASC,IAAW,CACxD,KAAK,SAAWD,EAChB,KAAK,SAAWC,CAAA,CACjB,EACGH,EAA6B,GAC/B,WAAW,IAAM,CACX,KAAK,WACP,KAAK,SAAS,oCAAoC,KAAK,YAAY,YAAY,EAC/E,KAAK,SAAS,IAEfA,CAA0B,EAE/B,OAAO,KAAK,IAAI,CAClB,CAQA,IAAI,SAAsB,CACxB,OAAO,KAAK,cACd,CAOA,IAAI,YAAsB,CACjB,OAAA,OAAO,SAAS,IAAI,CAC7B,CASA,eAAeI,EAAUC,EAAiC,GAAa,CACrE,GAAI,KAAK,SACP,QAAQ,MAAM,GAAG,KAAK,YAAY,wBAAwB,EAC1D,KAAK,SAASD,CAAK,EACnB,KAAK,SAAS,MACT,CACD,GAAAC,EAAuB,MAAM,MAAM,GAAG,KAAK,YAAY,sBAAsB,EACjF,QAAQ,MAAM,qCAAqC,KAAK,YAAY,EAAE,CACxE,CACF,CASA,iBAAiBC,EAAgBD,EAAiC,GAAa,CAC7E,GAAI,KAAK,SACP,QAAQ,MAAM,GAAG,KAAK,YAAY,wBAAwB,EAC1D,KAAK,SAASC,CAAM,EACpB,KAAK,SAAS,MACT,CACD,GAAAD,EAAuB,MAAM,MAAM,GAAG,KAAK,YAAY,sBAAsB,EACjF,QAAQ,MAAM,oCAAoC,KAAK,YAAY,EAAE,CACvE,CACF,CAGQ,UAAiB,CACvB,KAAK,SAAW,OAChB,KAAK,SAAW,OAChB,OAAO,OAAO,IAAI,CACpB,CACF,CC5FA,MAAqBE,EAAS,CAG5B,YAAYC,EAA6BC,EAAg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C,EAAS,CAAC,GAAG,KAAK,aAAa,EAAE,IAAKD,GAAiBA,EAAA,CAAc,EACrEE,EAAU,MAAM,QAAQ,IAAID,CAAM,EACxC,YAAK,cAAc,QACZC,EAAQ,MAAM,CAACC,EAAuBC,KACtCD,GACH,QAAQ,MAAM,yBAAyB,KAAK,IAAI,2BAA2BC,CAAK,UAAU,EAErFD,EACR,CACH,CACF,CCrCA,IAAIE,GAAI,OAAO,eACXC,GAAI,CAAC,EAAG,EAAG/E,IAAM,KAAK,EAAI8E,GAAE,EAAG,EAAG,CAAE,WAAY,GAAI,aAAc,GAAI,SAAU,GAAI,MAAO9E,CAAC,CAAE,EAAI,EAAE,CAAC,EAAIA,EACzGgF,EAAI,CAAC,EAAG,EAAGhF,IAAM+E,GAAE,EAAG,OAAO,GAAK,SAAW,EAAI,GAAK,EAAG/E,CAAC,EAW9D,MAAMiF,EAAI,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,EAAI,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,EAAE,EAAG,EAAI,GAAI,CACpB,OAAO,IAAM,EAAI,EAAE,YAAa,GAAG,KAAKF,GAAIA,GAAE,CAAC,EAAI,CACrD,CACA,SAASG,EAAE,EAAG,CACZ,OAAOD,EAAE,CAAC,EAAI,CAChB,CACA,SAASE,GAAE,EAAG,CACZ,MAAM,EAAI,OAAO,GAAK,SAAWF,EAAE,CAAC,EAAI,EACxC,OAAO,GAAK,IAAM,GAAK,EACzB,CACA,SAASG,GAAE,EAAG,CACZ,OAAQ,OAAO,GAAK,SAAWH,EAAE,CAAC,EAAI,IAAM,EAC9C,CACA,SAASI,GAAE,EAAG,CACZ,OAAO,GAAK,EACd,CACA,SAASC,GAAE,EAAG,CACZ,MAAM,EAAI,OAAO,GAAK,SAAWL,EAAE,CAAC,EAAI,EACxC,OAAOM,GAAE,CAAC,GAAK,CAAC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R,EACA,CACE,KAAM,qCACR,CACF,CACF,EACA,mBAAoB,CAClB,YAAa,8DACb,MAAO,CACL,CACE,KAAM,qBACR,EACA,CACE,KAAM,yBACR,CACF,CACF,EACA,gBAAiB,CACf,YAAa,8CACb,KAAM,SACN,WAAY,CACV,yBAA0B,CACxB,YACE,q4CACF,MAAO,CACL,CACE,KAAM,MACR,EACA,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CACL,MAAO,CACL,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CAAE,KAAM,QAAS,CAC1B,CACF,CACF,CACF,CACF,CACF,EACA,yBAA0B,CACxB,YACE,ugDACF,MAAO,CACL,CACE,KAAM,MACR,EACA,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CACL,MAAO,CACL,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CAAE,KAAM,QAAS,CAC1B,CACF,CACF,CACF,CACF,CACF,EACA,qBAAsB,CACpB,YACE,ybACF,MAAO,CACL,CACE,KAAM,MACR,EACA,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CAAE,KAAM,QAAS,CAC1B,CACF,CACF,EACA,qBAAsB,CACpB,YACE,mdACF,MAAO,CACL,CACE,KAAM,MACR,EACA,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CAAE,KAAM,QAAS,CAC1B,CACF,CACF,CACF,CACF,EACA,qBAAsB,CACpB,YACE,sFACF,MAAO,CACL,CACE,KAAM,uBACR,EACA,CACE,KAAM,QACN,MAAO,CACL,KAAM,uBACR,CACF,CACF,CACF,EACA,cAAe,CACb,YAAa,wCACb,KAAM,SACN,WAAY,CACV,MAAO,CACL,YAAa,qEACb,KAAM,qBACR,EACA,YAAa,CACX,YAAa,yEACb,KAAM,qBACR,EACA,WAAY,CACV,KAAM,2BACR,CACF,EACA,SAAU,CAAC,QAAS,YAAY,CAClC,EACA,kBAAmB,CACjB,YAAa,0EACb,KAAM,SACN,kBAAmB,CACjB,sBAAuB,CACrB,KAAM,iBACR,CACF,EACA,qBAAsB,EACxB,EACA,QAAS,CACP,YAAa,gDACb,MAAO,CACL,CACE,KAAM,oCACR,CACF,CACF,EACA,2BAA4B,CAC1B,YAAa,yDACb,MAAO,CACL,CACE,KAAM,qBACR,EACA,CACE,KAAM,qCACR,CACF,CACF,EACA,YAAa,CACX,YAAa,sDACb,MAAO,CACL,CACE,KAAM,mBACR,EACA,CACE,KAAM,SACN,WAAY,CACV,MAAO,CACL,YAAa,uEACb,KAAM,qBACR,EACA,YAAa,CACX,YAAa,2EACb,KAAM,qBACR,CACF,EACA,SAAU,CAAC,OAAO,CACpB,CACF,CACF,EACA,yBAA0B,CACxB,YACE,2FACF,KAAM,6BACR,EACA,sBAAuB,CACrB,YACE,wFACF,KAAM,6BACR,EACA,oBAAqB,CACnB,YAAa,qEACb,KAAM,SACN,kBAAmB,CACjB,0BAA2B,CACzB,KAAM,mBACR,CACF,EACA,qBAAsB,EACxB,EACA,UAAW,CACT,YAAa,mDACb,MAAO,CACL,CACE,KAAM,kCACR,CACF,CACF,EACA,yBAA0B,CACxB,YAAa,uDACb,MAAO,CACL,CACE,KAAM,mBACR,EACA,CACE,KAAM,qCACR,CACF,CACF,EACA,4BAA6B,CAC3B,YACE,0NACF,IAAK,CACH,MAAO,CACL,CACE,KAAM,SACN,SAAU,CAAC,cAAc,CAC3B,EACA,CACE,KAAM,SACN,SAAU,CAAC,MAAM,CACnB,CACF,CACF,CACF,EACA,UAAW,CACT,YAAa,oDACb,KAAM,SACN,WAAY,CACV,QAAS,CACP,YAAa,sCACb,KAAM,KACR,EACA,YAAa,CACX,YACE,2HACF,KAAM,YACR,CACF,EACA,SAAU,CAAC,SAAS,CACtB,EACA,YAAa,CACX,YAAa,iFACb,KAAM,SACN,QAAS,mBACT,OAAQ,aACV,EACA,GAAI,CACF,YAAa,GACb,KAAM,SACN,QAAS,0BACT,OAAQ,IACV,CACF,EAUO,SAASC,EAAiCC,EAAW,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AAU,CACR,KAAM,yBACR,EACA,iBAAkB,CAChB,KAAM,SACN,qBAAsB,CACpB,KAAM,yBACR,CACF,CACF,EACA,MAAOD,EACT,EAEA,OAAO,OAAOC,EAA8B,ECoBrC,MAAMC,GAAqB,CAChC,MAAO,uBACP,KAAM,SACN,WAAY,CACV,SAAU,CACR,YAAa,qCACb,KAAM,yBACR,EACA,sBAAuB,CACrB,YAAa,8DACb,KAAM,yBACR,EACA,0BAA2B,CACzB,YAAa,kEACb,KAAM,0BACR,EACA,aAAc,CACZ,YAAa,mDACb,KAAM,SACN,kBAAmB,CACjB,0BAA2B,CACzB,KAAM,4BACR,CACF,EACA,qBAAsB,EACxB,CACF,EACA,SAAU,CAAC,WAAY,wBAAyB,4BAA6B,cAAc,EAC3F,qBAAsB,GACtB,MAAO,CACL,YAAa,CACX,YACE,2FACF,KAAM,SACN,QAAS,kBACX,EACA,eAAgB,CACd,YACE,oGACF,KAAM,SACN,QAAS,yBACX,EACA,mBAAoB,CAClB,YACE,uFACF,KAAM,SACN,kBAAmB,CACjB,0BAA2B,CACzB,YAAa,qCACb,KAAM,SACN,WAAY,CACV,MAAO,CACL,YAAa,6CACb,KAAM,qBACR,EACA,cAAe,CACb,YACE,wFACF,KAAM,QACR,EACA,MAAO,CACL,YACE,6EACF,KAAM,QACR,EACA,aAAc,CACZ,YACE,8EACF,KAAM,SACR,CACF,EACA,SAAU,CAAC,QAAS,OAAO,EAC3B,qBAAsB,EACxB,CACF,EACA,WAAY,CACV,aAAc,CACZ,YACE,qFACF,KAAM,SACR,CACF,CACF,EACA,WAAY,CACV,YACE,uJACF,KAAM,SACN,kBAAmB,CACjB,0BAA2B,CACzB,YAAa,wCACb,KAAM,SACN,MAAO,CACL,CACE,WAAY,CACV,OAAQ,CACN,YACE,wEACF,KAAM,wBACR,EACA,MAAO,CACL,YACE,yGACF,KAAM,QACR,EACA,aAAc,CACZ,YACE,iFACF,KAAM,SACR,CACF,EACA,SAAU,CAAC,OAAO,EAClB,qBAAsB,EACxB,EACA,CACE,WAAY,CACV,SAAU,CACR,YAAa,8DACb,KAAM,wBACR,EACA,MAAO,CACL,YACE,yGACF,KAAM,QACR,EACA,aAAc,CACZ,YACE,iFACF,KAAM,SACR,CACF,EACA,SAAU,CAAC,WAAY,OAAO,EAC9B,qBAAsB,EACxB,CACF,CACF,CACF,EACA,qBAAsB,EACxB,EACA,SAAU,CACR,YACE,mGACF,KAAM,SACN,MAAO,CACL,CACE,WAAY,CACV,GAAI,CACF,YAAa,6CACb,KAAM,wBACR,CACF,EACA,SAAU,CAAC,IAAI,CACjB,EACA,CACE,WAAY,CACV,QAAS,CACP,YAAa,mEACb,KAAM,wBACR,EACA,eAAgB,CACd,YAAa,0GACb,KAAM,QACR,EACA,cAAe,CACb,YAAa,yGACb,KAAM,QACR,CACF,EACA,SAAU,CAAC,SAAS,CACtB,CACF,EACA,WAAY,CACV,MAAO,CACL,YAAa,4DACb,KAAM,qBACR,EACA,QAAS,CACP,YACE,uFACF,KAAM,qBACR,EACA,YAAa,CACX,YACE,6GACF,KAAM,qBACR,EACA,cAAe,CACb,YACE,wFACF,KAAM,QACR,EACA,MAAO,CACL,YAAa,wCACb,KAAM,wBACR,EACA,MAAO,CACL,YACE,qGACF,KAAM,QACR,CACF,EACA,SAAU,CAAC,QAAS,QAAS,OAAO,EACpC,sBAAuB,EACzB,EACA,eAAgB,CACd,YAAa,2BACb,KAAM,SACN,WAAY,CACV,OAAQ,CACN,YAAa,kCACb,KAAM,oBACR,EACA,MAAO,CACL,YAAa,8CACb,KAAM,QACN,MAAO,CAAE,KAAM,kBAAmB,EAClC,YAAa,EACf,CACF,EACA,SAAU,CAAC,SAAU,OAAO,CAC9B,EACA,iBAAkB,CAChB,YAAa,+CACb,KAAM,SACN,MAAO,CAAC,CAAE,KAAM,yBAA0B,EAC1C,sBAAuB,EACzB,EACA,gBAAiB,CACf,YAAa,sDACb,KAAM,SACN,MAAO,CACL,CAAE,KAAM,wBAAyB,EACjC,CACE,WAAY,CACV,QAAS,CACP,YAAa,mCACb,KAAM,4BACR,CACF,EACA,SAAU,CAAC,SAAS,CACtB,CACF,EACA,sBAAuB,EACzB,EACA,mBAAoB,CAClB,YAAa,qDACb,KAAM,SACN,WAAY,CACV,gBAAiB,CACf,YACE,mFACF,KAAM,SACR,EACA,QAAS,CACP,YAAa,iEACb,KAAM,yBACR,EACA,YAAa,CACX,YAAa,sEACb,KAAM,0BACR,CACF,EACA,qBAAsB,EACxB,CACF,CACF,EAEA,OAAO,OAAOA,EAAkB","x_google_ignoreList":[11,12,13,17]} \ No newline at end of file +{"version":3,"file":"index.cjs","sources":["../src/async-variable.ts","../src/intl-collator.ts","../src/intl-date-time-format.ts","../src/platform-event-emitter.model.ts","../src/util.ts","../src/document-combiner.ts","../src/mutex.ts","../src/mutex-map.ts","../src/non-validating-document-combiner.ts","../src/intl-number-format.ts","../src/unsubscriber-async-list.ts","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../../../node_modules/char-regex/index.js","../../../node_modules/stringz/dist/index.js","../src/array-util.ts","../src/string-util.ts","../src/scripture-util.ts","../src/unsubscriber.ts","../../../node_modules/fast-equals/dist/esm/index.mjs","../src/equality-checking.ts","../src/subset-checking.ts","../src/serialization.ts","../src/intl-util.ts","../src/number-utils.ts","../src/settings.model.ts","../src/localized-strings.model.ts","../src/menus.model.ts"],"sourcesContent":["/** This class provides a convenient way for one task to wait on a variable that another task sets. */\nexport default class AsyncVariable {\n private readonly variableName: string;\n private readonly promiseToValue: Promise;\n private resolver: ((value: T) => void) | undefined;\n private rejecter: ((reason: string | undefined) => void) | undefined;\n\n /**\n * Creates an instance of the class\n *\n * @param variableName Name to use when logging about this variable\n * @param rejectIfNotSettledWithinMS Milliseconds to wait before verifying if the promise was\n * settled (resolved or rejected); will reject if it has not settled by that time. Use -1 if you\n * do not want a timeout at all. Defaults to 10000 ms\n */\n constructor(variableName: string, rejectIfNotSettledWithinMS: number = 10000) {\n this.variableName = variableName;\n this.promiseToValue = new Promise((resolve, reject) => {\n this.resolver = resolve;\n this.rejecter = reject;\n });\n if (rejectIfNotSettledWithinMS > 0) {\n setTimeout(() => {\n if (this.rejecter) {\n this.rejecter(`Timeout reached when waiting for ${this.variableName} to settle`);\n this.complete();\n }\n }, rejectIfNotSettledWithinMS);\n }\n Object.seal(this);\n }\n\n /**\n * Get this variable's promise to a value. This always returns the same promise even after the\n * value has been resolved or rejected.\n *\n * @returns The promise for the value to be set\n */\n get promise(): Promise {\n return this.promiseToValue;\n }\n\n /**\n * A simple way to see if this variable's promise was resolved or rejected already\n *\n * @returns Whether the variable was already resolved or rejected\n */\n get hasSettled(): boolean {\n return Object.isFrozen(this);\n }\n\n /**\n * Resolve this variable's promise to the given value\n *\n * @param value This variable's promise will resolve to this value\n * @param throwIfAlreadySettled Determines whether to throw if the variable was already resolved\n * or rejected. Defaults to `false`\n */\n resolveToValue(value: T, throwIfAlreadySettled: boolean = false): void {\n if (this.resolver) {\n console.debug(`${this.variableName} is being resolved now`);\n this.resolver(value);\n this.complete();\n } else {\n if (throwIfAlreadySettled) throw Error(`${this.variableName} was already settled`);\n console.debug(`Ignoring subsequent resolution of ${this.variableName}`);\n }\n }\n\n /**\n * Reject this variable's promise for the value with the given reason\n *\n * @param reason This variable's promise will be rejected with this reason\n * @param throwIfAlreadySettled Determines whether to throw if the variable was already resolved\n * or rejected. Defaults to `false`\n */\n rejectWithReason(reason: string, throwIfAlreadySettled: boolean = false): void {\n if (this.rejecter) {\n console.debug(`${this.variableName} is being rejected now`);\n this.rejecter(reason);\n this.complete();\n } else {\n if (throwIfAlreadySettled) throw Error(`${this.variableName} was already settled`);\n console.debug(`Ignoring subsequent rejection of ${this.variableName}`);\n }\n }\n\n /** Prevent any further updates to this variable */\n private complete(): void {\n this.resolver = undefined;\n this.rejecter = undefined;\n Object.freeze(this);\n }\n}\n","/** Enables language-sensitive string comparison. Wraps Intl.Collator */\nexport default class Collator {\n private collator: Intl.Collator;\n\n constructor(locales?: string | string[], options?: Intl.CollatorOptions) {\n this.collator = new Intl.Collator(locales, options);\n }\n\n /**\n * Compares two strings according to the sort order of this Collator object\n *\n * @param string1 String to compare\n * @param string2 String to compare\n * @returns A number indicating how string1 and string2 compare to each other according to the\n * sort order of this Collator object. Negative value if string1 comes before string2. Positive\n * value if string1 comes after string2. 0 if they are considered equal.\n */\n compare(string1: string, string2: string): number {\n return this.collator.compare(string1, string2);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and collation options computed\n * during initialization of this collator object.\n *\n * @returns ResolvedCollatorOptions object\n */\n resolvedOptions(): Intl.ResolvedCollatorOptions {\n return this.collator.resolvedOptions();\n }\n}\n","/** Enables language-sensitive data and time formatting. Wraps Intl.DateTimeFormat */\nexport default class DateTimeFormat {\n private dateTimeFormatter: Intl.DateTimeFormat;\n\n constructor(locales?: string | string[], options?: Intl.DateTimeFormatOptions) {\n this.dateTimeFormatter = new Intl.DateTimeFormat(locales, options);\n }\n\n /**\n * Formats a date according to the locale and formatting option for this DateTimeFormat object\n *\n * @param date The date to format\n * @returns String representing the given date formatted according to the locale and formatting\n * options of this DateTimeFormat object\n */\n format(date: Date): string {\n return this.dateTimeFormatter.format(date);\n }\n\n /**\n * Formats a date range in the most concise way based on the locales and options provided when\n * instantiating this DateTimeFormat object\n *\n * @param startDate Date object representing start of the date range\n * @param endDate Date object representing the end of the date range\n * @returns String representing the given date range formatted according to the locale and\n * formatting options of this DateTimeFormat object\n */\n formatRange(startDate: Date, endDate: Date): string {\n return this.dateTimeFormatter.formatRange(startDate, endDate);\n }\n\n /**\n * Returns an array of locale-specific tokens representing each part of the formatted date range\n * produced by this DateTimeFormat object\n *\n * @param startDate Date object representing start of the date range\n * @param endDate Date object representing the end of the date range\n * @returns Array of DateTimeRangeFormatPart objects\n */\n formatRangeToParts(startDate: Date, endDate: Date): Intl.DateTimeRangeFormatPart[] {\n return this.dateTimeFormatter.formatRangeToParts(startDate, endDate);\n }\n\n /**\n * Allows locale-aware formatting of strings produced by this DateTimeFormat object\n *\n * @param date The date to format\n * @returns Array of DateTimeFormatPart objects\n */\n formatToParts(date: Date): Intl.DateTimeFormatPart[] {\n return this.dateTimeFormatter.formatToParts(date);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and date and time formatting options\n * computed during initialization of this DateTimeFormat object\n *\n * @returns ResolvedDateTimeFormatOptions object\n */\n resolvedOptions(): Intl.ResolvedDateTimeFormatOptions {\n return this.dateTimeFormatter.resolvedOptions();\n }\n}\n","/** Interfaces, classes, and functions related to events and event emitters */\n\nimport { Dispose } from './disposal.model';\nimport { PlatformEvent, PlatformEventHandler } from './platform-event';\n\n/**\n * Event manager - accepts subscriptions to an event and runs the subscription callbacks when the\n * event is emitted Use eventEmitter.event(callback) to subscribe to the event. Use\n * eventEmitter.emit(event) to run the subscriptions. Generally, this EventEmitter should be\n * private, and its event should be public. That way, the emitter is not publicized, but anyone can\n * subscribe to the event.\n */\nexport default class PlatformEventEmitter implements Dispose {\n /**\n * Subscribes a function to run when this event is emitted.\n *\n * @param callback Function to run with the event when it is emitted\n * @returns Unsubscriber function to run to stop calling the passed-in function when the event is\n * emitted\n * @alias event\n */\n subscribe = this.event;\n\n /** All callback functions that will run when this event is emitted. Lazy loaded */\n private subscriptions?: PlatformEventHandler[];\n /** Event for listeners to subscribe to. Lazy loaded */\n private lazyEvent?: PlatformEvent;\n /** Whether this emitter has been disposed */\n private isDisposed = false;\n\n /**\n * Event for listeners to subscribe to. Subscribes a function to run when this event is emitted.\n * Use like `const unsubscriber = event(callback)`\n *\n * @param callback Function to run with the event when it is emitted\n * @returns Unsubscriber function to run to stop calling the passed-in function when the event is\n * emitted\n */\n get event(): PlatformEvent {\n this.assertNotDisposed();\n\n if (!this.lazyEvent) {\n this.lazyEvent = (callback) => {\n if (!callback || typeof callback !== 'function')\n throw new Error(`Event handler callback must be a function!`);\n\n // Initialize this.subscriptions if it does not exist\n if (!this.subscriptions) this.subscriptions = [];\n\n this.subscriptions.push(callback);\n\n return () => {\n if (!this.subscriptions) return false; // Did not find any subscribed callbacks\n\n const callbackIndex = this.subscriptions.indexOf(callback);\n\n if (callbackIndex < 0) return false; // Did not find this callback in the subscriptions\n\n // Remove the callback\n this.subscriptions.splice(callbackIndex, 1);\n\n return true;\n };\n };\n }\n return this.lazyEvent;\n }\n\n /** Disposes of this event, preparing it to release from memory */\n dispose = () => {\n return this.disposeFn();\n };\n\n /**\n * Runs the subscriptions for the event\n *\n * @param event Event data to provide to subscribed callbacks\n */\n emit = (event: T) => {\n // Do not do anything other than emitFn here. This emit is just binding `this` to emitFn\n this.emitFn(event);\n };\n\n /**\n * Function that runs the subscriptions for the event. Added here so children can override emit\n * and still call the base functionality. See NetworkEventEmitter.emit for example\n */\n protected emitFn(event: T) {\n this.assertNotDisposed();\n\n // Clone the subscriptions array before iterating over the callbacks so the callback index\n // doesn't get messed up if someone subscribes or unsubscribes inside one of the callbacks\n const emitCallbacks = [...(this.subscriptions ?? [])];\n emitCallbacks.forEach((callback) => callback(event));\n }\n\n /** Check to make sure this emitter is not disposed. Throw if it is */\n protected assertNotDisposed() {\n if (this.isDisposed) throw new Error('Emitter is disposed');\n }\n\n /**\n * Disposes of this event, preparing it to release from memory. Added here so children can\n * override emit and still call the base functionality.\n */\n protected disposeFn() {\n this.assertNotDisposed();\n\n this.isDisposed = true;\n this.subscriptions = undefined;\n this.lazyEvent = undefined;\n return Promise.resolve(true);\n }\n}\n","/** Collection of functions, objects, and types that are used as helpers in other services. */\n\n// Thanks to blubberdiblub at https://stackoverflow.com/a/68141099/217579\nexport function newGuid(): string {\n return '00-0-4-1-000'.replace(/[^-]/g, (s) =>\n // @ts-expect-error ts(2363) this works fine\n // eslint-disable-next-line no-bitwise\n (((Math.random() + ~~s) * 0x10000) >> s).toString(16).padStart(4, '0'),\n );\n}\n\n// thanks to DRAX at https://stackoverflow.com/a/9436948\n/**\n * Determine whether the object is a string\n *\n * @param o Object to determine if it is a string\n * @returns True if the object is a string; false otherwise\n */\nexport function isString(o: unknown): o is string {\n return typeof o === 'string' || o instanceof String;\n}\n\n/**\n * If deepClone isn't used when copying properties between objects, you may be left with dangling\n * references between the source and target of property copying operations.\n *\n * @param obj Object to clone\n * @returns Duplicate copy of `obj` without any references back to the original one\n */\nexport function deepClone(obj: T): T {\n // Assert the return type matches what is expected\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return JSON.parse(JSON.stringify(obj)) as T;\n}\n\n/**\n * Get a function that reduces calls to the function passed in\n *\n * @param fn The function to debounce\n * @param delay How much delay in milliseconds after the most recent call to the debounced function\n * to call the function\n * @returns Function that, when called, only calls the function passed in at maximum every delay ms\n */\n// We don't know the parameter types since this function can be anything\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function debounce void>(fn: T, delay = 300): T {\n if (isString(fn)) throw new Error('Tried to debounce a string! Could be XSS');\n let timeout: ReturnType;\n // Ensure the right return type.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return ((...args) => {\n clearTimeout(timeout);\n timeout = setTimeout(() => fn(...args), delay);\n }) as T;\n}\n\n/**\n * Groups each item in the array of items into a map according to the keySelector\n *\n * @param items Array of items to group by\n * @param keySelector Function to run on each item to get the key for the group to which it belongs\n * @param valueSelector Function to run on each item to get the value it should have in the group\n * (like map function). If not provided, uses the item itself\n * @returns Map of keys to groups of values corresponding to each item\n */\nexport function groupBy(items: T[], keySelector: (item: T) => K): Map>;\nexport function groupBy(\n items: T[],\n keySelector: (item: T) => K,\n valueSelector: (item: T, key: K) => V,\n): Map>;\nexport function groupBy(\n items: T[],\n keySelector: (item: T) => K,\n valueSelector?: (item: T, key: K) => V,\n): Map> {\n const map = new Map>();\n items.forEach((item) => {\n const key = keySelector(item);\n const group = map.get(key);\n const value = valueSelector ? valueSelector(item, key) : item;\n if (group) group.push(value);\n else map.set(key, [value]);\n });\n return map;\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\ntype ErrorWithMessage = {\n message: string;\n};\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\nfunction isErrorWithMessage(error: unknown): error is ErrorWithMessage {\n return (\n typeof error === 'object' &&\n // We're potentially dealing with objects we didn't create, so they might contain `null`\n // eslint-disable-next-line no-null/no-null\n error !== null &&\n 'message' in error &&\n // Type assert `error` to check it's `message`.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n typeof (error as Record).message === 'string'\n );\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\n/**\n * Function to get an error from the object (useful for getting an error in a catch block)\n *\n * @param error Error object whose message to get\n * @returns Message of the error - if object has message, returns message. Otherwise tries to\n * stringify\n */\nfunction toErrorWithMessage(maybeError: unknown): ErrorWithMessage {\n if (isErrorWithMessage(maybeError)) return maybeError;\n\n try {\n return new Error(JSON.stringify(maybeError));\n } catch {\n // fallback in case there's an error stringifying the maybeError\n // like with circular references for example.\n return new Error(String(maybeError));\n }\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\n/**\n * Function to get an error message from the object (useful for getting error message in a catch\n * block)\n *\n * @example `try {...} catch (e) { logger.info(getErrorMessage(e)) }`\n *\n * @param error Error object whose message to get\n * @returns Message of the error - if object has message, returns message. Otherwise tries to\n * stringify\n */\nexport function getErrorMessage(error: unknown) {\n return toErrorWithMessage(error).message;\n}\n\n/** Asynchronously waits for the specified number of milliseconds. (wraps setTimeout in a promise) */\nexport function wait(ms: number) {\n // eslint-disable-next-line no-promise-executor-return\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Runs the specified function and will timeout if it takes longer than the specified wait time\n *\n * @param fn The function to run\n * @param maxWaitTimeInMS The maximum amount of time to wait for the function to resolve\n * @returns Promise that resolves to the resolved value of the function or undefined if it ran\n * longer than the specified wait time\n */\nexport function waitForDuration(fn: () => Promise, maxWaitTimeInMS: number) {\n const timeout = wait(maxWaitTimeInMS).then(() => undefined);\n return Promise.any([timeout, fn()]);\n}\n\n/**\n * Get all functions on an object and its prototype chain (so we don't miss any class methods or any\n * object methods). Note that the functions on the final item in the prototype chain (i.e., Object)\n * are skipped to avoid including functions like `__defineGetter__`, `__defineSetter__`, `toString`,\n * etc.\n *\n * @param obj Object whose functions to get\n * @param _objId Optional ID of the object to use for debug logging\n * @returns Array of all function names on an object\n */\n// Note: lodash has something that MIGHT do the same thing as this. Investigate for https://github.com/paranext/paranext-core/issues/134\nexport function getAllObjectFunctionNames(\n obj: { [property: string]: unknown },\n // Leaving it here for debugging\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _objId: string = 'obj',\n): Set {\n const objectFunctionNames = new Set();\n\n // Get all function properties directly defined on the object\n Object.getOwnPropertyNames(obj).forEach((property) => {\n try {\n if (typeof obj[property] === 'function') objectFunctionNames.add(property);\n } catch (error) {\n // Too noisy - only reenable if you need more details\n // console.trace(`Skipping ${property} on ${objId} due to error: ${error}`);\n }\n });\n\n // Walk up the prototype chain and get additional function properties, skipping the functions\n // provided by the final (Object) prototype\n let objectPrototype = Object.getPrototypeOf(obj);\n while (objectPrototype && Object.getPrototypeOf(objectPrototype)) {\n Object.getOwnPropertyNames(objectPrototype).forEach((property) => {\n try {\n if (typeof obj[property] === 'function') objectFunctionNames.add(property);\n } catch (error) {\n // Too noisy - only reenable if you need more details\n // console.trace(`Skipping ${property} on ${objId}'s prototype due to error: ${error}`);\n }\n });\n objectPrototype = Object.getPrototypeOf(objectPrototype);\n }\n\n return objectFunctionNames;\n}\n\n/**\n * Creates a synchronous proxy for an asynchronous object. The proxy allows calling methods on an\n * object that is asynchronously fetched using a provided asynchronous function.\n *\n * @param getObject - A function that returns a promise resolving to the object whose asynchronous\n * methods to call.\n * @param objectToProxy - An optional object that is the object that is proxied. If a property is\n * accessed that does exist on this object, it will be returned. If a property is accessed that\n * does not exist on this object, it will be considered to be an asynchronous method called on the\n * object returned from getObject.\n * @returns A synchronous proxy for the asynchronous object.\n */\nexport function createSyncProxyForAsyncObject(\n getObject: (args?: unknown[]) => Promise,\n objectToProxy: Partial = {},\n): T {\n // objectToProxy will have only the synchronously accessed properties of T on it, and this proxy\n // makes the async methods that do not exist yet available synchronously so we have all of T\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return new Proxy(objectToProxy as T, {\n get(target, prop) {\n // We don't have any type information for T, so we assume methodName exists on it and will let JavaScript throw if it doesn't exist\n // @ts-expect-error 7053\n if (prop in target) return target[prop];\n return async (...args: unknown[]) => {\n // 7053: We don't have any type information for T, so we assume methodName exists on it and will let JavaScript throw if it doesn't exist\n // 2556: The args here are the parameters for the method specified\n // @ts-expect-error 7053 2556\n return (await getObject())[prop](...args);\n };\n },\n });\n}\n\n/** Within type T, recursively change all properties to be optional */\nexport type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial } : T;\n\n/** Within type T, recursively change properties that were of type A to be of type B */\nexport type ReplaceType = T extends A\n ? B\n : T extends object\n ? { [K in keyof T]: ReplaceType }\n : T;\n\n// Thanks to jcalz at https://stackoverflow.com/a/50375286\n/**\n * Converts a union type to an intersection type (`|` to `&`).\n *\n * Note: this utility type is for use on object types. It may fail on other types.\n *\n * @example\n *\n * ```typescript\n * type TypeOne = { one: string };\n * type TypeTwo = { two: number };\n * type TypeThree = { three: string };\n *\n * type TypeNums = { one: TypeOne; two: TypeTwo; three: TypeThree };\n * const numNames = ['one', 'two'] as const;\n * type TypeNumNames = typeof numNames;\n *\n * // Same as `TypeOne | TypeTwo`\n * // `{ one: string } | { two: number }`\n * type TypeOneTwoUnion = TypeNums[TypeNumNames[number]];\n *\n * // Same as `TypeOne & TypeTwo`\n * // `{ one: string; two: number }`\n * type TypeOneTwoIntersection = UnionToIntersection;\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type UnionToIntersection = (U extends any ? (x: U) => void : never) extends (\n x: infer I,\n) => void\n ? I\n : never;\n","import PlatformEventEmitter from './platform-event-emitter.model';\nimport { deepClone } from './util';\n\ntype JsonObjectLike = { [key: string]: unknown };\ntype JsonArrayLike = unknown[];\n\nexport type JsonDocumentLike = JsonObjectLike | JsonArrayLike;\n\n/**\n * Options for DocumentCombiner objects\n *\n * - `copyDocuments`: If true, this instance will perform a deep copy of all provided documents before\n * composing the output. If false, then changes made to provided documents after they are\n * contributed will be reflected in the next time output is composed.\n * - `ignoreDuplicateProperties`: If true, then duplicate properties are skipped if they are seen in\n * contributed documents. If false, then throw when duplicate properties are seen in contributed\n * documents.\n */\nexport type DocumentCombinerOptions = {\n copyDocuments: boolean;\n ignoreDuplicateProperties: boolean;\n};\n\n/**\n * Base class for any code that wants to compose JSON documents (primarily in the form of JS objects\n * or arrays) together into a single output document.\n */\nexport default class DocumentCombiner {\n protected baseDocument: JsonDocumentLike;\n protected readonly contributions = new Map();\n protected latestOutput: JsonDocumentLike | undefined;\n protected readonly options: DocumentCombinerOptions;\n private readonly onDidRebuildEmitter = new PlatformEventEmitter();\n /** Event that emits to announce that the document has been rebuilt and the output has been updated */\n // Need `onDidRebuildEmitter` to be instantiated before this line\n // eslint-disable-next-line @typescript-eslint/member-ordering\n readonly onDidRebuild = this.onDidRebuildEmitter.subscribe;\n\n /**\n * Create a DocumentCombiner instance\n *\n * @param baseDocument This is the first document that will be used when composing the output\n * @param options Options used by this object when combining documents\n */\n protected constructor(baseDocument: JsonDocumentLike, options: DocumentCombinerOptions) {\n // Setting baseDocument redundantly because TS doesn't understand that updateBaseDocument does it\n this.baseDocument = baseDocument;\n this.options = options;\n this.updateBaseDocument(baseDocument);\n }\n\n /**\n * Update the starting document for composition process\n *\n * @param baseDocument Base JSON document/JS object that all other documents are added to\n * @returns Recalculated output document given the new starting state and existing other documents\n */\n updateBaseDocument(baseDocument: JsonDocumentLike): JsonDocumentLike | undefined {\n this.validateBaseDocument(baseDocument);\n this.baseDocument = this.options.copyDocuments ? deepClone(baseDocument) : baseDocument;\n this.baseDocument = this.transformBaseDocumentAfterValidation(this.baseDocument);\n return this.rebuild();\n }\n\n /**\n * Add or update one of the contribution documents for the composition process\n *\n * Note: the order in which contribution documents are added can be considered to be indeterminate\n * as it is currently ordered by however `Map.forEach` provides the contributions. The order\n * matters when merging two arrays into one. Also, when `options.ignoreDuplicateProperties` is\n * `true`, the order also matters when adding the same property to an object that is already\n * provided previously. Please let us know if you have trouble because of indeterminate\n * contribution ordering.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine\n * @returns Recalculated output document given the new or updated contribution and existing other\n * documents\n */\n addOrUpdateContribution(\n documentName: string,\n document: JsonDocumentLike,\n ): JsonDocumentLike | undefined {\n this.validateContribution(documentName, document);\n const previousDocumentVersion = this.contributions.get(documentName);\n let documentToSet = this.options.copyDocuments && !!document ? deepClone(document) : document;\n documentToSet = this.transformContributionAfterValidation(documentName, documentToSet);\n this.contributions.set(documentName, documentToSet);\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after adding/updating the contribution, put it back how it was\n if (previousDocumentVersion) this.contributions.set(documentName, previousDocumentVersion);\n else this.contributions.delete(documentName);\n throw new Error(`Error when setting the document named ${documentName}: ${error}`);\n }\n }\n\n /**\n * Delete one of the contribution documents for the composition process\n *\n * @param documentName Name of the contributed document to delete\n * @returns Recalculated output document given the remaining other documents\n */\n deleteContribution(documentName: string): JsonDocumentLike | undefined {\n const document = this.contributions.get(documentName);\n if (!document) throw new Error(`${documentName} does not exist`);\n this.contributions.delete(documentName);\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after deleting the contribution, put it back and rethrow\n this.contributions.set(documentName, document);\n throw new Error(`Error when deleting the document named ${documentName}: ${error}`);\n }\n }\n\n /**\n * Delete all present contribution documents for the composition process and return to the base\n * document\n *\n * @returns Recalculated output document consisting only of the base document\n */\n deleteAllContributions(): JsonDocumentLike | undefined {\n if (this.contributions.size <= 0) return this.latestOutput;\n\n // Save out all contributions\n const contributions = [...this.contributions.entries()];\n\n // Delete all contributions\n contributions.forEach(([contributionName]) => this.contributions.delete(contributionName));\n\n // Rebuild with no contributions\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after deleting all contributions, put them back and rethrow\n contributions.forEach(([contributionName, document]) =>\n this.contributions.set(contributionName, document),\n );\n throw new Error(`Error when deleting all contributions: ${error}`);\n }\n }\n\n /**\n * Run the document composition process given the starting document and all contributions. Throws\n * if the output document fails to validate properly.\n *\n * @returns Recalculated output document given the starting and contributed documents\n */\n rebuild(): JsonDocumentLike | undefined {\n // The starting document is the output if there are no other contributions\n if (this.contributions.size === 0) {\n let potentialOutput = deepClone(this.baseDocument);\n potentialOutput = this.transformFinalOutputBeforeValidation(potentialOutput);\n this.validateOutput(potentialOutput);\n this.latestOutput = potentialOutput;\n this.onDidRebuildEmitter.emit(undefined);\n return this.latestOutput;\n }\n\n // Compose the output by validating each document one at a time to pinpoint errors better\n let outputIteration = this.baseDocument;\n this.contributions.forEach((contribution: JsonDocumentLike) => {\n outputIteration = mergeObjects(\n outputIteration,\n contribution,\n this.options.ignoreDuplicateProperties,\n );\n this.validateOutput(outputIteration);\n });\n outputIteration = this.transformFinalOutputBeforeValidation(outputIteration);\n this.validateOutput(outputIteration);\n this.latestOutput = outputIteration;\n this.onDidRebuildEmitter.emit(undefined);\n return this.latestOutput;\n }\n\n /**\n * Transform the starting document that is given to the combiner. This transformation occurs after\n * validating the base document and before combining any contributions.\n *\n * WARNING: If you do not create the combiner with option `copyDocuments: true` or clone inside\n * this method, this method will directly modify the `baseDocument` passed in.\n *\n * @param baseDocument Initial input document. Already validated via `validateBaseDocument`\n * @returns Transformed base document\n */\n // We just don't need `this` here. This is basically a no-op function that is available to child\n // classes to override\n // eslint-disable-next-line class-methods-use-this\n protected transformBaseDocumentAfterValidation(baseDocument: JsonDocumentLike): JsonDocumentLike {\n return baseDocument;\n }\n\n /**\n * Transform the contributed document associated with `documentName`. This transformation occurs\n * after validating the contributed document and before combining with other documents.\n *\n * WARNING: If you do not create the combiner with option `copyDocuments: true` or clone inside\n * this method, this method will directly modify the contributed `document` passed in.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine. Already validated via\n * `validateContribution`\n * @returns Transformed contributed document\n */\n // We just don't need `this` here. This is basically a no-op function that is available to child\n // classes to override\n // eslint-disable-next-line class-methods-use-this\n protected transformContributionAfterValidation(\n // @ts-expect-error this parameter is unused but may be used in child classes\n documentName: string,\n document: JsonDocumentLike,\n ): JsonDocumentLike {\n return document;\n }\n\n /**\n * Throw an error if the provided document is not a valid starting document.\n *\n * @param baseDocument Base JSON document/JS object that all other documents are added to\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateBaseDocument(baseDocument: JsonDocumentLike): void {}\n\n /**\n * Throw an error if the provided document is not a valid contribution document.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateContribution(documentName: string, document: JsonDocumentLike): void {}\n\n /**\n * Throw an error if the provided output is not valid.\n *\n * @param output Output document that could potentially be returned to callers\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateOutput(output: JsonDocumentLike): void {}\n\n /**\n * Transform the document that is the composition of the base document and all contribution\n * documents. This is the last step that will be run prior to validation via `validateOutput`\n * before `this.latestOutput` is updated to the new output.\n *\n * @param finalOutput Final output document that could potentially be returned to callers. \"Final\"\n * means no further contribution documents will be merged.\n */\n // no-op intended to be overridden by child classes. Can't be static\n // eslint-disable-next-line class-methods-use-this\n protected transformFinalOutputBeforeValidation(finalOutput: JsonDocumentLike): JsonDocumentLike {\n return finalOutput;\n }\n}\n\n// #region Helper functions\n\n/**\n * Determines if the input values are objects but not arrays\n *\n * @param values Objects to check\n * @returns True if all the values are objects but not arrays\n */\nfunction areNonArrayObjects(...values: unknown[]): boolean {\n let allMatch = true;\n values.forEach((value: unknown) => {\n if (!value || typeof value !== 'object' || Array.isArray(value)) allMatch = false;\n });\n return allMatch;\n}\n\n/**\n * Determines if the input values are arrays\n *\n * @param value Objects to check\n * @returns True if the values are arrays\n */\nfunction areArrayObjects(...values: unknown[]): boolean {\n let allMatch = true;\n values.forEach((value: unknown) => {\n if (!value || typeof value !== 'object' || !Array.isArray(value)) allMatch = false;\n });\n return allMatch;\n}\n\n/**\n * Deep clone and recursively merge the properties of one object (copyFrom) into another\n * (startingPoint). Throws if copyFrom would overwrite values already existing in startingPoint.\n *\n * Does not modify the objects passed in.\n *\n * @param startingPoint Object that is the starting point for the return value\n * @param copyFrom Object whose values are copied into the return value\n * @param ignoreDuplicateProperties Whether to ignore object properties that are present in\n * `copyFrom` that are already present in `startingPoint`. If `false`, throws when an object\n * property in `copyFrom` is already present in `startingPoint`\n * @returns Object that is the combination of the two documents\n */\nfunction mergeObjects(\n startingPoint: JsonDocumentLike,\n copyFrom: JsonDocumentLike,\n ignoreDuplicateProperties: boolean,\n): JsonDocumentLike {\n const retVal = deepClone(startingPoint);\n\n if (!copyFrom) return retVal;\n\n return mergeObjectsInternal(retVal, deepClone(copyFrom), ignoreDuplicateProperties);\n}\n\n/**\n * Recursively merge the properties of one object (copyFrom) into another (startingPoint). Throws if\n * copyFrom would overwrite values already existing in startingPoint.\n *\n * WARNING: Modifies the argument objects in some way. Recommended to use `mergeObjects`\n *\n * @param startingPoint Object that is the starting point for the return value\n * @param copyFrom Object whose values are copied into the return value\n * @param ignoreDuplicateProperties Whether to ignore object properties that are present in\n * `copyFrom` that are already present in `startingPoint`. If `false`, throws when an object\n * property in `copyFrom` is already present in `startingPoint`\n * @returns Object that is the combination of the two documents\n */\nfunction mergeObjectsInternal(\n startingPoint: JsonDocumentLike,\n copyFrom: JsonDocumentLike,\n ignoreDuplicateProperties: boolean,\n): JsonDocumentLike {\n if (!copyFrom) return startingPoint;\n\n if (areNonArrayObjects(startingPoint, copyFrom)) {\n // Merge properties since they are both objects\n\n // We know these are objects from the `if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n const startingPointObj = startingPoint as JsonObjectLike;\n const copyFromObj = copyFrom as JsonObjectLike;\n /* eslint-enable no-type-assertion/no-type-assertion */\n Object.keys(copyFromObj).forEach((key: string | number) => {\n if (Object.hasOwn(startingPointObj, key)) {\n if (areNonArrayObjects(startingPointObj[key], copyFromObj[key])) {\n startingPointObj[key] = mergeObjectsInternal(\n // We know these are objects from the `if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n startingPointObj[key] as JsonObjectLike,\n copyFromObj[key] as JsonObjectLike,\n ignoreDuplicateProperties,\n /* eslint-enable no-type-assertion/no-type-assertion */\n );\n } else if (areArrayObjects(startingPointObj[key], copyFromObj[key])) {\n // Concat the arrays since they are both arrays\n\n // We know these are arrays from the `else if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n startingPointObj[key] = (startingPointObj[key] as JsonArrayLike).concat(\n copyFromObj[key] as JsonArrayLike,\n );\n /* eslint-enable no-type-assertion/no-type-assertion */\n } else if (!ignoreDuplicateProperties)\n throw new Error(`Cannot merge objects: key \"${key}\" already exists in the target object`);\n // Note that the first non-object non-array value that gets placed in a property stays.\n // New values do not override existing ones\n } else {\n startingPointObj[key] = copyFromObj[key];\n }\n });\n } else if (areArrayObjects(startingPoint, copyFrom)) {\n // Concat the arrays since they are both arrays\n\n // Push the contents of copyFrom into startingPoint since it is a const and was already deep cloned\n // We know these are objects from the `else if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n (startingPoint as JsonArrayLike).push(...(copyFrom as JsonArrayLike));\n /* eslint-enable no-type-assertion/no-type-assertion */\n }\n\n // Note that nothing happens if `startingPoint` is not an object or an array or if `startingPoint`\n // and `copyFrom` are not both object or both arrays. Should we throw? Should we push `copyFrom`'s\n // values into the array? Other? Maybe one day we can add some options to decide what to do in\n // this situation, but YAGNI for now\n\n return startingPoint;\n}\n\n// #endregion\n","import { Mutex as AsyncMutex } from 'async-mutex';\n\n// Extending Mutex from async-mutex so we can add JSDoc\n\n/**\n * Class that allows calling asynchronous functions multiple times at once while only running one at\n * a time.\n *\n * @example\n *\n * ```typescript\n * const mutex = new Mutex();\n *\n * mutex.runExclusive(async () => {\n * // Do some asynchronous stuff\n * console.log('These run one-at-a-time');\n * });\n *\n * mutex.runExclusive(async () => {\n * // Do some asynchronous stuff\n * console.log('These run one-at-a-time');\n * });\n * ```\n *\n * See [`async-mutex`](https://www.npmjs.com/package/async-mutex) for more information.\n */\nclass Mutex extends AsyncMutex {}\n\nexport default Mutex;\n","import Mutex from './mutex';\n\n/** Map of {@link Mutex}es that automatically (lazily) generates a new {@link Mutex} for any new key */\nclass MutexMap {\n private mutexesByID = new Map();\n\n get(mutexID: string): Mutex {\n let retVal = this.mutexesByID.get(mutexID);\n if (retVal) return retVal;\n\n retVal = new Mutex();\n this.mutexesByID.set(mutexID, retVal);\n return retVal;\n }\n}\n\nexport default MutexMap;\n","import DocumentCombiner, { DocumentCombinerOptions, JsonDocumentLike } from './document-combiner';\n\nexport default class NonValidatingDocumentCombiner extends DocumentCombiner {\n // Making the protected base constructor public\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(baseDocument: JsonDocumentLike, options: DocumentCombinerOptions) {\n super(baseDocument, options);\n }\n\n get output(): JsonDocumentLike | undefined {\n return this.latestOutput;\n }\n}\n","/** Enables language-sensitive number formatting. Wraps Intl.NumberFormat */\nexport default class NumberFormat {\n private numberFormatter: Intl.NumberFormat;\n\n constructor(locales?: string | string[], options?: Intl.NumberFormatOptions) {\n this.numberFormatter = new Intl.NumberFormat(locales, options);\n }\n\n /**\n * Formats a number according to the locale and formatting options of this NumberFormat object\n *\n * @param value Number or BigInt to format\n * @returns String representing the given number formatted according to the locale and formatting\n * options of this NumberFormat object\n */\n format(value: number | bigint): string {\n return this.numberFormatter.format(value);\n }\n\n /**\n * Formats a range of numbers according to the locale and formatting options of this NumberFormat\n * object\n *\n * @param startRange Number or bigint representing the start of the range\n * @param endRange Number or bigint representing the end of the range\n * @returns String representing the given range of numbers formatted according to the locale and\n * formatting options of this NumberFormat object\n */\n formatRange(startRange: number | bigint, endRange: number | bigint): string {\n return this.numberFormatter.formatRange(startRange, endRange);\n }\n\n /**\n * Returns an array of objects containing the locale-specific tokens from which it is possible to\n * build custom strings while preserving the locale-specific parts.\n *\n * @param startRange Number or bigint representing start of the range\n * @param endRange Number or bigint representing end of the range\n * @returns Array of NumberRangeFormatPart objects containing the formatted range of numbers in\n * parts\n */\n formatRangeToParts(\n startRange: number | bigint,\n endRange: number | bigint,\n ): Intl.NumberRangeFormatPart[] {\n return this.numberFormatter.formatRangeToParts(startRange, endRange);\n }\n\n /**\n * Allows locale-aware formatting of strings produced by this NumberFormat object\n *\n * @param value Number or bigint to format\n * @returns Array of NumberFormatPart objects containing the formatted number in parts\n */\n formatToParts(value: number | bigint): Intl.NumberFormatPart[] {\n return this.numberFormatter.formatToParts(value);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and number formatting options\n * computed during initialization of this NumberFormat object\n *\n * @returns ResolvedNumberFormatOptions object\n */\n resolvedOptions(): Intl.ResolvedNumberFormatOptions {\n return this.numberFormatter.resolvedOptions();\n }\n}\n","import { Dispose } from './disposal.model';\nimport { Unsubscriber, UnsubscriberAsync } from './unsubscriber';\n\n/** Simple collection for UnsubscriberAsync objects that also provides an easy way to run them. */\nexport default class UnsubscriberAsyncList {\n readonly unsubscribers = new Set();\n\n constructor(private name = 'Anonymous') {}\n\n /**\n * Add unsubscribers to the list. Note that duplicates are not added twice.\n *\n * @param unsubscribers - Objects that were returned from a registration process.\n */\n add(...unsubscribers: (UnsubscriberAsync | Unsubscriber | Dispose)[]) {\n unsubscribers.forEach((unsubscriber) => {\n if ('dispose' in unsubscriber) this.unsubscribers.add(unsubscriber.dispose);\n else this.unsubscribers.add(unsubscriber);\n });\n }\n\n /**\n * Run all unsubscribers added to this list and then clear the list.\n *\n * @returns `true` if all unsubscribers succeeded, `false` otherwise.\n */\n async runAllUnsubscribers(): Promise {\n const unsubs = [...this.unsubscribers].map((unsubscriber) => unsubscriber());\n const results = await Promise.all(unsubs);\n this.unsubscribers.clear();\n return results.every((unsubscriberSucceeded, index) => {\n if (!unsubscriberSucceeded)\n console.error(`UnsubscriberAsyncList ${this.name}: Unsubscriber at index ${index} failed!`);\n\n return unsubscriberSucceeded;\n });\n }\n}\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","\"use strict\"\r\n\r\n// Based on: https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js\r\n\r\nmodule.exports = () => {\r\n\t// Used to compose unicode character classes.\r\n\tconst astralRange = \"\\\\ud800-\\\\udfff\"\r\n\tconst comboMarksRange = \"\\\\u0300-\\\\u036f\"\r\n\tconst comboHalfMarksRange = \"\\\\ufe20-\\\\ufe2f\"\r\n\tconst comboSymbolsRange = \"\\\\u20d0-\\\\u20ff\"\r\n\tconst comboMarksExtendedRange = \"\\\\u1ab0-\\\\u1aff\"\r\n\tconst comboMarksSupplementRange = \"\\\\u1dc0-\\\\u1dff\"\r\n\tconst comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange\r\n\tconst varRange = \"\\\\ufe0e\\\\ufe0f\"\r\n\tconst familyRange = \"\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFB\\\\u200D\\\\uD83C\\\\uDF93\"\r\n\r\n\t// Used to compose unicode capture groups.\r\n\tconst astral = `[${astralRange}]`\r\n\tconst combo = `[${comboRange}]`\r\n\tconst fitz = \"\\\\ud83c[\\\\udffb-\\\\udfff]\"\r\n\tconst modifier = `(?:${combo}|${fitz})`\r\n\tconst nonAstral = `[^${astralRange}]`\r\n\tconst regional = \"(?:\\\\uD83C[\\\\uDDE6-\\\\uDDFF]){2}\"\r\n\tconst surrogatePair = \"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\"\r\n\tconst zwj = \"\\\\u200d\"\r\n\tconst blackFlag = \"(?:\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40(?:\\\\udc65|\\\\udc73|\\\\udc77)\\\\udb40(?:\\\\udc6e|\\\\udc63|\\\\udc6c)\\\\udb40(?:\\\\udc67|\\\\udc74|\\\\udc73)\\\\udb40\\\\udc7f)\"\r\n\tconst family = `[${familyRange}]`\r\n\r\n\t// Used to compose unicode regexes.\r\n\tconst optModifier = `${modifier}?`\r\n\tconst optVar = `[${varRange}]?`\r\n\tconst optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join(\"|\")})${optVar + optModifier})*`\r\n\tconst seq = optVar + optModifier + optJoin\r\n\tconst nonAstralCombo = `${nonAstral}${combo}?`\r\n\tconst symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join(\"|\")})`\r\n\r\n\t// Used to match [String symbols](https://mathiasbynens.be/notes/javascript-unicode).\r\n\treturn new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, \"g\")\r\n}\r\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// @ts-ignore\nvar char_regex_1 = __importDefault(require(\"char-regex\"));\n/**\n * Converts a string to an array of string chars\n * @param {string} str The string to turn into array\n * @returns {string[]}\n */\nfunction toArray(str) {\n if (typeof str !== 'string') {\n throw new Error('A string is expected as input');\n }\n return str.match(char_regex_1.default()) || [];\n}\nexports.toArray = toArray;\n/**\n * Returns the length of a string\n *\n * @export\n * @param {string} str\n * @returns {number}\n */\nfunction length(str) {\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n var match = str.match(char_regex_1.default());\n return match === null ? 0 : match.length;\n}\nexports.length = length;\n/**\n * Returns a substring by providing start and end position\n *\n * @export\n * @param {string} str\n * @param {number} [begin=0] Starting position\n * @param {number} end End position\n * @returns {string}\n */\nfunction substring(str, begin, end) {\n if (begin === void 0) { begin = 0; }\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n // Even though negative numbers work here, theyre not in the spec\n if (typeof begin !== 'number' || begin < 0) {\n begin = 0;\n }\n if (typeof end === 'number' && end < 0) {\n end = 0;\n }\n var match = str.match(char_regex_1.default());\n if (!match)\n return '';\n return match.slice(begin, end).join('');\n}\nexports.substring = substring;\n/**\n * Returns a substring by providing start position and length\n *\n * @export\n * @param {string} str\n * @param {number} [begin=0] Starting position\n * @param {number} len Desired length\n * @returns {string}\n */\nfunction substr(str, begin, len) {\n if (begin === void 0) { begin = 0; }\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n var strLength = length(str);\n // Fix type\n if (typeof begin !== 'number') {\n begin = parseInt(begin, 10);\n }\n // Return zero-length string if got oversize number.\n if (begin >= strLength) {\n return '';\n }\n // Calculating postive version of negative value.\n if (begin < 0) {\n begin += strLength;\n }\n var end;\n if (typeof len === 'undefined') {\n end = strLength;\n }\n else {\n // Fix type\n if (typeof len !== 'number') {\n len = parseInt(len, 10);\n }\n end = len >= 0 ? len + begin : begin;\n }\n var match = str.match(char_regex_1.default());\n if (!match)\n return '';\n return match.slice(begin, end).join('');\n}\nexports.substr = substr;\n/**\n * Enforces a string to be a certain length by\n * adding or removing characters\n *\n * @export\n * @param {string} str\n * @param {number} [limit=16] Limit\n * @param {string} [padString='#'] The Pad String\n * @param {string} [padPosition='right'] The Pad Position\n * @returns {string}\n */\nfunction limit(str, limit, padString, padPosition) {\n if (limit === void 0) { limit = 16; }\n if (padString === void 0) { padString = '#'; }\n if (padPosition === void 0) { padPosition = 'right'; }\n // Input should be a string, limit should be a number\n if (typeof str !== 'string' || typeof limit !== 'number') {\n throw new Error('Invalid arguments specified');\n }\n // Pad position should be either left or right\n if (['left', 'right'].indexOf(padPosition) === -1) {\n throw new Error('Pad position should be either left or right');\n }\n // Pad string can be anything, we convert it to string\n if (typeof padString !== 'string') {\n padString = String(padString);\n }\n // Calculate string length considering astral code points\n var strLength = length(str);\n if (strLength > limit) {\n return substring(str, 0, limit);\n }\n else if (strLength < limit) {\n var padRepeats = padString.repeat(limit - strLength);\n return padPosition === 'left' ? padRepeats + str : str + padRepeats;\n }\n return str;\n}\nexports.limit = limit;\n/**\n * Returns the index of the first occurrence of a given string\n *\n * @export\n * @param {string} str\n * @param {string} [searchStr] the string to search\n * @param {number} [pos] starting position\n * @returns {number}\n */\nfunction indexOf(str, searchStr, pos) {\n if (pos === void 0) { pos = 0; }\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n if (str === '') {\n if (searchStr === '') {\n return 0;\n }\n return -1;\n }\n // fix type\n pos = Number(pos);\n pos = isNaN(pos) ? 0 : pos;\n searchStr = String(searchStr);\n var strArr = toArray(str);\n if (pos >= strArr.length) {\n if (searchStr === '') {\n return strArr.length;\n }\n return -1;\n }\n if (searchStr === '') {\n return pos;\n }\n var searchArr = toArray(searchStr);\n var finded = false;\n var index;\n for (index = pos; index < strArr.length; index += 1) {\n var searchIndex = 0;\n while (searchIndex < searchArr.length &&\n searchArr[searchIndex] === strArr[index + searchIndex]) {\n searchIndex += 1;\n }\n if (searchIndex === searchArr.length &&\n searchArr[searchIndex - 1] === strArr[index + searchIndex - 1]) {\n finded = true;\n break;\n }\n }\n return finded ? index : -1;\n}\nexports.indexOf = indexOf;\n","/**\n * Ensures that the given input is returned as an array.\n *\n * This function takes a value that might be a single item, an array, or `undefined` and returns it\n * as an array:\n *\n * - If the input is `undefined`, an empty array is returned.\n * - If the input is already an array, it is returned as-is.\n * - If the input is a single item, it is wrapped in an array.\n *\n * @typeParam T - The type of the elements in the array.\n * @param maybeArray - The value that may be a single item, an array, or `undefined`.\n * @returns An array containing the input value(s). If the input is `undefined`, an empty array is\n * returned.\n */\nexport default function ensureArray(maybeArray: T | T[] | undefined): T[] {\n if (!maybeArray) return [];\n\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n","import { LocalizeKey } from 'menus.model';\nimport {\n indexOf as stringzIndexOf,\n substring as stringzSubstring,\n length as stringzLength,\n toArray as stringzToArray,\n limit as stringzLimit,\n substr as stringzSubstr,\n} from 'stringz';\nimport ensureArray from './array-util';\n\n/**\n * This function mirrors the `at` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Finds the Unicode code point at the given index.\n *\n * @param string String to index\n * @param index Position of the character to be returned in range of -length(string) to\n * length(string)\n * @returns New string consisting of the Unicode code point located at the specified offset,\n * undefined if index is out of bounds\n */\nexport function at(string: string, index: number): string | undefined {\n if (index > stringLength(string) || index < -stringLength(string)) return undefined;\n return substr(string, index, 1);\n}\n\n/**\n * This function mirrors the `charAt` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a new string consisting of the single unicode code point at the given index.\n *\n * @param string String to index\n * @param index Position of the string character to be returned, in the range of 0 to\n * length(string)-1\n * @returns New string consisting of the Unicode code point located at the specified offset, empty\n * string if index is out of bounds\n */\nexport function charAt(string: string, index: number): string {\n if (index < 0 || index > stringLength(string) - 1) return '';\n return substr(string, index, 1);\n}\n\n/**\n * This function mirrors the `codePointAt` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a non-negative integer that is the Unicode code point value of the character starting at\n * the given index.\n *\n * @param string String to index\n * @param index Position of the string character to be returned, in the range of 0 to\n * length(string)-1\n * @returns Non-negative integer representing the code point value of the character at the given\n * index, or undefined if there is no element at that position\n */\nexport function codePointAt(string: string, index: number): number | undefined {\n if (index < 0 || index > stringLength(string) - 1) return undefined;\n return substr(string, index, 1).codePointAt(0);\n}\n\n/**\n * This function mirrors the `endsWith` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Determines whether a string ends with the characters of this string.\n *\n * @param string String to search through\n * @param searchString Characters to search for at the end of the string\n * @param endPosition End position where searchString is expected to be found. Default is\n * `length(string)`\n * @returns True if it ends with searchString, false if it does not\n */\nexport function endsWith(\n string: string,\n searchString: string,\n endPosition: number = stringLength(string),\n): boolean {\n const lastIndexOfSearchString = lastIndexOf(string, searchString);\n if (lastIndexOfSearchString === -1) return false;\n if (lastIndexOfSearchString + stringLength(searchString) !== endPosition) return false;\n return true;\n}\n\n/**\n * Get the index of the closest closing curly brace in a string.\n *\n * Note: when escaped, gets the index of the curly brace, not the backslash before it.\n *\n * @param str String to search\n * @param index Index at which to start searching. Inclusive of this index\n * @param escaped Whether to search for an escaped or an unescaped closing curly brace\n * @returns Index of closest closing curly brace or -1 if not found\n */\nfunction indexOfClosestClosingCurlyBrace(str: string, index: number, escaped: boolean) {\n if (index < 0) return -1;\n if (escaped) {\n if (charAt(str, index) === '}' && charAt(str, index - 1) === '\\\\') return index;\n const closeCurlyBraceIndex = indexOf(str, '\\\\}', index);\n return closeCurlyBraceIndex >= 0 ? closeCurlyBraceIndex + 1 : closeCurlyBraceIndex;\n }\n\n let i = index;\n const strLength = stringLength(str);\n while (i < strLength) {\n i = indexOf(str, '}', i);\n\n if (i === -1 || charAt(str, i - 1) !== '\\\\') break;\n\n // Didn't find an un-escaped close brace, so keep looking\n i += 1;\n }\n\n return i >= strLength ? -1 : i;\n}\n\n/**\n * Formats a string, replacing `{replacer key}` with the value in the `replacers` at that replacer\n * key (or multiple replacer values if there are multiple in the string). Will also remove \\ before\n * curly braces if curly braces are escaped with a backslash in order to preserve the curly braces.\n * E.g. 'Hi, this is {name}! I like `\\{curly braces\\}`! would become Hi, this is Jim! I like {curly\n * braces}!\n *\n * If the key in unescaped braces is not found, returns the key without the braces. Empty unescaped\n * curly braces will just return a string without the braces e.g. ('I am {Nemo}', { 'name': 'Jim'})\n * would return 'I am Nemo'.\n *\n * @example\n *\n * ```typescript\n * formatReplacementString(\n * 'Hi, this is {name}! I like \\{curly braces\\}! I have a {carColor} car. My favorite food is {food}.',\n * { name: 'Bill', carColor: 'blue' }\n * );\n *\n * =>\n *\n * 'Hi, this is Bill! I like {curly braces}! I have a blue car. My favorite food is food.'\n * ```\n *\n * @param str String to format\n * @param replacers Object whose keys are replacer keys and whose values are the values with which\n * to replace `{replacer key}`s found in the string to format. Will be coerced to strings using\n * `${replacerValue}`\n * @returns Formatted string\n */\nexport function formatReplacementString(\n str: string,\n replacers: { [key: string | number]: string | unknown } | object,\n): string {\n let updatedStr = str;\n\n let i = 0;\n while (i < stringLength(updatedStr)) {\n switch (charAt(updatedStr, i)) {\n case '{':\n if (charAt(updatedStr, i - 1) !== '\\\\') {\n // This character is an un-escaped open curly brace. Try to match and replace\n const closeCurlyBraceIndex = indexOfClosestClosingCurlyBrace(updatedStr, i, false);\n if (closeCurlyBraceIndex >= 0) {\n // We have matching open and close indices. Try to replace the contents\n const replacerKey = substring(updatedStr, i + 1, closeCurlyBraceIndex);\n // Replace with the replacer string or just remove the curly braces\n const replacerString =\n replacerKey in replacers\n ? // We're getting a value.toString() with any type from an object with any keys\n // here. TypeScript doesn't need to carefully and precisely track the exact type.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n `${replacers[replacerKey as keyof typeof replacers]}`\n : replacerKey;\n\n updatedStr = `${substring(updatedStr, 0, i)}${replacerString}${substring(updatedStr, closeCurlyBraceIndex + 1)}`;\n // Put our index at the closing brace adjusted for the new string length minus two\n // because we are removing the curly braces\n // Ex: \"stuff {and} things\"\n // Replacer for and: n'\n // closeCurlyBraceIndex is 10\n // \"stuff n' things\"\n // i = 10 + 2 - 3 - 2 = 7\n i = closeCurlyBraceIndex + stringLength(replacerString) - stringLength(replacerKey) - 2;\n } else {\n // This is an unexpected un-escaped open curly brace with no matching closing curly\n // brace. Just ignore, I guess\n }\n } else {\n // This character is an escaped open curly brace. Remove the escape\n updatedStr = `${substring(updatedStr, 0, i - 1)}${substring(updatedStr, i)}`;\n // Adjust our index because we removed the escape\n i -= 1;\n }\n break;\n case '}':\n if (charAt(updatedStr, i - 1) !== '\\\\') {\n // This character is an un-escaped closing curly brace with no matching open curly\n // brace. Just ignore, I guess\n } else {\n // This character is an escaped closing curly brace. Remove the escape\n updatedStr = `${substring(updatedStr, 0, i - 1)}${substring(updatedStr, i)}`;\n // Adjust our index because we removed the escape\n i -= 1;\n }\n break;\n default:\n // No need to do anything with other characters at this point\n break;\n }\n\n i += 1;\n }\n\n return updatedStr;\n}\n/**\n * This function mirrors the `includes` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Performs a case-sensitive search to determine if searchString is found in string.\n *\n * @param string String to search through\n * @param searchString String to search for\n * @param position Position within the string to start searching for searchString. Default is `0`\n * @returns True if search string is found, false if it is not\n */\nexport function includes(string: string, searchString: string, position: number = 0): boolean {\n const partialString = substring(string, position);\n const indexOfSearchString = indexOf(partialString, searchString);\n if (indexOfSearchString === -1) return false;\n return true;\n}\n\n/**\n * This function mirrors the `indexOf` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns the index of the first occurrence of a given string.\n *\n * @param string String to search through\n * @param searchString The string to search for\n * @param position Start of searching. Default is `0`\n * @returns Index of the first occurrence of a given string\n */\nexport function indexOf(\n string: string,\n searchString: string,\n position: number | undefined = 0,\n): number {\n return stringzIndexOf(string, searchString, position);\n}\n\n/**\n * This function mirrors the `lastIndexOf` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Searches this string and returns the index of the last occurrence of the specified substring.\n *\n * @param string String to search through\n * @param searchString Substring to search for\n * @param position The index at which to begin searching. If omitted, the search begins at the end\n * of the string. Default is `undefined`\n * @returns Index of the last occurrence of searchString found, or -1 if not found.\n */\nexport function lastIndexOf(string: string, searchString: string, position?: number): number {\n let validatedPosition = position === undefined ? stringLength(string) : position;\n\n if (validatedPosition < 0) {\n validatedPosition = 0;\n } else if (validatedPosition >= stringLength(string)) {\n validatedPosition = stringLength(string) - 1;\n }\n\n for (let index = validatedPosition; index >= 0; index--) {\n if (substr(string, index, stringLength(searchString)) === searchString) {\n return index;\n }\n }\n\n return -1;\n}\n\n/**\n * This function mirrors the `length` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes. Since `length` appears to be a\n * reserved keyword, the function was renamed to `stringLength`\n *\n * Returns the length of a string.\n *\n * @param string String to return the length for\n * @returns Number that is length of the starting string\n */\nexport function stringLength(string: string): number {\n return stringzLength(string);\n}\n\n/**\n * This function mirrors the `normalize` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns the Unicode Normalization Form of this string.\n *\n * @param string The starting string\n * @param form Form specifying the Unicode Normalization Form. Default is `'NFC'`\n * @returns A string containing the Unicode Normalization Form of the given string.\n */\nexport function normalize(string: string, form: 'NFC' | 'NFD' | 'NFKC' | 'NFKD' | 'none'): string {\n const upperCaseForm = form.toUpperCase();\n if (upperCaseForm === 'NONE') {\n return string;\n }\n return string.normalize(upperCaseForm);\n}\n\n/**\n * Compares two strings using an ordinal comparison approach based on the specified collation\n * options. This function uses the built-in `localeCompare` method with the 'en' locale and the\n * provided collation options to compare the strings.\n *\n * @param string1 The first string to compare.\n * @param string2 The second string to compare.\n * @param options Optional. The collation options used for comparison.\n * @returns A number indicating the result of the comparison: - Negative value if string1 precedes\n * string2 in sorting order. - Zero if string1 and string2 are equivalent in sorting order. -\n * Positive value if string1 follows string2 in sorting order.\n */\nexport function ordinalCompare(\n string1: string,\n string2: string,\n options?: Intl.CollatorOptions,\n): number {\n return string1.localeCompare(string2, 'en', options);\n}\n\n/**\n * This function mirrors the `padEnd` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Pads this string with another string (multiple times, if needed) until the resulting string\n * reaches the given length. The padding is applied from the end of this string.\n *\n * @param string String to add padding too\n * @param targetLength The length of the resulting string once the starting string has been padded.\n * If value is less than or equal to length(string), then string is returned as is.\n * @param padString The string to pad the current string with. If padString is too long to stay\n * within targetLength, it will be truncated. Default is `\" \"`\n * @returns String with appropriate padding at the end\n */\n// Note: Limit with padString only works when length(padString) = 1, will be fixed with https://github.com/sallar/stringz/pull/59\nexport function padEnd(string: string, targetLength: number, padString: string = ' '): string {\n if (targetLength <= stringLength(string)) return string;\n return stringzLimit(string, targetLength, padString, 'right');\n}\n\n/**\n * This function mirrors the `padStart` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Pads this string with another string (multiple times, if needed) until the resulting string\n * reaches the given length. The padding is applied from the start of this string.\n *\n * @param string String to add padding too\n * @param targetLength The length of the resulting string once the starting string has been padded.\n * If value is less than or equal to length(string), then string is returned as is.\n * @param padString The string to pad the current string with. If padString is too long to stay\n * within the targetLength, it will be truncated from the end. Default is `\" \"`\n * @returns String with of specified targetLength with padString applied from the start\n */\n// Note: Limit with padString only works when length(padString) = 1, will be fixed with https://github.com/sallar/stringz/pull/59\nexport function padStart(string: string, targetLength: number, padString: string = ' '): string {\n if (targetLength <= stringLength(string)) return string;\n return stringzLimit(string, targetLength, padString, 'left');\n}\n\n// This is a helper function that performs a correction on the slice index to make sure it\n// cannot go out of bounds\nfunction correctSliceIndex(length: number, index: number) {\n if (index > length) return length;\n if (index < -length) return 0;\n if (index < 0) return index + length;\n return index;\n}\n\n/**\n * This function mirrors the `slice` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Extracts a section of this string and returns it as a new string, without modifying the original\n * string.\n *\n * @param string The starting string\n * @param indexStart The index of the first character to include in the returned substring.\n * @param indexEnd The index of the first character to exclude from the returned substring.\n * @returns A new string containing the extracted section of the string.\n */\nexport function slice(string: string, indexStart: number, indexEnd?: number): string {\n const length: number = stringLength(string);\n if (\n indexStart > length ||\n (indexEnd &&\n ((indexStart > indexEnd &&\n !(indexStart >= 0 && indexStart < length && indexEnd < 0 && indexEnd > -length)) ||\n indexEnd < -length))\n )\n return '';\n\n const newStart = correctSliceIndex(length, indexStart);\n const newEnd = indexEnd ? correctSliceIndex(length, indexEnd) : undefined;\n\n return substring(string, newStart, newEnd);\n}\n\n/**\n * This function mirrors the `split` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Takes a pattern and divides the string into an ordered list of substrings by searching for the\n * pattern, puts these substrings into an array, and returns the array.\n *\n * @param string The string to split\n * @param separator The pattern describing where each split should occur\n * @param splitLimit Limit on the number of substrings to be included in the array. Splits the\n * string at each occurrence of specified separator, but stops when limit entries have been placed\n * in the array.\n * @returns An array of strings, split at each point where separator occurs in the starting string.\n * Returns undefined if separator is not found in string.\n */\nexport function split(string: string, separator: string | RegExp, splitLimit?: number): string[] {\n const result: string[] = [];\n\n if (splitLimit !== undefined && splitLimit <= 0) {\n return [string];\n }\n\n if (separator === '') return toArray(string).slice(0, splitLimit);\n\n let regexSeparator = separator;\n if (\n typeof separator === 'string' ||\n (separator instanceof RegExp && !includes(separator.flags, 'g'))\n ) {\n regexSeparator = new RegExp(separator, 'g');\n }\n\n const matches: RegExpMatchArray | null = string.match(regexSeparator);\n\n let currentIndex = 0;\n\n if (!matches) return [string];\n\n for (let index = 0; index < (splitLimit ? splitLimit - 1 : matches.length); index++) {\n const matchIndex = indexOf(string, matches[index], currentIndex);\n const matchLength = stringLength(matches[index]);\n\n result.push(substring(string, currentIndex, matchIndex));\n currentIndex = matchIndex + matchLength;\n\n if (splitLimit !== undefined && result.length === splitLimit) {\n break;\n }\n }\n\n result.push(substring(string, currentIndex));\n\n return result;\n}\n\n/**\n * This function mirrors the `startsWith` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Determines whether the string begins with the characters of a specified string, returning true or\n * false as appropriate.\n *\n * @param string String to search through\n * @param searchString The characters to be searched for at the start of this string.\n * @param position The start position at which searchString is expected to be found (the index of\n * searchString's first character). Default is `0`\n * @returns True if the given characters are found at the beginning of the string, including when\n * searchString is an empty string; otherwise, false.\n */\nexport function startsWith(string: string, searchString: string, position: number = 0): boolean {\n const indexOfSearchString = indexOf(string, searchString, position);\n if (indexOfSearchString !== position) return false;\n return true;\n}\n\n/**\n * This function mirrors the `substr` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a substring by providing start and length. This function is not exported because it is\n * considered deprecated, however it is still useful as a local helper function.\n *\n * @param string String to be divided\n * @param begin Start position. Default is `Start of string`\n * @param len Length of result. Default is `String length minus start parameter`. Default is `String\n * length minus start parameter`\n * @returns Substring from starting string\n */\nfunction substr(\n string: string,\n begin: number = 0,\n len: number = stringLength(string) - begin,\n): string {\n return stringzSubstr(string, begin, len);\n}\n\n/**\n * This function mirrors the `substring` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a substring by providing start and end position.\n *\n * @param string String to be divided\n * @param begin Start position\n * @param end End position. Default is `End of string`\n * @returns Substring from starting string\n */\nexport function substring(\n string: string,\n begin: number,\n end: number = stringLength(string),\n): string {\n return stringzSubstring(string, begin, end);\n}\n\n/**\n * This function mirrors the `toArray` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Converts a string to an array of string characters.\n *\n * @param string String to convert to array\n * @returns An array of characters from the starting string\n */\nexport function toArray(string: string): string[] {\n return stringzToArray(string);\n}\n\n/** Determine whether the string is a `LocalizeKey` meant to be localized in Platform.Bible. */\nexport function isLocalizeKey(str: string): str is LocalizeKey {\n return startsWith(str, '%') && endsWith(str, '%');\n}\n\n/**\n * Escape RegExp special characters.\n *\n * You can also use this to escape a string that is inserted into the middle of a regex, for\n * example, into a character class.\n *\n * All credit to [`escape-string-regexp`](https://www.npmjs.com/package/escape-string-regexp) - this\n * function is simply copied directly from there to allow a common js export\n *\n * @example\n *\n * import escapeStringRegexp from 'platform-bible-utils';\n *\n * const escapedString = escapeStringRegexp('How much $ for a 🦄?');\n * //=> 'How much \\\\$ for a 🦄\\\\?'\n *\n * new RegExp(escapedString);\n */\nexport function escapeStringRegexp(string: string): string {\n if (typeof string !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n // Escape characters with special meaning either inside or outside character sets.\n // Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n\n/**\n * Transforms a string or an array of strings into an array of regular expressions, ensuring that\n * the result is always an array.\n *\n * This function accepts a value that may be a single string, an array of strings, or `undefined`.\n * It then:\n *\n * - Converts each string into a `RegExp` object.\n * - If the input is an array containing nested arrays, it converts each string in the nested arrays\n * into `RegExp` objects.\n * - Ensures that the result is always an array of `RegExp` objects or arrays of `RegExp` objects.\n *\n * @param stringStringMaybeArray - The value to be transformed, which can be a single string, an\n * array of strings or arrays of strings, or `undefined`.\n * @returns An array of `RegExp` objects or arrays of `RegExp` objects. If the input is `undefined`,\n * an empty array is returned.\n */\nexport function transformAndEnsureRegExpRegExpArray(\n stringStringMaybeArray: string | (string | string[])[] | undefined,\n): (RegExp | RegExp[])[] {\n if (!stringStringMaybeArray) return [];\n\n const stringStringArray = ensureArray(stringStringMaybeArray);\n\n const regExpRegExpArray = stringStringArray.map((stringMaybeStringArray: string | string[]) =>\n Array.isArray(stringMaybeStringArray)\n ? stringMaybeStringArray.map((str) => new RegExp(str))\n : new RegExp(stringMaybeStringArray),\n );\n\n return regExpRegExpArray;\n}\n\n/**\n * Transforms a string or an array of strings into an array of regular expressions.\n *\n * This function accepts a value that may be a single string, an array of strings, or `undefined`.\n * It then:\n *\n * - Converts each string into a `RegExp` object.\n * - Ensures that the result is always an array of `RegExp` objects.\n *\n * @param stringMaybeArray - The value to be transformed, which can be a single string, an array of\n * strings, or `undefined`.\n * @returns An array of `RegExp` objects. If the input is `undefined`, an empty array is returned.\n */\nexport function transformAndEnsureRegExpArray(\n stringMaybeArray: string | string[] | undefined,\n): RegExp[] {\n if (!stringMaybeArray) return [];\n\n const stringArray = ensureArray(stringMaybeArray);\n\n const regExpArray = stringArray.map((str: string) => new RegExp(str));\n\n return regExpArray;\n}\n\n/** This is an internal-only export for testing purposes and should not be used in development */\nexport const testingStringUtils = {\n indexOfClosestClosingCurlyBrace,\n};\n","import { Canon, VerseRef } from '@sillsdev/scripture';\nimport { BookInfo, ScriptureReference } from './scripture.model';\nimport { split, startsWith } from './string-util';\n\nconst scrBookData: BookInfo[] = [\n { shortName: 'ERR', fullNames: ['ERROR'], chapters: -1 },\n { shortName: 'GEN', fullNames: ['Genesis'], chapters: 50 },\n { shortName: 'EXO', fullNames: ['Exodus'], chapters: 40 },\n { shortName: 'LEV', fullNames: ['Leviticus'], chapters: 27 },\n { shortName: 'NUM', fullNames: ['Numbers'], chapters: 36 },\n { shortName: 'DEU', fullNames: ['Deuteronomy'], chapters: 34 },\n { shortName: 'JOS', fullNames: ['Joshua'], chapters: 24 },\n { shortName: 'JDG', fullNames: ['Judges'], chapters: 21 },\n { shortName: 'RUT', fullNames: ['Ruth'], chapters: 4 },\n { shortName: '1SA', fullNames: ['1 Samuel'], chapters: 31 },\n { shortName: '2SA', fullNames: ['2 Samuel'], chapters: 24 },\n { shortName: '1KI', fullNames: ['1 Kings'], chapters: 22 },\n { shortName: '2KI', fullNames: ['2 Kings'], chapters: 25 },\n { shortName: '1CH', fullNames: ['1 Chronicles'], chapters: 29 },\n { shortName: '2CH', fullNames: ['2 Chronicles'], chapters: 36 },\n { shortName: 'EZR', fullNames: ['Ezra'], chapters: 10 },\n { shortName: 'NEH', fullNames: ['Nehemiah'], chapters: 13 },\n { shortName: 'EST', fullNames: ['Esther'], chapters: 10 },\n { shortName: 'JOB', fullNames: ['Job'], chapters: 42 },\n { shortName: 'PSA', fullNames: ['Psalm', 'Psalms'], chapters: 150 },\n { shortName: 'PRO', fullNames: ['Proverbs'], chapters: 31 },\n { shortName: 'ECC', fullNames: ['Ecclesiastes'], chapters: 12 },\n { shortName: 'SNG', fullNames: ['Song of Solomon', 'Song of Songs'], chapters: 8 },\n { shortName: 'ISA', fullNames: ['Isaiah'], chapters: 66 },\n { shortName: 'JER', fullNames: ['Jeremiah'], chapters: 52 },\n { shortName: 'LAM', fullNames: ['Lamentations'], chapters: 5 },\n { shortName: 'EZK', fullNames: ['Ezekiel'], chapters: 48 },\n { shortName: 'DAN', fullNames: ['Daniel'], chapters: 12 },\n { shortName: 'HOS', fullNames: ['Hosea'], chapters: 14 },\n { shortName: 'JOL', fullNames: ['Joel'], chapters: 3 },\n { shortName: 'AMO', fullNames: ['Amos'], chapters: 9 },\n { shortName: 'OBA', fullNames: ['Obadiah'], chapters: 1 },\n { shortName: 'JON', fullNames: ['Jonah'], chapters: 4 },\n { shortName: 'MIC', fullNames: ['Micah'], chapters: 7 },\n { shortName: 'NAM', fullNames: ['Nahum'], chapters: 3 },\n { shortName: 'HAB', fullNames: ['Habakkuk'], chapters: 3 },\n { shortName: 'ZEP', fullNames: ['Zephaniah'], chapters: 3 },\n { shortName: 'HAG', fullNames: ['Haggai'], chapters: 2 },\n { shortName: 'ZEC', fullNames: ['Zechariah'], chapters: 14 },\n { shortName: 'MAL', fullNames: ['Malachi'], chapters: 4 },\n { shortName: 'MAT', fullNames: ['Matthew'], chapters: 28 },\n { shortName: 'MRK', fullNames: ['Mark'], chapters: 16 },\n { shortName: 'LUK', fullNames: ['Luke'], chapters: 24 },\n { shortName: 'JHN', fullNames: ['John'], chapters: 21 },\n { shortName: 'ACT', fullNames: ['Acts'], chapters: 28 },\n { shortName: 'ROM', fullNames: ['Romans'], chapters: 16 },\n { shortName: '1CO', fullNames: ['1 Corinthians'], chapters: 16 },\n { shortName: '2CO', fullNames: ['2 Corinthians'], chapters: 13 },\n { shortName: 'GAL', fullNames: ['Galatians'], chapters: 6 },\n { shortName: 'EPH', fullNames: ['Ephesians'], chapters: 6 },\n { shortName: 'PHP', fullNames: ['Philippians'], chapters: 4 },\n { shortName: 'COL', fullNames: ['Colossians'], chapters: 4 },\n { shortName: '1TH', fullNames: ['1 Thessalonians'], chapters: 5 },\n { shortName: '2TH', fullNames: ['2 Thessalonians'], chapters: 3 },\n { shortName: '1TI', fullNames: ['1 Timothy'], chapters: 6 },\n { shortName: '2TI', fullNames: ['2 Timothy'], chapters: 4 },\n { shortName: 'TIT', fullNames: ['Titus'], chapters: 3 },\n { shortName: 'PHM', fullNames: ['Philemon'], chapters: 1 },\n { shortName: 'HEB', fullNames: ['Hebrews'], chapters: 13 },\n { shortName: 'JAS', fullNames: ['James'], chapters: 5 },\n { shortName: '1PE', fullNames: ['1 Peter'], chapters: 5 },\n { shortName: '2PE', fullNames: ['2 Peter'], chapters: 3 },\n { shortName: '1JN', fullNames: ['1 John'], chapters: 5 },\n { shortName: '2JN', fullNames: ['2 John'], chapters: 1 },\n { shortName: '3JN', fullNames: ['3 John'], chapters: 1 },\n { shortName: 'JUD', fullNames: ['Jude'], chapters: 1 },\n { shortName: 'REV', fullNames: ['Revelation'], chapters: 22 },\n];\n\nexport const FIRST_SCR_BOOK_NUM = 1;\nexport const LAST_SCR_BOOK_NUM = scrBookData.length - 1;\nexport const FIRST_SCR_CHAPTER_NUM = 1;\nexport const FIRST_SCR_VERSE_NUM = 1;\n\nexport const getChaptersForBook = (bookNum: number): number => {\n return scrBookData[bookNum]?.chapters ?? -1;\n};\n\nexport const offsetBook = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n bookNum: Math.max(FIRST_SCR_BOOK_NUM, Math.min(scrRef.bookNum + offset, LAST_SCR_BOOK_NUM)),\n chapterNum: 1,\n verseNum: 1,\n});\n\nexport const offsetChapter = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n ...scrRef,\n chapterNum: Math.min(\n Math.max(FIRST_SCR_CHAPTER_NUM, scrRef.chapterNum + offset),\n getChaptersForBook(scrRef.bookNum),\n ),\n verseNum: 1,\n});\n\nexport const offsetVerse = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n ...scrRef,\n verseNum: Math.max(FIRST_SCR_VERSE_NUM, scrRef.verseNum + offset),\n});\n\n/**\n * https://github.com/ubsicap/Paratext/blob/master/ParatextData/SILScriptureExtensions.cs#L72\n *\n * Convert book number to a localized Id (a short description of the book). This should be used\n * whenever a book ID (short code) is shown to the user. It is primarily needed for people who do\n * not read Roman script well and need to have books identified in a alternate script (e.g. Chinese\n * or Russian)\n *\n * @param bookNumber\n * @param localizationLanguage In BCP 47 format\n * @param getLocalizedString Function that provides the localized versions of the book ids and names\n * asynchronously.\n * @returns\n */\nexport async function getLocalizedIdFromBookNumber(\n bookNumber: number,\n localizationLanguage: string,\n getLocalizedString: (item: {\n localizeKey: string;\n languagesToSearch?: string[];\n }) => Promise,\n) {\n const id = Canon.bookNumberToId(bookNumber);\n\n if (!startsWith(Intl.getCanonicalLocales(localizationLanguage)[0], 'zh'))\n return getLocalizedString({\n localizeKey: `LocalizedId.${id}`,\n languagesToSearch: [localizationLanguage],\n });\n\n // For Chinese the normal book name is already fairly short.\n const bookName = await getLocalizedString({\n localizeKey: `Book.${id}`,\n languagesToSearch: [localizationLanguage],\n });\n const parts = split(bookName, '-');\n // some entries had a second name inside ideographic parenthesis\n const parts2 = split(parts[0], '\\xff08');\n const retVal = parts2[0].trim();\n return retVal;\n}\n\n/**\n * Get the Scripture reference as an easily comparable/sortable integer.\n *\n * @param scrRef The Scripture reference.\n * @returns An integer where the first three digits represent the book, the next three represent the\n * chapter and the last three represent the verse.\n */\nexport function scrRefToBBBCCCVVV(scrRef: ScriptureReference): number {\n return new VerseRef(scrRef.bookNum, scrRef.chapterNum, scrRef.verseNum).BBBCCCVVV;\n}\n\n/**\n * Compares two Scripture references canonically.\n *\n * @param scrRef1 The first Scripture reference to compare.\n * @param scrRef2 The second Scripture reference to compare.\n * @returns A number indicating the result of the comparison: - Negative value if scrRef1 precedes\n * scrRef2 in sorting order. - Zero if scrRef1 and scrRef2 are equivalent in sorting order. -\n * Positive value if scrRef1 follows scrRef2 in sorting order.\n */\nexport function compareScrRefs(scrRef1: ScriptureReference, scrRef2: ScriptureReference): number {\n // TODO: consider edge cases for invalid references (current implementation should suffice for\n // all but the most extreme cases)\n return scrRefToBBBCCCVVV(scrRef1) - scrRefToBBBCCCVVV(scrRef2);\n}\n\n/**\n * Formats a Scripture reference.\n *\n * @param scrRef The Scripture reference to format.\n * @param optionOrLocalizedBookName Either 'id' (the default) to format using the \"standard\" (as\n * defined by SIL/UBS) 3-letter book ID, 'English' to format using the English book name spelled\n * out, or some other string (e.g., a localized book name, vernacular abbreviation, FCBH book id,\n * etc.) to use.\n * @param chapterVerseSeparator The character used to separate the chapter number from the verse\n * number. Default is a colon (:). Note: More than one character is allowed.\n * @param bookChapterSeparator The character used to separate the book from the chapter number.\n * Default is a single space. Note: More than one character is allowed.\n * @returns The formatted reference.\n */\nexport function formatScrRef(\n scrRef: ScriptureReference,\n optionOrLocalizedBookName?: 'id' | 'English' | string,\n chapterVerseSeparator?: string,\n bookChapterSeparator?: string,\n): string {\n let book: string;\n switch (optionOrLocalizedBookName ?? 'id') {\n case 'English':\n book = Canon.bookNumberToEnglishName(scrRef.bookNum);\n break;\n case 'id':\n book = Canon.bookNumberToId(scrRef.bookNum);\n break;\n default:\n // We already dealt with undefined about in the switch, but TS is getting confused.\n book = optionOrLocalizedBookName ?? '';\n break;\n }\n return `${book}${bookChapterSeparator ?? ' '}${scrRef.chapterNum}${chapterVerseSeparator ?? ':'}${scrRef.verseNum}`;\n}\n","/** Function to run to dispose of something. Returns true if successfully unsubscribed */\nexport type Unsubscriber = () => boolean;\n\n/**\n * Returns an Unsubscriber function that combines all the unsubscribers passed in.\n *\n * @param unsubscribers All unsubscribers to aggregate into one unsubscriber\n * @returns Function that unsubscribes from all passed in unsubscribers when run\n */\nexport const aggregateUnsubscribers = (unsubscribers: Unsubscriber[]): Unsubscriber => {\n return (...args) => {\n // Run the unsubscriber for each handler\n const unsubs = unsubscribers.map((unsubscriber) => unsubscriber(...args));\n\n // If all the unsubscribers resolve to truthiness, we succeed\n return unsubs.every((success) => success);\n };\n};\n\n/**\n * Function to run to dispose of something that runs asynchronously. The promise resolves to true if\n * successfully unsubscribed\n */\nexport type UnsubscriberAsync = () => Promise;\n\n/**\n * Returns an UnsubscriberAsync function that combines all the unsubscribers passed in.\n *\n * @param unsubscribers - All unsubscribers to aggregate into one unsubscriber.\n * @returns Function that unsubscribes from all passed in unsubscribers when run\n */\nexport const aggregateUnsubscriberAsyncs = (\n unsubscribers: (UnsubscriberAsync | Unsubscriber)[],\n): UnsubscriberAsync => {\n return async (...args) => {\n // Run the unsubscriber for each handler\n const unsubPromises = unsubscribers.map(async (unsubscriber) => unsubscriber(...args));\n\n // If all the unsubscribers resolve to truthiness, we succeed\n return (await Promise.all(unsubPromises)).every((success) => success);\n };\n};\n","var getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Combine two comparators into a single comparators.\n */\nfunction combineComparators(comparatorA, comparatorB) {\n return function isEqual(a, b, state) {\n return comparatorA(a, b, state) && comparatorB(a, b, state);\n };\n}\n/**\n * Wrap the provided `areItemsEqual` method to manage the circular state, allowing\n * for circular references to be safely included in the comparison without creating\n * stack overflows.\n */\nfunction createIsCircular(areItemsEqual) {\n return function isCircular(a, b, state) {\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return areItemsEqual(a, b, state);\n }\n var cache = state.cache;\n var cachedA = cache.get(a);\n var cachedB = cache.get(b);\n if (cachedA && cachedB) {\n return cachedA === b && cachedB === a;\n }\n cache.set(a, b);\n cache.set(b, a);\n var result = areItemsEqual(a, b, state);\n cache.delete(a);\n cache.delete(b);\n return result;\n };\n}\n/**\n * Get the properties to strictly examine, which include both own properties that are\n * not enumerable and symbol properties.\n */\nfunction getStrictProperties(object) {\n return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));\n}\n/**\n * Whether the object contains the property passed as an own property.\n */\nvar hasOwn = Object.hasOwn ||\n (function (object, property) {\n return hasOwnProperty.call(object, property);\n });\n/**\n * Whether the values passed are strictly equal or both NaN.\n */\nfunction sameValueZeroEqual(a, b) {\n return a || b ? a === b : a === b || (a !== a && b !== b);\n}\n\nvar OWNER = '_owner';\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, keys = Object.keys;\n/**\n * Whether the arrays are equal in value.\n */\nfunction areArraysEqual(a, b, state) {\n var index = a.length;\n if (b.length !== index) {\n return false;\n }\n while (index-- > 0) {\n if (!state.equals(a[index], b[index], index, index, a, b, state)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the dates passed are equal in value.\n */\nfunction areDatesEqual(a, b) {\n return sameValueZeroEqual(a.getTime(), b.getTime());\n}\n/**\n * Whether the `Map`s are equal in value.\n */\nfunction areMapsEqual(a, b, state) {\n if (a.size !== b.size) {\n return false;\n }\n var matchedIndices = {};\n var aIterable = a.entries();\n var index = 0;\n var aResult;\n var bResult;\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n var bIterable = b.entries();\n var hasMatch = false;\n var matchIndex = 0;\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n var _a = aResult.value, aKey = _a[0], aValue = _a[1];\n var _b = bResult.value, bKey = _b[0], bValue = _b[1];\n if (!hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch =\n state.equals(aKey, bKey, index, matchIndex, a, b, state) &&\n state.equals(aValue, bValue, aKey, bKey, a, b, state))) {\n matchedIndices[matchIndex] = true;\n }\n matchIndex++;\n }\n if (!hasMatch) {\n return false;\n }\n index++;\n }\n return true;\n}\n/**\n * Whether the objects are equal in value.\n */\nfunction areObjectsEqual(a, b, state) {\n var properties = keys(a);\n var index = properties.length;\n if (keys(b).length !== index) {\n return false;\n }\n var property;\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index];\n if (property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof) {\n return false;\n }\n if (!hasOwn(b, property) ||\n !state.equals(a[property], b[property], property, property, a, b, state)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the objects are equal in value with strict property checking.\n */\nfunction areObjectsEqualStrict(a, b, state) {\n var properties = getStrictProperties(a);\n var index = properties.length;\n if (getStrictProperties(b).length !== index) {\n return false;\n }\n var property;\n var descriptorA;\n var descriptorB;\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index];\n if (property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof) {\n return false;\n }\n if (!hasOwn(b, property)) {\n return false;\n }\n if (!state.equals(a[property], b[property], property, property, a, b, state)) {\n return false;\n }\n descriptorA = getOwnPropertyDescriptor(a, property);\n descriptorB = getOwnPropertyDescriptor(b, property);\n if ((descriptorA || descriptorB) &&\n (!descriptorA ||\n !descriptorB ||\n descriptorA.configurable !== descriptorB.configurable ||\n descriptorA.enumerable !== descriptorB.enumerable ||\n descriptorA.writable !== descriptorB.writable)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the primitive wrappers passed are equal in value.\n */\nfunction arePrimitiveWrappersEqual(a, b) {\n return sameValueZeroEqual(a.valueOf(), b.valueOf());\n}\n/**\n * Whether the regexps passed are equal in value.\n */\nfunction areRegExpsEqual(a, b) {\n return a.source === b.source && a.flags === b.flags;\n}\n/**\n * Whether the `Set`s are equal in value.\n */\nfunction areSetsEqual(a, b, state) {\n if (a.size !== b.size) {\n return false;\n }\n var matchedIndices = {};\n var aIterable = a.values();\n var aResult;\n var bResult;\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n var bIterable = b.values();\n var hasMatch = false;\n var matchIndex = 0;\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n if (!hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch = state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state))) {\n matchedIndices[matchIndex] = true;\n }\n matchIndex++;\n }\n if (!hasMatch) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the TypedArray instances are equal in value.\n */\nfunction areTypedArraysEqual(a, b) {\n var index = a.length;\n if (b.length !== index) {\n return false;\n }\n while (index-- > 0) {\n if (a[index] !== b[index]) {\n return false;\n }\n }\n return true;\n}\n\nvar ARGUMENTS_TAG = '[object Arguments]';\nvar BOOLEAN_TAG = '[object Boolean]';\nvar DATE_TAG = '[object Date]';\nvar MAP_TAG = '[object Map]';\nvar NUMBER_TAG = '[object Number]';\nvar OBJECT_TAG = '[object Object]';\nvar REG_EXP_TAG = '[object RegExp]';\nvar SET_TAG = '[object Set]';\nvar STRING_TAG = '[object String]';\nvar isArray = Array.isArray;\nvar isTypedArray = typeof ArrayBuffer === 'function' && ArrayBuffer.isView\n ? ArrayBuffer.isView\n : null;\nvar assign = Object.assign;\nvar getTag = Object.prototype.toString.call.bind(Object.prototype.toString);\n/**\n * Create a comparator method based on the type-specific equality comparators passed.\n */\nfunction createEqualityComparator(_a) {\n var areArraysEqual = _a.areArraysEqual, areDatesEqual = _a.areDatesEqual, areMapsEqual = _a.areMapsEqual, areObjectsEqual = _a.areObjectsEqual, arePrimitiveWrappersEqual = _a.arePrimitiveWrappersEqual, areRegExpsEqual = _a.areRegExpsEqual, areSetsEqual = _a.areSetsEqual, areTypedArraysEqual = _a.areTypedArraysEqual;\n /**\n * compare the value of the two objects and return true if they are equivalent in values\n */\n return function comparator(a, b, state) {\n // If the items are strictly equal, no need to do a value comparison.\n if (a === b) {\n return true;\n }\n // If the items are not non-nullish objects, then the only possibility\n // of them being equal but not strictly is if they are both `NaN`. Since\n // `NaN` is uniquely not equal to itself, we can use self-comparison of\n // both objects, which is faster than `isNaN()`.\n if (a == null ||\n b == null ||\n typeof a !== 'object' ||\n typeof b !== 'object') {\n return a !== a && b !== b;\n }\n var constructor = a.constructor;\n // Checks are listed in order of commonality of use-case:\n // 1. Common complex object types (plain object, array)\n // 2. Common data values (date, regexp)\n // 3. Less-common complex object types (map, set)\n // 4. Less-common data values (promise, primitive wrappers)\n // Inherently this is both subjective and assumptive, however\n // when reviewing comparable libraries in the wild this order\n // appears to be generally consistent.\n // Constructors should match, otherwise there is potential for false positives\n // between class and subclass or custom object and POJO.\n if (constructor !== b.constructor) {\n return false;\n }\n // `isPlainObject` only checks against the object's own realm. Cross-realm\n // comparisons are rare, and will be handled in the ultimate fallback, so\n // we can avoid capturing the string tag.\n if (constructor === Object) {\n return areObjectsEqual(a, b, state);\n }\n // `isArray()` works on subclasses and is cross-realm, so we can avoid capturing\n // the string tag or doing an `instanceof` check.\n if (isArray(a)) {\n return areArraysEqual(a, b, state);\n }\n // `isTypedArray()` works on all possible TypedArray classes, so we can avoid\n // capturing the string tag or comparing against all possible constructors.\n if (isTypedArray != null && isTypedArray(a)) {\n return areTypedArraysEqual(a, b, state);\n }\n // Try to fast-path equality checks for other complex object types in the\n // same realm to avoid capturing the string tag. Strict equality is used\n // instead of `instanceof` because it is more performant for the common\n // use-case. If someone is subclassing a native class, it will be handled\n // with the string tag comparison.\n if (constructor === Date) {\n return areDatesEqual(a, b, state);\n }\n if (constructor === RegExp) {\n return areRegExpsEqual(a, b, state);\n }\n if (constructor === Map) {\n return areMapsEqual(a, b, state);\n }\n if (constructor === Set) {\n return areSetsEqual(a, b, state);\n }\n // Since this is a custom object, capture the string tag to determing its type.\n // This is reasonably performant in modern environments like v8 and SpiderMonkey.\n var tag = getTag(a);\n if (tag === DATE_TAG) {\n return areDatesEqual(a, b, state);\n }\n if (tag === REG_EXP_TAG) {\n return areRegExpsEqual(a, b, state);\n }\n if (tag === MAP_TAG) {\n return areMapsEqual(a, b, state);\n }\n if (tag === SET_TAG) {\n return areSetsEqual(a, b, state);\n }\n if (tag === OBJECT_TAG) {\n // The exception for value comparison is custom `Promise`-like class instances. These should\n // be treated the same as standard `Promise` objects, which means strict equality, and if\n // it reaches this point then that strict equality comparison has already failed.\n return (typeof a.then !== 'function' &&\n typeof b.then !== 'function' &&\n areObjectsEqual(a, b, state));\n }\n // If an arguments tag, it should be treated as a standard object.\n if (tag === ARGUMENTS_TAG) {\n return areObjectsEqual(a, b, state);\n }\n // As the penultimate fallback, check if the values passed are primitive wrappers. This\n // is very rare in modern JS, which is why it is deprioritized compared to all other object\n // types.\n if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {\n return arePrimitiveWrappersEqual(a, b, state);\n }\n // If not matching any tags that require a specific type of comparison, then we hard-code false because\n // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:\n // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only\n // comparison that can be made.\n // - For types that can be introspected, but rarely have requirements to be compared\n // (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common\n // use-cases (may be included in a future release, if requested enough).\n // - For types that can be introspected but do not have an objective definition of what\n // equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.\n // In all cases, these decisions should be reevaluated based on changes to the language and\n // common development practices.\n return false;\n };\n}\n/**\n * Create the configuration object used for building comparators.\n */\nfunction createEqualityComparatorConfig(_a) {\n var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;\n var config = {\n areArraysEqual: strict\n ? areObjectsEqualStrict\n : areArraysEqual,\n areDatesEqual: areDatesEqual,\n areMapsEqual: strict\n ? combineComparators(areMapsEqual, areObjectsEqualStrict)\n : areMapsEqual,\n areObjectsEqual: strict\n ? areObjectsEqualStrict\n : areObjectsEqual,\n arePrimitiveWrappersEqual: arePrimitiveWrappersEqual,\n areRegExpsEqual: areRegExpsEqual,\n areSetsEqual: strict\n ? combineComparators(areSetsEqual, areObjectsEqualStrict)\n : areSetsEqual,\n areTypedArraysEqual: strict\n ? areObjectsEqualStrict\n : areTypedArraysEqual,\n };\n if (createCustomConfig) {\n config = assign({}, config, createCustomConfig(config));\n }\n if (circular) {\n var areArraysEqual$1 = createIsCircular(config.areArraysEqual);\n var areMapsEqual$1 = createIsCircular(config.areMapsEqual);\n var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);\n var areSetsEqual$1 = createIsCircular(config.areSetsEqual);\n config = assign({}, config, {\n areArraysEqual: areArraysEqual$1,\n areMapsEqual: areMapsEqual$1,\n areObjectsEqual: areObjectsEqual$1,\n areSetsEqual: areSetsEqual$1,\n });\n }\n return config;\n}\n/**\n * Default equality comparator pass-through, used as the standard `isEqual` creator for\n * use inside the built comparator.\n */\nfunction createInternalEqualityComparator(compare) {\n return function (a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {\n return compare(a, b, state);\n };\n}\n/**\n * Create the `isEqual` function used by the consuming application.\n */\nfunction createIsEqual(_a) {\n var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;\n if (createState) {\n return function isEqual(a, b) {\n var _a = createState(), _b = _a.cache, cache = _b === void 0 ? circular ? new WeakMap() : undefined : _b, meta = _a.meta;\n return comparator(a, b, {\n cache: cache,\n equals: equals,\n meta: meta,\n strict: strict,\n });\n };\n }\n if (circular) {\n return function isEqual(a, b) {\n return comparator(a, b, {\n cache: new WeakMap(),\n equals: equals,\n meta: undefined,\n strict: strict,\n });\n };\n }\n var state = {\n cache: undefined,\n equals: equals,\n meta: undefined,\n strict: strict,\n };\n return function isEqual(a, b) {\n return comparator(a, b, state);\n };\n}\n\n/**\n * Whether the items passed are deeply-equal in value.\n */\nvar deepEqual = createCustomEqual();\n/**\n * Whether the items passed are deeply-equal in value based on strict comparison.\n */\nvar strictDeepEqual = createCustomEqual({ strict: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references.\n */\nvar circularDeepEqual = createCustomEqual({ circular: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references,\n * based on strict comparison.\n */\nvar strictCircularDeepEqual = createCustomEqual({\n circular: true,\n strict: true,\n});\n/**\n * Whether the items passed are shallowly-equal in value.\n */\nvar shallowEqual = createCustomEqual({\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nvar strictShallowEqual = createCustomEqual({\n strict: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nvar circularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references,\n * based on strict comparison.\n */\nvar strictCircularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n strict: true,\n});\n/**\n * Create a custom equality comparison method.\n *\n * This can be done to create very targeted comparisons in extreme hot-path scenarios\n * where the standard methods are not performant enough, but can also be used to provide\n * support for legacy environments that do not support expected features like\n * `RegExp.prototype.flags` out of the box.\n */\nfunction createCustomEqual(options) {\n if (options === void 0) { options = {}; }\n var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b;\n var config = createEqualityComparatorConfig(options);\n var comparator = createEqualityComparator(config);\n var equals = createCustomInternalComparator\n ? createCustomInternalComparator(comparator)\n : createInternalEqualityComparator(comparator);\n return createIsEqual({ circular: circular, comparator: comparator, createState: createState, equals: equals, strict: strict });\n}\n\nexport { circularDeepEqual, circularShallowEqual, createCustomEqual, deepEqual, sameValueZeroEqual, shallowEqual, strictCircularDeepEqual, strictCircularShallowEqual, strictDeepEqual, strictShallowEqual };\n//# sourceMappingURL=index.mjs.map\n","// There is a circular version https://www.npmjs.com/package/fast-equals#circulardeepequal that I\n// think allows comparing React refs (which have circular references in particular places that this\n// library would ignore). Maybe we can change to that version sometime if needed.\nimport { deepEqual as isEqualDeep } from 'fast-equals';\n\n/**\n * Check that two objects are deeply equal, comparing members of each object and such\n *\n * @param a The first object to compare\n * @param b The second object to compare\n *\n * WARNING: Objects like arrays from different iframes have different constructor function\n * references even if they do the same thing, so this deep equality comparison fails objects that\n * look the same but have different constructors because different constructors could produce\n * false positives in [a few specific\n * situations](https://github.com/planttheidea/fast-equals/blob/a41afc0a240ad5a472e47b53791e9be017f52281/src/comparator.ts#L96).\n * This means that two objects like arrays from different iframes that look the same will fail\n * this check. Please use some other means to check deep equality in those situations.\n *\n * Note: This deep equality check considers `undefined` values on keys of objects NOT to be equal to\n * not specifying the key at all. For example, `{ stuff: 3, things: undefined }` and `{ stuff: 3\n * }` are not considered equal in this case\n *\n * - For more information and examples, see [this\n * CodeSandbox](https://codesandbox.io/s/deepequallibrarycomparison-4g4kk4?file=/src/index.mjs).\n *\n * @returns True if a and b are deeply equal; false otherwise\n */\nexport default function deepEqual(a: unknown, b: unknown) {\n return isEqualDeep(a, b);\n}\n","import deepEqual from './equality-checking';\n\n/**\n * Check if one object is a subset of the other object. \"Subset\" means that all properties of one\n * object are present in the other object, and if they are present that all values of those\n * properties are deeply equal. Sub-objects are also checked to be subsets of the corresponding\n * sub-object in the other object.\n *\n * @example ObjB is a subset of objA given these objects:\n *\n * ```ts\n * objA = { name: 'Alice', age: 30, address: { city: 'Seattle', state: 'Washington' } };\n * objB = { name: 'Alice', address: { city: 'Seattle' } };\n * ```\n *\n * It is important to note that only arrays of primitives (i.e., booleans, numbers, strings) are\n * supported. In particular, objects in arrays will not be checked for deep equality. Also, presence\n * in an array is all this checks, not the number of times that an item appears in an array. `[1,\n * 1]` is a subset of `[1]`.\n *\n * @param objectWithAllProperties Object to be checked if it is a superset of\n * `objectWithPartialProperties`\n * @param objectWithPartialProperties Object to be checked if it is a subset of\n * `objectWithAllProperties`\n * @returns True if `objectWithAllProperties` contains all the properties of\n * `objectWithPartialProperties` and all values of those properties are deeply equal\n */\nexport default function isSubset(\n objectWithAllProperties: unknown,\n objectWithPartialProperties: unknown,\n): boolean {\n if (typeof objectWithAllProperties !== typeof objectWithPartialProperties) return false;\n\n // For this function we're saying that all falsy things of the same type are equal to each other\n if (!objectWithAllProperties && !objectWithPartialProperties) return true;\n\n if (Array.isArray(objectWithAllProperties)) {\n // We know these are arrays from the line above\n /* eslint-disable no-type-assertion/no-type-assertion */\n const partialArray = objectWithPartialProperties as Array;\n const allArray = objectWithAllProperties as Array;\n /* eslint-enable no-type-assertion/no-type-assertion */\n\n if (partialArray.length === 0) return true;\n\n // This only works with arrays of primitives.\n // If someone cares about checking arrays of objects this needs updating.\n return partialArray.every((item) => allArray.includes(item));\n }\n\n if (typeof objectWithAllProperties !== 'object')\n return deepEqual(objectWithAllProperties, objectWithPartialProperties);\n\n // We know these are objects that potentially have properties because of the earlier checks\n /* eslint-disable no-type-assertion/no-type-assertion */\n const partialObj = objectWithPartialProperties as Record;\n const allObj = objectWithAllProperties as Record;\n /* eslint-enable no-type-assertion/no-type-assertion */\n\n let retVal = true;\n Object.keys(partialObj).forEach((key) => {\n if (!retVal) return;\n if (!Object.hasOwn(allObj, key)) retVal = false;\n else if (!isSubset(allObj[key], partialObj[key])) retVal = false;\n });\n return retVal;\n}\n","/**\n * Converts a JavaScript value to a JSON string, changing `undefined` properties in the JavaScript\n * object to `null` properties in the JSON string.\n *\n * WARNING: `null` values will become `undefined` values after passing through {@link serialize} then\n * {@link deserialize}. For example, `{ a: 1, b: undefined, c: null }` will become `{ a: 1, b:\n * undefined, c: undefined }`. If you are passing around user data that needs to retain `null`\n * values, you should wrap them yourself in a string before using this function. Alternatively, you\n * can write your own replacer that will preserve `null` in a way that you can recover later.\n *\n * @param value A JavaScript value, usually an object or array, to be converted.\n * @param replacer A function that transforms the results. Note that all `undefined` values returned\n * by the replacer will be further transformed into `null` in the JSON string.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON\n * text to make it easier to read. See the `space` parameter of `JSON.stringify` for more\n * details.\n */\nexport function serialize(\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string {\n const undefinedReplacer = (replacerKey: string, replacerValue: unknown) => {\n let newValue = replacerValue;\n if (replacer) newValue = replacer(replacerKey, newValue);\n // All `undefined` values become `null` on the way from JS objects into JSON strings\n // eslint-disable-next-line no-null/no-null\n if (newValue === undefined) newValue = null;\n return newValue;\n };\n return JSON.stringify(value, undefinedReplacer, space);\n}\n\n/**\n * Converts a JSON string into a value, converting all `null` properties from JSON into `undefined`\n * in the returned JavaScript value/object.\n *\n * WARNING: `null` values will become `undefined` values after passing through {@link serialize} then\n * {@link deserialize}. For example, `{ a: 1, b: undefined, c: null }` will become `{ a: 1, b:\n * undefined, c: undefined }`. If you are passing around user data that needs to retain `null`\n * values, you should wrap them yourself in a string before using this function. Alternatively, you\n * can write your own replacer that will preserve `null` in a way that you can recover later.\n *\n * @param value A valid JSON string.\n * @param reviver A function that transforms the results. This function is called for each member of\n * the object. If a member contains nested objects, the nested objects are transformed before the\n * parent object is. Note that `null` values are converted into `undefined` values after the\n * reviver has run.\n */\nexport function deserialize(\n value: string,\n reviver?: (this: unknown, key: string, value: unknown) => unknown,\n // Need to use `any` instead of `unknown` here to match the signature of JSON.parse\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // Helper function to replace `null` with `undefined` on a per property basis. This can't be done\n // with our own reviver because `JSON.parse` removes `undefined` properties from the return value.\n function replaceNull(obj: Record): Record {\n Object.keys(obj).forEach((key: string | number) => {\n // We only want to replace `null`, not other falsy values\n // eslint-disable-next-line no-null/no-null\n if (obj[key] === null) obj[key] = undefined;\n // If the property is an object, recursively call the helper function on it\n else if (typeof obj[key] === 'object')\n // Since the object came from a string, we know the keys will not be symbols\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n obj[key] = replaceNull(obj[key] as Record);\n });\n return obj;\n }\n\n const parsedObject = JSON.parse(value, reviver);\n // Explicitly convert the value 'null' that isn't stored as a property on an object to 'undefined'\n // eslint-disable-next-line no-null/no-null\n if (parsedObject === null) return undefined;\n if (typeof parsedObject === 'object') return replaceNull(parsedObject);\n return parsedObject;\n}\n\n/**\n * Check to see if the value is serializable without losing information\n *\n * @param value Value to test\n * @returns True if serializable; false otherwise\n *\n * Note: the values `undefined` and `null` are serializable (on their own or in an array), but\n * `null` values get transformed into `undefined` when serializing/deserializing.\n *\n * WARNING: This is inefficient right now as it stringifies, parses, stringifies, and === the value.\n * Please only use this if you need to\n *\n * DISCLAIMER: this does not successfully detect that values are not serializable in some cases:\n *\n * - Losses of removed properties like functions and `Map`s\n * - Class instances (not deserializable into class instances without special code)\n *\n * We intend to improve this in the future if it becomes important to do so. See [`JSON.stringify`\n * documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description)\n * for more information.\n */\nexport function isSerializable(value: unknown): boolean {\n try {\n const serializedValue = serialize(value);\n return serializedValue === serialize(deserialize(serializedValue));\n } catch (e) {\n return false;\n }\n}\n\n/**\n * HTML Encodes the provided string. Thanks to ChatGPT\n *\n * @param str String to HTML encode\n * @returns HTML-encoded string\n */\nexport const htmlEncode = (str: string): string =>\n str\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(/\\//g, '/');\n","import DateTimeFormat from './intl-date-time-format';\n\n/**\n * Retrieves the current locale of the user's environment.\n *\n * @returns A string representing the current locale. If the locale cannot be determined, the\n * function returns an empty string.\n */\nexport default function getCurrentLocale(): string {\n // Use navigator when available\n if (typeof navigator !== 'undefined' && navigator.languages) {\n return navigator.languages[0];\n }\n // For Node.js\n return new DateTimeFormat().resolvedOptions().locale;\n}\n","import NumberFormat from './intl-number-format';\n\n/**\n * Formats a number according to the locale and formatting options of this NumberFormat object\n *\n * @example FormatBytes(1024) => \"1 KB\"\n *\n * @example FormatBytes(1024, 0) => \"1 KB\"\n *\n * @param fileSize Number to format\n * @param decimals Number of decimal places to round to\n * @returns String representing the given number formatted according to the locale and formatting\n * options of this NumberFormat object\n */\nexport default function formatBytes(fileSize: number, decimals: number = 2): string {\n if (fileSize === 0) return '0 Bytes';\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n const i = Math.floor(Math.log(fileSize) / Math.log(1024));\n const sizeToUse = sizes[i];\n const formattingFileSize = new NumberFormat('en', {\n style: 'decimal',\n maximumFractionDigits: decimals,\n minimumFractionDigits: 0,\n }).format(fileSize / 1024 ** i);\n return `${formattingFileSize} ${sizeToUse}`;\n}\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { LocalizeKey, ReferencedItem } from 'menus.model';\n\n/** The data an extension provides to inform Platform.Bible of the settings it provides */\nexport type SettingsContribution = SettingsGroup | SettingsGroup[];\n/** A description of an extension's setting entry */\nexport type Setting = ExtensionControlledSetting;\n/** Setting definition that is validated by the extension. */\nexport type ExtensionControlledSetting = SettingBase & ModifierExtensionControlled;\n/** Base information needed to describe a setting entry */\nexport type SettingBase = StateBase & {\n [k: string]: unknown;\n /** LocalizeKey that displays in the settings dialog as the setting name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the settings dialog to describe the setting */\n description?: LocalizeKey;\n};\n/** The data an extension provides to inform Platform.Bible of the project settings it provides */\nexport type ProjectSettingsContribution = ProjectSettingsGroup | ProjectSettingsGroup[];\n/** A description of an extension's setting entry */\nexport type ProjectSetting = ExtensionControlledProjectSetting;\n/** Setting definition that is validated by the extension. */\nexport type ExtensionControlledProjectSetting = ProjectSettingBase & ModifierExtensionControlled;\n/** Base information needed to describe a project setting entry */\nexport type ProjectSettingBase = SettingBase & ModifierProject;\n/** A description of an extension's user state entry */\nexport type UserState = ExtensionControlledState;\n/** State definition that is validated by the extension. */\nexport type ExtensionControlledState = StateBase & ModifierExtensionControlled;\n/** Group of related settings definitions */\nexport interface SettingsGroup {\n [k: string]: unknown;\n /** LocalizeKey that displays in the settings dialog as the group name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the settings dialog to describe the group */\n description?: LocalizeKey;\n properties: SettingProperties;\n}\n/** Object whose keys are setting IDs and whose values are settings objects */\nexport interface SettingProperties {\n [k: ReferencedItem]: Setting;\n}\n/** Base information needed to describe a state entry */\nexport interface StateBase {\n [k: string]: unknown;\n /** Default value for the state/setting */\n default: unknown;\n /**\n * A state/setting ID whose value to set to this state/setting's starting value the first time\n * this state/setting is loaded\n */\n derivesFrom?: ReferencedItem;\n}\n/**\n * Modifies state/setting type to be extension-controlled. \"Extension-controlled\" means the\n * extension provides the component and the validator for the state/setting, so the state/setting is\n * controlled by the extension.\n */\nexport interface ModifierExtensionControlled {\n [k: string]: unknown;\n platformType?: undefined;\n type?: undefined;\n}\n/** Group of related settings definitions */\nexport interface ProjectSettingsGroup {\n [k: string]: unknown;\n /** LocalizeKey that displays in the project settings dialog as the group name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the project settings dialog to describe the group */\n description?: LocalizeKey;\n properties: ProjectSettingProperties;\n}\n/** Object whose keys are setting IDs and whose values are settings objects */\nexport interface ProjectSettingProperties {\n [k: ReferencedItem]: ProjectSetting;\n}\n\n// Note: we removed the index signature on ModifierProject to avoid having it on\n// `ProjectMetadataFilterOptions`. Unfortunately adding \"additionalProperties\": false on the json\n// schema messes up validation. Please remove the index signature again in the future if you\n// regenerate types\nexport interface ModifierProject {\n /**\n * String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s\n * (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if they should be included.\n *\n * If this is one string, it will be matched against `projectInterface`s. If this is an array,\n * each entry is handled based on its type (at least one entry must match for this filter\n * condition to pass):\n *\n * - If the entry is a string, it will be matched against each `projectInterface`. If any match, the\n * project will pass this filter condition\n * - If the entry is an array of strings, each will be matched against each `projectInterface`. If\n * every string matches against at least one `projectInterface`, the project will pass this\n * filter condition\n *\n * In other words, each entry in the first-level array is `OR`'ed together. Each entry in\n * second-level arrays (arrays within the first-level array) are `AND`'ed together.\n *\n * Defaults to all {@link ProjectInterfaces}, so all projects that do not match\n * `excludeProjectInterfaces` will be included\n *\n * @example\n *\n * ```typescript\n * includeProjectInterfaces: ['one', ['two', 'three']];\n * ```\n *\n * This filter condition will succeed on projects whose `projectInterface`s fulfill at least one\n * of the following conditions (At least one entry in the array must match):\n *\n * - Include `one`\n * - Include both `two` and `three`.\n */\n includeProjectInterfaces?: undefined | string | (string | string[])[];\n /**\n * String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s\n * (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if they should absolutely not be included even if they match with\n * `includeProjectInterfaces`.\n *\n * If this is one string, it will be matched against `projectInterface`s. If this is an array,\n * each entry is handled based on its type (at least one entry must match for this filter\n * condition to exclude the project):\n *\n * - If the entry is a string, it will be matched against each `projectInterface`. If any match, the\n * project will pass this filter condition and exclude the project\n * - If the entry is an array of strings, each will be matched against each `projectInterface`. If\n * every string matches against at least one `projectInterface`, the project will pass this\n * filter condition and exclude the project\n *\n * In other words, each entry in the first-level array is `OR`'ed together. Each entry in\n * second-level arrays (arrays within the first-level array) are `AND`'ed together.\n *\n * Defaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces`\n * will be included\n *\n * @example\n *\n * ```typescript\n * excludeProjectInterfaces: ['one', ['two', 'three']];\n * ```\n *\n * This filter condition will succeed and exclude projects whose `projectInterface`s fulfill at\n * least one of the following conditions (At least one entry in the array must match):\n *\n * - Include `one`\n * - Include both `two` and `three`.\n */\n excludeProjectInterfaces?: undefined | string | (string | string[])[];\n /**\n * String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory\n * Ids that provided each project's metadata (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if the projects should be included.\n *\n * Defaults to all Project Data Provider Factory Ids, so all projects that do not match\n * `excludePdpFactoryIds` will be included\n */\n includePdpFactoryIds?: undefined | string | string[];\n /**\n * String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory\n * Ids that provided each project's metadata (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if the projects should absolutely not be included even if they match\n * with `includeProjectInterfaces`.\n *\n * Defaults to none, so all projects that match `includePdpFactoryIds` will be included\n */\n excludePdpFactoryIds?: undefined | string | string[];\n}\n\n/** The data an extension provides to inform Platform.Bible of the user state it provides */\nexport interface UserStateContribution {\n [k: ReferencedItem]: UserState;\n}\n/** The data an extension provides to inform Platform.Bible of the project state it provides */\nexport interface ProjectStateContribution {\n [k: ReferencedItem]: UserState;\n}\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\nconst settingsDefs = {\n projectSettingsContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the project settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/projectSettingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/projectSettingsGroup',\n },\n },\n ],\n },\n projectSettingsGroup: {\n description: 'Group of related settings definitions',\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the project settings dialog as the group name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description:\n 'localizeKey that displays in the project settings dialog to describe the group',\n $ref: '#/$defs/localizeKey',\n },\n properties: {\n $ref: '#/$defs/projectSettingProperties',\n },\n },\n required: ['label', 'properties'],\n },\n projectSettingProperties: {\n description: 'Object whose keys are setting IDs and whose values are settings objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/projectSetting',\n },\n },\n additionalProperties: false,\n },\n projectSetting: {\n description: \"A description of an extension's setting entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledProjectSetting',\n },\n ],\n },\n extensionControlledProjectSetting: {\n description: 'Setting definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/projectSettingBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n projectSettingBase: {\n description: 'Base information needed to describe a project setting entry',\n allOf: [\n {\n $ref: '#/$defs/settingBase',\n },\n {\n $ref: '#/$defs/modifierProject',\n },\n ],\n },\n modifierProject: {\n description: 'Modifies setting type to be project setting',\n type: 'object',\n properties: {\n includeProjectInterfaces: {\n description:\n \"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should be included.\\n\\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to pass):\\n\\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition\\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition\\n\\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\\n\\nDefaults to all {@link ProjectInterfaces}, so all projects that do not match `excludeProjectInterfaces` will be included\\n\\n@example\\n\\n```typescript\\nincludeProjectInterfaces: ['one', ['two', 'three']];\\n```\\n\\nThis filter condition will succeed on projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\\n\\n- Include `one`\\n- Include both `two` and `three`.\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n ],\n },\n excludeProjectInterfaces: {\n description:\n \"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should absolutely not be included even if they match with `includeProjectInterfaces`.\\n\\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to exclude the project):\\n\\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition and exclude the project\\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition and exclude the project\\n\\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\\n\\nDefaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces` will be included\\n\\n@example\\n\\n```typescript\\nexcludeProjectInterfaces: ['one', ['two', 'three']];\\n```\\n\\nThis filter condition will succeed and exclude projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\\n\\n- Include `one`\\n- Include both `two` and `three`.\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n ],\n },\n includePdpFactoryIds: {\n description:\n \"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should be included.\\n\\nDefaults to all Project Data Provider Factory Ids, so all projects that do not match `excludePdpFactoryIds` will be included\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n excludePdpFactoryIds: {\n description:\n \"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should absolutely not be included even if they match with `includeProjectInterfaces`.\\n\\nDefaults to none, so all projects that match `includePdpFactoryIds` will be included\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n },\n settingsContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/settingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/settingsGroup',\n },\n },\n ],\n },\n settingsGroup: {\n description: 'Group of related settings definitions',\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the settings dialog as the group name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description: 'localizeKey that displays in the settings dialog to describe the group',\n $ref: '#/$defs/localizeKey',\n },\n properties: {\n $ref: '#/$defs/settingProperties',\n },\n },\n required: ['label', 'properties'],\n },\n settingProperties: {\n description: 'Object whose keys are setting IDs and whose values are settings objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w-]+\\\\.[\\\\w-]+$': {\n $ref: '#/$defs/setting',\n },\n },\n additionalProperties: false,\n },\n setting: {\n description: \"A description of an extension's setting entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledSetting',\n },\n ],\n },\n extensionControlledSetting: {\n description: 'Setting definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/settingBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n settingBase: {\n description: 'Base information needed to describe a setting entry',\n allOf: [\n {\n $ref: '#/$defs/stateBase',\n },\n {\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the settings dialog as the setting name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description: 'localizeKey that displays in the settings dialog to describe the setting',\n $ref: '#/$defs/localizeKey',\n },\n },\n required: ['label'],\n },\n ],\n },\n projectStateContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the project state it provides',\n $ref: '#/$defs/userStateProperties',\n },\n userStateContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the user state it provides',\n $ref: '#/$defs/userStateProperties',\n },\n userStateProperties: {\n description: 'Object whose keys are state IDs and whose values are state objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/userState',\n },\n },\n additionalProperties: false,\n },\n userState: {\n description: \"A description of an extension's user state entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledState',\n },\n ],\n },\n extensionControlledState: {\n description: 'State definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/stateBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n modifierExtensionControlled: {\n description:\n 'Modifies state/setting type to be extension-controlled. \"Extension-controlled\" means the extension provides the component and the validator for the state/setting, so the state/setting is controlled by the extension.',\n not: {\n anyOf: [\n {\n type: 'object',\n required: ['platformType'],\n },\n {\n type: 'object',\n required: ['type'],\n },\n ],\n },\n },\n stateBase: {\n description: 'Base information needed to describe a state entry',\n type: 'object',\n properties: {\n default: {\n description: 'default value for the state/setting',\n type: 'any',\n },\n derivesFrom: {\n description:\n \"a state/setting ID whose value to set to this state/setting's starting value the first time this state/setting is loaded\",\n $ref: '#/$defs/id',\n },\n },\n required: ['default'],\n },\n localizeKey: {\n description: \"Identifier for a string that will be localized based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n tsType: 'LocalizeKey',\n },\n id: {\n description: '',\n type: 'string',\n pattern: '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$',\n tsType: 'Id',\n },\n};\n\n/**\n * Json-schema-to-typescript has some added stuff that isn't actually compatible with JSON schema,\n * so we remove them here\n *\n * @param defs The `$defs` property of a JSON schema (will be modified in place)\n */\n// JSON schema types are weird, so we'll just be careful\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function removeJsonToTypeScriptTypesStuff(defs: any) {\n if (!defs) return;\n\n // JSON schema types are weird, so we'll just be careful\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Object.values(defs).forEach((def: any) => {\n if (!def.type) return;\n\n if ('tsType' in def) delete def.tsType;\n\n if (def.type === 'any') {\n delete def.type;\n return;\n }\n\n if (def.type === 'object') {\n removeJsonToTypeScriptTypesStuff(def.properties);\n }\n });\n}\n\nremoveJsonToTypeScriptTypesStuff(settingsDefs);\n\n/** JSON schema object that aligns with the ProjectSettingsContribution type */\nexport const projectSettingsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Project Settings Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the project settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/projectSettingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/projectSettingsGroup',\n },\n },\n ],\n\n $defs: settingsDefs,\n};\n\nObject.freeze(projectSettingsDocumentSchema);\n\n/** JSON schema object that aligns with the {@link SettingsContribution} type */\nexport const settingsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Settings Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/settingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/settingsGroup',\n },\n },\n ],\n\n $defs: settingsDefs,\n};\n\nObject.freeze(settingsDocumentSchema);\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { LocalizeKey } from 'menus.model';\nimport { removeJsonToTypeScriptTypesStuff } from './settings.model';\n\n/** Localized string value associated with this key */\nexport type LocalizedStringValue = string;\n\n/** The data an extension provides to inform Platform.Bible of the localized strings it provides. */\nexport interface LocalizedStringDataContribution {\n [k: string]: unknown;\n metadata?: StringsMetadata;\n localizedStrings?: {\n [k: string]: LanguageStrings;\n };\n}\n/**\n * Map whose keys are localized string keys and whose values provide additional non-locale-specific\n * information about the localized string key\n */\nexport interface StringsMetadata {\n [k: LocalizeKey]: StringMetadata;\n}\n/** Additional non-locale-specific information about a localized string key */\nexport interface StringMetadata {\n [k: string]: unknown;\n /**\n * Localized string key from which to get this value if one does not exist in the specified\n * language. If a new key/value pair needs to be made to replace an existing one, this could help\n * smooth over the transition if the meanings are close enough\n *\n * You can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a\n * backslash `\\`.\n */\n fallbackKey?: LocalizeKey;\n /**\n * Additional information provided by developers in English to help the translator to know how to\n * translate this localized string accurately\n */\n notes?: string;\n}\n/**\n * Map whose keys are localized string keys and whose values provide information about how to\n * localize strings for the localized string key\n */\nexport interface LanguageStrings {\n [k: LocalizeKey]: LocalizedStringValue;\n}\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\n\nconst localizedStringsDefs = {\n languageStrings: {\n description:\n 'Map whose keys are localized string keys and whose values provide information about how to localize strings for the localized string key',\n type: 'object',\n patternProperties: {\n '^%[\\\\w\\\\-\\\\.]+%$': {\n $ref: '#/$defs/localizedStringValue',\n },\n },\n additionalProperties: false,\n },\n localizedStringValue: {\n description: 'Localized string value associated with this key',\n type: 'string',\n },\n stringsMetadata: {\n description:\n 'Map whose keys are localized string keys and whose values provide additional non-locale-specific information about the localized string key',\n type: 'object',\n patternProperties: {\n '^%[\\\\w\\\\-\\\\.]+%$': {\n $ref: '#/$defs/stringMetadata',\n },\n },\n additionalProperties: false,\n },\n stringMetadata: {\n description: 'Additional non-locale-specific information about a localized string key',\n type: 'object',\n properties: {\n fallbackKey: {\n description:\n 'Localized string key from which to get this value if one does not exist in the specified language. If a new key/value pair needs to be made to replace an existing one, this could help smooth over the transition if the meanings are close enough.\\nYou can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a backslash `\\\\`.',\n type: 'string',\n pattern: \"^%[\\\\w\\\\-\\\\.;&,' (){}#:/\\\\\\\\?%⋮|[\\\\]“”‘’!~*\\u00A0+=•`…\\u200B↑↓]+%$\",\n tsType: 'LocalizeKey',\n },\n notes: {\n description:\n 'Additional information provided by developers in English to help the translator to know how to translate this localized string accurately',\n type: 'string',\n },\n },\n },\n localizeKey: {\n description: \"Identifier for a string that will be localized based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n tsType: 'LocalizeKey',\n },\n};\n\nremoveJsonToTypeScriptTypesStuff(localizedStringsDefs);\n\n/** JSON schema object that aligns with the LocalizedStringDataContribution type */\nexport const localizedStringsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Localized String Data Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the localized strings it provides.',\n type: 'object',\n properties: {\n metadata: {\n $ref: '#/$defs/stringsMetadata',\n },\n localizedStrings: {\n type: 'object',\n additionalProperties: {\n $ref: '#/$defs/languageStrings',\n },\n },\n },\n $defs: localizedStringsDefs,\n};\n\nObject.freeze(localizedStringsDocumentSchema);\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { ReplaceType } from './util';\n\n/** Identifier for a string that will be localized in a menu based on the user's UI language */\nexport type LocalizeKey = `%${string}%`;\n\n/** Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command) */\nexport type ReferencedItem = `${string}.${string}`;\n\nexport type OrderedItem = {\n /** Relative order of this item compared to other items in the same parent/scope (sorted ascending) */\n order: number;\n};\n\nexport type OrderedExtensibleContainer = OrderedItem & {\n /** Determines whether other items can be added to this after it has been defined */\n isExtensible?: boolean;\n};\n\n/** Group of menu items that belongs in a column */\nexport type MenuGroupDetailsInColumn = OrderedExtensibleContainer & {\n /** ID of column in which this group resides */\n column: ReferencedItem;\n};\n\n/** Group of menu items that belongs in a submenu */\nexport type MenuGroupDetailsInSubMenu = OrderedExtensibleContainer & {\n /** ID of menu item hosting the submenu in which this group resides */\n menuItem: ReferencedItem;\n};\n\n/** Column that includes header text in a menu */\nexport type MenuColumnWithHeader = OrderedExtensibleContainer & {\n /** Key that represents the text of the header text of the column */\n label: LocalizeKey;\n};\n\nexport type MenuItemBase = OrderedItem & {\n /** Menu group to which this menu item belongs */\n group: ReferencedItem;\n /** Key that represents the text of this menu item to display */\n label: LocalizeKey;\n /** Key that represents words the platform should reference when users are searching for menu items */\n searchTerms?: LocalizeKey;\n /** Key that represents the text to display if a mouse pointer hovers over the menu item */\n tooltip?: LocalizeKey;\n /** Additional information provided by developers to help people who perform localization */\n localizeNotes: string;\n};\n\n/** Menu item that hosts a submenu */\nexport type MenuItemContainingSubmenu = MenuItemBase & {\n /** ID for this menu item that holds a submenu */\n id: ReferencedItem;\n};\n\n/** Menu item that runs a command */\nexport type MenuItemContainingCommand = MenuItemBase & {\n /** Name of the PAPI command to run when this menu item is selected. */\n command: ReferencedItem;\n /**\n * Uri path to the icon to display after the menu text. Ex:\n * `papi-extension://helloWorld/assets/icon.png`\n */\n iconPathAfter?: string;\n /**\n * Uri path to the icon to display before the menu text. Ex:\n * `papi-extension://helloWorld/assets/icon.png`\n */\n iconPathBefore?: string;\n};\n\n/**\n * Group of menu items that can be combined with other groups to form a single context menu/submenu.\n * Groups are separated using a line within the menu/submenu.\n */\nexport type GroupsInSingleColumnMenu = {\n /** Named menu group */\n [property: ReferencedItem]: OrderedExtensibleContainer | MenuGroupDetailsInSubMenu;\n};\n\n/**\n * Group of menu items that can be combined with other groups to form a single menu/submenu within a\n * multi-column menu. Groups are separated using a line within the menu/submenu.\n */\nexport type GroupsInMultiColumnMenu = {\n /** Named menu group */\n [property: ReferencedItem]: MenuGroupDetailsInColumn | MenuGroupDetailsInSubMenu;\n};\n\n/** Group of columns that can be combined with other columns to form a multi-column menu */\nexport type ColumnsWithHeaders = {\n /** Named column of a menu */\n [property: ReferencedItem]: MenuColumnWithHeader;\n /** Defines whether columns can be added to this multi-column menu */\n isExtensible?: boolean;\n};\n\n/** Menu that contains a column without a header */\nexport type SingleColumnMenu = {\n /** Groups that belong in this menu */\n groups: GroupsInSingleColumnMenu;\n /** List of menu items that belong in this menu */\n items: (MenuItemContainingCommand | MenuItemContainingSubmenu)[];\n};\n\n/** Menu that contains multiple columns with headers */\nexport type MultiColumnMenu = {\n /** Columns that belong in this menu */\n columns: ColumnsWithHeaders;\n /** Groups that belong in this menu */\n groups: GroupsInMultiColumnMenu;\n /** List of menu items that belong in this menu */\n items: (MenuItemContainingCommand | MenuItemContainingSubmenu)[];\n};\n\n/** Menus for one single web view */\nexport type WebViewMenu = {\n /** Indicates whether the platform default menus should be included for this webview */\n includeDefaults: boolean | undefined;\n /** Menu that opens when you click on the top left corner of a tab */\n topMenu: MultiColumnMenu | undefined;\n /** Menu that opens when you right click on the main body/area of a tab */\n contextMenu: SingleColumnMenu | undefined;\n};\n\n/** Menus for all web views */\nexport type WebViewMenus = {\n /** Named web view */\n [property: ReferencedItem]: WebViewMenu;\n};\n\n/** Platform.Bible menus before they are localized */\nexport type PlatformMenus = {\n /** Top level menu for the application */\n mainMenu: MultiColumnMenu;\n /** Menus that apply per web view in the application */\n webViewMenus: WebViewMenus;\n /** Default context menu for web views that don't specify their own */\n defaultWebViewContextMenu: SingleColumnMenu;\n /** Default top menu for web views that don't specify their own */\n defaultWebViewTopMenu: MultiColumnMenu;\n};\n\n/**\n * Type that converts any menu type before it is localized to what it is after it is localized. This\n * can be applied to any menu type as needed.\n */\nexport type Localized = ReplaceType, ReferencedItem, string>;\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\n/** JSON schema object that aligns with the PlatformMenus type */\nexport const menuDocumentSchema = {\n title: 'Platform.Bible menus',\n type: 'object',\n properties: {\n mainMenu: {\n description: 'Top level menu for the application',\n $ref: '#/$defs/multiColumnMenu',\n },\n defaultWebViewTopMenu: {\n description: \"Default top menu for web views that don't specify their own\",\n $ref: '#/$defs/multiColumnMenu',\n },\n defaultWebViewContextMenu: {\n description: \"Default context menu for web views that don't specify their own\",\n $ref: '#/$defs/singleColumnMenu',\n },\n webViewMenus: {\n description: 'Menus that apply per web view in the application',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/menusForOneWebView',\n },\n },\n additionalProperties: false,\n },\n },\n required: ['mainMenu', 'defaultWebViewTopMenu', 'defaultWebViewContextMenu', 'webViewMenus'],\n additionalProperties: false,\n $defs: {\n localizeKey: {\n description:\n \"Identifier for a string that will be localized in a menu based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n },\n referencedItem: {\n description:\n 'Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command)',\n type: 'string',\n pattern: '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$',\n },\n columnsWithHeaders: {\n description:\n 'Group of columns that can be combined with other columns to form a multi-column menu',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n description: 'Single column with a header string',\n type: 'object',\n properties: {\n label: {\n description: 'Header text for this this column in the UI',\n $ref: '#/$defs/localizeKey',\n },\n localizeNotes: {\n description:\n 'Additional information provided by developers to help people who perform localization',\n type: 'string',\n },\n order: {\n description:\n 'Relative order of this column compared to other columns (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu groups to this column',\n type: 'boolean',\n },\n },\n required: ['label', 'order'],\n additionalProperties: false,\n },\n },\n properties: {\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add columns to this multi-column menu',\n type: 'boolean',\n },\n },\n },\n menuGroups: {\n description:\n 'Group of menu items that can be combined with other groups to form a single menu/submenu. Groups are separated using a line within the menu/submenu.',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n description: 'Single group that contains menu items',\n type: 'object',\n oneOf: [\n {\n properties: {\n column: {\n description:\n 'Column where this group belongs, not required for single column menus',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this group compared to other groups in the same column or submenu (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu items to this menu group',\n type: 'boolean',\n },\n },\n required: ['order'],\n additionalProperties: false,\n },\n {\n properties: {\n menuItem: {\n description: 'Menu item that anchors the submenu where this group belongs',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this group compared to other groups in the same column or submenu (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu items to this menu group',\n type: 'boolean',\n },\n },\n required: ['menuItem', 'order'],\n additionalProperties: false,\n },\n ],\n },\n },\n additionalProperties: false,\n },\n menuItem: {\n description:\n 'Single item in a menu that can be clicked on to take an action or can be the parent of a submenu',\n type: 'object',\n oneOf: [\n {\n properties: {\n id: {\n description: 'ID for this menu item that holds a submenu',\n $ref: '#/$defs/referencedItem',\n },\n },\n required: ['id'],\n },\n {\n properties: {\n command: {\n description: 'Name of the PAPI command to run when this menu item is selected.',\n $ref: '#/$defs/referencedItem',\n },\n iconPathBefore: {\n description:\n 'Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`',\n type: 'string',\n },\n iconPathAfter: {\n description:\n 'Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`',\n type: 'string',\n },\n },\n required: ['command'],\n },\n ],\n properties: {\n label: {\n description: 'Key that represents the text of this menu item to display',\n $ref: '#/$defs/localizeKey',\n },\n tooltip: {\n description:\n 'Key that represents the text to display if a mouse pointer hovers over the menu item',\n $ref: '#/$defs/localizeKey',\n },\n searchTerms: {\n description:\n 'Key that represents additional words the platform should reference when users are searching for menu items',\n $ref: '#/$defs/localizeKey',\n },\n localizeNotes: {\n description:\n 'Additional information provided by developers to help people who perform localization',\n type: 'string',\n },\n group: {\n description: 'Group to which this menu item belongs',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this menu item compared to other menu items in the same group (sorted ascending)',\n type: 'number',\n },\n },\n required: ['label', 'group', 'order'],\n unevaluatedProperties: false,\n },\n groupsAndItems: {\n description: 'Core schema for a column',\n type: 'object',\n properties: {\n groups: {\n description: 'Groups that belong in this menu',\n $ref: '#/$defs/menuGroups',\n },\n items: {\n description: 'List of menu items that belong in this menu',\n type: 'array',\n items: { $ref: '#/$defs/menuItem' },\n uniqueItems: true,\n },\n },\n required: ['groups', 'items'],\n },\n singleColumnMenu: {\n description: 'Menu that contains a column without a header',\n type: 'object',\n allOf: [{ $ref: '#/$defs/groupsAndItems' }],\n unevaluatedProperties: false,\n },\n multiColumnMenu: {\n description: 'Menu that can contain multiple columns with headers',\n type: 'object',\n allOf: [\n { $ref: '#/$defs/groupsAndItems' },\n {\n properties: {\n columns: {\n description: 'Columns that belong in this menu',\n $ref: '#/$defs/columnsWithHeaders',\n },\n },\n required: ['columns'],\n },\n ],\n unevaluatedProperties: false,\n },\n menusForOneWebView: {\n description: 'Set of menus that are associated with a single tab',\n type: 'object',\n properties: {\n includeDefaults: {\n description:\n 'Indicates whether the platform default menus should be included for this webview',\n type: 'boolean',\n },\n topMenu: {\n description: 'Menu that opens when you click on the top left corner of a tab',\n $ref: '#/$defs/multiColumnMenu',\n },\n contextMenu: {\n description: 'Menu that opens when you right click on the main body/area of a tab',\n $ref: '#/$defs/singleColumnMenu',\n },\n },\n additionalProperties: false,\n },\n },\n};\n\nObject.freeze(menuDocumentSchema);\n"],"names":["AsyncVariable","variableName","rejectIfNotSettledWithinMS","__publicField","resolve","reject","value","throwIfAlreadySettled","reason","Collator","locales","options","string1","string2","DateTimeFormat","date","startDate","endDate","PlatformEventEmitter","event","callback","callbackIndex","newGuid","s","isString","o","deepClone","obj","debounce","fn","delay","timeout","args","groupBy","items","keySelector","valueSelector","map","item","key","group","isErrorWithMessage","error","toErrorWithMessage","maybeError","getErrorMessage","wait","ms","waitForDuration","maxWaitTimeInMS","getAllObjectFunctionNames","_objId","objectFunctionNames","property","objectPrototype","createSyncProxyForAsyncObject","getObject","objectToProxy","target","prop","DocumentCombiner","baseDocument","documentName","document","previousDocumentVersion","documentToSet","contributions","contributionName","potentialOutput","outputIteration","contribution","mergeObjects","output","finalOutput","areNonArrayObjects","values","allMatch","areArrayObjects","startingPoint","copyFrom","ignoreDuplicateProperties","retVal","mergeObjectsInternal","startingPointObj","copyFromObj","Mutex","AsyncMutex","MutexMap","mutexID","NonValidatingDocumentCombiner","NumberFormat","startRange","endRange","UnsubscriberAsyncList","name","unsubscribers","unsubscriber","unsubs","results","unsubscriberSucceeded","index","P","R","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","r","D","i","a","u","v","f","d","b","p","J","M","charRegex","astralRange","comboMarksRange","comboHalfMarksRange","comboSymbolsRange","comboMarksExtendedRange","comboMarksSupplementRange","comboRange","varRange","familyRange","astral","combo","fitz","modifier","nonAstral","regional","surrogatePair","zwj","blackFlag","family","optModifier","optVar","optJoin","seq","symbol","__importDefault","this","mod","dist","char_regex_1","require$$0","toArray","str","toArray_1","length","match","length_1","substring","begin","end","substring_1","substr","len","strLength","substr_1","limit","padString","padPosition","padRepeats","limit_1","indexOf","searchStr","pos","strArr","searchArr","finded","searchIndex","indexOf_1","ensureArray","maybeArray","at","string","stringLength","charAt","codePointAt","endsWith","searchString","endPosition","lastIndexOfSearchString","lastIndexOf","indexOfClosestClosingCurlyBrace","escaped","closeCurlyBraceIndex","formatReplacementString","replacers","updatedStr","replacerKey","replacerString","includes","position","partialString","stringzIndexOf","validatedPosition","stringzLength","normalize","form","upperCaseForm","ordinalCompare","padEnd","targetLength","stringzLimit","padStart","correctSliceIndex","slice","indexStart","indexEnd","newStart","newEnd","split","separator","splitLimit","result","regexSeparator","matches","currentIndex","matchIndex","matchLength","startsWith","stringzSubstr","stringzSubstring","stringzToArray","isLocalizeKey","escapeStringRegexp","transformAndEnsureRegExpRegExpArray","stringStringMaybeArray","stringMaybeStringArray","transformAndEnsureRegExpArray","stringMaybeArray","scrBookData","FIRST_SCR_BOOK_NUM","LAST_SCR_BOOK_NUM","FIRST_SCR_CHAPTER_NUM","FIRST_SCR_VERSE_NUM","getChaptersForBook","bookNum","_a","offsetBook","scrRef","offset","offsetChapter","offsetVerse","getLocalizedIdFromBookNumber","bookNumber","localizationLanguage","getLocalizedString","id","Canon","bookName","parts","scrRefToBBBCCCVVV","VerseRef","compareScrRefs","scrRef1","scrRef2","formatScrRef","optionOrLocalizedBookName","chapterVerseSeparator","bookChapterSeparator","book","aggregateUnsubscribers","success","aggregateUnsubscriberAsyncs","unsubPromises","getOwnPropertyNames","getOwnPropertySymbols","hasOwnProperty","combineComparators","comparatorA","comparatorB","state","createIsCircular","areItemsEqual","cache","cachedA","cachedB","getStrictProperties","object","hasOwn","sameValueZeroEqual","OWNER","getOwnPropertyDescriptor","keys","areArraysEqual","areDatesEqual","areMapsEqual","matchedIndices","aIterable","aResult","bResult","bIterable","hasMatch","aKey","aValue","_b","bKey","bValue","areObjectsEqual","properties","areObjectsEqualStrict","descriptorA","descriptorB","arePrimitiveWrappersEqual","areRegExpsEqual","areSetsEqual","areTypedArraysEqual","ARGUMENTS_TAG","BOOLEAN_TAG","DATE_TAG","MAP_TAG","NUMBER_TAG","OBJECT_TAG","REG_EXP_TAG","SET_TAG","STRING_TAG","isArray","isTypedArray","assign","getTag","createEqualityComparator","constructor","tag","createEqualityComparatorConfig","circular","createCustomConfig","strict","config","areArraysEqual$1","areMapsEqual$1","areObjectsEqual$1","areSetsEqual$1","createInternalEqualityComparator","compare","_indexOrKeyA","_indexOrKeyB","_parentA","_parentB","createIsEqual","comparator","createState","equals","meta","deepEqual","createCustomEqual","createCustomInternalComparator","isEqualDeep","isSubset","objectWithAllProperties","objectWithPartialProperties","partialArray","allArray","partialObj","allObj","serialize","replacer","space","replacerValue","newValue","deserialize","reviver","replaceNull","parsedObject","isSerializable","serializedValue","htmlEncode","getCurrentLocale","formatBytes","fileSize","decimals","sizes","sizeToUse","settingsDefs","removeJsonToTypeScriptTypesStuff","defs","def","projectSettingsDocumentSchema","settingsDocumentSchema","localizedStringsDefs","localizedStringsDocumentSchema","menuDocumentSchema"],"mappings":"4RACA,MAAqBA,EAAiB,CAcpC,YAAYC,EAAsBC,EAAqC,IAAO,CAb7DC,EAAA,qBACAA,EAAA,uBACTA,EAAA,iBACAA,EAAA,iBAWN,KAAK,aAAeF,EACpB,KAAK,eAAiB,IAAI,QAAW,CAACG,EAASC,IAAW,CACxD,KAAK,SAAWD,EAChB,KAAK,SAAWC,CAAA,CACjB,EACGH,EAA6B,GAC/B,WAAW,IAAM,CACX,KAAK,WACP,KAAK,SAAS,o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O9E,CAAC,CAAE,EAAI,EAAE,CAAC,EAAIA,EACzGgF,EAAI,CAAC,EAAG,EAAGhF,IAAM+E,GAAE,EAAG,OAAO,GAAK,SAAW,EAAI,GAAK,EAAG/E,CAAC,EAW9D,MAAMiF,EAAI,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,EAAI,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,eAC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ACA,kCAAmC,CACjC,YAAa,yDACb,MAAO,CACL,CACE,KAAM,4BACR,EACA,CACE,KAAM,qCACR,CACF,CACF,EACA,mBAAoB,CAClB,YAAa,8DACb,MAAO,CACL,CACE,KAAM,qBACR,EACA,CACE,KAAM,yBACR,CACF,CACF,EACA,gBAAiB,CACf,YAAa,8CACb,KAAM,SACN,WAAY,CACV,yBAA0B,CACxB,YACE,q4CACF,MAAO,CACL,CACE,KAAM,MACR,EACA,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CACL,MAAO,CACL,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CAAE,KAAM,QAAS,CAC1B,CACF,CACF,CACF,CACF,CACF,EACA,yBAA0B,CACxB,YACE,ugDACF,MAAO,CACL,CACE,KAAM,MACR,EACA,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CACL,MAAO,CACL,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CAAE,KAAM,QAAS,CAC1B,CACF,CACF,CACF,CACF,CACF,EACA,qBAAsB,CACpB,YACE,ybACF,MAAO,CACL,CACE,KAAM,MACR,EACA,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CAAE,KAAM,QAAS,CAC1B,CACF,CACF,EACA,qBAAsB,CACpB,YACE,mdACF,MAAO,CACL,CACE,KAAM,MACR,EACA,CACE,KAAM,QACR,EACA,CACE,KAAM,QACN,MAAO,CAAE,KAAM,QAAS,CAC1B,CACF,CACF,CACF,CACF,EACA,qBAAsB,CACpB,YACE,sFACF,MAAO,CACL,CACE,KAAM,uBACR,EACA,CACE,KAAM,QACN,MAAO,CACL,KAAM,uBACR,CACF,CACF,CACF,EACA,cAAe,CACb,YAAa,wCACb,KAAM,SACN,WAAY,CACV,MAAO,CACL,YAAa,qEACb,KAAM,qBACR,EACA,YAAa,CACX,YAAa,yEACb,KAAM,qBACR,EACA,WAAY,CACV,KAAM,2BACR,CACF,EACA,SAAU,CAAC,QAAS,YAAY,CAClC,EACA,kBAAmB,CACjB,YAAa,0EACb,KAAM,SACN,kBAAmB,CACjB,sBAAuB,CACrB,KAAM,iBACR,CACF,EACA,qBAAsB,EACxB,EACA,QAAS,CACP,YAAa,gDACb,MAAO,CACL,CACE,KAAM,oCACR,CACF,CACF,EACA,2BAA4B,CAC1B,YAAa,yDACb,MAAO,CACL,CACE,KAAM,qBACR,EACA,CACE,KAAM,qCACR,CACF,CACF,EACA,YAAa,CACX,YAAa,sDACb,MAAO,CACL,CACE,KAAM,mBACR,EACA,CACE,KAAM,SACN,WAAY,CACV,MAAO,CACL,YAAa,uEACb,KAAM,qBACR,EACA,YAAa,CACX,YAAa,2EACb,KAAM,qBACR,CACF,EACA,SAAU,CAAC,OAAO,CACpB,CACF,CACF,EACA,yBAA0B,CACxB,YACE,2FACF,KAAM,6BACR,EACA,sBAAuB,CACrB,YACE,wFACF,KAAM,6BACR,EACA,oBAAqB,CACnB,YAAa,qEACb,KAAM,SACN,kBAAmB,CACjB,0BAA2B,CACzB,KAAM,mBACR,CACF,EACA,qBAAsB,EACxB,EACA,UAAW,CACT,YAAa,mDACb,MAAO,CACL,CACE,KAAM,kCACR,CACF,CACF,EACA,yBAA0B,CACxB,YAAa,uDACb,MAAO,CACL,CACE,KAAM,mBACR,EACA,CACE,KAAM,qCACR,CACF,CACF,EACA,4BAA6B,CAC3B,YACE,0NACF,IAAK,CACH,MAAO,CACL,CACE,KAAM,SACN,SAAU,CAAC,cAAc,CAC3B,EACA,CACE,KAAM,SACN,SAAU,CAAC,MAAM,CACnB,CACF,CACF,CACF,EACA,UAAW,CACT,YAAa,oDACb,KAAM,SACN,WAAY,CACV,QAAS,CACP,YAAa,sCACb,KAAM,KACR,EACA,YAAa,CACX,YACE,2HACF,KAAM,YACR,CACF,EACA,SAAU,CAAC,SAAS,CACtB,EACA,YAAa,CACX,YAAa,iFACb,KAAM,SACN,QAAS,mBACT,OAAQ,aACV,EACA,GAAI,CACF,YAAa,GACb,KAAM,SACN,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AS,+CACT,MAAO,qCACP,YACE,gGACF,KAAM,SACN,WAAY,CACV,SAAU,CACR,KAAM,yBACR,EACA,iBAAkB,CAChB,KAAM,SACN,qBAAsB,CACpB,KAAM,yBACR,CACF,CACF,EACA,MAAOD,EACT,EAEA,OAAO,OAAOC,EAA8B,EC0BrC,MAAMC,GAAqB,CAChC,MAAO,uBACP,KAAM,SACN,WAAY,CACV,SAAU,CACR,YAAa,qCACb,KAAM,yBACR,EACA,sBAAuB,CACrB,YAAa,8DACb,KAAM,yBACR,EACA,0BAA2B,CACzB,YAAa,kEACb,KAAM,0BACR,EACA,aAAc,CACZ,YAAa,mDACb,KAAM,SACN,kBAAmB,CACjB,0BAA2B,CACzB,KAAM,4BACR,CACF,EACA,qBAAsB,EACxB,CACF,EACA,SAAU,CAAC,WAAY,wBAAyB,4BAA6B,cAAc,EAC3F,qBAAsB,GACtB,MAAO,CACL,YAAa,CACX,YACE,2FACF,KAAM,SACN,QAAS,kBACX,EACA,eAAgB,CACd,YACE,oGACF,KAAM,SACN,QAAS,yBACX,EACA,mBAAoB,CAClB,YACE,uFACF,KAAM,SACN,kBAAmB,CACjB,0BAA2B,CACzB,YAAa,qCACb,KAAM,SACN,WAAY,CACV,MAAO,CACL,YAAa,6CACb,KAAM,qBACR,EACA,cAAe,CACb,YACE,wFACF,KAAM,QACR,EACA,MAAO,CACL,YACE,6EACF,KAAM,QACR,EACA,aAAc,CACZ,YACE,8EACF,KAAM,SACR,CACF,EACA,SAAU,CAAC,QAAS,OAAO,EAC3B,qBAAsB,EACxB,CACF,EACA,WAAY,CACV,aAAc,CACZ,YACE,qFACF,KAAM,SACR,CACF,CACF,EACA,WAAY,CACV,YACE,uJACF,KAAM,SACN,kBAAmB,CACjB,0BAA2B,CACzB,YAAa,wCACb,KAAM,SACN,MAAO,CACL,CACE,WAAY,CACV,OAAQ,CACN,YACE,wEACF,KAAM,wBACR,EACA,MAAO,CACL,YACE,yGACF,KAAM,QACR,EACA,aAAc,CACZ,YACE,iFACF,KAAM,SACR,CACF,EACA,SAAU,CAAC,OAAO,EAClB,qBAAsB,EACxB,EACA,CACE,WAAY,CACV,SAAU,CACR,YAAa,8DACb,KAAM,wBACR,EACA,MAAO,CACL,YACE,yGACF,KAAM,QACR,EACA,aAAc,CACZ,YACE,iFACF,KAAM,SACR,CACF,EACA,SAAU,CAAC,WAAY,OAAO,EAC9B,qBAAsB,EACxB,CACF,CACF,CACF,EACA,qBAAsB,EACxB,EACA,SAAU,CACR,YACE,mGACF,KAAM,SACN,MAAO,CACL,CACE,WAAY,CACV,GAAI,CACF,YAAa,6CACb,KAAM,wBACR,CACF,EACA,SAAU,CAAC,IAAI,CACjB,EACA,CACE,WAAY,CACV,QAAS,CACP,YAAa,mEACb,KAAM,wBACR,EACA,eAAgB,CACd,YACE,0GACF,KAAM,QACR,EACA,cAAe,CACb,YACE,yGACF,KAAM,QACR,CACF,EACA,SAAU,CAAC,SAAS,CACtB,CACF,EACA,WAAY,CACV,MAAO,CACL,YAAa,4DACb,KAAM,qBACR,EACA,QAAS,CACP,YACE,uFACF,KAAM,qBACR,EACA,YAAa,CACX,YACE,6GACF,KAAM,qBACR,EACA,cAAe,CACb,YACE,wFACF,KAAM,QACR,EACA,MAAO,CACL,YAAa,wCACb,KAAM,wBACR,EACA,MAAO,CACL,YACE,qGACF,KAAM,QACR,CACF,EACA,SAAU,CAAC,QAAS,QAAS,OAAO,EACpC,sBAAuB,EACzB,EACA,eAAgB,CACd,YAAa,2BACb,KAAM,SACN,WAAY,CACV,OAAQ,CACN,YAAa,kCACb,KAAM,oBACR,EACA,MAAO,CACL,YAAa,8CACb,KAAM,QACN,MAAO,CAAE,KAAM,kBAAmB,EAClC,YAAa,EACf,CACF,EACA,SAAU,CAAC,SAAU,OAAO,CAC9B,EACA,iBAAkB,CAChB,YAAa,+CACb,KAAM,SACN,MAAO,CAAC,CAAE,KAAM,yBAA0B,EAC1C,sBAAuB,EACzB,EACA,gBAAiB,CACf,YAAa,sDACb,KAAM,SACN,MAAO,CACL,CAAE,KAAM,wBAAyB,EACjC,CACE,WAAY,CACV,QAAS,CACP,YAAa,mCACb,KAAM,4BACR,CACF,EACA,SAAU,CAAC,SAAS,CACtB,CACF,EACA,sBAAuB,EACzB,EACA,mBAAoB,CAClB,YAAa,qDACb,KAAM,SACN,WAAY,CACV,gBAAiB,CACf,YACE,mFACF,KAAM,SACR,EACA,QAAS,CACP,YAAa,iEACb,KAAM,yBACR,EACA,YAAa,CACX,YAAa,sEACb,KAAM,0BACR,CACF,EACA,qBAAsB,EACxB,CACF,CACF,EAEA,OAAO,OAAOA,EAAkB","x_google_ignoreList":[11,12,13,18]} \ No newline at end of file diff --git a/lib/platform-bible-utils/dist/index.d.ts b/lib/platform-bible-utils/dist/index.d.ts index 547efda26f..37267cb6bd 100644 --- a/lib/platform-bible-utils/dist/index.d.ts +++ b/lib/platform-bible-utils/dist/index.d.ts @@ -717,9 +717,15 @@ export type MenuItemContainingSubmenu = MenuItemBase & { export type MenuItemContainingCommand = MenuItemBase & { /** Name of the PAPI command to run when this menu item is selected. */ command: ReferencedItem; - /** Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png` */ + /** + * Uri path to the icon to display after the menu text. Ex: + * `papi-extension://helloWorld/assets/icon.png` + */ iconPathAfter?: string; - /** Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png` */ + /** + * Uri path to the icon to display before the menu text. Ex: + * `papi-extension://helloWorld/assets/icon.png` + */ iconPathBefore?: string; }; /** @@ -1319,6 +1325,38 @@ export declare function isLocalizeKey(str: string): str is LocalizeKey; * new RegExp(escapedString); */ export declare function escapeStringRegexp(string: string): string; +/** + * Transforms a string or an array of strings into an array of regular expressions, ensuring that + * the result is always an array. + * + * This function accepts a value that may be a single string, an array of strings, or `undefined`. + * It then: + * + * - Converts each string into a `RegExp` object. + * - If the input is an array containing nested arrays, it converts each string in the nested arrays + * into `RegExp` objects. + * - Ensures that the result is always an array of `RegExp` objects or arrays of `RegExp` objects. + * + * @param stringStringMaybeArray - The value to be transformed, which can be a single string, an + * array of strings or arrays of strings, or `undefined`. + * @returns An array of `RegExp` objects or arrays of `RegExp` objects. If the input is `undefined`, + * an empty array is returned. + */ +export declare function transformAndEnsureRegExpRegExpArray(stringStringMaybeArray: string | (string | string[])[] | undefined): (RegExp | RegExp[])[]; +/** + * Transforms a string or an array of strings into an array of regular expressions. + * + * This function accepts a value that may be a single string, an array of strings, or `undefined`. + * It then: + * + * - Converts each string into a `RegExp` object. + * - Ensures that the result is always an array of `RegExp` objects. + * + * @param stringMaybeArray - The value to be transformed, which can be a single string, an array of + * strings, or `undefined`. + * @returns An array of `RegExp` objects. If the input is `undefined`, an empty array is returned. + */ +export declare function transformAndEnsureRegExpArray(stringMaybeArray: string | string[] | undefined): RegExp[]; /** * Check that two objects are deeply equal, comparing members of each object and such * @@ -1453,6 +1491,22 @@ export function getCurrentLocale(): string; * options of this NumberFormat object */ export function formatBytes(fileSize: number, decimals?: number): string; +/** + * Ensures that the given input is returned as an array. + * + * This function takes a value that might be a single item, an array, or `undefined` and returns it + * as an array: + * + * - If the input is `undefined`, an empty array is returned. + * - If the input is already an array, it is returned as-is. + * - If the input is a single item, it is wrapped in an array. + * + * @typeParam T - The type of the elements in the array. + * @param maybeArray - The value that may be a single item, an array, or `undefined`. + * @returns An array containing the input value(s). If the input is `undefined`, an empty array is + * returned. + */ +export function ensureArray(maybeArray: T | T[] | undefined): T[]; /** Localized string value associated with this key */ export type LocalizedStringValue = string; /** The data an extension provides to inform Platform.Bible of the localized strings it provides. */ diff --git a/lib/platform-bible-utils/dist/index.js b/lib/platform-bible-utils/dist/index.js index d3f02e8554..79c7a5233e 100644 --- a/lib/platform-bible-utils/dist/index.js +++ b/lib/platform-bible-utils/dist/index.js @@ -1,8 +1,8 @@ -var Ae = Object.defineProperty; -var Be = (t, e, r) => e in t ? Ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; -var d = (t, e, r) => (Be(t, typeof e != "symbol" ? e + "" : e, r), r); -import { Mutex as Me } from "async-mutex"; -class nr { +var Be = Object.defineProperty; +var xe = (t, e, r) => e in t ? Be(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r; +var d = (t, e, r) => (xe(t, typeof e != "symbol" ? e + "" : e, r), r); +import { Mutex as De } from "async-mutex"; +class ir { /** * Creates an instance of the class * @@ -76,7 +76,7 @@ class nr { this.resolver = void 0, this.rejecter = void 0, Object.freeze(this); } } -class ir { +class or { constructor(e, r) { d(this, "collator"); this.collator = new Intl.Collator(e, r); @@ -103,7 +103,7 @@ class ir { return this.collator.resolvedOptions(); } } -class De { +class Re { constructor(e, r) { d(this, "dateTimeFormatter"); this.dateTimeFormatter = new Intl.DateTimeFormat(e, r); @@ -160,7 +160,7 @@ class De { return this.dateTimeFormatter.resolvedOptions(); } } -class xe { +class Me { constructor() { /** * Subscribes a function to run when this event is emitted. @@ -228,7 +228,7 @@ class xe { return this.assertNotDisposed(), this.isDisposed = !0, this.subscriptions = void 0, this.lazyEvent = void 0, Promise.resolve(!0); } } -function or() { +function ar() { return "00-0-4-1-000".replace( /[^-]/g, (t) => ( @@ -244,7 +244,7 @@ function ke(t) { function D(t) { return JSON.parse(JSON.stringify(t)); } -function ar(t, e = 300) { +function ur(t, e = 300) { if (ke(t)) throw new Error("Tried to debounce a string! Could be XSS"); let r; @@ -252,22 +252,22 @@ function ar(t, e = 300) { clearTimeout(r), r = setTimeout(() => t(...s), e); }; } -function ur(t, e, r) { +function lr(t, e, r) { const s = /* @__PURE__ */ new Map(); return t.forEach((n) => { const i = e(n), o = s.get(i), a = r ? r(n, i) : n; o ? o.push(a) : s.set(i, [a]); }), s; } -function Re(t) { +function Ve(t) { return typeof t == "object" && // We're potentially dealing with objects we didn't create, so they might contain `null` // eslint-disable-next-line no-null/no-null t !== null && "message" in t && // Type assert `error` to check it's `message`. // eslint-disable-next-line no-type-assertion/no-type-assertion typeof t.message == "string"; } -function Ve(t) { - if (Re(t)) +function qe(t) { + if (Ve(t)) return t; try { return new Error(JSON.stringify(t)); @@ -275,18 +275,18 @@ function Ve(t) { return new Error(String(t)); } } -function lr(t) { - return Ve(t).message; +function cr(t) { + return qe(t).message; } -function qe(t) { +function ze(t) { return new Promise((e) => setTimeout(e, t)); } -function cr(t, e) { - const r = qe(e).then(() => { +function fr(t, e) { + const r = ze(e).then(() => { }); return Promise.any([r, t()]); } -function fr(t, e = "obj") { +function hr(t, e = "obj") { const r = /* @__PURE__ */ new Set(); Object.getOwnPropertyNames(t).forEach((n) => { try { @@ -304,14 +304,14 @@ function fr(t, e = "obj") { }), s = Object.getPrototypeOf(s); return r; } -function hr(t, e = {}) { +function pr(t, e = {}) { return new Proxy(e, { get(r, s) { return s in r ? r[s] : async (...n) => (await t())[s](...n); } }); } -class ze { +class Je { /** * Create a DocumentCombiner instance * @@ -323,7 +323,7 @@ class ze { d(this, "contributions", /* @__PURE__ */ new Map()); d(this, "latestOutput"); d(this, "options"); - d(this, "onDidRebuildEmitter", new xe()); + d(this, "onDidRebuildEmitter", new Me()); /** Event that emits to announce that the document has been rebuilt and the output has been updated */ // Need `onDidRebuildEmitter` to be instantiated before this line // eslint-disable-next-line @typescript-eslint/member-ordering @@ -414,7 +414,7 @@ class ze { } let e = this.baseDocument; return this.contributions.forEach((r) => { - e = Je( + e = Ge( e, r, this.options.ignoreDuplicateProperties @@ -512,7 +512,7 @@ function W(...t) { (!r || typeof r != "object" || !Array.isArray(r)) && (e = !1); }), e; } -function Je(t, e, r) { +function Ge(t, e, r) { const s = D(t); return e ? he(s, D(e), r) : s; } @@ -545,18 +545,18 @@ function he(t, e, r) { W(t, e) && t.push(...e); return t; } -class Ge extends Me { +class _e extends De { } -class pr { +class dr { constructor() { d(this, "mutexesByID", /* @__PURE__ */ new Map()); } get(e) { let r = this.mutexesByID.get(e); - return r || (r = new Ge(), this.mutexesByID.set(e, r), r); + return r || (r = new _e(), this.mutexesByID.set(e, r), r); } } -class dr extends ze { +class mr extends Je { // Making the protected base constructor public // eslint-disable-next-line @typescript-eslint/no-useless-constructor constructor(e, r) { @@ -566,7 +566,7 @@ class dr extends ze { return this.latestOutput; } } -class _e { +class Fe { constructor(e, r) { d(this, "numberFormatter"); this.numberFormatter = new Intl.NumberFormat(e, r); @@ -624,7 +624,7 @@ class _e { return this.numberFormatter.resolvedOptions(); } } -class mr { +class gr { constructor(e = "Anonymous") { d(this, "unsubscribers", /* @__PURE__ */ new Set()); this.name = e; @@ -649,7 +649,7 @@ class mr { return this.unsubscribers.clear(), r.every((s, n) => (s || console.error(`UnsubscriberAsyncList ${this.name}: Unsubscriber at index ${n} failed!`), s)); } } -var Fe = Object.defineProperty, Ke = (t, e, r) => e in t ? Fe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, l = (t, e, r) => Ke(t, typeof e != "symbol" ? e + "" : e, r); +var Ke = Object.defineProperty, Xe = (t, e, r) => e in t ? Ke(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, l = (t, e, r) => Xe(t, typeof e != "symbol" ? e + "" : e, r); const j = [ "GEN", "EXO", @@ -937,33 +937,33 @@ const j = [ "Reproof (Proverbs 25-31)", "4 Baruch (Rest of Baruch)", "Laodiceans" -], Z = tt(); -function T(t, e = !0) { +], Z = rt(); +function A(t, e = !0) { return e && (t = t.toUpperCase()), t in Z ? Z[t] : 0; } function G(t) { - return T(t) > 0; + return A(t) > 0; } -function Xe(t) { - const e = typeof t == "string" ? T(t) : t; +function He(t) { + const e = typeof t == "string" ? A(t) : t; return e >= 40 && e <= 66; } -function He(t) { - return (typeof t == "string" ? T(t) : t) <= 39; +function Le(t) { + return (typeof t == "string" ? A(t) : t) <= 39; } function de(t) { return t <= 66; } -function Le(t) { - const e = typeof t == "string" ? T(t) : t; +function Ue(t) { + const e = typeof t == "string" ? A(t) : t; return be(e) && !de(e); } -function* Ue() { +function* We() { for (let t = 1; t <= j.length; t++) yield t; } -const We = 1, me = j.length; -function Ze() { +const Ze = 1, me = j.length; +function Ye() { return ["XXA", "XXB", "XXC", "XXD", "XXE", "XXF", "XXG"]; } function _(t, e = "***") { @@ -973,21 +973,21 @@ function _(t, e = "***") { function ge(t) { return t <= 0 || t > me ? "******" : pe[t - 1]; } -function Ye(t) { - return ge(T(t)); +function Qe(t) { + return ge(A(t)); } function be(t) { const e = typeof t == "number" ? _(t) : t; return G(e) && !J.includes(e); } -function Qe(t) { +function et(t) { const e = typeof t == "number" ? _(t) : t; return G(e) && J.includes(e); } -function et(t) { +function tt(t) { return pe[t - 1].includes("*obsolete*"); } -function tt() { +function rt() { const t = {}; for (let e = 0; e < j.length; e++) t[j[e]] = e + 1; @@ -996,22 +996,22 @@ function tt() { const E = { allBookIds: j, nonCanonicalIds: J, - bookIdToNumber: T, + bookIdToNumber: A, isBookIdValid: G, - isBookNT: Xe, - isBookOT: He, + isBookNT: He, + isBookOT: Le, isBookOTNT: de, - isBookDC: Le, - allBookNumbers: Ue, - firstBook: We, + isBookDC: Ue, + allBookNumbers: We, + firstBook: Ze, lastBook: me, - extraBooks: Ze, + extraBooks: Ye, bookNumberToId: _, bookNumberToEnglishName: ge, - bookIdToEnglishName: Ye, + bookIdToEnglishName: Qe, isCanonical: be, - isExtraMaterial: Qe, - isObsolete: et + isExtraMaterial: et, + isObsolete: tt }; var S = /* @__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))(S || {}); const N = class { @@ -1402,39 +1402,39 @@ l(y, "defaultVersification", $.English), l(y, "verseRangeSeparator", "-"), l(y, * The valid status of the VerseRef. */ l(y, "ValidStatusType", ye); -let rt = y; +let st = y; class B extends Error { } -var Q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, C = {}, st = () => { - const t = "\\ud800-\\udfff", e = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", s = "\\u20d0-\\u20ff", n = "\\u1ab0-\\u1aff", i = "\\u1dc0-\\u1dff", o = e + r + s + n + i, a = "\\ufe0e\\ufe0f", h = "\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93", p = `[${t}]`, u = `[${o}]`, c = "\\ud83c[\\udffb-\\udfff]", m = `(?:${u}|${c})`, v = `[^${t}]`, b = "(?:\\uD83C[\\uDDE6-\\uDDFF]){2}", A = "[\\ud800-\\udbff][\\udc00-\\udfff]", q = "\\u200d", je = "(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)", Ce = `[${h}]`, H = `${m}?`, L = `[${a}]?`, Ie = `(?:${q}(?:${[v, b, A].join("|")})${L + H})*`, Te = L + H + Ie, Pe = `(?:${[`${v}${u}?`, u, b, A, p, Ce].join("|")})`; - return new RegExp(`${je}|${c}(?=${c})|${Pe + Te}`, "g"); -}, nt = Q && Q.__importDefault || function(t) { +var Q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, C = {}, nt = () => { + const t = "\\ud800-\\udfff", e = "\\u0300-\\u036f", r = "\\ufe20-\\ufe2f", s = "\\u20d0-\\u20ff", n = "\\u1ab0-\\u1aff", i = "\\u1dc0-\\u1dff", o = e + r + s + n + i, a = "\\ufe0e\\ufe0f", h = "\\uD83D\\uDC69\\uD83C\\uDFFB\\u200D\\uD83C\\uDF93", p = `[${t}]`, u = `[${o}]`, c = "\\ud83c[\\udffb-\\udfff]", m = `(?:${u}|${c})`, v = `[^${t}]`, b = "(?:\\uD83C[\\uDDE6-\\uDDFF]){2}", P = "[\\ud800-\\udbff][\\udc00-\\udfff]", q = "\\u200d", Ce = "(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40(?:\\udc65|\\udc73|\\udc77)\\udb40(?:\\udc6e|\\udc63|\\udc6c)\\udb40(?:\\udc67|\\udc74|\\udc73)\\udb40\\udc7f)", Ie = `[${h}]`, H = `${m}?`, L = `[${a}]?`, Ae = `(?:${q}(?:${[v, b, P].join("|")})${L + H})*`, Te = L + H + Ae, Pe = `(?:${[`${v}${u}?`, u, b, P, p, Ie].join("|")})`; + return new RegExp(`${Ce}|${c}(?=${c})|${Pe + Te}`, "g"); +}, it = Q && Q.__importDefault || function(t) { return t && t.__esModule ? t : { default: t }; }; Object.defineProperty(C, "__esModule", { value: !0 }); -var R = nt(st); +var k = it(nt); function z(t) { if (typeof t != "string") throw new Error("A string is expected as input"); - return t.match(R.default()) || []; + return t.match(k.default()) || []; } -var it = C.toArray = z; +var ot = C.toArray = z; function F(t) { if (typeof t != "string") throw new Error("Input must be a string"); - var e = t.match(R.default()); + var e = t.match(k.default()); return e === null ? 0 : e.length; } -var ot = C.length = F; +var at = C.length = F; function ve(t, e, r) { if (e === void 0 && (e = 0), typeof t != "string") throw new Error("Input must be a string"); (typeof e != "number" || e < 0) && (e = 0), typeof r == "number" && r < 0 && (r = 0); - var s = t.match(R.default()); + var s = t.match(k.default()); return s ? s.slice(e, r).join("") : ""; } -var at = C.substring = ve; -function ut(t, e, r) { +var ut = C.substring = ve; +function lt(t, e, r) { if (e === void 0 && (e = 0), typeof t != "string") throw new Error("Input must be a string"); var s = F(t); @@ -1443,11 +1443,11 @@ function ut(t, e, r) { e < 0 && (e += s); var n; typeof r > "u" ? n = s : (typeof r != "number" && (r = parseInt(r, 10)), n = r >= 0 ? r + e : e); - var i = t.match(R.default()); + var i = t.match(k.default()); return i ? i.slice(e, n).join("") : ""; } -var lt = C.substr = ut; -function ct(t, e, r, s) { +var ct = C.substr = lt; +function ft(t, e, r, s) { if (e === void 0 && (e = 16), r === void 0 && (r = "#"), s === void 0 && (s = "right"), typeof t != "string" || typeof e != "number") throw new Error("Invalid arguments specified"); if (["left", "right"].indexOf(s) === -1) @@ -1462,8 +1462,8 @@ function ct(t, e, r, s) { } return t; } -var Ne = C.limit = ct; -function ft(t, e, r) { +var Ne = C.limit = ft; +function ht(t, e, r) { if (r === void 0 && (r = 0), typeof t != "string") throw new Error("Input must be a string"); if (t === "") @@ -1485,44 +1485,47 @@ function ft(t, e, r) { } return i ? o : -1; } -var ht = C.indexOf = ft; -function br(t, e) { +var pt = C.indexOf = ht; +function we(t) { + return t ? Array.isArray(t) ? t : [t] : []; +} +function yr(t, e) { if (!(e > g(t) || e < -g(t))) return V(t, e, 1); } function I(t, e) { return e < 0 || e > g(t) - 1 ? "" : V(t, e, 1); } -function yr(t, e) { +function vr(t, e) { if (!(e < 0 || e > g(t) - 1)) return V(t, e, 1).codePointAt(0); } -function pt(t, e, r = g(t)) { - const s = gt(t, e); +function dt(t, e, r = g(t)) { + const s = bt(t, e); return !(s === -1 || s + g(e) !== r); } -function dt(t, e, r) { +function mt(t, e, r) { if (e < 0) return -1; if (r) { if (I(t, e) === "}" && I(t, e - 1) === "\\") return e; - const i = x(t, "\\}", e); + const i = R(t, "\\}", e); return i >= 0 ? i + 1 : i; } let s = e; const n = g(t); - for (; s < n && (s = x(t, "}", s), !(s === -1 || I(t, s - 1) !== "\\")); ) + for (; s < n && (s = R(t, "}", s), !(s === -1 || I(t, s - 1) !== "\\")); ) s += 1; return s >= n ? -1 : s; } -function vr(t, e) { +function Nr(t, e) { let r = t, s = 0; for (; s < g(r); ) { switch (I(r, s)) { case "{": if (I(r, s - 1) !== "\\") { - const n = dt(r, s, !1); + const n = mt(r, s, !1); if (n >= 0) { const i = w(r, s + 1, n), o = i in e ? ( // We're getting a value.toString() with any type from an object with any keys @@ -1543,14 +1546,14 @@ function vr(t, e) { } return r; } -function mt(t, e, r = 0) { +function gt(t, e, r = 0) { const s = w(t, r); - return x(s, e) !== -1; + return R(s, e) !== -1; } -function x(t, e, r = 0) { - return ht(t, e, r); +function R(t, e, r = 0) { + return pt(t, e, r); } -function gt(t, e, r) { +function bt(t, e, r) { let s = r === void 0 ? g(t) : r; s < 0 ? s = 0 : s >= g(t) && (s = g(t) - 1); for (let n = s; n >= 0; n--) @@ -1559,25 +1562,25 @@ function gt(t, e, r) { return -1; } function g(t) { - return ot(t); + return at(t); } -function Nr(t, e) { +function wr(t, e) { const r = e.toUpperCase(); return r === "NONE" ? t : t.normalize(r); } -function wr(t, e, r) { +function Er(t, e, r) { return t.localeCompare(e, "en", r); } -function Er(t, e, r = " ") { +function Sr(t, e, r = " ") { return e <= g(t) ? t : Ne(t, e, r, "right"); } -function Sr(t, e, r = " ") { +function Or(t, e, r = " ") { return e <= g(t) ? t : Ne(t, e, r, "left"); } function ee(t, e) { return e > t ? t : e < -t ? 0 : e < 0 ? e + t : e; } -function Or(t, e, r) { +function $r(t, e, r) { const s = g(t); if (e > s || r && (e > r && !(e >= 0 && e < s && r < 0 && r > -s) || r < -s)) return ""; @@ -1589,41 +1592,49 @@ function te(t, e, r) { if (r !== void 0 && r <= 0) return [t]; if (e === "") - return bt(t).slice(0, r); + return yt(t).slice(0, r); let n = e; - (typeof e == "string" || e instanceof RegExp && !mt(e.flags, "g")) && (n = new RegExp(e, "g")); + (typeof e == "string" || e instanceof RegExp && !gt(e.flags, "g")) && (n = new RegExp(e, "g")); const i = t.match(n); let o = 0; if (!i) return [t]; for (let a = 0; a < (r ? r - 1 : i.length); a++) { - const h = x(t, i[a], o), p = g(i[a]); + const h = R(t, i[a], o), p = g(i[a]); if (s.push(w(t, o, h)), o = h + p, r !== void 0 && s.length === r) break; } return s.push(w(t, o)), s; } -function we(t, e, r = 0) { - return x(t, e, r) === r; +function Ee(t, e, r = 0) { + return R(t, e, r) === r; } function V(t, e = 0, r = g(t) - e) { - return lt(t, e, r); + return ct(t, e, r); } function w(t, e, r = g(t)) { - return at(t, e, r); -} -function bt(t) { - return it(t); + return ut(t, e, r); } -function $r(t) { - return we(t, "%") && pt(t, "%"); +function yt(t) { + return ot(t); } function jr(t) { + return Ee(t, "%") && dt(t, "%"); +} +function Cr(t) { if (typeof t != "string") throw new TypeError("Expected a string"); return t.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); } -const Ee = [ +function Ir(t) { + return t ? we(t).map( + (s) => Array.isArray(s) ? s.map((n) => new RegExp(n)) : new RegExp(s) + ) : []; +} +function Ar(t) { + return t ? we(t).map((s) => new RegExp(s)) : []; +} +const Se = [ { shortName: "ERR", fullNames: ["ERROR"], chapters: -1 }, { shortName: "GEN", fullNames: ["Genesis"], chapters: 50 }, { shortName: "EXO", fullNames: ["Exodus"], chapters: 40 }, @@ -1691,27 +1702,27 @@ const Ee = [ { shortName: "3JN", fullNames: ["3 John"], chapters: 1 }, { shortName: "JUD", fullNames: ["Jude"], chapters: 1 }, { shortName: "REV", fullNames: ["Revelation"], chapters: 22 } -], yt = 1, vt = Ee.length - 1, Nt = 1, wt = 1, Et = (t) => { +], vt = 1, Nt = Se.length - 1, wt = 1, Et = 1, St = (t) => { var e; - return ((e = Ee[t]) == null ? void 0 : e.chapters) ?? -1; -}, Cr = (t, e) => ({ - bookNum: Math.max(yt, Math.min(t.bookNum + e, vt)), + return ((e = Se[t]) == null ? void 0 : e.chapters) ?? -1; +}, Tr = (t, e) => ({ + bookNum: Math.max(vt, Math.min(t.bookNum + e, Nt)), chapterNum: 1, verseNum: 1 -}), Ir = (t, e) => ({ +}), Pr = (t, e) => ({ ...t, chapterNum: Math.min( - Math.max(Nt, t.chapterNum + e), - Et(t.bookNum) + Math.max(wt, t.chapterNum + e), + St(t.bookNum) ), verseNum: 1 -}), Tr = (t, e) => ({ +}), Br = (t, e) => ({ ...t, - verseNum: Math.max(wt, t.verseNum + e) + verseNum: Math.max(Et, t.verseNum + e) }); -async function Pr(t, e, r) { +async function xr(t, e, r) { const s = E.bookNumberToId(t); - if (!we(Intl.getCanonicalLocales(e)[0], "zh")) + if (!Ee(Intl.getCanonicalLocales(e)[0], "zh")) return r({ localizeKey: `LocalizedId.${s}`, languagesToSearch: [e] @@ -1723,12 +1734,12 @@ async function Pr(t, e, r) { return te(i[0], "ÿ08")[0].trim(); } function re(t) { - return new rt(t.bookNum, t.chapterNum, t.verseNum).BBBCCCVVV; + return new st(t.bookNum, t.chapterNum, t.verseNum).BBBCCCVVV; } -function Ar(t, e) { +function Dr(t, e) { return re(t) - re(e); } -function Br(t, e, r, s) { +function Rr(t, e, r, s) { let n; switch (e ?? "id") { case "English": @@ -1743,17 +1754,17 @@ function Br(t, e, r, s) { } return `${n}${s ?? " "}${t.chapterNum}${r ?? ":"}${t.verseNum}`; } -const Mr = (t) => (...e) => t.map((s) => s(...e)).every((s) => s), Dr = (t) => async (...e) => { +const Mr = (t) => (...e) => t.map((s) => s(...e)).every((s) => s), kr = (t) => async (...e) => { const r = t.map(async (s) => s(...e)); return (await Promise.all(r)).every((s) => s); }; -var St = Object.getOwnPropertyNames, Ot = Object.getOwnPropertySymbols, $t = Object.prototype.hasOwnProperty; +var Ot = Object.getOwnPropertyNames, $t = Object.getOwnPropertySymbols, jt = Object.prototype.hasOwnProperty; function se(t, e) { return function(s, n, i) { return t(s, n, i) && e(s, n, i); }; } -function k(t) { +function M(t) { return function(r, s, n) { if (!r || !s || typeof r != "object" || typeof s != "object") return t(r, s, n); @@ -1766,16 +1777,16 @@ function k(t) { }; } function ne(t) { - return St(t).concat(Ot(t)); + return Ot(t).concat($t(t)); } -var Se = Object.hasOwn || function(t, e) { - return $t.call(t, e); +var Oe = Object.hasOwn || function(t, e) { + return jt.call(t, e); }; -function P(t, e) { +function T(t, e) { return t || e ? t === e : t === e || t !== t && e !== e; } -var Oe = "_owner", ie = Object.getOwnPropertyDescriptor, oe = Object.keys; -function jt(t, e, r) { +var $e = "_owner", ie = Object.getOwnPropertyDescriptor, oe = Object.keys; +function Ct(t, e, r) { var s = t.length; if (e.length !== s) return !1; @@ -1784,16 +1795,16 @@ function jt(t, e, r) { return !1; return !0; } -function Ct(t, e) { - return P(t.getTime(), e.getTime()); +function It(t, e) { + return T(t.getTime(), e.getTime()); } function ae(t, e, r) { if (t.size !== e.size) return !1; for (var s = {}, n = t.entries(), i = 0, o, a; (o = n.next()) && !o.done; ) { for (var h = e.entries(), p = !1, u = 0; (a = h.next()) && !a.done; ) { - var c = o.value, m = c[0], v = c[1], b = a.value, A = b[0], q = b[1]; - !p && !s[u] && (p = r.equals(m, A, i, u, t, e, r) && r.equals(v, q, m, A, t, e, r)) && (s[u] = !0), u++; + var c = o.value, m = c[0], v = c[1], b = a.value, P = b[0], q = b[1]; + !p && !s[u] && (p = r.equals(m, P, i, u, t, e, r) && r.equals(v, q, m, P, t, e, r)) && (s[u] = !0), u++; } if (!p) return !1; @@ -1801,26 +1812,26 @@ function ae(t, e, r) { } return !0; } -function It(t, e, r) { +function At(t, e, r) { var s = oe(t), n = s.length; if (oe(e).length !== n) return !1; for (var i; n-- > 0; ) - if (i = s[n], i === Oe && (t.$$typeof || e.$$typeof) && t.$$typeof !== e.$$typeof || !Se(e, i) || !r.equals(t[i], e[i], i, i, t, e, r)) + if (i = s[n], i === $e && (t.$$typeof || e.$$typeof) && t.$$typeof !== e.$$typeof || !Oe(e, i) || !r.equals(t[i], e[i], i, i, t, e, r)) return !1; return !0; } -function M(t, e, r) { +function x(t, e, r) { var s = ne(t), n = s.length; if (ne(e).length !== n) return !1; for (var i, o, a; n-- > 0; ) - if (i = s[n], i === Oe && (t.$$typeof || e.$$typeof) && t.$$typeof !== e.$$typeof || !Se(e, i) || !r.equals(t[i], e[i], i, i, t, e, r) || (o = ie(t, i), a = ie(e, i), (o || a) && (!o || !a || o.configurable !== a.configurable || o.enumerable !== a.enumerable || o.writable !== a.writable))) + if (i = s[n], i === $e && (t.$$typeof || e.$$typeof) && t.$$typeof !== e.$$typeof || !Oe(e, i) || !r.equals(t[i], e[i], i, i, t, e, r) || (o = ie(t, i), a = ie(e, i), (o || a) && (!o || !a || o.configurable !== a.configurable || o.enumerable !== a.enumerable || o.writable !== a.writable))) return !1; return !0; } function Tt(t, e) { - return P(t.valueOf(), e.valueOf()); + return T(t.valueOf(), e.valueOf()); } function Pt(t, e) { return t.source === e.source && t.flags === e.flags; @@ -1836,7 +1847,7 @@ function ue(t, e, r) { } return !0; } -function At(t, e) { +function Bt(t, e) { var r = t.length; if (e.length !== r) return !1; @@ -1845,8 +1856,8 @@ function At(t, e) { return !1; return !0; } -var Bt = "[object Arguments]", Mt = "[object Boolean]", Dt = "[object Date]", xt = "[object Map]", kt = "[object Number]", Rt = "[object Object]", Vt = "[object RegExp]", qt = "[object Set]", zt = "[object String]", Jt = Array.isArray, le = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, ce = Object.assign, Gt = Object.prototype.toString.call.bind(Object.prototype.toString); -function _t(t) { +var xt = "[object Arguments]", Dt = "[object Boolean]", Rt = "[object Date]", Mt = "[object Map]", kt = "[object Number]", Vt = "[object Object]", qt = "[object RegExp]", zt = "[object Set]", Jt = "[object String]", Gt = Array.isArray, le = typeof ArrayBuffer == "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null, ce = Object.assign, _t = Object.prototype.toString.call.bind(Object.prototype.toString); +function Ft(t) { var e = t.areArraysEqual, r = t.areDatesEqual, s = t.areMapsEqual, n = t.areObjectsEqual, i = t.arePrimitiveWrappersEqual, o = t.areRegExpsEqual, a = t.areSetsEqual, h = t.areTypedArraysEqual; return function(u, c, m) { if (u === c) @@ -1858,7 +1869,7 @@ function _t(t) { return !1; if (v === Object) return n(u, c, m); - if (Jt(u)) + if (Gt(u)) return e(u, c, m); if (le != null && le(u)) return h(u, c, m); @@ -1870,23 +1881,23 @@ function _t(t) { return s(u, c, m); if (v === Set) return a(u, c, m); - var b = Gt(u); - return b === Dt ? r(u, c, m) : b === Vt ? o(u, c, m) : b === xt ? s(u, c, m) : b === qt ? a(u, c, m) : b === Rt ? typeof u.then != "function" && typeof c.then != "function" && n(u, c, m) : b === Bt ? n(u, c, m) : b === Mt || b === kt || b === zt ? i(u, c, m) : !1; + var b = _t(u); + return b === Rt ? r(u, c, m) : b === qt ? o(u, c, m) : b === Mt ? s(u, c, m) : b === zt ? a(u, c, m) : b === Vt ? typeof u.then != "function" && typeof c.then != "function" && n(u, c, m) : b === xt ? n(u, c, m) : b === Dt || b === kt || b === Jt ? i(u, c, m) : !1; }; } -function Ft(t) { +function Kt(t) { var e = t.circular, r = t.createCustomConfig, s = t.strict, n = { - areArraysEqual: s ? M : jt, - areDatesEqual: Ct, - areMapsEqual: s ? se(ae, M) : ae, - areObjectsEqual: s ? M : It, + areArraysEqual: s ? x : Ct, + areDatesEqual: It, + areMapsEqual: s ? se(ae, x) : ae, + areObjectsEqual: s ? x : At, arePrimitiveWrappersEqual: Tt, areRegExpsEqual: Pt, - areSetsEqual: s ? se(ue, M) : ue, - areTypedArraysEqual: s ? M : At + areSetsEqual: s ? se(ue, x) : ue, + areTypedArraysEqual: s ? x : Bt }; if (r && (n = ce({}, n, r(n))), e) { - var i = k(n.areArraysEqual), o = k(n.areMapsEqual), a = k(n.areObjectsEqual), h = k(n.areSetsEqual); + var i = M(n.areArraysEqual), o = M(n.areMapsEqual), a = M(n.areObjectsEqual), h = M(n.areSetsEqual); n = ce({}, n, { areArraysEqual: i, areMapsEqual: o, @@ -1896,12 +1907,12 @@ function Ft(t) { } return n; } -function Kt(t) { +function Xt(t) { return function(e, r, s, n, i, o, a) { return t(e, r, a); }; } -function Xt(t) { +function Ht(t) { var e = t.circular, r = t.comparator, s = t.createState, n = t.equals, i = t.strict; if (s) return function(h, p) { @@ -1932,7 +1943,7 @@ function Xt(t) { return r(h, p, o); }; } -var Ht = O(); +var Lt = O(); O({ strict: !0 }); O({ circular: !0 }); O({ @@ -1941,37 +1952,37 @@ O({ }); O({ createInternalComparator: function() { - return P; + return T; } }); O({ strict: !0, createInternalComparator: function() { - return P; + return T; } }); O({ circular: !0, createInternalComparator: function() { - return P; + return T; } }); O({ circular: !0, createInternalComparator: function() { - return P; + return T; }, strict: !0 }); function O(t) { t === void 0 && (t = {}); - var e = t.circular, r = e === void 0 ? !1 : e, s = t.createInternalComparator, n = t.createState, i = t.strict, o = i === void 0 ? !1 : i, a = Ft(t), h = _t(a), p = s ? s(h) : Kt(h); - return Xt({ circular: r, comparator: h, createState: n, equals: p, strict: o }); -} -function Lt(t, e) { - return Ht(t, e); + var e = t.circular, r = e === void 0 ? !1 : e, s = t.createInternalComparator, n = t.createState, i = t.strict, o = i === void 0 ? !1 : i, a = Kt(t), h = Ft(a), p = s ? s(h) : Xt(h); + return Ht({ circular: r, comparator: h, createState: n, equals: p, strict: o }); } function Ut(t, e) { + return Lt(t, e); +} +function Wt(t, e) { if (typeof t != typeof e) return !1; if (!t && !e) @@ -1981,11 +1992,11 @@ function Ut(t, e) { return i.length === 0 ? !0 : i.every((a) => o.includes(a)); } if (typeof t != "object") - return Lt(t, e); + return Ut(t, e); const r = e, s = t; let n = !0; return Object.keys(r).forEach((i) => { - n && (Object.hasOwn(s, i) && Ut(s[i], r[i]) || (n = !1)); + n && (Object.hasOwn(s, i) && Wt(s[i], r[i]) || (n = !1)); }), n; } function fe(t, e, r) { @@ -1994,7 +2005,7 @@ function fe(t, e, r) { return e && (o = e(n, o)), o === void 0 && (o = null), o; }, r); } -function Wt(t, e) { +function Zt(t, e) { function r(n) { return Object.keys(n).forEach((i) => { n[i] === null ? n[i] = void 0 : typeof n[i] == "object" && (n[i] = r(n[i])); @@ -2004,23 +2015,23 @@ function Wt(t, e) { if (s !== null) return typeof s == "object" ? r(s) : s; } -function xr(t) { +function Vr(t) { try { const e = fe(t); - return e === fe(Wt(e)); + return e === fe(Zt(e)); } catch { return !1; } } -const kr = (t) => t.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/"); -function Rr() { - return typeof navigator < "u" && navigator.languages ? navigator.languages[0] : new De().resolvedOptions().locale; +const qr = (t) => t.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/"); +function zr() { + return typeof navigator < "u" && navigator.languages ? navigator.languages[0] : new Re().resolvedOptions().locale; } -function Vr(t, e = 2) { +function Jr(t, e = 2) { if (t === 0) return "0 Bytes"; const r = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], s = Math.floor(Math.log(t) / Math.log(1024)), n = r[s]; - return `${new _e("en", { + return `${new Fe("en", { style: "decimal", maximumFractionDigits: e, minimumFractionDigits: 0 @@ -2360,7 +2371,7 @@ function X(t) { }); } X(K); -const Zt = { +const Yt = { $schema: "https://json-schema.org/draft/2020-12/schema", title: "Project Settings Contribution", description: "The data an extension provides to inform Platform.Bible of the project settings it provides", @@ -2377,8 +2388,8 @@ const Zt = { ], $defs: K }; -Object.freeze(Zt); -const Yt = { +Object.freeze(Yt); +const Qt = { $schema: "https://json-schema.org/draft/2020-12/schema", title: "Settings Contribution", description: "The data an extension provides to inform Platform.Bible of the settings it provides", @@ -2395,8 +2406,8 @@ const Yt = { ], $defs: K }; -Object.freeze(Yt); -const $e = { +Object.freeze(Qt); +const je = { languageStrings: { description: "Map whose keys are localized string keys and whose values provide information about how to localize strings for the localized string key", type: "object", @@ -2444,8 +2455,8 @@ const $e = { tsType: "LocalizeKey" } }; -X($e); -const Qt = { +X(je); +const er = { $schema: "https://json-schema.org/draft/2020-12/schema", title: "Localized String Data Contribution", description: "The data an extension provides to inform Platform.Bible of the localized strings it provides.", @@ -2461,10 +2472,10 @@ const Qt = { } } }, - $defs: $e + $defs: je }; -Object.freeze(Qt); -const er = { +Object.freeze(er); +const tr = { title: "Platform.Bible menus", type: "object", properties: { @@ -2710,73 +2721,76 @@ const er = { } } }; -Object.freeze(er); +Object.freeze(tr); export { - nr as AsyncVariable, - ir as Collator, - De as DateTimeFormat, - ze as DocumentCombiner, - yt as FIRST_SCR_BOOK_NUM, - Nt as FIRST_SCR_CHAPTER_NUM, - wt as FIRST_SCR_VERSE_NUM, - vt as LAST_SCR_BOOK_NUM, - Ge as Mutex, - pr as MutexMap, - dr as NonValidatingDocumentCombiner, - _e as NumberFormat, - xe as PlatformEventEmitter, - mr as UnsubscriberAsyncList, - Dr as aggregateUnsubscriberAsyncs, + ir as AsyncVariable, + or as Collator, + Re as DateTimeFormat, + Je as DocumentCombiner, + vt as FIRST_SCR_BOOK_NUM, + wt as FIRST_SCR_CHAPTER_NUM, + Et as FIRST_SCR_VERSE_NUM, + Nt as LAST_SCR_BOOK_NUM, + _e as Mutex, + dr as MutexMap, + mr as NonValidatingDocumentCombiner, + Fe as NumberFormat, + Me as PlatformEventEmitter, + gr as UnsubscriberAsyncList, + kr as aggregateUnsubscriberAsyncs, Mr as aggregateUnsubscribers, - br as at, + yr as at, I as charAt, - yr as codePointAt, - Ar as compareScrRefs, - hr as createSyncProxyForAsyncObject, - ar as debounce, + vr as codePointAt, + Dr as compareScrRefs, + pr as createSyncProxyForAsyncObject, + ur as debounce, D as deepClone, - Lt as deepEqual, - Wt as deserialize, - pt as endsWith, - jr as escapeStringRegexp, - Vr as formatBytes, - vr as formatReplacementString, - Br as formatScrRef, - fr as getAllObjectFunctionNames, - Et as getChaptersForBook, - Rr as getCurrentLocale, - lr as getErrorMessage, - Pr as getLocalizedIdFromBookNumber, - ur as groupBy, - kr as htmlEncode, - mt as includes, - x as indexOf, - $r as isLocalizeKey, - xr as isSerializable, + Ut as deepEqual, + Zt as deserialize, + dt as endsWith, + we as ensureArray, + Cr as escapeStringRegexp, + Jr as formatBytes, + Nr as formatReplacementString, + Rr as formatScrRef, + hr as getAllObjectFunctionNames, + St as getChaptersForBook, + zr as getCurrentLocale, + cr as getErrorMessage, + xr as getLocalizedIdFromBookNumber, + lr as groupBy, + qr as htmlEncode, + gt as includes, + R as indexOf, + jr as isLocalizeKey, + Vr as isSerializable, ke as isString, - Ut as isSubset, - gt as lastIndexOf, - Qt as localizedStringsDocumentSchema, - er as menuDocumentSchema, - or as newGuid, - Nr as normalize, - Cr as offsetBook, - Ir as offsetChapter, - Tr as offsetVerse, - wr as ordinalCompare, - Er as padEnd, - Sr as padStart, - Zt as projectSettingsDocumentSchema, + Wt as isSubset, + bt as lastIndexOf, + er as localizedStringsDocumentSchema, + tr as menuDocumentSchema, + ar as newGuid, + wr as normalize, + Tr as offsetBook, + Pr as offsetChapter, + Br as offsetVerse, + Er as ordinalCompare, + Sr as padEnd, + Or as padStart, + Yt as projectSettingsDocumentSchema, re as scrRefToBBBCCCVVV, fe as serialize, - Yt as settingsDocumentSchema, - Or as slice, + Qt as settingsDocumentSchema, + $r as slice, te as split, - we as startsWith, + Ee as startsWith, g as stringLength, w as substring, - bt as toArray, - qe as wait, - cr as waitForDuration + yt as toArray, + Ar as transformAndEnsureRegExpArray, + Ir as transformAndEnsureRegExpRegExpArray, + ze as wait, + fr as waitForDuration }; //# sourceMappingURL=index.js.map diff --git a/lib/platform-bible-utils/dist/index.js.map b/lib/platform-bible-utils/dist/index.js.map index 4d05d19222..8f3f9a98a2 100644 --- a/lib/platform-bible-utils/dist/index.js.map +++ b/lib/platform-bible-utils/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../src/async-variable.ts","../src/intl-collator.ts","../src/intl-date-time-format.ts","../src/platform-event-emitter.model.ts","../src/util.ts","../src/document-combiner.ts","../src/mutex.ts","../src/mutex-map.ts","../src/non-validating-document-combiner.ts","../src/intl-number-format.ts","../src/unsubscriber-async-list.ts","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../../../node_modules/char-regex/index.js","../../../node_modules/stringz/dist/index.js","../src/string-util.ts","../src/scripture-util.ts","../src/unsubscriber.ts","../../../node_modules/fast-equals/dist/esm/index.mjs","../src/equality-checking.ts","../src/subset-checking.ts","../src/serialization.ts","../src/intl-util.ts","../src/number-utils.ts","../src/settings.model.ts","../src/localized-strings.model.ts","../src/menus.model.ts"],"sourcesContent":["/** This class provides a convenient way for one task to wait on a variable that another task sets. */\nexport default class AsyncVariable {\n private readonly variableName: string;\n private readonly promiseToValue: Promise;\n private resolver: ((value: T) => void) | undefined;\n private rejecter: ((reason: string | undefined) => void) | undefined;\n\n /**\n * Creates an instance of the class\n *\n * @param variableName Name to use when logging about this variable\n * @param rejectIfNotSettledWithinMS Milliseconds to wait before verifying if the promise was\n * settled (resolved or rejected); will reject if it has not settled by that time. Use -1 if you\n * do not want a timeout at all. Defaults to 10000 ms\n */\n constructor(variableName: string, rejectIfNotSettledWithinMS: number = 10000) {\n this.variableName = variableName;\n this.promiseToValue = new Promise((resolve, reject) => {\n this.resolver = resolve;\n this.rejecter = reject;\n });\n if (rejectIfNotSettledWithinMS > 0) {\n setTimeout(() => {\n if (this.rejecter) {\n this.rejecter(`Timeout reached when waiting for ${this.variableName} to settle`);\n this.complete();\n }\n }, rejectIfNotSettledWithinMS);\n }\n Object.seal(this);\n }\n\n /**\n * Get this variable's promise to a value. This always returns the same promise even after the\n * value has been resolved or rejected.\n *\n * @returns The promise for the value to be set\n */\n get promise(): Promise {\n return this.promiseToValue;\n }\n\n /**\n * A simple way to see if this variable's promise was resolved or rejected already\n *\n * @returns Whether the variable was already resolved or rejected\n */\n get hasSettled(): boolean {\n return Object.isFrozen(this);\n }\n\n /**\n * Resolve this variable's promise to the given value\n *\n * @param value This variable's promise will resolve to this value\n * @param throwIfAlreadySettled Determines whether to throw if the variable was already resolved\n * or rejected. Defaults to `false`\n */\n resolveToValue(value: T, throwIfAlreadySettled: boolean = false): void {\n if (this.resolver) {\n console.debug(`${this.variableName} is being resolved now`);\n this.resolver(value);\n this.complete();\n } else {\n if (throwIfAlreadySettled) throw Error(`${this.variableName} was already settled`);\n console.debug(`Ignoring subsequent resolution of ${this.variableName}`);\n }\n }\n\n /**\n * Reject this variable's promise for the value with the given reason\n *\n * @param reason This variable's promise will be rejected with this reason\n * @param throwIfAlreadySettled Determines whether to throw if the variable was already resolved\n * or rejected. Defaults to `false`\n */\n rejectWithReason(reason: string, throwIfAlreadySettled: boolean = false): void {\n if (this.rejecter) {\n console.debug(`${this.variableName} is being rejected now`);\n this.rejecter(reason);\n this.complete();\n } else {\n if (throwIfAlreadySettled) throw Error(`${this.variableName} was already settled`);\n console.debug(`Ignoring subsequent rejection of ${this.variableName}`);\n }\n }\n\n /** Prevent any further updates to this variable */\n private complete(): void {\n this.resolver = undefined;\n this.rejecter = undefined;\n Object.freeze(this);\n }\n}\n","/** Enables language-sensitive string comparison. Wraps Intl.Collator */\nexport default class Collator {\n private collator: Intl.Collator;\n\n constructor(locales?: string | string[], options?: Intl.CollatorOptions) {\n this.collator = new Intl.Collator(locales, options);\n }\n\n /**\n * Compares two strings according to the sort order of this Collator object\n *\n * @param string1 String to compare\n * @param string2 String to compare\n * @returns A number indicating how string1 and string2 compare to each other according to the\n * sort order of this Collator object. Negative value if string1 comes before string2. Positive\n * value if string1 comes after string2. 0 if they are considered equal.\n */\n compare(string1: string, string2: string): number {\n return this.collator.compare(string1, string2);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and collation options computed\n * during initialization of this collator object.\n *\n * @returns ResolvedCollatorOptions object\n */\n resolvedOptions(): Intl.ResolvedCollatorOptions {\n return this.collator.resolvedOptions();\n }\n}\n","/** Enables language-sensitive data and time formatting. Wraps Intl.DateTimeFormat */\nexport default class DateTimeFormat {\n private dateTimeFormatter: Intl.DateTimeFormat;\n\n constructor(locales?: string | string[], options?: Intl.DateTimeFormatOptions) {\n this.dateTimeFormatter = new Intl.DateTimeFormat(locales, options);\n }\n\n /**\n * Formats a date according to the locale and formatting option for this DateTimeFormat object\n *\n * @param date The date to format\n * @returns String representing the given date formatted according to the locale and formatting\n * options of this DateTimeFormat object\n */\n format(date: Date): string {\n return this.dateTimeFormatter.format(date);\n }\n\n /**\n * Formats a date range in the most concise way based on the locales and options provided when\n * instantiating this DateTimeFormat object\n *\n * @param startDate Date object representing start of the date range\n * @param endDate Date object representing the end of the date range\n * @returns String representing the given date range formatted according to the locale and\n * formatting options of this DateTimeFormat object\n */\n formatRange(startDate: Date, endDate: Date): string {\n return this.dateTimeFormatter.formatRange(startDate, endDate);\n }\n\n /**\n * Returns an array of locale-specific tokens representing each part of the formatted date range\n * produced by this DateTimeFormat object\n *\n * @param startDate Date object representing start of the date range\n * @param endDate Date object representing the end of the date range\n * @returns Array of DateTimeRangeFormatPart objects\n */\n formatRangeToParts(startDate: Date, endDate: Date): Intl.DateTimeRangeFormatPart[] {\n return this.dateTimeFormatter.formatRangeToParts(startDate, endDate);\n }\n\n /**\n * Allows locale-aware formatting of strings produced by this DateTimeFormat object\n *\n * @param date The date to format\n * @returns Array of DateTimeFormatPart objects\n */\n formatToParts(date: Date): Intl.DateTimeFormatPart[] {\n return this.dateTimeFormatter.formatToParts(date);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and date and time formatting options\n * computed during initialization of this DateTimeFormat object\n *\n * @returns ResolvedDateTimeFormatOptions object\n */\n resolvedOptions(): Intl.ResolvedDateTimeFormatOptions {\n return this.dateTimeFormatter.resolvedOptions();\n }\n}\n","/** Interfaces, classes, and functions related to events and event emitters */\n\nimport { Dispose } from './disposal.model';\nimport { PlatformEvent, PlatformEventHandler } from './platform-event';\n\n/**\n * Event manager - accepts subscriptions to an event and runs the subscription callbacks when the\n * event is emitted Use eventEmitter.event(callback) to subscribe to the event. Use\n * eventEmitter.emit(event) to run the subscriptions. Generally, this EventEmitter should be\n * private, and its event should be public. That way, the emitter is not publicized, but anyone can\n * subscribe to the event.\n */\nexport default class PlatformEventEmitter implements Dispose {\n /**\n * Subscribes a function to run when this event is emitted.\n *\n * @param callback Function to run with the event when it is emitted\n * @returns Unsubscriber function to run to stop calling the passed-in function when the event is\n * emitted\n * @alias event\n */\n subscribe = this.event;\n\n /** All callback functions that will run when this event is emitted. Lazy loaded */\n private subscriptions?: PlatformEventHandler[];\n /** Event for listeners to subscribe to. Lazy loaded */\n private lazyEvent?: PlatformEvent;\n /** Whether this emitter has been disposed */\n private isDisposed = false;\n\n /**\n * Event for listeners to subscribe to. Subscribes a function to run when this event is emitted.\n * Use like `const unsubscriber = event(callback)`\n *\n * @param callback Function to run with the event when it is emitted\n * @returns Unsubscriber function to run to stop calling the passed-in function when the event is\n * emitted\n */\n get event(): PlatformEvent {\n this.assertNotDisposed();\n\n if (!this.lazyEvent) {\n this.lazyEvent = (callback) => {\n if (!callback || typeof callback !== 'function')\n throw new Error(`Event handler callback must be a function!`);\n\n // Initialize this.subscriptions if it does not exist\n if (!this.subscriptions) this.subscriptions = [];\n\n this.subscriptions.push(callback);\n\n return () => {\n if (!this.subscriptions) return false; // Did not find any subscribed callbacks\n\n const callbackIndex = this.subscriptions.indexOf(callback);\n\n if (callbackIndex < 0) return false; // Did not find this callback in the subscriptions\n\n // Remove the callback\n this.subscriptions.splice(callbackIndex, 1);\n\n return true;\n };\n };\n }\n return this.lazyEvent;\n }\n\n /** Disposes of this event, preparing it to release from memory */\n dispose = () => {\n return this.disposeFn();\n };\n\n /**\n * Runs the subscriptions for the event\n *\n * @param event Event data to provide to subscribed callbacks\n */\n emit = (event: T) => {\n // Do not do anything other than emitFn here. This emit is just binding `this` to emitFn\n this.emitFn(event);\n };\n\n /**\n * Function that runs the subscriptions for the event. Added here so children can override emit\n * and still call the base functionality. See NetworkEventEmitter.emit for example\n */\n protected emitFn(event: T) {\n this.assertNotDisposed();\n\n // Clone the subscriptions array before iterating over the callbacks so the callback index\n // doesn't get messed up if someone subscribes or unsubscribes inside one of the callbacks\n const emitCallbacks = [...(this.subscriptions ?? [])];\n emitCallbacks.forEach((callback) => callback(event));\n }\n\n /** Check to make sure this emitter is not disposed. Throw if it is */\n protected assertNotDisposed() {\n if (this.isDisposed) throw new Error('Emitter is disposed');\n }\n\n /**\n * Disposes of this event, preparing it to release from memory. Added here so children can\n * override emit and still call the base functionality.\n */\n protected disposeFn() {\n this.assertNotDisposed();\n\n this.isDisposed = true;\n this.subscriptions = undefined;\n this.lazyEvent = undefined;\n return Promise.resolve(true);\n }\n}\n","/** Collection of functions, objects, and types that are used as helpers in other services. */\n\n// Thanks to blubberdiblub at https://stackoverflow.com/a/68141099/217579\nexport function newGuid(): string {\n return '00-0-4-1-000'.replace(/[^-]/g, (s) =>\n // @ts-expect-error ts(2363) this works fine\n // eslint-disable-next-line no-bitwise\n (((Math.random() + ~~s) * 0x10000) >> s).toString(16).padStart(4, '0'),\n );\n}\n\n// thanks to DRAX at https://stackoverflow.com/a/9436948\n/**\n * Determine whether the object is a string\n *\n * @param o Object to determine if it is a string\n * @returns True if the object is a string; false otherwise\n */\nexport function isString(o: unknown): o is string {\n return typeof o === 'string' || o instanceof String;\n}\n\n/**\n * If deepClone isn't used when copying properties between objects, you may be left with dangling\n * references between the source and target of property copying operations.\n *\n * @param obj Object to clone\n * @returns Duplicate copy of `obj` without any references back to the original one\n */\nexport function deepClone(obj: T): T {\n // Assert the return type matches what is expected\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return JSON.parse(JSON.stringify(obj)) as T;\n}\n\n/**\n * Get a function that reduces calls to the function passed in\n *\n * @param fn The function to debounce\n * @param delay How much delay in milliseconds after the most recent call to the debounced function\n * to call the function\n * @returns Function that, when called, only calls the function passed in at maximum every delay ms\n */\n// We don't know the parameter types since this function can be anything\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function debounce void>(fn: T, delay = 300): T {\n if (isString(fn)) throw new Error('Tried to debounce a string! Could be XSS');\n let timeout: ReturnType;\n // Ensure the right return type.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return ((...args) => {\n clearTimeout(timeout);\n timeout = setTimeout(() => fn(...args), delay);\n }) as T;\n}\n\n/**\n * Groups each item in the array of items into a map according to the keySelector\n *\n * @param items Array of items to group by\n * @param keySelector Function to run on each item to get the key for the group to which it belongs\n * @param valueSelector Function to run on each item to get the value it should have in the group\n * (like map function). If not provided, uses the item itself\n * @returns Map of keys to groups of values corresponding to each item\n */\nexport function groupBy(items: T[], keySelector: (item: T) => K): Map>;\nexport function groupBy(\n items: T[],\n keySelector: (item: T) => K,\n valueSelector: (item: T, key: K) => V,\n): Map>;\nexport function groupBy(\n items: T[],\n keySelector: (item: T) => K,\n valueSelector?: (item: T, key: K) => V,\n): Map> {\n const map = new Map>();\n items.forEach((item) => {\n const key = keySelector(item);\n const group = map.get(key);\n const value = valueSelector ? valueSelector(item, key) : item;\n if (group) group.push(value);\n else map.set(key, [value]);\n });\n return map;\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\ntype ErrorWithMessage = {\n message: string;\n};\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\nfunction isErrorWithMessage(error: unknown): error is ErrorWithMessage {\n return (\n typeof error === 'object' &&\n // We're potentially dealing with objects we didn't create, so they might contain `null`\n // eslint-disable-next-line no-null/no-null\n error !== null &&\n 'message' in error &&\n // Type assert `error` to check it's `message`.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n typeof (error as Record).message === 'string'\n );\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\n/**\n * Function to get an error from the object (useful for getting an error in a catch block)\n *\n * @param error Error object whose message to get\n * @returns Message of the error - if object has message, returns message. Otherwise tries to\n * stringify\n */\nfunction toErrorWithMessage(maybeError: unknown): ErrorWithMessage {\n if (isErrorWithMessage(maybeError)) return maybeError;\n\n try {\n return new Error(JSON.stringify(maybeError));\n } catch {\n // fallback in case there's an error stringifying the maybeError\n // like with circular references for example.\n return new Error(String(maybeError));\n }\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\n/**\n * Function to get an error message from the object (useful for getting error message in a catch\n * block)\n *\n * @example `try {...} catch (e) { logger.info(getErrorMessage(e)) }`\n *\n * @param error Error object whose message to get\n * @returns Message of the error - if object has message, returns message. Otherwise tries to\n * stringify\n */\nexport function getErrorMessage(error: unknown) {\n return toErrorWithMessage(error).message;\n}\n\n/** Asynchronously waits for the specified number of milliseconds. (wraps setTimeout in a promise) */\nexport function wait(ms: number) {\n // eslint-disable-next-line no-promise-executor-return\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Runs the specified function and will timeout if it takes longer than the specified wait time\n *\n * @param fn The function to run\n * @param maxWaitTimeInMS The maximum amount of time to wait for the function to resolve\n * @returns Promise that resolves to the resolved value of the function or undefined if it ran\n * longer than the specified wait time\n */\nexport function waitForDuration(fn: () => Promise, maxWaitTimeInMS: number) {\n const timeout = wait(maxWaitTimeInMS).then(() => undefined);\n return Promise.any([timeout, fn()]);\n}\n\n/**\n * Get all functions on an object and its prototype chain (so we don't miss any class methods or any\n * object methods). Note that the functions on the final item in the prototype chain (i.e., Object)\n * are skipped to avoid including functions like `__defineGetter__`, `__defineSetter__`, `toString`,\n * etc.\n *\n * @param obj Object whose functions to get\n * @param _objId Optional ID of the object to use for debug logging\n * @returns Array of all function names on an object\n */\n// Note: lodash has something that MIGHT do the same thing as this. Investigate for https://github.com/paranext/paranext-core/issues/134\nexport function getAllObjectFunctionNames(\n obj: { [property: string]: unknown },\n // Leaving it here for debugging\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _objId: string = 'obj',\n): Set {\n const objectFunctionNames = new Set();\n\n // Get all function properties directly defined on the object\n Object.getOwnPropertyNames(obj).forEach((property) => {\n try {\n if (typeof obj[property] === 'function') objectFunctionNames.add(property);\n } catch (error) {\n // Too noisy - only reenable if you need more details\n // console.trace(`Skipping ${property} on ${objId} due to error: ${error}`);\n }\n });\n\n // Walk up the prototype chain and get additional function properties, skipping the functions\n // provided by the final (Object) prototype\n let objectPrototype = Object.getPrototypeOf(obj);\n while (objectPrototype && Object.getPrototypeOf(objectPrototype)) {\n Object.getOwnPropertyNames(objectPrototype).forEach((property) => {\n try {\n if (typeof obj[property] === 'function') objectFunctionNames.add(property);\n } catch (error) {\n // Too noisy - only reenable if you need more details\n // console.trace(`Skipping ${property} on ${objId}'s prototype due to error: ${error}`);\n }\n });\n objectPrototype = Object.getPrototypeOf(objectPrototype);\n }\n\n return objectFunctionNames;\n}\n\n/**\n * Creates a synchronous proxy for an asynchronous object. The proxy allows calling methods on an\n * object that is asynchronously fetched using a provided asynchronous function.\n *\n * @param getObject - A function that returns a promise resolving to the object whose asynchronous\n * methods to call.\n * @param objectToProxy - An optional object that is the object that is proxied. If a property is\n * accessed that does exist on this object, it will be returned. If a property is accessed that\n * does not exist on this object, it will be considered to be an asynchronous method called on the\n * object returned from getObject.\n * @returns A synchronous proxy for the asynchronous object.\n */\nexport function createSyncProxyForAsyncObject(\n getObject: (args?: unknown[]) => Promise,\n objectToProxy: Partial = {},\n): T {\n // objectToProxy will have only the synchronously accessed properties of T on it, and this proxy\n // makes the async methods that do not exist yet available synchronously so we have all of T\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return new Proxy(objectToProxy as T, {\n get(target, prop) {\n // We don't have any type information for T, so we assume methodName exists on it and will let JavaScript throw if it doesn't exist\n // @ts-expect-error 7053\n if (prop in target) return target[prop];\n return async (...args: unknown[]) => {\n // 7053: We don't have any type information for T, so we assume methodName exists on it and will let JavaScript throw if it doesn't exist\n // 2556: The args here are the parameters for the method specified\n // @ts-expect-error 7053 2556\n return (await getObject())[prop](...args);\n };\n },\n });\n}\n\n/** Within type T, recursively change all properties to be optional */\nexport type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial } : T;\n\n/** Within type T, recursively change properties that were of type A to be of type B */\nexport type ReplaceType = T extends A\n ? B\n : T extends object\n ? { [K in keyof T]: ReplaceType }\n : T;\n\n// Thanks to jcalz at https://stackoverflow.com/a/50375286\n/**\n * Converts a union type to an intersection type (`|` to `&`).\n *\n * Note: this utility type is for use on object types. It may fail on other types.\n *\n * @example\n *\n * ```typescript\n * type TypeOne = { one: string };\n * type TypeTwo = { two: number };\n * type TypeThree = { three: string };\n *\n * type TypeNums = { one: TypeOne; two: TypeTwo; three: TypeThree };\n * const numNames = ['one', 'two'] as const;\n * type TypeNumNames = typeof numNames;\n *\n * // Same as `TypeOne | TypeTwo`\n * // `{ one: string } | { two: number }`\n * type TypeOneTwoUnion = TypeNums[TypeNumNames[number]];\n *\n * // Same as `TypeOne & TypeTwo`\n * // `{ one: string; two: number }`\n * type TypeOneTwoIntersection = UnionToIntersection;\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type UnionToIntersection = (U extends any ? (x: U) => void : never) extends (\n x: infer I,\n) => void\n ? I\n : never;\n","import PlatformEventEmitter from './platform-event-emitter.model';\nimport { deepClone } from './util';\n\ntype JsonObjectLike = { [key: string]: unknown };\ntype JsonArrayLike = unknown[];\n\nexport type JsonDocumentLike = JsonObjectLike | JsonArrayLike;\n\n/**\n * Options for DocumentCombiner objects\n *\n * - `copyDocuments`: If true, this instance will perform a deep copy of all provided documents before\n * composing the output. If false, then changes made to provided documents after they are\n * contributed will be reflected in the next time output is composed.\n * - `ignoreDuplicateProperties`: If true, then duplicate properties are skipped if they are seen in\n * contributed documents. If false, then throw when duplicate properties are seen in contributed\n * documents.\n */\nexport type DocumentCombinerOptions = {\n copyDocuments: boolean;\n ignoreDuplicateProperties: boolean;\n};\n\n/**\n * Base class for any code that wants to compose JSON documents (primarily in the form of JS objects\n * or arrays) together into a single output document.\n */\nexport default class DocumentCombiner {\n protected baseDocument: JsonDocumentLike;\n protected readonly contributions = new Map();\n protected latestOutput: JsonDocumentLike | undefined;\n protected readonly options: DocumentCombinerOptions;\n private readonly onDidRebuildEmitter = new PlatformEventEmitter();\n /** Event that emits to announce that the document has been rebuilt and the output has been updated */\n // Need `onDidRebuildEmitter` to be instantiated before this line\n // eslint-disable-next-line @typescript-eslint/member-ordering\n readonly onDidRebuild = this.onDidRebuildEmitter.subscribe;\n\n /**\n * Create a DocumentCombiner instance\n *\n * @param baseDocument This is the first document that will be used when composing the output\n * @param options Options used by this object when combining documents\n */\n protected constructor(baseDocument: JsonDocumentLike, options: DocumentCombinerOptions) {\n // Setting baseDocument redundantly because TS doesn't understand that updateBaseDocument does it\n this.baseDocument = baseDocument;\n this.options = options;\n this.updateBaseDocument(baseDocument);\n }\n\n /**\n * Update the starting document for composition process\n *\n * @param baseDocument Base JSON document/JS object that all other documents are added to\n * @returns Recalculated output document given the new starting state and existing other documents\n */\n updateBaseDocument(baseDocument: JsonDocumentLike): JsonDocumentLike | undefined {\n this.validateBaseDocument(baseDocument);\n this.baseDocument = this.options.copyDocuments ? deepClone(baseDocument) : baseDocument;\n this.baseDocument = this.transformBaseDocumentAfterValidation(this.baseDocument);\n return this.rebuild();\n }\n\n /**\n * Add or update one of the contribution documents for the composition process\n *\n * Note: the order in which contribution documents are added can be considered to be indeterminate\n * as it is currently ordered by however `Map.forEach` provides the contributions. The order\n * matters when merging two arrays into one. Also, when `options.ignoreDuplicateProperties` is\n * `true`, the order also matters when adding the same property to an object that is already\n * provided previously. Please let us know if you have trouble because of indeterminate\n * contribution ordering.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine\n * @returns Recalculated output document given the new or updated contribution and existing other\n * documents\n */\n addOrUpdateContribution(\n documentName: string,\n document: JsonDocumentLike,\n ): JsonDocumentLike | undefined {\n this.validateContribution(documentName, document);\n const previousDocumentVersion = this.contributions.get(documentName);\n let documentToSet = this.options.copyDocuments && !!document ? deepClone(document) : document;\n documentToSet = this.transformContributionAfterValidation(documentName, documentToSet);\n this.contributions.set(documentName, documentToSet);\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after adding/updating the contribution, put it back how it was\n if (previousDocumentVersion) this.contributions.set(documentName, previousDocumentVersion);\n else this.contributions.delete(documentName);\n throw new Error(`Error when setting the document named ${documentName}: ${error}`);\n }\n }\n\n /**\n * Delete one of the contribution documents for the composition process\n *\n * @param documentName Name of the contributed document to delete\n * @returns Recalculated output document given the remaining other documents\n */\n deleteContribution(documentName: string): JsonDocumentLike | undefined {\n const document = this.contributions.get(documentName);\n if (!document) throw new Error(`${documentName} does not exist`);\n this.contributions.delete(documentName);\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after deleting the contribution, put it back and rethrow\n this.contributions.set(documentName, document);\n throw new Error(`Error when deleting the document named ${documentName}: ${error}`);\n }\n }\n\n /**\n * Delete all present contribution documents for the composition process and return to the base\n * document\n *\n * @returns Recalculated output document consisting only of the base document\n */\n deleteAllContributions(): JsonDocumentLike | undefined {\n if (this.contributions.size <= 0) return this.latestOutput;\n\n // Save out all contributions\n const contributions = [...this.contributions.entries()];\n\n // Delete all contributions\n contributions.forEach(([contributionName]) => this.contributions.delete(contributionName));\n\n // Rebuild with no contributions\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after deleting all contributions, put them back and rethrow\n contributions.forEach(([contributionName, document]) =>\n this.contributions.set(contributionName, document),\n );\n throw new Error(`Error when deleting all contributions: ${error}`);\n }\n }\n\n /**\n * Run the document composition process given the starting document and all contributions. Throws\n * if the output document fails to validate properly.\n *\n * @returns Recalculated output document given the starting and contributed documents\n */\n rebuild(): JsonDocumentLike | undefined {\n // The starting document is the output if there are no other contributions\n if (this.contributions.size === 0) {\n let potentialOutput = deepClone(this.baseDocument);\n potentialOutput = this.transformFinalOutputBeforeValidation(potentialOutput);\n this.validateOutput(potentialOutput);\n this.latestOutput = potentialOutput;\n this.onDidRebuildEmitter.emit(undefined);\n return this.latestOutput;\n }\n\n // Compose the output by validating each document one at a time to pinpoint errors better\n let outputIteration = this.baseDocument;\n this.contributions.forEach((contribution: JsonDocumentLike) => {\n outputIteration = mergeObjects(\n outputIteration,\n contribution,\n this.options.ignoreDuplicateProperties,\n );\n this.validateOutput(outputIteration);\n });\n outputIteration = this.transformFinalOutputBeforeValidation(outputIteration);\n this.validateOutput(outputIteration);\n this.latestOutput = outputIteration;\n this.onDidRebuildEmitter.emit(undefined);\n return this.latestOutput;\n }\n\n /**\n * Transform the starting document that is given to the combiner. This transformation occurs after\n * validating the base document and before combining any contributions.\n *\n * WARNING: If you do not create the combiner with option `copyDocuments: true` or clone inside\n * this method, this method will directly modify the `baseDocument` passed in.\n *\n * @param baseDocument Initial input document. Already validated via `validateBaseDocument`\n * @returns Transformed base document\n */\n // We just don't need `this` here. This is basically a no-op function that is available to child\n // classes to override\n // eslint-disable-next-line class-methods-use-this\n protected transformBaseDocumentAfterValidation(baseDocument: JsonDocumentLike): JsonDocumentLike {\n return baseDocument;\n }\n\n /**\n * Transform the contributed document associated with `documentName`. This transformation occurs\n * after validating the contributed document and before combining with other documents.\n *\n * WARNING: If you do not create the combiner with option `copyDocuments: true` or clone inside\n * this method, this method will directly modify the contributed `document` passed in.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine. Already validated via\n * `validateContribution`\n * @returns Transformed contributed document\n */\n // We just don't need `this` here. This is basically a no-op function that is available to child\n // classes to override\n // eslint-disable-next-line class-methods-use-this\n protected transformContributionAfterValidation(\n // @ts-expect-error this parameter is unused but may be used in child classes\n documentName: string,\n document: JsonDocumentLike,\n ): JsonDocumentLike {\n return document;\n }\n\n /**\n * Throw an error if the provided document is not a valid starting document.\n *\n * @param baseDocument Base JSON document/JS object that all other documents are added to\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateBaseDocument(baseDocument: JsonDocumentLike): void {}\n\n /**\n * Throw an error if the provided document is not a valid contribution document.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateContribution(documentName: string, document: JsonDocumentLike): void {}\n\n /**\n * Throw an error if the provided output is not valid.\n *\n * @param output Output document that could potentially be returned to callers\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateOutput(output: JsonDocumentLike): void {}\n\n /**\n * Transform the document that is the composition of the base document and all contribution\n * documents. This is the last step that will be run prior to validation via `validateOutput`\n * before `this.latestOutput` is updated to the new output.\n *\n * @param finalOutput Final output document that could potentially be returned to callers. \"Final\"\n * means no further contribution documents will be merged.\n */\n // no-op intended to be overridden by child classes. Can't be static\n // eslint-disable-next-line class-methods-use-this\n protected transformFinalOutputBeforeValidation(finalOutput: JsonDocumentLike): JsonDocumentLike {\n return finalOutput;\n }\n}\n\n// #region Helper functions\n\n/**\n * Determines if the input values are objects but not arrays\n *\n * @param values Objects to check\n * @returns True if all the values are objects but not arrays\n */\nfunction areNonArrayObjects(...values: unknown[]): boolean {\n let allMatch = true;\n values.forEach((value: unknown) => {\n if (!value || typeof value !== 'object' || Array.isArray(value)) allMatch = false;\n });\n return allMatch;\n}\n\n/**\n * Determines if the input values are arrays\n *\n * @param value Objects to check\n * @returns True if the values are arrays\n */\nfunction areArrayObjects(...values: unknown[]): boolean {\n let allMatch = true;\n values.forEach((value: unknown) => {\n if (!value || typeof value !== 'object' || !Array.isArray(value)) allMatch = false;\n });\n return allMatch;\n}\n\n/**\n * Deep clone and recursively merge the properties of one object (copyFrom) into another\n * (startingPoint). Throws if copyFrom would overwrite values already existing in startingPoint.\n *\n * Does not modify the objects passed in.\n *\n * @param startingPoint Object that is the starting point for the return value\n * @param copyFrom Object whose values are copied into the return value\n * @param ignoreDuplicateProperties Whether to ignore object properties that are present in\n * `copyFrom` that are already present in `startingPoint`. If `false`, throws when an object\n * property in `copyFrom` is already present in `startingPoint`\n * @returns Object that is the combination of the two documents\n */\nfunction mergeObjects(\n startingPoint: JsonDocumentLike,\n copyFrom: JsonDocumentLike,\n ignoreDuplicateProperties: boolean,\n): JsonDocumentLike {\n const retVal = deepClone(startingPoint);\n\n if (!copyFrom) return retVal;\n\n return mergeObjectsInternal(retVal, deepClone(copyFrom), ignoreDuplicateProperties);\n}\n\n/**\n * Recursively merge the properties of one object (copyFrom) into another (startingPoint). Throws if\n * copyFrom would overwrite values already existing in startingPoint.\n *\n * WARNING: Modifies the argument objects in some way. Recommended to use `mergeObjects`\n *\n * @param startingPoint Object that is the starting point for the return value\n * @param copyFrom Object whose values are copied into the return value\n * @param ignoreDuplicateProperties Whether to ignore object properties that are present in\n * `copyFrom` that are already present in `startingPoint`. If `false`, throws when an object\n * property in `copyFrom` is already present in `startingPoint`\n * @returns Object that is the combination of the two documents\n */\nfunction mergeObjectsInternal(\n startingPoint: JsonDocumentLike,\n copyFrom: JsonDocumentLike,\n ignoreDuplicateProperties: boolean,\n): JsonDocumentLike {\n if (!copyFrom) return startingPoint;\n\n if (areNonArrayObjects(startingPoint, copyFrom)) {\n // Merge properties since they are both objects\n\n // We know these are objects from the `if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n const startingPointObj = startingPoint as JsonObjectLike;\n const copyFromObj = copyFrom as JsonObjectLike;\n /* eslint-enable no-type-assertion/no-type-assertion */\n Object.keys(copyFromObj).forEach((key: string | number) => {\n if (Object.hasOwn(startingPointObj, key)) {\n if (areNonArrayObjects(startingPointObj[key], copyFromObj[key])) {\n startingPointObj[key] = mergeObjectsInternal(\n // We know these are objects from the `if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n startingPointObj[key] as JsonObjectLike,\n copyFromObj[key] as JsonObjectLike,\n ignoreDuplicateProperties,\n /* eslint-enable no-type-assertion/no-type-assertion */\n );\n } else if (areArrayObjects(startingPointObj[key], copyFromObj[key])) {\n // Concat the arrays since they are both arrays\n\n // We know these are arrays from the `else if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n startingPointObj[key] = (startingPointObj[key] as JsonArrayLike).concat(\n copyFromObj[key] as JsonArrayLike,\n );\n /* eslint-enable no-type-assertion/no-type-assertion */\n } else if (!ignoreDuplicateProperties)\n throw new Error(`Cannot merge objects: key \"${key}\" already exists in the target object`);\n // Note that the first non-object non-array value that gets placed in a property stays.\n // New values do not override existing ones\n } else {\n startingPointObj[key] = copyFromObj[key];\n }\n });\n } else if (areArrayObjects(startingPoint, copyFrom)) {\n // Concat the arrays since they are both arrays\n\n // Push the contents of copyFrom into startingPoint since it is a const and was already deep cloned\n // We know these are objects from the `else if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n (startingPoint as JsonArrayLike).push(...(copyFrom as JsonArrayLike));\n /* eslint-enable no-type-assertion/no-type-assertion */\n }\n\n // Note that nothing happens if `startingPoint` is not an object or an array or if `startingPoint`\n // and `copyFrom` are not both object or both arrays. Should we throw? Should we push `copyFrom`'s\n // values into the array? Other? Maybe one day we can add some options to decide what to do in\n // this situation, but YAGNI for now\n\n return startingPoint;\n}\n\n// #endregion\n","import { Mutex as AsyncMutex } from 'async-mutex';\n\n// Extending Mutex from async-mutex so we can add JSDoc\n\n/**\n * Class that allows calling asynchronous functions multiple times at once while only running one at\n * a time.\n *\n * @example\n *\n * ```typescript\n * const mutex = new Mutex();\n *\n * mutex.runExclusive(async () => {\n * // Do some asynchronous stuff\n * console.log('These run one-at-a-time');\n * });\n *\n * mutex.runExclusive(async () => {\n * // Do some asynchronous stuff\n * console.log('These run one-at-a-time');\n * });\n * ```\n *\n * See [`async-mutex`](https://www.npmjs.com/package/async-mutex) for more information.\n */\nclass Mutex extends AsyncMutex {}\n\nexport default Mutex;\n","import Mutex from './mutex';\n\n/** Map of {@link Mutex}es that automatically (lazily) generates a new {@link Mutex} for any new key */\nclass MutexMap {\n private mutexesByID = new Map();\n\n get(mutexID: string): Mutex {\n let retVal = this.mutexesByID.get(mutexID);\n if (retVal) return retVal;\n\n retVal = new Mutex();\n this.mutexesByID.set(mutexID, retVal);\n return retVal;\n }\n}\n\nexport default MutexMap;\n","import DocumentCombiner, { DocumentCombinerOptions, JsonDocumentLike } from './document-combiner';\n\nexport default class NonValidatingDocumentCombiner extends DocumentCombiner {\n // Making the protected base constructor public\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(baseDocument: JsonDocumentLike, options: DocumentCombinerOptions) {\n super(baseDocument, options);\n }\n\n get output(): JsonDocumentLike | undefined {\n return this.latestOutput;\n }\n}\n","/** Enables language-sensitive number formatting. Wraps Intl.NumberFormat */\nexport default class NumberFormat {\n private numberFormatter: Intl.NumberFormat;\n\n constructor(locales?: string | string[], options?: Intl.NumberFormatOptions) {\n this.numberFormatter = new Intl.NumberFormat(locales, options);\n }\n\n /**\n * Formats a number according to the locale and formatting options of this NumberFormat object\n *\n * @param value Number or BigInt to format\n * @returns String representing the given number formatted according to the locale and formatting\n * options of this NumberFormat object\n */\n format(value: number | bigint): string {\n return this.numberFormatter.format(value);\n }\n\n /**\n * Formats a range of numbers according to the locale and formatting options of this NumberFormat\n * object\n *\n * @param startRange Number or bigint representing the start of the range\n * @param endRange Number or bigint representing the end of the range\n * @returns String representing the given range of numbers formatted according to the locale and\n * formatting options of this NumberFormat object\n */\n formatRange(startRange: number | bigint, endRange: number | bigint): string {\n return this.numberFormatter.formatRange(startRange, endRange);\n }\n\n /**\n * Returns an array of objects containing the locale-specific tokens from which it is possible to\n * build custom strings while preserving the locale-specific parts.\n *\n * @param startRange Number or bigint representing start of the range\n * @param endRange Number or bigint representing end of the range\n * @returns Array of NumberRangeFormatPart objects containing the formatted range of numbers in\n * parts\n */\n formatRangeToParts(\n startRange: number | bigint,\n endRange: number | bigint,\n ): Intl.NumberRangeFormatPart[] {\n return this.numberFormatter.formatRangeToParts(startRange, endRange);\n }\n\n /**\n * Allows locale-aware formatting of strings produced by this NumberFormat object\n *\n * @param value Number or bigint to format\n * @returns Array of NumberFormatPart objects containing the formatted number in parts\n */\n formatToParts(value: number | bigint): Intl.NumberFormatPart[] {\n return this.numberFormatter.formatToParts(value);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and number formatting options\n * computed during initialization of this NumberFormat object\n *\n * @returns ResolvedNumberFormatOptions object\n */\n resolvedOptions(): Intl.ResolvedNumberFormatOptions {\n return this.numberFormatter.resolvedOptions();\n }\n}\n","import { Dispose } from './disposal.model';\nimport { Unsubscriber, UnsubscriberAsync } from './unsubscriber';\n\n/** Simple collection for UnsubscriberAsync objects that also provides an easy way to run them. */\nexport default class UnsubscriberAsyncList {\n readonly unsubscribers = new Set();\n\n constructor(private name = 'Anonymous') {}\n\n /**\n * Add unsubscribers to the list. Note that duplicates are not added twice.\n *\n * @param unsubscribers - Objects that were returned from a registration process.\n */\n add(...unsubscribers: (UnsubscriberAsync | Unsubscriber | Dispose)[]) {\n unsubscribers.forEach((unsubscriber) => {\n if ('dispose' in unsubscriber) this.unsubscribers.add(unsubscriber.dispose);\n else this.unsubscribers.add(unsubscriber);\n });\n }\n\n /**\n * Run all unsubscribers added to this list and then clear the list.\n *\n * @returns `true` if all unsubscribers succeeded, `false` otherwise.\n */\n async runAllUnsubscribers(): Promise {\n const unsubs = [...this.unsubscribers].map((unsubscriber) => unsubscriber());\n const results = await Promise.all(unsubs);\n this.unsubscribers.clear();\n return results.every((unsubscriberSucceeded, index) => {\n if (!unsubscriberSucceeded)\n console.error(`UnsubscriberAsyncList ${this.name}: Unsubscriber at index ${index} failed!`);\n\n return unsubscriberSucceeded;\n });\n }\n}\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","\"use strict\"\r\n\r\n// Based on: https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js\r\n\r\nmodule.exports = () => {\r\n\t// Used to compose unicode character classes.\r\n\tconst astralRange = \"\\\\ud800-\\\\udfff\"\r\n\tconst comboMarksRange = \"\\\\u0300-\\\\u036f\"\r\n\tconst comboHalfMarksRange = \"\\\\ufe20-\\\\ufe2f\"\r\n\tconst comboSymbolsRange = \"\\\\u20d0-\\\\u20ff\"\r\n\tconst comboMarksExtendedRange = \"\\\\u1ab0-\\\\u1aff\"\r\n\tconst comboMarksSupplementRange = \"\\\\u1dc0-\\\\u1dff\"\r\n\tconst comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange\r\n\tconst varRange = \"\\\\ufe0e\\\\ufe0f\"\r\n\tconst familyRange = \"\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFB\\\\u200D\\\\uD83C\\\\uDF93\"\r\n\r\n\t// Used to compose unicode capture groups.\r\n\tconst astral = `[${astralRange}]`\r\n\tconst combo = `[${comboRange}]`\r\n\tconst fitz = \"\\\\ud83c[\\\\udffb-\\\\udfff]\"\r\n\tconst modifier = `(?:${combo}|${fitz})`\r\n\tconst nonAstral = `[^${astralRange}]`\r\n\tconst regional = \"(?:\\\\uD83C[\\\\uDDE6-\\\\uDDFF]){2}\"\r\n\tconst surrogatePair = \"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\"\r\n\tconst zwj = \"\\\\u200d\"\r\n\tconst blackFlag = \"(?:\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40(?:\\\\udc65|\\\\udc73|\\\\udc77)\\\\udb40(?:\\\\udc6e|\\\\udc63|\\\\udc6c)\\\\udb40(?:\\\\udc67|\\\\udc74|\\\\udc73)\\\\udb40\\\\udc7f)\"\r\n\tconst family = `[${familyRange}]`\r\n\r\n\t// Used to compose unicode regexes.\r\n\tconst optModifier = `${modifier}?`\r\n\tconst optVar = `[${varRange}]?`\r\n\tconst optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join(\"|\")})${optVar + optModifier})*`\r\n\tconst seq = optVar + optModifier + optJoin\r\n\tconst nonAstralCombo = `${nonAstral}${combo}?`\r\n\tconst symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join(\"|\")})`\r\n\r\n\t// Used to match [String symbols](https://mathiasbynens.be/notes/javascript-unicode).\r\n\treturn new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, \"g\")\r\n}\r\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// @ts-ignore\nvar char_regex_1 = __importDefault(require(\"char-regex\"));\n/**\n * Converts a string to an array of string chars\n * @param {string} str The string to turn into array\n * @returns {string[]}\n */\nfunction toArray(str) {\n if (typeof str !== 'string') {\n throw new Error('A string is expected as input');\n }\n return str.match(char_regex_1.default()) || [];\n}\nexports.toArray = toArray;\n/**\n * Returns the length of a string\n *\n * @export\n * @param {string} str\n * @returns {number}\n */\nfunction length(str) {\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n var match = str.match(char_regex_1.default());\n return match === null ? 0 : match.length;\n}\nexports.length = length;\n/**\n * Returns a substring by providing start and end position\n *\n * @export\n * @param {string} str\n * @param {number} [begin=0] Starting position\n * @param {number} end End position\n * @returns {string}\n */\nfunction substring(str, begin, end) {\n if (begin === void 0) { begin = 0; }\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n // Even though negative numbers work here, theyre not in the spec\n if (typeof begin !== 'number' || begin < 0) {\n begin = 0;\n }\n if (typeof end === 'number' && end < 0) {\n end = 0;\n }\n var match = str.match(char_regex_1.default());\n if (!match)\n return '';\n return match.slice(begin, end).join('');\n}\nexports.substring = substring;\n/**\n * Returns a substring by providing start position and length\n *\n * @export\n * @param {string} str\n * @param {number} [begin=0] Starting position\n * @param {number} len Desired length\n * @returns {string}\n */\nfunction substr(str, begin, len) {\n if (begin === void 0) { begin = 0; }\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n var strLength = length(str);\n // Fix type\n if (typeof begin !== 'number') {\n begin = parseInt(begin, 10);\n }\n // Return zero-length string if got oversize number.\n if (begin >= strLength) {\n return '';\n }\n // Calculating postive version of negative value.\n if (begin < 0) {\n begin += strLength;\n }\n var end;\n if (typeof len === 'undefined') {\n end = strLength;\n }\n else {\n // Fix type\n if (typeof len !== 'number') {\n len = parseInt(len, 10);\n }\n end = len >= 0 ? len + begin : begin;\n }\n var match = str.match(char_regex_1.default());\n if (!match)\n return '';\n return match.slice(begin, end).join('');\n}\nexports.substr = substr;\n/**\n * Enforces a string to be a certain length by\n * adding or removing characters\n *\n * @export\n * @param {string} str\n * @param {number} [limit=16] Limit\n * @param {string} [padString='#'] The Pad String\n * @param {string} [padPosition='right'] The Pad Position\n * @returns {string}\n */\nfunction limit(str, limit, padString, padPosition) {\n if (limit === void 0) { limit = 16; }\n if (padString === void 0) { padString = '#'; }\n if (padPosition === void 0) { padPosition = 'right'; }\n // Input should be a string, limit should be a number\n if (typeof str !== 'string' || typeof limit !== 'number') {\n throw new Error('Invalid arguments specified');\n }\n // Pad position should be either left or right\n if (['left', 'right'].indexOf(padPosition) === -1) {\n throw new Error('Pad position should be either left or right');\n }\n // Pad string can be anything, we convert it to string\n if (typeof padString !== 'string') {\n padString = String(padString);\n }\n // Calculate string length considering astral code points\n var strLength = length(str);\n if (strLength > limit) {\n return substring(str, 0, limit);\n }\n else if (strLength < limit) {\n var padRepeats = padString.repeat(limit - strLength);\n return padPosition === 'left' ? padRepeats + str : str + padRepeats;\n }\n return str;\n}\nexports.limit = limit;\n/**\n * Returns the index of the first occurrence of a given string\n *\n * @export\n * @param {string} str\n * @param {string} [searchStr] the string to search\n * @param {number} [pos] starting position\n * @returns {number}\n */\nfunction indexOf(str, searchStr, pos) {\n if (pos === void 0) { pos = 0; }\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n if (str === '') {\n if (searchStr === '') {\n return 0;\n }\n return -1;\n }\n // fix type\n pos = Number(pos);\n pos = isNaN(pos) ? 0 : pos;\n searchStr = String(searchStr);\n var strArr = toArray(str);\n if (pos >= strArr.length) {\n if (searchStr === '') {\n return strArr.length;\n }\n return -1;\n }\n if (searchStr === '') {\n return pos;\n }\n var searchArr = toArray(searchStr);\n var finded = false;\n var index;\n for (index = pos; index < strArr.length; index += 1) {\n var searchIndex = 0;\n while (searchIndex < searchArr.length &&\n searchArr[searchIndex] === strArr[index + searchIndex]) {\n searchIndex += 1;\n }\n if (searchIndex === searchArr.length &&\n searchArr[searchIndex - 1] === strArr[index + searchIndex - 1]) {\n finded = true;\n break;\n }\n }\n return finded ? index : -1;\n}\nexports.indexOf = indexOf;\n","import { LocalizeKey } from 'menus.model';\nimport {\n indexOf as stringzIndexOf,\n substring as stringzSubstring,\n length as stringzLength,\n toArray as stringzToArray,\n limit as stringzLimit,\n substr as stringzSubstr,\n} from 'stringz';\n\n/**\n * This function mirrors the `at` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Finds the Unicode code point at the given index.\n *\n * @param string String to index\n * @param index Position of the character to be returned in range of -length(string) to\n * length(string)\n * @returns New string consisting of the Unicode code point located at the specified offset,\n * undefined if index is out of bounds\n */\nexport function at(string: string, index: number): string | undefined {\n if (index > stringLength(string) || index < -stringLength(string)) return undefined;\n return substr(string, index, 1);\n}\n\n/**\n * This function mirrors the `charAt` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a new string consisting of the single unicode code point at the given index.\n *\n * @param string String to index\n * @param index Position of the string character to be returned, in the range of 0 to\n * length(string)-1\n * @returns New string consisting of the Unicode code point located at the specified offset, empty\n * string if index is out of bounds\n */\nexport function charAt(string: string, index: number): string {\n if (index < 0 || index > stringLength(string) - 1) return '';\n return substr(string, index, 1);\n}\n\n/**\n * This function mirrors the `codePointAt` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a non-negative integer that is the Unicode code point value of the character starting at\n * the given index.\n *\n * @param string String to index\n * @param index Position of the string character to be returned, in the range of 0 to\n * length(string)-1\n * @returns Non-negative integer representing the code point value of the character at the given\n * index, or undefined if there is no element at that position\n */\nexport function codePointAt(string: string, index: number): number | undefined {\n if (index < 0 || index > stringLength(string) - 1) return undefined;\n return substr(string, index, 1).codePointAt(0);\n}\n\n/**\n * This function mirrors the `endsWith` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Determines whether a string ends with the characters of this string.\n *\n * @param string String to search through\n * @param searchString Characters to search for at the end of the string\n * @param endPosition End position where searchString is expected to be found. Default is\n * `length(string)`\n * @returns True if it ends with searchString, false if it does not\n */\nexport function endsWith(\n string: string,\n searchString: string,\n endPosition: number = stringLength(string),\n): boolean {\n const lastIndexOfSearchString = lastIndexOf(string, searchString);\n if (lastIndexOfSearchString === -1) return false;\n if (lastIndexOfSearchString + stringLength(searchString) !== endPosition) return false;\n return true;\n}\n\n/**\n * Get the index of the closest closing curly brace in a string.\n *\n * Note: when escaped, gets the index of the curly brace, not the backslash before it.\n *\n * @param str String to search\n * @param index Index at which to start searching. Inclusive of this index\n * @param escaped Whether to search for an escaped or an unescaped closing curly brace\n * @returns Index of closest closing curly brace or -1 if not found\n */\nfunction indexOfClosestClosingCurlyBrace(str: string, index: number, escaped: boolean) {\n if (index < 0) return -1;\n if (escaped) {\n if (charAt(str, index) === '}' && charAt(str, index - 1) === '\\\\') return index;\n const closeCurlyBraceIndex = indexOf(str, '\\\\}', index);\n return closeCurlyBraceIndex >= 0 ? closeCurlyBraceIndex + 1 : closeCurlyBraceIndex;\n }\n\n let i = index;\n const strLength = stringLength(str);\n while (i < strLength) {\n i = indexOf(str, '}', i);\n\n if (i === -1 || charAt(str, i - 1) !== '\\\\') break;\n\n // Didn't find an un-escaped close brace, so keep looking\n i += 1;\n }\n\n return i >= strLength ? -1 : i;\n}\n\n/**\n * Formats a string, replacing `{replacer key}` with the value in the `replacers` at that replacer\n * key (or multiple replacer values if there are multiple in the string). Will also remove \\ before\n * curly braces if curly braces are escaped with a backslash in order to preserve the curly braces.\n * E.g. 'Hi, this is {name}! I like `\\{curly braces\\}`! would become Hi, this is Jim! I like {curly\n * braces}!\n *\n * If the key in unescaped braces is not found, returns the key without the braces. Empty unescaped\n * curly braces will just return a string without the braces e.g. ('I am {Nemo}', { 'name': 'Jim'})\n * would return 'I am Nemo'.\n *\n * @example\n *\n * ```typescript\n * formatReplacementString(\n * 'Hi, this is {name}! I like \\{curly braces\\}! I have a {carColor} car. My favorite food is {food}.',\n * { name: 'Bill', carColor: 'blue' }\n * );\n *\n * =>\n *\n * 'Hi, this is Bill! I like {curly braces}! I have a blue car. My favorite food is food.'\n * ```\n *\n * @param str String to format\n * @param replacers Object whose keys are replacer keys and whose values are the values with which\n * to replace `{replacer key}`s found in the string to format. Will be coerced to strings using\n * `${replacerValue}`\n * @returns Formatted string\n */\nexport function formatReplacementString(\n str: string,\n replacers: { [key: string | number]: string | unknown } | object,\n): string {\n let updatedStr = str;\n\n let i = 0;\n while (i < stringLength(updatedStr)) {\n switch (charAt(updatedStr, i)) {\n case '{':\n if (charAt(updatedStr, i - 1) !== '\\\\') {\n // This character is an un-escaped open curly brace. Try to match and replace\n const closeCurlyBraceIndex = indexOfClosestClosingCurlyBrace(updatedStr, i, false);\n if (closeCurlyBraceIndex >= 0) {\n // We have matching open and close indices. Try to replace the contents\n const replacerKey = substring(updatedStr, i + 1, closeCurlyBraceIndex);\n // Replace with the replacer string or just remove the curly braces\n const replacerString =\n replacerKey in replacers\n ? // We're getting a value.toString() with any type from an object with any keys\n // here. TypeScript doesn't need to carefully and precisely track the exact type.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n `${replacers[replacerKey as keyof typeof replacers]}`\n : replacerKey;\n\n updatedStr = `${substring(updatedStr, 0, i)}${replacerString}${substring(updatedStr, closeCurlyBraceIndex + 1)}`;\n // Put our index at the closing brace adjusted for the new string length minus two\n // because we are removing the curly braces\n // Ex: \"stuff {and} things\"\n // Replacer for and: n'\n // closeCurlyBraceIndex is 10\n // \"stuff n' things\"\n // i = 10 + 2 - 3 - 2 = 7\n i = closeCurlyBraceIndex + stringLength(replacerString) - stringLength(replacerKey) - 2;\n } else {\n // This is an unexpected un-escaped open curly brace with no matching closing curly\n // brace. Just ignore, I guess\n }\n } else {\n // This character is an escaped open curly brace. Remove the escape\n updatedStr = `${substring(updatedStr, 0, i - 1)}${substring(updatedStr, i)}`;\n // Adjust our index because we removed the escape\n i -= 1;\n }\n break;\n case '}':\n if (charAt(updatedStr, i - 1) !== '\\\\') {\n // This character is an un-escaped closing curly brace with no matching open curly\n // brace. Just ignore, I guess\n } else {\n // This character is an escaped closing curly brace. Remove the escape\n updatedStr = `${substring(updatedStr, 0, i - 1)}${substring(updatedStr, i)}`;\n // Adjust our index because we removed the escape\n i -= 1;\n }\n break;\n default:\n // No need to do anything with other characters at this point\n break;\n }\n\n i += 1;\n }\n\n return updatedStr;\n}\n/**\n * This function mirrors the `includes` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Performs a case-sensitive search to determine if searchString is found in string.\n *\n * @param string String to search through\n * @param searchString String to search for\n * @param position Position within the string to start searching for searchString. Default is `0`\n * @returns True if search string is found, false if it is not\n */\nexport function includes(string: string, searchString: string, position: number = 0): boolean {\n const partialString = substring(string, position);\n const indexOfSearchString = indexOf(partialString, searchString);\n if (indexOfSearchString === -1) return false;\n return true;\n}\n\n/**\n * This function mirrors the `indexOf` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns the index of the first occurrence of a given string.\n *\n * @param string String to search through\n * @param searchString The string to search for\n * @param position Start of searching. Default is `0`\n * @returns Index of the first occurrence of a given string\n */\nexport function indexOf(\n string: string,\n searchString: string,\n position: number | undefined = 0,\n): number {\n return stringzIndexOf(string, searchString, position);\n}\n\n/**\n * This function mirrors the `lastIndexOf` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Searches this string and returns the index of the last occurrence of the specified substring.\n *\n * @param string String to search through\n * @param searchString Substring to search for\n * @param position The index at which to begin searching. If omitted, the search begins at the end\n * of the string. Default is `undefined`\n * @returns Index of the last occurrence of searchString found, or -1 if not found.\n */\nexport function lastIndexOf(string: string, searchString: string, position?: number): number {\n let validatedPosition = position === undefined ? stringLength(string) : position;\n\n if (validatedPosition < 0) {\n validatedPosition = 0;\n } else if (validatedPosition >= stringLength(string)) {\n validatedPosition = stringLength(string) - 1;\n }\n\n for (let index = validatedPosition; index >= 0; index--) {\n if (substr(string, index, stringLength(searchString)) === searchString) {\n return index;\n }\n }\n\n return -1;\n}\n\n/**\n * This function mirrors the `length` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes. Since `length` appears to be a\n * reserved keyword, the function was renamed to `stringLength`\n *\n * Returns the length of a string.\n *\n * @param string String to return the length for\n * @returns Number that is length of the starting string\n */\nexport function stringLength(string: string): number {\n return stringzLength(string);\n}\n\n/**\n * This function mirrors the `normalize` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns the Unicode Normalization Form of this string.\n *\n * @param string The starting string\n * @param form Form specifying the Unicode Normalization Form. Default is `'NFC'`\n * @returns A string containing the Unicode Normalization Form of the given string.\n */\nexport function normalize(string: string, form: 'NFC' | 'NFD' | 'NFKC' | 'NFKD' | 'none'): string {\n const upperCaseForm = form.toUpperCase();\n if (upperCaseForm === 'NONE') {\n return string;\n }\n return string.normalize(upperCaseForm);\n}\n\n/**\n * Compares two strings using an ordinal comparison approach based on the specified collation\n * options. This function uses the built-in `localeCompare` method with the 'en' locale and the\n * provided collation options to compare the strings.\n *\n * @param string1 The first string to compare.\n * @param string2 The second string to compare.\n * @param options Optional. The collation options used for comparison.\n * @returns A number indicating the result of the comparison: - Negative value if string1 precedes\n * string2 in sorting order. - Zero if string1 and string2 are equivalent in sorting order. -\n * Positive value if string1 follows string2 in sorting order.\n */\nexport function ordinalCompare(\n string1: string,\n string2: string,\n options?: Intl.CollatorOptions,\n): number {\n return string1.localeCompare(string2, 'en', options);\n}\n\n/**\n * This function mirrors the `padEnd` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Pads this string with another string (multiple times, if needed) until the resulting string\n * reaches the given length. The padding is applied from the end of this string.\n *\n * @param string String to add padding too\n * @param targetLength The length of the resulting string once the starting string has been padded.\n * If value is less than or equal to length(string), then string is returned as is.\n * @param padString The string to pad the current string with. If padString is too long to stay\n * within targetLength, it will be truncated. Default is `\" \"`\n * @returns String with appropriate padding at the end\n */\n// Note: Limit with padString only works when length(padString) = 1, will be fixed with https://github.com/sallar/stringz/pull/59\nexport function padEnd(string: string, targetLength: number, padString: string = ' '): string {\n if (targetLength <= stringLength(string)) return string;\n return stringzLimit(string, targetLength, padString, 'right');\n}\n\n/**\n * This function mirrors the `padStart` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Pads this string with another string (multiple times, if needed) until the resulting string\n * reaches the given length. The padding is applied from the start of this string.\n *\n * @param string String to add padding too\n * @param targetLength The length of the resulting string once the starting string has been padded.\n * If value is less than or equal to length(string), then string is returned as is.\n * @param padString The string to pad the current string with. If padString is too long to stay\n * within the targetLength, it will be truncated from the end. Default is `\" \"`\n * @returns String with of specified targetLength with padString applied from the start\n */\n// Note: Limit with padString only works when length(padString) = 1, will be fixed with https://github.com/sallar/stringz/pull/59\nexport function padStart(string: string, targetLength: number, padString: string = ' '): string {\n if (targetLength <= stringLength(string)) return string;\n return stringzLimit(string, targetLength, padString, 'left');\n}\n\n// This is a helper function that performs a correction on the slice index to make sure it\n// cannot go out of bounds\nfunction correctSliceIndex(length: number, index: number) {\n if (index > length) return length;\n if (index < -length) return 0;\n if (index < 0) return index + length;\n return index;\n}\n\n/**\n * This function mirrors the `slice` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Extracts a section of this string and returns it as a new string, without modifying the original\n * string.\n *\n * @param string The starting string\n * @param indexStart The index of the first character to include in the returned substring.\n * @param indexEnd The index of the first character to exclude from the returned substring.\n * @returns A new string containing the extracted section of the string.\n */\nexport function slice(string: string, indexStart: number, indexEnd?: number): string {\n const length: number = stringLength(string);\n if (\n indexStart > length ||\n (indexEnd &&\n ((indexStart > indexEnd &&\n !(indexStart >= 0 && indexStart < length && indexEnd < 0 && indexEnd > -length)) ||\n indexEnd < -length))\n )\n return '';\n\n const newStart = correctSliceIndex(length, indexStart);\n const newEnd = indexEnd ? correctSliceIndex(length, indexEnd) : undefined;\n\n return substring(string, newStart, newEnd);\n}\n\n/**\n * This function mirrors the `split` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Takes a pattern and divides the string into an ordered list of substrings by searching for the\n * pattern, puts these substrings into an array, and returns the array.\n *\n * @param string The string to split\n * @param separator The pattern describing where each split should occur\n * @param splitLimit Limit on the number of substrings to be included in the array. Splits the\n * string at each occurrence of specified separator, but stops when limit entries have been placed\n * in the array.\n * @returns An array of strings, split at each point where separator occurs in the starting string.\n * Returns undefined if separator is not found in string.\n */\nexport function split(string: string, separator: string | RegExp, splitLimit?: number): string[] {\n const result: string[] = [];\n\n if (splitLimit !== undefined && splitLimit <= 0) {\n return [string];\n }\n\n if (separator === '') return toArray(string).slice(0, splitLimit);\n\n let regexSeparator = separator;\n if (\n typeof separator === 'string' ||\n (separator instanceof RegExp && !includes(separator.flags, 'g'))\n ) {\n regexSeparator = new RegExp(separator, 'g');\n }\n\n const matches: RegExpMatchArray | null = string.match(regexSeparator);\n\n let currentIndex = 0;\n\n if (!matches) return [string];\n\n for (let index = 0; index < (splitLimit ? splitLimit - 1 : matches.length); index++) {\n const matchIndex = indexOf(string, matches[index], currentIndex);\n const matchLength = stringLength(matches[index]);\n\n result.push(substring(string, currentIndex, matchIndex));\n currentIndex = matchIndex + matchLength;\n\n if (splitLimit !== undefined && result.length === splitLimit) {\n break;\n }\n }\n\n result.push(substring(string, currentIndex));\n\n return result;\n}\n\n/**\n * This function mirrors the `startsWith` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Determines whether the string begins with the characters of a specified string, returning true or\n * false as appropriate.\n *\n * @param string String to search through\n * @param searchString The characters to be searched for at the start of this string.\n * @param position The start position at which searchString is expected to be found (the index of\n * searchString's first character). Default is `0`\n * @returns True if the given characters are found at the beginning of the string, including when\n * searchString is an empty string; otherwise, false.\n */\nexport function startsWith(string: string, searchString: string, position: number = 0): boolean {\n const indexOfSearchString = indexOf(string, searchString, position);\n if (indexOfSearchString !== position) return false;\n return true;\n}\n\n/**\n * This function mirrors the `substr` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a substring by providing start and length. This function is not exported because it is\n * considered deprecated, however it is still useful as a local helper function.\n *\n * @param string String to be divided\n * @param begin Start position. Default is `Start of string`\n * @param len Length of result. Default is `String length minus start parameter`. Default is `String\n * length minus start parameter`\n * @returns Substring from starting string\n */\nfunction substr(\n string: string,\n begin: number = 0,\n len: number = stringLength(string) - begin,\n): string {\n return stringzSubstr(string, begin, len);\n}\n\n/**\n * This function mirrors the `substring` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a substring by providing start and end position.\n *\n * @param string String to be divided\n * @param begin Start position\n * @param end End position. Default is `End of string`\n * @returns Substring from starting string\n */\nexport function substring(\n string: string,\n begin: number,\n end: number = stringLength(string),\n): string {\n return stringzSubstring(string, begin, end);\n}\n\n/**\n * This function mirrors the `toArray` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Converts a string to an array of string characters.\n *\n * @param string String to convert to array\n * @returns An array of characters from the starting string\n */\nexport function toArray(string: string): string[] {\n return stringzToArray(string);\n}\n\n/** Determine whether the string is a `LocalizeKey` meant to be localized in Platform.Bible. */\nexport function isLocalizeKey(str: string): str is LocalizeKey {\n return startsWith(str, '%') && endsWith(str, '%');\n}\n\n/**\n * Escape RegExp special characters.\n *\n * You can also use this to escape a string that is inserted into the middle of a regex, for\n * example, into a character class.\n *\n * All credit to [`escape-string-regexp`](https://www.npmjs.com/package/escape-string-regexp) - this\n * function is simply copied directly from there to allow a common js export\n *\n * @example\n *\n * import escapeStringRegexp from 'platform-bible-utils';\n *\n * const escapedString = escapeStringRegexp('How much $ for a 🦄?');\n * //=> 'How much \\\\$ for a 🦄\\\\?'\n *\n * new RegExp(escapedString);\n */\nexport function escapeStringRegexp(string: string): string {\n if (typeof string !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n // Escape characters with special meaning either inside or outside character sets.\n // Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n\n/** This is an internal-only export for testing purposes and should not be used in development */\nexport const testingStringUtils = {\n indexOfClosestClosingCurlyBrace,\n};\n","import { Canon, VerseRef } from '@sillsdev/scripture';\nimport { BookInfo, ScriptureReference } from './scripture.model';\nimport { split, startsWith } from './string-util';\n\nconst scrBookData: BookInfo[] = [\n { shortName: 'ERR', fullNames: ['ERROR'], chapters: -1 },\n { shortName: 'GEN', fullNames: ['Genesis'], chapters: 50 },\n { shortName: 'EXO', fullNames: ['Exodus'], chapters: 40 },\n { shortName: 'LEV', fullNames: ['Leviticus'], chapters: 27 },\n { shortName: 'NUM', fullNames: ['Numbers'], chapters: 36 },\n { shortName: 'DEU', fullNames: ['Deuteronomy'], chapters: 34 },\n { shortName: 'JOS', fullNames: ['Joshua'], chapters: 24 },\n { shortName: 'JDG', fullNames: ['Judges'], chapters: 21 },\n { shortName: 'RUT', fullNames: ['Ruth'], chapters: 4 },\n { shortName: '1SA', fullNames: ['1 Samuel'], chapters: 31 },\n { shortName: '2SA', fullNames: ['2 Samuel'], chapters: 24 },\n { shortName: '1KI', fullNames: ['1 Kings'], chapters: 22 },\n { shortName: '2KI', fullNames: ['2 Kings'], chapters: 25 },\n { shortName: '1CH', fullNames: ['1 Chronicles'], chapters: 29 },\n { shortName: '2CH', fullNames: ['2 Chronicles'], chapters: 36 },\n { shortName: 'EZR', fullNames: ['Ezra'], chapters: 10 },\n { shortName: 'NEH', fullNames: ['Nehemiah'], chapters: 13 },\n { shortName: 'EST', fullNames: ['Esther'], chapters: 10 },\n { shortName: 'JOB', fullNames: ['Job'], chapters: 42 },\n { shortName: 'PSA', fullNames: ['Psalm', 'Psalms'], chapters: 150 },\n { shortName: 'PRO', fullNames: ['Proverbs'], chapters: 31 },\n { shortName: 'ECC', fullNames: ['Ecclesiastes'], chapters: 12 },\n { shortName: 'SNG', fullNames: ['Song of Solomon', 'Song of Songs'], chapters: 8 },\n { shortName: 'ISA', fullNames: ['Isaiah'], chapters: 66 },\n { shortName: 'JER', fullNames: ['Jeremiah'], chapters: 52 },\n { shortName: 'LAM', fullNames: ['Lamentations'], chapters: 5 },\n { shortName: 'EZK', fullNames: ['Ezekiel'], chapters: 48 },\n { shortName: 'DAN', fullNames: ['Daniel'], chapters: 12 },\n { shortName: 'HOS', fullNames: ['Hosea'], chapters: 14 },\n { shortName: 'JOL', fullNames: ['Joel'], chapters: 3 },\n { shortName: 'AMO', fullNames: ['Amos'], chapters: 9 },\n { shortName: 'OBA', fullNames: ['Obadiah'], chapters: 1 },\n { shortName: 'JON', fullNames: ['Jonah'], chapters: 4 },\n { shortName: 'MIC', fullNames: ['Micah'], chapters: 7 },\n { shortName: 'NAM', fullNames: ['Nahum'], chapters: 3 },\n { shortName: 'HAB', fullNames: ['Habakkuk'], chapters: 3 },\n { shortName: 'ZEP', fullNames: ['Zephaniah'], chapters: 3 },\n { shortName: 'HAG', fullNames: ['Haggai'], chapters: 2 },\n { shortName: 'ZEC', fullNames: ['Zechariah'], chapters: 14 },\n { shortName: 'MAL', fullNames: ['Malachi'], chapters: 4 },\n { shortName: 'MAT', fullNames: ['Matthew'], chapters: 28 },\n { shortName: 'MRK', fullNames: ['Mark'], chapters: 16 },\n { shortName: 'LUK', fullNames: ['Luke'], chapters: 24 },\n { shortName: 'JHN', fullNames: ['John'], chapters: 21 },\n { shortName: 'ACT', fullNames: ['Acts'], chapters: 28 },\n { shortName: 'ROM', fullNames: ['Romans'], chapters: 16 },\n { shortName: '1CO', fullNames: ['1 Corinthians'], chapters: 16 },\n { shortName: '2CO', fullNames: ['2 Corinthians'], chapters: 13 },\n { shortName: 'GAL', fullNames: ['Galatians'], chapters: 6 },\n { shortName: 'EPH', fullNames: ['Ephesians'], chapters: 6 },\n { shortName: 'PHP', fullNames: ['Philippians'], chapters: 4 },\n { shortName: 'COL', fullNames: ['Colossians'], chapters: 4 },\n { shortName: '1TH', fullNames: ['1 Thessalonians'], chapters: 5 },\n { shortName: '2TH', fullNames: ['2 Thessalonians'], chapters: 3 },\n { shortName: '1TI', fullNames: ['1 Timothy'], chapters: 6 },\n { shortName: '2TI', fullNames: ['2 Timothy'], chapters: 4 },\n { shortName: 'TIT', fullNames: ['Titus'], chapters: 3 },\n { shortName: 'PHM', fullNames: ['Philemon'], chapters: 1 },\n { shortName: 'HEB', fullNames: ['Hebrews'], chapters: 13 },\n { shortName: 'JAS', fullNames: ['James'], chapters: 5 },\n { shortName: '1PE', fullNames: ['1 Peter'], chapters: 5 },\n { shortName: '2PE', fullNames: ['2 Peter'], chapters: 3 },\n { shortName: '1JN', fullNames: ['1 John'], chapters: 5 },\n { shortName: '2JN', fullNames: ['2 John'], chapters: 1 },\n { shortName: '3JN', fullNames: ['3 John'], chapters: 1 },\n { shortName: 'JUD', fullNames: ['Jude'], chapters: 1 },\n { shortName: 'REV', fullNames: ['Revelation'], chapters: 22 },\n];\n\nexport const FIRST_SCR_BOOK_NUM = 1;\nexport const LAST_SCR_BOOK_NUM = scrBookData.length - 1;\nexport const FIRST_SCR_CHAPTER_NUM = 1;\nexport const FIRST_SCR_VERSE_NUM = 1;\n\nexport const getChaptersForBook = (bookNum: number): number => {\n return scrBookData[bookNum]?.chapters ?? -1;\n};\n\nexport const offsetBook = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n bookNum: Math.max(FIRST_SCR_BOOK_NUM, Math.min(scrRef.bookNum + offset, LAST_SCR_BOOK_NUM)),\n chapterNum: 1,\n verseNum: 1,\n});\n\nexport const offsetChapter = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n ...scrRef,\n chapterNum: Math.min(\n Math.max(FIRST_SCR_CHAPTER_NUM, scrRef.chapterNum + offset),\n getChaptersForBook(scrRef.bookNum),\n ),\n verseNum: 1,\n});\n\nexport const offsetVerse = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n ...scrRef,\n verseNum: Math.max(FIRST_SCR_VERSE_NUM, scrRef.verseNum + offset),\n});\n\n/**\n * https://github.com/ubsicap/Paratext/blob/master/ParatextData/SILScriptureExtensions.cs#L72\n *\n * Convert book number to a localized Id (a short description of the book). This should be used\n * whenever a book ID (short code) is shown to the user. It is primarily needed for people who do\n * not read Roman script well and need to have books identified in a alternate script (e.g. Chinese\n * or Russian)\n *\n * @param bookNumber\n * @param localizationLanguage In BCP 47 format\n * @param getLocalizedString Function that provides the localized versions of the book ids and names\n * asynchronously.\n * @returns\n */\nexport async function getLocalizedIdFromBookNumber(\n bookNumber: number,\n localizationLanguage: string,\n getLocalizedString: (item: {\n localizeKey: string;\n languagesToSearch?: string[];\n }) => Promise,\n) {\n const id = Canon.bookNumberToId(bookNumber);\n\n if (!startsWith(Intl.getCanonicalLocales(localizationLanguage)[0], 'zh'))\n return getLocalizedString({\n localizeKey: `LocalizedId.${id}`,\n languagesToSearch: [localizationLanguage],\n });\n\n // For Chinese the normal book name is already fairly short.\n const bookName = await getLocalizedString({\n localizeKey: `Book.${id}`,\n languagesToSearch: [localizationLanguage],\n });\n const parts = split(bookName, '-');\n // some entries had a second name inside ideographic parenthesis\n const parts2 = split(parts[0], '\\xff08');\n const retVal = parts2[0].trim();\n return retVal;\n}\n\n/**\n * Get the Scripture reference as an easily comparable/sortable integer.\n *\n * @param scrRef The Scripture reference.\n * @returns An integer where the first three digits represent the book, the next three represent the\n * chapter and the last three represent the verse.\n */\nexport function scrRefToBBBCCCVVV(scrRef: ScriptureReference): number {\n return new VerseRef(scrRef.bookNum, scrRef.chapterNum, scrRef.verseNum).BBBCCCVVV;\n}\n\n/**\n * Compares two Scripture references canonically.\n *\n * @param scrRef1 The first Scripture reference to compare.\n * @param scrRef2 The second Scripture reference to compare.\n * @returns A number indicating the result of the comparison: - Negative value if scrRef1 precedes\n * scrRef2 in sorting order. - Zero if scrRef1 and scrRef2 are equivalent in sorting order. -\n * Positive value if scrRef1 follows scrRef2 in sorting order.\n */\nexport function compareScrRefs(scrRef1: ScriptureReference, scrRef2: ScriptureReference): number {\n // TODO: consider edge cases for invalid references (current implementation should suffice for\n // all but the most extreme cases)\n return scrRefToBBBCCCVVV(scrRef1) - scrRefToBBBCCCVVV(scrRef2);\n}\n\n/**\n * Formats a Scripture reference.\n *\n * @param scrRef The Scripture reference to format.\n * @param optionOrLocalizedBookName Either 'id' (the default) to format using the \"standard\" (as\n * defined by SIL/UBS) 3-letter book ID, 'English' to format using the English book name spelled\n * out, or some other string (e.g., a localized book name, vernacular abbreviation, FCBH book id,\n * etc.) to use.\n * @param chapterVerseSeparator The character used to separate the chapter number from the verse\n * number. Default is a colon (:). Note: More than one character is allowed.\n * @param bookChapterSeparator The character used to separate the book from the chapter number.\n * Default is a single space. Note: More than one character is allowed.\n * @returns The formatted reference.\n */\nexport function formatScrRef(\n scrRef: ScriptureReference,\n optionOrLocalizedBookName?: 'id' | 'English' | string,\n chapterVerseSeparator?: string,\n bookChapterSeparator?: string,\n): string {\n let book: string;\n switch (optionOrLocalizedBookName ?? 'id') {\n case 'English':\n book = Canon.bookNumberToEnglishName(scrRef.bookNum);\n break;\n case 'id':\n book = Canon.bookNumberToId(scrRef.bookNum);\n break;\n default:\n // We already dealt with undefined about in the switch, but TS is getting confused.\n book = optionOrLocalizedBookName ?? '';\n break;\n }\n return `${book}${bookChapterSeparator ?? ' '}${scrRef.chapterNum}${chapterVerseSeparator ?? ':'}${scrRef.verseNum}`;\n}\n","/** Function to run to dispose of something. Returns true if successfully unsubscribed */\nexport type Unsubscriber = () => boolean;\n\n/**\n * Returns an Unsubscriber function that combines all the unsubscribers passed in.\n *\n * @param unsubscribers All unsubscribers to aggregate into one unsubscriber\n * @returns Function that unsubscribes from all passed in unsubscribers when run\n */\nexport const aggregateUnsubscribers = (unsubscribers: Unsubscriber[]): Unsubscriber => {\n return (...args) => {\n // Run the unsubscriber for each handler\n const unsubs = unsubscribers.map((unsubscriber) => unsubscriber(...args));\n\n // If all the unsubscribers resolve to truthiness, we succeed\n return unsubs.every((success) => success);\n };\n};\n\n/**\n * Function to run to dispose of something that runs asynchronously. The promise resolves to true if\n * successfully unsubscribed\n */\nexport type UnsubscriberAsync = () => Promise;\n\n/**\n * Returns an UnsubscriberAsync function that combines all the unsubscribers passed in.\n *\n * @param unsubscribers - All unsubscribers to aggregate into one unsubscriber.\n * @returns Function that unsubscribes from all passed in unsubscribers when run\n */\nexport const aggregateUnsubscriberAsyncs = (\n unsubscribers: (UnsubscriberAsync | Unsubscriber)[],\n): UnsubscriberAsync => {\n return async (...args) => {\n // Run the unsubscriber for each handler\n const unsubPromises = unsubscribers.map(async (unsubscriber) => unsubscriber(...args));\n\n // If all the unsubscribers resolve to truthiness, we succeed\n return (await Promise.all(unsubPromises)).every((success) => success);\n };\n};\n","var getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Combine two comparators into a single comparators.\n */\nfunction combineComparators(comparatorA, comparatorB) {\n return function isEqual(a, b, state) {\n return comparatorA(a, b, state) && comparatorB(a, b, state);\n };\n}\n/**\n * Wrap the provided `areItemsEqual` method to manage the circular state, allowing\n * for circular references to be safely included in the comparison without creating\n * stack overflows.\n */\nfunction createIsCircular(areItemsEqual) {\n return function isCircular(a, b, state) {\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return areItemsEqual(a, b, state);\n }\n var cache = state.cache;\n var cachedA = cache.get(a);\n var cachedB = cache.get(b);\n if (cachedA && cachedB) {\n return cachedA === b && cachedB === a;\n }\n cache.set(a, b);\n cache.set(b, a);\n var result = areItemsEqual(a, b, state);\n cache.delete(a);\n cache.delete(b);\n return result;\n };\n}\n/**\n * Get the properties to strictly examine, which include both own properties that are\n * not enumerable and symbol properties.\n */\nfunction getStrictProperties(object) {\n return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));\n}\n/**\n * Whether the object contains the property passed as an own property.\n */\nvar hasOwn = Object.hasOwn ||\n (function (object, property) {\n return hasOwnProperty.call(object, property);\n });\n/**\n * Whether the values passed are strictly equal or both NaN.\n */\nfunction sameValueZeroEqual(a, b) {\n return a || b ? a === b : a === b || (a !== a && b !== b);\n}\n\nvar OWNER = '_owner';\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, keys = Object.keys;\n/**\n * Whether the arrays are equal in value.\n */\nfunction areArraysEqual(a, b, state) {\n var index = a.length;\n if (b.length !== index) {\n return false;\n }\n while (index-- > 0) {\n if (!state.equals(a[index], b[index], index, index, a, b, state)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the dates passed are equal in value.\n */\nfunction areDatesEqual(a, b) {\n return sameValueZeroEqual(a.getTime(), b.getTime());\n}\n/**\n * Whether the `Map`s are equal in value.\n */\nfunction areMapsEqual(a, b, state) {\n if (a.size !== b.size) {\n return false;\n }\n var matchedIndices = {};\n var aIterable = a.entries();\n var index = 0;\n var aResult;\n var bResult;\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n var bIterable = b.entries();\n var hasMatch = false;\n var matchIndex = 0;\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n var _a = aResult.value, aKey = _a[0], aValue = _a[1];\n var _b = bResult.value, bKey = _b[0], bValue = _b[1];\n if (!hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch =\n state.equals(aKey, bKey, index, matchIndex, a, b, state) &&\n state.equals(aValue, bValue, aKey, bKey, a, b, state))) {\n matchedIndices[matchIndex] = true;\n }\n matchIndex++;\n }\n if (!hasMatch) {\n return false;\n }\n index++;\n }\n return true;\n}\n/**\n * Whether the objects are equal in value.\n */\nfunction areObjectsEqual(a, b, state) {\n var properties = keys(a);\n var index = properties.length;\n if (keys(b).length !== index) {\n return false;\n }\n var property;\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index];\n if (property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof) {\n return false;\n }\n if (!hasOwn(b, property) ||\n !state.equals(a[property], b[property], property, property, a, b, state)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the objects are equal in value with strict property checking.\n */\nfunction areObjectsEqualStrict(a, b, state) {\n var properties = getStrictProperties(a);\n var index = properties.length;\n if (getStrictProperties(b).length !== index) {\n return false;\n }\n var property;\n var descriptorA;\n var descriptorB;\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index];\n if (property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof) {\n return false;\n }\n if (!hasOwn(b, property)) {\n return false;\n }\n if (!state.equals(a[property], b[property], property, property, a, b, state)) {\n return false;\n }\n descriptorA = getOwnPropertyDescriptor(a, property);\n descriptorB = getOwnPropertyDescriptor(b, property);\n if ((descriptorA || descriptorB) &&\n (!descriptorA ||\n !descriptorB ||\n descriptorA.configurable !== descriptorB.configurable ||\n descriptorA.enumerable !== descriptorB.enumerable ||\n descriptorA.writable !== descriptorB.writable)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the primitive wrappers passed are equal in value.\n */\nfunction arePrimitiveWrappersEqual(a, b) {\n return sameValueZeroEqual(a.valueOf(), b.valueOf());\n}\n/**\n * Whether the regexps passed are equal in value.\n */\nfunction areRegExpsEqual(a, b) {\n return a.source === b.source && a.flags === b.flags;\n}\n/**\n * Whether the `Set`s are equal in value.\n */\nfunction areSetsEqual(a, b, state) {\n if (a.size !== b.size) {\n return false;\n }\n var matchedIndices = {};\n var aIterable = a.values();\n var aResult;\n var bResult;\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n var bIterable = b.values();\n var hasMatch = false;\n var matchIndex = 0;\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n if (!hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch = state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state))) {\n matchedIndices[matchIndex] = true;\n }\n matchIndex++;\n }\n if (!hasMatch) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the TypedArray instances are equal in value.\n */\nfunction areTypedArraysEqual(a, b) {\n var index = a.length;\n if (b.length !== index) {\n return false;\n }\n while (index-- > 0) {\n if (a[index] !== b[index]) {\n return false;\n }\n }\n return true;\n}\n\nvar ARGUMENTS_TAG = '[object Arguments]';\nvar BOOLEAN_TAG = '[object Boolean]';\nvar DATE_TAG = '[object Date]';\nvar MAP_TAG = '[object Map]';\nvar NUMBER_TAG = '[object Number]';\nvar OBJECT_TAG = '[object Object]';\nvar REG_EXP_TAG = '[object RegExp]';\nvar SET_TAG = '[object Set]';\nvar STRING_TAG = '[object String]';\nvar isArray = Array.isArray;\nvar isTypedArray = typeof ArrayBuffer === 'function' && ArrayBuffer.isView\n ? ArrayBuffer.isView\n : null;\nvar assign = Object.assign;\nvar getTag = Object.prototype.toString.call.bind(Object.prototype.toString);\n/**\n * Create a comparator method based on the type-specific equality comparators passed.\n */\nfunction createEqualityComparator(_a) {\n var areArraysEqual = _a.areArraysEqual, areDatesEqual = _a.areDatesEqual, areMapsEqual = _a.areMapsEqual, areObjectsEqual = _a.areObjectsEqual, arePrimitiveWrappersEqual = _a.arePrimitiveWrappersEqual, areRegExpsEqual = _a.areRegExpsEqual, areSetsEqual = _a.areSetsEqual, areTypedArraysEqual = _a.areTypedArraysEqual;\n /**\n * compare the value of the two objects and return true if they are equivalent in values\n */\n return function comparator(a, b, state) {\n // If the items are strictly equal, no need to do a value comparison.\n if (a === b) {\n return true;\n }\n // If the items are not non-nullish objects, then the only possibility\n // of them being equal but not strictly is if they are both `NaN`. Since\n // `NaN` is uniquely not equal to itself, we can use self-comparison of\n // both objects, which is faster than `isNaN()`.\n if (a == null ||\n b == null ||\n typeof a !== 'object' ||\n typeof b !== 'object') {\n return a !== a && b !== b;\n }\n var constructor = a.constructor;\n // Checks are listed in order of commonality of use-case:\n // 1. Common complex object types (plain object, array)\n // 2. Common data values (date, regexp)\n // 3. Less-common complex object types (map, set)\n // 4. Less-common data values (promise, primitive wrappers)\n // Inherently this is both subjective and assumptive, however\n // when reviewing comparable libraries in the wild this order\n // appears to be generally consistent.\n // Constructors should match, otherwise there is potential for false positives\n // between class and subclass or custom object and POJO.\n if (constructor !== b.constructor) {\n return false;\n }\n // `isPlainObject` only checks against the object's own realm. Cross-realm\n // comparisons are rare, and will be handled in the ultimate fallback, so\n // we can avoid capturing the string tag.\n if (constructor === Object) {\n return areObjectsEqual(a, b, state);\n }\n // `isArray()` works on subclasses and is cross-realm, so we can avoid capturing\n // the string tag or doing an `instanceof` check.\n if (isArray(a)) {\n return areArraysEqual(a, b, state);\n }\n // `isTypedArray()` works on all possible TypedArray classes, so we can avoid\n // capturing the string tag or comparing against all possible constructors.\n if (isTypedArray != null && isTypedArray(a)) {\n return areTypedArraysEqual(a, b, state);\n }\n // Try to fast-path equality checks for other complex object types in the\n // same realm to avoid capturing the string tag. Strict equality is used\n // instead of `instanceof` because it is more performant for the common\n // use-case. If someone is subclassing a native class, it will be handled\n // with the string tag comparison.\n if (constructor === Date) {\n return areDatesEqual(a, b, state);\n }\n if (constructor === RegExp) {\n return areRegExpsEqual(a, b, state);\n }\n if (constructor === Map) {\n return areMapsEqual(a, b, state);\n }\n if (constructor === Set) {\n return areSetsEqual(a, b, state);\n }\n // Since this is a custom object, capture the string tag to determing its type.\n // This is reasonably performant in modern environments like v8 and SpiderMonkey.\n var tag = getTag(a);\n if (tag === DATE_TAG) {\n return areDatesEqual(a, b, state);\n }\n if (tag === REG_EXP_TAG) {\n return areRegExpsEqual(a, b, state);\n }\n if (tag === MAP_TAG) {\n return areMapsEqual(a, b, state);\n }\n if (tag === SET_TAG) {\n return areSetsEqual(a, b, state);\n }\n if (tag === OBJECT_TAG) {\n // The exception for value comparison is custom `Promise`-like class instances. These should\n // be treated the same as standard `Promise` objects, which means strict equality, and if\n // it reaches this point then that strict equality comparison has already failed.\n return (typeof a.then !== 'function' &&\n typeof b.then !== 'function' &&\n areObjectsEqual(a, b, state));\n }\n // If an arguments tag, it should be treated as a standard object.\n if (tag === ARGUMENTS_TAG) {\n return areObjectsEqual(a, b, state);\n }\n // As the penultimate fallback, check if the values passed are primitive wrappers. This\n // is very rare in modern JS, which is why it is deprioritized compared to all other object\n // types.\n if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {\n return arePrimitiveWrappersEqual(a, b, state);\n }\n // If not matching any tags that require a specific type of comparison, then we hard-code false because\n // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:\n // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only\n // comparison that can be made.\n // - For types that can be introspected, but rarely have requirements to be compared\n // (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common\n // use-cases (may be included in a future release, if requested enough).\n // - For types that can be introspected but do not have an objective definition of what\n // equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.\n // In all cases, these decisions should be reevaluated based on changes to the language and\n // common development practices.\n return false;\n };\n}\n/**\n * Create the configuration object used for building comparators.\n */\nfunction createEqualityComparatorConfig(_a) {\n var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;\n var config = {\n areArraysEqual: strict\n ? areObjectsEqualStrict\n : areArraysEqual,\n areDatesEqual: areDatesEqual,\n areMapsEqual: strict\n ? combineComparators(areMapsEqual, areObjectsEqualStrict)\n : areMapsEqual,\n areObjectsEqual: strict\n ? areObjectsEqualStrict\n : areObjectsEqual,\n arePrimitiveWrappersEqual: arePrimitiveWrappersEqual,\n areRegExpsEqual: areRegExpsEqual,\n areSetsEqual: strict\n ? combineComparators(areSetsEqual, areObjectsEqualStrict)\n : areSetsEqual,\n areTypedArraysEqual: strict\n ? areObjectsEqualStrict\n : areTypedArraysEqual,\n };\n if (createCustomConfig) {\n config = assign({}, config, createCustomConfig(config));\n }\n if (circular) {\n var areArraysEqual$1 = createIsCircular(config.areArraysEqual);\n var areMapsEqual$1 = createIsCircular(config.areMapsEqual);\n var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);\n var areSetsEqual$1 = createIsCircular(config.areSetsEqual);\n config = assign({}, config, {\n areArraysEqual: areArraysEqual$1,\n areMapsEqual: areMapsEqual$1,\n areObjectsEqual: areObjectsEqual$1,\n areSetsEqual: areSetsEqual$1,\n });\n }\n return config;\n}\n/**\n * Default equality comparator pass-through, used as the standard `isEqual` creator for\n * use inside the built comparator.\n */\nfunction createInternalEqualityComparator(compare) {\n return function (a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {\n return compare(a, b, state);\n };\n}\n/**\n * Create the `isEqual` function used by the consuming application.\n */\nfunction createIsEqual(_a) {\n var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;\n if (createState) {\n return function isEqual(a, b) {\n var _a = createState(), _b = _a.cache, cache = _b === void 0 ? circular ? new WeakMap() : undefined : _b, meta = _a.meta;\n return comparator(a, b, {\n cache: cache,\n equals: equals,\n meta: meta,\n strict: strict,\n });\n };\n }\n if (circular) {\n return function isEqual(a, b) {\n return comparator(a, b, {\n cache: new WeakMap(),\n equals: equals,\n meta: undefined,\n strict: strict,\n });\n };\n }\n var state = {\n cache: undefined,\n equals: equals,\n meta: undefined,\n strict: strict,\n };\n return function isEqual(a, b) {\n return comparator(a, b, state);\n };\n}\n\n/**\n * Whether the items passed are deeply-equal in value.\n */\nvar deepEqual = createCustomEqual();\n/**\n * Whether the items passed are deeply-equal in value based on strict comparison.\n */\nvar strictDeepEqual = createCustomEqual({ strict: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references.\n */\nvar circularDeepEqual = createCustomEqual({ circular: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references,\n * based on strict comparison.\n */\nvar strictCircularDeepEqual = createCustomEqual({\n circular: true,\n strict: true,\n});\n/**\n * Whether the items passed are shallowly-equal in value.\n */\nvar shallowEqual = createCustomEqual({\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nvar strictShallowEqual = createCustomEqual({\n strict: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nvar circularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references,\n * based on strict comparison.\n */\nvar strictCircularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n strict: true,\n});\n/**\n * Create a custom equality comparison method.\n *\n * This can be done to create very targeted comparisons in extreme hot-path scenarios\n * where the standard methods are not performant enough, but can also be used to provide\n * support for legacy environments that do not support expected features like\n * `RegExp.prototype.flags` out of the box.\n */\nfunction createCustomEqual(options) {\n if (options === void 0) { options = {}; }\n var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b;\n var config = createEqualityComparatorConfig(options);\n var comparator = createEqualityComparator(config);\n var equals = createCustomInternalComparator\n ? createCustomInternalComparator(comparator)\n : createInternalEqualityComparator(comparator);\n return createIsEqual({ circular: circular, comparator: comparator, createState: createState, equals: equals, strict: strict });\n}\n\nexport { circularDeepEqual, circularShallowEqual, createCustomEqual, deepEqual, sameValueZeroEqual, shallowEqual, strictCircularDeepEqual, strictCircularShallowEqual, strictDeepEqual, strictShallowEqual };\n//# sourceMappingURL=index.mjs.map\n","// There is a circular version https://www.npmjs.com/package/fast-equals#circulardeepequal that I\n// think allows comparing React refs (which have circular references in particular places that this\n// library would ignore). Maybe we can change to that version sometime if needed.\nimport { deepEqual as isEqualDeep } from 'fast-equals';\n\n/**\n * Check that two objects are deeply equal, comparing members of each object and such\n *\n * @param a The first object to compare\n * @param b The second object to compare\n *\n * WARNING: Objects like arrays from different iframes have different constructor function\n * references even if they do the same thing, so this deep equality comparison fails objects that\n * look the same but have different constructors because different constructors could produce\n * false positives in [a few specific\n * situations](https://github.com/planttheidea/fast-equals/blob/a41afc0a240ad5a472e47b53791e9be017f52281/src/comparator.ts#L96).\n * This means that two objects like arrays from different iframes that look the same will fail\n * this check. Please use some other means to check deep equality in those situations.\n *\n * Note: This deep equality check considers `undefined` values on keys of objects NOT to be equal to\n * not specifying the key at all. For example, `{ stuff: 3, things: undefined }` and `{ stuff: 3\n * }` are not considered equal in this case\n *\n * - For more information and examples, see [this\n * CodeSandbox](https://codesandbox.io/s/deepequallibrarycomparison-4g4kk4?file=/src/index.mjs).\n *\n * @returns True if a and b are deeply equal; false otherwise\n */\nexport default function deepEqual(a: unknown, b: unknown) {\n return isEqualDeep(a, b);\n}\n","import deepEqual from './equality-checking';\n\n/**\n * Check if one object is a subset of the other object. \"Subset\" means that all properties of one\n * object are present in the other object, and if they are present that all values of those\n * properties are deeply equal. Sub-objects are also checked to be subsets of the corresponding\n * sub-object in the other object.\n *\n * @example ObjB is a subset of objA given these objects:\n *\n * ```ts\n * objA = { name: 'Alice', age: 30, address: { city: 'Seattle', state: 'Washington' } };\n * objB = { name: 'Alice', address: { city: 'Seattle' } };\n * ```\n *\n * It is important to note that only arrays of primitives (i.e., booleans, numbers, strings) are\n * supported. In particular, objects in arrays will not be checked for deep equality. Also, presence\n * in an array is all this checks, not the number of times that an item appears in an array. `[1,\n * 1]` is a subset of `[1]`.\n *\n * @param objectWithAllProperties Object to be checked if it is a superset of\n * `objectWithPartialProperties`\n * @param objectWithPartialProperties Object to be checked if it is a subset of\n * `objectWithAllProperties`\n * @returns True if `objectWithAllProperties` contains all the properties of\n * `objectWithPartialProperties` and all values of those properties are deeply equal\n */\nexport default function isSubset(\n objectWithAllProperties: unknown,\n objectWithPartialProperties: unknown,\n): boolean {\n if (typeof objectWithAllProperties !== typeof objectWithPartialProperties) return false;\n\n // For this function we're saying that all falsy things of the same type are equal to each other\n if (!objectWithAllProperties && !objectWithPartialProperties) return true;\n\n if (Array.isArray(objectWithAllProperties)) {\n // We know these are arrays from the line above\n /* eslint-disable no-type-assertion/no-type-assertion */\n const partialArray = objectWithPartialProperties as Array;\n const allArray = objectWithAllProperties as Array;\n /* eslint-enable no-type-assertion/no-type-assertion */\n\n if (partialArray.length === 0) return true;\n\n // This only works with arrays of primitives.\n // If someone cares about checking arrays of objects this needs updating.\n return partialArray.every((item) => allArray.includes(item));\n }\n\n if (typeof objectWithAllProperties !== 'object')\n return deepEqual(objectWithAllProperties, objectWithPartialProperties);\n\n // We know these are objects that potentially have properties because of the earlier checks\n /* eslint-disable no-type-assertion/no-type-assertion */\n const partialObj = objectWithPartialProperties as Record;\n const allObj = objectWithAllProperties as Record;\n /* eslint-enable no-type-assertion/no-type-assertion */\n\n let retVal = true;\n Object.keys(partialObj).forEach((key) => {\n if (!retVal) return;\n if (!Object.hasOwn(allObj, key)) retVal = false;\n else if (!isSubset(allObj[key], partialObj[key])) retVal = false;\n });\n return retVal;\n}\n","/**\n * Converts a JavaScript value to a JSON string, changing `undefined` properties in the JavaScript\n * object to `null` properties in the JSON string.\n *\n * WARNING: `null` values will become `undefined` values after passing through {@link serialize} then\n * {@link deserialize}. For example, `{ a: 1, b: undefined, c: null }` will become `{ a: 1, b:\n * undefined, c: undefined }`. If you are passing around user data that needs to retain `null`\n * values, you should wrap them yourself in a string before using this function. Alternatively, you\n * can write your own replacer that will preserve `null` in a way that you can recover later.\n *\n * @param value A JavaScript value, usually an object or array, to be converted.\n * @param replacer A function that transforms the results. Note that all `undefined` values returned\n * by the replacer will be further transformed into `null` in the JSON string.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON\n * text to make it easier to read. See the `space` parameter of `JSON.stringify` for more\n * details.\n */\nexport function serialize(\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string {\n const undefinedReplacer = (replacerKey: string, replacerValue: unknown) => {\n let newValue = replacerValue;\n if (replacer) newValue = replacer(replacerKey, newValue);\n // All `undefined` values become `null` on the way from JS objects into JSON strings\n // eslint-disable-next-line no-null/no-null\n if (newValue === undefined) newValue = null;\n return newValue;\n };\n return JSON.stringify(value, undefinedReplacer, space);\n}\n\n/**\n * Converts a JSON string into a value, converting all `null` properties from JSON into `undefined`\n * in the returned JavaScript value/object.\n *\n * WARNING: `null` values will become `undefined` values after passing through {@link serialize} then\n * {@link deserialize}. For example, `{ a: 1, b: undefined, c: null }` will become `{ a: 1, b:\n * undefined, c: undefined }`. If you are passing around user data that needs to retain `null`\n * values, you should wrap them yourself in a string before using this function. Alternatively, you\n * can write your own replacer that will preserve `null` in a way that you can recover later.\n *\n * @param value A valid JSON string.\n * @param reviver A function that transforms the results. This function is called for each member of\n * the object. If a member contains nested objects, the nested objects are transformed before the\n * parent object is. Note that `null` values are converted into `undefined` values after the\n * reviver has run.\n */\nexport function deserialize(\n value: string,\n reviver?: (this: unknown, key: string, value: unknown) => unknown,\n // Need to use `any` instead of `unknown` here to match the signature of JSON.parse\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // Helper function to replace `null` with `undefined` on a per property basis. This can't be done\n // with our own reviver because `JSON.parse` removes `undefined` properties from the return value.\n function replaceNull(obj: Record): Record {\n Object.keys(obj).forEach((key: string | number) => {\n // We only want to replace `null`, not other falsy values\n // eslint-disable-next-line no-null/no-null\n if (obj[key] === null) obj[key] = undefined;\n // If the property is an object, recursively call the helper function on it\n else if (typeof obj[key] === 'object')\n // Since the object came from a string, we know the keys will not be symbols\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n obj[key] = replaceNull(obj[key] as Record);\n });\n return obj;\n }\n\n const parsedObject = JSON.parse(value, reviver);\n // Explicitly convert the value 'null' that isn't stored as a property on an object to 'undefined'\n // eslint-disable-next-line no-null/no-null\n if (parsedObject === null) return undefined;\n if (typeof parsedObject === 'object') return replaceNull(parsedObject);\n return parsedObject;\n}\n\n/**\n * Check to see if the value is serializable without losing information\n *\n * @param value Value to test\n * @returns True if serializable; false otherwise\n *\n * Note: the values `undefined` and `null` are serializable (on their own or in an array), but\n * `null` values get transformed into `undefined` when serializing/deserializing.\n *\n * WARNING: This is inefficient right now as it stringifies, parses, stringifies, and === the value.\n * Please only use this if you need to\n *\n * DISCLAIMER: this does not successfully detect that values are not serializable in some cases:\n *\n * - Losses of removed properties like functions and `Map`s\n * - Class instances (not deserializable into class instances without special code)\n *\n * We intend to improve this in the future if it becomes important to do so. See [`JSON.stringify`\n * documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description)\n * for more information.\n */\nexport function isSerializable(value: unknown): boolean {\n try {\n const serializedValue = serialize(value);\n return serializedValue === serialize(deserialize(serializedValue));\n } catch (e) {\n return false;\n }\n}\n\n/**\n * HTML Encodes the provided string. Thanks to ChatGPT\n *\n * @param str String to HTML encode\n * @returns HTML-encoded string\n */\nexport const htmlEncode = (str: string): string =>\n str\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(/\\//g, '/');\n","import DateTimeFormat from './intl-date-time-format';\n\n/**\n * Retrieves the current locale of the user's environment.\n *\n * @returns A string representing the current locale. If the locale cannot be determined, the\n * function returns an empty string.\n */\nexport default function getCurrentLocale(): string {\n // Use navigator when available\n if (typeof navigator !== 'undefined' && navigator.languages) {\n return navigator.languages[0];\n }\n // For Node.js\n return new DateTimeFormat().resolvedOptions().locale;\n}\n","import NumberFormat from './intl-number-format';\n\n/**\n * Formats a number according to the locale and formatting options of this NumberFormat object\n *\n * @example FormatBytes(1024) => \"1 KB\"\n *\n * @example FormatBytes(1024, 0) => \"1 KB\"\n *\n * @param fileSize Number to format\n * @param decimals Number of decimal places to round to\n * @returns String representing the given number formatted according to the locale and formatting\n * options of this NumberFormat object\n */\nexport default function formatBytes(fileSize: number, decimals: number = 2): string {\n if (fileSize === 0) return '0 Bytes';\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n const i = Math.floor(Math.log(fileSize) / Math.log(1024));\n const sizeToUse = sizes[i];\n const formattingFileSize = new NumberFormat('en', {\n style: 'decimal',\n maximumFractionDigits: decimals,\n minimumFractionDigits: 0,\n }).format(fileSize / 1024 ** i);\n return `${formattingFileSize} ${sizeToUse}`;\n}\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { LocalizeKey, ReferencedItem } from 'menus.model';\n\n/** The data an extension provides to inform Platform.Bible of the settings it provides */\nexport type SettingsContribution = SettingsGroup | SettingsGroup[];\n/** A description of an extension's setting entry */\nexport type Setting = ExtensionControlledSetting;\n/** Setting definition that is validated by the extension. */\nexport type ExtensionControlledSetting = SettingBase & ModifierExtensionControlled;\n/** Base information needed to describe a setting entry */\nexport type SettingBase = StateBase & {\n [k: string]: unknown;\n /** LocalizeKey that displays in the settings dialog as the setting name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the settings dialog to describe the setting */\n description?: LocalizeKey;\n};\n/** The data an extension provides to inform Platform.Bible of the project settings it provides */\nexport type ProjectSettingsContribution = ProjectSettingsGroup | ProjectSettingsGroup[];\n/** A description of an extension's setting entry */\nexport type ProjectSetting = ExtensionControlledProjectSetting;\n/** Setting definition that is validated by the extension. */\nexport type ExtensionControlledProjectSetting = ProjectSettingBase & ModifierExtensionControlled;\n/** Base information needed to describe a project setting entry */\nexport type ProjectSettingBase = SettingBase & ModifierProject;\n/** A description of an extension's user state entry */\nexport type UserState = ExtensionControlledState;\n/** State definition that is validated by the extension. */\nexport type ExtensionControlledState = StateBase & ModifierExtensionControlled;\n/** Group of related settings definitions */\nexport interface SettingsGroup {\n [k: string]: unknown;\n /** LocalizeKey that displays in the settings dialog as the group name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the settings dialog to describe the group */\n description?: LocalizeKey;\n properties: SettingProperties;\n}\n/** Object whose keys are setting IDs and whose values are settings objects */\nexport interface SettingProperties {\n [k: ReferencedItem]: Setting;\n}\n/** Base information needed to describe a state entry */\nexport interface StateBase {\n [k: string]: unknown;\n /** Default value for the state/setting */\n default: unknown;\n /**\n * A state/setting ID whose value to set to this state/setting's starting value the first time\n * this state/setting is loaded\n */\n derivesFrom?: ReferencedItem;\n}\n/**\n * Modifies state/setting type to be extension-controlled. \"Extension-controlled\" means the\n * extension provides the component and the validator for the state/setting, so the state/setting is\n * controlled by the extension.\n */\nexport interface ModifierExtensionControlled {\n [k: string]: unknown;\n platformType?: undefined;\n type?: undefined;\n}\n/** Group of related settings definitions */\nexport interface ProjectSettingsGroup {\n [k: string]: unknown;\n /** LocalizeKey that displays in the project settings dialog as the group name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the project settings dialog to describe the group */\n description?: LocalizeKey;\n properties: ProjectSettingProperties;\n}\n/** Object whose keys are setting IDs and whose values are settings objects */\nexport interface ProjectSettingProperties {\n [k: ReferencedItem]: ProjectSetting;\n}\n\n// Note: we removed the index signature on ModifierProject to avoid having it on\n// `ProjectMetadataFilterOptions`. Unfortunately adding \"additionalProperties\": false on the json\n// schema messes up validation. Please remove the index signature again in the future if you\n// regenerate types\nexport interface ModifierProject {\n /**\n * String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s\n * (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if they should be included.\n *\n * If this is one string, it will be matched against `projectInterface`s. If this is an array,\n * each entry is handled based on its type (at least one entry must match for this filter\n * condition to pass):\n *\n * - If the entry is a string, it will be matched against each `projectInterface`. If any match, the\n * project will pass this filter condition\n * - If the entry is an array of strings, each will be matched against each `projectInterface`. If\n * every string matches against at least one `projectInterface`, the project will pass this\n * filter condition\n *\n * In other words, each entry in the first-level array is `OR`'ed together. Each entry in\n * second-level arrays (arrays within the first-level array) are `AND`'ed together.\n *\n * Defaults to all {@link ProjectInterfaces}, so all projects that do not match\n * `excludeProjectInterfaces` will be included\n *\n * @example\n *\n * ```typescript\n * includeProjectInterfaces: ['one', ['two', 'three']];\n * ```\n *\n * This filter condition will succeed on projects whose `projectInterface`s fulfill at least one\n * of the following conditions (At least one entry in the array must match):\n *\n * - Include `one`\n * - Include both `two` and `three`.\n */\n includeProjectInterfaces?: undefined | string | (string | string[])[];\n /**\n * String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s\n * (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if they should absolutely not be included even if they match with\n * `includeProjectInterfaces`.\n *\n * If this is one string, it will be matched against `projectInterface`s. If this is an array,\n * each entry is handled based on its type (at least one entry must match for this filter\n * condition to exclude the project):\n *\n * - If the entry is a string, it will be matched against each `projectInterface`. If any match, the\n * project will pass this filter condition and exclude the project\n * - If the entry is an array of strings, each will be matched against each `projectInterface`. If\n * every string matches against at least one `projectInterface`, the project will pass this\n * filter condition and exclude the project\n *\n * In other words, each entry in the first-level array is `OR`'ed together. Each entry in\n * second-level arrays (arrays within the first-level array) are `AND`'ed together.\n *\n * Defaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces`\n * will be included\n *\n * @example\n *\n * ```typescript\n * excludeProjectInterfaces: ['one', ['two', 'three']];\n * ```\n *\n * This filter condition will succeed and exclude projects whose `projectInterface`s fulfill at\n * least one of the following conditions (At least one entry in the array must match):\n *\n * - Include `one`\n * - Include both `two` and `three`.\n */\n excludeProjectInterfaces?: undefined | string | (string | string[])[];\n /**\n * String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory\n * Ids that provided each project's metadata (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if the projects should be included.\n *\n * Defaults to all Project Data Provider Factory Ids, so all projects that do not match\n * `excludePdpFactoryIds` will be included\n */\n includePdpFactoryIds?: undefined | string | string[];\n /**\n * String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory\n * Ids that provided each project's metadata (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if the projects should absolutely not be included even if they match\n * with `includeProjectInterfaces`.\n *\n * Defaults to none, so all projects that match `includePdpFactoryIds` will be included\n */\n excludePdpFactoryIds?: undefined | string | string[];\n}\n\n/** The data an extension provides to inform Platform.Bible of the user state it provides */\nexport interface UserStateContribution {\n [k: ReferencedItem]: UserState;\n}\n/** The data an extension provides to inform Platform.Bible of the project state it provides */\nexport interface ProjectStateContribution {\n [k: ReferencedItem]: UserState;\n}\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\nconst settingsDefs = {\n projectSettingsContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the project settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/projectSettingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/projectSettingsGroup',\n },\n },\n ],\n },\n projectSettingsGroup: {\n description: 'Group of related settings definitions',\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the project settings dialog as the group name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description:\n 'localizeKey that displays in the project settings dialog to describe the group',\n $ref: '#/$defs/localizeKey',\n },\n properties: {\n $ref: '#/$defs/projectSettingProperties',\n },\n },\n required: ['label', 'properties'],\n },\n projectSettingProperties: {\n description: 'Object whose keys are setting IDs and whose values are settings objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/projectSetting',\n },\n },\n additionalProperties: false,\n },\n projectSetting: {\n description: \"A description of an extension's setting entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledProjectSetting',\n },\n ],\n },\n extensionControlledProjectSetting: {\n description: 'Setting definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/projectSettingBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n projectSettingBase: {\n description: 'Base information needed to describe a project setting entry',\n allOf: [\n {\n $ref: '#/$defs/settingBase',\n },\n {\n $ref: '#/$defs/modifierProject',\n },\n ],\n },\n modifierProject: {\n description: 'Modifies setting type to be project setting',\n type: 'object',\n properties: {\n includeProjectInterfaces: {\n description:\n \"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should be included.\\n\\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to pass):\\n\\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition\\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition\\n\\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\\n\\nDefaults to all {@link ProjectInterfaces}, so all projects that do not match `excludeProjectInterfaces` will be included\\n\\n@example\\n\\n```typescript\\nincludeProjectInterfaces: ['one', ['two', 'three']];\\n```\\n\\nThis filter condition will succeed on projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\\n\\n- Include `one`\\n- Include both `two` and `three`.\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n ],\n },\n excludeProjectInterfaces: {\n description:\n \"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should absolutely not be included even if they match with `includeProjectInterfaces`.\\n\\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to exclude the project):\\n\\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition and exclude the project\\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition and exclude the project\\n\\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\\n\\nDefaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces` will be included\\n\\n@example\\n\\n```typescript\\nexcludeProjectInterfaces: ['one', ['two', 'three']];\\n```\\n\\nThis filter condition will succeed and exclude projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\\n\\n- Include `one`\\n- Include both `two` and `three`.\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n ],\n },\n includePdpFactoryIds: {\n description:\n \"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should be included.\\n\\nDefaults to all Project Data Provider Factory Ids, so all projects that do not match `excludePdpFactoryIds` will be included\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n excludePdpFactoryIds: {\n description:\n \"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should absolutely not be included even if they match with `includeProjectInterfaces`.\\n\\nDefaults to none, so all projects that match `includePdpFactoryIds` will be included\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n },\n settingsContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/settingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/settingsGroup',\n },\n },\n ],\n },\n settingsGroup: {\n description: 'Group of related settings definitions',\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the settings dialog as the group name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description: 'localizeKey that displays in the settings dialog to describe the group',\n $ref: '#/$defs/localizeKey',\n },\n properties: {\n $ref: '#/$defs/settingProperties',\n },\n },\n required: ['label', 'properties'],\n },\n settingProperties: {\n description: 'Object whose keys are setting IDs and whose values are settings objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w-]+\\\\.[\\\\w-]+$': {\n $ref: '#/$defs/setting',\n },\n },\n additionalProperties: false,\n },\n setting: {\n description: \"A description of an extension's setting entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledSetting',\n },\n ],\n },\n extensionControlledSetting: {\n description: 'Setting definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/settingBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n settingBase: {\n description: 'Base information needed to describe a setting entry',\n allOf: [\n {\n $ref: '#/$defs/stateBase',\n },\n {\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the settings dialog as the setting name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description: 'localizeKey that displays in the settings dialog to describe the setting',\n $ref: '#/$defs/localizeKey',\n },\n },\n required: ['label'],\n },\n ],\n },\n projectStateContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the project state it provides',\n $ref: '#/$defs/userStateProperties',\n },\n userStateContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the user state it provides',\n $ref: '#/$defs/userStateProperties',\n },\n userStateProperties: {\n description: 'Object whose keys are state IDs and whose values are state objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/userState',\n },\n },\n additionalProperties: false,\n },\n userState: {\n description: \"A description of an extension's user state entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledState',\n },\n ],\n },\n extensionControlledState: {\n description: 'State definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/stateBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n modifierExtensionControlled: {\n description:\n 'Modifies state/setting type to be extension-controlled. \"Extension-controlled\" means the extension provides the component and the validator for the state/setting, so the state/setting is controlled by the extension.',\n not: {\n anyOf: [\n {\n type: 'object',\n required: ['platformType'],\n },\n {\n type: 'object',\n required: ['type'],\n },\n ],\n },\n },\n stateBase: {\n description: 'Base information needed to describe a state entry',\n type: 'object',\n properties: {\n default: {\n description: 'default value for the state/setting',\n type: 'any',\n },\n derivesFrom: {\n description:\n \"a state/setting ID whose value to set to this state/setting's starting value the first time this state/setting is loaded\",\n $ref: '#/$defs/id',\n },\n },\n required: ['default'],\n },\n localizeKey: {\n description: \"Identifier for a string that will be localized based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n tsType: 'LocalizeKey',\n },\n id: {\n description: '',\n type: 'string',\n pattern: '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$',\n tsType: 'Id',\n },\n};\n\n/**\n * Json-schema-to-typescript has some added stuff that isn't actually compatible with JSON schema,\n * so we remove them here\n *\n * @param defs The `$defs` property of a JSON schema (will be modified in place)\n */\n// JSON schema types are weird, so we'll just be careful\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function removeJsonToTypeScriptTypesStuff(defs: any) {\n if (!defs) return;\n\n // JSON schema types are weird, so we'll just be careful\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Object.values(defs).forEach((def: any) => {\n if (!def.type) return;\n\n if ('tsType' in def) delete def.tsType;\n\n if (def.type === 'any') {\n delete def.type;\n return;\n }\n\n if (def.type === 'object') {\n removeJsonToTypeScriptTypesStuff(def.properties);\n }\n });\n}\n\nremoveJsonToTypeScriptTypesStuff(settingsDefs);\n\n/** JSON schema object that aligns with the ProjectSettingsContribution type */\nexport const projectSettingsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Project Settings Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the project settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/projectSettingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/projectSettingsGroup',\n },\n },\n ],\n\n $defs: settingsDefs,\n};\n\nObject.freeze(projectSettingsDocumentSchema);\n\n/** JSON schema object that aligns with the {@link SettingsContribution} type */\nexport const settingsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Settings Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/settingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/settingsGroup',\n },\n },\n ],\n\n $defs: settingsDefs,\n};\n\nObject.freeze(settingsDocumentSchema);\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { LocalizeKey } from 'menus.model';\nimport { removeJsonToTypeScriptTypesStuff } from './settings.model';\n\n/** Localized string value associated with this key */\nexport type LocalizedStringValue = string;\n\n/** The data an extension provides to inform Platform.Bible of the localized strings it provides. */\nexport interface LocalizedStringDataContribution {\n [k: string]: unknown;\n metadata?: StringsMetadata;\n localizedStrings?: {\n [k: string]: LanguageStrings;\n };\n}\n/**\n * Map whose keys are localized string keys and whose values provide additional non-locale-specific\n * information about the localized string key\n */\nexport interface StringsMetadata {\n [k: LocalizeKey]: StringMetadata;\n}\n/** Additional non-locale-specific information about a localized string key */\nexport interface StringMetadata {\n [k: string]: unknown;\n /**\n * Localized string key from which to get this value if one does not exist in the specified\n * language. If a new key/value pair needs to be made to replace an existing one, this could help\n * smooth over the transition if the meanings are close enough\n *\n * You can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a\n * backslash `\\`.\n */\n fallbackKey?: LocalizeKey;\n /**\n * Additional information provided by developers in English to help the translator to know how to\n * translate this localized string accurately\n */\n notes?: string;\n}\n/**\n * Map whose keys are localized string keys and whose values provide information about how to\n * localize strings for the localized string key\n */\nexport interface LanguageStrings {\n [k: LocalizeKey]: LocalizedStringValue;\n}\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\n\nconst localizedStringsDefs = {\n languageStrings: {\n description:\n 'Map whose keys are localized string keys and whose values provide information about how to localize strings for the localized string key',\n type: 'object',\n patternProperties: {\n '^%[\\\\w\\\\-\\\\.]+%$': {\n $ref: '#/$defs/localizedStringValue',\n },\n },\n additionalProperties: false,\n },\n localizedStringValue: {\n description: 'Localized string value associated with this key',\n type: 'string',\n },\n stringsMetadata: {\n description:\n 'Map whose keys are localized string keys and whose values provide additional non-locale-specific information about the localized string key',\n type: 'object',\n patternProperties: {\n '^%[\\\\w\\\\-\\\\.]+%$': {\n $ref: '#/$defs/stringMetadata',\n },\n },\n additionalProperties: false,\n },\n stringMetadata: {\n description: 'Additional non-locale-specific information about a localized string key',\n type: 'object',\n properties: {\n fallbackKey: {\n description:\n 'Localized string key from which to get this value if one does not exist in the specified language. If a new key/value pair needs to be made to replace an existing one, this could help smooth over the transition if the meanings are close enough.\\nYou can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a backslash `\\\\`.',\n type: 'string',\n pattern: \"^%[\\\\w\\\\-\\\\.;&,' (){}#:/\\\\\\\\?%⋮|[\\\\]“”‘’!~*\\u00A0+=•`…\\u200B↑↓]+%$\",\n tsType: 'LocalizeKey',\n },\n notes: {\n description:\n 'Additional information provided by developers in English to help the translator to know how to translate this localized string accurately',\n type: 'string',\n },\n },\n },\n localizeKey: {\n description: \"Identifier for a string that will be localized based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n tsType: 'LocalizeKey',\n },\n};\n\nremoveJsonToTypeScriptTypesStuff(localizedStringsDefs);\n\n/** JSON schema object that aligns with the LocalizedStringDataContribution type */\nexport const localizedStringsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Localized String Data Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the localized strings it provides.',\n type: 'object',\n properties: {\n metadata: {\n $ref: '#/$defs/stringsMetadata',\n },\n localizedStrings: {\n type: 'object',\n additionalProperties: {\n $ref: '#/$defs/languageStrings',\n },\n },\n },\n $defs: localizedStringsDefs,\n};\n\nObject.freeze(localizedStringsDocumentSchema);\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { ReplaceType } from './util';\n\n/** Identifier for a string that will be localized in a menu based on the user's UI language */\nexport type LocalizeKey = `%${string}%`;\n\n/** Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command) */\nexport type ReferencedItem = `${string}.${string}`;\n\nexport type OrderedItem = {\n /** Relative order of this item compared to other items in the same parent/scope (sorted ascending) */\n order: number;\n};\n\nexport type OrderedExtensibleContainer = OrderedItem & {\n /** Determines whether other items can be added to this after it has been defined */\n isExtensible?: boolean;\n};\n\n/** Group of menu items that belongs in a column */\nexport type MenuGroupDetailsInColumn = OrderedExtensibleContainer & {\n /** ID of column in which this group resides */\n column: ReferencedItem;\n};\n\n/** Group of menu items that belongs in a submenu */\nexport type MenuGroupDetailsInSubMenu = OrderedExtensibleContainer & {\n /** ID of menu item hosting the submenu in which this group resides */\n menuItem: ReferencedItem;\n};\n\n/** Column that includes header text in a menu */\nexport type MenuColumnWithHeader = OrderedExtensibleContainer & {\n /** Key that represents the text of the header text of the column */\n label: LocalizeKey;\n};\n\nexport type MenuItemBase = OrderedItem & {\n /** Menu group to which this menu item belongs */\n group: ReferencedItem;\n /** Key that represents the text of this menu item to display */\n label: LocalizeKey;\n /** Key that represents words the platform should reference when users are searching for menu items */\n searchTerms?: LocalizeKey;\n /** Key that represents the text to display if a mouse pointer hovers over the menu item */\n tooltip?: LocalizeKey;\n /** Additional information provided by developers to help people who perform localization */\n localizeNotes: string;\n};\n\n/** Menu item that hosts a submenu */\nexport type MenuItemContainingSubmenu = MenuItemBase & {\n /** ID for this menu item that holds a submenu */\n id: ReferencedItem;\n};\n\n/** Menu item that runs a command */\nexport type MenuItemContainingCommand = MenuItemBase & {\n /** Name of the PAPI command to run when this menu item is selected. */\n command: ReferencedItem;\n /** Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png` */\n iconPathAfter?: string;\n /** Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png` */\n iconPathBefore?: string;\n};\n\n/**\n * Group of menu items that can be combined with other groups to form a single context menu/submenu.\n * Groups are separated using a line within the menu/submenu.\n */\nexport type GroupsInSingleColumnMenu = {\n /** Named menu group */\n [property: ReferencedItem]: OrderedExtensibleContainer | MenuGroupDetailsInSubMenu;\n};\n\n/**\n * Group of menu items that can be combined with other groups to form a single menu/submenu within a\n * multi-column menu. Groups are separated using a line within the menu/submenu.\n */\nexport type GroupsInMultiColumnMenu = {\n /** Named menu group */\n [property: ReferencedItem]: MenuGroupDetailsInColumn | MenuGroupDetailsInSubMenu;\n};\n\n/** Group of columns that can be combined with other columns to form a multi-column menu */\nexport type ColumnsWithHeaders = {\n /** Named column of a menu */\n [property: ReferencedItem]: MenuColumnWithHeader;\n /** Defines whether columns can be added to this multi-column menu */\n isExtensible?: boolean;\n};\n\n/** Menu that contains a column without a header */\nexport type SingleColumnMenu = {\n /** Groups that belong in this menu */\n groups: GroupsInSingleColumnMenu;\n /** List of menu items that belong in this menu */\n items: (MenuItemContainingCommand | MenuItemContainingSubmenu)[];\n};\n\n/** Menu that contains multiple columns with headers */\nexport type MultiColumnMenu = {\n /** Columns that belong in this menu */\n columns: ColumnsWithHeaders;\n /** Groups that belong in this menu */\n groups: GroupsInMultiColumnMenu;\n /** List of menu items that belong in this menu */\n items: (MenuItemContainingCommand | MenuItemContainingSubmenu)[];\n};\n\n/** Menus for one single web view */\nexport type WebViewMenu = {\n /** Indicates whether the platform default menus should be included for this webview */\n includeDefaults: boolean | undefined;\n /** Menu that opens when you click on the top left corner of a tab */\n topMenu: MultiColumnMenu | undefined;\n /** Menu that opens when you right click on the main body/area of a tab */\n contextMenu: SingleColumnMenu | undefined;\n};\n\n/** Menus for all web views */\nexport type WebViewMenus = {\n /** Named web view */\n [property: ReferencedItem]: WebViewMenu;\n};\n\n/** Platform.Bible menus before they are localized */\nexport type PlatformMenus = {\n /** Top level menu for the application */\n mainMenu: MultiColumnMenu;\n /** Menus that apply per web view in the application */\n webViewMenus: WebViewMenus;\n /** Default context menu for web views that don't specify their own */\n defaultWebViewContextMenu: SingleColumnMenu;\n /** Default top menu for web views that don't specify their own */\n defaultWebViewTopMenu: MultiColumnMenu;\n};\n\n/**\n * Type that converts any menu type before it is localized to what it is after it is localized. This\n * can be applied to any menu type as needed.\n */\nexport type Localized = ReplaceType, ReferencedItem, string>;\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\n/** JSON schema object that aligns with the PlatformMenus type */\nexport const menuDocumentSchema = {\n title: 'Platform.Bible menus',\n type: 'object',\n properties: {\n mainMenu: {\n description: 'Top level menu for the application',\n $ref: '#/$defs/multiColumnMenu',\n },\n defaultWebViewTopMenu: {\n description: \"Default top menu for web views that don't specify their own\",\n $ref: '#/$defs/multiColumnMenu',\n },\n defaultWebViewContextMenu: {\n description: \"Default context menu for web views that don't specify their own\",\n $ref: '#/$defs/singleColumnMenu',\n },\n webViewMenus: {\n description: 'Menus that apply per web view in the application',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/menusForOneWebView',\n },\n },\n additionalProperties: false,\n },\n },\n required: ['mainMenu', 'defaultWebViewTopMenu', 'defaultWebViewContextMenu', 'webViewMenus'],\n additionalProperties: false,\n $defs: {\n localizeKey: {\n description:\n \"Identifier for a string that will be localized in a menu based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n },\n referencedItem: {\n description:\n 'Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command)',\n type: 'string',\n pattern: '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$',\n },\n columnsWithHeaders: {\n description:\n 'Group of columns that can be combined with other columns to form a multi-column menu',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n description: 'Single column with a header string',\n type: 'object',\n properties: {\n label: {\n description: 'Header text for this this column in the UI',\n $ref: '#/$defs/localizeKey',\n },\n localizeNotes: {\n description:\n 'Additional information provided by developers to help people who perform localization',\n type: 'string',\n },\n order: {\n description:\n 'Relative order of this column compared to other columns (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu groups to this column',\n type: 'boolean',\n },\n },\n required: ['label', 'order'],\n additionalProperties: false,\n },\n },\n properties: {\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add columns to this multi-column menu',\n type: 'boolean',\n },\n },\n },\n menuGroups: {\n description:\n 'Group of menu items that can be combined with other groups to form a single menu/submenu. Groups are separated using a line within the menu/submenu.',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n description: 'Single group that contains menu items',\n type: 'object',\n oneOf: [\n {\n properties: {\n column: {\n description:\n 'Column where this group belongs, not required for single column menus',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this group compared to other groups in the same column or submenu (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu items to this menu group',\n type: 'boolean',\n },\n },\n required: ['order'],\n additionalProperties: false,\n },\n {\n properties: {\n menuItem: {\n description: 'Menu item that anchors the submenu where this group belongs',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this group compared to other groups in the same column or submenu (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu items to this menu group',\n type: 'boolean',\n },\n },\n required: ['menuItem', 'order'],\n additionalProperties: false,\n },\n ],\n },\n },\n additionalProperties: false,\n },\n menuItem: {\n description:\n 'Single item in a menu that can be clicked on to take an action or can be the parent of a submenu',\n type: 'object',\n oneOf: [\n {\n properties: {\n id: {\n description: 'ID for this menu item that holds a submenu',\n $ref: '#/$defs/referencedItem',\n },\n },\n required: ['id'],\n },\n {\n properties: {\n command: {\n description: 'Name of the PAPI command to run when this menu item is selected.',\n $ref: '#/$defs/referencedItem',\n },\n iconPathBefore: {\n description: 'Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`',\n type: 'string',\n },\n iconPathAfter: {\n description: 'Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`',\n type: 'string',\n },\n },\n required: ['command'],\n },\n ],\n properties: {\n label: {\n description: 'Key that represents the text of this menu item to display',\n $ref: '#/$defs/localizeKey',\n },\n tooltip: {\n description:\n 'Key that represents the text to display if a mouse pointer hovers over the menu item',\n $ref: '#/$defs/localizeKey',\n },\n searchTerms: {\n description:\n 'Key that represents additional words the platform should reference when users are searching for menu items',\n $ref: '#/$defs/localizeKey',\n },\n localizeNotes: {\n description:\n 'Additional information provided by developers to help people who perform localization',\n type: 'string',\n },\n group: {\n description: 'Group to which this menu item belongs',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this menu item compared to other menu items in the same group (sorted ascending)',\n type: 'number',\n },\n },\n required: ['label', 'group', 'order'],\n unevaluatedProperties: false,\n },\n groupsAndItems: {\n description: 'Core schema for a column',\n type: 'object',\n properties: {\n groups: {\n description: 'Groups that belong in this menu',\n $ref: '#/$defs/menuGroups',\n },\n items: {\n description: 'List of menu items that belong in this menu',\n type: 'array',\n items: { $ref: '#/$defs/menuItem' },\n uniqueItems: true,\n },\n },\n required: ['groups', 'items'],\n },\n singleColumnMenu: {\n description: 'Menu that contains a column without a header',\n type: 'object',\n allOf: [{ $ref: '#/$defs/groupsAndItems' }],\n unevaluatedProperties: false,\n },\n multiColumnMenu: {\n description: 'Menu that can contain multiple columns with headers',\n type: 'object',\n allOf: [\n { $ref: '#/$defs/groupsAndItems' },\n {\n properties: {\n columns: {\n description: 'Columns that belong in this menu',\n $ref: '#/$defs/columnsWithHeaders',\n },\n },\n required: ['columns'],\n },\n ],\n unevaluatedProperties: false,\n },\n menusForOneWebView: {\n description: 'Set of menus that are associated with a single tab',\n type: 'object',\n properties: {\n includeDefaults: {\n description:\n 'Indicates whether the platform default menus should be included for this webview',\n type: 'boolean',\n },\n topMenu: {\n description: 'Menu that opens when you click on the top left corner of a tab',\n $ref: '#/$defs/multiColumnMenu',\n },\n contextMenu: {\n description: 'Menu that opens when you right click on the main body/area of a tab',\n $ref: '#/$defs/singleColumnMenu',\n },\n },\n additionalProperties: false,\n },\n },\n};\n\nObject.freeze(menuDocumentSchema);\n"],"names":["AsyncVariable","variableName","rejectIfNotSettledWithinMS","__publicField","resolve","reject","value","throwIfAlreadySettled","reason","Collator","locales","options","string1","string2","DateTimeFormat","date","startDate","endDate","PlatformEventEmitter","event","callback","callbackIndex","newGuid","s","isString","o","deepClone","obj","debounce","fn","delay","timeout","args","groupBy","items","keySelector","valueSelector","map","item","key","group","isErrorWithMessage","error","toErrorWithMessage","maybeError","getErrorMessage","wait","ms","waitForDuration","maxWaitTimeInMS","getAllObjectFunctionNames","_objId","objectFunctionNames","property","objectPrototype","createSyncProxyForAsyncObject","getObject","objectToProxy","target","prop","DocumentCombiner","baseDocument","documentName","document","previousDocumentVersion","documentToSet","contributions","contributionName","potentialOutput","outputIteration","contribution","mergeObjects","output","finalOutput","areNonArrayObjects","values","allMatch","areArrayObjects","startingPoint","copyFrom","ignoreDuplicateProperties","retVal","mergeObjectsInternal","startingPointObj","copyFromObj","Mutex","AsyncMutex","MutexMap","mutexID","NonValidatingDocumentCombiner","NumberFormat","startRange","endRange","UnsubscriberAsyncList","name","unsubscribers","unsubscriber","unsubs","results","unsubscriberSucceeded","index","P","R","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","r","D","i","a","u","v","f","d","b","p","J","M","charRegex","astralRange","comboMarksRange","comboHalfMarksRange","comboSymbolsRange","comboMarksExtendedRange","comboMarksSupplementRange","comboRange","varRange","familyRange","astral","combo","fitz","modifier","nonAstral","regional","surrogatePair","zwj","blackFlag","family","optModifier","optVar","optJoin","seq","symbol","__importDefault","this","mod","dist","char_regex_1","require$$0","toArray","str","toArray_1","length","match","length_1","substring","begin","end","substring_1","substr","len","strLength","substr_1","limit","padString","padPosition","padRepeats","limit_1","indexOf","searchStr","pos","strArr","searchArr","finded","searchIndex","indexOf_1","at","string","stringLength","charAt","codePointAt","endsWith","searchString","endPosition","lastIndexOfSearchString","lastIndexOf","indexOfClosestClosingCurlyBrace","escaped","closeCurlyBraceIndex","formatReplacementString","replacers","updatedStr","replacerKey","replacerString","includes","position","partialString","stringzIndexOf","validatedPosition","stringzLength","normalize","form","upperCaseForm","ordinalCompare","padEnd","targetLength","stringzLimit","padStart","correctSliceIndex","slice","indexStart","indexEnd","newStart","newEnd","split","separator","splitLimit","result","regexSeparator","matches","currentIndex","matchIndex","matchLength","startsWith","stringzSubstr","stringzSubstring","stringzToArray","isLocalizeKey","escapeStringRegexp","scrBookData","FIRST_SCR_BOOK_NUM","LAST_SCR_BOOK_NUM","FIRST_SCR_CHAPTER_NUM","FIRST_SCR_VERSE_NUM","getChaptersForBook","bookNum","_a","offsetBook","scrRef","offset","offsetChapter","offsetVerse","getLocalizedIdFromBookNumber","bookNumber","localizationLanguage","getLocalizedString","id","Canon","bookName","parts","scrRefToBBBCCCVVV","VerseRef","compareScrRefs","scrRef1","scrRef2","formatScrRef","optionOrLocalizedBookName","chapterVerseSeparator","bookChapterSeparator","book","aggregateUnsubscribers","success","aggregateUnsubscriberAsyncs","unsubPromises","getOwnPropertyNames","getOwnPropertySymbols","hasOwnProperty","combineComparators","comparatorA","comparatorB","state","createIsCircular","areItemsEqual","cache","cachedA","cachedB","getStrictProperties","object","hasOwn","sameValueZeroEqual","OWNER","getOwnPropertyDescriptor","keys","areArraysEqual","areDatesEqual","areMapsEqual","matchedIndices","aIterable","aResult","bResult","bIterable","hasMatch","aKey","aValue","_b","bKey","bValue","areObjectsEqual","properties","areObjectsEqualStrict","descriptorA","descriptorB","arePrimitiveWrappersEqual","areRegExpsEqual","areSetsEqual","areTypedArraysEqual","ARGUMENTS_TAG","BOOLEAN_TAG","DATE_TAG","MAP_TAG","NUMBER_TAG","OBJECT_TAG","REG_EXP_TAG","SET_TAG","STRING_TAG","isArray","isTypedArray","assign","getTag","createEqualityComparator","constructor","tag","createEqualityComparatorConfig","circular","createCustomConfig","strict","config","areArraysEqual$1","areMapsEqual$1","areObjectsEqual$1","areSetsEqual$1","createInternalEqualityComparator","compare","_indexOrKeyA","_indexOrKeyB","_parentA","_parentB","createIsEqual","comparator","createState","equals","meta","deepEqual","createCustomEqual","createCustomInternalComparator","isEqualDeep","isSubset","objectWithAllProperties","objectWithPartialProperties","partialArray","allArray","partialObj","allObj","serialize","replacer","space","replacerValue","newValue","deserialize","reviver","replaceNull","parsedObject","isSerializable","serializedValue","htmlEncode","getCurrentLocale","formatBytes","fileSize","decimals","sizes","sizeToUse","settingsDefs","removeJsonToTypeScriptTypesStuff","defs","def","projectSettingsDocumentSchema","settingsDocumentSchema","localizedStringsDefs","localizedStringsDocumentSchema","menuDocumentSchema"],"mappings":";;;;AACA,MAAqBA,GAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcpC,YAAYC,GAAsBC,IAAqC,KAAO;AAb7D,IAAAC,EAAA;AACA,IAAAA,EAAA;AACT,IAAAA,EAAA;AACA,IAAAA,EAAA;AAWN,SAAK,eAAeF,GACpB,KAAK,iBAAiB,IAAI,QAAW,CAACG,GAASC,MAAW;AACxD,WAAK,WAAWD,GAChB,KAAK,WAAWC;AAAA,IAAA,CACjB,GACGH,IAA6B,KAC/B,WA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A,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;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;AACF,GAAGC,IAAIC;AACP,SAASC,EAAE,GAAG,IAAI,IAAI;AACpB,SAAO,MAAM,IAAI,EAAE,YAAa,IAAG,KAAKF,IAAIA,EAAE,CAAC,IAAI;AACrD;AACA,SAASG,EAAE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AAAA,MACF;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AACF;AAEA,OAAO,OAAOA,EAAkB;","x_google_ignoreList":[11,12,13,17]} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../src/async-variable.ts","../src/intl-collator.ts","../src/intl-date-time-format.ts","../src/platform-event-emitter.model.ts","../src/util.ts","../src/document-combiner.ts","../src/mutex.ts","../src/mutex-map.ts","../src/non-validating-document-combiner.ts","../src/intl-number-format.ts","../src/unsubscriber-async-list.ts","../../../node_modules/@sillsdev/scripture/dist/index.es.js","../../../node_modules/char-regex/index.js","../../../node_modules/stringz/dist/index.js","../src/array-util.ts","../src/string-util.ts","../src/scripture-util.ts","../src/unsubscriber.ts","../../../node_modules/fast-equals/dist/esm/index.mjs","../src/equality-checking.ts","../src/subset-checking.ts","../src/serialization.ts","../src/intl-util.ts","../src/number-utils.ts","../src/settings.model.ts","../src/localized-strings.model.ts","../src/menus.model.ts"],"sourcesContent":["/** This class provides a convenient way for one task to wait on a variable that another task sets. */\nexport default class AsyncVariable {\n private readonly variableName: string;\n private readonly promiseToValue: Promise;\n private resolver: ((value: T) => void) | undefined;\n private rejecter: ((reason: string | undefined) => void) | undefined;\n\n /**\n * Creates an instance of the class\n *\n * @param variableName Name to use when logging about this variable\n * @param rejectIfNotSettledWithinMS Milliseconds to wait before verifying if the promise was\n * settled (resolved or rejected); will reject if it has not settled by that time. Use -1 if you\n * do not want a timeout at all. Defaults to 10000 ms\n */\n constructor(variableName: string, rejectIfNotSettledWithinMS: number = 10000) {\n this.variableName = variableName;\n this.promiseToValue = new Promise((resolve, reject) => {\n this.resolver = resolve;\n this.rejecter = reject;\n });\n if (rejectIfNotSettledWithinMS > 0) {\n setTimeout(() => {\n if (this.rejecter) {\n this.rejecter(`Timeout reached when waiting for ${this.variableName} to settle`);\n this.complete();\n }\n }, rejectIfNotSettledWithinMS);\n }\n Object.seal(this);\n }\n\n /**\n * Get this variable's promise to a value. This always returns the same promise even after the\n * value has been resolved or rejected.\n *\n * @returns The promise for the value to be set\n */\n get promise(): Promise {\n return this.promiseToValue;\n }\n\n /**\n * A simple way to see if this variable's promise was resolved or rejected already\n *\n * @returns Whether the variable was already resolved or rejected\n */\n get hasSettled(): boolean {\n return Object.isFrozen(this);\n }\n\n /**\n * Resolve this variable's promise to the given value\n *\n * @param value This variable's promise will resolve to this value\n * @param throwIfAlreadySettled Determines whether to throw if the variable was already resolved\n * or rejected. Defaults to `false`\n */\n resolveToValue(value: T, throwIfAlreadySettled: boolean = false): void {\n if (this.resolver) {\n console.debug(`${this.variableName} is being resolved now`);\n this.resolver(value);\n this.complete();\n } else {\n if (throwIfAlreadySettled) throw Error(`${this.variableName} was already settled`);\n console.debug(`Ignoring subsequent resolution of ${this.variableName}`);\n }\n }\n\n /**\n * Reject this variable's promise for the value with the given reason\n *\n * @param reason This variable's promise will be rejected with this reason\n * @param throwIfAlreadySettled Determines whether to throw if the variable was already resolved\n * or rejected. Defaults to `false`\n */\n rejectWithReason(reason: string, throwIfAlreadySettled: boolean = false): void {\n if (this.rejecter) {\n console.debug(`${this.variableName} is being rejected now`);\n this.rejecter(reason);\n this.complete();\n } else {\n if (throwIfAlreadySettled) throw Error(`${this.variableName} was already settled`);\n console.debug(`Ignoring subsequent rejection of ${this.variableName}`);\n }\n }\n\n /** Prevent any further updates to this variable */\n private complete(): void {\n this.resolver = undefined;\n this.rejecter = undefined;\n Object.freeze(this);\n }\n}\n","/** Enables language-sensitive string comparison. Wraps Intl.Collator */\nexport default class Collator {\n private collator: Intl.Collator;\n\n constructor(locales?: string | string[], options?: Intl.CollatorOptions) {\n this.collator = new Intl.Collator(locales, options);\n }\n\n /**\n * Compares two strings according to the sort order of this Collator object\n *\n * @param string1 String to compare\n * @param string2 String to compare\n * @returns A number indicating how string1 and string2 compare to each other according to the\n * sort order of this Collator object. Negative value if string1 comes before string2. Positive\n * value if string1 comes after string2. 0 if they are considered equal.\n */\n compare(string1: string, string2: string): number {\n return this.collator.compare(string1, string2);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and collation options computed\n * during initialization of this collator object.\n *\n * @returns ResolvedCollatorOptions object\n */\n resolvedOptions(): Intl.ResolvedCollatorOptions {\n return this.collator.resolvedOptions();\n }\n}\n","/** Enables language-sensitive data and time formatting. Wraps Intl.DateTimeFormat */\nexport default class DateTimeFormat {\n private dateTimeFormatter: Intl.DateTimeFormat;\n\n constructor(locales?: string | string[], options?: Intl.DateTimeFormatOptions) {\n this.dateTimeFormatter = new Intl.DateTimeFormat(locales, options);\n }\n\n /**\n * Formats a date according to the locale and formatting option for this DateTimeFormat object\n *\n * @param date The date to format\n * @returns String representing the given date formatted according to the locale and formatting\n * options of this DateTimeFormat object\n */\n format(date: Date): string {\n return this.dateTimeFormatter.format(date);\n }\n\n /**\n * Formats a date range in the most concise way based on the locales and options provided when\n * instantiating this DateTimeFormat object\n *\n * @param startDate Date object representing start of the date range\n * @param endDate Date object representing the end of the date range\n * @returns String representing the given date range formatted according to the locale and\n * formatting options of this DateTimeFormat object\n */\n formatRange(startDate: Date, endDate: Date): string {\n return this.dateTimeFormatter.formatRange(startDate, endDate);\n }\n\n /**\n * Returns an array of locale-specific tokens representing each part of the formatted date range\n * produced by this DateTimeFormat object\n *\n * @param startDate Date object representing start of the date range\n * @param endDate Date object representing the end of the date range\n * @returns Array of DateTimeRangeFormatPart objects\n */\n formatRangeToParts(startDate: Date, endDate: Date): Intl.DateTimeRangeFormatPart[] {\n return this.dateTimeFormatter.formatRangeToParts(startDate, endDate);\n }\n\n /**\n * Allows locale-aware formatting of strings produced by this DateTimeFormat object\n *\n * @param date The date to format\n * @returns Array of DateTimeFormatPart objects\n */\n formatToParts(date: Date): Intl.DateTimeFormatPart[] {\n return this.dateTimeFormatter.formatToParts(date);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and date and time formatting options\n * computed during initialization of this DateTimeFormat object\n *\n * @returns ResolvedDateTimeFormatOptions object\n */\n resolvedOptions(): Intl.ResolvedDateTimeFormatOptions {\n return this.dateTimeFormatter.resolvedOptions();\n }\n}\n","/** Interfaces, classes, and functions related to events and event emitters */\n\nimport { Dispose } from './disposal.model';\nimport { PlatformEvent, PlatformEventHandler } from './platform-event';\n\n/**\n * Event manager - accepts subscriptions to an event and runs the subscription callbacks when the\n * event is emitted Use eventEmitter.event(callback) to subscribe to the event. Use\n * eventEmitter.emit(event) to run the subscriptions. Generally, this EventEmitter should be\n * private, and its event should be public. That way, the emitter is not publicized, but anyone can\n * subscribe to the event.\n */\nexport default class PlatformEventEmitter implements Dispose {\n /**\n * Subscribes a function to run when this event is emitted.\n *\n * @param callback Function to run with the event when it is emitted\n * @returns Unsubscriber function to run to stop calling the passed-in function when the event is\n * emitted\n * @alias event\n */\n subscribe = this.event;\n\n /** All callback functions that will run when this event is emitted. Lazy loaded */\n private subscriptions?: PlatformEventHandler[];\n /** Event for listeners to subscribe to. Lazy loaded */\n private lazyEvent?: PlatformEvent;\n /** Whether this emitter has been disposed */\n private isDisposed = false;\n\n /**\n * Event for listeners to subscribe to. Subscribes a function to run when this event is emitted.\n * Use like `const unsubscriber = event(callback)`\n *\n * @param callback Function to run with the event when it is emitted\n * @returns Unsubscriber function to run to stop calling the passed-in function when the event is\n * emitted\n */\n get event(): PlatformEvent {\n this.assertNotDisposed();\n\n if (!this.lazyEvent) {\n this.lazyEvent = (callback) => {\n if (!callback || typeof callback !== 'function')\n throw new Error(`Event handler callback must be a function!`);\n\n // Initialize this.subscriptions if it does not exist\n if (!this.subscriptions) this.subscriptions = [];\n\n this.subscriptions.push(callback);\n\n return () => {\n if (!this.subscriptions) return false; // Did not find any subscribed callbacks\n\n const callbackIndex = this.subscriptions.indexOf(callback);\n\n if (callbackIndex < 0) return false; // Did not find this callback in the subscriptions\n\n // Remove the callback\n this.subscriptions.splice(callbackIndex, 1);\n\n return true;\n };\n };\n }\n return this.lazyEvent;\n }\n\n /** Disposes of this event, preparing it to release from memory */\n dispose = () => {\n return this.disposeFn();\n };\n\n /**\n * Runs the subscriptions for the event\n *\n * @param event Event data to provide to subscribed callbacks\n */\n emit = (event: T) => {\n // Do not do anything other than emitFn here. This emit is just binding `this` to emitFn\n this.emitFn(event);\n };\n\n /**\n * Function that runs the subscriptions for the event. Added here so children can override emit\n * and still call the base functionality. See NetworkEventEmitter.emit for example\n */\n protected emitFn(event: T) {\n this.assertNotDisposed();\n\n // Clone the subscriptions array before iterating over the callbacks so the callback index\n // doesn't get messed up if someone subscribes or unsubscribes inside one of the callbacks\n const emitCallbacks = [...(this.subscriptions ?? [])];\n emitCallbacks.forEach((callback) => callback(event));\n }\n\n /** Check to make sure this emitter is not disposed. Throw if it is */\n protected assertNotDisposed() {\n if (this.isDisposed) throw new Error('Emitter is disposed');\n }\n\n /**\n * Disposes of this event, preparing it to release from memory. Added here so children can\n * override emit and still call the base functionality.\n */\n protected disposeFn() {\n this.assertNotDisposed();\n\n this.isDisposed = true;\n this.subscriptions = undefined;\n this.lazyEvent = undefined;\n return Promise.resolve(true);\n }\n}\n","/** Collection of functions, objects, and types that are used as helpers in other services. */\n\n// Thanks to blubberdiblub at https://stackoverflow.com/a/68141099/217579\nexport function newGuid(): string {\n return '00-0-4-1-000'.replace(/[^-]/g, (s) =>\n // @ts-expect-error ts(2363) this works fine\n // eslint-disable-next-line no-bitwise\n (((Math.random() + ~~s) * 0x10000) >> s).toString(16).padStart(4, '0'),\n );\n}\n\n// thanks to DRAX at https://stackoverflow.com/a/9436948\n/**\n * Determine whether the object is a string\n *\n * @param o Object to determine if it is a string\n * @returns True if the object is a string; false otherwise\n */\nexport function isString(o: unknown): o is string {\n return typeof o === 'string' || o instanceof String;\n}\n\n/**\n * If deepClone isn't used when copying properties between objects, you may be left with dangling\n * references between the source and target of property copying operations.\n *\n * @param obj Object to clone\n * @returns Duplicate copy of `obj` without any references back to the original one\n */\nexport function deepClone(obj: T): T {\n // Assert the return type matches what is expected\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return JSON.parse(JSON.stringify(obj)) as T;\n}\n\n/**\n * Get a function that reduces calls to the function passed in\n *\n * @param fn The function to debounce\n * @param delay How much delay in milliseconds after the most recent call to the debounced function\n * to call the function\n * @returns Function that, when called, only calls the function passed in at maximum every delay ms\n */\n// We don't know the parameter types since this function can be anything\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function debounce void>(fn: T, delay = 300): T {\n if (isString(fn)) throw new Error('Tried to debounce a string! Could be XSS');\n let timeout: ReturnType;\n // Ensure the right return type.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return ((...args) => {\n clearTimeout(timeout);\n timeout = setTimeout(() => fn(...args), delay);\n }) as T;\n}\n\n/**\n * Groups each item in the array of items into a map according to the keySelector\n *\n * @param items Array of items to group by\n * @param keySelector Function to run on each item to get the key for the group to which it belongs\n * @param valueSelector Function to run on each item to get the value it should have in the group\n * (like map function). If not provided, uses the item itself\n * @returns Map of keys to groups of values corresponding to each item\n */\nexport function groupBy(items: T[], keySelector: (item: T) => K): Map>;\nexport function groupBy(\n items: T[],\n keySelector: (item: T) => K,\n valueSelector: (item: T, key: K) => V,\n): Map>;\nexport function groupBy(\n items: T[],\n keySelector: (item: T) => K,\n valueSelector?: (item: T, key: K) => V,\n): Map> {\n const map = new Map>();\n items.forEach((item) => {\n const key = keySelector(item);\n const group = map.get(key);\n const value = valueSelector ? valueSelector(item, key) : item;\n if (group) group.push(value);\n else map.set(key, [value]);\n });\n return map;\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\ntype ErrorWithMessage = {\n message: string;\n};\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\nfunction isErrorWithMessage(error: unknown): error is ErrorWithMessage {\n return (\n typeof error === 'object' &&\n // We're potentially dealing with objects we didn't create, so they might contain `null`\n // eslint-disable-next-line no-null/no-null\n error !== null &&\n 'message' in error &&\n // Type assert `error` to check it's `message`.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n typeof (error as Record).message === 'string'\n );\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\n/**\n * Function to get an error from the object (useful for getting an error in a catch block)\n *\n * @param error Error object whose message to get\n * @returns Message of the error - if object has message, returns message. Otherwise tries to\n * stringify\n */\nfunction toErrorWithMessage(maybeError: unknown): ErrorWithMessage {\n if (isErrorWithMessage(maybeError)) return maybeError;\n\n try {\n return new Error(JSON.stringify(maybeError));\n } catch {\n // fallback in case there's an error stringifying the maybeError\n // like with circular references for example.\n return new Error(String(maybeError));\n }\n}\n\n// From https://kentcdodds.com/blog/get-a-catch-block-error-message-with-typescript\n/**\n * Function to get an error message from the object (useful for getting error message in a catch\n * block)\n *\n * @example `try {...} catch (e) { logger.info(getErrorMessage(e)) }`\n *\n * @param error Error object whose message to get\n * @returns Message of the error - if object has message, returns message. Otherwise tries to\n * stringify\n */\nexport function getErrorMessage(error: unknown) {\n return toErrorWithMessage(error).message;\n}\n\n/** Asynchronously waits for the specified number of milliseconds. (wraps setTimeout in a promise) */\nexport function wait(ms: number) {\n // eslint-disable-next-line no-promise-executor-return\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Runs the specified function and will timeout if it takes longer than the specified wait time\n *\n * @param fn The function to run\n * @param maxWaitTimeInMS The maximum amount of time to wait for the function to resolve\n * @returns Promise that resolves to the resolved value of the function or undefined if it ran\n * longer than the specified wait time\n */\nexport function waitForDuration(fn: () => Promise, maxWaitTimeInMS: number) {\n const timeout = wait(maxWaitTimeInMS).then(() => undefined);\n return Promise.any([timeout, fn()]);\n}\n\n/**\n * Get all functions on an object and its prototype chain (so we don't miss any class methods or any\n * object methods). Note that the functions on the final item in the prototype chain (i.e., Object)\n * are skipped to avoid including functions like `__defineGetter__`, `__defineSetter__`, `toString`,\n * etc.\n *\n * @param obj Object whose functions to get\n * @param _objId Optional ID of the object to use for debug logging\n * @returns Array of all function names on an object\n */\n// Note: lodash has something that MIGHT do the same thing as this. Investigate for https://github.com/paranext/paranext-core/issues/134\nexport function getAllObjectFunctionNames(\n obj: { [property: string]: unknown },\n // Leaving it here for debugging\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _objId: string = 'obj',\n): Set {\n const objectFunctionNames = new Set();\n\n // Get all function properties directly defined on the object\n Object.getOwnPropertyNames(obj).forEach((property) => {\n try {\n if (typeof obj[property] === 'function') objectFunctionNames.add(property);\n } catch (error) {\n // Too noisy - only reenable if you need more details\n // console.trace(`Skipping ${property} on ${objId} due to error: ${error}`);\n }\n });\n\n // Walk up the prototype chain and get additional function properties, skipping the functions\n // provided by the final (Object) prototype\n let objectPrototype = Object.getPrototypeOf(obj);\n while (objectPrototype && Object.getPrototypeOf(objectPrototype)) {\n Object.getOwnPropertyNames(objectPrototype).forEach((property) => {\n try {\n if (typeof obj[property] === 'function') objectFunctionNames.add(property);\n } catch (error) {\n // Too noisy - only reenable if you need more details\n // console.trace(`Skipping ${property} on ${objId}'s prototype due to error: ${error}`);\n }\n });\n objectPrototype = Object.getPrototypeOf(objectPrototype);\n }\n\n return objectFunctionNames;\n}\n\n/**\n * Creates a synchronous proxy for an asynchronous object. The proxy allows calling methods on an\n * object that is asynchronously fetched using a provided asynchronous function.\n *\n * @param getObject - A function that returns a promise resolving to the object whose asynchronous\n * methods to call.\n * @param objectToProxy - An optional object that is the object that is proxied. If a property is\n * accessed that does exist on this object, it will be returned. If a property is accessed that\n * does not exist on this object, it will be considered to be an asynchronous method called on the\n * object returned from getObject.\n * @returns A synchronous proxy for the asynchronous object.\n */\nexport function createSyncProxyForAsyncObject(\n getObject: (args?: unknown[]) => Promise,\n objectToProxy: Partial = {},\n): T {\n // objectToProxy will have only the synchronously accessed properties of T on it, and this proxy\n // makes the async methods that do not exist yet available synchronously so we have all of T\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n return new Proxy(objectToProxy as T, {\n get(target, prop) {\n // We don't have any type information for T, so we assume methodName exists on it and will let JavaScript throw if it doesn't exist\n // @ts-expect-error 7053\n if (prop in target) return target[prop];\n return async (...args: unknown[]) => {\n // 7053: We don't have any type information for T, so we assume methodName exists on it and will let JavaScript throw if it doesn't exist\n // 2556: The args here are the parameters for the method specified\n // @ts-expect-error 7053 2556\n return (await getObject())[prop](...args);\n };\n },\n });\n}\n\n/** Within type T, recursively change all properties to be optional */\nexport type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial } : T;\n\n/** Within type T, recursively change properties that were of type A to be of type B */\nexport type ReplaceType = T extends A\n ? B\n : T extends object\n ? { [K in keyof T]: ReplaceType }\n : T;\n\n// Thanks to jcalz at https://stackoverflow.com/a/50375286\n/**\n * Converts a union type to an intersection type (`|` to `&`).\n *\n * Note: this utility type is for use on object types. It may fail on other types.\n *\n * @example\n *\n * ```typescript\n * type TypeOne = { one: string };\n * type TypeTwo = { two: number };\n * type TypeThree = { three: string };\n *\n * type TypeNums = { one: TypeOne; two: TypeTwo; three: TypeThree };\n * const numNames = ['one', 'two'] as const;\n * type TypeNumNames = typeof numNames;\n *\n * // Same as `TypeOne | TypeTwo`\n * // `{ one: string } | { two: number }`\n * type TypeOneTwoUnion = TypeNums[TypeNumNames[number]];\n *\n * // Same as `TypeOne & TypeTwo`\n * // `{ one: string; two: number }`\n * type TypeOneTwoIntersection = UnionToIntersection;\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type UnionToIntersection = (U extends any ? (x: U) => void : never) extends (\n x: infer I,\n) => void\n ? I\n : never;\n","import PlatformEventEmitter from './platform-event-emitter.model';\nimport { deepClone } from './util';\n\ntype JsonObjectLike = { [key: string]: unknown };\ntype JsonArrayLike = unknown[];\n\nexport type JsonDocumentLike = JsonObjectLike | JsonArrayLike;\n\n/**\n * Options for DocumentCombiner objects\n *\n * - `copyDocuments`: If true, this instance will perform a deep copy of all provided documents before\n * composing the output. If false, then changes made to provided documents after they are\n * contributed will be reflected in the next time output is composed.\n * - `ignoreDuplicateProperties`: If true, then duplicate properties are skipped if they are seen in\n * contributed documents. If false, then throw when duplicate properties are seen in contributed\n * documents.\n */\nexport type DocumentCombinerOptions = {\n copyDocuments: boolean;\n ignoreDuplicateProperties: boolean;\n};\n\n/**\n * Base class for any code that wants to compose JSON documents (primarily in the form of JS objects\n * or arrays) together into a single output document.\n */\nexport default class DocumentCombiner {\n protected baseDocument: JsonDocumentLike;\n protected readonly contributions = new Map();\n protected latestOutput: JsonDocumentLike | undefined;\n protected readonly options: DocumentCombinerOptions;\n private readonly onDidRebuildEmitter = new PlatformEventEmitter();\n /** Event that emits to announce that the document has been rebuilt and the output has been updated */\n // Need `onDidRebuildEmitter` to be instantiated before this line\n // eslint-disable-next-line @typescript-eslint/member-ordering\n readonly onDidRebuild = this.onDidRebuildEmitter.subscribe;\n\n /**\n * Create a DocumentCombiner instance\n *\n * @param baseDocument This is the first document that will be used when composing the output\n * @param options Options used by this object when combining documents\n */\n protected constructor(baseDocument: JsonDocumentLike, options: DocumentCombinerOptions) {\n // Setting baseDocument redundantly because TS doesn't understand that updateBaseDocument does it\n this.baseDocument = baseDocument;\n this.options = options;\n this.updateBaseDocument(baseDocument);\n }\n\n /**\n * Update the starting document for composition process\n *\n * @param baseDocument Base JSON document/JS object that all other documents are added to\n * @returns Recalculated output document given the new starting state and existing other documents\n */\n updateBaseDocument(baseDocument: JsonDocumentLike): JsonDocumentLike | undefined {\n this.validateBaseDocument(baseDocument);\n this.baseDocument = this.options.copyDocuments ? deepClone(baseDocument) : baseDocument;\n this.baseDocument = this.transformBaseDocumentAfterValidation(this.baseDocument);\n return this.rebuild();\n }\n\n /**\n * Add or update one of the contribution documents for the composition process\n *\n * Note: the order in which contribution documents are added can be considered to be indeterminate\n * as it is currently ordered by however `Map.forEach` provides the contributions. The order\n * matters when merging two arrays into one. Also, when `options.ignoreDuplicateProperties` is\n * `true`, the order also matters when adding the same property to an object that is already\n * provided previously. Please let us know if you have trouble because of indeterminate\n * contribution ordering.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine\n * @returns Recalculated output document given the new or updated contribution and existing other\n * documents\n */\n addOrUpdateContribution(\n documentName: string,\n document: JsonDocumentLike,\n ): JsonDocumentLike | undefined {\n this.validateContribution(documentName, document);\n const previousDocumentVersion = this.contributions.get(documentName);\n let documentToSet = this.options.copyDocuments && !!document ? deepClone(document) : document;\n documentToSet = this.transformContributionAfterValidation(documentName, documentToSet);\n this.contributions.set(documentName, documentToSet);\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after adding/updating the contribution, put it back how it was\n if (previousDocumentVersion) this.contributions.set(documentName, previousDocumentVersion);\n else this.contributions.delete(documentName);\n throw new Error(`Error when setting the document named ${documentName}: ${error}`);\n }\n }\n\n /**\n * Delete one of the contribution documents for the composition process\n *\n * @param documentName Name of the contributed document to delete\n * @returns Recalculated output document given the remaining other documents\n */\n deleteContribution(documentName: string): JsonDocumentLike | undefined {\n const document = this.contributions.get(documentName);\n if (!document) throw new Error(`${documentName} does not exist`);\n this.contributions.delete(documentName);\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after deleting the contribution, put it back and rethrow\n this.contributions.set(documentName, document);\n throw new Error(`Error when deleting the document named ${documentName}: ${error}`);\n }\n }\n\n /**\n * Delete all present contribution documents for the composition process and return to the base\n * document\n *\n * @returns Recalculated output document consisting only of the base document\n */\n deleteAllContributions(): JsonDocumentLike | undefined {\n if (this.contributions.size <= 0) return this.latestOutput;\n\n // Save out all contributions\n const contributions = [...this.contributions.entries()];\n\n // Delete all contributions\n contributions.forEach(([contributionName]) => this.contributions.delete(contributionName));\n\n // Rebuild with no contributions\n try {\n return this.rebuild();\n } catch (error) {\n // If the output isn't valid after deleting all contributions, put them back and rethrow\n contributions.forEach(([contributionName, document]) =>\n this.contributions.set(contributionName, document),\n );\n throw new Error(`Error when deleting all contributions: ${error}`);\n }\n }\n\n /**\n * Run the document composition process given the starting document and all contributions. Throws\n * if the output document fails to validate properly.\n *\n * @returns Recalculated output document given the starting and contributed documents\n */\n rebuild(): JsonDocumentLike | undefined {\n // The starting document is the output if there are no other contributions\n if (this.contributions.size === 0) {\n let potentialOutput = deepClone(this.baseDocument);\n potentialOutput = this.transformFinalOutputBeforeValidation(potentialOutput);\n this.validateOutput(potentialOutput);\n this.latestOutput = potentialOutput;\n this.onDidRebuildEmitter.emit(undefined);\n return this.latestOutput;\n }\n\n // Compose the output by validating each document one at a time to pinpoint errors better\n let outputIteration = this.baseDocument;\n this.contributions.forEach((contribution: JsonDocumentLike) => {\n outputIteration = mergeObjects(\n outputIteration,\n contribution,\n this.options.ignoreDuplicateProperties,\n );\n this.validateOutput(outputIteration);\n });\n outputIteration = this.transformFinalOutputBeforeValidation(outputIteration);\n this.validateOutput(outputIteration);\n this.latestOutput = outputIteration;\n this.onDidRebuildEmitter.emit(undefined);\n return this.latestOutput;\n }\n\n /**\n * Transform the starting document that is given to the combiner. This transformation occurs after\n * validating the base document and before combining any contributions.\n *\n * WARNING: If you do not create the combiner with option `copyDocuments: true` or clone inside\n * this method, this method will directly modify the `baseDocument` passed in.\n *\n * @param baseDocument Initial input document. Already validated via `validateBaseDocument`\n * @returns Transformed base document\n */\n // We just don't need `this` here. This is basically a no-op function that is available to child\n // classes to override\n // eslint-disable-next-line class-methods-use-this\n protected transformBaseDocumentAfterValidation(baseDocument: JsonDocumentLike): JsonDocumentLike {\n return baseDocument;\n }\n\n /**\n * Transform the contributed document associated with `documentName`. This transformation occurs\n * after validating the contributed document and before combining with other documents.\n *\n * WARNING: If you do not create the combiner with option `copyDocuments: true` or clone inside\n * this method, this method will directly modify the contributed `document` passed in.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine. Already validated via\n * `validateContribution`\n * @returns Transformed contributed document\n */\n // We just don't need `this` here. This is basically a no-op function that is available to child\n // classes to override\n // eslint-disable-next-line class-methods-use-this\n protected transformContributionAfterValidation(\n // @ts-expect-error this parameter is unused but may be used in child classes\n documentName: string,\n document: JsonDocumentLike,\n ): JsonDocumentLike {\n return document;\n }\n\n /**\n * Throw an error if the provided document is not a valid starting document.\n *\n * @param baseDocument Base JSON document/JS object that all other documents are added to\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateBaseDocument(baseDocument: JsonDocumentLike): void {}\n\n /**\n * Throw an error if the provided document is not a valid contribution document.\n *\n * @param documentName Name of the contributed document to combine\n * @param document Content of the contributed document to combine\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateContribution(documentName: string, document: JsonDocumentLike): void {}\n\n /**\n * Throw an error if the provided output is not valid.\n *\n * @param output Output document that could potentially be returned to callers\n */\n // no-op intended to be overridden by child classes. Can't be static\n // @ts-expect-error ts(6133) parameter doesn't need to be used but still needs the right name\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n protected validateOutput(output: JsonDocumentLike): void {}\n\n /**\n * Transform the document that is the composition of the base document and all contribution\n * documents. This is the last step that will be run prior to validation via `validateOutput`\n * before `this.latestOutput` is updated to the new output.\n *\n * @param finalOutput Final output document that could potentially be returned to callers. \"Final\"\n * means no further contribution documents will be merged.\n */\n // no-op intended to be overridden by child classes. Can't be static\n // eslint-disable-next-line class-methods-use-this\n protected transformFinalOutputBeforeValidation(finalOutput: JsonDocumentLike): JsonDocumentLike {\n return finalOutput;\n }\n}\n\n// #region Helper functions\n\n/**\n * Determines if the input values are objects but not arrays\n *\n * @param values Objects to check\n * @returns True if all the values are objects but not arrays\n */\nfunction areNonArrayObjects(...values: unknown[]): boolean {\n let allMatch = true;\n values.forEach((value: unknown) => {\n if (!value || typeof value !== 'object' || Array.isArray(value)) allMatch = false;\n });\n return allMatch;\n}\n\n/**\n * Determines if the input values are arrays\n *\n * @param value Objects to check\n * @returns True if the values are arrays\n */\nfunction areArrayObjects(...values: unknown[]): boolean {\n let allMatch = true;\n values.forEach((value: unknown) => {\n if (!value || typeof value !== 'object' || !Array.isArray(value)) allMatch = false;\n });\n return allMatch;\n}\n\n/**\n * Deep clone and recursively merge the properties of one object (copyFrom) into another\n * (startingPoint). Throws if copyFrom would overwrite values already existing in startingPoint.\n *\n * Does not modify the objects passed in.\n *\n * @param startingPoint Object that is the starting point for the return value\n * @param copyFrom Object whose values are copied into the return value\n * @param ignoreDuplicateProperties Whether to ignore object properties that are present in\n * `copyFrom` that are already present in `startingPoint`. If `false`, throws when an object\n * property in `copyFrom` is already present in `startingPoint`\n * @returns Object that is the combination of the two documents\n */\nfunction mergeObjects(\n startingPoint: JsonDocumentLike,\n copyFrom: JsonDocumentLike,\n ignoreDuplicateProperties: boolean,\n): JsonDocumentLike {\n const retVal = deepClone(startingPoint);\n\n if (!copyFrom) return retVal;\n\n return mergeObjectsInternal(retVal, deepClone(copyFrom), ignoreDuplicateProperties);\n}\n\n/**\n * Recursively merge the properties of one object (copyFrom) into another (startingPoint). Throws if\n * copyFrom would overwrite values already existing in startingPoint.\n *\n * WARNING: Modifies the argument objects in some way. Recommended to use `mergeObjects`\n *\n * @param startingPoint Object that is the starting point for the return value\n * @param copyFrom Object whose values are copied into the return value\n * @param ignoreDuplicateProperties Whether to ignore object properties that are present in\n * `copyFrom` that are already present in `startingPoint`. If `false`, throws when an object\n * property in `copyFrom` is already present in `startingPoint`\n * @returns Object that is the combination of the two documents\n */\nfunction mergeObjectsInternal(\n startingPoint: JsonDocumentLike,\n copyFrom: JsonDocumentLike,\n ignoreDuplicateProperties: boolean,\n): JsonDocumentLike {\n if (!copyFrom) return startingPoint;\n\n if (areNonArrayObjects(startingPoint, copyFrom)) {\n // Merge properties since they are both objects\n\n // We know these are objects from the `if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n const startingPointObj = startingPoint as JsonObjectLike;\n const copyFromObj = copyFrom as JsonObjectLike;\n /* eslint-enable no-type-assertion/no-type-assertion */\n Object.keys(copyFromObj).forEach((key: string | number) => {\n if (Object.hasOwn(startingPointObj, key)) {\n if (areNonArrayObjects(startingPointObj[key], copyFromObj[key])) {\n startingPointObj[key] = mergeObjectsInternal(\n // We know these are objects from the `if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n startingPointObj[key] as JsonObjectLike,\n copyFromObj[key] as JsonObjectLike,\n ignoreDuplicateProperties,\n /* eslint-enable no-type-assertion/no-type-assertion */\n );\n } else if (areArrayObjects(startingPointObj[key], copyFromObj[key])) {\n // Concat the arrays since they are both arrays\n\n // We know these are arrays from the `else if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n startingPointObj[key] = (startingPointObj[key] as JsonArrayLike).concat(\n copyFromObj[key] as JsonArrayLike,\n );\n /* eslint-enable no-type-assertion/no-type-assertion */\n } else if (!ignoreDuplicateProperties)\n throw new Error(`Cannot merge objects: key \"${key}\" already exists in the target object`);\n // Note that the first non-object non-array value that gets placed in a property stays.\n // New values do not override existing ones\n } else {\n startingPointObj[key] = copyFromObj[key];\n }\n });\n } else if (areArrayObjects(startingPoint, copyFrom)) {\n // Concat the arrays since they are both arrays\n\n // Push the contents of copyFrom into startingPoint since it is a const and was already deep cloned\n // We know these are objects from the `else if` check\n /* eslint-disable no-type-assertion/no-type-assertion */\n (startingPoint as JsonArrayLike).push(...(copyFrom as JsonArrayLike));\n /* eslint-enable no-type-assertion/no-type-assertion */\n }\n\n // Note that nothing happens if `startingPoint` is not an object or an array or if `startingPoint`\n // and `copyFrom` are not both object or both arrays. Should we throw? Should we push `copyFrom`'s\n // values into the array? Other? Maybe one day we can add some options to decide what to do in\n // this situation, but YAGNI for now\n\n return startingPoint;\n}\n\n// #endregion\n","import { Mutex as AsyncMutex } from 'async-mutex';\n\n// Extending Mutex from async-mutex so we can add JSDoc\n\n/**\n * Class that allows calling asynchronous functions multiple times at once while only running one at\n * a time.\n *\n * @example\n *\n * ```typescript\n * const mutex = new Mutex();\n *\n * mutex.runExclusive(async () => {\n * // Do some asynchronous stuff\n * console.log('These run one-at-a-time');\n * });\n *\n * mutex.runExclusive(async () => {\n * // Do some asynchronous stuff\n * console.log('These run one-at-a-time');\n * });\n * ```\n *\n * See [`async-mutex`](https://www.npmjs.com/package/async-mutex) for more information.\n */\nclass Mutex extends AsyncMutex {}\n\nexport default Mutex;\n","import Mutex from './mutex';\n\n/** Map of {@link Mutex}es that automatically (lazily) generates a new {@link Mutex} for any new key */\nclass MutexMap {\n private mutexesByID = new Map();\n\n get(mutexID: string): Mutex {\n let retVal = this.mutexesByID.get(mutexID);\n if (retVal) return retVal;\n\n retVal = new Mutex();\n this.mutexesByID.set(mutexID, retVal);\n return retVal;\n }\n}\n\nexport default MutexMap;\n","import DocumentCombiner, { DocumentCombinerOptions, JsonDocumentLike } from './document-combiner';\n\nexport default class NonValidatingDocumentCombiner extends DocumentCombiner {\n // Making the protected base constructor public\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(baseDocument: JsonDocumentLike, options: DocumentCombinerOptions) {\n super(baseDocument, options);\n }\n\n get output(): JsonDocumentLike | undefined {\n return this.latestOutput;\n }\n}\n","/** Enables language-sensitive number formatting. Wraps Intl.NumberFormat */\nexport default class NumberFormat {\n private numberFormatter: Intl.NumberFormat;\n\n constructor(locales?: string | string[], options?: Intl.NumberFormatOptions) {\n this.numberFormatter = new Intl.NumberFormat(locales, options);\n }\n\n /**\n * Formats a number according to the locale and formatting options of this NumberFormat object\n *\n * @param value Number or BigInt to format\n * @returns String representing the given number formatted according to the locale and formatting\n * options of this NumberFormat object\n */\n format(value: number | bigint): string {\n return this.numberFormatter.format(value);\n }\n\n /**\n * Formats a range of numbers according to the locale and formatting options of this NumberFormat\n * object\n *\n * @param startRange Number or bigint representing the start of the range\n * @param endRange Number or bigint representing the end of the range\n * @returns String representing the given range of numbers formatted according to the locale and\n * formatting options of this NumberFormat object\n */\n formatRange(startRange: number | bigint, endRange: number | bigint): string {\n return this.numberFormatter.formatRange(startRange, endRange);\n }\n\n /**\n * Returns an array of objects containing the locale-specific tokens from which it is possible to\n * build custom strings while preserving the locale-specific parts.\n *\n * @param startRange Number or bigint representing start of the range\n * @param endRange Number or bigint representing end of the range\n * @returns Array of NumberRangeFormatPart objects containing the formatted range of numbers in\n * parts\n */\n formatRangeToParts(\n startRange: number | bigint,\n endRange: number | bigint,\n ): Intl.NumberRangeFormatPart[] {\n return this.numberFormatter.formatRangeToParts(startRange, endRange);\n }\n\n /**\n * Allows locale-aware formatting of strings produced by this NumberFormat object\n *\n * @param value Number or bigint to format\n * @returns Array of NumberFormatPart objects containing the formatted number in parts\n */\n formatToParts(value: number | bigint): Intl.NumberFormatPart[] {\n return this.numberFormatter.formatToParts(value);\n }\n\n /**\n * Returns a new object with properties reflecting the locale and number formatting options\n * computed during initialization of this NumberFormat object\n *\n * @returns ResolvedNumberFormatOptions object\n */\n resolvedOptions(): Intl.ResolvedNumberFormatOptions {\n return this.numberFormatter.resolvedOptions();\n }\n}\n","import { Dispose } from './disposal.model';\nimport { Unsubscriber, UnsubscriberAsync } from './unsubscriber';\n\n/** Simple collection for UnsubscriberAsync objects that also provides an easy way to run them. */\nexport default class UnsubscriberAsyncList {\n readonly unsubscribers = new Set();\n\n constructor(private name = 'Anonymous') {}\n\n /**\n * Add unsubscribers to the list. Note that duplicates are not added twice.\n *\n * @param unsubscribers - Objects that were returned from a registration process.\n */\n add(...unsubscribers: (UnsubscriberAsync | Unsubscriber | Dispose)[]) {\n unsubscribers.forEach((unsubscriber) => {\n if ('dispose' in unsubscriber) this.unsubscribers.add(unsubscriber.dispose);\n else this.unsubscribers.add(unsubscriber);\n });\n }\n\n /**\n * Run all unsubscribers added to this list and then clear the list.\n *\n * @returns `true` if all unsubscribers succeeded, `false` otherwise.\n */\n async runAllUnsubscribers(): Promise {\n const unsubs = [...this.unsubscribers].map((unsubscriber) => unsubscriber());\n const results = await Promise.all(unsubs);\n this.unsubscribers.clear();\n return results.every((unsubscriberSucceeded, index) => {\n if (!unsubscriberSucceeded)\n console.error(`UnsubscriberAsyncList ${this.name}: Unsubscriber at index ${index} failed!`);\n\n return unsubscriberSucceeded;\n });\n }\n}\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","\"use strict\"\r\n\r\n// Based on: https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js\r\n\r\nmodule.exports = () => {\r\n\t// Used to compose unicode character classes.\r\n\tconst astralRange = \"\\\\ud800-\\\\udfff\"\r\n\tconst comboMarksRange = \"\\\\u0300-\\\\u036f\"\r\n\tconst comboHalfMarksRange = \"\\\\ufe20-\\\\ufe2f\"\r\n\tconst comboSymbolsRange = \"\\\\u20d0-\\\\u20ff\"\r\n\tconst comboMarksExtendedRange = \"\\\\u1ab0-\\\\u1aff\"\r\n\tconst comboMarksSupplementRange = \"\\\\u1dc0-\\\\u1dff\"\r\n\tconst comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange\r\n\tconst varRange = \"\\\\ufe0e\\\\ufe0f\"\r\n\tconst familyRange = \"\\\\uD83D\\\\uDC69\\\\uD83C\\\\uDFFB\\\\u200D\\\\uD83C\\\\uDF93\"\r\n\r\n\t// Used to compose unicode capture groups.\r\n\tconst astral = `[${astralRange}]`\r\n\tconst combo = `[${comboRange}]`\r\n\tconst fitz = \"\\\\ud83c[\\\\udffb-\\\\udfff]\"\r\n\tconst modifier = `(?:${combo}|${fitz})`\r\n\tconst nonAstral = `[^${astralRange}]`\r\n\tconst regional = \"(?:\\\\uD83C[\\\\uDDE6-\\\\uDDFF]){2}\"\r\n\tconst surrogatePair = \"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\"\r\n\tconst zwj = \"\\\\u200d\"\r\n\tconst blackFlag = \"(?:\\\\ud83c\\\\udff4\\\\udb40\\\\udc67\\\\udb40\\\\udc62\\\\udb40(?:\\\\udc65|\\\\udc73|\\\\udc77)\\\\udb40(?:\\\\udc6e|\\\\udc63|\\\\udc6c)\\\\udb40(?:\\\\udc67|\\\\udc74|\\\\udc73)\\\\udb40\\\\udc7f)\"\r\n\tconst family = `[${familyRange}]`\r\n\r\n\t// Used to compose unicode regexes.\r\n\tconst optModifier = `${modifier}?`\r\n\tconst optVar = `[${varRange}]?`\r\n\tconst optJoin = `(?:${zwj}(?:${[nonAstral, regional, surrogatePair].join(\"|\")})${optVar + optModifier})*`\r\n\tconst seq = optVar + optModifier + optJoin\r\n\tconst nonAstralCombo = `${nonAstral}${combo}?`\r\n\tconst symbol = `(?:${[nonAstralCombo, combo, regional, surrogatePair, astral, family].join(\"|\")})`\r\n\r\n\t// Used to match [String symbols](https://mathiasbynens.be/notes/javascript-unicode).\r\n\treturn new RegExp(`${blackFlag}|${fitz}(?=${fitz})|${symbol + seq}`, \"g\")\r\n}\r\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// @ts-ignore\nvar char_regex_1 = __importDefault(require(\"char-regex\"));\n/**\n * Converts a string to an array of string chars\n * @param {string} str The string to turn into array\n * @returns {string[]}\n */\nfunction toArray(str) {\n if (typeof str !== 'string') {\n throw new Error('A string is expected as input');\n }\n return str.match(char_regex_1.default()) || [];\n}\nexports.toArray = toArray;\n/**\n * Returns the length of a string\n *\n * @export\n * @param {string} str\n * @returns {number}\n */\nfunction length(str) {\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n var match = str.match(char_regex_1.default());\n return match === null ? 0 : match.length;\n}\nexports.length = length;\n/**\n * Returns a substring by providing start and end position\n *\n * @export\n * @param {string} str\n * @param {number} [begin=0] Starting position\n * @param {number} end End position\n * @returns {string}\n */\nfunction substring(str, begin, end) {\n if (begin === void 0) { begin = 0; }\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n // Even though negative numbers work here, theyre not in the spec\n if (typeof begin !== 'number' || begin < 0) {\n begin = 0;\n }\n if (typeof end === 'number' && end < 0) {\n end = 0;\n }\n var match = str.match(char_regex_1.default());\n if (!match)\n return '';\n return match.slice(begin, end).join('');\n}\nexports.substring = substring;\n/**\n * Returns a substring by providing start position and length\n *\n * @export\n * @param {string} str\n * @param {number} [begin=0] Starting position\n * @param {number} len Desired length\n * @returns {string}\n */\nfunction substr(str, begin, len) {\n if (begin === void 0) { begin = 0; }\n // Check for input\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n var strLength = length(str);\n // Fix type\n if (typeof begin !== 'number') {\n begin = parseInt(begin, 10);\n }\n // Return zero-length string if got oversize number.\n if (begin >= strLength) {\n return '';\n }\n // Calculating postive version of negative value.\n if (begin < 0) {\n begin += strLength;\n }\n var end;\n if (typeof len === 'undefined') {\n end = strLength;\n }\n else {\n // Fix type\n if (typeof len !== 'number') {\n len = parseInt(len, 10);\n }\n end = len >= 0 ? len + begin : begin;\n }\n var match = str.match(char_regex_1.default());\n if (!match)\n return '';\n return match.slice(begin, end).join('');\n}\nexports.substr = substr;\n/**\n * Enforces a string to be a certain length by\n * adding or removing characters\n *\n * @export\n * @param {string} str\n * @param {number} [limit=16] Limit\n * @param {string} [padString='#'] The Pad String\n * @param {string} [padPosition='right'] The Pad Position\n * @returns {string}\n */\nfunction limit(str, limit, padString, padPosition) {\n if (limit === void 0) { limit = 16; }\n if (padString === void 0) { padString = '#'; }\n if (padPosition === void 0) { padPosition = 'right'; }\n // Input should be a string, limit should be a number\n if (typeof str !== 'string' || typeof limit !== 'number') {\n throw new Error('Invalid arguments specified');\n }\n // Pad position should be either left or right\n if (['left', 'right'].indexOf(padPosition) === -1) {\n throw new Error('Pad position should be either left or right');\n }\n // Pad string can be anything, we convert it to string\n if (typeof padString !== 'string') {\n padString = String(padString);\n }\n // Calculate string length considering astral code points\n var strLength = length(str);\n if (strLength > limit) {\n return substring(str, 0, limit);\n }\n else if (strLength < limit) {\n var padRepeats = padString.repeat(limit - strLength);\n return padPosition === 'left' ? padRepeats + str : str + padRepeats;\n }\n return str;\n}\nexports.limit = limit;\n/**\n * Returns the index of the first occurrence of a given string\n *\n * @export\n * @param {string} str\n * @param {string} [searchStr] the string to search\n * @param {number} [pos] starting position\n * @returns {number}\n */\nfunction indexOf(str, searchStr, pos) {\n if (pos === void 0) { pos = 0; }\n if (typeof str !== 'string') {\n throw new Error('Input must be a string');\n }\n if (str === '') {\n if (searchStr === '') {\n return 0;\n }\n return -1;\n }\n // fix type\n pos = Number(pos);\n pos = isNaN(pos) ? 0 : pos;\n searchStr = String(searchStr);\n var strArr = toArray(str);\n if (pos >= strArr.length) {\n if (searchStr === '') {\n return strArr.length;\n }\n return -1;\n }\n if (searchStr === '') {\n return pos;\n }\n var searchArr = toArray(searchStr);\n var finded = false;\n var index;\n for (index = pos; index < strArr.length; index += 1) {\n var searchIndex = 0;\n while (searchIndex < searchArr.length &&\n searchArr[searchIndex] === strArr[index + searchIndex]) {\n searchIndex += 1;\n }\n if (searchIndex === searchArr.length &&\n searchArr[searchIndex - 1] === strArr[index + searchIndex - 1]) {\n finded = true;\n break;\n }\n }\n return finded ? index : -1;\n}\nexports.indexOf = indexOf;\n","/**\n * Ensures that the given input is returned as an array.\n *\n * This function takes a value that might be a single item, an array, or `undefined` and returns it\n * as an array:\n *\n * - If the input is `undefined`, an empty array is returned.\n * - If the input is already an array, it is returned as-is.\n * - If the input is a single item, it is wrapped in an array.\n *\n * @typeParam T - The type of the elements in the array.\n * @param maybeArray - The value that may be a single item, an array, or `undefined`.\n * @returns An array containing the input value(s). If the input is `undefined`, an empty array is\n * returned.\n */\nexport default function ensureArray(maybeArray: T | T[] | undefined): T[] {\n if (!maybeArray) return [];\n\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n","import { LocalizeKey } from 'menus.model';\nimport {\n indexOf as stringzIndexOf,\n substring as stringzSubstring,\n length as stringzLength,\n toArray as stringzToArray,\n limit as stringzLimit,\n substr as stringzSubstr,\n} from 'stringz';\nimport ensureArray from './array-util';\n\n/**\n * This function mirrors the `at` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Finds the Unicode code point at the given index.\n *\n * @param string String to index\n * @param index Position of the character to be returned in range of -length(string) to\n * length(string)\n * @returns New string consisting of the Unicode code point located at the specified offset,\n * undefined if index is out of bounds\n */\nexport function at(string: string, index: number): string | undefined {\n if (index > stringLength(string) || index < -stringLength(string)) return undefined;\n return substr(string, index, 1);\n}\n\n/**\n * This function mirrors the `charAt` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a new string consisting of the single unicode code point at the given index.\n *\n * @param string String to index\n * @param index Position of the string character to be returned, in the range of 0 to\n * length(string)-1\n * @returns New string consisting of the Unicode code point located at the specified offset, empty\n * string if index is out of bounds\n */\nexport function charAt(string: string, index: number): string {\n if (index < 0 || index > stringLength(string) - 1) return '';\n return substr(string, index, 1);\n}\n\n/**\n * This function mirrors the `codePointAt` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a non-negative integer that is the Unicode code point value of the character starting at\n * the given index.\n *\n * @param string String to index\n * @param index Position of the string character to be returned, in the range of 0 to\n * length(string)-1\n * @returns Non-negative integer representing the code point value of the character at the given\n * index, or undefined if there is no element at that position\n */\nexport function codePointAt(string: string, index: number): number | undefined {\n if (index < 0 || index > stringLength(string) - 1) return undefined;\n return substr(string, index, 1).codePointAt(0);\n}\n\n/**\n * This function mirrors the `endsWith` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Determines whether a string ends with the characters of this string.\n *\n * @param string String to search through\n * @param searchString Characters to search for at the end of the string\n * @param endPosition End position where searchString is expected to be found. Default is\n * `length(string)`\n * @returns True if it ends with searchString, false if it does not\n */\nexport function endsWith(\n string: string,\n searchString: string,\n endPosition: number = stringLength(string),\n): boolean {\n const lastIndexOfSearchString = lastIndexOf(string, searchString);\n if (lastIndexOfSearchString === -1) return false;\n if (lastIndexOfSearchString + stringLength(searchString) !== endPosition) return false;\n return true;\n}\n\n/**\n * Get the index of the closest closing curly brace in a string.\n *\n * Note: when escaped, gets the index of the curly brace, not the backslash before it.\n *\n * @param str String to search\n * @param index Index at which to start searching. Inclusive of this index\n * @param escaped Whether to search for an escaped or an unescaped closing curly brace\n * @returns Index of closest closing curly brace or -1 if not found\n */\nfunction indexOfClosestClosingCurlyBrace(str: string, index: number, escaped: boolean) {\n if (index < 0) return -1;\n if (escaped) {\n if (charAt(str, index) === '}' && charAt(str, index - 1) === '\\\\') return index;\n const closeCurlyBraceIndex = indexOf(str, '\\\\}', index);\n return closeCurlyBraceIndex >= 0 ? closeCurlyBraceIndex + 1 : closeCurlyBraceIndex;\n }\n\n let i = index;\n const strLength = stringLength(str);\n while (i < strLength) {\n i = indexOf(str, '}', i);\n\n if (i === -1 || charAt(str, i - 1) !== '\\\\') break;\n\n // Didn't find an un-escaped close brace, so keep looking\n i += 1;\n }\n\n return i >= strLength ? -1 : i;\n}\n\n/**\n * Formats a string, replacing `{replacer key}` with the value in the `replacers` at that replacer\n * key (or multiple replacer values if there are multiple in the string). Will also remove \\ before\n * curly braces if curly braces are escaped with a backslash in order to preserve the curly braces.\n * E.g. 'Hi, this is {name}! I like `\\{curly braces\\}`! would become Hi, this is Jim! I like {curly\n * braces}!\n *\n * If the key in unescaped braces is not found, returns the key without the braces. Empty unescaped\n * curly braces will just return a string without the braces e.g. ('I am {Nemo}', { 'name': 'Jim'})\n * would return 'I am Nemo'.\n *\n * @example\n *\n * ```typescript\n * formatReplacementString(\n * 'Hi, this is {name}! I like \\{curly braces\\}! I have a {carColor} car. My favorite food is {food}.',\n * { name: 'Bill', carColor: 'blue' }\n * );\n *\n * =>\n *\n * 'Hi, this is Bill! I like {curly braces}! I have a blue car. My favorite food is food.'\n * ```\n *\n * @param str String to format\n * @param replacers Object whose keys are replacer keys and whose values are the values with which\n * to replace `{replacer key}`s found in the string to format. Will be coerced to strings using\n * `${replacerValue}`\n * @returns Formatted string\n */\nexport function formatReplacementString(\n str: string,\n replacers: { [key: string | number]: string | unknown } | object,\n): string {\n let updatedStr = str;\n\n let i = 0;\n while (i < stringLength(updatedStr)) {\n switch (charAt(updatedStr, i)) {\n case '{':\n if (charAt(updatedStr, i - 1) !== '\\\\') {\n // This character is an un-escaped open curly brace. Try to match and replace\n const closeCurlyBraceIndex = indexOfClosestClosingCurlyBrace(updatedStr, i, false);\n if (closeCurlyBraceIndex >= 0) {\n // We have matching open and close indices. Try to replace the contents\n const replacerKey = substring(updatedStr, i + 1, closeCurlyBraceIndex);\n // Replace with the replacer string or just remove the curly braces\n const replacerString =\n replacerKey in replacers\n ? // We're getting a value.toString() with any type from an object with any keys\n // here. TypeScript doesn't need to carefully and precisely track the exact type.\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n `${replacers[replacerKey as keyof typeof replacers]}`\n : replacerKey;\n\n updatedStr = `${substring(updatedStr, 0, i)}${replacerString}${substring(updatedStr, closeCurlyBraceIndex + 1)}`;\n // Put our index at the closing brace adjusted for the new string length minus two\n // because we are removing the curly braces\n // Ex: \"stuff {and} things\"\n // Replacer for and: n'\n // closeCurlyBraceIndex is 10\n // \"stuff n' things\"\n // i = 10 + 2 - 3 - 2 = 7\n i = closeCurlyBraceIndex + stringLength(replacerString) - stringLength(replacerKey) - 2;\n } else {\n // This is an unexpected un-escaped open curly brace with no matching closing curly\n // brace. Just ignore, I guess\n }\n } else {\n // This character is an escaped open curly brace. Remove the escape\n updatedStr = `${substring(updatedStr, 0, i - 1)}${substring(updatedStr, i)}`;\n // Adjust our index because we removed the escape\n i -= 1;\n }\n break;\n case '}':\n if (charAt(updatedStr, i - 1) !== '\\\\') {\n // This character is an un-escaped closing curly brace with no matching open curly\n // brace. Just ignore, I guess\n } else {\n // This character is an escaped closing curly brace. Remove the escape\n updatedStr = `${substring(updatedStr, 0, i - 1)}${substring(updatedStr, i)}`;\n // Adjust our index because we removed the escape\n i -= 1;\n }\n break;\n default:\n // No need to do anything with other characters at this point\n break;\n }\n\n i += 1;\n }\n\n return updatedStr;\n}\n/**\n * This function mirrors the `includes` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Performs a case-sensitive search to determine if searchString is found in string.\n *\n * @param string String to search through\n * @param searchString String to search for\n * @param position Position within the string to start searching for searchString. Default is `0`\n * @returns True if search string is found, false if it is not\n */\nexport function includes(string: string, searchString: string, position: number = 0): boolean {\n const partialString = substring(string, position);\n const indexOfSearchString = indexOf(partialString, searchString);\n if (indexOfSearchString === -1) return false;\n return true;\n}\n\n/**\n * This function mirrors the `indexOf` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns the index of the first occurrence of a given string.\n *\n * @param string String to search through\n * @param searchString The string to search for\n * @param position Start of searching. Default is `0`\n * @returns Index of the first occurrence of a given string\n */\nexport function indexOf(\n string: string,\n searchString: string,\n position: number | undefined = 0,\n): number {\n return stringzIndexOf(string, searchString, position);\n}\n\n/**\n * This function mirrors the `lastIndexOf` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Searches this string and returns the index of the last occurrence of the specified substring.\n *\n * @param string String to search through\n * @param searchString Substring to search for\n * @param position The index at which to begin searching. If omitted, the search begins at the end\n * of the string. Default is `undefined`\n * @returns Index of the last occurrence of searchString found, or -1 if not found.\n */\nexport function lastIndexOf(string: string, searchString: string, position?: number): number {\n let validatedPosition = position === undefined ? stringLength(string) : position;\n\n if (validatedPosition < 0) {\n validatedPosition = 0;\n } else if (validatedPosition >= stringLength(string)) {\n validatedPosition = stringLength(string) - 1;\n }\n\n for (let index = validatedPosition; index >= 0; index--) {\n if (substr(string, index, stringLength(searchString)) === searchString) {\n return index;\n }\n }\n\n return -1;\n}\n\n/**\n * This function mirrors the `length` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes. Since `length` appears to be a\n * reserved keyword, the function was renamed to `stringLength`\n *\n * Returns the length of a string.\n *\n * @param string String to return the length for\n * @returns Number that is length of the starting string\n */\nexport function stringLength(string: string): number {\n return stringzLength(string);\n}\n\n/**\n * This function mirrors the `normalize` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns the Unicode Normalization Form of this string.\n *\n * @param string The starting string\n * @param form Form specifying the Unicode Normalization Form. Default is `'NFC'`\n * @returns A string containing the Unicode Normalization Form of the given string.\n */\nexport function normalize(string: string, form: 'NFC' | 'NFD' | 'NFKC' | 'NFKD' | 'none'): string {\n const upperCaseForm = form.toUpperCase();\n if (upperCaseForm === 'NONE') {\n return string;\n }\n return string.normalize(upperCaseForm);\n}\n\n/**\n * Compares two strings using an ordinal comparison approach based on the specified collation\n * options. This function uses the built-in `localeCompare` method with the 'en' locale and the\n * provided collation options to compare the strings.\n *\n * @param string1 The first string to compare.\n * @param string2 The second string to compare.\n * @param options Optional. The collation options used for comparison.\n * @returns A number indicating the result of the comparison: - Negative value if string1 precedes\n * string2 in sorting order. - Zero if string1 and string2 are equivalent in sorting order. -\n * Positive value if string1 follows string2 in sorting order.\n */\nexport function ordinalCompare(\n string1: string,\n string2: string,\n options?: Intl.CollatorOptions,\n): number {\n return string1.localeCompare(string2, 'en', options);\n}\n\n/**\n * This function mirrors the `padEnd` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Pads this string with another string (multiple times, if needed) until the resulting string\n * reaches the given length. The padding is applied from the end of this string.\n *\n * @param string String to add padding too\n * @param targetLength The length of the resulting string once the starting string has been padded.\n * If value is less than or equal to length(string), then string is returned as is.\n * @param padString The string to pad the current string with. If padString is too long to stay\n * within targetLength, it will be truncated. Default is `\" \"`\n * @returns String with appropriate padding at the end\n */\n// Note: Limit with padString only works when length(padString) = 1, will be fixed with https://github.com/sallar/stringz/pull/59\nexport function padEnd(string: string, targetLength: number, padString: string = ' '): string {\n if (targetLength <= stringLength(string)) return string;\n return stringzLimit(string, targetLength, padString, 'right');\n}\n\n/**\n * This function mirrors the `padStart` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Pads this string with another string (multiple times, if needed) until the resulting string\n * reaches the given length. The padding is applied from the start of this string.\n *\n * @param string String to add padding too\n * @param targetLength The length of the resulting string once the starting string has been padded.\n * If value is less than or equal to length(string), then string is returned as is.\n * @param padString The string to pad the current string with. If padString is too long to stay\n * within the targetLength, it will be truncated from the end. Default is `\" \"`\n * @returns String with of specified targetLength with padString applied from the start\n */\n// Note: Limit with padString only works when length(padString) = 1, will be fixed with https://github.com/sallar/stringz/pull/59\nexport function padStart(string: string, targetLength: number, padString: string = ' '): string {\n if (targetLength <= stringLength(string)) return string;\n return stringzLimit(string, targetLength, padString, 'left');\n}\n\n// This is a helper function that performs a correction on the slice index to make sure it\n// cannot go out of bounds\nfunction correctSliceIndex(length: number, index: number) {\n if (index > length) return length;\n if (index < -length) return 0;\n if (index < 0) return index + length;\n return index;\n}\n\n/**\n * This function mirrors the `slice` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Extracts a section of this string and returns it as a new string, without modifying the original\n * string.\n *\n * @param string The starting string\n * @param indexStart The index of the first character to include in the returned substring.\n * @param indexEnd The index of the first character to exclude from the returned substring.\n * @returns A new string containing the extracted section of the string.\n */\nexport function slice(string: string, indexStart: number, indexEnd?: number): string {\n const length: number = stringLength(string);\n if (\n indexStart > length ||\n (indexEnd &&\n ((indexStart > indexEnd &&\n !(indexStart >= 0 && indexStart < length && indexEnd < 0 && indexEnd > -length)) ||\n indexEnd < -length))\n )\n return '';\n\n const newStart = correctSliceIndex(length, indexStart);\n const newEnd = indexEnd ? correctSliceIndex(length, indexEnd) : undefined;\n\n return substring(string, newStart, newEnd);\n}\n\n/**\n * This function mirrors the `split` function from the JavaScript Standard String object. It handles\n * Unicode code points instead of UTF-16 character codes.\n *\n * Takes a pattern and divides the string into an ordered list of substrings by searching for the\n * pattern, puts these substrings into an array, and returns the array.\n *\n * @param string The string to split\n * @param separator The pattern describing where each split should occur\n * @param splitLimit Limit on the number of substrings to be included in the array. Splits the\n * string at each occurrence of specified separator, but stops when limit entries have been placed\n * in the array.\n * @returns An array of strings, split at each point where separator occurs in the starting string.\n * Returns undefined if separator is not found in string.\n */\nexport function split(string: string, separator: string | RegExp, splitLimit?: number): string[] {\n const result: string[] = [];\n\n if (splitLimit !== undefined && splitLimit <= 0) {\n return [string];\n }\n\n if (separator === '') return toArray(string).slice(0, splitLimit);\n\n let regexSeparator = separator;\n if (\n typeof separator === 'string' ||\n (separator instanceof RegExp && !includes(separator.flags, 'g'))\n ) {\n regexSeparator = new RegExp(separator, 'g');\n }\n\n const matches: RegExpMatchArray | null = string.match(regexSeparator);\n\n let currentIndex = 0;\n\n if (!matches) return [string];\n\n for (let index = 0; index < (splitLimit ? splitLimit - 1 : matches.length); index++) {\n const matchIndex = indexOf(string, matches[index], currentIndex);\n const matchLength = stringLength(matches[index]);\n\n result.push(substring(string, currentIndex, matchIndex));\n currentIndex = matchIndex + matchLength;\n\n if (splitLimit !== undefined && result.length === splitLimit) {\n break;\n }\n }\n\n result.push(substring(string, currentIndex));\n\n return result;\n}\n\n/**\n * This function mirrors the `startsWith` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Determines whether the string begins with the characters of a specified string, returning true or\n * false as appropriate.\n *\n * @param string String to search through\n * @param searchString The characters to be searched for at the start of this string.\n * @param position The start position at which searchString is expected to be found (the index of\n * searchString's first character). Default is `0`\n * @returns True if the given characters are found at the beginning of the string, including when\n * searchString is an empty string; otherwise, false.\n */\nexport function startsWith(string: string, searchString: string, position: number = 0): boolean {\n const indexOfSearchString = indexOf(string, searchString, position);\n if (indexOfSearchString !== position) return false;\n return true;\n}\n\n/**\n * This function mirrors the `substr` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a substring by providing start and length. This function is not exported because it is\n * considered deprecated, however it is still useful as a local helper function.\n *\n * @param string String to be divided\n * @param begin Start position. Default is `Start of string`\n * @param len Length of result. Default is `String length minus start parameter`. Default is `String\n * length minus start parameter`\n * @returns Substring from starting string\n */\nfunction substr(\n string: string,\n begin: number = 0,\n len: number = stringLength(string) - begin,\n): string {\n return stringzSubstr(string, begin, len);\n}\n\n/**\n * This function mirrors the `substring` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Returns a substring by providing start and end position.\n *\n * @param string String to be divided\n * @param begin Start position\n * @param end End position. Default is `End of string`\n * @returns Substring from starting string\n */\nexport function substring(\n string: string,\n begin: number,\n end: number = stringLength(string),\n): string {\n return stringzSubstring(string, begin, end);\n}\n\n/**\n * This function mirrors the `toArray` function from the JavaScript Standard String object. It\n * handles Unicode code points instead of UTF-16 character codes.\n *\n * Converts a string to an array of string characters.\n *\n * @param string String to convert to array\n * @returns An array of characters from the starting string\n */\nexport function toArray(string: string): string[] {\n return stringzToArray(string);\n}\n\n/** Determine whether the string is a `LocalizeKey` meant to be localized in Platform.Bible. */\nexport function isLocalizeKey(str: string): str is LocalizeKey {\n return startsWith(str, '%') && endsWith(str, '%');\n}\n\n/**\n * Escape RegExp special characters.\n *\n * You can also use this to escape a string that is inserted into the middle of a regex, for\n * example, into a character class.\n *\n * All credit to [`escape-string-regexp`](https://www.npmjs.com/package/escape-string-regexp) - this\n * function is simply copied directly from there to allow a common js export\n *\n * @example\n *\n * import escapeStringRegexp from 'platform-bible-utils';\n *\n * const escapedString = escapeStringRegexp('How much $ for a 🦄?');\n * //=> 'How much \\\\$ for a 🦄\\\\?'\n *\n * new RegExp(escapedString);\n */\nexport function escapeStringRegexp(string: string): string {\n if (typeof string !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n // Escape characters with special meaning either inside or outside character sets.\n // Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n return string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d');\n}\n\n/**\n * Transforms a string or an array of strings into an array of regular expressions, ensuring that\n * the result is always an array.\n *\n * This function accepts a value that may be a single string, an array of strings, or `undefined`.\n * It then:\n *\n * - Converts each string into a `RegExp` object.\n * - If the input is an array containing nested arrays, it converts each string in the nested arrays\n * into `RegExp` objects.\n * - Ensures that the result is always an array of `RegExp` objects or arrays of `RegExp` objects.\n *\n * @param stringStringMaybeArray - The value to be transformed, which can be a single string, an\n * array of strings or arrays of strings, or `undefined`.\n * @returns An array of `RegExp` objects or arrays of `RegExp` objects. If the input is `undefined`,\n * an empty array is returned.\n */\nexport function transformAndEnsureRegExpRegExpArray(\n stringStringMaybeArray: string | (string | string[])[] | undefined,\n): (RegExp | RegExp[])[] {\n if (!stringStringMaybeArray) return [];\n\n const stringStringArray = ensureArray(stringStringMaybeArray);\n\n const regExpRegExpArray = stringStringArray.map((stringMaybeStringArray: string | string[]) =>\n Array.isArray(stringMaybeStringArray)\n ? stringMaybeStringArray.map((str) => new RegExp(str))\n : new RegExp(stringMaybeStringArray),\n );\n\n return regExpRegExpArray;\n}\n\n/**\n * Transforms a string or an array of strings into an array of regular expressions.\n *\n * This function accepts a value that may be a single string, an array of strings, or `undefined`.\n * It then:\n *\n * - Converts each string into a `RegExp` object.\n * - Ensures that the result is always an array of `RegExp` objects.\n *\n * @param stringMaybeArray - The value to be transformed, which can be a single string, an array of\n * strings, or `undefined`.\n * @returns An array of `RegExp` objects. If the input is `undefined`, an empty array is returned.\n */\nexport function transformAndEnsureRegExpArray(\n stringMaybeArray: string | string[] | undefined,\n): RegExp[] {\n if (!stringMaybeArray) return [];\n\n const stringArray = ensureArray(stringMaybeArray);\n\n const regExpArray = stringArray.map((str: string) => new RegExp(str));\n\n return regExpArray;\n}\n\n/** This is an internal-only export for testing purposes and should not be used in development */\nexport const testingStringUtils = {\n indexOfClosestClosingCurlyBrace,\n};\n","import { Canon, VerseRef } from '@sillsdev/scripture';\nimport { BookInfo, ScriptureReference } from './scripture.model';\nimport { split, startsWith } from './string-util';\n\nconst scrBookData: BookInfo[] = [\n { shortName: 'ERR', fullNames: ['ERROR'], chapters: -1 },\n { shortName: 'GEN', fullNames: ['Genesis'], chapters: 50 },\n { shortName: 'EXO', fullNames: ['Exodus'], chapters: 40 },\n { shortName: 'LEV', fullNames: ['Leviticus'], chapters: 27 },\n { shortName: 'NUM', fullNames: ['Numbers'], chapters: 36 },\n { shortName: 'DEU', fullNames: ['Deuteronomy'], chapters: 34 },\n { shortName: 'JOS', fullNames: ['Joshua'], chapters: 24 },\n { shortName: 'JDG', fullNames: ['Judges'], chapters: 21 },\n { shortName: 'RUT', fullNames: ['Ruth'], chapters: 4 },\n { shortName: '1SA', fullNames: ['1 Samuel'], chapters: 31 },\n { shortName: '2SA', fullNames: ['2 Samuel'], chapters: 24 },\n { shortName: '1KI', fullNames: ['1 Kings'], chapters: 22 },\n { shortName: '2KI', fullNames: ['2 Kings'], chapters: 25 },\n { shortName: '1CH', fullNames: ['1 Chronicles'], chapters: 29 },\n { shortName: '2CH', fullNames: ['2 Chronicles'], chapters: 36 },\n { shortName: 'EZR', fullNames: ['Ezra'], chapters: 10 },\n { shortName: 'NEH', fullNames: ['Nehemiah'], chapters: 13 },\n { shortName: 'EST', fullNames: ['Esther'], chapters: 10 },\n { shortName: 'JOB', fullNames: ['Job'], chapters: 42 },\n { shortName: 'PSA', fullNames: ['Psalm', 'Psalms'], chapters: 150 },\n { shortName: 'PRO', fullNames: ['Proverbs'], chapters: 31 },\n { shortName: 'ECC', fullNames: ['Ecclesiastes'], chapters: 12 },\n { shortName: 'SNG', fullNames: ['Song of Solomon', 'Song of Songs'], chapters: 8 },\n { shortName: 'ISA', fullNames: ['Isaiah'], chapters: 66 },\n { shortName: 'JER', fullNames: ['Jeremiah'], chapters: 52 },\n { shortName: 'LAM', fullNames: ['Lamentations'], chapters: 5 },\n { shortName: 'EZK', fullNames: ['Ezekiel'], chapters: 48 },\n { shortName: 'DAN', fullNames: ['Daniel'], chapters: 12 },\n { shortName: 'HOS', fullNames: ['Hosea'], chapters: 14 },\n { shortName: 'JOL', fullNames: ['Joel'], chapters: 3 },\n { shortName: 'AMO', fullNames: ['Amos'], chapters: 9 },\n { shortName: 'OBA', fullNames: ['Obadiah'], chapters: 1 },\n { shortName: 'JON', fullNames: ['Jonah'], chapters: 4 },\n { shortName: 'MIC', fullNames: ['Micah'], chapters: 7 },\n { shortName: 'NAM', fullNames: ['Nahum'], chapters: 3 },\n { shortName: 'HAB', fullNames: ['Habakkuk'], chapters: 3 },\n { shortName: 'ZEP', fullNames: ['Zephaniah'], chapters: 3 },\n { shortName: 'HAG', fullNames: ['Haggai'], chapters: 2 },\n { shortName: 'ZEC', fullNames: ['Zechariah'], chapters: 14 },\n { shortName: 'MAL', fullNames: ['Malachi'], chapters: 4 },\n { shortName: 'MAT', fullNames: ['Matthew'], chapters: 28 },\n { shortName: 'MRK', fullNames: ['Mark'], chapters: 16 },\n { shortName: 'LUK', fullNames: ['Luke'], chapters: 24 },\n { shortName: 'JHN', fullNames: ['John'], chapters: 21 },\n { shortName: 'ACT', fullNames: ['Acts'], chapters: 28 },\n { shortName: 'ROM', fullNames: ['Romans'], chapters: 16 },\n { shortName: '1CO', fullNames: ['1 Corinthians'], chapters: 16 },\n { shortName: '2CO', fullNames: ['2 Corinthians'], chapters: 13 },\n { shortName: 'GAL', fullNames: ['Galatians'], chapters: 6 },\n { shortName: 'EPH', fullNames: ['Ephesians'], chapters: 6 },\n { shortName: 'PHP', fullNames: ['Philippians'], chapters: 4 },\n { shortName: 'COL', fullNames: ['Colossians'], chapters: 4 },\n { shortName: '1TH', fullNames: ['1 Thessalonians'], chapters: 5 },\n { shortName: '2TH', fullNames: ['2 Thessalonians'], chapters: 3 },\n { shortName: '1TI', fullNames: ['1 Timothy'], chapters: 6 },\n { shortName: '2TI', fullNames: ['2 Timothy'], chapters: 4 },\n { shortName: 'TIT', fullNames: ['Titus'], chapters: 3 },\n { shortName: 'PHM', fullNames: ['Philemon'], chapters: 1 },\n { shortName: 'HEB', fullNames: ['Hebrews'], chapters: 13 },\n { shortName: 'JAS', fullNames: ['James'], chapters: 5 },\n { shortName: '1PE', fullNames: ['1 Peter'], chapters: 5 },\n { shortName: '2PE', fullNames: ['2 Peter'], chapters: 3 },\n { shortName: '1JN', fullNames: ['1 John'], chapters: 5 },\n { shortName: '2JN', fullNames: ['2 John'], chapters: 1 },\n { shortName: '3JN', fullNames: ['3 John'], chapters: 1 },\n { shortName: 'JUD', fullNames: ['Jude'], chapters: 1 },\n { shortName: 'REV', fullNames: ['Revelation'], chapters: 22 },\n];\n\nexport const FIRST_SCR_BOOK_NUM = 1;\nexport const LAST_SCR_BOOK_NUM = scrBookData.length - 1;\nexport const FIRST_SCR_CHAPTER_NUM = 1;\nexport const FIRST_SCR_VERSE_NUM = 1;\n\nexport const getChaptersForBook = (bookNum: number): number => {\n return scrBookData[bookNum]?.chapters ?? -1;\n};\n\nexport const offsetBook = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n bookNum: Math.max(FIRST_SCR_BOOK_NUM, Math.min(scrRef.bookNum + offset, LAST_SCR_BOOK_NUM)),\n chapterNum: 1,\n verseNum: 1,\n});\n\nexport const offsetChapter = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n ...scrRef,\n chapterNum: Math.min(\n Math.max(FIRST_SCR_CHAPTER_NUM, scrRef.chapterNum + offset),\n getChaptersForBook(scrRef.bookNum),\n ),\n verseNum: 1,\n});\n\nexport const offsetVerse = (scrRef: ScriptureReference, offset: number): ScriptureReference => ({\n ...scrRef,\n verseNum: Math.max(FIRST_SCR_VERSE_NUM, scrRef.verseNum + offset),\n});\n\n/**\n * https://github.com/ubsicap/Paratext/blob/master/ParatextData/SILScriptureExtensions.cs#L72\n *\n * Convert book number to a localized Id (a short description of the book). This should be used\n * whenever a book ID (short code) is shown to the user. It is primarily needed for people who do\n * not read Roman script well and need to have books identified in a alternate script (e.g. Chinese\n * or Russian)\n *\n * @param bookNumber\n * @param localizationLanguage In BCP 47 format\n * @param getLocalizedString Function that provides the localized versions of the book ids and names\n * asynchronously.\n * @returns\n */\nexport async function getLocalizedIdFromBookNumber(\n bookNumber: number,\n localizationLanguage: string,\n getLocalizedString: (item: {\n localizeKey: string;\n languagesToSearch?: string[];\n }) => Promise,\n) {\n const id = Canon.bookNumberToId(bookNumber);\n\n if (!startsWith(Intl.getCanonicalLocales(localizationLanguage)[0], 'zh'))\n return getLocalizedString({\n localizeKey: `LocalizedId.${id}`,\n languagesToSearch: [localizationLanguage],\n });\n\n // For Chinese the normal book name is already fairly short.\n const bookName = await getLocalizedString({\n localizeKey: `Book.${id}`,\n languagesToSearch: [localizationLanguage],\n });\n const parts = split(bookName, '-');\n // some entries had a second name inside ideographic parenthesis\n const parts2 = split(parts[0], '\\xff08');\n const retVal = parts2[0].trim();\n return retVal;\n}\n\n/**\n * Get the Scripture reference as an easily comparable/sortable integer.\n *\n * @param scrRef The Scripture reference.\n * @returns An integer where the first three digits represent the book, the next three represent the\n * chapter and the last three represent the verse.\n */\nexport function scrRefToBBBCCCVVV(scrRef: ScriptureReference): number {\n return new VerseRef(scrRef.bookNum, scrRef.chapterNum, scrRef.verseNum).BBBCCCVVV;\n}\n\n/**\n * Compares two Scripture references canonically.\n *\n * @param scrRef1 The first Scripture reference to compare.\n * @param scrRef2 The second Scripture reference to compare.\n * @returns A number indicating the result of the comparison: - Negative value if scrRef1 precedes\n * scrRef2 in sorting order. - Zero if scrRef1 and scrRef2 are equivalent in sorting order. -\n * Positive value if scrRef1 follows scrRef2 in sorting order.\n */\nexport function compareScrRefs(scrRef1: ScriptureReference, scrRef2: ScriptureReference): number {\n // TODO: consider edge cases for invalid references (current implementation should suffice for\n // all but the most extreme cases)\n return scrRefToBBBCCCVVV(scrRef1) - scrRefToBBBCCCVVV(scrRef2);\n}\n\n/**\n * Formats a Scripture reference.\n *\n * @param scrRef The Scripture reference to format.\n * @param optionOrLocalizedBookName Either 'id' (the default) to format using the \"standard\" (as\n * defined by SIL/UBS) 3-letter book ID, 'English' to format using the English book name spelled\n * out, or some other string (e.g., a localized book name, vernacular abbreviation, FCBH book id,\n * etc.) to use.\n * @param chapterVerseSeparator The character used to separate the chapter number from the verse\n * number. Default is a colon (:). Note: More than one character is allowed.\n * @param bookChapterSeparator The character used to separate the book from the chapter number.\n * Default is a single space. Note: More than one character is allowed.\n * @returns The formatted reference.\n */\nexport function formatScrRef(\n scrRef: ScriptureReference,\n optionOrLocalizedBookName?: 'id' | 'English' | string,\n chapterVerseSeparator?: string,\n bookChapterSeparator?: string,\n): string {\n let book: string;\n switch (optionOrLocalizedBookName ?? 'id') {\n case 'English':\n book = Canon.bookNumberToEnglishName(scrRef.bookNum);\n break;\n case 'id':\n book = Canon.bookNumberToId(scrRef.bookNum);\n break;\n default:\n // We already dealt with undefined about in the switch, but TS is getting confused.\n book = optionOrLocalizedBookName ?? '';\n break;\n }\n return `${book}${bookChapterSeparator ?? ' '}${scrRef.chapterNum}${chapterVerseSeparator ?? ':'}${scrRef.verseNum}`;\n}\n","/** Function to run to dispose of something. Returns true if successfully unsubscribed */\nexport type Unsubscriber = () => boolean;\n\n/**\n * Returns an Unsubscriber function that combines all the unsubscribers passed in.\n *\n * @param unsubscribers All unsubscribers to aggregate into one unsubscriber\n * @returns Function that unsubscribes from all passed in unsubscribers when run\n */\nexport const aggregateUnsubscribers = (unsubscribers: Unsubscriber[]): Unsubscriber => {\n return (...args) => {\n // Run the unsubscriber for each handler\n const unsubs = unsubscribers.map((unsubscriber) => unsubscriber(...args));\n\n // If all the unsubscribers resolve to truthiness, we succeed\n return unsubs.every((success) => success);\n };\n};\n\n/**\n * Function to run to dispose of something that runs asynchronously. The promise resolves to true if\n * successfully unsubscribed\n */\nexport type UnsubscriberAsync = () => Promise;\n\n/**\n * Returns an UnsubscriberAsync function that combines all the unsubscribers passed in.\n *\n * @param unsubscribers - All unsubscribers to aggregate into one unsubscriber.\n * @returns Function that unsubscribes from all passed in unsubscribers when run\n */\nexport const aggregateUnsubscriberAsyncs = (\n unsubscribers: (UnsubscriberAsync | Unsubscriber)[],\n): UnsubscriberAsync => {\n return async (...args) => {\n // Run the unsubscriber for each handler\n const unsubPromises = unsubscribers.map(async (unsubscriber) => unsubscriber(...args));\n\n // If all the unsubscribers resolve to truthiness, we succeed\n return (await Promise.all(unsubPromises)).every((success) => success);\n };\n};\n","var getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * Combine two comparators into a single comparators.\n */\nfunction combineComparators(comparatorA, comparatorB) {\n return function isEqual(a, b, state) {\n return comparatorA(a, b, state) && comparatorB(a, b, state);\n };\n}\n/**\n * Wrap the provided `areItemsEqual` method to manage the circular state, allowing\n * for circular references to be safely included in the comparison without creating\n * stack overflows.\n */\nfunction createIsCircular(areItemsEqual) {\n return function isCircular(a, b, state) {\n if (!a || !b || typeof a !== 'object' || typeof b !== 'object') {\n return areItemsEqual(a, b, state);\n }\n var cache = state.cache;\n var cachedA = cache.get(a);\n var cachedB = cache.get(b);\n if (cachedA && cachedB) {\n return cachedA === b && cachedB === a;\n }\n cache.set(a, b);\n cache.set(b, a);\n var result = areItemsEqual(a, b, state);\n cache.delete(a);\n cache.delete(b);\n return result;\n };\n}\n/**\n * Get the properties to strictly examine, which include both own properties that are\n * not enumerable and symbol properties.\n */\nfunction getStrictProperties(object) {\n return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));\n}\n/**\n * Whether the object contains the property passed as an own property.\n */\nvar hasOwn = Object.hasOwn ||\n (function (object, property) {\n return hasOwnProperty.call(object, property);\n });\n/**\n * Whether the values passed are strictly equal or both NaN.\n */\nfunction sameValueZeroEqual(a, b) {\n return a || b ? a === b : a === b || (a !== a && b !== b);\n}\n\nvar OWNER = '_owner';\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, keys = Object.keys;\n/**\n * Whether the arrays are equal in value.\n */\nfunction areArraysEqual(a, b, state) {\n var index = a.length;\n if (b.length !== index) {\n return false;\n }\n while (index-- > 0) {\n if (!state.equals(a[index], b[index], index, index, a, b, state)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the dates passed are equal in value.\n */\nfunction areDatesEqual(a, b) {\n return sameValueZeroEqual(a.getTime(), b.getTime());\n}\n/**\n * Whether the `Map`s are equal in value.\n */\nfunction areMapsEqual(a, b, state) {\n if (a.size !== b.size) {\n return false;\n }\n var matchedIndices = {};\n var aIterable = a.entries();\n var index = 0;\n var aResult;\n var bResult;\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n var bIterable = b.entries();\n var hasMatch = false;\n var matchIndex = 0;\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n var _a = aResult.value, aKey = _a[0], aValue = _a[1];\n var _b = bResult.value, bKey = _b[0], bValue = _b[1];\n if (!hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch =\n state.equals(aKey, bKey, index, matchIndex, a, b, state) &&\n state.equals(aValue, bValue, aKey, bKey, a, b, state))) {\n matchedIndices[matchIndex] = true;\n }\n matchIndex++;\n }\n if (!hasMatch) {\n return false;\n }\n index++;\n }\n return true;\n}\n/**\n * Whether the objects are equal in value.\n */\nfunction areObjectsEqual(a, b, state) {\n var properties = keys(a);\n var index = properties.length;\n if (keys(b).length !== index) {\n return false;\n }\n var property;\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index];\n if (property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof) {\n return false;\n }\n if (!hasOwn(b, property) ||\n !state.equals(a[property], b[property], property, property, a, b, state)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the objects are equal in value with strict property checking.\n */\nfunction areObjectsEqualStrict(a, b, state) {\n var properties = getStrictProperties(a);\n var index = properties.length;\n if (getStrictProperties(b).length !== index) {\n return false;\n }\n var property;\n var descriptorA;\n var descriptorB;\n // Decrementing `while` showed faster results than either incrementing or\n // decrementing `for` loop and than an incrementing `while` loop. Declarative\n // methods like `some` / `every` were not used to avoid incurring the garbage\n // cost of anonymous callbacks.\n while (index-- > 0) {\n property = properties[index];\n if (property === OWNER &&\n (a.$$typeof || b.$$typeof) &&\n a.$$typeof !== b.$$typeof) {\n return false;\n }\n if (!hasOwn(b, property)) {\n return false;\n }\n if (!state.equals(a[property], b[property], property, property, a, b, state)) {\n return false;\n }\n descriptorA = getOwnPropertyDescriptor(a, property);\n descriptorB = getOwnPropertyDescriptor(b, property);\n if ((descriptorA || descriptorB) &&\n (!descriptorA ||\n !descriptorB ||\n descriptorA.configurable !== descriptorB.configurable ||\n descriptorA.enumerable !== descriptorB.enumerable ||\n descriptorA.writable !== descriptorB.writable)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the primitive wrappers passed are equal in value.\n */\nfunction arePrimitiveWrappersEqual(a, b) {\n return sameValueZeroEqual(a.valueOf(), b.valueOf());\n}\n/**\n * Whether the regexps passed are equal in value.\n */\nfunction areRegExpsEqual(a, b) {\n return a.source === b.source && a.flags === b.flags;\n}\n/**\n * Whether the `Set`s are equal in value.\n */\nfunction areSetsEqual(a, b, state) {\n if (a.size !== b.size) {\n return false;\n }\n var matchedIndices = {};\n var aIterable = a.values();\n var aResult;\n var bResult;\n while ((aResult = aIterable.next())) {\n if (aResult.done) {\n break;\n }\n var bIterable = b.values();\n var hasMatch = false;\n var matchIndex = 0;\n while ((bResult = bIterable.next())) {\n if (bResult.done) {\n break;\n }\n if (!hasMatch &&\n !matchedIndices[matchIndex] &&\n (hasMatch = state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state))) {\n matchedIndices[matchIndex] = true;\n }\n matchIndex++;\n }\n if (!hasMatch) {\n return false;\n }\n }\n return true;\n}\n/**\n * Whether the TypedArray instances are equal in value.\n */\nfunction areTypedArraysEqual(a, b) {\n var index = a.length;\n if (b.length !== index) {\n return false;\n }\n while (index-- > 0) {\n if (a[index] !== b[index]) {\n return false;\n }\n }\n return true;\n}\n\nvar ARGUMENTS_TAG = '[object Arguments]';\nvar BOOLEAN_TAG = '[object Boolean]';\nvar DATE_TAG = '[object Date]';\nvar MAP_TAG = '[object Map]';\nvar NUMBER_TAG = '[object Number]';\nvar OBJECT_TAG = '[object Object]';\nvar REG_EXP_TAG = '[object RegExp]';\nvar SET_TAG = '[object Set]';\nvar STRING_TAG = '[object String]';\nvar isArray = Array.isArray;\nvar isTypedArray = typeof ArrayBuffer === 'function' && ArrayBuffer.isView\n ? ArrayBuffer.isView\n : null;\nvar assign = Object.assign;\nvar getTag = Object.prototype.toString.call.bind(Object.prototype.toString);\n/**\n * Create a comparator method based on the type-specific equality comparators passed.\n */\nfunction createEqualityComparator(_a) {\n var areArraysEqual = _a.areArraysEqual, areDatesEqual = _a.areDatesEqual, areMapsEqual = _a.areMapsEqual, areObjectsEqual = _a.areObjectsEqual, arePrimitiveWrappersEqual = _a.arePrimitiveWrappersEqual, areRegExpsEqual = _a.areRegExpsEqual, areSetsEqual = _a.areSetsEqual, areTypedArraysEqual = _a.areTypedArraysEqual;\n /**\n * compare the value of the two objects and return true if they are equivalent in values\n */\n return function comparator(a, b, state) {\n // If the items are strictly equal, no need to do a value comparison.\n if (a === b) {\n return true;\n }\n // If the items are not non-nullish objects, then the only possibility\n // of them being equal but not strictly is if they are both `NaN`. Since\n // `NaN` is uniquely not equal to itself, we can use self-comparison of\n // both objects, which is faster than `isNaN()`.\n if (a == null ||\n b == null ||\n typeof a !== 'object' ||\n typeof b !== 'object') {\n return a !== a && b !== b;\n }\n var constructor = a.constructor;\n // Checks are listed in order of commonality of use-case:\n // 1. Common complex object types (plain object, array)\n // 2. Common data values (date, regexp)\n // 3. Less-common complex object types (map, set)\n // 4. Less-common data values (promise, primitive wrappers)\n // Inherently this is both subjective and assumptive, however\n // when reviewing comparable libraries in the wild this order\n // appears to be generally consistent.\n // Constructors should match, otherwise there is potential for false positives\n // between class and subclass or custom object and POJO.\n if (constructor !== b.constructor) {\n return false;\n }\n // `isPlainObject` only checks against the object's own realm. Cross-realm\n // comparisons are rare, and will be handled in the ultimate fallback, so\n // we can avoid capturing the string tag.\n if (constructor === Object) {\n return areObjectsEqual(a, b, state);\n }\n // `isArray()` works on subclasses and is cross-realm, so we can avoid capturing\n // the string tag or doing an `instanceof` check.\n if (isArray(a)) {\n return areArraysEqual(a, b, state);\n }\n // `isTypedArray()` works on all possible TypedArray classes, so we can avoid\n // capturing the string tag or comparing against all possible constructors.\n if (isTypedArray != null && isTypedArray(a)) {\n return areTypedArraysEqual(a, b, state);\n }\n // Try to fast-path equality checks for other complex object types in the\n // same realm to avoid capturing the string tag. Strict equality is used\n // instead of `instanceof` because it is more performant for the common\n // use-case. If someone is subclassing a native class, it will be handled\n // with the string tag comparison.\n if (constructor === Date) {\n return areDatesEqual(a, b, state);\n }\n if (constructor === RegExp) {\n return areRegExpsEqual(a, b, state);\n }\n if (constructor === Map) {\n return areMapsEqual(a, b, state);\n }\n if (constructor === Set) {\n return areSetsEqual(a, b, state);\n }\n // Since this is a custom object, capture the string tag to determing its type.\n // This is reasonably performant in modern environments like v8 and SpiderMonkey.\n var tag = getTag(a);\n if (tag === DATE_TAG) {\n return areDatesEqual(a, b, state);\n }\n if (tag === REG_EXP_TAG) {\n return areRegExpsEqual(a, b, state);\n }\n if (tag === MAP_TAG) {\n return areMapsEqual(a, b, state);\n }\n if (tag === SET_TAG) {\n return areSetsEqual(a, b, state);\n }\n if (tag === OBJECT_TAG) {\n // The exception for value comparison is custom `Promise`-like class instances. These should\n // be treated the same as standard `Promise` objects, which means strict equality, and if\n // it reaches this point then that strict equality comparison has already failed.\n return (typeof a.then !== 'function' &&\n typeof b.then !== 'function' &&\n areObjectsEqual(a, b, state));\n }\n // If an arguments tag, it should be treated as a standard object.\n if (tag === ARGUMENTS_TAG) {\n return areObjectsEqual(a, b, state);\n }\n // As the penultimate fallback, check if the values passed are primitive wrappers. This\n // is very rare in modern JS, which is why it is deprioritized compared to all other object\n // types.\n if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {\n return arePrimitiveWrappersEqual(a, b, state);\n }\n // If not matching any tags that require a specific type of comparison, then we hard-code false because\n // the only thing remaining is strict equality, which has already been compared. This is for a few reasons:\n // - Certain types that cannot be introspected (e.g., `WeakMap`). For these types, this is the only\n // comparison that can be made.\n // - For types that can be introspected, but rarely have requirements to be compared\n // (`ArrayBuffer`, `DataView`, etc.), the cost is avoided to prioritize the common\n // use-cases (may be included in a future release, if requested enough).\n // - For types that can be introspected but do not have an objective definition of what\n // equality is (`Error`, etc.), the subjective decision is to be conservative and strictly compare.\n // In all cases, these decisions should be reevaluated based on changes to the language and\n // common development practices.\n return false;\n };\n}\n/**\n * Create the configuration object used for building comparators.\n */\nfunction createEqualityComparatorConfig(_a) {\n var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;\n var config = {\n areArraysEqual: strict\n ? areObjectsEqualStrict\n : areArraysEqual,\n areDatesEqual: areDatesEqual,\n areMapsEqual: strict\n ? combineComparators(areMapsEqual, areObjectsEqualStrict)\n : areMapsEqual,\n areObjectsEqual: strict\n ? areObjectsEqualStrict\n : areObjectsEqual,\n arePrimitiveWrappersEqual: arePrimitiveWrappersEqual,\n areRegExpsEqual: areRegExpsEqual,\n areSetsEqual: strict\n ? combineComparators(areSetsEqual, areObjectsEqualStrict)\n : areSetsEqual,\n areTypedArraysEqual: strict\n ? areObjectsEqualStrict\n : areTypedArraysEqual,\n };\n if (createCustomConfig) {\n config = assign({}, config, createCustomConfig(config));\n }\n if (circular) {\n var areArraysEqual$1 = createIsCircular(config.areArraysEqual);\n var areMapsEqual$1 = createIsCircular(config.areMapsEqual);\n var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);\n var areSetsEqual$1 = createIsCircular(config.areSetsEqual);\n config = assign({}, config, {\n areArraysEqual: areArraysEqual$1,\n areMapsEqual: areMapsEqual$1,\n areObjectsEqual: areObjectsEqual$1,\n areSetsEqual: areSetsEqual$1,\n });\n }\n return config;\n}\n/**\n * Default equality comparator pass-through, used as the standard `isEqual` creator for\n * use inside the built comparator.\n */\nfunction createInternalEqualityComparator(compare) {\n return function (a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {\n return compare(a, b, state);\n };\n}\n/**\n * Create the `isEqual` function used by the consuming application.\n */\nfunction createIsEqual(_a) {\n var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;\n if (createState) {\n return function isEqual(a, b) {\n var _a = createState(), _b = _a.cache, cache = _b === void 0 ? circular ? new WeakMap() : undefined : _b, meta = _a.meta;\n return comparator(a, b, {\n cache: cache,\n equals: equals,\n meta: meta,\n strict: strict,\n });\n };\n }\n if (circular) {\n return function isEqual(a, b) {\n return comparator(a, b, {\n cache: new WeakMap(),\n equals: equals,\n meta: undefined,\n strict: strict,\n });\n };\n }\n var state = {\n cache: undefined,\n equals: equals,\n meta: undefined,\n strict: strict,\n };\n return function isEqual(a, b) {\n return comparator(a, b, state);\n };\n}\n\n/**\n * Whether the items passed are deeply-equal in value.\n */\nvar deepEqual = createCustomEqual();\n/**\n * Whether the items passed are deeply-equal in value based on strict comparison.\n */\nvar strictDeepEqual = createCustomEqual({ strict: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references.\n */\nvar circularDeepEqual = createCustomEqual({ circular: true });\n/**\n * Whether the items passed are deeply-equal in value, including circular references,\n * based on strict comparison.\n */\nvar strictCircularDeepEqual = createCustomEqual({\n circular: true,\n strict: true,\n});\n/**\n * Whether the items passed are shallowly-equal in value.\n */\nvar shallowEqual = createCustomEqual({\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value based on strict comparison\n */\nvar strictShallowEqual = createCustomEqual({\n strict: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references.\n */\nvar circularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n});\n/**\n * Whether the items passed are shallowly-equal in value, including circular references,\n * based on strict comparison.\n */\nvar strictCircularShallowEqual = createCustomEqual({\n circular: true,\n createInternalComparator: function () { return sameValueZeroEqual; },\n strict: true,\n});\n/**\n * Create a custom equality comparison method.\n *\n * This can be done to create very targeted comparisons in extreme hot-path scenarios\n * where the standard methods are not performant enough, but can also be used to provide\n * support for legacy environments that do not support expected features like\n * `RegExp.prototype.flags` out of the box.\n */\nfunction createCustomEqual(options) {\n if (options === void 0) { options = {}; }\n var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b;\n var config = createEqualityComparatorConfig(options);\n var comparator = createEqualityComparator(config);\n var equals = createCustomInternalComparator\n ? createCustomInternalComparator(comparator)\n : createInternalEqualityComparator(comparator);\n return createIsEqual({ circular: circular, comparator: comparator, createState: createState, equals: equals, strict: strict });\n}\n\nexport { circularDeepEqual, circularShallowEqual, createCustomEqual, deepEqual, sameValueZeroEqual, shallowEqual, strictCircularDeepEqual, strictCircularShallowEqual, strictDeepEqual, strictShallowEqual };\n//# sourceMappingURL=index.mjs.map\n","// There is a circular version https://www.npmjs.com/package/fast-equals#circulardeepequal that I\n// think allows comparing React refs (which have circular references in particular places that this\n// library would ignore). Maybe we can change to that version sometime if needed.\nimport { deepEqual as isEqualDeep } from 'fast-equals';\n\n/**\n * Check that two objects are deeply equal, comparing members of each object and such\n *\n * @param a The first object to compare\n * @param b The second object to compare\n *\n * WARNING: Objects like arrays from different iframes have different constructor function\n * references even if they do the same thing, so this deep equality comparison fails objects that\n * look the same but have different constructors because different constructors could produce\n * false positives in [a few specific\n * situations](https://github.com/planttheidea/fast-equals/blob/a41afc0a240ad5a472e47b53791e9be017f52281/src/comparator.ts#L96).\n * This means that two objects like arrays from different iframes that look the same will fail\n * this check. Please use some other means to check deep equality in those situations.\n *\n * Note: This deep equality check considers `undefined` values on keys of objects NOT to be equal to\n * not specifying the key at all. For example, `{ stuff: 3, things: undefined }` and `{ stuff: 3\n * }` are not considered equal in this case\n *\n * - For more information and examples, see [this\n * CodeSandbox](https://codesandbox.io/s/deepequallibrarycomparison-4g4kk4?file=/src/index.mjs).\n *\n * @returns True if a and b are deeply equal; false otherwise\n */\nexport default function deepEqual(a: unknown, b: unknown) {\n return isEqualDeep(a, b);\n}\n","import deepEqual from './equality-checking';\n\n/**\n * Check if one object is a subset of the other object. \"Subset\" means that all properties of one\n * object are present in the other object, and if they are present that all values of those\n * properties are deeply equal. Sub-objects are also checked to be subsets of the corresponding\n * sub-object in the other object.\n *\n * @example ObjB is a subset of objA given these objects:\n *\n * ```ts\n * objA = { name: 'Alice', age: 30, address: { city: 'Seattle', state: 'Washington' } };\n * objB = { name: 'Alice', address: { city: 'Seattle' } };\n * ```\n *\n * It is important to note that only arrays of primitives (i.e., booleans, numbers, strings) are\n * supported. In particular, objects in arrays will not be checked for deep equality. Also, presence\n * in an array is all this checks, not the number of times that an item appears in an array. `[1,\n * 1]` is a subset of `[1]`.\n *\n * @param objectWithAllProperties Object to be checked if it is a superset of\n * `objectWithPartialProperties`\n * @param objectWithPartialProperties Object to be checked if it is a subset of\n * `objectWithAllProperties`\n * @returns True if `objectWithAllProperties` contains all the properties of\n * `objectWithPartialProperties` and all values of those properties are deeply equal\n */\nexport default function isSubset(\n objectWithAllProperties: unknown,\n objectWithPartialProperties: unknown,\n): boolean {\n if (typeof objectWithAllProperties !== typeof objectWithPartialProperties) return false;\n\n // For this function we're saying that all falsy things of the same type are equal to each other\n if (!objectWithAllProperties && !objectWithPartialProperties) return true;\n\n if (Array.isArray(objectWithAllProperties)) {\n // We know these are arrays from the line above\n /* eslint-disable no-type-assertion/no-type-assertion */\n const partialArray = objectWithPartialProperties as Array;\n const allArray = objectWithAllProperties as Array;\n /* eslint-enable no-type-assertion/no-type-assertion */\n\n if (partialArray.length === 0) return true;\n\n // This only works with arrays of primitives.\n // If someone cares about checking arrays of objects this needs updating.\n return partialArray.every((item) => allArray.includes(item));\n }\n\n if (typeof objectWithAllProperties !== 'object')\n return deepEqual(objectWithAllProperties, objectWithPartialProperties);\n\n // We know these are objects that potentially have properties because of the earlier checks\n /* eslint-disable no-type-assertion/no-type-assertion */\n const partialObj = objectWithPartialProperties as Record;\n const allObj = objectWithAllProperties as Record;\n /* eslint-enable no-type-assertion/no-type-assertion */\n\n let retVal = true;\n Object.keys(partialObj).forEach((key) => {\n if (!retVal) return;\n if (!Object.hasOwn(allObj, key)) retVal = false;\n else if (!isSubset(allObj[key], partialObj[key])) retVal = false;\n });\n return retVal;\n}\n","/**\n * Converts a JavaScript value to a JSON string, changing `undefined` properties in the JavaScript\n * object to `null` properties in the JSON string.\n *\n * WARNING: `null` values will become `undefined` values after passing through {@link serialize} then\n * {@link deserialize}. For example, `{ a: 1, b: undefined, c: null }` will become `{ a: 1, b:\n * undefined, c: undefined }`. If you are passing around user data that needs to retain `null`\n * values, you should wrap them yourself in a string before using this function. Alternatively, you\n * can write your own replacer that will preserve `null` in a way that you can recover later.\n *\n * @param value A JavaScript value, usually an object or array, to be converted.\n * @param replacer A function that transforms the results. Note that all `undefined` values returned\n * by the replacer will be further transformed into `null` in the JSON string.\n * @param space Adds indentation, white space, and line break characters to the return-value JSON\n * text to make it easier to read. See the `space` parameter of `JSON.stringify` for more\n * details.\n */\nexport function serialize(\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string {\n const undefinedReplacer = (replacerKey: string, replacerValue: unknown) => {\n let newValue = replacerValue;\n if (replacer) newValue = replacer(replacerKey, newValue);\n // All `undefined` values become `null` on the way from JS objects into JSON strings\n // eslint-disable-next-line no-null/no-null\n if (newValue === undefined) newValue = null;\n return newValue;\n };\n return JSON.stringify(value, undefinedReplacer, space);\n}\n\n/**\n * Converts a JSON string into a value, converting all `null` properties from JSON into `undefined`\n * in the returned JavaScript value/object.\n *\n * WARNING: `null` values will become `undefined` values after passing through {@link serialize} then\n * {@link deserialize}. For example, `{ a: 1, b: undefined, c: null }` will become `{ a: 1, b:\n * undefined, c: undefined }`. If you are passing around user data that needs to retain `null`\n * values, you should wrap them yourself in a string before using this function. Alternatively, you\n * can write your own replacer that will preserve `null` in a way that you can recover later.\n *\n * @param value A valid JSON string.\n * @param reviver A function that transforms the results. This function is called for each member of\n * the object. If a member contains nested objects, the nested objects are transformed before the\n * parent object is. Note that `null` values are converted into `undefined` values after the\n * reviver has run.\n */\nexport function deserialize(\n value: string,\n reviver?: (this: unknown, key: string, value: unknown) => unknown,\n // Need to use `any` instead of `unknown` here to match the signature of JSON.parse\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n // Helper function to replace `null` with `undefined` on a per property basis. This can't be done\n // with our own reviver because `JSON.parse` removes `undefined` properties from the return value.\n function replaceNull(obj: Record): Record {\n Object.keys(obj).forEach((key: string | number) => {\n // We only want to replace `null`, not other falsy values\n // eslint-disable-next-line no-null/no-null\n if (obj[key] === null) obj[key] = undefined;\n // If the property is an object, recursively call the helper function on it\n else if (typeof obj[key] === 'object')\n // Since the object came from a string, we know the keys will not be symbols\n // eslint-disable-next-line no-type-assertion/no-type-assertion\n obj[key] = replaceNull(obj[key] as Record);\n });\n return obj;\n }\n\n const parsedObject = JSON.parse(value, reviver);\n // Explicitly convert the value 'null' that isn't stored as a property on an object to 'undefined'\n // eslint-disable-next-line no-null/no-null\n if (parsedObject === null) return undefined;\n if (typeof parsedObject === 'object') return replaceNull(parsedObject);\n return parsedObject;\n}\n\n/**\n * Check to see if the value is serializable without losing information\n *\n * @param value Value to test\n * @returns True if serializable; false otherwise\n *\n * Note: the values `undefined` and `null` are serializable (on their own or in an array), but\n * `null` values get transformed into `undefined` when serializing/deserializing.\n *\n * WARNING: This is inefficient right now as it stringifies, parses, stringifies, and === the value.\n * Please only use this if you need to\n *\n * DISCLAIMER: this does not successfully detect that values are not serializable in some cases:\n *\n * - Losses of removed properties like functions and `Map`s\n * - Class instances (not deserializable into class instances without special code)\n *\n * We intend to improve this in the future if it becomes important to do so. See [`JSON.stringify`\n * documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description)\n * for more information.\n */\nexport function isSerializable(value: unknown): boolean {\n try {\n const serializedValue = serialize(value);\n return serializedValue === serialize(deserialize(serializedValue));\n } catch (e) {\n return false;\n }\n}\n\n/**\n * HTML Encodes the provided string. Thanks to ChatGPT\n *\n * @param str String to HTML encode\n * @returns HTML-encoded string\n */\nexport const htmlEncode = (str: string): string =>\n str\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(/\\//g, '/');\n","import DateTimeFormat from './intl-date-time-format';\n\n/**\n * Retrieves the current locale of the user's environment.\n *\n * @returns A string representing the current locale. If the locale cannot be determined, the\n * function returns an empty string.\n */\nexport default function getCurrentLocale(): string {\n // Use navigator when available\n if (typeof navigator !== 'undefined' && navigator.languages) {\n return navigator.languages[0];\n }\n // For Node.js\n return new DateTimeFormat().resolvedOptions().locale;\n}\n","import NumberFormat from './intl-number-format';\n\n/**\n * Formats a number according to the locale and formatting options of this NumberFormat object\n *\n * @example FormatBytes(1024) => \"1 KB\"\n *\n * @example FormatBytes(1024, 0) => \"1 KB\"\n *\n * @param fileSize Number to format\n * @param decimals Number of decimal places to round to\n * @returns String representing the given number formatted according to the locale and formatting\n * options of this NumberFormat object\n */\nexport default function formatBytes(fileSize: number, decimals: number = 2): string {\n if (fileSize === 0) return '0 Bytes';\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n const i = Math.floor(Math.log(fileSize) / Math.log(1024));\n const sizeToUse = sizes[i];\n const formattingFileSize = new NumberFormat('en', {\n style: 'decimal',\n maximumFractionDigits: decimals,\n minimumFractionDigits: 0,\n }).format(fileSize / 1024 ** i);\n return `${formattingFileSize} ${sizeToUse}`;\n}\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { LocalizeKey, ReferencedItem } from 'menus.model';\n\n/** The data an extension provides to inform Platform.Bible of the settings it provides */\nexport type SettingsContribution = SettingsGroup | SettingsGroup[];\n/** A description of an extension's setting entry */\nexport type Setting = ExtensionControlledSetting;\n/** Setting definition that is validated by the extension. */\nexport type ExtensionControlledSetting = SettingBase & ModifierExtensionControlled;\n/** Base information needed to describe a setting entry */\nexport type SettingBase = StateBase & {\n [k: string]: unknown;\n /** LocalizeKey that displays in the settings dialog as the setting name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the settings dialog to describe the setting */\n description?: LocalizeKey;\n};\n/** The data an extension provides to inform Platform.Bible of the project settings it provides */\nexport type ProjectSettingsContribution = ProjectSettingsGroup | ProjectSettingsGroup[];\n/** A description of an extension's setting entry */\nexport type ProjectSetting = ExtensionControlledProjectSetting;\n/** Setting definition that is validated by the extension. */\nexport type ExtensionControlledProjectSetting = ProjectSettingBase & ModifierExtensionControlled;\n/** Base information needed to describe a project setting entry */\nexport type ProjectSettingBase = SettingBase & ModifierProject;\n/** A description of an extension's user state entry */\nexport type UserState = ExtensionControlledState;\n/** State definition that is validated by the extension. */\nexport type ExtensionControlledState = StateBase & ModifierExtensionControlled;\n/** Group of related settings definitions */\nexport interface SettingsGroup {\n [k: string]: unknown;\n /** LocalizeKey that displays in the settings dialog as the group name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the settings dialog to describe the group */\n description?: LocalizeKey;\n properties: SettingProperties;\n}\n/** Object whose keys are setting IDs and whose values are settings objects */\nexport interface SettingProperties {\n [k: ReferencedItem]: Setting;\n}\n/** Base information needed to describe a state entry */\nexport interface StateBase {\n [k: string]: unknown;\n /** Default value for the state/setting */\n default: unknown;\n /**\n * A state/setting ID whose value to set to this state/setting's starting value the first time\n * this state/setting is loaded\n */\n derivesFrom?: ReferencedItem;\n}\n/**\n * Modifies state/setting type to be extension-controlled. \"Extension-controlled\" means the\n * extension provides the component and the validator for the state/setting, so the state/setting is\n * controlled by the extension.\n */\nexport interface ModifierExtensionControlled {\n [k: string]: unknown;\n platformType?: undefined;\n type?: undefined;\n}\n/** Group of related settings definitions */\nexport interface ProjectSettingsGroup {\n [k: string]: unknown;\n /** LocalizeKey that displays in the project settings dialog as the group name */\n label: LocalizeKey;\n /** LocalizeKey that displays in the project settings dialog to describe the group */\n description?: LocalizeKey;\n properties: ProjectSettingProperties;\n}\n/** Object whose keys are setting IDs and whose values are settings objects */\nexport interface ProjectSettingProperties {\n [k: ReferencedItem]: ProjectSetting;\n}\n\n// Note: we removed the index signature on ModifierProject to avoid having it on\n// `ProjectMetadataFilterOptions`. Unfortunately adding \"additionalProperties\": false on the json\n// schema messes up validation. Please remove the index signature again in the future if you\n// regenerate types\nexport interface ModifierProject {\n /**\n * String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s\n * (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if they should be included.\n *\n * If this is one string, it will be matched against `projectInterface`s. If this is an array,\n * each entry is handled based on its type (at least one entry must match for this filter\n * condition to pass):\n *\n * - If the entry is a string, it will be matched against each `projectInterface`. If any match, the\n * project will pass this filter condition\n * - If the entry is an array of strings, each will be matched against each `projectInterface`. If\n * every string matches against at least one `projectInterface`, the project will pass this\n * filter condition\n *\n * In other words, each entry in the first-level array is `OR`'ed together. Each entry in\n * second-level arrays (arrays within the first-level array) are `AND`'ed together.\n *\n * Defaults to all {@link ProjectInterfaces}, so all projects that do not match\n * `excludeProjectInterfaces` will be included\n *\n * @example\n *\n * ```typescript\n * includeProjectInterfaces: ['one', ['two', 'three']];\n * ```\n *\n * This filter condition will succeed on projects whose `projectInterface`s fulfill at least one\n * of the following conditions (At least one entry in the array must match):\n *\n * - Include `one`\n * - Include both `two` and `three`.\n */\n includeProjectInterfaces?: undefined | string | (string | string[])[];\n /**\n * String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s\n * (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if they should absolutely not be included even if they match with\n * `includeProjectInterfaces`.\n *\n * If this is one string, it will be matched against `projectInterface`s. If this is an array,\n * each entry is handled based on its type (at least one entry must match for this filter\n * condition to exclude the project):\n *\n * - If the entry is a string, it will be matched against each `projectInterface`. If any match, the\n * project will pass this filter condition and exclude the project\n * - If the entry is an array of strings, each will be matched against each `projectInterface`. If\n * every string matches against at least one `projectInterface`, the project will pass this\n * filter condition and exclude the project\n *\n * In other words, each entry in the first-level array is `OR`'ed together. Each entry in\n * second-level arrays (arrays within the first-level array) are `AND`'ed together.\n *\n * Defaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces`\n * will be included\n *\n * @example\n *\n * ```typescript\n * excludeProjectInterfaces: ['one', ['two', 'three']];\n * ```\n *\n * This filter condition will succeed and exclude projects whose `projectInterface`s fulfill at\n * least one of the following conditions (At least one entry in the array must match):\n *\n * - Include `one`\n * - Include both `two` and `three`.\n */\n excludeProjectInterfaces?: undefined | string | (string | string[])[];\n /**\n * String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory\n * Ids that provided each project's metadata (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if the projects should be included.\n *\n * Defaults to all Project Data Provider Factory Ids, so all projects that do not match\n * `excludePdpFactoryIds` will be included\n */\n includePdpFactoryIds?: undefined | string | string[];\n /**\n * String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory\n * Ids that provided each project's metadata (using the\n * [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)\n * function) to determine if the projects should absolutely not be included even if they match\n * with `includeProjectInterfaces`.\n *\n * Defaults to none, so all projects that match `includePdpFactoryIds` will be included\n */\n excludePdpFactoryIds?: undefined | string | string[];\n}\n\n/** The data an extension provides to inform Platform.Bible of the user state it provides */\nexport interface UserStateContribution {\n [k: ReferencedItem]: UserState;\n}\n/** The data an extension provides to inform Platform.Bible of the project state it provides */\nexport interface ProjectStateContribution {\n [k: ReferencedItem]: UserState;\n}\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\nconst settingsDefs = {\n projectSettingsContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the project settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/projectSettingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/projectSettingsGroup',\n },\n },\n ],\n },\n projectSettingsGroup: {\n description: 'Group of related settings definitions',\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the project settings dialog as the group name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description:\n 'localizeKey that displays in the project settings dialog to describe the group',\n $ref: '#/$defs/localizeKey',\n },\n properties: {\n $ref: '#/$defs/projectSettingProperties',\n },\n },\n required: ['label', 'properties'],\n },\n projectSettingProperties: {\n description: 'Object whose keys are setting IDs and whose values are settings objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/projectSetting',\n },\n },\n additionalProperties: false,\n },\n projectSetting: {\n description: \"A description of an extension's setting entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledProjectSetting',\n },\n ],\n },\n extensionControlledProjectSetting: {\n description: 'Setting definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/projectSettingBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n projectSettingBase: {\n description: 'Base information needed to describe a project setting entry',\n allOf: [\n {\n $ref: '#/$defs/settingBase',\n },\n {\n $ref: '#/$defs/modifierProject',\n },\n ],\n },\n modifierProject: {\n description: 'Modifies setting type to be project setting',\n type: 'object',\n properties: {\n includeProjectInterfaces: {\n description:\n \"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should be included.\\n\\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to pass):\\n\\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition\\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition\\n\\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\\n\\nDefaults to all {@link ProjectInterfaces}, so all projects that do not match `excludeProjectInterfaces` will be included\\n\\n@example\\n\\n```typescript\\nincludeProjectInterfaces: ['one', ['two', 'three']];\\n```\\n\\nThis filter condition will succeed on projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\\n\\n- Include `one`\\n- Include both `two` and `three`.\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n ],\n },\n excludeProjectInterfaces: {\n description:\n \"String representation of `RegExp` pattern(s) to match against projects' `projectInterface`s (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if they should absolutely not be included even if they match with `includeProjectInterfaces`.\\n\\nIf this is one string, it will be matched against `projectInterface`s. If this is an array, each entry is handled based on its type (at least one entry must match for this filter condition to exclude the project):\\n\\n- If the entry is a string, it will be matched against each `projectInterface`. If any match, the project will pass this filter condition and exclude the project\\n- If the entry is an array of strings, each will be matched against each `projectInterface`. If every string matches against at least one `projectInterface`, the project will pass this filter condition and exclude the project\\n\\nIn other words, each entry in the first-level array is `OR`'ed together. Each entry in second-level arrays (arrays within the first-level array) are `AND`'ed together.\\n\\nDefaults to no {@link ProjectInterfaces}, so all projects that match `includeProjectInterfaces` will be included\\n\\n@example\\n\\n```typescript\\nexcludeProjectInterfaces: ['one', ['two', 'three']];\\n```\\n\\nThis filter condition will succeed and exclude projects whose `projectInterface`s fulfill at least one of the following conditions (At least one entry in the array must match):\\n\\n- Include `one`\\n- Include both `two` and `three`.\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n ],\n },\n includePdpFactoryIds: {\n description:\n \"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should be included.\\n\\nDefaults to all Project Data Provider Factory Ids, so all projects that do not match `excludePdpFactoryIds` will be included\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n excludePdpFactoryIds: {\n description:\n \"String representation of `RegExp` pattern(s) to match against the Project Data Provider Factory Ids that provided each project's metadata (using the [`test`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) function) to determine if the projects should absolutely not be included even if they match with `includeProjectInterfaces`.\\n\\nDefaults to none, so all projects that match `includePdpFactoryIds` will be included\",\n anyOf: [\n {\n type: 'null',\n },\n {\n type: 'string',\n },\n {\n type: 'array',\n items: { type: 'string' },\n },\n ],\n },\n },\n },\n settingsContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/settingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/settingsGroup',\n },\n },\n ],\n },\n settingsGroup: {\n description: 'Group of related settings definitions',\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the settings dialog as the group name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description: 'localizeKey that displays in the settings dialog to describe the group',\n $ref: '#/$defs/localizeKey',\n },\n properties: {\n $ref: '#/$defs/settingProperties',\n },\n },\n required: ['label', 'properties'],\n },\n settingProperties: {\n description: 'Object whose keys are setting IDs and whose values are settings objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w-]+\\\\.[\\\\w-]+$': {\n $ref: '#/$defs/setting',\n },\n },\n additionalProperties: false,\n },\n setting: {\n description: \"A description of an extension's setting entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledSetting',\n },\n ],\n },\n extensionControlledSetting: {\n description: 'Setting definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/settingBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n settingBase: {\n description: 'Base information needed to describe a setting entry',\n allOf: [\n {\n $ref: '#/$defs/stateBase',\n },\n {\n type: 'object',\n properties: {\n label: {\n description: 'localizeKey that displays in the settings dialog as the setting name',\n $ref: '#/$defs/localizeKey',\n },\n description: {\n description: 'localizeKey that displays in the settings dialog to describe the setting',\n $ref: '#/$defs/localizeKey',\n },\n },\n required: ['label'],\n },\n ],\n },\n projectStateContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the project state it provides',\n $ref: '#/$defs/userStateProperties',\n },\n userStateContribution: {\n description:\n 'The data an extension provides to inform Platform.Bible of the user state it provides',\n $ref: '#/$defs/userStateProperties',\n },\n userStateProperties: {\n description: 'Object whose keys are state IDs and whose values are state objects',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/userState',\n },\n },\n additionalProperties: false,\n },\n userState: {\n description: \"A description of an extension's user state entry\",\n anyOf: [\n {\n $ref: '#/$defs/extensionControlledState',\n },\n ],\n },\n extensionControlledState: {\n description: 'State definition that is validated by the extension.',\n allOf: [\n {\n $ref: '#/$defs/stateBase',\n },\n {\n $ref: '#/$defs/modifierExtensionControlled',\n },\n ],\n },\n modifierExtensionControlled: {\n description:\n 'Modifies state/setting type to be extension-controlled. \"Extension-controlled\" means the extension provides the component and the validator for the state/setting, so the state/setting is controlled by the extension.',\n not: {\n anyOf: [\n {\n type: 'object',\n required: ['platformType'],\n },\n {\n type: 'object',\n required: ['type'],\n },\n ],\n },\n },\n stateBase: {\n description: 'Base information needed to describe a state entry',\n type: 'object',\n properties: {\n default: {\n description: 'default value for the state/setting',\n type: 'any',\n },\n derivesFrom: {\n description:\n \"a state/setting ID whose value to set to this state/setting's starting value the first time this state/setting is loaded\",\n $ref: '#/$defs/id',\n },\n },\n required: ['default'],\n },\n localizeKey: {\n description: \"Identifier for a string that will be localized based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n tsType: 'LocalizeKey',\n },\n id: {\n description: '',\n type: 'string',\n pattern: '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$',\n tsType: 'Id',\n },\n};\n\n/**\n * Json-schema-to-typescript has some added stuff that isn't actually compatible with JSON schema,\n * so we remove them here\n *\n * @param defs The `$defs` property of a JSON schema (will be modified in place)\n */\n// JSON schema types are weird, so we'll just be careful\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function removeJsonToTypeScriptTypesStuff(defs: any) {\n if (!defs) return;\n\n // JSON schema types are weird, so we'll just be careful\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Object.values(defs).forEach((def: any) => {\n if (!def.type) return;\n\n if ('tsType' in def) delete def.tsType;\n\n if (def.type === 'any') {\n delete def.type;\n return;\n }\n\n if (def.type === 'object') {\n removeJsonToTypeScriptTypesStuff(def.properties);\n }\n });\n}\n\nremoveJsonToTypeScriptTypesStuff(settingsDefs);\n\n/** JSON schema object that aligns with the ProjectSettingsContribution type */\nexport const projectSettingsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Project Settings Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the project settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/projectSettingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/projectSettingsGroup',\n },\n },\n ],\n\n $defs: settingsDefs,\n};\n\nObject.freeze(projectSettingsDocumentSchema);\n\n/** JSON schema object that aligns with the {@link SettingsContribution} type */\nexport const settingsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Settings Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the settings it provides',\n anyOf: [\n {\n $ref: '#/$defs/settingsGroup',\n },\n {\n type: 'array',\n items: {\n $ref: '#/$defs/settingsGroup',\n },\n },\n ],\n\n $defs: settingsDefs,\n};\n\nObject.freeze(settingsDocumentSchema);\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { LocalizeKey } from 'menus.model';\nimport { removeJsonToTypeScriptTypesStuff } from './settings.model';\n\n/** Localized string value associated with this key */\nexport type LocalizedStringValue = string;\n\n/** The data an extension provides to inform Platform.Bible of the localized strings it provides. */\nexport interface LocalizedStringDataContribution {\n [k: string]: unknown;\n metadata?: StringsMetadata;\n localizedStrings?: {\n [k: string]: LanguageStrings;\n };\n}\n/**\n * Map whose keys are localized string keys and whose values provide additional non-locale-specific\n * information about the localized string key\n */\nexport interface StringsMetadata {\n [k: LocalizeKey]: StringMetadata;\n}\n/** Additional non-locale-specific information about a localized string key */\nexport interface StringMetadata {\n [k: string]: unknown;\n /**\n * Localized string key from which to get this value if one does not exist in the specified\n * language. If a new key/value pair needs to be made to replace an existing one, this could help\n * smooth over the transition if the meanings are close enough\n *\n * You can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a\n * backslash `\\`.\n */\n fallbackKey?: LocalizeKey;\n /**\n * Additional information provided by developers in English to help the translator to know how to\n * translate this localized string accurately\n */\n notes?: string;\n}\n/**\n * Map whose keys are localized string keys and whose values provide information about how to\n * localize strings for the localized string key\n */\nexport interface LanguageStrings {\n [k: LocalizeKey]: LocalizedStringValue;\n}\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\n\nconst localizedStringsDefs = {\n languageStrings: {\n description:\n 'Map whose keys are localized string keys and whose values provide information about how to localize strings for the localized string key',\n type: 'object',\n patternProperties: {\n '^%[\\\\w\\\\-\\\\.]+%$': {\n $ref: '#/$defs/localizedStringValue',\n },\n },\n additionalProperties: false,\n },\n localizedStringValue: {\n description: 'Localized string value associated with this key',\n type: 'string',\n },\n stringsMetadata: {\n description:\n 'Map whose keys are localized string keys and whose values provide additional non-locale-specific information about the localized string key',\n type: 'object',\n patternProperties: {\n '^%[\\\\w\\\\-\\\\.]+%$': {\n $ref: '#/$defs/stringMetadata',\n },\n },\n additionalProperties: false,\n },\n stringMetadata: {\n description: 'Additional non-locale-specific information about a localized string key',\n type: 'object',\n properties: {\n fallbackKey: {\n description:\n 'Localized string key from which to get this value if one does not exist in the specified language. If a new key/value pair needs to be made to replace an existing one, this could help smooth over the transition if the meanings are close enough.\\nYou can use Paratext 9 Localized String Keys here. Be sure to escape any % signs with a backslash `\\\\`.',\n type: 'string',\n pattern: \"^%[\\\\w\\\\-\\\\.;&,' (){}#:/\\\\\\\\?%⋮|[\\\\]“”‘’!~*\\u00A0+=•`…\\u200B↑↓]+%$\",\n tsType: 'LocalizeKey',\n },\n notes: {\n description:\n 'Additional information provided by developers in English to help the translator to know how to translate this localized string accurately',\n type: 'string',\n },\n },\n },\n localizeKey: {\n description: \"Identifier for a string that will be localized based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n tsType: 'LocalizeKey',\n },\n};\n\nremoveJsonToTypeScriptTypesStuff(localizedStringsDefs);\n\n/** JSON schema object that aligns with the LocalizedStringDataContribution type */\nexport const localizedStringsDocumentSchema = {\n $schema: 'https://json-schema.org/draft/2020-12/schema',\n title: 'Localized String Data Contribution',\n description:\n 'The data an extension provides to inform Platform.Bible of the localized strings it provides.',\n type: 'object',\n properties: {\n metadata: {\n $ref: '#/$defs/stringsMetadata',\n },\n localizedStrings: {\n type: 'object',\n additionalProperties: {\n $ref: '#/$defs/languageStrings',\n },\n },\n },\n $defs: localizedStringsDefs,\n};\n\nObject.freeze(localizedStringsDocumentSchema);\n","//----------------------------------------------------------------------------------------------\n// NOTE: If you change any of the types, make sure the JSON schema at the end of this file gets\n// changed so they align.\n//----------------------------------------------------------------------------------------------\n\nimport { ReplaceType } from './util';\n\n/** Identifier for a string that will be localized in a menu based on the user's UI language */\nexport type LocalizeKey = `%${string}%`;\n\n/** Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command) */\nexport type ReferencedItem = `${string}.${string}`;\n\nexport type OrderedItem = {\n /** Relative order of this item compared to other items in the same parent/scope (sorted ascending) */\n order: number;\n};\n\nexport type OrderedExtensibleContainer = OrderedItem & {\n /** Determines whether other items can be added to this after it has been defined */\n isExtensible?: boolean;\n};\n\n/** Group of menu items that belongs in a column */\nexport type MenuGroupDetailsInColumn = OrderedExtensibleContainer & {\n /** ID of column in which this group resides */\n column: ReferencedItem;\n};\n\n/** Group of menu items that belongs in a submenu */\nexport type MenuGroupDetailsInSubMenu = OrderedExtensibleContainer & {\n /** ID of menu item hosting the submenu in which this group resides */\n menuItem: ReferencedItem;\n};\n\n/** Column that includes header text in a menu */\nexport type MenuColumnWithHeader = OrderedExtensibleContainer & {\n /** Key that represents the text of the header text of the column */\n label: LocalizeKey;\n};\n\nexport type MenuItemBase = OrderedItem & {\n /** Menu group to which this menu item belongs */\n group: ReferencedItem;\n /** Key that represents the text of this menu item to display */\n label: LocalizeKey;\n /** Key that represents words the platform should reference when users are searching for menu items */\n searchTerms?: LocalizeKey;\n /** Key that represents the text to display if a mouse pointer hovers over the menu item */\n tooltip?: LocalizeKey;\n /** Additional information provided by developers to help people who perform localization */\n localizeNotes: string;\n};\n\n/** Menu item that hosts a submenu */\nexport type MenuItemContainingSubmenu = MenuItemBase & {\n /** ID for this menu item that holds a submenu */\n id: ReferencedItem;\n};\n\n/** Menu item that runs a command */\nexport type MenuItemContainingCommand = MenuItemBase & {\n /** Name of the PAPI command to run when this menu item is selected. */\n command: ReferencedItem;\n /**\n * Uri path to the icon to display after the menu text. Ex:\n * `papi-extension://helloWorld/assets/icon.png`\n */\n iconPathAfter?: string;\n /**\n * Uri path to the icon to display before the menu text. Ex:\n * `papi-extension://helloWorld/assets/icon.png`\n */\n iconPathBefore?: string;\n};\n\n/**\n * Group of menu items that can be combined with other groups to form a single context menu/submenu.\n * Groups are separated using a line within the menu/submenu.\n */\nexport type GroupsInSingleColumnMenu = {\n /** Named menu group */\n [property: ReferencedItem]: OrderedExtensibleContainer | MenuGroupDetailsInSubMenu;\n};\n\n/**\n * Group of menu items that can be combined with other groups to form a single menu/submenu within a\n * multi-column menu. Groups are separated using a line within the menu/submenu.\n */\nexport type GroupsInMultiColumnMenu = {\n /** Named menu group */\n [property: ReferencedItem]: MenuGroupDetailsInColumn | MenuGroupDetailsInSubMenu;\n};\n\n/** Group of columns that can be combined with other columns to form a multi-column menu */\nexport type ColumnsWithHeaders = {\n /** Named column of a menu */\n [property: ReferencedItem]: MenuColumnWithHeader;\n /** Defines whether columns can be added to this multi-column menu */\n isExtensible?: boolean;\n};\n\n/** Menu that contains a column without a header */\nexport type SingleColumnMenu = {\n /** Groups that belong in this menu */\n groups: GroupsInSingleColumnMenu;\n /** List of menu items that belong in this menu */\n items: (MenuItemContainingCommand | MenuItemContainingSubmenu)[];\n};\n\n/** Menu that contains multiple columns with headers */\nexport type MultiColumnMenu = {\n /** Columns that belong in this menu */\n columns: ColumnsWithHeaders;\n /** Groups that belong in this menu */\n groups: GroupsInMultiColumnMenu;\n /** List of menu items that belong in this menu */\n items: (MenuItemContainingCommand | MenuItemContainingSubmenu)[];\n};\n\n/** Menus for one single web view */\nexport type WebViewMenu = {\n /** Indicates whether the platform default menus should be included for this webview */\n includeDefaults: boolean | undefined;\n /** Menu that opens when you click on the top left corner of a tab */\n topMenu: MultiColumnMenu | undefined;\n /** Menu that opens when you right click on the main body/area of a tab */\n contextMenu: SingleColumnMenu | undefined;\n};\n\n/** Menus for all web views */\nexport type WebViewMenus = {\n /** Named web view */\n [property: ReferencedItem]: WebViewMenu;\n};\n\n/** Platform.Bible menus before they are localized */\nexport type PlatformMenus = {\n /** Top level menu for the application */\n mainMenu: MultiColumnMenu;\n /** Menus that apply per web view in the application */\n webViewMenus: WebViewMenus;\n /** Default context menu for web views that don't specify their own */\n defaultWebViewContextMenu: SingleColumnMenu;\n /** Default top menu for web views that don't specify their own */\n defaultWebViewTopMenu: MultiColumnMenu;\n};\n\n/**\n * Type that converts any menu type before it is localized to what it is after it is localized. This\n * can be applied to any menu type as needed.\n */\nexport type Localized = ReplaceType, ReferencedItem, string>;\n\n//----------------------------------------------------------------------------------------------\n// NOTE: If you change the schema below, make sure the TS types above get changed so they align.\n//----------------------------------------------------------------------------------------------\n/** JSON schema object that aligns with the PlatformMenus type */\nexport const menuDocumentSchema = {\n title: 'Platform.Bible menus',\n type: 'object',\n properties: {\n mainMenu: {\n description: 'Top level menu for the application',\n $ref: '#/$defs/multiColumnMenu',\n },\n defaultWebViewTopMenu: {\n description: \"Default top menu for web views that don't specify their own\",\n $ref: '#/$defs/multiColumnMenu',\n },\n defaultWebViewContextMenu: {\n description: \"Default context menu for web views that don't specify their own\",\n $ref: '#/$defs/singleColumnMenu',\n },\n webViewMenus: {\n description: 'Menus that apply per web view in the application',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n $ref: '#/$defs/menusForOneWebView',\n },\n },\n additionalProperties: false,\n },\n },\n required: ['mainMenu', 'defaultWebViewTopMenu', 'defaultWebViewContextMenu', 'webViewMenus'],\n additionalProperties: false,\n $defs: {\n localizeKey: {\n description:\n \"Identifier for a string that will be localized in a menu based on the user's UI language\",\n type: 'string',\n pattern: '^%[\\\\w\\\\-\\\\.]+%$',\n },\n referencedItem: {\n description:\n 'Name of some UI element (i.e., tab, column, group, menu item) or some PAPI object (i.e., command)',\n type: 'string',\n pattern: '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$',\n },\n columnsWithHeaders: {\n description:\n 'Group of columns that can be combined with other columns to form a multi-column menu',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n description: 'Single column with a header string',\n type: 'object',\n properties: {\n label: {\n description: 'Header text for this this column in the UI',\n $ref: '#/$defs/localizeKey',\n },\n localizeNotes: {\n description:\n 'Additional information provided by developers to help people who perform localization',\n type: 'string',\n },\n order: {\n description:\n 'Relative order of this column compared to other columns (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu groups to this column',\n type: 'boolean',\n },\n },\n required: ['label', 'order'],\n additionalProperties: false,\n },\n },\n properties: {\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add columns to this multi-column menu',\n type: 'boolean',\n },\n },\n },\n menuGroups: {\n description:\n 'Group of menu items that can be combined with other groups to form a single menu/submenu. Groups are separated using a line within the menu/submenu.',\n type: 'object',\n patternProperties: {\n '^[\\\\w\\\\-]+\\\\.[\\\\w\\\\-]+$': {\n description: 'Single group that contains menu items',\n type: 'object',\n oneOf: [\n {\n properties: {\n column: {\n description:\n 'Column where this group belongs, not required for single column menus',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this group compared to other groups in the same column or submenu (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu items to this menu group',\n type: 'boolean',\n },\n },\n required: ['order'],\n additionalProperties: false,\n },\n {\n properties: {\n menuItem: {\n description: 'Menu item that anchors the submenu where this group belongs',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this group compared to other groups in the same column or submenu (sorted ascending)',\n type: 'number',\n },\n isExtensible: {\n description:\n 'Defines whether contributions are allowed to add menu items to this menu group',\n type: 'boolean',\n },\n },\n required: ['menuItem', 'order'],\n additionalProperties: false,\n },\n ],\n },\n },\n additionalProperties: false,\n },\n menuItem: {\n description:\n 'Single item in a menu that can be clicked on to take an action or can be the parent of a submenu',\n type: 'object',\n oneOf: [\n {\n properties: {\n id: {\n description: 'ID for this menu item that holds a submenu',\n $ref: '#/$defs/referencedItem',\n },\n },\n required: ['id'],\n },\n {\n properties: {\n command: {\n description: 'Name of the PAPI command to run when this menu item is selected.',\n $ref: '#/$defs/referencedItem',\n },\n iconPathBefore: {\n description:\n 'Uri path to the icon to display before the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`',\n type: 'string',\n },\n iconPathAfter: {\n description:\n 'Uri path to the icon to display after the menu text. Ex: `papi-extension://helloWorld/assets/icon.png`',\n type: 'string',\n },\n },\n required: ['command'],\n },\n ],\n properties: {\n label: {\n description: 'Key that represents the text of this menu item to display',\n $ref: '#/$defs/localizeKey',\n },\n tooltip: {\n description:\n 'Key that represents the text to display if a mouse pointer hovers over the menu item',\n $ref: '#/$defs/localizeKey',\n },\n searchTerms: {\n description:\n 'Key that represents additional words the platform should reference when users are searching for menu items',\n $ref: '#/$defs/localizeKey',\n },\n localizeNotes: {\n description:\n 'Additional information provided by developers to help people who perform localization',\n type: 'string',\n },\n group: {\n description: 'Group to which this menu item belongs',\n $ref: '#/$defs/referencedItem',\n },\n order: {\n description:\n 'Relative order of this menu item compared to other menu items in the same group (sorted ascending)',\n type: 'number',\n },\n },\n required: ['label', 'group', 'order'],\n unevaluatedProperties: false,\n },\n groupsAndItems: {\n description: 'Core schema for a column',\n type: 'object',\n properties: {\n groups: {\n description: 'Groups that belong in this menu',\n $ref: '#/$defs/menuGroups',\n },\n items: {\n description: 'List of menu items that belong in this menu',\n type: 'array',\n items: { $ref: '#/$defs/menuItem' },\n uniqueItems: true,\n },\n },\n required: ['groups', 'items'],\n },\n singleColumnMenu: {\n description: 'Menu that contains a column without a header',\n type: 'object',\n allOf: [{ $ref: '#/$defs/groupsAndItems' }],\n unevaluatedProperties: false,\n },\n multiColumnMenu: {\n description: 'Menu that can contain multiple columns with headers',\n type: 'object',\n allOf: [\n { $ref: '#/$defs/groupsAndItems' },\n {\n properties: {\n columns: {\n description: 'Columns that belong in this menu',\n $ref: '#/$defs/columnsWithHeaders',\n },\n },\n required: ['columns'],\n },\n ],\n unevaluatedProperties: false,\n },\n menusForOneWebView: {\n description: 'Set of menus that are associated with a single tab',\n type: 'object',\n properties: {\n includeDefaults: {\n description:\n 'Indicates whether the platform default menus should be included for this webview',\n type: 'boolean',\n },\n topMenu: {\n description: 'Menu that opens when you click on the top left corner of a tab',\n $ref: '#/$defs/multiColumnMenu',\n },\n contextMenu: {\n description: 'Menu that opens when you right click on the main body/area of a tab',\n $ref: '#/$defs/singleColumnMenu',\n },\n },\n additionalProperties: false,\n },\n },\n};\n\nObject.freeze(menuDocumentSchema);\n"],"names":["AsyncVariable","variableName","rejectIfNotSettledWithinMS","__publicField","resolve","reject","value","throwIfAlreadySettled","reason","Collator","locales","options","string1","string2","DateTimeFormat","date","startDate","endDate","PlatformEventEmitter","event","callback","callbackIndex","newGuid","s","isString","o","deepClone","obj","debounce","fn","delay","timeout","args","groupBy","items","keySelector","valueSelector","map","item","key","group","isErrorWithMessage","error","toErrorWithMessage","maybeError","getErrorMessage","wait","ms","waitForDuration","maxWaitTimeInMS","getAllObjectFunctionNames","_objId","objectFunctionNames","property","objectPrototype","createSyncProxyForAsyncObject","getObject","objectToProxy","target","prop","DocumentCombiner","baseDocument","documentName","document","previousDocumentVersion","documentToSet","contributions","contributionName","potentialOutput","outputIteration","contribution","mergeObjects","output","finalOutput","areNonArrayObjects","values","allMatch","areArrayObjects","startingPoint","copyFrom","ignoreDuplicateProperties","retVal","mergeObjectsInternal","startingPointObj","copyFromObj","Mutex","AsyncMutex","MutexMap","mutexID","NonValidatingDocumentCombiner","NumberFormat","startRange","endRange","UnsubscriberAsyncList","name","unsubscribers","unsubscriber","unsubs","results","unsubscriberSucceeded","index","P","R","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","r","D","i","a","u","v","f","d","b","p","J","M","charRegex","astralRange","comboMarksRange","comboHalfMarksRange","comboSymbolsRange","comboMarksExtendedRange","comboMarksSupplementRange","comboRange","varRange","familyRange","astral","combo","fitz","modifier","nonAstral","regional","surrogatePair","zwj","blackFlag","family","optModifier","optVar","optJoin","seq","symbol","__importDefault","this","mod","dist","char_regex_1","require$$0","toArray","str","toArray_1","length","match","length_1","substring","begin","end","substring_1","substr","len","strLength","substr_1","limit","padString","padPosition","padRepeats","limit_1","indexOf","searchStr","pos","strArr","searchArr","finded","searchIndex","indexOf_1","ensureArray","maybeArray","at","string","stringLength","charAt","codePointAt","endsWith","searchString","endPosition","lastIndexOfSearchString","lastIndexOf","indexOfClosestClosingCurlyBrace","escaped","closeCurlyBraceIndex","formatReplacementString","replacers","updatedStr","replacerKey","replacerString","includes","position","partialString","stringzIndexOf","validatedPosition","stringzLength","normalize","form","upperCaseForm","ordinalCompare","padEnd","targetLength","stringzLimit","padStart","correctSliceIndex","slice","indexStart","indexEnd","newStart","newEnd","split","separator","splitLimit","result","regexSeparator","matches","currentIndex","matchIndex","matchLength","startsWith","stringzSubstr","stringzSubstring","stringzToArray","isLocalizeKey","escapeStringRegexp","transformAndEnsureRegExpRegExpArray","stringStringMaybeArray","stringMaybeStringArray","transformAndEnsureRegExpArray","stringMaybeArray","scrBookData","FIRST_SCR_BOOK_NUM","LAST_SCR_BOOK_NUM","FIRST_SCR_CHAPTER_NUM","FIRST_SCR_VERSE_NUM","getChaptersForBook","bookNum","_a","offsetBook","scrRef","offset","offsetChapter","offsetVerse","getLocalizedIdFromBookNumber","bookNumber","localizationLanguage","getLocalizedString","id","Canon","bookName","parts","scrRefToBBBCCCVVV","VerseRef","compareScrRefs","scrRef1","scrRef2","formatScrRef","optionOrLocalizedBookName","chapterVerseSeparator","bookChapterSeparator","book","aggregateUnsubscribers","success","aggregateUnsubscriberAsyncs","unsubPromises","getOwnPropertyNames","getOwnPropertySymbols","hasOwnProperty","combineComparators","comparatorA","comparatorB","state","createIsCircular","areItemsEqual","cache","cachedA","cachedB","getStrictProperties","object","hasOwn","sameValueZeroEqual","OWNER","getOwnPropertyDescriptor","keys","areArraysEqual","areDatesEqual","areMapsEqual","matchedIndices","aIterable","aResult","bResult","bIterable","hasMatch","aKey","aValue","_b","bKey","bValue","areObjectsEqual","properties","areObjectsEqualStrict","descriptorA","descriptorB","arePrimitiveWrappersEqual","areRegExpsEqual","areSetsEqual","areTypedArraysEqual","ARGUMENTS_TAG","BOOLEAN_TAG","DATE_TAG","MAP_TAG","NUMBER_TAG","OBJECT_TAG","REG_EXP_TAG","SET_TAG","STRING_TAG","isArray","isTypedArray","assign","getTag","createEqualityComparator","constructor","tag","createEqualityComparatorConfig","circular","createCustomConfig","strict","config","areArraysEqual$1","areMapsEqual$1","areObjectsEqual$1","areSetsEqual$1","createInternalEqualityComparator","compare","_indexOrKeyA","_indexOrKeyB","_parentA","_parentB","createIsEqual","comparator","createState","equals","meta","deepEqual","createCustomEqual","createCustomInternalComparator","isEqualDeep","isSubset","objectWithAllProperties","objectWithPartialProperties","partialArray","allArray","partialObj","allObj","serialize","replacer","space","replacerValue","newValue","deserialize","reviver","replaceNull","parsedObject","isSerializable","serializedValue","htmlEncode","getCurrentLocale","formatBytes","fileSize","decimals","sizes","sizeToUse","settingsDefs","removeJsonToTypeScriptTypesStuff","defs","def","projectSettingsDocumentSchema","settingsDocumentSchema","localizedStringsDefs","localizedStringsDocumentSchema","menuDocumentSchema"],"mappings":";;;;AACA,MAAqBA,GAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcpC,YAAYC,GAAsBC,IAAqC,KAAO;AAb7D,IAAAC,EAAA;AACA,IAAAA,EAAA;AACT,IAAAA,EAAA;AACA,IAAAA,EAAA;AAWN,SAAK,eAAeF,GACpB,KAAK,iBAAiB,IAAI,QAAW,CAACG,GAASC,MAAW;AACxD,WAAK,WAAWD,GAChB,KAAK,WAAWC;AAAA,IAAA,CACjB,GACGH,IAA6B,KAC/B,WAAW,MAAM;AACf,MAAI,KAAK,aACP,KAAK,SAAS,oCAAoC,KAAK,YAAY,YAAY,GAC/E,KAAK,SAAS;AAAA,OAEfA,CAA0B,GAE/B,OAAO,KAAK,IAAI;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,IA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AA,IACzB;AAAA,IACA,oBAAoB;AAAA,MAClB,aAAa;AAAA,MACb,MAAM;AAAA,MACN,YAAY;AAAA,QACV,iBAAiB;AAAA,UACf,aACE;AAAA,UACF,MAAM;AAAA,QACR;AAAA,QACA,SAAS;AAAA,UACP,aAAa;AAAA,UACb,MAAM;AAAA,QACR;AAAA,QACA,aAAa;AAAA,UACX,aAAa;AAAA,UACb,MAAM;AAAA,QACR;AAAA,MACF;AAAA,MACA,sBAAsB;AAAA,IACxB;AAAA,EACF;AACF;AAEA,OAAO,OAAOA,EAAkB;","x_google_ignoreList":[11,12,13,18]} \ No newline at end of file diff --git a/lib/platform-bible-utils/src/array-util.test.ts b/lib/platform-bible-utils/src/array-util.test.ts new file mode 100644 index 0000000000..4b45f082ba --- /dev/null +++ b/lib/platform-bible-utils/src/array-util.test.ts @@ -0,0 +1,32 @@ +import ensureArray from './array-util'; + +describe('ensureArray', () => { + test('should return an empty array when input is undefined', () => { + expect(ensureArray(undefined)).toEqual([]); + }); + + test('should return the input array as-is when the input is already an array', () => { + const input = [1, 2, 3]; + expect(ensureArray(input)).toBe(input); + }); + + test('should wrap a single item in an array', () => { + const input = 5; + expect(ensureArray(input)).toEqual([input]); + }); + + test('should handle an array of objects', () => { + const input = [{ id: 1 }, { id: 2 }]; + expect(ensureArray(input)).toBe(input); + }); + + test('should wrap a single object in an array', () => { + const input = { id: 1 }; + expect(ensureArray(input)).toEqual([input]); + }); + + test('should wrap a single string in an array', () => { + const input = 'a'; + expect(ensureArray(input)).toEqual([input]); + }); +}); diff --git a/lib/platform-bible-utils/src/array-util.ts b/lib/platform-bible-utils/src/array-util.ts new file mode 100644 index 0000000000..5ddf6099ab --- /dev/null +++ b/lib/platform-bible-utils/src/array-util.ts @@ -0,0 +1,20 @@ +/** + * Ensures that the given input is returned as an array. + * + * This function takes a value that might be a single item, an array, or `undefined` and returns it + * as an array: + * + * - If the input is `undefined`, an empty array is returned. + * - If the input is already an array, it is returned as-is. + * - If the input is a single item, it is wrapped in an array. + * + * @typeParam T - The type of the elements in the array. + * @param maybeArray - The value that may be a single item, an array, or `undefined`. + * @returns An array containing the input value(s). If the input is `undefined`, an empty array is + * returned. + */ +export default function ensureArray(maybeArray: T | T[] | undefined): T[] { + if (!maybeArray) return []; + + return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; +} diff --git a/lib/platform-bible-utils/src/index.ts b/lib/platform-bible-utils/src/index.ts index c2ac6674d4..95051bfb1b 100644 --- a/lib/platform-bible-utils/src/index.ts +++ b/lib/platform-bible-utils/src/index.ts @@ -63,12 +63,15 @@ export { substring, toArray, ordinalCompare, + transformAndEnsureRegExpRegExpArray, + transformAndEnsureRegExpArray, } from './string-util'; export { default as deepEqual } from './equality-checking'; export { default as isSubset } from './subset-checking'; export { serialize, deserialize, isSerializable, htmlEncode } from './serialization'; export { default as getCurrentLocale } from './intl-util'; export { default as formatBytes } from './number-utils'; +export { default as ensureArray } from './array-util'; // Types export type { DeepPartial, ReplaceType, UnionToIntersection } from './util'; diff --git a/lib/platform-bible-utils/src/string-util.test.ts b/lib/platform-bible-utils/src/string-util.test.ts index c319cc8290..d5d9d3703a 100644 --- a/lib/platform-bible-utils/src/string-util.test.ts +++ b/lib/platform-bible-utils/src/string-util.test.ts @@ -19,6 +19,8 @@ import { toArray, ordinalCompare, testingStringUtils, + transformAndEnsureRegExpRegExpArray, + transformAndEnsureRegExpArray, } from './string-util'; const SHORT_SURROGATE_PAIRS_STRING = 'Look𐐷At👨‍👩‍👧‍👦👮🏽‍♀️'; @@ -612,3 +614,61 @@ describe('escapeStringRegexp', () => { expect(result).toEqual('How much \\$ for a 🦄\\?'); }); }); + +describe('transformAndEnsureRegExpRegExpArray', () => { + test('should return an empty array when input is undefined', () => { + expect(transformAndEnsureRegExpRegExpArray(undefined)).toEqual([]); + }); + + test('should convert a single string to an array with one RegExp', () => { + const input = 'test'; + const result = transformAndEnsureRegExpRegExpArray(input); + expect(result).toEqual([new RegExp('test')]); + }); + + test('should convert an array of strings to an array of RegExp objects', () => { + const input = ['test1', 'test2', 'test3']; + const result = transformAndEnsureRegExpRegExpArray(input); + expect(result).toEqual([new RegExp('test1'), new RegExp('test2'), new RegExp('test3')]); + }); + + test('should convert nested arrays of strings to arrays of RegExp arrays', () => { + const input = ['test1', ['nested1', 'nested2'], 'test2']; + const result = transformAndEnsureRegExpRegExpArray(input); + expect(result).toEqual([ + new RegExp('test1'), + [new RegExp('nested1'), new RegExp('nested2')], + new RegExp('test2'), + ]); + }); + + test('should handle an array of single strings and nested arrays', () => { + const input = ['a', ['b', 'c'], 'd']; + const result = transformAndEnsureRegExpRegExpArray(input); + expect(result).toEqual([new RegExp('a'), [new RegExp('b'), new RegExp('c')], new RegExp('d')]); + }); +}); + +describe('transformAndEnsureRegExpArray', () => { + test('should return an empty array when input is undefined', () => { + expect(transformAndEnsureRegExpArray(undefined)).toEqual([]); + }); + + test('should convert a single string to an array with one RegExp', () => { + const input = 'test'; + const result = transformAndEnsureRegExpArray(input); + expect(result).toEqual([new RegExp('test')]); + }); + + test('should convert an array of strings to an array of RegExp objects', () => { + const input = ['test1', 'test2', 'test3']; + const result = transformAndEnsureRegExpArray(input); + expect(result).toEqual([new RegExp('test1'), new RegExp('test2'), new RegExp('test3')]); + }); + + test('should handle empty strings in the input array', () => { + const input = ['', 'a', '']; + const result = transformAndEnsureRegExpArray(input); + expect(result).toEqual([new RegExp(''), new RegExp('a'), new RegExp('')]); + }); +}); diff --git a/lib/platform-bible-utils/src/string-util.ts b/lib/platform-bible-utils/src/string-util.ts index b5d057736f..f87a24aecc 100644 --- a/lib/platform-bible-utils/src/string-util.ts +++ b/lib/platform-bible-utils/src/string-util.ts @@ -7,6 +7,7 @@ import { limit as stringzLimit, substr as stringzSubstr, } from 'stringz'; +import ensureArray from './array-util'; /** * This function mirrors the `at` function from the JavaScript Standard String object. It handles @@ -569,6 +570,64 @@ export function escapeStringRegexp(string: string): string { return string.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d'); } +/** + * Transforms a string or an array of strings into an array of regular expressions, ensuring that + * the result is always an array. + * + * This function accepts a value that may be a single string, an array of strings, or `undefined`. + * It then: + * + * - Converts each string into a `RegExp` object. + * - If the input is an array containing nested arrays, it converts each string in the nested arrays + * into `RegExp` objects. + * - Ensures that the result is always an array of `RegExp` objects or arrays of `RegExp` objects. + * + * @param stringStringMaybeArray - The value to be transformed, which can be a single string, an + * array of strings or arrays of strings, or `undefined`. + * @returns An array of `RegExp` objects or arrays of `RegExp` objects. If the input is `undefined`, + * an empty array is returned. + */ +export function transformAndEnsureRegExpRegExpArray( + stringStringMaybeArray: string | (string | string[])[] | undefined, +): (RegExp | RegExp[])[] { + if (!stringStringMaybeArray) return []; + + const stringStringArray = ensureArray(stringStringMaybeArray); + + const regExpRegExpArray = stringStringArray.map((stringMaybeStringArray: string | string[]) => + Array.isArray(stringMaybeStringArray) + ? stringMaybeStringArray.map((str) => new RegExp(str)) + : new RegExp(stringMaybeStringArray), + ); + + return regExpRegExpArray; +} + +/** + * Transforms a string or an array of strings into an array of regular expressions. + * + * This function accepts a value that may be a single string, an array of strings, or `undefined`. + * It then: + * + * - Converts each string into a `RegExp` object. + * - Ensures that the result is always an array of `RegExp` objects. + * + * @param stringMaybeArray - The value to be transformed, which can be a single string, an array of + * strings, or `undefined`. + * @returns An array of `RegExp` objects. If the input is `undefined`, an empty array is returned. + */ +export function transformAndEnsureRegExpArray( + stringMaybeArray: string | string[] | undefined, +): RegExp[] { + if (!stringMaybeArray) return []; + + const stringArray = ensureArray(stringMaybeArray); + + const regExpArray = stringArray.map((str: string) => new RegExp(str)); + + return regExpArray; +} + /** This is an internal-only export for testing purposes and should not be used in development */ export const testingStringUtils = { indexOfClosestClosingCurlyBrace, diff --git a/package-lock.json b/package-lock.json index c6be9a3004..a647c71820 100644 --- a/package-lock.json +++ b/package-lock.json @@ -635,6 +635,7 @@ "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-popover": "^1.1.1", "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slider": "^1.2.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-switch": "^1.1.0", @@ -6205,23 +6206,6 @@ } } }, - "node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-collection": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.0.3.tgz", @@ -7000,23 +6984,6 @@ } } }, - "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/rect": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz", @@ -7166,6 +7133,81 @@ } } }, + "node_modules/@radix-ui/react-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.0.tgz", + "integrity": "sha512-3uBAs+egzvJBDZAzvb/n4NxxOYpnspmWxO2u5NbZ8Y6FM/NdrGSF9bop3Cf6F6C71z1rTSn8KV0Fo2ZVd79lGA==", + "dependencies": { + "@radix-ui/react-primitive": "2.0.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "dependencies": { + "@radix-ui/react-slot": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-slider": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.2.0.tgz", @@ -7373,23 +7415,6 @@ } } }, - "node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-slot": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.2.tgz", @@ -7539,20 +7564,6 @@ } } }, - "node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-use-layout-effect": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", - "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-use-previous": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", @@ -7567,23 +7578,6 @@ } } }, - "node_modules/@radix-ui/react-switch/node_modules/@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "dependencies": { - "@radix-ui/react-use-layout-effect": "1.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-tabs": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.0.4.tgz", @@ -7701,6 +7695,37 @@ } } }, + "node_modules/@radix-ui/react-use-size": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", + "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-size/node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-visually-hidden": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz", @@ -35510,14 +35535,6 @@ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==", "requires": {} - }, - "@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "requires": { - "@radix-ui/react-use-layout-effect": "1.1.0" - } } } }, @@ -35894,14 +35911,6 @@ "@radix-ui/rect": "1.1.0" } }, - "@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "requires": { - "@radix-ui/react-use-layout-effect": "1.1.0" - } - }, "@radix-ui/rect": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz", @@ -35983,6 +35992,38 @@ "react-remove-scroll": "2.5.5" } }, + "@radix-ui/react-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.0.tgz", + "integrity": "sha512-3uBAs+egzvJBDZAzvb/n4NxxOYpnspmWxO2u5NbZ8Y6FM/NdrGSF9bop3Cf6F6C71z1rTSn8KV0Fo2ZVd79lGA==", + "requires": { + "@radix-ui/react-primitive": "2.0.0" + }, + "dependencies": { + "@radix-ui/react-compose-refs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz", + "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==", + "requires": {} + }, + "@radix-ui/react-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz", + "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==", + "requires": { + "@radix-ui/react-slot": "1.1.0" + } + }, + "@radix-ui/react-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz", + "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==", + "requires": { + "@radix-ui/react-compose-refs": "1.1.0" + } + } + } + }, "@radix-ui/react-slider": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.2.0.tgz", @@ -36081,14 +36122,6 @@ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==", "requires": {} - }, - "@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "requires": { - "@radix-ui/react-use-layout-effect": "1.1.0" - } } } }, @@ -36162,25 +36195,11 @@ "@radix-ui/react-use-callback-ref": "1.1.0" } }, - "@radix-ui/react-use-layout-effect": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", - "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", - "requires": {} - }, "@radix-ui/react-use-previous": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.0.tgz", "integrity": "sha512-Z/e78qg2YFnnXcW88A4JmTtm4ADckLno6F7OXotmkQfeuCVaKuYzqAATPhVzl3delXE7CxIV8shofPn3jPc5Og==", "requires": {} - }, - "@radix-ui/react-use-size": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", - "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", - "requires": { - "@radix-ui/react-use-layout-effect": "1.1.0" - } } } }, @@ -36242,6 +36261,22 @@ "@babel/runtime": "^7.13.10" } }, + "@radix-ui/react-use-size": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz", + "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==", + "requires": { + "@radix-ui/react-use-layout-effect": "1.1.0" + }, + "dependencies": { + "@radix-ui/react-use-layout-effect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz", + "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==", + "requires": {} + } + } + }, "@radix-ui/react-visually-hidden": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.0.3.tgz", @@ -48136,6 +48171,7 @@ "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-popover": "^1.1.1", "@radix-ui/react-select": "^2.0.0", + "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slider": "^1.2.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-switch": "^1.1.0", diff --git a/src/declarations/papi-shared-types.ts b/src/declarations/papi-shared-types.ts index fc4f962d1e..4b48fd3426 100644 --- a/src/declarations/papi-shared-types.ts +++ b/src/declarations/papi-shared-types.ts @@ -47,6 +47,8 @@ declare module 'papi-shared-types' { 'test.throwError': (message: string) => void; 'platform.restartExtensionHost': () => Promise; 'platform.quit': () => Promise; + 'platform.openProjectSettings': (webViewId: string) => Promise; + 'platform.openUserSettings': () => Promise; // These commands are provided in `extension-host.ts`. They are only here because I needed them to // use in other places, but building `papi-dts` wasn't working because it didn't see // `extension-host.ts` diff --git a/src/extension-host/data/menu.data.json b/src/extension-host/data/menu.data.json index 890739e2a2..3c98878471 100644 --- a/src/extension-host/data/menu.data.json +++ b/src/extension-host/data/menu.data.json @@ -51,7 +51,7 @@ "localizeNotes": "Application main menu > Project > Settings", "group": "platform.projectSettings", "order": 1, - "command": "platform.settings" + "command": "platform.openUserSettings" }, { "label": "%mainMenu_exit%", @@ -96,6 +96,13 @@ "group": "platform.projectTop", "order": 2, "command": "platform.assignments" + }, + { + "label": "%webView_openProjectSettings%", + "localizeNotes": "Web view main menu > Project > Open Project Settings...", + "group": "platform.projectTop", + "order": 3, + "command": "platform.openProjectSettings" } ] }, diff --git a/src/extension-host/services/project-settings.service-host.ts b/src/extension-host/services/project-settings.service-host.ts index 0d25ea94cd..aa7df823ff 100644 --- a/src/extension-host/services/project-settings.service-host.ts +++ b/src/extension-host/services/project-settings.service-host.ts @@ -14,7 +14,9 @@ import { import { serializeRequestType } from '@shared/utils/util'; import { ProjectSettingNames, ProjectSettingTypes } from 'papi-shared-types'; import { includes, isLocalizeKey, isString } from 'platform-bible-utils'; -import ProjectSettingsDocumentCombiner from '@shared/utils/project-settings-document-combiner'; +import ProjectSettingsDocumentCombiner, { + LocalizedProjectSettingsContributionInfo, +} from '@shared/utils/project-settings-document-combiner'; /** * Object that keeps track of all project settings contributions in the platform. To listen to @@ -117,11 +119,18 @@ async function getDefault( return localizedProjectSettingInfo.default as ProjectSettingTypes[ProjectSettingName]; } +async function getLocalizedContributionInfo(): Promise< + LocalizedProjectSettingsContributionInfo | undefined +> { + return projectSettingsDocumentCombiner.getLocalizedProjectSettingsContributionInfo(); +} + const { registerValidator } = projectSettingsServiceObjectToProxy; const projectSettingsService: IProjectSettingsService = { isValid, getDefault, registerValidator, + getLocalizedContributionInfo, }; /** This is an internal-only export for testing purposes and should not be used in development */ diff --git a/src/extension-host/services/settings.service-host.ts b/src/extension-host/services/settings.service-host.ts index 7f96913000..4bd62b15e4 100644 --- a/src/extension-host/services/settings.service-host.ts +++ b/src/extension-host/services/settings.service-host.ts @@ -32,6 +32,8 @@ import { joinUriPaths } from '@node/utils/util'; import * as nodeFS from '@node/services/node-file-system.service'; import { serializeRequestType } from '@shared/utils/util'; import SettingsDocumentCombiner from '@shared/utils/settings-document-combiner'; +import { LocalizedSettingsContributionInfo } from '@shared/utils/settings-document-combiner-base'; +import { dataProviders } from './papi-backend.service'; const SETTINGS_FILE_URI = joinUriPaths('data://', 'settings.json'); @@ -105,33 +107,6 @@ async function getDefaultValueForKey( return localizedSettingInfo.default as SettingTypes[SettingName]; } -async function validateSetting( - key: SettingName, - newValue: SettingTypes[SettingName], - currentValue: SettingTypes[SettingName], - allChanges?: Partial, -): Promise { - if (key in coreSettingsValidators) { - const settingValidator = coreSettingsValidators[key]; - if (settingValidator) return settingValidator(newValue, currentValue, allChanges ?? {}); - // If there is no validator just let the change go through - return true; - } - try { - return await networkService.request( - serializeRequestType(CATEGORY_EXTENSION_SETTING_VALIDATOR, key), - newValue, - currentValue, - allChanges ?? {}, - ); - } catch (error) { - // If there is no validator just let the change go through - const missingValidatorMsg = `No handler was found to process the request of type`; - if (includes(`${error}`, missingValidatorMsg)) return true; - throw error; - } -} - class SettingDataProviderEngine extends DataProviderEngine< SettingDataTypes & { @@ -163,6 +138,14 @@ class SettingDataProviderEngine ); } + // eslint-disable-next-line class-methods-use-this + @dataProviders.decorators.ignore + async getLocalizedSettingsContributionInfo(): Promise< + LocalizedSettingsContributionInfo | undefined + > { + return settingsDocumentCombiner.getLocalizedSettingsContributionInfo(); + } + async get( key: SettingName, ): Promise { @@ -180,7 +163,7 @@ class SettingDataProviderEngine newSetting: SettingTypes[SettingName], ): Promise> { try { - if (!(await validateSetting(key, newSetting, await this.get(key)))) + if (!(await this.validateSetting(key, newSetting, await this.get(key)))) throw new Error('validation failed'); this.settingsData[key] = newSetting; @@ -191,6 +174,34 @@ class SettingDataProviderEngine return true; } + // eslint-disable-next-line class-methods-use-this + async validateSetting( + key: SettingName, + newValue: SettingTypes[SettingName], + currentValue: SettingTypes[SettingName], + allChanges?: Partial, + ): Promise { + if (key in coreSettingsValidators) { + const settingValidator = coreSettingsValidators[key]; + if (settingValidator) return settingValidator(newValue, currentValue, allChanges ?? {}); + // If there is no validator just let the change go through + return true; + } + try { + return await networkService.request( + serializeRequestType(CATEGORY_EXTENSION_SETTING_VALIDATOR, key), + newValue, + currentValue, + allChanges ?? {}, + ); + } catch (error) { + // If there is no validator just let the change go through + const missingValidatorMsg = `No handler was found to process the request of type`; + if (includes(`${error}`, missingValidatorMsg)) return true; + throw error; + } + } + async reset(key: SettingName): Promise { try { if (!(key in this.settingsData)) { diff --git a/src/renderer/components/docking/platform-dock-layout-storage.util.ts b/src/renderer/components/docking/platform-dock-layout-storage.util.ts index af915b94a4..15a952e2e3 100644 --- a/src/renderer/components/docking/platform-dock-layout-storage.util.ts +++ b/src/renderer/components/docking/platform-dock-layout-storage.util.ts @@ -37,9 +37,11 @@ import { loadRunBasicChecksTab, } from '@renderer/components/run-basic-checks-dialog/run-basic-checks-tab.component'; import { - TAB_TYPE_SETTINGS_DIALOG, - loadSettingsDialog, -} from '@renderer/components/settings-dialog/settings-tab.component'; + TAB_TYPE_PROJECT_SETTINGS_TAB, + loadProjectSettingsTab, + TAB_TYPE_USER_SETTINGS_TAB, + loadUserSettingsTab, +} from '@renderer/components/settings-tabs/settings-tab.component'; import { TAB_TYPE_WEBVIEW, loadWebViewTab, @@ -71,7 +73,8 @@ if (globalThis.isNoisyDevModeEnabled) { [TAB_TYPE_WEBVIEW, loadWebViewTab], [TAB_TYPE_DOWNLOAD_UPDATE_PROJECT_DIALOG, loadDownloadUpdateProjectTab], [TAB_TYPE_EXTENSION_MANAGER, loadExtensionManagerTab], - [TAB_TYPE_SETTINGS_DIALOG, loadSettingsDialog], + [TAB_TYPE_USER_SETTINGS_TAB, loadUserSettingsTab], + [TAB_TYPE_PROJECT_SETTINGS_TAB, loadProjectSettingsTab], [TAB_TYPE_RUN_BASIC_CHECKS, loadRunBasicChecksTab], [TAB_TYPE_CHECKING_RESULTS_LIST, loadCheckingResultsListTab], ...Object.entries(DIALOGS).map( diff --git a/src/renderer/components/platform-bible-menu.commands.tsx b/src/renderer/components/platform-bible-menu.commands.tsx index b0f3b920b7..267e50aa80 100644 --- a/src/renderer/components/platform-bible-menu.commands.tsx +++ b/src/renderer/components/platform-bible-menu.commands.tsx @@ -28,9 +28,6 @@ export function handleMenuCommand(command: Command, tabId?: string) { case 'platform.openTextCollection': logger.info(`TODO: display text collection modal. tabId: ${tabId}`); break; - case 'platform.settings': - logger.info(`TODO: display settings. tabId: ${tabId}`); - break; case 'platform.visitSupportPage': VisitPage('https://support.bible'); break; diff --git a/src/renderer/components/platform-bible-menu.data.ts b/src/renderer/components/platform-bible-menu.data.ts index a2bf2b7b0a..ef0842632f 100644 --- a/src/renderer/components/platform-bible-menu.data.ts +++ b/src/renderer/components/platform-bible-menu.data.ts @@ -88,7 +88,7 @@ const supportAndDevelopmentMenuLayout: LocalizedMainMenu = { localizeNotes: 'Main application menu > Paratext column > Settings', group: 'platform.misc', order: 1, - command: 'platform.settings', + command: 'platform.openUserSettings', }, { label: 'Reload Extensions', diff --git a/src/renderer/components/settings-dialog/settings-tab.component.scss b/src/renderer/components/settings-dialog/settings-tab.component.scss deleted file mode 100644 index 4953dec930..0000000000 --- a/src/renderer/components/settings-dialog/settings-tab.component.scss +++ /dev/null @@ -1,33 +0,0 @@ -.settings-dialog { - display: flex; - flex-direction: column; - height: 100%; - box-sizing: border-box; -} - -.settings-search-bar { - padding: 2%; - display: block; - box-sizing: border-box; -} - -.settings-tabs-and-content { - display: flex; - flex: 1; - box-sizing: border-box; - overflow: hidden; -} - -.settings-tabs { - width: 20%; - flex-shrink: 0; - box-sizing: border-box; - overflow-y: auto; -} - -.settings-tab-panel { - width: 80%; - flex: 1; - overflow-y: auto; - box-sizing: border-box; -} diff --git a/src/renderer/components/settings-dialog/settings-tab.component.tsx b/src/renderer/components/settings-dialog/settings-tab.component.tsx deleted file mode 100644 index b03e93475b..0000000000 --- a/src/renderer/components/settings-dialog/settings-tab.component.tsx +++ /dev/null @@ -1,422 +0,0 @@ -import { - Box, - List, - ListItem, - ListItemText, - MenuItem, - Select, - Tab, - Tabs, - Typography, -} from '@mui/material'; -import { SavedTabInfo, TabInfo } from '@shared/models/docking-framework.model'; -import { - SyntheticEvent, - useState, - createElement, - FunctionComponent, - useCallback, - useMemo, -} from 'react'; -import { Checkbox, SearchBar, TextField } from 'platform-bible-react'; -import TabPanel from '@renderer/components/tab-panel.component'; -import './settings-tab.component.scss'; -import logger from '@shared/services/logger.service'; - -export const TAB_TYPE_SETTINGS_DIALOG = 'settings-dialog'; - -type SettingsProperties = { - label: string; - description?: string; - default: unknown; -}; - -// Each settings group maps to a tab -type SettingsGroup = { - label: string; - description?: string; - properties: { [settingId: string]: SettingsProperties }; -}; - -type SettingProps = { - setting: T; - setSetting: (value: T) => void; -}; - -type SettingsContribution = { [extensionId: string]: SettingsGroup[] }; -type SettingsValues = { [settingId: string]: unknown }; -type SettingsComponents = { - // When adding unknown here the components in fetchSettingsComponents all error because unknown doesn't match well in generics - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [settingId: string]: FunctionComponent>; -}; - -// Returns mock data -// Issue #502 makes collection of this data possible -function fetchSettingsContributions(): SettingsContribution { - return { - 'platform.coreSettings': [ - { - label: 'Display', - description: 'Platform.Bible display settings', - properties: { - 'platform.interfaceLanguage': { - label: 'Interface Language', - description: 'Language for all menus, dialogs, buttons, etc', - default: 'English', - }, - 'platform.highlightCurrentVerse': { - label: 'Highlight Current Verse', - description: 'Allows you to easily see the current verse in all windows', - default: true, - }, - 'platform.brightnessOfHighlight': { - label: 'Brightness of word or verse highlights', - description: - 'Affects all highlights (e.g. current verse, biblical terms, parallel passages)', - default: 'Light', - }, - 'platform.displayFloatingWindows': { - label: 'Display floating windows "always on top"', - description: 'Prevents floating windows from becoming hidden', - default: true, - }, - 'platform.hardwareAcceleration': { - label: 'Enable hardware acceleration', - description: 'Disable if you have display problems (e.g. text areas are black)', - default: true, - }, - }, - }, - { - label: 'Behavior', - description: 'Platform.Bible behavior settings', - properties: { - 'platform.scrollScripture': { - label: 'Scroll scripture with any compatible applications', - description: 'Compatible applications include Logos and BART', - default: true, - }, - 'platform.useMarker': { - label: 'Use marker pop-up', - description: 'Suggest USFM markers when typing', - default: true, - }, - 'platform.dragAndDrop': { - label: 'Enable Drag-and-Drop in Text Windows', - description: 'Use to add biblical terms renderings or to cut and paste text', - default: true, - }, - 'platform.autoAssignProjectNotes': { - label: 'Auto-assign project notes when replying', - description: 'Automatically assign a note to the teammate who assigned it to you', - default: true, - }, - 'platform.autosave': { - label: 'Autosave', - description: - 'Save scripture book without asking when moving to a different book or chapter', - default: true, - }, - 'platform.khmerOnly': { - label: 'Khmer only: Support complex line breaks', - description: 'Only needed for Khmer projects that use spaces', - default: true, - }, - }, - }, - { - label: 'Internet', - description: 'Platform.Bible internet settings', - properties: { - 'platform.internetUse': { - label: 'Internet usage', - description: - 'Enable unrestricted usage, adjust usage to support sensitive projects, or disable usage', - default: 'Allow unrestricted internet use', - }, - 'platform.proxySettings': { - label: 'Proxy Settings', - description: - 'Normally leave empty; network administrator can fill this out if you need a proxy server', - default: undefined, - }, - 'platform.shareParatextData': { - label: 'Share Paratext Data', - description: - 'Let Paratext developers know how I use Paratext to help with future development', - default: true, - }, - }, - }, - ], - - 'extension1.settings': [ - { - label: 'extension1 Test', - description: 'extension1 settings', - properties: { - 'extension1.color': { - label: 'Select color', - description: 'This makes everything for extension1 the color you choose', - default: 'blue', - }, - }, - }, - ], - }; -} - -// Returns mock data -// Issue #502 makes collection of this data possible -function fetchSettingsValues(): SettingsValues { - return { - 'platform.interfaceLanguage': 'English', - 'platform.highlightCurrentVerse': true, - 'platform.brightnessOfHighlight': 'Light', - 'platform.displayFloatingWindows': true, - 'platform.hardwareAcceleration': true, - 'platform.scrollScripture': true, - 'platform.useMarker': true, - 'platform.dragAndDrop': true, - 'platform.autoAssignProjectNotes': true, - 'platform.autosave': true, - 'platform.khmerOnly': true, - 'platform.internetUse': 'Allow unrestricted internet use', - 'platform.shareParatextData': true, - 'platform.proxySettings': { Host: '', Port: 0, Username: '', Password: '' }, - }; -} - -const options = ['English', 'Spanish', 'French']; - -// Example component of a platform setting - shows how SettingProps would be used -function InterfaceLanguageSetting({ setting, setSetting }: SettingProps) { - return ( - - ); -} - -// Example component of a platform setting -function ProxySettings({ - setting, - setSetting, -}: SettingProps<{ - Host: string; - Port: number; - Username: string; - Password: string; -}>) { - return ( - -
- setSetting({ ...setting, Host: e.target.value })} - /> - setSetting({ ...setting, Port: e.target.value as unknown as number })} - /> - setSetting({ ...setting, Username: e.target.value })} - /> - setSetting({ ...setting, Password: e.target.value })} - /> -
-
- ); -} - -// Example component of a platform setting -function CheckboxSetting({ setting, setSetting }: SettingProps) { - return setSetting(e.target.checked)} />; -} - -// Example component of a platform setting -// Since this is a blanket component for all settings that need a Select, the only option included is the default value of the setting -// Settings components will look more like InterfaceLanguageSetting, with appropriate options -function SelectSetting({ setting, setSetting }: SettingProps) { - return ( - - ); -} - -// Returns mock data -// Issue #503 makes collection of this data possible -function fetchSettingsComponents(): SettingsComponents { - return { - 'platform.interfaceLanguage': InterfaceLanguageSetting, - 'platform.highlightCurrentVerse': CheckboxSetting, - 'platform.brightnessOfHighlight': SelectSetting, - 'platform.displayFloatingWindows': CheckboxSetting, - 'platform.hardwareAcceleration': CheckboxSetting, - 'platform.scrollScripture': CheckboxSetting, - 'platform.useMarker': CheckboxSetting, - 'platform.dragAndDrop': CheckboxSetting, - 'platform.autoAssignProjectNotes': CheckboxSetting, - 'platform.autosave': CheckboxSetting, - 'platform.khmerOnly': CheckboxSetting, - 'platform.internetUse': SelectSetting, - 'platform.shareParatextData': CheckboxSetting, - 'platform.proxySettings': ProxySettings, - }; -} - -type SettingsDialogProps = { - /** Settings "metadata" */ - contributions: SettingsContribution; - - /** Object that stores the current value of the setting with specific settingId */ - settingValues: SettingsValues; - - /** Object that stores the components of the setting with specific settingId */ - components: SettingsComponents; -}; - -export default function SettingsDialog({ - contributions, - settingValues, - components, -}: SettingsDialogProps) { - const fetchSettingsGroups = useCallback(() => { - const contributionEntries = Object.entries(contributions); // entries = [extensionId, SettingsGroup[]][] - const groups: SettingsGroup[] = []; - contributionEntries.map((entry) => entry[1].map((group) => groups.push(group))); // entry = [extensionId, SettingsGroup[]] - return groups; - }, [contributions]); - - const settingsGroups: SettingsGroup[] = useMemo( - () => fetchSettingsGroups(), - [fetchSettingsGroups], - ); - - const [tabValue, setTabValue] = useState(settingsGroups[0].label); - const [searchQuery, setSearchQuery] = useState(''); - - const fetchSettings = useCallback( - (group: SettingsGroup) => { - const settingKeys: string[] = []; - Object.keys(group.properties).map((settingKey) => - group.properties[settingKey].label.includes(searchQuery) || - group.properties[settingKey].description?.includes(searchQuery) - ? settingKeys.push(settingKey) - : undefined, - ); - return settingKeys; - }, - [searchQuery], - ); - - const handleTabChange = (_event: SyntheticEvent, newValue: string) => { - setTabValue(newValue); - }; - - const handleSearchInput = (newSearchTerm: string) => { - setSearchQuery(newSearchTerm); - }; - - const setSettingValue = useCallback((settingKey: string, value: unknown) => { - return logger.info(`Set setting ${settingKey} to ${value}`); - }, []); - - return ( -
-
- -
-
-
- - {settingsGroups.map((group) => ( - - ))} - -
- {settingsGroups.map((group) => ( - - - {fetchSettings(group).map((settingKey) => ( - - - {components[settingKey] ? ( - createElement(components[settingKey], { - setting: settingValues[settingKey], - setSetting: (value: unknown) => setSettingValue(settingKey, value), - }) - ) : ( - - Setting Action Missing - - )} - - ))} - - - ))} -
-
- ); -} - -export const loadSettingsDialog = (savedTabInfo: SavedTabInfo): TabInfo => { - const settingsContributions = fetchSettingsContributions(); - const settingsKeysValues = fetchSettingsValues(); - const settingsComponents = fetchSettingsComponents(); - - return { - ...savedTabInfo, - tabTitle: 'Settings', - content: ( - - ), - }; -}; diff --git a/src/renderer/components/settings-tabs/settings-components/project-or-user-settings-list.component.tsx b/src/renderer/components/settings-tabs/settings-components/project-or-user-settings-list.component.tsx new file mode 100644 index 0000000000..b600aa9591 --- /dev/null +++ b/src/renderer/components/settings-tabs/settings-components/project-or-user-settings-list.component.tsx @@ -0,0 +1,86 @@ +import { Localized, ProjectSettingProperties, SettingProperties } from 'platform-bible-utils'; +import { SettingsList, SettingsListHeader } from 'platform-bible-react'; +import { useMemo } from 'react'; +import { ProjectSettingNames, SettingNames } from 'papi-shared-types'; +import UserSetting from './user-setting.component'; +import ProjectSetting from './project-setting.component'; +import { ProjectSettingValues, UserSettingValues } from './setting.component'; + +/** Properties for a settings list component that displays either project or user settings */ +type ProjectOrUserSettingsListProps = { + /** Properties for either a project setting group or user setting group */ + settingProperties: Localized | Localized; + /** Optional projectId, supplied if the list is for project settings */ + projectId?: string; + /** Current search query to filter the list by */ + searchQuery: string; + /** Settings group label */ + groupLabel: string; + /** Optional settings group description */ + groupDescription?: string; +}; + +/** + * Filters and displays a list of settings based on a search query and whether it's for project or + * user settings, rendering either `ProjectSetting` or `UserSetting` components accordingly. + */ +export default function ProjectOrUserSettingsList({ + settingProperties, + projectId, + searchQuery, + groupLabel, + groupDescription, +}: ProjectOrUserSettingsListProps) { + const filteredSettingsProperties = useMemo((): + | Localized + | Localized => { + const filteredProperties: Localized | Localized = + Object.fromEntries( + Object.entries(settingProperties).filter( + ([, property]) => + property.label.toLowerCase().includes(searchQuery.toLowerCase()) || + property.description?.toLowerCase().includes(searchQuery.toLowerCase()), + ), + ); + + return filteredProperties; + }, [searchQuery, settingProperties]); + + return ( + + {Object.keys(filteredSettingsProperties).length > 0 ? ( + + ) : undefined} +
+ {Object.entries(filteredSettingsProperties).map(([key, property]) => + projectId ? ( + + ) : ( + + ), + )} +
+
+ ); +} diff --git a/src/renderer/components/settings-tabs/settings-components/project-setting.component.tsx b/src/renderer/components/settings-tabs/settings-components/project-setting.component.tsx new file mode 100644 index 0000000000..ee347ec241 --- /dev/null +++ b/src/renderer/components/settings-tabs/settings-components/project-setting.component.tsx @@ -0,0 +1,42 @@ +import { useProjectSetting } from '@renderer/hooks/papi-hooks'; +import { ProjectSettingNames, ProjectSettingTypes } from 'papi-shared-types'; +import projectSettingsService from '@shared/services/project-settings.service'; +import Setting, { ProjectSettingProps, ProjectSettingValues } from './setting.component'; + +/** + * Provides a project-specific setting component by using the `Setting` component with + * project-specific validation + */ +export default function ProjectSetting({ + settingKey, + label, + description, + defaultSetting, + projectId, +}: ProjectSettingProps) { + const [setting, setSetting, , isLoading] = useProjectSetting( + projectId, + settingKey, + defaultSetting, + ); + + const validateProjectSetting = async ( + currentSettingKey: ProjectSettingNames, + newValue: ProjectSettingValues, + currentValue: ProjectSettingValues, + ) => { + return projectSettingsService.isValid(currentSettingKey, newValue, currentValue); + }; + + return ( + + ); +} diff --git a/src/renderer/components/settings-tabs/settings-components/setting.component.tsx b/src/renderer/components/settings-tabs/settings-components/setting.component.tsx new file mode 100644 index 0000000000..06d02d6b62 --- /dev/null +++ b/src/renderer/components/settings-tabs/settings-components/setting.component.tsx @@ -0,0 +1,195 @@ +import { ChangeEvent, useCallback, useState } from 'react'; +import { + ProjectSettingNames, + ProjectSettingTypes, + SettingNames, + SettingTypes, +} from 'papi-shared-types'; +import { Checkbox, Input, SettingsListItem } from 'platform-bible-react'; +import { debounce, getErrorMessage } from 'platform-bible-utils'; +import { DataProviderUpdateInstructions } from '@shared/models/data-provider.model'; +import { SettingDataTypes } from '@shared/services/settings.service-model'; + +/** Props shared between the user and project setting components */ +type BaseSettingProps = { + /** Key of the setting */ + settingKey: TSettingKey; + /** Setting label */ + label: string; + /** Setting description */ + description?: string; + /** Default value of the setting */ + defaultSetting: TSettingValue; +}; + +/** + * Combines properties and controls with optional validation functions for both project and user + * settings + */ +type SettingProps = TProps & + TControls & { + validateProjectSetting?: TValidateProject; + validateUserSetting?: TValidateUser; + }; + +/** Values of ProjectSettingTypes */ +export type ProjectSettingValues = ProjectSettingTypes[keyof ProjectSettingTypes]; + +/** Props for the ProjectSetting component */ +export type ProjectSettingProps = BaseSettingProps & { + projectId: string; +}; + +/** Values from the useProjectSetting hook to manage the setting */ +type ProjectSettingsControls = { + setting: ProjectSettingValues; + // Necessary for flexibility in handleChangeSetting, ProjectSettingValues and + // UserSettingValues are not the same so it couldn't assign + // eslint-disable-next-line @typescript-eslint/no-explicit-any + setSetting: ((newSetting: any) => void) | undefined; + isLoading: boolean; +}; + +/** Values of SettingTypes */ +export type UserSettingValues = SettingTypes[keyof SettingTypes]; + +/** Props for the UserSetting component */ +export type UserSettingProps = BaseSettingProps; + +/** Values from the useSetting hook to manage the setting */ +type UserSettingsControls = { + setting: UserSettingValues; + // Necessary for flexibility in handleChangeSetting, ProjectSettingValues and + // UserSettingValues are not the same so it couldn't assign + // eslint-disable-next-line @typescript-eslint/no-explicit-any + setSetting: (newSetting: any) => Promise>; + isLoading: boolean; +}; + +/** + * Represents either project or user settings, includes properties, controls, and validation + * function + */ +type CombinedSettingProps = + | SettingProps< + Omit, + ProjectSettingsControls, + // Necessary for flexibility in handleChangeSetting, couldn't use unknown + // and keep types in ProjectSetting component + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (settingKey: any, newValue: any, currentValue: any) => Promise, + never + > + | SettingProps< + Omit, + UserSettingsControls, + never, + // Necessary for flexibility in handleChangeSetting, couldn't use unknown + // and keep types in ProjectSetting component + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (settingKey: any, newValue: any, currentValue: any) => Promise + >; + +/** + * Renders a setting component based on the type of setting (string, number, boolean, or object) and + * includes validating the setting and displaying errors + */ +export default function Setting({ + settingKey, + setting, + setSetting, + isLoading, + validateUserSetting, + validateProjectSetting, + label, + description, +}: CombinedSettingProps) { + const validateSetting = validateUserSetting || validateProjectSetting; + + const [errorMessage, setErrorMessage] = useState(undefined); + + const handleChangeSetting = async (event: ChangeEvent) => { + let newValue: UserSettingValues | ProjectSettingValues; + + if (event.target.type === 'checkbox') { + newValue = event.target.checked; + } else { + const { value } = event.target; + if (typeof setting === 'number') { + const numericValue = parseInt(value, 10); + if (Number.isNaN(numericValue)) { + setErrorMessage('Invalid number'); + return; + } + newValue = numericValue; + } else if (typeof setting === 'boolean' || typeof setting === 'string') { + newValue = value; + } else if (typeof setting === 'object') { + try { + newValue = JSON.parse(value); + } catch { + setErrorMessage('Invalid JSON'); + return; + } + } else { + newValue = value; + } + } + + try { + if (validateSetting && (await validateSetting(settingKey, newValue, setting))) { + setErrorMessage(undefined); + if (setSetting) setSetting(newValue); + } else { + setErrorMessage('Invalid value'); + } + } catch (error) { + setErrorMessage(getErrorMessage(error)); + } + }; + + const debouncedHandleChange = debounce(handleChangeSetting, 500); + + const generateComponent = useCallback(() => { + let component =

No setting component

; + + if (typeof setting === 'string' || typeof setting === 'number') + component = ( + + ); + else if (typeof setting === 'boolean') + component = ( + debouncedHandleChange} + isDefaultChecked={setting} + /> + ); + else if (typeof setting === 'object') + component = ( + + ); + + return ( +
+ {component} + {errorMessage &&
{errorMessage}
} +
+ ); + }, [setting, settingKey, debouncedHandleChange, errorMessage]); + + return ( + + {generateComponent()} + + ); +} diff --git a/src/renderer/components/settings-tabs/settings-components/user-setting.component.tsx b/src/renderer/components/settings-tabs/settings-components/user-setting.component.tsx new file mode 100644 index 0000000000..a09c3219b6 --- /dev/null +++ b/src/renderer/components/settings-tabs/settings-components/user-setting.component.tsx @@ -0,0 +1,40 @@ +import { useSetting } from '@renderer/hooks/papi-hooks'; +import { SettingNames, SettingTypes } from 'papi-shared-types'; +import settingsService from '@shared/services/settings.service'; +import Setting, { UserSettingProps, UserSettingValues } from './setting.component'; + +/** + * Provides a user-specific setting component by utilizing the `Setting` component with + * user-specific validation + */ +export default function UserSetting({ + settingKey, + label, + description, + defaultSetting, +}: UserSettingProps) { + const [setting, setSetting, , isLoading] = useSetting( + settingKey, + defaultSetting, + ); + + const validateUserSetting = async ( + currentSettingKey: SettingNames, + newValue: UserSettingValues, + currentValue: UserSettingValues, + ) => { + return settingsService.validateSetting(currentSettingKey, newValue, currentValue); + }; + + return ( + + ); +} diff --git a/src/renderer/components/settings-tabs/settings-tab.component.scss b/src/renderer/components/settings-tabs/settings-tab.component.scss new file mode 100644 index 0000000000..4fbaec5ce0 --- /dev/null +++ b/src/renderer/components/settings-tabs/settings-tab.component.scss @@ -0,0 +1,3 @@ +.settings-tab { + padding: 2%; +} diff --git a/src/renderer/components/settings-tabs/settings-tab.component.tsx b/src/renderer/components/settings-tabs/settings-tab.component.tsx new file mode 100644 index 0000000000..44401a0eb4 --- /dev/null +++ b/src/renderer/components/settings-tabs/settings-tab.component.tsx @@ -0,0 +1,127 @@ +import { ReactNode, useCallback, useMemo, useState } from 'react'; +import { NavigationContentSearch, TabKeyValueContent, usePromise } from 'platform-bible-react'; +import { Localized, ProjectSettingsGroup, SettingsGroup } from 'platform-bible-utils'; +import { SavedTabInfo, TabInfo } from '@shared/models/docking-framework.model'; +import projectSettingsService, { + filterProjectSettingsContributionsByProjectInterfaces, +} from '@shared/services/project-settings.service'; +import projectLookupService from '@shared/services/project-lookup.service'; +import settingsService from '@shared/services/settings.service'; +import ProjectOrUserSettingsList from './settings-components/project-or-user-settings-list.component'; +import './settings-tab.component.scss'; + +export const TAB_TYPE_PROJECT_SETTINGS_TAB = 'project-settings-tab'; +export const TAB_TYPE_USER_SETTINGS_TAB = 'user-settings-tab'; + +type SettingsTabProps = { + projectId?: string; +}; + +export default function SettingsTab({ projectId }: SettingsTabProps) { + const [settingsContributions, isLoadingSettingsContributions] = usePromise( + useCallback(async () => { + if (projectId) { + const allProjectSettingsContributionInfo = ( + await projectSettingsService.getLocalizedContributionInfo() + )?.contributions; + + const projectInterfacesFromProjectId = ( + await projectLookupService.getMetadataForProject(projectId) + ).projectInterfaces; + + const filteredContributions = await filterProjectSettingsContributionsByProjectInterfaces( + allProjectSettingsContributionInfo, + projectInterfacesFromProjectId, + ); + return filteredContributions; + } + return (await settingsService.getLocalizedSettingsContributionInfo())?.contributions; + }, [projectId]), + useMemo(() => { + return undefined; + }, []), + ); + + const [searchQuery, setSearchQuery] = useState(''); + + const handleSearchInput = (newSearchTerm: string) => { + setSearchQuery(newSearchTerm); + }; + + const generateFilteredTabContent = useCallback( + (settingsGroup: Localized | Localized): ReactNode => { + return ( + + ); + }, + [projectId, searchQuery], + ); + + const generateTabList = useCallback(() => { + const tabList: TabKeyValueContent[] = []; + + if (!settingsContributions) return undefined; + + Object.entries(settingsContributions).map( + ([, settingsGroups]) => + settingsGroups && + Object.entries(settingsGroups).map(([, settingsGroup]) => + tabList.push({ + key: settingsGroup.label, + value: settingsGroup.label, + content: generateFilteredTabContent(settingsGroup), + }), + ), + ); + + return tabList; + }, [generateFilteredTabContent, settingsContributions]); + + if (!settingsContributions) return
No Settings
; + if (isLoadingSettingsContributions) return
Loading Settings
; + + return ( +
+ +
+ ); +} + +export type SettingsTabData = SettingsTabProps; + +export const loadProjectSettingsTab = (savedTabInfo: SavedTabInfo): TabInfo => { + const typedSavedTabInfo = { + id: savedTabInfo.id, + tabType: savedTabInfo.tabType, + // We use this type in the addTab function, but it doesn't know what data is here + // eslint-disable-next-line no-type-assertion/no-type-assertion + data: savedTabInfo.data as SettingsTabData, + }; + + return { + ...savedTabInfo, + tabTitle: 'Project Settings', + content: , + }; +}; + +export const loadUserSettingsTab = (savedTabInfo: SavedTabInfo): TabInfo => { + return { + ...savedTabInfo, + tabTitle: 'User Settings', + content: , + }; +}; diff --git a/src/renderer/services/web-view.service-host.ts b/src/renderer/services/web-view.service-host.ts index 8abdc76d6b..b767709fe7 100644 --- a/src/renderer/services/web-view.service-host.ts +++ b/src/renderer/services/web-view.service-host.ts @@ -56,6 +56,13 @@ import { getFullWebViewStateById, setFullWebViewStateById, } from '@renderer/services/web-view-state.service'; +import { registerCommand } from '@shared/services/command.service'; +import { CommandNames } from 'papi-shared-types'; +import { + type SettingsTabData, + TAB_TYPE_PROJECT_SETTINGS_TAB, + TAB_TYPE_USER_SETTINGS_TAB, +} from '@renderer/components/settings-tabs/settings-tab.component'; /** Emitter for when a webview is added */ const onDidAddWebViewEmitter = createNetworkEventEmitter( @@ -1246,6 +1253,45 @@ const papiWebViewService: WebViewServiceType = { getSavedWebViewDefinition, }; +async function openProjectSettingsTab(webViewId: string): Promise { + const settingsTabId = newGuid(); + const projectIdFromWebView = (await getSavedWebViewDefinition(webViewId))?.projectId; + + if (!projectIdFromWebView) return undefined; + + return addTab( + { + id: settingsTabId, + tabType: TAB_TYPE_PROJECT_SETTINGS_TAB, + data: { + projectId: projectIdFromWebView, + }, + }, + { + type: 'float', + position: 'center', + floatSize: { height: 400, width: 500 }, + }, + ); +} + +async function openUserSettingsTab(): Promise { + const settingsTabId = newGuid(); + + return addTab( + { + id: settingsTabId, + tabType: TAB_TYPE_USER_SETTINGS_TAB, + data: {}, + }, + { + type: 'float', + position: 'center', + floatSize: { height: 400, width: 500 }, + }, + ); +} + /** Register the network object that backs the PAPI webview service */ // To use this service, you should use `web-view.service.ts` export async function startWebViewService(): Promise { @@ -1254,4 +1300,17 @@ export async function startWebViewService(): Promise { NETWORK_OBJECT_NAME_WEB_VIEW_SERVICE, papiWebViewService, ); + + // This map should allow any functions because commands can be any function type + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const commandHandlers: { [commandName: string]: (...args: any[]) => any } = { + 'platform.openProjectSettings': openProjectSettingsTab, + 'platform.openUserSettings': openUserSettingsTab, + }; + + Object.entries(commandHandlers).forEach(([commandName, handler]) => { + // Re-assert type after passing through `forEach`. + // eslint-disable-next-line no-type-assertion/no-type-assertion + registerCommand(commandName as CommandNames, handler); + }); } diff --git a/src/renderer/testing/test-layout.data.ts b/src/renderer/testing/test-layout.data.ts index 354df3cd67..1739b0b874 100644 --- a/src/renderer/testing/test-layout.data.ts +++ b/src/renderer/testing/test-layout.data.ts @@ -7,7 +7,6 @@ import { TAB_TYPE_TEST } from '@renderer/testing/test-panel.component'; // import { TAB_TYPE_DOWNLOAD_UPDATE_PROJECT_DIALOG } from '@renderer/components/project-dialogs/download-update-project-tab.component'; // import { TAB_TYPE_OPEN_MULTIPLE_PROJECTS_DIALOG } from '@renderer/components/project-dialogs/open-multiple-projects-tab.component'; // import { TAB_TYPE_EXTENSION_MANAGER } from '@renderer/components/extension-manager/extension-manager-tab.component'; -import { TAB_TYPE_SETTINGS_DIALOG } from '@renderer/components/settings-dialog/settings-tab.component'; import { TAB_TYPE_RUN_BASIC_CHECKS } from '@renderer/components/run-basic-checks-dialog/run-basic-checks-tab.component'; import { ScriptureItemDetail } from 'platform-bible-react'; import TAB_TYPE_CHECKING_RESULTS_LIST from '@renderer/components/checking-results-list/checking-results-list.constants'; @@ -166,13 +165,6 @@ const testLayout: LayoutBase = globalThis.isNoisyDevModeEnabled // w: 320, // h: 190, // }, - { - tabs: [{ id: 'Settings', tabType: TAB_TYPE_SETTINGS_DIALOG }] as SavedTabInfo[], - x: 300, - y: 170, - w: 600, - h: 400, - }, { tabs: [ { diff --git a/src/shared/models/project-lookup.service-model.ts b/src/shared/models/project-lookup.service-model.ts index e674ef7582..9d830bd600 100644 --- a/src/shared/models/project-lookup.service-model.ts +++ b/src/shared/models/project-lookup.service-model.ts @@ -11,7 +11,15 @@ import IProjectDataProviderFactory, { PDP_FACTORY_OBJECT_TYPE, ProjectMetadataFilterOptions, } from '@shared/models/project-data-provider-factory.interface'; -import { deepClone, endsWith, escapeStringRegexp, slice } from 'platform-bible-utils'; +import { + deepClone, + endsWith, + ensureArray, + escapeStringRegexp, + slice, + transformAndEnsureRegExpArray, + transformAndEnsureRegExpRegExpArray, +} from 'platform-bible-utils'; export const NETWORK_OBJECT_NAME_PROJECT_LOOKUP_SERVICE = 'ProjectLookupService'; @@ -470,38 +478,6 @@ function transformGetMetadataForProjectParametersToFilter( // #region Smaller project utilities -function ensureArray(maybeArray: T | T[] | undefined): T[] { - if (!maybeArray) return []; - - return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; -} - -function transformAndEnsureRegExpArray(stringMaybeArray: string | string[] | undefined): RegExp[] { - if (!stringMaybeArray) return []; - - const stringArray = ensureArray(stringMaybeArray); - - const regExpArray = stringArray.map((str) => new RegExp(str)); - - return regExpArray; -} - -function transformAndEnsureRegExpRegExpArray( - stringStringMaybeArray: string | (string | string[])[] | undefined, -): (RegExp | RegExp[])[] { - if (!stringStringMaybeArray) return []; - - const stringStringArray = ensureArray(stringStringMaybeArray); - - const regExpRegExpArray = stringStringArray.map((stringMaybeStringArray) => - Array.isArray(stringMaybeStringArray) - ? stringMaybeStringArray.map((str) => new RegExp(str)) - : new RegExp(stringMaybeStringArray), - ); - - return regExpRegExpArray; -} - function ensurePopulatedMetadataFilter(options: ProjectMetadataFilterOptions) { const { excludeProjectIds, @@ -568,7 +544,27 @@ function isProjectIdIncluded( return true; } -function areProjectInterfacesIncluded( +/** + * Determines whether the given project interfaces are included based on specified inclusion and + * exclusion rules. + * + * This function checks if a set of project interfaces meets the criteria defined by regular + * expressions for inclusion and exclusion. + * + * - A project interface is excluded if it matches any of the provided exclusion patterns. + * - A project interface is included only if it matches at least one of the provided inclusion + * patterns. + * + * @param projectInterfaces - An array of project interfaces to evaluate against the inclusion and + * exclusion patterns. + * @param includeProjectInterfaces - An array of regular expressions or arrays of regular + * expressions defining which interfaces should be included. + * @param excludeProjectInterfaces - An array of regular expressions or arrays of regular + * expressions defining which interfaces should be excluded. + * @returns A boolean value indicating whether the project interfaces satisfy the inclusion and + * exclusion criteria. + */ +export function areProjectInterfacesIncluded( projectInterfaces: ProjectInterfaces[], includeProjectInterfaces: (RegExp | RegExp[])[], excludeProjectInterfaces: (RegExp | RegExp[])[], diff --git a/src/shared/services/project-settings.service-model.ts b/src/shared/services/project-settings.service-model.ts index 24e6df08f2..b3fa45ada2 100644 --- a/src/shared/services/project-settings.service-model.ts +++ b/src/shared/services/project-settings.service-model.ts @@ -2,6 +2,7 @@ import { serializeRequestType } from '@shared/utils/util'; import * as networkService from '@shared/services/network.service'; import { ProjectSettingNames, ProjectSettingTypes } from 'papi-shared-types'; import { UnsubscriberAsync } from 'platform-bible-utils'; +import { LocalizedProjectSettingsContributionInfo } from '@shared/utils/project-settings-document-combiner'; /** Name prefix for registered commands that call project settings validators */ export const CATEGORY_EXTENSION_PROJECT_SETTING_VALIDATOR = 'extensionProjectSettingValidator'; @@ -75,6 +76,13 @@ export interface IProjectSettingsService { key: ProjectSettingName, validatorCallback: ProjectSettingValidator, ): Promise; + /** + * Get the current set of project settings contribution info given all the input documents with + * all localized string keys localized properly. + * + * @returns Localized project settings contribution info or undefined + */ + getLocalizedContributionInfo(): Promise; } /** diff --git a/src/shared/services/project-settings.service.ts b/src/shared/services/project-settings.service.ts index b9fec0d3f9..c3d369f0ab 100644 --- a/src/shared/services/project-settings.service.ts +++ b/src/shared/services/project-settings.service.ts @@ -4,7 +4,80 @@ import { projectSettingsServiceObjectToProxy, } from '@shared/services/project-settings.service-model'; import networkObjectService from '@shared/services/network-object.service'; -import { createSyncProxyForAsyncObject } from 'platform-bible-utils'; +import { + createSyncProxyForAsyncObject, + Localized, + ReferencedItem, + transformAndEnsureRegExpRegExpArray, +} from 'platform-bible-utils'; +import { ProjectSettingsContributionInfo } from '@shared/utils/project-settings-document-combiner'; +import { ProjectDataProviderInterfaces } from 'papi-shared-types'; +import { areProjectInterfacesIncluded } from '@shared/models/project-lookup.service-model'; + +/** + * Filters project settings contributions based on the provided project interfaces. + * + * This function iterates over a set of project settings contributions and filters their properties + * based on whether the project's interfaces match the specified inclusion and exclusion criteria. + * + * @param contributions - An object containing project settings contributions, which may be + * localized. + * @param projectInterfaces - An array of keys representing the project interfaces to filter the + * contributions by. + * @returns A filtered set of contributions, or `undefined` if no contributions match the project + * interfaces. + */ +export function filterProjectSettingsContributionsByProjectInterfaces( + contributions: Localized | undefined, + projectInterfaces: (keyof ProjectDataProviderInterfaces)[], +): Localized | undefined { + if (!contributions) return undefined; + + const resultingContributions: Localized = {}; + + Object.entries(contributions).forEach(([extensionName, contributionArray]) => { + if (!contributionArray) return; + + const filteredContributions = contributionArray + .map((contribution) => { + const filteredProperties: (typeof contribution)['properties'] = {}; + + Object.entries(contribution.properties).forEach(([key, property]) => { + const { includeProjectInterfaces, excludeProjectInterfaces } = property; + + if (includeProjectInterfaces && excludeProjectInterfaces) { + if ( + areProjectInterfacesIncluded( + projectInterfaces, + transformAndEnsureRegExpRegExpArray(includeProjectInterfaces), + transformAndEnsureRegExpRegExpArray(excludeProjectInterfaces), + ) + ) { + // map turns this into a string, but it needs to be ReferencedItem + // eslint-disable-next-line no-type-assertion/no-type-assertion + filteredProperties[key as ReferencedItem] = property; + } + } else { + // map turns this into a string, but it needs to be ReferencedItem + // eslint-disable-next-line no-type-assertion/no-type-assertion + filteredProperties[key as ReferencedItem] = property; + } + }); + + return { + ...contribution, + properties: filteredProperties, + }; + }) + .filter((contribution) => Object.keys(contribution.properties).length > 0); + + if (filteredContributions.length > 0) { + resultingContributions[extensionName] = filteredContributions; + } + }); + + return Object.keys(resultingContributions).length > 0 ? resultingContributions : undefined; +} let networkObject: IProjectSettingsService; let initializationPromise: Promise; diff --git a/src/shared/services/settings.service-model.ts b/src/shared/services/settings.service-model.ts index 795b787f34..c1d9e60cae 100644 --- a/src/shared/services/settings.service-model.ts +++ b/src/shared/services/settings.service-model.ts @@ -7,6 +7,7 @@ import { DataProviderSubscriberOptions, DataProviderUpdateInstructions, } from '@shared/models/data-provider.model'; +import { LocalizedSettingsContributionInfo } from '@shared/utils/settings-document-combiner-base'; /** Name prefix for registered commands that call settings validators */ export const CATEGORY_EXTENSION_SETTING_VALIDATOR = 'extensionSettingValidator'; @@ -94,6 +95,21 @@ export type ISettingsService = { */ get(key: SettingName): Promise; + /** + * Validates the setting at the given key with the new value provided + * + * @param key The string id of the setting to validate + * @param newValue The value to validate + * @param currentValue The value already set to the setting + * @param allChanges + */ + validateSetting( + key: SettingName, + newValue: SettingTypes[SettingName], + currentValue: SettingTypes[SettingName], + allChanges?: Partial, + ): Promise; + /** * Sets the value of the specified setting * @@ -136,6 +152,14 @@ export type ISettingsService = { key: SettingName, validator: SettingValidator, ): Promise; + + /** + * Get the current set of settings contribution info given all the input documents with all + * localized string keys localized properly. + * + * @returns Localized project settings contribution info or undefined + */ + getLocalizedSettingsContributionInfo(): Promise; } & OnDidDispose & IDataProvider & typeof settingsServiceObjectToProxy;