From da462ae3a89e7310afb8b8e004c23b046c343b46 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Wed, 16 Jul 2025 09:54:47 -0400 Subject: [PATCH 01/25] application/pdf export to mime map --- packages/ragbits-core/src/ragbits/core/sources/google_drive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py index 144219bf0..9ba1b736c 100644 --- a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py +++ b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py @@ -28,7 +28,7 @@ _GOOGLE_EXPORT_MIME_MAP = { "application/vnd.google-apps.document": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", # noqa: E501 "application/vnd.google-apps.spreadsheet": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", # noqa: E501 - "application/vnd.google-apps.presentation": "application/vnd.openxmlformats-officedocument.presentationml.presentation", # noqa: E501 + "application/vnd.google-apps.presentation": "application/pdf", "application/vnd.google-apps.drawing": "image/png", "application/vnd.google-apps.script": "application/vnd.google-apps.script+json", "application/vnd.google-apps.site": "text/html", From 5f6b8a6abac9054e158b950a49c2814330970001 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Wed, 16 Jul 2025 15:13:34 -0400 Subject: [PATCH 02/25] impersonation feature for client. --- .../src/ragbits/core/sources/google_drive.py | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py index 9ba1b736c..eb1f8337b 100644 --- a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py +++ b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py @@ -20,10 +20,17 @@ _SCOPES = ["https://www.googleapis.com/auth/drive"] +# Scopes that the service account is delegated for in the Google Workspace Admin Console. +_IMPERSONATION_SCOPES = [ + "https://www.googleapis.com/auth/cloud-platform", # General Cloud access (if needed) + "https://www.googleapis.com/auth/drive", # Example: For Google Drive API +] + # HTTP status codes _HTTP_NOT_FOUND = 404 _HTTP_FORBIDDEN = 403 + # Maps Google-native Drive MIME types → export MIME types _GOOGLE_EXPORT_MIME_MAP = { "application/vnd.google-apps.document": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", # noqa: E501 @@ -60,6 +67,9 @@ class GoogleDriveSource(Source): is_folder: bool = False protocol: ClassVar[str] = "google_drive" + _impersonate: bool = False + _impersonate_target_email: str | None = None + _google_drive_client: ClassVar["GoogleAPIResource | None"] = None _credentials_file_path: ClassVar[str | None] = None @@ -68,6 +78,23 @@ def set_credentials_file_path(cls, path: str) -> None: """Set the path to the service account credentials file.""" cls._credentials_file_path = path + @classmethod + def set_impersonation_target(cls, target_mail: str): + """ + Sets the email address to impersonate when accessing Google Drive resources. + + Args: + target_mail (str): The email address to impersonate. + + Raises: + ValueError: If the provided email address is invalid (empty or missing '@'). + """ + # check if email is a valid email. + if not target_mail or "@" not in target_mail: + raise ValueError("Invalid email address provided for impersonation.") + cls._impersonate = True + cls._impersonate_target_email = target_mail + @classmethod def _initialize_client_from_creds(cls) -> None: """ @@ -82,7 +109,22 @@ def _initialize_client_from_creds(cls) -> None: HttpError: If the Google Drive API is not enabled or accessible. Exception: If any other error occurs during client initialization. """ - creds = service_account.Credentials.from_service_account_file(cls._credentials_file_path, scopes=_SCOPES) + + + cred_kwargs = { + "filename": cls._credentials_file_path, + "scopes": _SCOPES, + } + + # handle impersonation + if cls._impersonate: + if not cls._impersonate_target_email: + raise ValueError("Impersonation target email must be set when impersonation is enabled.") + cred_kwargs["subject"] = cls._impersonate_target_email + cred_kwargs["scopes"] = _IMPERSONATION_SCOPES + + creds = service_account.Credentials.from_service_account_file(**cred_kwargs) + cls._google_drive_client = build("drive", "v3", credentials=creds) cls._google_drive_client.files().list( pageSize=1, fields="files(id)", supportsAllDrives=True, includeItemsFromAllDrives=True From 38ffe8b174f24855fc31aa6bf2f36c681af401b9 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Fri, 18 Jul 2025 08:51:44 -0400 Subject: [PATCH 03/25] remove impersonation at class level and define it at instance level. --- .../src/ragbits/core/sources/google_drive.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py index eb1f8337b..9622b355e 100644 --- a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py +++ b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py @@ -67,9 +67,6 @@ class GoogleDriveSource(Source): is_folder: bool = False protocol: ClassVar[str] = "google_drive" - _impersonate: bool = False - _impersonate_target_email: str | None = None - _google_drive_client: ClassVar["GoogleAPIResource | None"] = None _credentials_file_path: ClassVar[str | None] = None @@ -92,8 +89,8 @@ def set_impersonation_target(cls, target_mail: str): # check if email is a valid email. if not target_mail or "@" not in target_mail: raise ValueError("Invalid email address provided for impersonation.") - cls._impersonate = True - cls._impersonate_target_email = target_mail + cls.impersonate = True + cls.impersonate_target_email = target_mail @classmethod def _initialize_client_from_creds(cls) -> None: @@ -117,10 +114,10 @@ def _initialize_client_from_creds(cls) -> None: } # handle impersonation - if cls._impersonate: - if not cls._impersonate_target_email: + if not (cls.impersonate is None) and cls.impersonate: + if not cls.impersonate_target_email: raise ValueError("Impersonation target email must be set when impersonation is enabled.") - cred_kwargs["subject"] = cls._impersonate_target_email + cred_kwargs["subject"] = cls.impersonate_target_email cred_kwargs["scopes"] = _IMPERSONATION_SCOPES creds = service_account.Credentials.from_service_account_file(**cred_kwargs) From 466fe37cfbbb210a1d6f2b11fe5be492f9643720 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Fri, 18 Jul 2025 09:26:22 -0400 Subject: [PATCH 04/25] updated tests --- .../src/ragbits/core/sources/google_drive.py | 3 +++ .../tests/unit/sources/test_google_drive.py | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py index 9622b355e..0223e14ee 100644 --- a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py +++ b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py @@ -59,6 +59,9 @@ class GoogleDriveSource(Source): """ Handles source connection for Google Drive and provides methods to fetch files. + + NOTE(Do not define variables at class level that you pass to google client, define them at instance level, or else + google client will complain.): """ file_id: str diff --git a/packages/ragbits-core/tests/unit/sources/test_google_drive.py b/packages/ragbits-core/tests/unit/sources/test_google_drive.py index 223ae2ec6..3e9539f85 100644 --- a/packages/ragbits-core/tests/unit/sources/test_google_drive.py +++ b/packages/ragbits-core/tests/unit/sources/test_google_drive.py @@ -49,6 +49,18 @@ def setup_local_storage_dir(tmp_path: Path): else: del os.environ["LOCAL_STORAGE_DIR"] +@pytest.mark.asnycio +async def test_google_drive_impersonate(): + """Test service account impersonation with better error handling.""" + target_email = os.environ.get("GOOGLE_DRIVE_TARGET_EMAIL") + credentials_file = "test_clientid.json" + + GoogleDriveSource.set_credentials_file_path(credentials_file) + GoogleDriveSource.set_impersonation_target(target_email) + + unit_test_folder_id = os.environ.get("GOOGLE_SOURCE_UNIT_TEST_FOLDER") + + sources_to_download = await GoogleDriveSource.from_uri(f"{unit_test_folder_id}/**") @pytest.mark.asyncio async def test_google_drive_source_fetch_file_not_found(): @@ -86,7 +98,6 @@ async def test_google_drive_source_unsupported_uri_pattern(): with pytest.raises(ValueError, match="Unsupported Google Drive URI pattern:"): await GoogleDriveSource.from_uri("just_a_path/to/a/file.txt") - @pytest.mark.asyncio async def test_google_drive_source_fetch_file(): """ From 5dd7fe4d649f3deb7f08cd03b9091134120d3947 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Fri, 18 Jul 2025 09:33:10 -0400 Subject: [PATCH 05/25] impersonation same loop --- .../tests/unit/sources/test_google_drive.py | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/packages/ragbits-core/tests/unit/sources/test_google_drive.py b/packages/ragbits-core/tests/unit/sources/test_google_drive.py index 3e9539f85..a14dc8ddc 100644 --- a/packages/ragbits-core/tests/unit/sources/test_google_drive.py +++ b/packages/ragbits-core/tests/unit/sources/test_google_drive.py @@ -61,6 +61,38 @@ async def test_google_drive_impersonate(): unit_test_folder_id = os.environ.get("GOOGLE_SOURCE_UNIT_TEST_FOLDER") sources_to_download = await GoogleDriveSource.from_uri(f"{unit_test_folder_id}/**") + downloaded_count = 0 + + try: + # Iterate through each source (file or folder) found + for source in sources_to_download: + # Only attempt to fetch files, as folders cannot be "downloaded" in the same way + if not source.is_folder: + try: + # Attempt to fetch (download) the file. + local_path = await source.fetch() + print(f" Downloaded: '{source.file_name}' (ID: {source.file_id}) to '{local_path}'") + downloaded_count += 1 + except HttpError as e: + # Catch Google API specific HTTP errors (e.g., permission denied, file not found) + print(f" Google API Error downloading '{source.file_name}' (ID: {source.file_id}): {e}") + except Exception as e: + # Catch any other general exceptions during the download process + print(f" Failed to download '{source.file_name}' (ID: {source.file_id}): {e}") + else: + print(f" Skipping folder: '{source.file_name}' (ID: {source.file_id})") + + except Exception as e: + # Catch any exceptions that occur during the initial setup or `from_uri` call + print(f"An error occurred during test setup or source retrieval: {e}") + + finally: + # This block ensures the final summary is printed regardless of errors + print(f"\n--- Successfully downloaded {downloaded_count} files from '{unit_test_folder_id}' ---") + # Assert that at least one file was downloaded if that's an expectation for the test + # If no files are expected, or it's acceptable for 0 files to be downloaded, remove or adjust this assertion. + assert downloaded_count > 0, "Expected to download at least one file, but downloaded 0." + @pytest.mark.asyncio async def test_google_drive_source_fetch_file_not_found(): From 238f8fd1596297f0285b72c2a0a0d6c27c3c3a59 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Fri, 18 Jul 2025 09:35:08 -0400 Subject: [PATCH 06/25] updated environment variables. --- .github/workflows/shared-packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/shared-packages.yml b/.github/workflows/shared-packages.yml index de9a73067..71c623680 100644 --- a/.github/workflows/shared-packages.yml +++ b/.github/workflows/shared-packages.yml @@ -200,6 +200,7 @@ jobs: env: GOOGLE_DRIVE_CLIENTID_JSON: ${{ secrets.GOOGLE_DRIVE_CLIENTID_JSON }} GOOGLE_SOURCE_UNIT_TEST_FOLDER: ${{ secrets.GOOGLE_SOURCE_UNIT_TEST_FOLDER }} + GOOGLE_DRIVE_TARGET_EMAIL: ${{ secrets.GOOGLE_DRIVE_TARGET_EMAIL }} - name: Test Report uses: mikepenz/action-junit-report@v4 From 45249894627e9c0ec2f8b744f3f241919c3acd1c Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Fri, 18 Jul 2025 09:44:24 -0400 Subject: [PATCH 07/25] impersonation support changelog --- packages/ragbits-core/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ragbits-core/CHANGELOG.md b/packages/ragbits-core/CHANGELOG.md index 058b7bb71..099407059 100644 --- a/packages/ragbits-core/CHANGELOG.md +++ b/packages/ragbits-core/CHANGELOG.md @@ -6,6 +6,7 @@ - Add LLM Usage to LLMResponseWithMetadata (#700) - Split usage per model type (#715) - Add support for batch generation (#608) +- Added Google Drive support for impersonation and presentation-to-pdf (#724) ## 1.1.0 (2025-07-09) From 6a6535411ea81dd0872fdbb143b94183c1d99ee7 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Fri, 18 Jul 2025 10:24:43 -0400 Subject: [PATCH 08/25] updated how to and formatted. --- docs/how-to/sources/google-drive.md | 37 +++++++++++++++++++ .../src/ragbits/core/sources/google_drive.py | 11 +++--- .../tests/unit/sources/test_google_drive.py | 4 +- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/docs/how-to/sources/google-drive.md b/docs/how-to/sources/google-drive.md index 6fab274e1..75ccfb6dd 100644 --- a/docs/how-to/sources/google-drive.md +++ b/docs/how-to/sources/google-drive.md @@ -187,6 +187,43 @@ async def process_drive_documents(): asyncio.run(process_drive_documents()) ``` +## Impersonating Google Accounts + +You can configure your Google service account to impersonate other users in your Google Workspace domain. This is useful when you need to access files or perform actions on behalf of specific users. + +### Step 1: Enable Domain-Wide Delegation + +1. **Sign in to the [Google Admin Console](https://admin.google.com/) as a Super Admin.** +2. Navigate to: + **Security > Access and data control > API controls > MANAGE DOMAIN WIDE DELEGATION** +3. Add a new API client or edit an existing one, and include the following OAuth scopes: + - `https://www.googleapis.com/auth/cloud-platform` + - `https://www.googleapis.com/auth/drive` +4. Click **Authorize** or **Save** to apply the changes. + +### Step 2: Impersonate a User in Your Code + +After configuring domain-wide delegation, you can specify a target user to impersonate when using the `GoogleDriveSource` in your code. + +```python +from ragbits.core.sources.google_drive import GoogleDriveSource + +target_email = "johnDoe@yourdomain.com" +credentials_file = "service-account-key.json" + +# Set the path to your service account key file +GoogleDriveSource.set_credentials_file_path(credentials_file) + +# Set the email address of the user to impersonate +GoogleDriveSource.set_impersonation_target(target_email) +``` + +**Note:** +- The `target_email` must be a valid user in your Google Workspace domain. +- Ensure your service account has been granted domain-wide delegation as described above. + +This setup allows your service account to act on behalf of the specified user, enabling access to their Google Drive files and resources as permitted by the assigned scopes. + ## Troubleshooting ### Common Issues diff --git a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py index 0223e14ee..2c2c52dd2 100644 --- a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py +++ b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py @@ -35,7 +35,7 @@ _GOOGLE_EXPORT_MIME_MAP = { "application/vnd.google-apps.document": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", # noqa: E501 "application/vnd.google-apps.spreadsheet": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", # noqa: E501 - "application/vnd.google-apps.presentation": "application/pdf", + "application/vnd.google-apps.presentation": "application/pdf", "application/vnd.google-apps.drawing": "image/png", "application/vnd.google-apps.script": "application/vnd.google-apps.script+json", "application/vnd.google-apps.site": "text/html", @@ -79,17 +79,17 @@ def set_credentials_file_path(cls, path: str) -> None: cls._credentials_file_path = path @classmethod - def set_impersonation_target(cls, target_mail: str): + def set_impersonation_target(cls, target_mail: str): """ Sets the email address to impersonate when accessing Google Drive resources. - + Args: target_mail (str): The email address to impersonate. Raises: ValueError: If the provided email address is invalid (empty or missing '@'). """ - # check if email is a valid email. + # check if email is a valid email. if not target_mail or "@" not in target_mail: raise ValueError("Invalid email address provided for impersonation.") cls.impersonate = True @@ -110,13 +110,12 @@ def _initialize_client_from_creds(cls) -> None: Exception: If any other error occurs during client initialization. """ - cred_kwargs = { "filename": cls._credentials_file_path, "scopes": _SCOPES, } - # handle impersonation + # handle impersonation if not (cls.impersonate is None) and cls.impersonate: if not cls.impersonate_target_email: raise ValueError("Impersonation target email must be set when impersonation is enabled.") diff --git a/packages/ragbits-core/tests/unit/sources/test_google_drive.py b/packages/ragbits-core/tests/unit/sources/test_google_drive.py index a14dc8ddc..2d7a025dd 100644 --- a/packages/ragbits-core/tests/unit/sources/test_google_drive.py +++ b/packages/ragbits-core/tests/unit/sources/test_google_drive.py @@ -62,8 +62,8 @@ async def test_google_drive_impersonate(): sources_to_download = await GoogleDriveSource.from_uri(f"{unit_test_folder_id}/**") downloaded_count = 0 - - try: + + try: # Iterate through each source (file or folder) found for source in sources_to_download: # Only attempt to fetch files, as folders cannot be "downloaded" in the same way From 20df7d2d91b010877c1f7b86a3211c71294e7134 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Fri, 18 Jul 2025 10:30:39 -0400 Subject: [PATCH 09/25] updated for ruff --- packages/ragbits-core/tests/unit/sources/test_google_drive.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/ragbits-core/tests/unit/sources/test_google_drive.py b/packages/ragbits-core/tests/unit/sources/test_google_drive.py index 2d7a025dd..6d80298e1 100644 --- a/packages/ragbits-core/tests/unit/sources/test_google_drive.py +++ b/packages/ragbits-core/tests/unit/sources/test_google_drive.py @@ -49,6 +49,7 @@ def setup_local_storage_dir(tmp_path: Path): else: del os.environ["LOCAL_STORAGE_DIR"] + @pytest.mark.asnycio async def test_google_drive_impersonate(): """Test service account impersonation with better error handling.""" @@ -130,6 +131,7 @@ async def test_google_drive_source_unsupported_uri_pattern(): with pytest.raises(ValueError, match="Unsupported Google Drive URI pattern:"): await GoogleDriveSource.from_uri("just_a_path/to/a/file.txt") + @pytest.mark.asyncio async def test_google_drive_source_fetch_file(): """ From 54da82bf941100d24eb9fda500f454b6d77f6c42 Mon Sep 17 00:00:00 2001 From: pocucan-ds Date: Fri, 18 Jul 2025 10:34:54 -0400 Subject: [PATCH 10/25] updated signature --- .../ragbits-core/src/ragbits/core/sources/google_drive.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py index 2c2c52dd2..086ac4481 100644 --- a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py +++ b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py @@ -79,7 +79,7 @@ def set_credentials_file_path(cls, path: str) -> None: cls._credentials_file_path = path @classmethod - def set_impersonation_target(cls, target_mail: str): + def set_impersonation_target(cls, target_mail: str) -> None: """ Sets the email address to impersonate when accessing Google Drive resources. @@ -109,14 +109,13 @@ def _initialize_client_from_creds(cls) -> None: HttpError: If the Google Drive API is not enabled or accessible. Exception: If any other error occurs during client initialization. """ - cred_kwargs = { "filename": cls._credentials_file_path, "scopes": _SCOPES, } # handle impersonation - if not (cls.impersonate is None) and cls.impersonate: + if cls.impersonate is not None and cls.impersonate: if not cls.impersonate_target_email: raise ValueError("Impersonation target email must be set when impersonation is enabled.") cred_kwargs["subject"] = cls.impersonate_target_email From da272a831717fdf939c99acc3f2e73365bab3e2f Mon Sep 17 00:00:00 2001 From: Maksymilian Pilzys Date: Mon, 21 Jul 2025 14:44:21 +0200 Subject: [PATCH 11/25] Add impersonation attributes to GoogleDriveSource and update tests for environment variable checks --- .../src/ragbits/core/sources/google_drive.py | 2 ++ .../tests/unit/sources/test_google_drive.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py index 086ac4481..b6301c02b 100644 --- a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py +++ b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py @@ -72,6 +72,8 @@ class GoogleDriveSource(Source): _google_drive_client: ClassVar["GoogleAPIResource | None"] = None _credentials_file_path: ClassVar[str | None] = None + impersonate: ClassVar[bool | None] = None + impersonate_target_email: ClassVar[str | None] = None @classmethod def set_credentials_file_path(cls, path: str) -> None: diff --git a/packages/ragbits-core/tests/unit/sources/test_google_drive.py b/packages/ragbits-core/tests/unit/sources/test_google_drive.py index 6d80298e1..1230fdf0b 100644 --- a/packages/ragbits-core/tests/unit/sources/test_google_drive.py +++ b/packages/ragbits-core/tests/unit/sources/test_google_drive.py @@ -57,10 +57,17 @@ async def test_google_drive_impersonate(): credentials_file = "test_clientid.json" GoogleDriveSource.set_credentials_file_path(credentials_file) + + if target_email is None: + pytest.skip("GOOGLE_DRIVE_TARGET_EMAIL environment variable not set") + GoogleDriveSource.set_impersonation_target(target_email) unit_test_folder_id = os.environ.get("GOOGLE_SOURCE_UNIT_TEST_FOLDER") + if unit_test_folder_id is None: + pytest.skip("GOOGLE_SOURCE_UNIT_TEST_FOLDER environment variable not set") + sources_to_download = await GoogleDriveSource.from_uri(f"{unit_test_folder_id}/**") downloaded_count = 0 @@ -144,6 +151,9 @@ async def test_google_drive_source_fetch_file(): """ unit_test_folder_id = os.environ.get("GOOGLE_SOURCE_UNIT_TEST_FOLDER") + if unit_test_folder_id is None: + pytest.skip("GOOGLE_SOURCE_UNIT_TEST_FOLDER environment variable not set") + # Initialize a counter for successfully downloaded files downloaded_count = 0 From 55c3f348bfdf70d3e4e191fd8caeee3b04f0e757 Mon Sep 17 00:00:00 2001 From: Maksymilian Pilzys Date: Thu, 24 Jul 2025 22:10:43 +0200 Subject: [PATCH 12/25] Add GoogleDriveExportFormat enum and update MIME type handling in GoogleDriveSource - Introduced GoogleDriveExportFormat enum to standardize export MIME types. - Updated _GOOGLE_EXPORT_MIME_MAP and _EXPORT_EXTENSION_MAP to use the new enum. - Modified fetch method to accept an optional export_format parameter for overriding MIME types. - Enhanced _determine_file_extension method to support MIME type overrides. - Added unit test for verifying correct file extension determination with overridden MIME types. --- .../src/ragbits/core/sources/google_drive.py | 86 +++++++++++++------ .../tests/unit/sources/test_google_drive.py | 20 ++++- 2 files changed, 78 insertions(+), 28 deletions(-) diff --git a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py index b6301c02b..ccd3d4f02 100644 --- a/packages/ragbits-core/src/ragbits/core/sources/google_drive.py +++ b/packages/ragbits-core/src/ragbits/core/sources/google_drive.py @@ -1,6 +1,7 @@ -import os # Import os for path joining and potential directory checks +import os from collections.abc import Iterable from contextlib import suppress +from enum import Enum from pathlib import Path from typing import Any, ClassVar @@ -31,28 +32,41 @@ _HTTP_FORBIDDEN = 403 +class GoogleDriveExportFormat(str, Enum): + """Supported export MIME types for Google Drive downloads.""" + + DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" + PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation" + PDF = "application/pdf" + PNG = "image/png" + HTML = "text/html" + TXT = "text/plain" + JSON = "application/json" + + # Maps Google-native Drive MIME types → export MIME types -_GOOGLE_EXPORT_MIME_MAP = { - "application/vnd.google-apps.document": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", # noqa: E501 - "application/vnd.google-apps.spreadsheet": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", # noqa: E501 - "application/vnd.google-apps.presentation": "application/pdf", - "application/vnd.google-apps.drawing": "image/png", - "application/vnd.google-apps.script": "application/vnd.google-apps.script+json", - "application/vnd.google-apps.site": "text/html", - "application/vnd.google-apps.map": "application/json", - "application/vnd.google-apps.form": "application/pdf", +_GOOGLE_EXPORT_MIME_MAP: dict[str, GoogleDriveExportFormat] = { + "application/vnd.google-apps.document": GoogleDriveExportFormat.DOCX, + "application/vnd.google-apps.spreadsheet": GoogleDriveExportFormat.XLSX, + "application/vnd.google-apps.presentation": GoogleDriveExportFormat.PDF, + "application/vnd.google-apps.drawing": GoogleDriveExportFormat.PNG, + "application/vnd.google-apps.script": GoogleDriveExportFormat.JSON, + "application/vnd.google-apps.site": GoogleDriveExportFormat.HTML, + "application/vnd.google-apps.map": GoogleDriveExportFormat.JSON, + "application/vnd.google-apps.form": GoogleDriveExportFormat.PDF, } # Maps export MIME types → file extensions -_EXPORT_EXTENSION_MAP = { - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ".docx", - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ".xlsx", - "application/vnd.openxmlformats-officedocument.presentationml.presentation": ".pptx", - "image/png": ".png", - "application/pdf": ".pdf", - "text/html": ".html", - "text/plain": ".txt", - "application/json": ".json", +_EXPORT_EXTENSION_MAP: dict[GoogleDriveExportFormat, str] = { + GoogleDriveExportFormat.DOCX: ".docx", + GoogleDriveExportFormat.XLSX: ".xlsx", + GoogleDriveExportFormat.PPTX: ".pptx", + GoogleDriveExportFormat.PNG: ".png", + GoogleDriveExportFormat.PDF: ".pdf", + GoogleDriveExportFormat.HTML: ".html", + GoogleDriveExportFormat.TXT: ".txt", + GoogleDriveExportFormat.JSON: ".json", } @@ -204,7 +218,11 @@ def verify_drive_api_enabled(cls) -> None: @traceable @requires_dependencies(["googleapiclient"], "google_drive") - async def fetch(self) -> Path: + async def fetch( + self, + *, + export_format: "GoogleDriveExportFormat | None" = None, + ) -> Path: """ Fetch the file from Google Drive and store it locally. @@ -213,6 +231,9 @@ async def fetch(self) -> Path: The local directory is determined by the environment variable `LOCAL_STORAGE_DIR`. If this environment variable is not set, a temporary directory is used. + Args: + export_format: Optional override for the export MIME type when downloading Google-native documents. + Returns: The local path to the downloaded file. @@ -228,7 +249,8 @@ async def fetch(self) -> Path: file_local_dir = local_dir / self.file_id file_local_dir.mkdir(parents=True, exist_ok=True) - export_mime_type, file_extension = self._determine_file_extension() + override_mime = export_format.value if export_format else None + export_mime_type, file_extension = self._determine_file_extension(override_mime=override_mime) local_file_name = f"{self.file_name}{file_extension}" path = file_local_dir / local_file_name @@ -538,22 +560,36 @@ async def from_uri(cls, path: str) -> Iterable[Self]: else: raise ValueError(f"Unsupported Google Drive URI pattern: {path}") - def _determine_file_extension(self) -> tuple[str, str]: + def _determine_file_extension(self, override_mime: str | None = None) -> tuple[str, str]: """ Determine the appropriate file extension and export MIME type for the file. Returns: A tuple of (export_mime_type, file_extension) """ + if override_mime is not None: + export_mime_type = override_mime + try: + export_format = GoogleDriveExportFormat(override_mime) + file_extension = _EXPORT_EXTENSION_MAP.get(export_format, ".bin") + except ValueError: + file_extension = Path(self.file_name).suffix if "." in self.file_name else ".bin" + return export_mime_type, file_extension + export_mime_type = self.mime_type file_extension = "" if self.mime_type.startswith("application/vnd.google-apps"): - export_mime_type = _GOOGLE_EXPORT_MIME_MAP.get(self.mime_type, "application/pdf") - file_extension = _EXPORT_EXTENSION_MAP.get(export_mime_type, ".bin") + export_format = _GOOGLE_EXPORT_MIME_MAP.get(self.mime_type, GoogleDriveExportFormat.PDF) + export_mime_type = export_format.value + file_extension = _EXPORT_EXTENSION_MAP.get(export_format, ".bin") elif "." in self.file_name: file_extension = Path(self.file_name).suffix else: - file_extension = _EXPORT_EXTENSION_MAP.get(self.mime_type, ".bin") + try: + export_format = GoogleDriveExportFormat(self.mime_type) + file_extension = _EXPORT_EXTENSION_MAP.get(export_format, ".bin") + except ValueError: + file_extension = ".bin" return export_mime_type, file_extension diff --git a/packages/ragbits-core/tests/unit/sources/test_google_drive.py b/packages/ragbits-core/tests/unit/sources/test_google_drive.py index 1230fdf0b..776dd5efb 100644 --- a/packages/ragbits-core/tests/unit/sources/test_google_drive.py +++ b/packages/ragbits-core/tests/unit/sources/test_google_drive.py @@ -1,11 +1,11 @@ -import json # Import json for potential validation or pretty printing +import json import os from pathlib import Path import pytest from googleapiclient.errors import HttpError -from ragbits.core.sources.google_drive import GoogleDriveSource +from ragbits.core.sources.google_drive import GoogleDriveExportFormat, GoogleDriveSource @pytest.fixture(autouse=True) @@ -50,7 +50,7 @@ def setup_local_storage_dir(tmp_path: Path): del os.environ["LOCAL_STORAGE_DIR"] -@pytest.mark.asnycio +@pytest.mark.asyncio async def test_google_drive_impersonate(): """Test service account impersonation with better error handling.""" target_email = os.environ.get("GOOGLE_DRIVE_TARGET_EMAIL") @@ -196,3 +196,17 @@ async def test_google_drive_source_fetch_file(): # Assert that at least one file was downloaded if that's an expectation for the test # If no files are expected, or it's acceptable for 0 files to be downloaded, remove or adjust this assertion. assert downloaded_count > 0, "Expected to download at least one file, but downloaded 0." + + +def test_determine_file_extension_override(): + """Ensure overriding export MIME type yields expected extension.""" + src = GoogleDriveSource( + file_id="dummy", + file_name="MyDoc", + mime_type="application/vnd.google-apps.document", + ) + + export_mime, extension = src._determine_file_extension(override_mime=GoogleDriveExportFormat.PDF.value) + + assert export_mime == GoogleDriveExportFormat.PDF.value + assert extension == ".pdf" From 43e507d24def850e7cf1be6009eebbd4314e40e2 Mon Sep 17 00:00:00 2001 From: GlockPL Date: Wed, 6 Aug 2025 10:24:57 +0200 Subject: [PATCH 13/25] feat: force tool calling support (#751) Co-authored-by: Konrad Czarnota Co-authored-by: GlockPL Co-authored-by: GlockPL --- docs/how-to/agents/define_and_use_agents.md | 8 + examples/agents/tool_use.py | 2 +- packages/ragbits-agents/CHANGELOG.md | 2 +- .../src/ragbits/agents/_main.py | 23 ++- .../ragbits-agents/src/ragbits/agents/tool.py | 5 +- .../ragbits-agents/tests/unit/test_agent.py | 187 +++++++++++++++++- packages/ragbits-core/CHANGELOG.md | 2 + .../src/ragbits/core/llms/base.py | 66 ++++++- .../src/ragbits/core/llms/litellm.py | 19 +- .../src/ragbits/core/llms/local.py | 20 +- .../src/ragbits/core/llms/mock.py | 7 +- .../ragbits-core/tests/unit/llms/test_base.py | 60 ++++++ 12 files changed, 380 insertions(+), 21 deletions(-) diff --git a/docs/how-to/agents/define_and_use_agents.md b/docs/how-to/agents/define_and_use_agents.md index 187091513..ee46b189f 100644 --- a/docs/how-to/agents/define_and_use_agents.md +++ b/docs/how-to/agents/define_and_use_agents.md @@ -49,6 +49,14 @@ The result is an [AgentResult][ragbits.agents.AgentResult], which includes the m You can find the complete code example in the Ragbits repository [here](https://github.com/deepsense-ai/ragbits/blob/main/examples/agents/tool_use.py). +## Tool choice +To control what tool is used at first call you could use `tool_choice` parameter. There are the following options: +- "auto": let model decide if tool call is needed +- "none": do not call tool +- "required: enforce tool usage (model decides which one) +- Callable: one of provided tools + + ## Conversation history [`Agent`][ragbits.agents.Agent]s can retain conversation context across multiple interactions by enabling the `keep_history` flag when initializing the agent. This is useful when you want the agent to understand follow-up questions without needing the user to repeat earlier details. diff --git a/examples/agents/tool_use.py b/examples/agents/tool_use.py index 907cb99f2..38019f571 100644 --- a/examples/agents/tool_use.py +++ b/examples/agents/tool_use.py @@ -82,7 +82,7 @@ async def main() -> None: tools=[get_weather], default_options=AgentOptions(max_total_tokens=500, max_turns=5), ) - response = await agent.run(WeatherPromptInput(location="Paris")) + response = await agent.run(WeatherPromptInput(location="Paris"), tool_choice=get_weather) print(response) diff --git a/packages/ragbits-agents/CHANGELOG.md b/packages/ragbits-agents/CHANGELOG.md index 1a346abb6..159585403 100644 --- a/packages/ragbits-agents/CHANGELOG.md +++ b/packages/ragbits-agents/CHANGELOG.md @@ -1,6 +1,7 @@ # CHANGELOG ## Unreleased +- Add tool_choice parameter to agent interface (#738) ## 1.2.1 (2025-08-04) @@ -13,7 +14,6 @@ ### Changed - ragbits-core updated to version v1.2.0 - - Add native openai tools support (#621) - add Context to Agents (#715) diff --git a/packages/ragbits-agents/src/ragbits/agents/_main.py b/packages/ragbits-agents/src/ragbits/agents/_main.py index 027cd36da..9efa2efd6 100644 --- a/packages/ragbits-agents/src/ragbits/agents/_main.py +++ b/packages/ragbits-agents/src/ragbits/agents/_main.py @@ -22,7 +22,7 @@ ) from ragbits.agents.mcp.server import MCPServer from ragbits.agents.mcp.utils import get_tools -from ragbits.agents.tool import Tool, ToolCallResult +from ragbits.agents.tool import Tool, ToolCallResult, ToolChoice from ragbits.core.audit.traces import trace from ragbits.core.llms.base import LLM, LLMClientOptionsT, LLMResponseWithMetadata, ToolCall, Usage from ragbits.core.options import Options @@ -192,6 +192,7 @@ async def run( input: str | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResult[PromptOutputT]: ... @overload @@ -200,6 +201,7 @@ async def run( input: PromptInputT, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResult[PromptOutputT]: ... async def run( @@ -207,6 +209,7 @@ async def run( input: str | PromptInputT | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResult[PromptOutputT]: """ Run the agent. The method is experimental, inputs and outputs may change in the future. @@ -218,6 +221,11 @@ async def run( - None: No input. Only valid when a string prompt was provided during initialization. options: The options for the agent run. context: The context for the agent run. + tool_choice: Parameter that allows to control what tool is used at first call. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - Callable: one of provided tools Returns: The result of the agent run. @@ -251,6 +259,7 @@ async def run( await self.llm.generate_with_metadata( prompt=prompt_with_history, tools=[tool.to_function_schema() for tool in tools_mapping.values()], + tool_choice=tool_choice if tool_choice and turn_count == 0 else None, options=self._get_llm_options(llm_options, merged_options, context.usage), ), ) @@ -294,6 +303,7 @@ def run_streaming( input: str | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResultStreaming: ... @overload @@ -302,6 +312,7 @@ def run_streaming( input: PromptInputT, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResultStreaming: ... def run_streaming( @@ -309,6 +320,7 @@ def run_streaming( input: str | PromptInputT | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResultStreaming: """ This method returns an `AgentResultStreaming` object that can be asynchronously @@ -318,6 +330,11 @@ def run_streaming( input: The input for the agent run. options: The options for the agent run. context: The context for the agent run. + tool_choice: Parameter that allows to control what tool is used at first call. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - Callable: one of provided tools Returns: A `StreamingResult` object for iteration and collection. @@ -329,7 +346,7 @@ def run_streaming( AgentInvalidPromptInputError: If the prompt/input combination is invalid. AgentMaxTurnsExceededError: If the maximum number of turns is exceeded. """ - generator = self._stream_internal(input, options, context) + generator = self._stream_internal(input, options, context, tool_choice) return AgentResultStreaming(generator) async def _stream_internal( @@ -337,6 +354,7 @@ async def _stream_internal( input: str | PromptInputT | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[str | ToolCall | ToolCallResult | SimpleNamespace | BasePrompt | Usage]: if context is None: context = AgentRunContext() @@ -357,6 +375,7 @@ async def _stream_internal( streaming_result = self.llm.generate_streaming( prompt=prompt_with_history, tools=[tool.to_function_schema() for tool in tools_mapping.values()], + tool_choice=tool_choice if tool_choice and turn_count == 0 else None, options=self._get_llm_options(llm_options, merged_options, context.usage), ) async for chunk in streaming_result: diff --git a/packages/ragbits-agents/src/ragbits/agents/tool.py b/packages/ragbits-agents/src/ragbits/agents/tool.py index 0ab3d0422..32fe5603d 100644 --- a/packages/ragbits-agents/src/ragbits/agents/tool.py +++ b/packages/ragbits-agents/src/ragbits/agents/tool.py @@ -1,6 +1,6 @@ from collections.abc import Callable from dataclasses import dataclass -from typing import Any +from typing import Any, Literal from typing_extensions import Self @@ -76,3 +76,6 @@ def to_function_schema(self) -> dict[str, Any]: "parameters": self.parameters, }, } + + +ToolChoice = Literal["auto", "none", "required"] | Callable diff --git a/packages/ragbits-agents/tests/unit/test_agent.py b/packages/ragbits-agents/tests/unit/test_agent.py index 00d6ca883..5043cd0f3 100644 --- a/packages/ragbits-agents/tests/unit/test_agent.py +++ b/packages/ragbits-agents/tests/unit/test_agent.py @@ -6,7 +6,7 @@ from pydantic import BaseModel from ragbits.agents import Agent, AgentRunContext -from ragbits.agents._main import AgentOptions, AgentResult, AgentResultStreaming, ToolCallResult +from ragbits.agents._main import AgentOptions, AgentResult, AgentResultStreaming, ToolCallResult, ToolChoice from ragbits.agents.exceptions import ( AgentInvalidPromptInputError, AgentMaxTurnsExceededError, @@ -143,13 +143,82 @@ def llm_with_tool_call_context() -> MockLLM: return MockLLM(default_options=options) +def get_time() -> str: + """ + Returns the current time. + + Returns: + The current time as a string. + """ + return "12:00 PM" + + +@pytest.fixture +def llm_no_tool_call_when_none() -> MockLLM: + """LLM that doesn't call tools when tool_choice is 'none'.""" + options = MockLLMOptions(response="I cannot call tools right now.") + return MockLLM(default_options=options) + + +@pytest.fixture +def llm_auto_tool_call() -> MockLLM: + """LLM that automatically decides to call a tool.""" + options = MockLLMOptions( + response="Let me check the weather for you.", + tool_calls=[ + { + "name": "get_weather", + "arguments": '{"location": "New York"}', + "id": "auto_test", + "type": "function", + } + ], + ) + return MockLLM(default_options=options) + + +@pytest.fixture +def llm_required_tool_call() -> MockLLM: + """LLM that is forced to call a tool when tool_choice is 'required'.""" + options = MockLLMOptions( + response="", + tool_calls=[ + { + "name": "get_weather", + "arguments": '{"location": "Boston"}', + "id": "required_test", + "type": "function", + } + ], + ) + return MockLLM(default_options=options) + + +@pytest.fixture +def llm_specific_tool_call() -> MockLLM: + """LLM that calls a specific tool when tool_choice is a specific function.""" + options = MockLLMOptions( + response="", + tool_calls=[ + { + "name": "get_time", + "arguments": "{}", + "id": "specific_test", + "type": "function", + } + ], + ) + return MockLLM(default_options=options) + + async def _run( agent: Agent, input: str | BaseModel | None = None, options: AgentOptions | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResult: - return await agent.run(input, options=options, context=context) + return await agent.run(input, options=options, context=context, tool_choice=tool_choice) async def _run_streaming( @@ -157,8 +226,9 @@ async def _run_streaming( input: str | BaseModel | None = None, options: AgentOptions | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResultStreaming: - result = agent.run_streaming(input, options=options, context=context) + result = agent.run_streaming(input, options=options, context=context, tool_choice=tool_choice) async for _chunk in result: pass return result @@ -588,3 +658,114 @@ async def test_max_turns_not_exeeded_with_many_tool_calls(llm_multiple_tool_call assert result.content == "Final response after multiple tool calls" assert len(result.tool_calls) == 3 + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_tool_choice_none(llm_no_tool_call_when_none: MockLLM, method: Callable): + """Test agent run with tool_choice set to 'none'.""" + agent = Agent( + llm=llm_no_tool_call_when_none, + prompt=CustomPrompt, + tools=[get_weather], + ) + result = await method(agent, tool_choice="none") + + assert result.content == "I cannot call tools right now." + assert result.tool_calls is None + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_auto_tool_call(llm_auto_tool_call: MockLLM, method: Callable): + """Test agent run with automatic tool call.""" + agent = Agent( + llm=llm_auto_tool_call, + prompt=CustomPrompt, + tools=[get_weather], + ) + result = await method(agent) + + assert result.content == "Let me check the weather for you." + assert len(result.tool_calls) == 1 + assert result.tool_calls[0].id == "auto_test" + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_required_tool_call(llm_required_tool_call: MockLLM, method: Callable): + """Test agent run with required tool call.""" + agent = Agent( + llm=llm_required_tool_call, + prompt=CustomPrompt, + tools=[get_weather], + ) + result = await method(agent, tool_choice="required") + + assert result.content == "" + assert len(result.tool_calls) == 1 + assert result.tool_calls[0].id == "required_test" + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_specific_tool_call(llm_specific_tool_call: MockLLM, method: Callable): + """Test agent run with specific tool call.""" + agent = Agent( + llm=llm_specific_tool_call, + prompt=CustomPrompt, + tools=[get_weather, get_time], + ) + result = await method(agent, tool_choice=get_time) + + assert result.content == "" + assert len(result.tool_calls) == 1 + assert result.tool_calls[0].id == "specific_test" + assert result.tool_calls[0].name == "get_time" + assert result.tool_calls[0].result == "12:00 PM" + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_tool_choice_auto_explicit(llm_auto_tool_call: MockLLM, method: Callable): + """Test agent run with tool_choice explicitly set to 'auto'.""" + agent = Agent( + llm=llm_auto_tool_call, + prompt=CustomPrompt, + tools=[get_weather], + ) + result = await method(agent, tool_choice="auto") + + assert result.content == "Let me check the weather for you." + assert len(result.tool_calls) == 1 + assert result.tool_calls[0].name == "get_weather" + assert result.tool_calls[0].arguments == {"location": "New York"} + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_tool_choice_with_multiple_tools_available(llm_auto_tool_call: MockLLM, method: Callable): + """Test tool_choice behavior when multiple tools are available.""" + agent = Agent( + llm=llm_auto_tool_call, + prompt=CustomPrompt, + tools=[get_weather, get_time], # Multiple tools available + ) + + result = await method(agent, tool_choice="auto") + + assert result.content == "Let me check the weather for you." + assert len(result.tool_calls) == 1 + # The LLM chose to call get_weather based on its configuration + assert result.tool_calls[0].name == "get_weather" + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_tool_choice_history_preservation(llm_with_tool_call: MockLLM, method: Callable): + """Test that tool_choice works correctly with history preservation.""" + agent: Agent = Agent( + llm=llm_with_tool_call, + prompt="You are a helpful assistant", + tools=[get_weather], + keep_history=True, + ) + + await method(agent, input="Check weather", tool_choice="auto") + assert len(agent.history) >= 3 # At least system, user, assistant messages + # Should include tool call in history + tool_call_messages = [msg for msg in agent.history if msg.get("role") == "tool"] + assert len(tool_call_messages) >= 1 diff --git a/packages/ragbits-core/CHANGELOG.md b/packages/ragbits-core/CHANGELOG.md index 980b6dcf7..195fec7ad 100644 --- a/packages/ragbits-core/CHANGELOG.md +++ b/packages/ragbits-core/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Add tool_choice parameter to LLM interface (#738) + ## 1.2.1 (2025-08-04) ## 1.2.0 (2025-08-01) diff --git a/packages/ragbits-core/src/ragbits/core/llms/base.py b/packages/ragbits-core/src/ragbits/core/llms/base.py index 3c78ac785..4fd0c9cd4 100644 --- a/packages/ragbits-core/src/ragbits/core/llms/base.py +++ b/packages/ragbits-core/src/ragbits/core/llms/base.py @@ -2,7 +2,7 @@ import json from abc import ABC, abstractmethod from collections.abc import AsyncGenerator, AsyncIterator, Callable, MutableSequence -from typing import ClassVar, Generic, TypeVar, Union, cast, overload +from typing import ClassVar, Generic, Literal, TypeVar, Union, cast, overload from pydantic import BaseModel, Field, field_validator from typing_extensions import deprecated @@ -35,6 +35,8 @@ class LLMOptions(Options): LLMClientOptionsT = TypeVar("LLMClientOptionsT", bound=LLMOptions) Tool = Callable | dict +ToolChoiceWithCallable = Literal["none", "auto", "required"] | Tool +ToolChoice = Literal["none", "auto", "required"] | dict class LLMType(enum.Enum): @@ -62,8 +64,8 @@ def parse_tool_arguments(cls, tool_arguments: str) -> dict: """ Parser for converting tool arguments from string representation to dict """ - pased_arguments = json.loads(tool_arguments) - return pased_arguments + parsed_arguments = json.loads(tool_arguments) + return parsed_arguments class UsageItem(BaseModel): @@ -370,6 +372,7 @@ async def generate( prompt: BasePrompt | BasePromptWithParser[PromptOutputT], *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> PromptOutputT: ... @@ -379,6 +382,7 @@ async def generate( prompt: MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> list[PromptOutputT]: ... @@ -388,6 +392,7 @@ async def generate( prompt: BasePrompt | BasePromptWithParser[PromptOutputT], *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> PromptOutputT | list[ToolCall]: ... @@ -397,6 +402,7 @@ async def generate( prompt: MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> list[PromptOutputT | list[ToolCall]]: ... @@ -406,6 +412,7 @@ async def generate( prompt: str | ChatFormat, *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> str: ... @@ -415,6 +422,7 @@ async def generate( prompt: MutableSequence[str | ChatFormat], *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> list[str]: ... @@ -424,6 +432,7 @@ async def generate( prompt: str | ChatFormat, *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> str | list[ToolCall]: ... @@ -433,6 +442,7 @@ async def generate( prompt: MutableSequence[str | ChatFormat], *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> list[str | list[ToolCall]]: ... @@ -446,6 +456,7 @@ async def generate( | MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> str | PromptOutputT | list[ToolCall] | list[list[ToolCall] | str] | list[str | PromptOutputT | list[ToolCall]]: """ @@ -458,12 +469,18 @@ async def generate( - ChatFormat: List of message dictionaries in OpenAI chat format - Iterable of any of the above (MutableSequence is only for typing purposes) tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools + - Callable: one of provided tools options: Options to use for the LLM client. Returns: Parsed response(s) from LLM or list of tool calls. """ - response = await self.generate_with_metadata(prompt, tools=tools, options=options) + response = await self.generate_with_metadata(prompt, tools=tools, tool_choice=tool_choice, options=options) if isinstance(response, list): return [r.tool_calls if tools and r.tool_calls else r.content for r in response] else: @@ -475,6 +492,7 @@ async def generate_with_metadata( prompt: BasePrompt | BasePromptWithParser[PromptOutputT], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> LLMResponseWithMetadata[PromptOutputT]: ... @@ -484,6 +502,7 @@ async def generate_with_metadata( prompt: MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> list[LLMResponseWithMetadata[PromptOutputT]]: ... @@ -493,6 +512,7 @@ async def generate_with_metadata( prompt: str | ChatFormat, *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> LLMResponseWithMetadata[str]: ... @@ -502,6 +522,7 @@ async def generate_with_metadata( prompt: MutableSequence[str | ChatFormat], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> list[LLMResponseWithMetadata[str]]: ... @@ -515,6 +536,7 @@ async def generate_with_metadata( | MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> ( LLMResponseWithMetadata[str] @@ -533,6 +555,12 @@ async def generate_with_metadata( - ChatFormat: List of message dictionaries in OpenAI chat format - Iterable of any of the above (MutableSequence is only for typing purposes) tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools + - Callable: one of provided tools options: Options to use for the LLM client. Returns: @@ -546,6 +574,7 @@ async def generate_with_metadata( parsed_tools = ( [convert_function_to_function_schema(tool) if callable(tool) else tool for tool in tools] if tools else None ) + parsed_tool_choice = convert_function_to_function_schema(tool_choice) if callable(tool_choice) else tool_choice prompts: list[BasePrompt] = [SimplePrompt(p) if isinstance(p, str | list) else p for p in prompt] # type: ignore @@ -556,6 +585,7 @@ async def generate_with_metadata( prompt=prompts, options=merged_options, tools=parsed_tools, + tool_choice=parsed_tool_choice, ) parsed_responses = [] @@ -629,6 +659,7 @@ def generate_streaming( prompt: str | ChatFormat | BasePrompt, *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> LLMResultStreaming[str | Reasoning]: ... @@ -638,6 +669,7 @@ def generate_streaming( prompt: str | ChatFormat | BasePrompt, *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> LLMResultStreaming[str | Reasoning | ToolCall]: ... @@ -646,6 +678,7 @@ def generate_streaming( prompt: str | ChatFormat | BasePrompt, *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> LLMResultStreaming: """ @@ -655,18 +688,25 @@ def generate_streaming( Args: prompt: Formatted prompt template with conversation. tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools + - Callable: one of provided tools options: Options to use for the LLM. Returns: Response stream from LLM or list of tool calls. """ - return LLMResultStreaming(self._stream_internal(prompt, tools=tools, options=options)) + return LLMResultStreaming(self._stream_internal(prompt, tools=tools, tool_choice=tool_choice, options=options)) async def _stream_internal( self, prompt: str | ChatFormat | BasePrompt, *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> AsyncGenerator[str | Reasoning | ToolCall | LLMResponseWithMetadata, None]: with trace(model_name=self.model_name, prompt=prompt, options=repr(options)) as outputs: @@ -679,10 +719,14 @@ async def _stream_internal( if tools else None ) + parsed_tool_choice = ( + convert_function_to_function_schema(tool_choice) if callable(tool_choice) else tool_choice + ) response = await self._call_streaming( prompt=prompt, options=merged_options, tools=parsed_tools, + tool_choice=parsed_tool_choice, ) content = "" @@ -731,6 +775,7 @@ async def _call( prompt: MutableSequence[BasePrompt], options: LLMClientOptionsT, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> list[dict]: """ Calls LLM inference API. @@ -739,6 +784,11 @@ async def _call( prompt: Formatted prompt template with conversation. options: Additional settings used by the LLM. tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Response dict from LLM. @@ -750,6 +800,7 @@ async def _call_streaming( prompt: BasePrompt, options: LLMClientOptionsT, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[dict, None]: """ Calls LLM inference API with output streaming. @@ -758,6 +809,11 @@ async def _call_streaming( prompt: Formatted prompt template with conversation. options: Additional settings used by the LLM. tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Response dict stream from LLM. diff --git a/packages/ragbits-core/src/ragbits/core/llms/litellm.py b/packages/ragbits-core/src/ragbits/core/llms/litellm.py index a7447ff62..f3ce051a4 100644 --- a/packages/ragbits-core/src/ragbits/core/llms/litellm.py +++ b/packages/ragbits-core/src/ragbits/core/llms/litellm.py @@ -11,7 +11,7 @@ from ragbits.core.audit.metrics import record_metric from ragbits.core.audit.metrics.base import LLMMetric, MetricType -from ragbits.core.llms.base import LLM, LLMOptions +from ragbits.core.llms.base import LLM, LLMOptions, ToolChoice from ragbits.core.llms.exceptions import ( LLMConnectionError, LLMEmptyResponseError, @@ -160,6 +160,7 @@ async def _call( prompt: Iterable[BasePrompt], options: LiteLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> list[dict]: """ Calls the appropriate LLM endpoint with the given prompt and options. @@ -168,6 +169,11 @@ async def _call( prompt: Iterable of BasePrompt objects containing conversations options: Additional settings used by the LLM. tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: list of dictionaries with responses from the LLM and metadata. @@ -202,6 +208,7 @@ async def _call( output_schema=single_prompt.output_schema(), json_mode=single_prompt.json_mode ), tools=tools, + tool_choice=tool_choice, ) for single_prompt in prompt ) @@ -252,6 +259,7 @@ async def _call_streaming( prompt: BasePrompt, options: LiteLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[dict, None]: """ Calls the appropriate LLM endpoint with the given prompt and options. @@ -259,8 +267,12 @@ async def _call_streaming( Args: prompt: BasePrompt object containing the conversation options: Additional settings used by the LLM. - tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Response string from LLM. @@ -296,6 +308,7 @@ async def _call_streaming( options=options, response_format=response_format, tools=tools, + tool_choice=tool_choice, stream=True, stream_options={"include_usage": True}, ) @@ -409,6 +422,7 @@ async def _get_litellm_response( options: LiteLLMOptions, response_format: type[BaseModel] | dict | None, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, stream: bool = False, stream_options: dict | None = None, ) -> ModelResponse | CustomStreamWrapper: @@ -420,6 +434,7 @@ async def _get_litellm_response( "model": self.model_name, "response_format": response_format, "tools": tools, + "tool_choice": tool_choice, "stream": stream, **options.dict(), } diff --git a/packages/ragbits-core/src/ragbits/core/llms/local.py b/packages/ragbits-core/src/ragbits/core/llms/local.py index 1ec4e3d51..14284db1a 100644 --- a/packages/ragbits-core/src/ragbits/core/llms/local.py +++ b/packages/ragbits-core/src/ragbits/core/llms/local.py @@ -14,7 +14,7 @@ from ragbits.core.audit.metrics import record_metric from ragbits.core.audit.metrics.base import LLMMetric, MetricType -from ragbits.core.llms.base import LLM, LLMOptions +from ragbits.core.llms.base import LLM, LLMOptions, ToolChoice from ragbits.core.prompt.base import BasePrompt from ragbits.core.types import NOT_GIVEN, NotGiven @@ -117,6 +117,7 @@ async def _call( prompt: Iterable[BasePrompt], options: LocalLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> list[dict]: """ Makes a call to the local LLM with the provided prompt and options. @@ -125,6 +126,11 @@ async def _call( prompt: Iterable of BasePrompt objects containing conversations options: Additional settings used by the LLM. tools: Functions to be used as tools by LLM (Not Supported by the local model). + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Dictionary containing the responses from the LLM and throughput. @@ -132,7 +138,7 @@ async def _call( Raises: NotImplementedError: If tools are provided. """ - if tools is not None: + if tools or tool_choice: raise NotImplementedError("Tools are not supported for local LLMs") prompts = [p.chat for p in prompt] @@ -175,6 +181,7 @@ async def _call_streaming( prompt: BasePrompt, options: LocalLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[dict, None]: """ Makes a call to the local LLM with the provided prompt and options in streaming manner. @@ -182,9 +189,12 @@ async def _call_streaming( Args: prompt: Formatted prompt template with conversation. options: Additional settings used by the LLM. - json_mode: Force the response to be in JSON format (not used). - output_schema: Output schema for requesting a specific response format (not used). tools: Functions to be used as tools by LLM (not used). + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Async generator of tokens. @@ -192,7 +202,7 @@ async def _call_streaming( Raises: NotImplementedError: If tools are provided. """ - if tools: + if tools or tool_choice: raise NotImplementedError("Tools are not supported for local LLMs") start_time = time.perf_counter() diff --git a/packages/ragbits-core/src/ragbits/core/llms/mock.py b/packages/ragbits-core/src/ragbits/core/llms/mock.py index 200b82a1f..56a929b87 100644 --- a/packages/ragbits-core/src/ragbits/core/llms/mock.py +++ b/packages/ragbits-core/src/ragbits/core/llms/mock.py @@ -1,6 +1,6 @@ from collections.abc import AsyncGenerator, Iterable -from ragbits.core.llms.base import LLM, LLMOptions +from ragbits.core.llms.base import LLM, LLMOptions, ToolChoice from ragbits.core.prompt import ChatFormat from ragbits.core.prompt.base import BasePrompt from ragbits.core.types import NOT_GIVEN, NotGiven @@ -44,6 +44,7 @@ def __init__( """ super().__init__(model_name, default_options=default_options) self.calls: list[ChatFormat] = [] + self.tool_choice: ToolChoice | None = None self._price_per_prompt_token = price_per_prompt_token self._price_per_completion_token = price_per_completion_token @@ -64,12 +65,14 @@ async def _call( # noqa: PLR6301 prompt: Iterable[BasePrompt], options: MockLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> list[dict]: """ Mocks the call to the LLM, using the response from the options if provided. """ prompt = list(prompt) self.calls.extend([p.chat for p in prompt]) + self.tool_choice = tool_choice response = "mocked response" if isinstance(options.response, NotGiven) else options.response reasoning = None if isinstance(options.reasoning, NotGiven) else options.reasoning tool_calls = ( @@ -99,11 +102,13 @@ async def _call_streaming( # noqa: PLR6301 prompt: BasePrompt, options: MockLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[dict, None]: """ Mocks the call to the LLM, using the response from the options if provided. """ self.calls.append(prompt.chat) + self.tool_choice = tool_choice async def generator() -> AsyncGenerator[dict, None]: if not isinstance(options.tool_calls, NotGiven) and not any( diff --git a/packages/ragbits-core/tests/unit/llms/test_base.py b/packages/ragbits-core/tests/unit/llms/test_base.py index 8d9985293..392ffd8d8 100644 --- a/packages/ragbits-core/tests/unit/llms/test_base.py +++ b/packages/ragbits-core/tests/unit/llms/test_base.py @@ -80,6 +80,28 @@ def get_weather(location: str) -> str: return json.dumps({"location": location, "temperature": "unknown"}) +@pytest.fixture(name="get_weather_schema") +def mock_get_weather_schema() -> dict: + return { + "type": "function", + "function": { + "name": "get_weather", + "description": "Returns the current weather for a given location.", + "parameters": { + "type": "object", + "properties": { + "location": { + "description": "The location to get the weather for.", + "title": "Location", + "type": "string", + } + }, + "required": ["location"], + }, + }, + } + + async def test_generate_with_str(llm: MockLLM): response = await llm.generate("Hello") assert response == "test response" @@ -274,6 +296,44 @@ async def test_generate_stream_with_tools_output_no_tool_used(llm: MockLLM): assert [response async for response in stream] == ["first response", "second response"] +async def test_generate_with_tool_choice_str(llm_with_tools: MockLLM): + await llm_with_tools.generate("Hello", tools=[get_weather], tool_choice="auto") + assert llm_with_tools.tool_choice == "auto" + + +async def test_generate_with_tool_choice_dict(llm_with_tools: MockLLM): + tool_choice = {"type": "function", "function": {"name": "get_weather"}} + await llm_with_tools.generate("Hello", tools=[get_weather], tool_choice=tool_choice) + assert llm_with_tools.tool_choice == tool_choice + + +async def test_generate_with_tool_choice_callable(llm_with_tools: MockLLM, get_weather_schema: dict): + await llm_with_tools.generate("Hello", tools=[get_weather], tool_choice=get_weather) + assert llm_with_tools.tool_choice == get_weather_schema + + +async def test_generate_streaming_with_tool_choice_str(llm_with_tools: MockLLM): + stream = llm_with_tools.generate_streaming("Hello", tools=[get_weather], tool_choice="auto") + async for _ in stream: + pass + assert llm_with_tools.tool_choice == "auto" + + +async def test_generate_streaming_with_tool_choice_dict(llm_with_tools: MockLLM): + tool_choice = {"type": "function", "function": {"name": "get_weather"}} + stream = llm_with_tools.generate_streaming("Hello", tools=[get_weather], tool_choice=tool_choice) + async for _ in stream: + pass + assert llm_with_tools.tool_choice == tool_choice + + +async def test_generate_streaming_with_tool_choice_callable(llm_with_tools: MockLLM, get_weather_schema: dict): + stream = llm_with_tools.generate_streaming("Hello", tools=[get_weather], tool_choice=get_weather) + async for _ in stream: + pass + assert llm_with_tools.tool_choice == get_weather_schema + + def test_init_with_str(): prompt = SimplePrompt("Hello") assert prompt.chat == [{"role": "user", "content": "Hello"}] From 9290b3e9ee905df798fdfd4817c032b996a81f8e Mon Sep 17 00:00:00 2001 From: GlockPL Date: Wed, 6 Aug 2025 10:24:57 +0200 Subject: [PATCH 14/25] feat: force tool calling support (#751) Co-authored-by: Konrad Czarnota Co-authored-by: GlockPL Co-authored-by: GlockPL --- docs/how-to/agents/define_and_use_agents.md | 8 + examples/agents/tool_use.py | 2 +- packages/ragbits-agents/CHANGELOG.md | 2 +- .../src/ragbits/agents/_main.py | 23 ++- .../ragbits-agents/src/ragbits/agents/tool.py | 5 +- .../ragbits-agents/tests/unit/test_agent.py | 187 +++++++++++++++++- packages/ragbits-core/CHANGELOG.md | 2 + .../src/ragbits/core/llms/base.py | 66 ++++++- .../src/ragbits/core/llms/litellm.py | 19 +- .../src/ragbits/core/llms/local.py | 20 +- .../src/ragbits/core/llms/mock.py | 7 +- .../ragbits-core/tests/unit/llms/test_base.py | 60 ++++++ 12 files changed, 380 insertions(+), 21 deletions(-) diff --git a/docs/how-to/agents/define_and_use_agents.md b/docs/how-to/agents/define_and_use_agents.md index 187091513..ee46b189f 100644 --- a/docs/how-to/agents/define_and_use_agents.md +++ b/docs/how-to/agents/define_and_use_agents.md @@ -49,6 +49,14 @@ The result is an [AgentResult][ragbits.agents.AgentResult], which includes the m You can find the complete code example in the Ragbits repository [here](https://github.com/deepsense-ai/ragbits/blob/main/examples/agents/tool_use.py). +## Tool choice +To control what tool is used at first call you could use `tool_choice` parameter. There are the following options: +- "auto": let model decide if tool call is needed +- "none": do not call tool +- "required: enforce tool usage (model decides which one) +- Callable: one of provided tools + + ## Conversation history [`Agent`][ragbits.agents.Agent]s can retain conversation context across multiple interactions by enabling the `keep_history` flag when initializing the agent. This is useful when you want the agent to understand follow-up questions without needing the user to repeat earlier details. diff --git a/examples/agents/tool_use.py b/examples/agents/tool_use.py index 907cb99f2..38019f571 100644 --- a/examples/agents/tool_use.py +++ b/examples/agents/tool_use.py @@ -82,7 +82,7 @@ async def main() -> None: tools=[get_weather], default_options=AgentOptions(max_total_tokens=500, max_turns=5), ) - response = await agent.run(WeatherPromptInput(location="Paris")) + response = await agent.run(WeatherPromptInput(location="Paris"), tool_choice=get_weather) print(response) diff --git a/packages/ragbits-agents/CHANGELOG.md b/packages/ragbits-agents/CHANGELOG.md index 07c6f08a3..2f8b33161 100644 --- a/packages/ragbits-agents/CHANGELOG.md +++ b/packages/ragbits-agents/CHANGELOG.md @@ -1,6 +1,7 @@ # CHANGELOG ## Unreleased +- Add tool_choice parameter to agent interface (#738) ## 1.2.2 (2025-08-08) @@ -19,7 +20,6 @@ ### Changed - ragbits-core updated to version v1.2.0 - - Add native openai tools support (#621) - add Context to Agents (#715) diff --git a/packages/ragbits-agents/src/ragbits/agents/_main.py b/packages/ragbits-agents/src/ragbits/agents/_main.py index 027cd36da..9efa2efd6 100644 --- a/packages/ragbits-agents/src/ragbits/agents/_main.py +++ b/packages/ragbits-agents/src/ragbits/agents/_main.py @@ -22,7 +22,7 @@ ) from ragbits.agents.mcp.server import MCPServer from ragbits.agents.mcp.utils import get_tools -from ragbits.agents.tool import Tool, ToolCallResult +from ragbits.agents.tool import Tool, ToolCallResult, ToolChoice from ragbits.core.audit.traces import trace from ragbits.core.llms.base import LLM, LLMClientOptionsT, LLMResponseWithMetadata, ToolCall, Usage from ragbits.core.options import Options @@ -192,6 +192,7 @@ async def run( input: str | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResult[PromptOutputT]: ... @overload @@ -200,6 +201,7 @@ async def run( input: PromptInputT, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResult[PromptOutputT]: ... async def run( @@ -207,6 +209,7 @@ async def run( input: str | PromptInputT | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResult[PromptOutputT]: """ Run the agent. The method is experimental, inputs and outputs may change in the future. @@ -218,6 +221,11 @@ async def run( - None: No input. Only valid when a string prompt was provided during initialization. options: The options for the agent run. context: The context for the agent run. + tool_choice: Parameter that allows to control what tool is used at first call. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - Callable: one of provided tools Returns: The result of the agent run. @@ -251,6 +259,7 @@ async def run( await self.llm.generate_with_metadata( prompt=prompt_with_history, tools=[tool.to_function_schema() for tool in tools_mapping.values()], + tool_choice=tool_choice if tool_choice and turn_count == 0 else None, options=self._get_llm_options(llm_options, merged_options, context.usage), ), ) @@ -294,6 +303,7 @@ def run_streaming( input: str | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResultStreaming: ... @overload @@ -302,6 +312,7 @@ def run_streaming( input: PromptInputT, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResultStreaming: ... def run_streaming( @@ -309,6 +320,7 @@ def run_streaming( input: str | PromptInputT | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResultStreaming: """ This method returns an `AgentResultStreaming` object that can be asynchronously @@ -318,6 +330,11 @@ def run_streaming( input: The input for the agent run. options: The options for the agent run. context: The context for the agent run. + tool_choice: Parameter that allows to control what tool is used at first call. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - Callable: one of provided tools Returns: A `StreamingResult` object for iteration and collection. @@ -329,7 +346,7 @@ def run_streaming( AgentInvalidPromptInputError: If the prompt/input combination is invalid. AgentMaxTurnsExceededError: If the maximum number of turns is exceeded. """ - generator = self._stream_internal(input, options, context) + generator = self._stream_internal(input, options, context, tool_choice) return AgentResultStreaming(generator) async def _stream_internal( @@ -337,6 +354,7 @@ async def _stream_internal( input: str | PromptInputT | None = None, options: AgentOptions[LLMClientOptionsT] | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[str | ToolCall | ToolCallResult | SimpleNamespace | BasePrompt | Usage]: if context is None: context = AgentRunContext() @@ -357,6 +375,7 @@ async def _stream_internal( streaming_result = self.llm.generate_streaming( prompt=prompt_with_history, tools=[tool.to_function_schema() for tool in tools_mapping.values()], + tool_choice=tool_choice if tool_choice and turn_count == 0 else None, options=self._get_llm_options(llm_options, merged_options, context.usage), ) async for chunk in streaming_result: diff --git a/packages/ragbits-agents/src/ragbits/agents/tool.py b/packages/ragbits-agents/src/ragbits/agents/tool.py index 0ab3d0422..32fe5603d 100644 --- a/packages/ragbits-agents/src/ragbits/agents/tool.py +++ b/packages/ragbits-agents/src/ragbits/agents/tool.py @@ -1,6 +1,6 @@ from collections.abc import Callable from dataclasses import dataclass -from typing import Any +from typing import Any, Literal from typing_extensions import Self @@ -76,3 +76,6 @@ def to_function_schema(self) -> dict[str, Any]: "parameters": self.parameters, }, } + + +ToolChoice = Literal["auto", "none", "required"] | Callable diff --git a/packages/ragbits-agents/tests/unit/test_agent.py b/packages/ragbits-agents/tests/unit/test_agent.py index 00d6ca883..5043cd0f3 100644 --- a/packages/ragbits-agents/tests/unit/test_agent.py +++ b/packages/ragbits-agents/tests/unit/test_agent.py @@ -6,7 +6,7 @@ from pydantic import BaseModel from ragbits.agents import Agent, AgentRunContext -from ragbits.agents._main import AgentOptions, AgentResult, AgentResultStreaming, ToolCallResult +from ragbits.agents._main import AgentOptions, AgentResult, AgentResultStreaming, ToolCallResult, ToolChoice from ragbits.agents.exceptions import ( AgentInvalidPromptInputError, AgentMaxTurnsExceededError, @@ -143,13 +143,82 @@ def llm_with_tool_call_context() -> MockLLM: return MockLLM(default_options=options) +def get_time() -> str: + """ + Returns the current time. + + Returns: + The current time as a string. + """ + return "12:00 PM" + + +@pytest.fixture +def llm_no_tool_call_when_none() -> MockLLM: + """LLM that doesn't call tools when tool_choice is 'none'.""" + options = MockLLMOptions(response="I cannot call tools right now.") + return MockLLM(default_options=options) + + +@pytest.fixture +def llm_auto_tool_call() -> MockLLM: + """LLM that automatically decides to call a tool.""" + options = MockLLMOptions( + response="Let me check the weather for you.", + tool_calls=[ + { + "name": "get_weather", + "arguments": '{"location": "New York"}', + "id": "auto_test", + "type": "function", + } + ], + ) + return MockLLM(default_options=options) + + +@pytest.fixture +def llm_required_tool_call() -> MockLLM: + """LLM that is forced to call a tool when tool_choice is 'required'.""" + options = MockLLMOptions( + response="", + tool_calls=[ + { + "name": "get_weather", + "arguments": '{"location": "Boston"}', + "id": "required_test", + "type": "function", + } + ], + ) + return MockLLM(default_options=options) + + +@pytest.fixture +def llm_specific_tool_call() -> MockLLM: + """LLM that calls a specific tool when tool_choice is a specific function.""" + options = MockLLMOptions( + response="", + tool_calls=[ + { + "name": "get_time", + "arguments": "{}", + "id": "specific_test", + "type": "function", + } + ], + ) + return MockLLM(default_options=options) + + async def _run( agent: Agent, input: str | BaseModel | None = None, options: AgentOptions | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResult: - return await agent.run(input, options=options, context=context) + return await agent.run(input, options=options, context=context, tool_choice=tool_choice) async def _run_streaming( @@ -157,8 +226,9 @@ async def _run_streaming( input: str | BaseModel | None = None, options: AgentOptions | None = None, context: AgentRunContext | None = None, + tool_choice: ToolChoice | None = None, ) -> AgentResultStreaming: - result = agent.run_streaming(input, options=options, context=context) + result = agent.run_streaming(input, options=options, context=context, tool_choice=tool_choice) async for _chunk in result: pass return result @@ -588,3 +658,114 @@ async def test_max_turns_not_exeeded_with_many_tool_calls(llm_multiple_tool_call assert result.content == "Final response after multiple tool calls" assert len(result.tool_calls) == 3 + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_tool_choice_none(llm_no_tool_call_when_none: MockLLM, method: Callable): + """Test agent run with tool_choice set to 'none'.""" + agent = Agent( + llm=llm_no_tool_call_when_none, + prompt=CustomPrompt, + tools=[get_weather], + ) + result = await method(agent, tool_choice="none") + + assert result.content == "I cannot call tools right now." + assert result.tool_calls is None + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_auto_tool_call(llm_auto_tool_call: MockLLM, method: Callable): + """Test agent run with automatic tool call.""" + agent = Agent( + llm=llm_auto_tool_call, + prompt=CustomPrompt, + tools=[get_weather], + ) + result = await method(agent) + + assert result.content == "Let me check the weather for you." + assert len(result.tool_calls) == 1 + assert result.tool_calls[0].id == "auto_test" + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_required_tool_call(llm_required_tool_call: MockLLM, method: Callable): + """Test agent run with required tool call.""" + agent = Agent( + llm=llm_required_tool_call, + prompt=CustomPrompt, + tools=[get_weather], + ) + result = await method(agent, tool_choice="required") + + assert result.content == "" + assert len(result.tool_calls) == 1 + assert result.tool_calls[0].id == "required_test" + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_specific_tool_call(llm_specific_tool_call: MockLLM, method: Callable): + """Test agent run with specific tool call.""" + agent = Agent( + llm=llm_specific_tool_call, + prompt=CustomPrompt, + tools=[get_weather, get_time], + ) + result = await method(agent, tool_choice=get_time) + + assert result.content == "" + assert len(result.tool_calls) == 1 + assert result.tool_calls[0].id == "specific_test" + assert result.tool_calls[0].name == "get_time" + assert result.tool_calls[0].result == "12:00 PM" + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_agent_run_with_tool_choice_auto_explicit(llm_auto_tool_call: MockLLM, method: Callable): + """Test agent run with tool_choice explicitly set to 'auto'.""" + agent = Agent( + llm=llm_auto_tool_call, + prompt=CustomPrompt, + tools=[get_weather], + ) + result = await method(agent, tool_choice="auto") + + assert result.content == "Let me check the weather for you." + assert len(result.tool_calls) == 1 + assert result.tool_calls[0].name == "get_weather" + assert result.tool_calls[0].arguments == {"location": "New York"} + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_tool_choice_with_multiple_tools_available(llm_auto_tool_call: MockLLM, method: Callable): + """Test tool_choice behavior when multiple tools are available.""" + agent = Agent( + llm=llm_auto_tool_call, + prompt=CustomPrompt, + tools=[get_weather, get_time], # Multiple tools available + ) + + result = await method(agent, tool_choice="auto") + + assert result.content == "Let me check the weather for you." + assert len(result.tool_calls) == 1 + # The LLM chose to call get_weather based on its configuration + assert result.tool_calls[0].name == "get_weather" + + +@pytest.mark.parametrize("method", [_run, _run_streaming]) +async def test_tool_choice_history_preservation(llm_with_tool_call: MockLLM, method: Callable): + """Test that tool_choice works correctly with history preservation.""" + agent: Agent = Agent( + llm=llm_with_tool_call, + prompt="You are a helpful assistant", + tools=[get_weather], + keep_history=True, + ) + + await method(agent, input="Check weather", tool_choice="auto") + assert len(agent.history) >= 3 # At least system, user, assistant messages + # Should include tool call in history + tool_call_messages = [msg for msg in agent.history if msg.get("role") == "tool"] + assert len(tool_call_messages) >= 1 diff --git a/packages/ragbits-core/CHANGELOG.md b/packages/ragbits-core/CHANGELOG.md index 11ef51f86..a8c4a3014 100644 --- a/packages/ragbits-core/CHANGELOG.md +++ b/packages/ragbits-core/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Add tool_choice parameter to LLM interface (#738) + ## 1.2.2 (2025-08-08) - Fix: rendering iterator arguments in Prompt (#768) diff --git a/packages/ragbits-core/src/ragbits/core/llms/base.py b/packages/ragbits-core/src/ragbits/core/llms/base.py index 4d380813f..04d55859d 100644 --- a/packages/ragbits-core/src/ragbits/core/llms/base.py +++ b/packages/ragbits-core/src/ragbits/core/llms/base.py @@ -2,7 +2,7 @@ import json from abc import ABC, abstractmethod from collections.abc import AsyncGenerator, AsyncIterator, Callable, MutableSequence -from typing import ClassVar, Generic, TypeVar, Union, cast, overload +from typing import ClassVar, Generic, Literal, TypeVar, Union, cast, overload from pydantic import BaseModel, Field, field_validator from typing_extensions import deprecated @@ -35,6 +35,8 @@ class LLMOptions(Options): LLMClientOptionsT = TypeVar("LLMClientOptionsT", bound=LLMOptions) Tool = Callable | dict +ToolChoiceWithCallable = Literal["none", "auto", "required"] | Tool +ToolChoice = Literal["none", "auto", "required"] | dict class LLMType(enum.Enum): @@ -62,8 +64,8 @@ def parse_tool_arguments(cls, tool_arguments: str) -> dict: """ Parser for converting tool arguments from string representation to dict """ - pased_arguments = json.loads(tool_arguments) - return pased_arguments + parsed_arguments = json.loads(tool_arguments) + return parsed_arguments class UsageItem(BaseModel): @@ -379,6 +381,7 @@ async def generate( prompt: BasePrompt | BasePromptWithParser[PromptOutputT], *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> PromptOutputT: ... @@ -388,6 +391,7 @@ async def generate( prompt: MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> list[PromptOutputT]: ... @@ -397,6 +401,7 @@ async def generate( prompt: BasePrompt | BasePromptWithParser[PromptOutputT], *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> PromptOutputT | list[ToolCall]: ... @@ -406,6 +411,7 @@ async def generate( prompt: MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> list[PromptOutputT | list[ToolCall]]: ... @@ -415,6 +421,7 @@ async def generate( prompt: str | ChatFormat, *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> str: ... @@ -424,6 +431,7 @@ async def generate( prompt: MutableSequence[str | ChatFormat], *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> list[str]: ... @@ -433,6 +441,7 @@ async def generate( prompt: str | ChatFormat, *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> str | list[ToolCall]: ... @@ -442,6 +451,7 @@ async def generate( prompt: MutableSequence[str | ChatFormat], *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> list[str | list[ToolCall]]: ... @@ -455,6 +465,7 @@ async def generate( | MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> str | PromptOutputT | list[ToolCall] | list[list[ToolCall] | str] | list[str | PromptOutputT | list[ToolCall]]: """ @@ -467,12 +478,18 @@ async def generate( - ChatFormat: List of message dictionaries in OpenAI chat format - Iterable of any of the above (MutableSequence is only for typing purposes) tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools + - Callable: one of provided tools options: Options to use for the LLM client. Returns: Parsed response(s) from LLM or list of tool calls. """ - response = await self.generate_with_metadata(prompt, tools=tools, options=options) + response = await self.generate_with_metadata(prompt, tools=tools, tool_choice=tool_choice, options=options) if isinstance(response, list): return [r.tool_calls if tools and r.tool_calls else r.content for r in response] else: @@ -484,6 +501,7 @@ async def generate_with_metadata( prompt: BasePrompt | BasePromptWithParser[PromptOutputT], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> LLMResponseWithMetadata[PromptOutputT]: ... @@ -493,6 +511,7 @@ async def generate_with_metadata( prompt: MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> list[LLMResponseWithMetadata[PromptOutputT]]: ... @@ -502,6 +521,7 @@ async def generate_with_metadata( prompt: str | ChatFormat, *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> LLMResponseWithMetadata[str]: ... @@ -511,6 +531,7 @@ async def generate_with_metadata( prompt: MutableSequence[str | ChatFormat], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> list[LLMResponseWithMetadata[str]]: ... @@ -524,6 +545,7 @@ async def generate_with_metadata( | MutableSequence[BasePrompt | BasePromptWithParser[PromptOutputT]], *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> ( LLMResponseWithMetadata[str] @@ -542,6 +564,12 @@ async def generate_with_metadata( - ChatFormat: List of message dictionaries in OpenAI chat format - Iterable of any of the above (MutableSequence is only for typing purposes) tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools + - Callable: one of provided tools options: Options to use for the LLM client. Returns: @@ -555,6 +583,7 @@ async def generate_with_metadata( parsed_tools = ( [convert_function_to_function_schema(tool) if callable(tool) else tool for tool in tools] if tools else None ) + parsed_tool_choice = convert_function_to_function_schema(tool_choice) if callable(tool_choice) else tool_choice prompts: list[BasePrompt] = [SimplePrompt(p) if isinstance(p, str | list) else p for p in prompt] # type: ignore @@ -565,6 +594,7 @@ async def generate_with_metadata( prompt=prompts, options=merged_options, tools=parsed_tools, + tool_choice=parsed_tool_choice, ) parsed_responses = [] @@ -638,6 +668,7 @@ def generate_streaming( prompt: str | ChatFormat | BasePrompt, *, tools: None = None, + tool_choice: None = None, options: LLMClientOptionsT | None = None, ) -> LLMResultStreaming[str | Reasoning]: ... @@ -647,6 +678,7 @@ def generate_streaming( prompt: str | ChatFormat | BasePrompt, *, tools: list[Tool], + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> LLMResultStreaming[str | Reasoning | ToolCall]: ... @@ -655,6 +687,7 @@ def generate_streaming( prompt: str | ChatFormat | BasePrompt, *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> LLMResultStreaming: """ @@ -664,18 +697,25 @@ def generate_streaming( Args: prompt: Formatted prompt template with conversation. tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools + - Callable: one of provided tools options: Options to use for the LLM. Returns: Response stream from LLM or list of tool calls. """ - return LLMResultStreaming(self._stream_internal(prompt, tools=tools, options=options)) + return LLMResultStreaming(self._stream_internal(prompt, tools=tools, tool_choice=tool_choice, options=options)) async def _stream_internal( self, prompt: str | ChatFormat | BasePrompt, *, tools: list[Tool] | None = None, + tool_choice: ToolChoiceWithCallable | None = None, options: LLMClientOptionsT | None = None, ) -> AsyncGenerator[str | Reasoning | ToolCall | LLMResponseWithMetadata, None]: with trace(model_name=self.model_name, prompt=prompt, options=repr(options)) as outputs: @@ -688,10 +728,14 @@ async def _stream_internal( if tools else None ) + parsed_tool_choice = ( + convert_function_to_function_schema(tool_choice) if callable(tool_choice) else tool_choice + ) response = await self._call_streaming( prompt=prompt, options=merged_options, tools=parsed_tools, + tool_choice=parsed_tool_choice, ) content = "" @@ -740,6 +784,7 @@ async def _call( prompt: MutableSequence[BasePrompt], options: LLMClientOptionsT, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> list[dict]: """ Calls LLM inference API. @@ -748,6 +793,11 @@ async def _call( prompt: Formatted prompt template with conversation. options: Additional settings used by the LLM. tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Response dict from LLM. @@ -759,6 +809,7 @@ async def _call_streaming( prompt: BasePrompt, options: LLMClientOptionsT, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[dict, None]: """ Calls LLM inference API with output streaming. @@ -767,6 +818,11 @@ async def _call_streaming( prompt: Formatted prompt template with conversation. options: Additional settings used by the LLM. tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Response dict stream from LLM. diff --git a/packages/ragbits-core/src/ragbits/core/llms/litellm.py b/packages/ragbits-core/src/ragbits/core/llms/litellm.py index a7447ff62..f3ce051a4 100644 --- a/packages/ragbits-core/src/ragbits/core/llms/litellm.py +++ b/packages/ragbits-core/src/ragbits/core/llms/litellm.py @@ -11,7 +11,7 @@ from ragbits.core.audit.metrics import record_metric from ragbits.core.audit.metrics.base import LLMMetric, MetricType -from ragbits.core.llms.base import LLM, LLMOptions +from ragbits.core.llms.base import LLM, LLMOptions, ToolChoice from ragbits.core.llms.exceptions import ( LLMConnectionError, LLMEmptyResponseError, @@ -160,6 +160,7 @@ async def _call( prompt: Iterable[BasePrompt], options: LiteLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> list[dict]: """ Calls the appropriate LLM endpoint with the given prompt and options. @@ -168,6 +169,11 @@ async def _call( prompt: Iterable of BasePrompt objects containing conversations options: Additional settings used by the LLM. tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: list of dictionaries with responses from the LLM and metadata. @@ -202,6 +208,7 @@ async def _call( output_schema=single_prompt.output_schema(), json_mode=single_prompt.json_mode ), tools=tools, + tool_choice=tool_choice, ) for single_prompt in prompt ) @@ -252,6 +259,7 @@ async def _call_streaming( prompt: BasePrompt, options: LiteLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[dict, None]: """ Calls the appropriate LLM endpoint with the given prompt and options. @@ -259,8 +267,12 @@ async def _call_streaming( Args: prompt: BasePrompt object containing the conversation options: Additional settings used by the LLM. - tools: Functions to be used as tools by the LLM. + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Response string from LLM. @@ -296,6 +308,7 @@ async def _call_streaming( options=options, response_format=response_format, tools=tools, + tool_choice=tool_choice, stream=True, stream_options={"include_usage": True}, ) @@ -409,6 +422,7 @@ async def _get_litellm_response( options: LiteLLMOptions, response_format: type[BaseModel] | dict | None, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, stream: bool = False, stream_options: dict | None = None, ) -> ModelResponse | CustomStreamWrapper: @@ -420,6 +434,7 @@ async def _get_litellm_response( "model": self.model_name, "response_format": response_format, "tools": tools, + "tool_choice": tool_choice, "stream": stream, **options.dict(), } diff --git a/packages/ragbits-core/src/ragbits/core/llms/local.py b/packages/ragbits-core/src/ragbits/core/llms/local.py index 1ec4e3d51..14284db1a 100644 --- a/packages/ragbits-core/src/ragbits/core/llms/local.py +++ b/packages/ragbits-core/src/ragbits/core/llms/local.py @@ -14,7 +14,7 @@ from ragbits.core.audit.metrics import record_metric from ragbits.core.audit.metrics.base import LLMMetric, MetricType -from ragbits.core.llms.base import LLM, LLMOptions +from ragbits.core.llms.base import LLM, LLMOptions, ToolChoice from ragbits.core.prompt.base import BasePrompt from ragbits.core.types import NOT_GIVEN, NotGiven @@ -117,6 +117,7 @@ async def _call( prompt: Iterable[BasePrompt], options: LocalLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> list[dict]: """ Makes a call to the local LLM with the provided prompt and options. @@ -125,6 +126,11 @@ async def _call( prompt: Iterable of BasePrompt objects containing conversations options: Additional settings used by the LLM. tools: Functions to be used as tools by LLM (Not Supported by the local model). + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Dictionary containing the responses from the LLM and throughput. @@ -132,7 +138,7 @@ async def _call( Raises: NotImplementedError: If tools are provided. """ - if tools is not None: + if tools or tool_choice: raise NotImplementedError("Tools are not supported for local LLMs") prompts = [p.chat for p in prompt] @@ -175,6 +181,7 @@ async def _call_streaming( prompt: BasePrompt, options: LocalLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[dict, None]: """ Makes a call to the local LLM with the provided prompt and options in streaming manner. @@ -182,9 +189,12 @@ async def _call_streaming( Args: prompt: Formatted prompt template with conversation. options: Additional settings used by the LLM. - json_mode: Force the response to be in JSON format (not used). - output_schema: Output schema for requesting a specific response format (not used). tools: Functions to be used as tools by LLM (not used). + tool_choice: Parameter that allows to control what tool is used. Can be one of: + - "auto": let model decide if tool call is needed + - "none": do not call tool + - "required: enforce tool usage (model decides which one) + - dict: tool dict corresponding to one of provided tools Returns: Async generator of tokens. @@ -192,7 +202,7 @@ async def _call_streaming( Raises: NotImplementedError: If tools are provided. """ - if tools: + if tools or tool_choice: raise NotImplementedError("Tools are not supported for local LLMs") start_time = time.perf_counter() diff --git a/packages/ragbits-core/src/ragbits/core/llms/mock.py b/packages/ragbits-core/src/ragbits/core/llms/mock.py index 200b82a1f..56a929b87 100644 --- a/packages/ragbits-core/src/ragbits/core/llms/mock.py +++ b/packages/ragbits-core/src/ragbits/core/llms/mock.py @@ -1,6 +1,6 @@ from collections.abc import AsyncGenerator, Iterable -from ragbits.core.llms.base import LLM, LLMOptions +from ragbits.core.llms.base import LLM, LLMOptions, ToolChoice from ragbits.core.prompt import ChatFormat from ragbits.core.prompt.base import BasePrompt from ragbits.core.types import NOT_GIVEN, NotGiven @@ -44,6 +44,7 @@ def __init__( """ super().__init__(model_name, default_options=default_options) self.calls: list[ChatFormat] = [] + self.tool_choice: ToolChoice | None = None self._price_per_prompt_token = price_per_prompt_token self._price_per_completion_token = price_per_completion_token @@ -64,12 +65,14 @@ async def _call( # noqa: PLR6301 prompt: Iterable[BasePrompt], options: MockLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> list[dict]: """ Mocks the call to the LLM, using the response from the options if provided. """ prompt = list(prompt) self.calls.extend([p.chat for p in prompt]) + self.tool_choice = tool_choice response = "mocked response" if isinstance(options.response, NotGiven) else options.response reasoning = None if isinstance(options.reasoning, NotGiven) else options.reasoning tool_calls = ( @@ -99,11 +102,13 @@ async def _call_streaming( # noqa: PLR6301 prompt: BasePrompt, options: MockLLMOptions, tools: list[dict] | None = None, + tool_choice: ToolChoice | None = None, ) -> AsyncGenerator[dict, None]: """ Mocks the call to the LLM, using the response from the options if provided. """ self.calls.append(prompt.chat) + self.tool_choice = tool_choice async def generator() -> AsyncGenerator[dict, None]: if not isinstance(options.tool_calls, NotGiven) and not any( diff --git a/packages/ragbits-core/tests/unit/llms/test_base.py b/packages/ragbits-core/tests/unit/llms/test_base.py index 8d9985293..392ffd8d8 100644 --- a/packages/ragbits-core/tests/unit/llms/test_base.py +++ b/packages/ragbits-core/tests/unit/llms/test_base.py @@ -80,6 +80,28 @@ def get_weather(location: str) -> str: return json.dumps({"location": location, "temperature": "unknown"}) +@pytest.fixture(name="get_weather_schema") +def mock_get_weather_schema() -> dict: + return { + "type": "function", + "function": { + "name": "get_weather", + "description": "Returns the current weather for a given location.", + "parameters": { + "type": "object", + "properties": { + "location": { + "description": "The location to get the weather for.", + "title": "Location", + "type": "string", + } + }, + "required": ["location"], + }, + }, + } + + async def test_generate_with_str(llm: MockLLM): response = await llm.generate("Hello") assert response == "test response" @@ -274,6 +296,44 @@ async def test_generate_stream_with_tools_output_no_tool_used(llm: MockLLM): assert [response async for response in stream] == ["first response", "second response"] +async def test_generate_with_tool_choice_str(llm_with_tools: MockLLM): + await llm_with_tools.generate("Hello", tools=[get_weather], tool_choice="auto") + assert llm_with_tools.tool_choice == "auto" + + +async def test_generate_with_tool_choice_dict(llm_with_tools: MockLLM): + tool_choice = {"type": "function", "function": {"name": "get_weather"}} + await llm_with_tools.generate("Hello", tools=[get_weather], tool_choice=tool_choice) + assert llm_with_tools.tool_choice == tool_choice + + +async def test_generate_with_tool_choice_callable(llm_with_tools: MockLLM, get_weather_schema: dict): + await llm_with_tools.generate("Hello", tools=[get_weather], tool_choice=get_weather) + assert llm_with_tools.tool_choice == get_weather_schema + + +async def test_generate_streaming_with_tool_choice_str(llm_with_tools: MockLLM): + stream = llm_with_tools.generate_streaming("Hello", tools=[get_weather], tool_choice="auto") + async for _ in stream: + pass + assert llm_with_tools.tool_choice == "auto" + + +async def test_generate_streaming_with_tool_choice_dict(llm_with_tools: MockLLM): + tool_choice = {"type": "function", "function": {"name": "get_weather"}} + stream = llm_with_tools.generate_streaming("Hello", tools=[get_weather], tool_choice=tool_choice) + async for _ in stream: + pass + assert llm_with_tools.tool_choice == tool_choice + + +async def test_generate_streaming_with_tool_choice_callable(llm_with_tools: MockLLM, get_weather_schema: dict): + stream = llm_with_tools.generate_streaming("Hello", tools=[get_weather], tool_choice=get_weather) + async for _ in stream: + pass + assert llm_with_tools.tool_choice == get_weather_schema + + def test_init_with_str(): prompt = SimplePrompt("Hello") assert prompt.chat == [{"role": "user", "content": "Hello"}] From c5b3f736b5784b2dcdf392dd99202c2d3a5ff301 Mon Sep 17 00:00:00 2001 From: akotyla <79326805+akotyla@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:44:04 +0200 Subject: [PATCH 15/25] feat: add PydanticAI agents support (#755) Co-authored-by: GlockPL --- packages/ragbits-agents/CHANGELOG.md | 2 + .../src/ragbits/agents/_main.py | 111 +++++++++++++++++- .../ragbits-agents/src/ragbits/agents/tool.py | 19 +++ 3 files changed, 131 insertions(+), 1 deletion(-) diff --git a/packages/ragbits-agents/CHANGELOG.md b/packages/ragbits-agents/CHANGELOG.md index 2f8b33161..e07c007f0 100644 --- a/packages/ragbits-agents/CHANGELOG.md +++ b/packages/ragbits-agents/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased - Add tool_choice parameter to agent interface (#738) +- Add PydanticAI agents support (#755) ## 1.2.2 (2025-08-08) @@ -22,6 +23,7 @@ - ragbits-core updated to version v1.2.0 - Add native openai tools support (#621) - add Context to Agents (#715) +- add PydanticAI agnts support (#755) ## 1.1.0 (2025-07-09) diff --git a/packages/ragbits-agents/src/ragbits/agents/_main.py b/packages/ragbits-agents/src/ragbits/agents/_main.py index 9efa2efd6..5f0c2390e 100644 --- a/packages/ragbits-agents/src/ragbits/agents/_main.py +++ b/packages/ragbits-agents/src/ragbits/agents/_main.py @@ -3,11 +3,13 @@ from contextlib import suppress from copy import deepcopy from dataclasses import dataclass +from datetime import timedelta from inspect import iscoroutinefunction from types import ModuleType, SimpleNamespace from typing import ClassVar, Generic, cast, overload from pydantic import BaseModel, Field +from typing_extensions import Self from ragbits import agents from ragbits.agents.exceptions import ( @@ -20,7 +22,7 @@ AgentToolNotAvailableError, AgentToolNotSupportedError, ) -from ragbits.agents.mcp.server import MCPServer +from ragbits.agents.mcp.server import MCPServer, MCPServerStdio, MCPServerStreamableHttp from ragbits.agents.mcp.utils import get_tools from ragbits.agents.tool import Tool, ToolCallResult, ToolChoice from ragbits.core.audit.traces import trace @@ -34,6 +36,10 @@ with suppress(ImportError): from a2a.types import AgentCapabilities, AgentCard, AgentSkill + from pydantic_ai import Agent as PydanticAIAgent + from pydantic_ai import mcp + + from ragbits.core.llms import LiteLLM @dataclass @@ -579,3 +585,106 @@ async def _extract_agent_skills(self) -> list["AgentSkill"]: ) for tool in all_tools.values() ] + + @requires_dependencies("pydantic_ai") + def to_pydantic_ai(self) -> "PydanticAIAgent": + """ + Convert ragbits agent instance into a `pydantic_ai.Agent` representation. + + Returns: + PydanticAIAgent: The equivalent Pydantic-based agent configuration. + + Raises: + ValueError: If the `prompt` is not a string or a `Prompt` instance. + """ + mcp_servers: list[mcp.MCPServerStdio | mcp.MCPServerHTTP] = [] + + if not self.prompt: + raise ValueError("Prompt is required but was None.") + + if isinstance(self.prompt, str): + system_prompt = self.prompt + else: + if not self.prompt.system_prompt: + raise ValueError("System prompt is required but was None.") + system_prompt = self.prompt.system_prompt + + for mcp_server in self.mcp_servers: + if isinstance(mcp_server, MCPServerStdio): + mcp_servers.append( + mcp.MCPServerStdio( + command=mcp_server.params.command, args=mcp_server.params.args, env=mcp_server.params.env + ) + ) + elif isinstance(mcp_server, MCPServerStreamableHttp): + timeout = mcp_server.params["timeout"] + sse_timeout = mcp_server.params["sse_read_timeout"] + + mcp_servers.append( + mcp.MCPServerHTTP( + url=mcp_server.params["url"], + headers=mcp_server.params["headers"], + timeout=timeout.total_seconds() if isinstance(timeout, timedelta) else timeout, + sse_read_timeout=sse_timeout.total_seconds() + if isinstance(sse_timeout, timedelta) + else sse_timeout, + ) + ) + return PydanticAIAgent( + model=self.llm.model_name, + system_prompt=system_prompt, + tools=[tool.to_pydantic_ai() for tool in self.tools], + mcp_servers=mcp_servers, + ) + + @classmethod + @requires_dependencies("pydantic_ai") + def from_pydantic_ai(cls, pydantic_ai_agent: "PydanticAIAgent") -> Self: + """ + Construct an agent instance from a `pydantic_ai.Agent` representation. + + Args: + pydantic_ai_agent: A Pydantic-based agent configuration. + + Returns: + An instance of the agent class initialized from the Pydantic representation. + """ + mcp_servers: list[MCPServerStdio | MCPServerStreamableHttp] = [] + for mcp_server in pydantic_ai_agent._mcp_servers: + if isinstance(mcp_server, mcp.MCPServerStdio): + mcp_servers.append( + MCPServerStdio( + params={ + "command": mcp_server.command, + "args": list(mcp_server.args), + "env": mcp_server.env or {}, + } + ) + ) + elif isinstance(mcp_server, mcp.MCPServerHTTP): + headers = mcp_server.headers or {} + + mcp_servers.append( + MCPServerStreamableHttp( + params={ + "url": mcp_server.url, + "headers": {str(k): str(v) for k, v in headers.items()}, + "sse_read_timeout": mcp_server.sse_read_timeout, + "timeout": mcp_server.timeout, + } + ) + ) + + if not pydantic_ai_agent.model: + raise ValueError("Missing LLM in `pydantic_ai.Agent` instance") + elif isinstance(pydantic_ai_agent.model, str): + model_name = pydantic_ai_agent.model + else: + model_name = pydantic_ai_agent.model.model_name + + return cls( + llm=LiteLLM(model_name=model_name), # type: ignore[arg-type] + prompt="\n".join(pydantic_ai_agent._system_prompts), + tools=[tool.function for _, tool in pydantic_ai_agent._function_tools.items()], + mcp_servers=cast(list[MCPServer], mcp_servers), + ) diff --git a/packages/ragbits-agents/src/ragbits/agents/tool.py b/packages/ragbits-agents/src/ragbits/agents/tool.py index 32fe5603d..eebdf5b21 100644 --- a/packages/ragbits-agents/src/ragbits/agents/tool.py +++ b/packages/ragbits-agents/src/ragbits/agents/tool.py @@ -1,11 +1,16 @@ from collections.abc import Callable +from contextlib import suppress from dataclasses import dataclass from typing import Any, Literal from typing_extensions import Self +from ragbits.core.utils.decorators import requires_dependencies from ragbits.core.utils.function_schema import convert_function_to_function_schema, get_context_variable_name +with suppress(ImportError): + from pydantic_ai import Tool as PydanticAITool + @dataclass class ToolCallResult: @@ -77,5 +82,19 @@ def to_function_schema(self) -> dict[str, Any]: }, } + @requires_dependencies("pydantic_ai") + def to_pydantic_ai(self) -> "PydanticAITool": + """ + Convert ragbits tool to a Pydantic AI Tool. + + Returns: + A `pydantic_ai.tools.Tool` object. + """ + return PydanticAITool( + function=self.on_tool_call, + name=self.name, + description=self.description, + ) + ToolChoice = Literal["auto", "none", "required"] | Callable From 4e60aebf7011a63debf1d4e1f145f2d9c91377f0 Mon Sep 17 00:00:00 2001 From: jakubduda-dsai <148433294+jakubduda-dsai@users.noreply.github.com> Date: Thu, 7 Aug 2025 10:31:43 +0200 Subject: [PATCH 16/25] feat: Autogenerate TS types (#727) --- package-lock.json | 6 +- packages/ragbits-chat/CHANGELOG.md | 5 +- packages/ragbits-chat/src/ragbits/chat/api.py | 77 ++--- .../src/ragbits/chat/interface/_interface.py | 7 +- .../src/ragbits/chat/interface/types.py | 70 +++- .../src/ragbits/chat/providers/__init__.py | 9 + .../ragbits/chat/providers/model_provider.py | 175 ++++++++++ ...ry-DwbDBvLx.js => ChatHistory-D-AE0LcG.js} | 2 +- ...tpz3wfl.js => ChatOptionsForm-D2-2zwqJ.js} | 2 +- .../ui-build/assets/FeedbackForm-DFwtFn3g.js | 1 + .../ui-build/assets/FeedbackForm-JUvhaJp1.js | 1 - ...on-BdWYUpIl.js => ShareButton-BdhRQHuN.js} | 2 +- ...BqeVrv-6.js => chunk-IGSAU2ZA-2GLb9zev.js} | 2 +- .../{index-CziAk_QW.js => index-CKLJLbbQ.js} | 72 ++-- .../{index-D3YcCtkW.js => index-DP-TCy6J.js} | 4 +- .../chat/ui-build/assets/index-MCoEOEoa.js | 1 + .../chat/ui-build/assets/index-r4BHDEze.js | 1 - .../src/ragbits/chat/ui-build/index.html | 2 +- .../generate_typescript_from_json_schema.py | 318 ++++++++++++++++++ .../__tests__/mocks/handlers.ts | 10 +- .../__tests__/useRagbitsCall.test.tsx | 10 +- .../__tests__/useRagbitsStream.test.tsx | 30 +- .../__tests__/RagbitsClient.test.ts | 30 +- .../api-client/__tests__/types.test.ts | 47 +-- .../@ragbits/api-client/src/autogen.types.ts | 310 +++++++++++++++++ typescript/@ragbits/api-client/src/index.ts | 1 + typescript/@ragbits/api-client/src/types.ts | 199 +---------- .../integration/intergation.test.tsx | 30 +- .../ui/__tests__/unit/ChatMessage.test.tsx | 34 +- .../ui/__tests__/unit/LiveUpdates.test.tsx | 2 +- .../ui/__tests__/unit/PromptInput.test.tsx | 8 +- .../components/ChatMessage/ChatMessage.tsx | 6 +- .../ChatMessage/MessageReferences.tsx | 2 +- .../inputs/PromptInput/PromptInput.tsx | 4 +- .../core/stores/HistoryStore/historyStore.ts | 42 +-- .../components/FeedbackForm.tsx | 12 +- 36 files changed, 1107 insertions(+), 427 deletions(-) create mode 100644 packages/ragbits-chat/src/ragbits/chat/providers/__init__.py create mode 100644 packages/ragbits-chat/src/ragbits/chat/providers/model_provider.py rename packages/ragbits-chat/src/ragbits/chat/ui-build/assets/{ChatHistory-DwbDBvLx.js => ChatHistory-D-AE0LcG.js} (97%) rename packages/ragbits-chat/src/ragbits/chat/ui-build/assets/{ChatOptionsForm-Qtpz3wfl.js => ChatOptionsForm-D2-2zwqJ.js} (88%) create mode 100644 packages/ragbits-chat/src/ragbits/chat/ui-build/assets/FeedbackForm-DFwtFn3g.js delete mode 100644 packages/ragbits-chat/src/ragbits/chat/ui-build/assets/FeedbackForm-JUvhaJp1.js rename packages/ragbits-chat/src/ragbits/chat/ui-build/assets/{ShareButton-BdWYUpIl.js => ShareButton-BdhRQHuN.js} (99%) rename packages/ragbits-chat/src/ragbits/chat/ui-build/assets/{chunk-IGSAU2ZA-BqeVrv-6.js => chunk-IGSAU2ZA-2GLb9zev.js} (84%) rename packages/ragbits-chat/src/ragbits/chat/ui-build/assets/{index-CziAk_QW.js => index-CKLJLbbQ.js} (68%) rename packages/ragbits-chat/src/ragbits/chat/ui-build/assets/{index-D3YcCtkW.js => index-DP-TCy6J.js} (99%) create mode 100644 packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-MCoEOEoa.js delete mode 100644 packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-r4BHDEze.js create mode 100644 scripts/generate_typescript_from_json_schema.py create mode 100644 typescript/@ragbits/api-client/src/autogen.types.ts diff --git a/package-lock.json b/package-lock.json index 3efea1aa3..e31129ab5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14982,7 +14982,7 @@ } }, "typescript/@ragbits/api-client": { - "version": "0.0.3", + "version": "1.2.1", "license": "MIT", "devDependencies": { "@eslint/js": "^9.17.0", @@ -15001,7 +15001,7 @@ } }, "typescript/@ragbits/api-client-react": { - "version": "0.0.3", + "version": "1.2.1", "license": "MIT", "dependencies": { "@ragbits/api-client": "*" @@ -15032,7 +15032,7 @@ } }, "typescript/ui": { - "version": "0.0.0", + "version": "1.2.1", "dependencies": { "@heroicons/react": "^2.2.0", "@heroui/react": "^2.8.1", diff --git a/packages/ragbits-chat/CHANGELOG.md b/packages/ragbits-chat/CHANGELOG.md index 1b53de233..9a9f967b6 100644 --- a/packages/ragbits-chat/CHANGELOG.md +++ b/packages/ragbits-chat/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- Autogenerate typescript types based on backend typing (#727) + ## 1.2.2 (2025-08-08) ### Changed @@ -13,14 +15,13 @@ ### Changed - ragbits-core updated to version v1.2.1 - - Fix routing error causing chat to not be displayed with disabled history (#764) ## 1.2.0 (2025-08-01) + ### Changed - ragbits-core updated to version v1.2.0 - - Update TailwindCSS, React, Vite, tailwind config (#742) - Add images support in chat message, images gallery (#731) - Add persistent user settings (#719) diff --git a/packages/ragbits-chat/src/ragbits/chat/api.py b/packages/ragbits-chat/src/ragbits/chat/api.py index c52f4b760..c00554634 100644 --- a/packages/ragbits-chat/src/ragbits/chat/api.py +++ b/packages/ragbits-chat/src/ragbits/chat/api.py @@ -5,7 +5,6 @@ from collections.abc import AsyncGenerator from contextlib import asynccontextmanager from pathlib import Path -from typing import Any, Literal import uvicorn from fastapi import FastAPI, HTTPException, Request, status @@ -13,10 +12,18 @@ from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import HTMLResponse, JSONResponse, StreamingResponse from fastapi.staticfiles import StaticFiles -from pydantic import BaseModel, Field from ragbits.chat.interface import ChatInterface -from ragbits.chat.interface.types import ChatContext, ChatResponse, ChatResponseType, Message +from ragbits.chat.interface.types import ( + ChatContext, + ChatMessageRequest, + ChatResponse, + ChatResponseType, + ConfigResponse, + FeedbackConfig, + FeedbackItem, + FeedbackRequest, +) from ragbits.core.audit.metrics import record_metric from ragbits.core.audit.metrics.base import MetricType from ragbits.core.audit.traces import trace @@ -26,26 +33,6 @@ logger = logging.getLogger(__name__) -class ChatMessageRequest(BaseModel): - """ - Request body for chat message - """ - - message: str = Field(..., description="The current user message") - history: list[Message] = Field(default_factory=list, description="Previous message history") - context: dict[str, Any] = Field(default_factory=dict, description="User context information") - - -class FeedbackRequest(BaseModel): - """ - Request body for feedback submission - """ - - message_id: str = Field(..., description="ID of the message receiving feedback") - feedback: Literal["like", "dislike"] = Field(..., description="Type of feedback (like or dislike)") - payload: dict = Field(default_factory=dict, description="Additional feedback details") - - class RagbitsAPI: """ RagbitsAPI class for running API with Demo UI for testing purposes @@ -126,30 +113,26 @@ async def feedback(request: FeedbackRequest) -> JSONResponse: @self.app.get("/api/config", response_class=JSONResponse) async def config() -> JSONResponse: - like_config = self.chat_interface.feedback_config.like_form - dislike_config = self.chat_interface.feedback_config.dislike_form - user_settings_config = self.chat_interface.user_settings.form - - config_dict = { - "feedback": { - "like": { - "enabled": self.chat_interface.feedback_config.like_enabled, - "form": like_config, - }, - "dislike": { - "enabled": self.chat_interface.feedback_config.dislike_enabled, - "form": dislike_config, - }, - }, - "customization": self.chat_interface.ui_customization.model_dump() - if self.chat_interface.ui_customization - else None, - "user_settings": {"form": user_settings_config}, - "debug_mode": self.debug_mode, - "conversation_history": self.chat_interface.conversation_history, - } - - return JSONResponse(content=config_dict) + feedback_config = self.chat_interface.feedback_config + + config_response = ConfigResponse( + feedback=FeedbackConfig( + like=FeedbackItem( + enabled=feedback_config.like_enabled, + form=feedback_config.like_form, + ), + dislike=FeedbackItem( + enabled=feedback_config.dislike_enabled, + form=feedback_config.dislike_form, + ), + ), + customization=self.chat_interface.ui_customization, + user_settings=self.chat_interface.user_settings, + debug_mode=self.debug_mode, + conversation_history=self.chat_interface.conversation_history, + ) + + return JSONResponse(content=config_response.model_dump()) @self.app.get("/{full_path:path}", response_class=HTMLResponse) async def root() -> HTMLResponse: diff --git a/packages/ragbits-chat/src/ragbits/chat/interface/_interface.py b/packages/ragbits-chat/src/ragbits/chat/interface/_interface.py index 74dd0e073..8cfc3b88d 100644 --- a/packages/ragbits-chat/src/ragbits/chat/interface/_interface.py +++ b/packages/ragbits-chat/src/ragbits/chat/interface/_interface.py @@ -7,7 +7,7 @@ import uuid from abc import ABC, abstractmethod from collections.abc import AsyncGenerator, Callable -from typing import Any, Literal +from typing import Any from ragbits.chat.interface.ui_customization import UICustomization from ragbits.core.audit.metrics import record_metric @@ -22,6 +22,7 @@ ChatContext, ChatResponse, ChatResponseType, + FeedbackType, Image, LiveUpdate, LiveUpdateContent, @@ -329,8 +330,8 @@ async def chat( async def save_feedback( self, message_id: str, - feedback: Literal["like", "dislike"], - payload: dict, + feedback: FeedbackType, + payload: dict[str, Any] | None = None, ) -> None: """ Save feedback about a chat message. diff --git a/packages/ragbits-chat/src/ragbits/chat/interface/types.py b/packages/ragbits-chat/src/ragbits/chat/interface/types.py index 3dfe1a67d..ae97f9202 100644 --- a/packages/ragbits-chat/src/ragbits/chat/interface/types.py +++ b/packages/ragbits-chat/src/ragbits/chat/interface/types.py @@ -3,6 +3,9 @@ from pydantic import BaseModel, ConfigDict, Field +from ragbits.chat.interface.forms import UserSettings +from ragbits.chat.interface.ui_customization import UICustomization + class MessageRole(str, Enum): """Defines the role of the message sender in a conversation.""" @@ -76,6 +79,15 @@ class ChatResponseType(str, Enum): IMAGE = "image" +class ChatContext(BaseModel): + """Represents the context of a chat conversation.""" + + conversation_id: str | None = None + message_id: str | None = None + state: dict[str, Any] = Field(default_factory=dict) + model_config = ConfigDict(extra="allow") + + class ChatResponse(BaseModel): """Container for different types of chat responses.""" @@ -145,10 +157,56 @@ def as_image(self) -> Image | None: return cast(Image, self.content) if self.type == ChatResponseType.IMAGE else None -class ChatContext(BaseModel): - """Represents the context of a chat conversation.""" +class ChatMessageRequest(BaseModel): + """Client-side chat request interface.""" - conversation_id: str | None = None - message_id: str | None = None - state: dict[str, Any] = Field(default_factory=dict) - model_config = ConfigDict(extra="allow") + message: str = Field(..., description="The current user message") + history: list["Message"] = Field(default_factory=list, description="Previous message history") + context: dict[str, Any] = Field(default_factory=dict, description="User context information") + + +class FeedbackType(str, Enum): + """Feedback types for user feedback.""" + + LIKE = "like" + DISLIKE = "dislike" + + +class FeedbackResponse(BaseModel): + """Response from feedback submission.""" + + status: str = Field(..., description="Status of the feedback submission") + + +class FeedbackRequest(BaseModel): + """ + Request body for feedback submission + """ + + message_id: str = Field(..., description="ID of the message receiving feedback") + feedback: FeedbackType = Field(..., description="Type of feedback (like or dislike)") + payload: dict[str, Any] = Field(default_factory=dict, description="Additional feedback details") + + +class FeedbackItem(BaseModel): + """Individual feedback configuration (like/dislike).""" + + enabled: bool = Field(..., description="Whether this feedback type is enabled") + form: dict[str, Any] | None = Field(..., description="Form schema for this feedback type") + + +class FeedbackConfig(BaseModel): + """Feedback configuration containing like and dislike settings.""" + + like: FeedbackItem = Field(..., description="Like feedback configuration") + dislike: FeedbackItem = Field(..., description="Dislike feedback configuration") + + +class ConfigResponse(BaseModel): + """Configuration response from the API.""" + + feedback: FeedbackConfig = Field(..., description="Feedback configuration") + customization: UICustomization | None = Field(default=None, description="UI customization") + user_settings: UserSettings = Field(default_factory=UserSettings, description="User settings") + debug_mode: bool = Field(default=False, description="Debug mode flag") + conversation_history: bool = Field(default=False, description="Debug mode flag") diff --git a/packages/ragbits-chat/src/ragbits/chat/providers/__init__.py b/packages/ragbits-chat/src/ragbits/chat/providers/__init__.py new file mode 100644 index 000000000..5f44451bd --- /dev/null +++ b/packages/ragbits-chat/src/ragbits/chat/providers/__init__.py @@ -0,0 +1,9 @@ +""" +Providers for ragbits-chat package. + +This module contains provider classes for various ragbits-chat functionality. +""" + +from .model_provider import RagbitsChatModelProvider + +__all__ = ["RagbitsChatModelProvider"] diff --git a/packages/ragbits-chat/src/ragbits/chat/providers/model_provider.py b/packages/ragbits-chat/src/ragbits/chat/providers/model_provider.py new file mode 100644 index 000000000..8f44ad837 --- /dev/null +++ b/packages/ragbits-chat/src/ragbits/chat/providers/model_provider.py @@ -0,0 +1,175 @@ +""" +Model provider for ragbits-chat Pydantic models. + +This module provides the RagbitsChatModelProvider class for importing and organizing +Pydantic models from the ragbits-chat package. +""" + +from enum import Enum +from typing import cast + +from pydantic import BaseModel + + +class RagbitsChatModelProvider: + """ + Provider for importing and organizing ragbits-chat Pydantic models. + + This provider handles the import of all Pydantic models from ragbits-chat package, + provides caching for performance, and organizes models into logical categories. + """ + + def __init__(self) -> None: + self._models_cache: dict[str, type[BaseModel | Enum]] | None = None + self._categories_cache: dict[str, list[str]] | None = None + + def get_models(self) -> dict[str, type[BaseModel | Enum]]: + """ + Import and return all ragbits-chat models. + + Returns: + Dictionary mapping model names to their classes + + Raises: + RuntimeError: If models cannot be imported + """ + if self._models_cache is not None: + return self._models_cache + + try: + from ragbits.chat.interface.forms import UserSettings + from ragbits.chat.interface.types import ( + ChatContext, + ChatMessageRequest, + ChatResponseType, + ConfigResponse, + FeedbackConfig, + FeedbackItem, + FeedbackRequest, + FeedbackResponse, + FeedbackType, + Image, + LiveUpdate, + LiveUpdateContent, + LiveUpdateType, + Message, + MessageRole, + Reference, + StateUpdate, + ) + from ragbits.chat.interface.ui_customization import HeaderCustomization, UICustomization + + self._models_cache = { + # Enums + "ChatResponseType": ChatResponseType, + "FeedbackType": FeedbackType, + "LiveUpdateType": LiveUpdateType, + "MessageRole": MessageRole, + # Core data models + "ChatContext": ChatContext, + "LiveUpdate": LiveUpdate, + "LiveUpdateContent": LiveUpdateContent, + "Message": Message, + "Reference": Reference, + "ServerState": StateUpdate, + "FeedbackItem": FeedbackItem, + "Image": Image, + # Configuration models + "HeaderCustomization": HeaderCustomization, + "UICustomization": UICustomization, + "UserSettings": UserSettings, + "FeedbackConfig": FeedbackConfig, # Current from types.py (not deprecated forms.py) + # API response models + "ConfigResponse": ConfigResponse, + "FeedbackResponse": FeedbackResponse, + # API request models + "ChatRequest": ChatMessageRequest, + "FeedbackRequest": FeedbackRequest, + } + + return self._models_cache + + except ImportError as e: + raise RuntimeError( + f"Error importing ragbits-chat models: {e}. " + "Make sure the ragbits-chat package is properly installed." + ) from e + + def get_categories(self) -> dict[str, list[str]]: + """ + Get models organized by category. + + Returns: + Dictionary mapping category names to lists of model names + """ + if self._categories_cache is not None: + return self._categories_cache + + self._categories_cache = { + "enums": ["ChatResponseType", "FeedbackType", "LiveUpdateType", "MessageRole"], + "core_data": [ + "ChatContext", + "LiveUpdate", + "LiveUpdateContent", + "Message", + "Reference", + "ServerState", + "FeedbackItem", + "Image", + ], + "configuration": ["HeaderCustomization", "UICustomization", "UserSettings", "FeedbackConfig"], + "responses": ["FeedbackResponse", "ConfigResponse"], + "requests": ["ChatRequest", "FeedbackRequest"], + } + + return self._categories_cache + + def get_models_by_category(self, category: str) -> dict[str, type[BaseModel | Enum]]: + """ + Get models filtered by category. + + Args: + category: Category name (enums, core_data, api, configuration) + + Returns: + Dictionary of models in the specified category + + Raises: + ValueError: If category is not recognized + """ + all_models = self.get_models() + categories = self.get_categories() + + if category not in categories: + raise ValueError(f"Unknown category: {category}. Available: {list(categories.keys())}") + + return {name: all_models[name] for name in categories[category] if name in all_models} + + def get_enum_models(self) -> dict[str, type[Enum]]: + """ + Get only enum models. + + Returns: + Dictionary of enum models + """ + return cast(dict[str, type[Enum]], self.get_models_by_category("enums")) + + def get_pydantic_models(self) -> dict[str, type[BaseModel | Enum]]: + """ + Get only Pydantic models (excluding enums). + + Returns: + Dictionary of Pydantic models + """ + all_models = self.get_models() + enum_names = set(self.get_categories()["enums"]) + return {name: model for name, model in all_models.items() if name not in enum_names} + + def clear_cache(self) -> None: + """ + Clear the internal cache, forcing re-import on next access. + + This can be useful during development or testing. + """ + self._models_cache = None + self._categories_cache = None diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatHistory-DwbDBvLx.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatHistory-D-AE0LcG.js similarity index 97% rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatHistory-DwbDBvLx.js rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatHistory-D-AE0LcG.js index ddee59d0d..196806456 100644 --- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatHistory-DwbDBvLx.js +++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatHistory-D-AE0LcG.js @@ -1 +1 @@ -import{a as C,aU as N,h,r as y,j as t,aV as n,aM as I,D as o,d as s,I as i,aW as O,aX as m}from"./index-CziAk_QW.js";function D(){const{selectConversation:u,deleteConversation:x,newConversation:v}=C(),r=N(),p=h(e=>e.conversations),f=h(e=>e.currentConversation),[a,b]=y.useState(!1),l=a?"Open sidebar":"Close sidebar",g=t.jsx(i,{icon:"heroicons:pencil-square"}),j=()=>{const e=v();r(m(e))},w=e=>{u(e),r(m(e))};return t.jsx(n.div,{initial:!1,animate:{maxWidth:a?"4.5rem":"16rem"},className:"rounded-l-medium border-small border-divider ml-4 flex h-full w-full min-w-[4.5rem] flex-grow flex-col space-y-2 overflow-hidden border-r-0 p-4 py-3",children:t.jsxs(I,{children:[t.jsx(o,{content:l,placement:"bottom",children:t.jsx(s,{isIconOnly:!0,"aria-label":l,variant:"ghost",onPress:()=>b(e=>!e),"data-testid":"chat-history-collapse-button",className:"ml-auto",children:t.jsx(i,{icon:a?"heroicons:chevron-double-right":"heroicons:chevron-double-left"})})},"collapse-button"),!a&&t.jsx(n.p,{initial:!1,animate:{opacity:1,width:"100%",height:"auto"},exit:{opacity:0,width:0,height:0,marginBottom:0},className:"text-small text-foreground truncate leading-5 font-semibold",children:"Conversations"},"conversations"),t.jsx(o,{content:"New conversation",placement:"right",children:t.jsx(s,{"aria-label":"New conversation",variant:"ghost",onPress:j,"data-testid":"chat-history-clear-chat-button",startContent:g,isIconOnly:a,children:!a&&"New conversation"})},"new-conversation-button"),!a&&t.jsx(n.div,{className:"mt-2 flex flex-1 flex-col gap-2 overflow-auto overflow-x-hidden",initial:!1,animate:{opacity:1,width:"100%"},exit:{opacity:0,width:0},children:Object.entries(p).reverse().map(([e,c])=>{if(O(c))return null;const d=e===f;return t.jsxs("div",{className:"flex gap-2",children:[t.jsx(s,{variant:d?"solid":"light","aria-label":`Select conversation ${e}`,"data-active":d,onPress:()=>w(e),title:e,"data-testid":`select-conversation-${e}`,children:t.jsx("div",{className:"text-small truncate",children:c.conversationId})}),t.jsx(o,{content:"Delete conversation",placement:"right",children:t.jsx(s,{isIconOnly:!0,"aria-label":`Delete conversation ${e}`,onPress:()=>x(e),variant:"ghost","data-testid":`delete-conversation-${e}`,children:t.jsx(i,{icon:"heroicons:trash"})})})]},e)})},"conversation-list")]})})}export{D as default}; +import{a as C,aU as N,h,r as y,j as t,aV as n,aM as I,D as o,d as s,I as i,aW as O,aX as m}from"./index-CKLJLbbQ.js";function D(){const{selectConversation:u,deleteConversation:x,newConversation:v}=C(),r=N(),p=h(e=>e.conversations),f=h(e=>e.currentConversation),[a,b]=y.useState(!1),l=a?"Open sidebar":"Close sidebar",g=t.jsx(i,{icon:"heroicons:pencil-square"}),j=()=>{const e=v();r(m(e))},w=e=>{u(e),r(m(e))};return t.jsx(n.div,{initial:!1,animate:{maxWidth:a?"4.5rem":"16rem"},className:"rounded-l-medium border-small border-divider ml-4 flex h-full w-full min-w-[4.5rem] flex-grow flex-col space-y-2 overflow-hidden border-r-0 p-4 py-3",children:t.jsxs(I,{children:[t.jsx(o,{content:l,placement:"bottom",children:t.jsx(s,{isIconOnly:!0,"aria-label":l,variant:"ghost",onPress:()=>b(e=>!e),"data-testid":"chat-history-collapse-button",className:"ml-auto",children:t.jsx(i,{icon:a?"heroicons:chevron-double-right":"heroicons:chevron-double-left"})})},"collapse-button"),!a&&t.jsx(n.p,{initial:!1,animate:{opacity:1,width:"100%",height:"auto"},exit:{opacity:0,width:0,height:0,marginBottom:0},className:"text-small text-foreground truncate leading-5 font-semibold",children:"Conversations"},"conversations"),t.jsx(o,{content:"New conversation",placement:"right",children:t.jsx(s,{"aria-label":"New conversation",variant:"ghost",onPress:j,"data-testid":"chat-history-clear-chat-button",startContent:g,isIconOnly:a,children:!a&&"New conversation"})},"new-conversation-button"),!a&&t.jsx(n.div,{className:"mt-2 flex flex-1 flex-col gap-2 overflow-auto overflow-x-hidden",initial:!1,animate:{opacity:1,width:"100%"},exit:{opacity:0,width:0},children:Object.entries(p).reverse().map(([e,c])=>{if(O(c))return null;const d=e===f;return t.jsxs("div",{className:"flex gap-2",children:[t.jsx(s,{variant:d?"solid":"light","aria-label":`Select conversation ${e}`,"data-active":d,onPress:()=>w(e),title:e,"data-testid":`select-conversation-${e}`,children:t.jsx("div",{className:"text-small truncate",children:c.conversationId})}),t.jsx(o,{content:"Delete conversation",placement:"right",children:t.jsx(s,{isIconOnly:!0,"aria-label":`Delete conversation ${e}`,onPress:()=>x(e),variant:"ghost","data-testid":`delete-conversation-${e}`,children:t.jsx(i,{icon:"heroicons:trash"})})})]},e)})},"conversation-list")]})})}export{D as default}; diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatOptionsForm-Qtpz3wfl.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatOptionsForm-D2-2zwqJ.js similarity index 88% rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatOptionsForm-Qtpz3wfl.js rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatOptionsForm-D2-2zwqJ.js index 2bb6c81de..fa8a3844f 100644 --- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatOptionsForm-Qtpz3wfl.js +++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ChatOptionsForm-D2-2zwqJ.js @@ -1 +1 @@ -import{u as j,g as C,a as v,h as O,b,r as y,j as t,D as S,d as a,I as _,m as D,e as F,f as E}from"./index-CziAk_QW.js";import{u as N,g as l,v as n,F as P}from"./index-D3YcCtkW.js";import{m as R}from"./chunk-IGSAU2ZA-BqeVrv-6.js";function z(){const{isOpen:c,onOpen:d,onClose:o}=j(),u=C(e=>e.chatOptions),{setChatOptions:r,initializeChatOptions:i}=v(),m=O(e=>e.currentConversation),{config:{user_settings:h}}=b(),s=h?.form,f=()=>{o()},p=e=>{r(e.formData),o()},x=()=>{if(!s)return;const e=l(n,s);r(e),o()},g=N();return y.useEffect(()=>{if(!s)return;const e=l(n,s);i(e)},[i,s,m]),s?t.jsxs(t.Fragment,{children:[t.jsx(S,{content:"Chat Options",placement:"bottom",children:t.jsx(a,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Open chat options",onPress:d,"data-testid":"open-chat-options",children:t.jsx(_,{icon:"heroicons:cog-6-tooth"})})}),t.jsx(D,{isOpen:c,onOpenChange:f,children:t.jsx(F,{children:e=>t.jsxs(t.Fragment,{children:[t.jsx(R,{className:"text-default-900 flex flex-col gap-1",children:s.title||"Chat Options"}),t.jsx(E,{children:t.jsx("div",{className:"flex flex-col gap-4",children:t.jsx(P,{schema:s,validator:n,formData:u,onSubmit:p,transformErrors:g,liveValidate:!0,children:t.jsxs("div",{className:"flex justify-end gap-4 py-4",children:[t.jsx(a,{className:"mr-auto",color:"primary",variant:"light",onPress:x,"aria-label":"Restore default user settings",children:"Restore defaults"}),t.jsx(a,{color:"danger",variant:"light",onPress:e,"aria-label":"Close chat options form",children:"Cancel"}),t.jsx(a,{color:"primary",type:"submit","aria-label":"Save chat options","data-testid":"chat-options-submit",children:"Save"})]})})})})]})})})]}):null}export{z as default}; +import{u as j,g as C,a as v,h as O,b,r as y,j as t,D as S,d as a,I as _,m as D,e as F,f as E}from"./index-CKLJLbbQ.js";import{u as N,g as l,v as n,F as P}from"./index-DP-TCy6J.js";import{m as R}from"./chunk-IGSAU2ZA-2GLb9zev.js";function z(){const{isOpen:c,onOpen:d,onClose:o}=j(),u=C(e=>e.chatOptions),{setChatOptions:r,initializeChatOptions:i}=v(),m=O(e=>e.currentConversation),{config:{user_settings:h}}=b(),s=h?.form,f=()=>{o()},p=e=>{r(e.formData),o()},x=()=>{if(!s)return;const e=l(n,s);r(e),o()},g=N();return y.useEffect(()=>{if(!s)return;const e=l(n,s);i(e)},[i,s,m]),s?t.jsxs(t.Fragment,{children:[t.jsx(S,{content:"Chat Options",placement:"bottom",children:t.jsx(a,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Open chat options",onPress:d,"data-testid":"open-chat-options",children:t.jsx(_,{icon:"heroicons:cog-6-tooth"})})}),t.jsx(D,{isOpen:c,onOpenChange:f,children:t.jsx(F,{children:e=>t.jsxs(t.Fragment,{children:[t.jsx(R,{className:"text-default-900 flex flex-col gap-1",children:s.title||"Chat Options"}),t.jsx(E,{children:t.jsx("div",{className:"flex flex-col gap-4",children:t.jsx(P,{schema:s,validator:n,formData:u,onSubmit:p,transformErrors:g,liveValidate:!0,children:t.jsxs("div",{className:"flex justify-end gap-4 py-4",children:[t.jsx(a,{className:"mr-auto",color:"primary",variant:"light",onPress:x,"aria-label":"Restore default user settings",children:"Restore defaults"}),t.jsx(a,{color:"danger",variant:"light",onPress:e,"aria-label":"Close chat options form",children:"Cancel"}),t.jsx(a,{color:"primary",type:"submit","aria-label":"Save chat options","data-testid":"chat-options-submit",children:"Save"})]})})})})]})})})]}):null}export{z as default}; diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/FeedbackForm-DFwtFn3g.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/FeedbackForm-DFwtFn3g.js new file mode 100644 index 000000000..1f99708d4 --- /dev/null +++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/FeedbackForm-DFwtFn3g.js @@ -0,0 +1 @@ +import{u as v,a as C,b as T,r as _,F as s,c as w,j as e,D as u,d as n,I as b,m as D,e as I,f as O}from"./index-CKLJLbbQ.js";import{u as S,F as E,v as N}from"./index-DP-TCy6J.js";import{m as L}from"./chunk-IGSAU2ZA-2GLb9zev.js";function H({message:t}){const{isOpen:f,onOpen:h,onClose:i}=v(),{mergeExtensions:p}=C(),{config:{feedback:o}}=T(),[l,x]=_.useState(s.Like),k=w("/api/feedback",{headers:{"Content-Type":"application/json"},method:"POST"}),r=o[l].form,j=()=>{i()},c=async a=>{if(!t.serverId)throw new Error('Feedback is only available for messages with "serverId" set');try{await k.call({body:{message_id:t.serverId,feedback:l,payload:a??{}}})}catch(g){console.error(g)}},y=a=>{p(t.id,{feedbackType:l}),c(a.formData),i()},d=async a=>{if(x(a),o[a].form===null){await c(null);return}h()},F=S();if(!r)return null;const m=t.extensions?.feedbackType;return e.jsxs(e.Fragment,{children:[o.like.enabled&&e.jsx(u,{content:"Like",placement:"bottom",children:e.jsx(n,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Rate message as helpful",onPress:()=>d(s.Like),"data-testid":"feedback-like",children:e.jsx(b,{icon:m===s.Like?"heroicons:hand-thumb-up-solid":"heroicons:hand-thumb-up"})})}),o.dislike.enabled&&e.jsx(u,{content:"Dislike",placement:"bottom",children:e.jsx(n,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Rate message as unhelpful",onPress:()=>d(s.Dislike),"data-testid":"feedback-dislike",children:e.jsx(b,{icon:m===s.Dislike?"heroicons:hand-thumb-down-solid":"heroicons:hand-thumb-down"})})}),e.jsx(D,{isOpen:f,onOpenChange:j,children:e.jsx(I,{children:a=>e.jsxs(e.Fragment,{children:[e.jsx(L,{className:"text-default-900 flex flex-col gap-1",children:r.title}),e.jsx(O,{children:e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(E,{schema:r,validator:N,onSubmit:y,transformErrors:F,liveValidate:!0,children:e.jsxs("div",{className:"flex justify-end gap-4 py-4",children:[e.jsx(n,{color:"danger",variant:"light",onPress:a,"aria-label":"Close feedback form",children:"Cancel"}),e.jsx(n,{color:"primary",type:"submit","aria-label":"Submit feedback","data-testid":"feedback-submit",children:"Submit"})]})})})})]})})})]})}export{H as default}; diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/FeedbackForm-JUvhaJp1.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/FeedbackForm-JUvhaJp1.js deleted file mode 100644 index 6abf7856f..000000000 --- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/FeedbackForm-JUvhaJp1.js +++ /dev/null @@ -1 +0,0 @@ -import{u as I,a as v,b as E,r as C,F as s,c as S,j as e,D as u,d as n,I as b,m as T,e as _,f as w}from"./index-CziAk_QW.js";import{u as D,F as O,v as L}from"./index-D3YcCtkW.js";import{m as K}from"./chunk-IGSAU2ZA-BqeVrv-6.js";function A({message:t}){const{isOpen:f,onOpen:h,onClose:i}=I(),{mergeExtensions:p}=v(),{config:{feedback:o}}=E(),[r,x]=C.useState(s.LIKE),k=S("/api/feedback",{headers:{"Content-Type":"application/json"},method:"POST"}),l=o[r].form,j=()=>{i()},c=async a=>{if(!t.serverId)throw new Error('Feedback is only available for messages with "serverId" set');try{await k.call({body:{message_id:t.serverId,feedback:r,payload:a}})}catch(g){console.error(g)}},y=a=>{p(t.id,{feedbackType:r}),c(a.formData),i()},d=async a=>{if(x(a),o[a].form===null){await c(null);return}h()},F=D();if(!l)return null;const m=t.extensions?.feedbackType;return e.jsxs(e.Fragment,{children:[o.like.enabled&&e.jsx(u,{content:"Like",placement:"bottom",children:e.jsx(n,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Rate message as helpful",onPress:()=>d(s.LIKE),"data-testid":"feedback-like",children:e.jsx(b,{icon:m===s.LIKE?"heroicons:hand-thumb-up-solid":"heroicons:hand-thumb-up"})})}),o.dislike.enabled&&e.jsx(u,{content:"Dislike",placement:"bottom",children:e.jsx(n,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Rate message as unhelpful",onPress:()=>d(s.DISLIKE),"data-testid":"feedback-dislike",children:e.jsx(b,{icon:m===s.DISLIKE?"heroicons:hand-thumb-down-solid":"heroicons:hand-thumb-down"})})}),e.jsx(T,{isOpen:f,onOpenChange:j,children:e.jsx(_,{children:a=>e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"text-default-900 flex flex-col gap-1",children:l.title}),e.jsx(w,{children:e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(O,{schema:l,validator:L,onSubmit:y,transformErrors:F,liveValidate:!0,children:e.jsxs("div",{className:"flex justify-end gap-4 py-4",children:[e.jsx(n,{color:"danger",variant:"light",onPress:a,"aria-label":"Close feedback form",children:"Cancel"}),e.jsx(n,{color:"primary",type:"submit","aria-label":"Submit feedback","data-testid":"feedback-submit",children:"Submit"})]})})})})]})})})]})}export{A as default}; diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ShareButton-BdWYUpIl.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ShareButton-BdhRQHuN.js similarity index 99% rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ShareButton-BdWYUpIl.js rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ShareButton-BdhRQHuN.js index 479a83a89..b11668768 100644 --- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ShareButton-BdWYUpIl.js +++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/ShareButton-BdhRQHuN.js @@ -1 +1 @@ -import{aR as Gr,u as Jr,r as hr,h as Wr,j as I,D as qr,d as gr,I as Yr,m as Kr,e as Lr,f as Qr,aS as Vr}from"./index-CziAk_QW.js";import{m as Xr}from"./chunk-IGSAU2ZA-BqeVrv-6.js";var T=Uint8Array,$=Uint16Array,jr=Int32Array,lr=new T([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),sr=new T([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pr=new T([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_r=function(r,e){for(var a=new $(31),n=0;n<31;++n)a[n]=e+=1<>1|(y&21845)<<1;Q=(Q&52428)>>2|(Q&13107)<<2,Q=(Q&61680)>>4|(Q&3855)<<4,Cr[y]=((Q&65280)>>8|(Q&255)<<8)>>1}var q=function(r,e,a){for(var n=r.length,t=0,o=new $(e);t>h]=c}else for(l=new $(n),t=0;t>15-r[t]);return l},V=new T(288);for(var y=0;y<144;++y)V[y]=8;for(var y=144;y<256;++y)V[y]=9;for(var y=256;y<280;++y)V[y]=7;for(var y=280;y<288;++y)V[y]=8;var fr=new T(32);for(var y=0;y<32;++y)fr[y]=5;var re=q(V,9,0),ee=q(V,9,1),ae=q(fr,5,0),ne=q(fr,5,1),wr=function(r){for(var e=r[0],a=1;ae&&(e=r[a]);return e},J=function(r,e,a){var n=e/8|0;return(r[n]|r[n+1]<<8)>>(e&7)&a},xr=function(r,e){var a=e/8|0;return(r[a]|r[a+1]<<8|r[a+2]<<16)>>(e&7)},Ar=function(r){return(r+7)/8|0},cr=function(r,e,a){return(e==null||e<0)&&(e=0),(a==null||a>r.length)&&(a=r.length),new T(r.subarray(e,a))},te=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],G=function(r,e,a){var n=new Error(e||te[r]);if(n.code=r,Error.captureStackTrace&&Error.captureStackTrace(n,G),!a)throw n;return n},oe=function(r,e,a,n){var t=r.length,o=0;if(!t||e.f&&!e.l)return a||new T(0);var v=!a,l=v||e.i!=2,h=e.i;v&&(a=new T(t*3));var c=function(ar){var nr=a.length;if(ar>nr){var rr=new T(Math.max(nr*2,ar));rr.set(a),a=rr}},f=e.f||0,i=e.p||0,u=e.b||0,x=e.l,S=e.d,w=e.m,d=e.n,m=t*8;do{if(!x){f=J(r,i,1);var z=J(r,i+1,3);if(i+=3,z)if(z==1)x=ee,S=ne,w=9,d=5;else if(z==2){var _=J(r,i,31)+257,A=J(r,i+10,15)+4,g=_+J(r,i+5,31)+1;i+=14;for(var s=new T(g),M=new T(19),C=0;C>4;if(j<16)s[C++]=j;else{var E=0,b=0;for(j==16?(b=3+J(r,i,3),i+=2,E=s[C-1]):j==17?(b=3+J(r,i,7),i+=3):j==18&&(b=11+J(r,i,127),i+=7);b--;)s[C++]=E}}var R=s.subarray(0,_),F=s.subarray(_);w=wr(R),d=wr(F),x=q(R,w,1),S=q(F,d,1)}else G(1);else{var j=Ar(i)+4,N=r[j-4]|r[j-3]<<8,O=j+N;if(O>t){h&&G(0);break}l&&c(u+N),a.set(r.subarray(j,O),u),e.b=u+=N,e.p=i=O*8,e.f=f;continue}if(i>m){h&&G(0);break}}l&&c(u+131072);for(var er=(1<>4;if(i+=E&15,i>m){h&&G(0);break}if(E||G(2),H<256)a[u++]=H;else if(H==256){Y=i,x=null;break}else{var P=H-254;if(H>264){var C=H-257,p=lr[C];P=J(r,i,(1<>4;W||G(3),i+=W&15;var F=Zr[X];if(X>3){var p=sr[X];F+=xr(r,i)&(1<m){h&&G(0);break}l&&c(u+131072);var Z=u+P;if(u>8},tr=function(r,e,a){a<<=e&7;var n=e/8|0;r[n]|=a,r[n+1]|=a>>8,r[n+2]|=a>>16},yr=function(r,e){for(var a=[],n=0;nu&&(u=o[n].s);var x=new $(u+1),S=Tr(a[f-1],x,0);if(S>e){var n=0,w=0,d=S-e,m=1<e)w+=m-(1<>=d;w>0;){var j=o[n].s;x[j]=0&&w;--n){var N=o[n].s;x[N]==e&&(--x[N],++w)}S=e}return{t:new T(x),l:S}},Tr=function(r,e,a){return r.s==-1?Math.max(Tr(r.l,e,a+1),Tr(r.r,e,a+1)):e[r.s]=a},Er=function(r){for(var e=r.length;e&&!r[--e];);for(var a=new $(++e),n=0,t=r[0],o=1,v=function(h){a[n++]=h},l=1;l<=e;++l)if(r[l]==t&&l!=e)++o;else{if(!t&&o>2){for(;o>138;o-=138)v(32754);o>2&&(v(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(v(t),--o;o>6;o-=6)v(8304);o>2&&(v(o-3<<5|8208),o=0)}for(;o--;)v(t);o=1,t=r[l]}return{c:a.subarray(0,n),n:e}},or=function(r,e){for(var a=0,n=0;n>8,r[t+2]=r[t]^255,r[t+3]=r[t+1]^255;for(var o=0;o4&&!M[pr[k-1]];--k);var L=c+5<<3,U=or(t,V)+or(o,fr)+v,D=or(t,u)+or(o,w)+v+14+3*k+or(A,M)+2*A[16]+3*A[17]+7*A[18];if(h>=0&&L<=U&&L<=D)return Ur(e,f,r.subarray(h,h+c));var E,b,R,F;if(K(e,f,1+(D15&&(K(e,f,H[g]>>5&127),f+=H[g]>>12)}}else E=re,b=V,R=ae,F=fr;for(var g=0;g255){var P=p>>18&31;tr(e,f,E[P+257]),f+=b[P+257],P>7&&(K(e,f,p>>23&31),f+=lr[P]);var W=p&31;tr(e,f,R[W]),f+=F[W],W>3&&(tr(e,f,p>>5&8191),f+=sr[W])}else tr(e,f,E[p]),f+=b[p]}return tr(e,f,E[256]),f+b[256]},fe=new jr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Hr=new T(0),ie=function(r,e,a,n,t,o){var v=o.z||r.length,l=new T(n+v+5*(1+Math.ceil(v/7e3))+t),h=l.subarray(n,l.length-t),c=o.l,f=(o.r||0)&7;if(e){f&&(h[0]=o.r>>3);for(var i=fe[e-1],u=i>>13,x=i&8191,S=(1<7e3||M>24576)&&(E>423||!c)){f=Fr(r,h,0,N,O,_,g,M,k,s-k,f),M=A=g=0,k=s;for(var b=0;b<286;++b)O[b]=0;for(var b=0;b<30;++b)_[b]=0}var R=2,F=0,er=x,B=U-D&32767;if(E>2&&L==j(s-B))for(var Y=Math.min(u,E)-1,H=Math.min(32767,s),P=Math.min(258,E);B<=H&&--er&&U!=D;){if(r[s+R]==r[s+R-B]){for(var p=0;pR){if(R=p,F=B,p>Y)break;for(var W=Math.min(B,p-2),X=0,b=0;bX&&(X=vr,D=Z)}}}U=D,D=w[U],B+=U-D&32767}if(F){N[M++]=268435456|mr[R]<<18|Mr[F];var ar=mr[R]&31,nr=Mr[F]&31;g+=lr[ar]+sr[nr],++O[257+ar],++_[nr],C=s+R,++A}else N[M++]=r[s],++O[r[s]]}}for(s=Math.max(s,C);s=v&&(h[f/8|0]=c,rr=v),f=Ur(h,f+1,r.subarray(s,rr))}o.i=v}return cr(l,0,n+Ar(f)+t)},Pr=function(){var r=1,e=0;return{p:function(a){for(var n=r,t=e,o=a.length|0,v=0;v!=o;){for(var l=Math.min(v+2655,o);v>16),t=(t&65535)+15*(t>>16)}r=n,e=t},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},ve=function(r,e,a,n,t){if(!t&&(t={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),v=new T(o.length+r.length);v.set(o),v.set(r,o.length),r=v,t.w=o.length}return ie(r,e.level==null?6:e.level,e.mem==null?t.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,a,n,t)},$r=function(r,e,a){for(;a;++e)r[e]=a,a>>>=8},le=function(r,e){var a=e.level,n=a==0?0:a<6?1:a==9?3:2;if(r[0]=120,r[1]=n<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var t=Pr();t.p(e.dictionary),$r(r,2,t.d())}},se=function(r,e){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&G(6,"invalid zlib data"),(r[1]>>5&1)==1&&G(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function ce(r,e){e||(e={});var a=Pr();a.p(r);var n=ve(r,e,e.dictionary?6:2,4);return le(n,e),$r(n,n.length-4,a.d()),n}function ue(r,e){return oe(r.subarray(se(r),-4),{i:2},e,e)}var Or=typeof TextEncoder<"u"&&new TextEncoder,dr=typeof TextDecoder<"u"&&new TextDecoder,he=0;try{dr.decode(Hr,{stream:!0}),he=1}catch{}var ge=function(r){for(var e="",a=0;;){var n=r[a++],t=(n>127)+(n>223)+(n>239);if(a+t>r.length)return{s:e,r:cr(r,a-1)};t?t==3?(n=((n&15)<<18|(r[a++]&63)<<12|(r[a++]&63)<<6|r[a++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):t&1?e+=String.fromCharCode((n&31)<<6|r[a++]&63):e+=String.fromCharCode((n&15)<<12|(r[a++]&63)<<6|r[a++]&63):e+=String.fromCharCode(n)}};function kr(r,e){if(e){for(var a=new T(r.length),n=0;n>1)),v=0,l=function(f){o[v++]=f},n=0;no.length){var h=new T(v+8+(t-n<<1));h.set(o),o=h}var c=r.charCodeAt(n);c<128||e?l(c):c<2048?(l(192|c>>6),l(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|r.charCodeAt(++n)&1023,l(240|c>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|c&63)):(l(224|c>>12),l(128|c>>6&63),l(128|c&63))}return cr(o,0,v)}function Ir(r,e){if(e){for(var a="",n=0;n`,br=``;function xe(r){if(typeof r!="object"||r===null)return!1;const e=r;return!(typeof e.history!="object"||"followupMessages"in e&&typeof e.followupMessages!="object"||"chatOptions"in e&&typeof e.chatOptions!="object"||"serverState"in e&&typeof e.serverState!="object"||"conversationId"in e&&typeof e.conversationId!="string"&&typeof e.conversationId!="object")}function be(){const{restore:r}=Gr(),{isOpen:e,onOpen:a,onClose:n}=Jr(),[t,o]=hr.useState(Nr),v=hr.useRef(null),{getCurrentConversation:l}=Wr(f=>f.primitives),h=()=>{const{chatOptions:f,history:i,serverState:u,conversationId:x,followupMessages:S}=l(),w=Vr({chatOptions:f,history:i,serverState:u,conversationId:x,followupMessages:S}),d=kr(`${Sr}${JSON.stringify(w)}${br}`),m=btoa(Ir(ce(d,{level:9}),!0));navigator.clipboard.writeText(m),o(we),n(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{o(Nr)},2e3)},c=()=>{n()};return hr.useEffect(()=>{const f=i=>{if(!i.clipboardData||!i.clipboardData.types.includes("text/plain"))return;const x=i.clipboardData.getData("text/plain");try{const S=atob(x);if(!S.startsWith("xÚ"))return;const w=Ir(ue(kr(S,!0)));if(!w.startsWith(Sr)||!w.endsWith(br))return;i.preventDefault(),i.stopPropagation();const d=w.slice(Sr.length,-br.length),m=JSON.parse(d);if(!xe(m))return;r(m.history,m.followupMessages,m.chatOptions,m.serverState,m.conversationId)}catch(S){console.error("Couldn't parse pasted string as valid Ragbits state",S)}};return window.addEventListener("paste",f),()=>{window.removeEventListener("paste",f)}}),I.jsxs(I.Fragment,{children:[I.jsx(qr,{content:"Share conversation",placement:"bottom",children:I.jsx(gr,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Share conversation",onPress:a,children:I.jsx(Yr,{icon:t})})}),I.jsx(Kr,{isOpen:e,onOpenChange:c,children:I.jsx(Lr,{children:f=>I.jsxs(I.Fragment,{children:[I.jsx(Xr,{className:"text-default-900 flex flex-col gap-1",children:"Share conversation"}),I.jsx(Qr,{children:I.jsxs("div",{className:"flex flex-col gap-4",children:[I.jsx("p",{className:"text-medium text-default-500",children:"You are about to copy a code that allows sharing and storing your current app state. Once copied, you can paste this code anywhere on the site to instantly return to this exact setup. It’s a quick way to save your progress or share it with others."}),I.jsxs("div",{className:"flex justify-end gap-4 py-4",children:[I.jsx(gr,{color:"danger",variant:"light",onPress:f,"aria-label":"Close share modal",children:"Cancel"}),I.jsx(gr,{color:"primary",onPress:h,"aria-label":"Copy to clipboard to share the conversation",children:"Copy to clipboard"})]})]})})]})})})]})}export{be as default}; +import{aR as Gr,u as Jr,r as hr,h as Wr,j as I,D as qr,d as gr,I as Yr,m as Kr,e as Lr,f as Qr,aS as Vr}from"./index-CKLJLbbQ.js";import{m as Xr}from"./chunk-IGSAU2ZA-2GLb9zev.js";var T=Uint8Array,$=Uint16Array,jr=Int32Array,lr=new T([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),sr=new T([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),pr=new T([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_r=function(r,e){for(var a=new $(31),n=0;n<31;++n)a[n]=e+=1<>1|(y&21845)<<1;Q=(Q&52428)>>2|(Q&13107)<<2,Q=(Q&61680)>>4|(Q&3855)<<4,Cr[y]=((Q&65280)>>8|(Q&255)<<8)>>1}var q=function(r,e,a){for(var n=r.length,t=0,o=new $(e);t>h]=c}else for(l=new $(n),t=0;t>15-r[t]);return l},V=new T(288);for(var y=0;y<144;++y)V[y]=8;for(var y=144;y<256;++y)V[y]=9;for(var y=256;y<280;++y)V[y]=7;for(var y=280;y<288;++y)V[y]=8;var fr=new T(32);for(var y=0;y<32;++y)fr[y]=5;var re=q(V,9,0),ee=q(V,9,1),ae=q(fr,5,0),ne=q(fr,5,1),wr=function(r){for(var e=r[0],a=1;ae&&(e=r[a]);return e},J=function(r,e,a){var n=e/8|0;return(r[n]|r[n+1]<<8)>>(e&7)&a},xr=function(r,e){var a=e/8|0;return(r[a]|r[a+1]<<8|r[a+2]<<16)>>(e&7)},Ar=function(r){return(r+7)/8|0},cr=function(r,e,a){return(e==null||e<0)&&(e=0),(a==null||a>r.length)&&(a=r.length),new T(r.subarray(e,a))},te=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],G=function(r,e,a){var n=new Error(e||te[r]);if(n.code=r,Error.captureStackTrace&&Error.captureStackTrace(n,G),!a)throw n;return n},oe=function(r,e,a,n){var t=r.length,o=0;if(!t||e.f&&!e.l)return a||new T(0);var v=!a,l=v||e.i!=2,h=e.i;v&&(a=new T(t*3));var c=function(ar){var nr=a.length;if(ar>nr){var rr=new T(Math.max(nr*2,ar));rr.set(a),a=rr}},f=e.f||0,i=e.p||0,u=e.b||0,x=e.l,S=e.d,w=e.m,d=e.n,m=t*8;do{if(!x){f=J(r,i,1);var z=J(r,i+1,3);if(i+=3,z)if(z==1)x=ee,S=ne,w=9,d=5;else if(z==2){var _=J(r,i,31)+257,A=J(r,i+10,15)+4,g=_+J(r,i+5,31)+1;i+=14;for(var s=new T(g),M=new T(19),C=0;C>4;if(j<16)s[C++]=j;else{var E=0,b=0;for(j==16?(b=3+J(r,i,3),i+=2,E=s[C-1]):j==17?(b=3+J(r,i,7),i+=3):j==18&&(b=11+J(r,i,127),i+=7);b--;)s[C++]=E}}var R=s.subarray(0,_),F=s.subarray(_);w=wr(R),d=wr(F),x=q(R,w,1),S=q(F,d,1)}else G(1);else{var j=Ar(i)+4,N=r[j-4]|r[j-3]<<8,O=j+N;if(O>t){h&&G(0);break}l&&c(u+N),a.set(r.subarray(j,O),u),e.b=u+=N,e.p=i=O*8,e.f=f;continue}if(i>m){h&&G(0);break}}l&&c(u+131072);for(var er=(1<>4;if(i+=E&15,i>m){h&&G(0);break}if(E||G(2),H<256)a[u++]=H;else if(H==256){Y=i,x=null;break}else{var P=H-254;if(H>264){var C=H-257,p=lr[C];P=J(r,i,(1<>4;W||G(3),i+=W&15;var F=Zr[X];if(X>3){var p=sr[X];F+=xr(r,i)&(1<m){h&&G(0);break}l&&c(u+131072);var Z=u+P;if(u>8},tr=function(r,e,a){a<<=e&7;var n=e/8|0;r[n]|=a,r[n+1]|=a>>8,r[n+2]|=a>>16},yr=function(r,e){for(var a=[],n=0;nu&&(u=o[n].s);var x=new $(u+1),S=Tr(a[f-1],x,0);if(S>e){var n=0,w=0,d=S-e,m=1<e)w+=m-(1<>=d;w>0;){var j=o[n].s;x[j]=0&&w;--n){var N=o[n].s;x[N]==e&&(--x[N],++w)}S=e}return{t:new T(x),l:S}},Tr=function(r,e,a){return r.s==-1?Math.max(Tr(r.l,e,a+1),Tr(r.r,e,a+1)):e[r.s]=a},Er=function(r){for(var e=r.length;e&&!r[--e];);for(var a=new $(++e),n=0,t=r[0],o=1,v=function(h){a[n++]=h},l=1;l<=e;++l)if(r[l]==t&&l!=e)++o;else{if(!t&&o>2){for(;o>138;o-=138)v(32754);o>2&&(v(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(v(t),--o;o>6;o-=6)v(8304);o>2&&(v(o-3<<5|8208),o=0)}for(;o--;)v(t);o=1,t=r[l]}return{c:a.subarray(0,n),n:e}},or=function(r,e){for(var a=0,n=0;n>8,r[t+2]=r[t]^255,r[t+3]=r[t+1]^255;for(var o=0;o4&&!M[pr[k-1]];--k);var L=c+5<<3,U=or(t,V)+or(o,fr)+v,D=or(t,u)+or(o,w)+v+14+3*k+or(A,M)+2*A[16]+3*A[17]+7*A[18];if(h>=0&&L<=U&&L<=D)return Ur(e,f,r.subarray(h,h+c));var E,b,R,F;if(K(e,f,1+(D15&&(K(e,f,H[g]>>5&127),f+=H[g]>>12)}}else E=re,b=V,R=ae,F=fr;for(var g=0;g255){var P=p>>18&31;tr(e,f,E[P+257]),f+=b[P+257],P>7&&(K(e,f,p>>23&31),f+=lr[P]);var W=p&31;tr(e,f,R[W]),f+=F[W],W>3&&(tr(e,f,p>>5&8191),f+=sr[W])}else tr(e,f,E[p]),f+=b[p]}return tr(e,f,E[256]),f+b[256]},fe=new jr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Hr=new T(0),ie=function(r,e,a,n,t,o){var v=o.z||r.length,l=new T(n+v+5*(1+Math.ceil(v/7e3))+t),h=l.subarray(n,l.length-t),c=o.l,f=(o.r||0)&7;if(e){f&&(h[0]=o.r>>3);for(var i=fe[e-1],u=i>>13,x=i&8191,S=(1<7e3||M>24576)&&(E>423||!c)){f=Fr(r,h,0,N,O,_,g,M,k,s-k,f),M=A=g=0,k=s;for(var b=0;b<286;++b)O[b]=0;for(var b=0;b<30;++b)_[b]=0}var R=2,F=0,er=x,B=U-D&32767;if(E>2&&L==j(s-B))for(var Y=Math.min(u,E)-1,H=Math.min(32767,s),P=Math.min(258,E);B<=H&&--er&&U!=D;){if(r[s+R]==r[s+R-B]){for(var p=0;pR){if(R=p,F=B,p>Y)break;for(var W=Math.min(B,p-2),X=0,b=0;bX&&(X=vr,D=Z)}}}U=D,D=w[U],B+=U-D&32767}if(F){N[M++]=268435456|mr[R]<<18|Mr[F];var ar=mr[R]&31,nr=Mr[F]&31;g+=lr[ar]+sr[nr],++O[257+ar],++_[nr],C=s+R,++A}else N[M++]=r[s],++O[r[s]]}}for(s=Math.max(s,C);s=v&&(h[f/8|0]=c,rr=v),f=Ur(h,f+1,r.subarray(s,rr))}o.i=v}return cr(l,0,n+Ar(f)+t)},Pr=function(){var r=1,e=0;return{p:function(a){for(var n=r,t=e,o=a.length|0,v=0;v!=o;){for(var l=Math.min(v+2655,o);v>16),t=(t&65535)+15*(t>>16)}r=n,e=t},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},ve=function(r,e,a,n,t){if(!t&&(t={l:1},e.dictionary)){var o=e.dictionary.subarray(-32768),v=new T(o.length+r.length);v.set(o),v.set(r,o.length),r=v,t.w=o.length}return ie(r,e.level==null?6:e.level,e.mem==null?t.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,a,n,t)},$r=function(r,e,a){for(;a;++e)r[e]=a,a>>>=8},le=function(r,e){var a=e.level,n=a==0?0:a<6?1:a==9?3:2;if(r[0]=120,r[1]=n<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var t=Pr();t.p(e.dictionary),$r(r,2,t.d())}},se=function(r,e){return((r[0]&15)!=8||r[0]>>4>7||(r[0]<<8|r[1])%31)&&G(6,"invalid zlib data"),(r[1]>>5&1)==1&&G(6,"invalid zlib data: "+(r[1]&32?"need":"unexpected")+" dictionary"),(r[1]>>3&4)+2};function ce(r,e){e||(e={});var a=Pr();a.p(r);var n=ve(r,e,e.dictionary?6:2,4);return le(n,e),$r(n,n.length-4,a.d()),n}function ue(r,e){return oe(r.subarray(se(r),-4),{i:2},e,e)}var Or=typeof TextEncoder<"u"&&new TextEncoder,dr=typeof TextDecoder<"u"&&new TextDecoder,he=0;try{dr.decode(Hr,{stream:!0}),he=1}catch{}var ge=function(r){for(var e="",a=0;;){var n=r[a++],t=(n>127)+(n>223)+(n>239);if(a+t>r.length)return{s:e,r:cr(r,a-1)};t?t==3?(n=((n&15)<<18|(r[a++]&63)<<12|(r[a++]&63)<<6|r[a++]&63)-65536,e+=String.fromCharCode(55296|n>>10,56320|n&1023)):t&1?e+=String.fromCharCode((n&31)<<6|r[a++]&63):e+=String.fromCharCode((n&15)<<12|(r[a++]&63)<<6|r[a++]&63):e+=String.fromCharCode(n)}};function kr(r,e){if(e){for(var a=new T(r.length),n=0;n>1)),v=0,l=function(f){o[v++]=f},n=0;no.length){var h=new T(v+8+(t-n<<1));h.set(o),o=h}var c=r.charCodeAt(n);c<128||e?l(c):c<2048?(l(192|c>>6),l(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|r.charCodeAt(++n)&1023,l(240|c>>18),l(128|c>>12&63),l(128|c>>6&63),l(128|c&63)):(l(224|c>>12),l(128|c>>6&63),l(128|c&63))}return cr(o,0,v)}function Ir(r,e){if(e){for(var a="",n=0;n`,br=``;function xe(r){if(typeof r!="object"||r===null)return!1;const e=r;return!(typeof e.history!="object"||"followupMessages"in e&&typeof e.followupMessages!="object"||"chatOptions"in e&&typeof e.chatOptions!="object"||"serverState"in e&&typeof e.serverState!="object"||"conversationId"in e&&typeof e.conversationId!="string"&&typeof e.conversationId!="object")}function be(){const{restore:r}=Gr(),{isOpen:e,onOpen:a,onClose:n}=Jr(),[t,o]=hr.useState(Nr),v=hr.useRef(null),{getCurrentConversation:l}=Wr(f=>f.primitives),h=()=>{const{chatOptions:f,history:i,serverState:u,conversationId:x,followupMessages:S}=l(),w=Vr({chatOptions:f,history:i,serverState:u,conversationId:x,followupMessages:S}),d=kr(`${Sr}${JSON.stringify(w)}${br}`),m=btoa(Ir(ce(d,{level:9}),!0));navigator.clipboard.writeText(m),o(we),n(),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{o(Nr)},2e3)},c=()=>{n()};return hr.useEffect(()=>{const f=i=>{if(!i.clipboardData||!i.clipboardData.types.includes("text/plain"))return;const x=i.clipboardData.getData("text/plain");try{const S=atob(x);if(!S.startsWith("xÚ"))return;const w=Ir(ue(kr(S,!0)));if(!w.startsWith(Sr)||!w.endsWith(br))return;i.preventDefault(),i.stopPropagation();const d=w.slice(Sr.length,-br.length),m=JSON.parse(d);if(!xe(m))return;r(m.history,m.followupMessages,m.chatOptions,m.serverState,m.conversationId)}catch(S){console.error("Couldn't parse pasted string as valid Ragbits state",S)}};return window.addEventListener("paste",f),()=>{window.removeEventListener("paste",f)}}),I.jsxs(I.Fragment,{children:[I.jsx(qr,{content:"Share conversation",placement:"bottom",children:I.jsx(gr,{isIconOnly:!0,variant:"ghost",className:"p-0","aria-label":"Share conversation",onPress:a,children:I.jsx(Yr,{icon:t})})}),I.jsx(Kr,{isOpen:e,onOpenChange:c,children:I.jsx(Lr,{children:f=>I.jsxs(I.Fragment,{children:[I.jsx(Xr,{className:"text-default-900 flex flex-col gap-1",children:"Share conversation"}),I.jsx(Qr,{children:I.jsxs("div",{className:"flex flex-col gap-4",children:[I.jsx("p",{className:"text-medium text-default-500",children:"You are about to copy a code that allows sharing and storing your current app state. Once copied, you can paste this code anywhere on the site to instantly return to this exact setup. It’s a quick way to save your progress or share it with others."}),I.jsxs("div",{className:"flex justify-end gap-4 py-4",children:[I.jsx(gr,{color:"danger",variant:"light",onPress:f,"aria-label":"Close share modal",children:"Cancel"}),I.jsx(gr,{color:"primary",onPress:h,"aria-label":"Copy to clipboard to share the conversation",children:"Copy to clipboard"})]})]})})]})})})]})}export{be as default}; diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-BqeVrv-6.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-2GLb9zev.js similarity index 84% rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-BqeVrv-6.js rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-2GLb9zev.js index 6cc52ace3..18bcbd3df 100644 --- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-BqeVrv-6.js +++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/chunk-IGSAU2ZA-2GLb9zev.js @@ -1 +1 @@ -import{E as h,aT as p,R as x,r as i,j as M,W as R}from"./index-CziAk_QW.js";var s=h((r,o)=>{const{as:t,children:d,className:l,...n}=r,{slots:c,classNames:a,headerId:m,setHeaderMounted:e}=p(),f=x(o),u=t||"header";return i.useEffect(()=>(e(!0),()=>e(!1)),[e]),M.jsx(u,{ref:f,className:c.header({class:R(a?.header,l)}),id:m,...n,children:d})});s.displayName="HeroUI.ModalHeader";var H=s;export{H as m}; +import{E as h,aT as p,R as x,r as i,j as M,W as R}from"./index-CKLJLbbQ.js";var s=h((r,o)=>{const{as:t,children:d,className:l,...n}=r,{slots:c,classNames:a,headerId:m,setHeaderMounted:e}=p(),f=x(o),u=t||"header";return i.useEffect(()=>(e(!0),()=>e(!1)),[e]),M.jsx(u,{ref:f,className:c.header({class:R(a?.header,l)}),id:m,...n,children:d})});s.displayName="HeroUI.ModalHeader";var H=s;export{H as m}; diff --git a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CziAk_QW.js b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CKLJLbbQ.js similarity index 68% rename from packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CziAk_QW.js rename to packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CKLJLbbQ.js index d314fbe42..86e274ee1 100644 --- a/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CziAk_QW.js +++ b/packages/ragbits-chat/src/ragbits/chat/ui-build/assets/index-CKLJLbbQ.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-JUvhaJp1.js","assets/index-D3YcCtkW.js","assets/chunk-IGSAU2ZA-BqeVrv-6.js","assets/ChatOptionsForm-Qtpz3wfl.js","assets/ShareButton-BdWYUpIl.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-DFwtFn3g.js","assets/index-DP-TCy6J.js","assets/chunk-IGSAU2ZA-2GLb9zev.js","assets/ChatOptionsForm-D2-2zwqJ.js","assets/ShareButton-BdhRQHuN.js"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Xm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ry={exports:{}},ap={},Ly={exports:{}},dt={};/** * @license React * react.production.min.js @@ -7,7 +7,7 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-JU * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Yw;function RR(){if(Yw)return dt;Yw=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.iterator;function b(j){return j===null||typeof j!="object"?null:(j=g&&j[g]||j["@@iterator"],typeof j=="function"?j:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,P={};function _(j,oe,z){this.props=j,this.context=oe,this.refs=P,this.updater=z||x}_.prototype.isReactComponent={},_.prototype.setState=function(j,oe){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,oe,"setState")},_.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function T(){}T.prototype=_.prototype;function R(j,oe,z){this.props=j,this.context=oe,this.refs=P,this.updater=z||x}var L=R.prototype=new T;L.constructor=R,S(L,_.prototype),L.isPureReactComponent=!0;var B=Array.isArray,W=Object.prototype.hasOwnProperty,M={current:null},Z={key:!0,ref:!0,__self:!0,__source:!0};function re(j,oe,z){var me,Ee={},we=null,Be=null;if(oe!=null)for(me in oe.ref!==void 0&&(Be=oe.ref),oe.key!==void 0&&(we=""+oe.key),oe)W.call(oe,me)&&!Z.hasOwnProperty(me)&&(Ee[me]=oe[me]);var Oe=arguments.length-2;if(Oe===1)Ee.children=z;else if(1>>1,oe=K[j];if(0>>1;ji(Ee,A))wei(Be,Ee)?(K[j]=Be,K[we]=A,j=we):(K[j]=Ee,K[me]=A,j=me);else if(wei(Be,A))K[j]=Be,K[we]=A,j=we;else break e}}return se}function i(K,se){var A=K.sortIndex-se.sortIndex;return A!==0?A:K.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var d=[],h=[],m=1,g=null,b=3,x=!1,S=!1,P=!1,_=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(K){for(var se=n(h);se!==null;){if(se.callback===null)r(h);else if(se.startTime<=K)r(h),se.sortIndex=se.expirationTime,t(d,se);else break;se=n(h)}}function B(K){if(P=!1,L(K),!S)if(n(d)!==null)S=!0,J(W);else{var se=n(h);se!==null&&q(B,se.startTime-K)}}function W(K,se){S=!1,P&&(P=!1,T(re),re=-1),x=!0;var A=b;try{for(L(se),g=n(d);g!==null&&(!(g.expirationTime>se)||K&&!U());){var j=g.callback;if(typeof j=="function"){g.callback=null,b=g.priorityLevel;var oe=j(g.expirationTime<=se);se=e.unstable_now(),typeof oe=="function"?g.callback=oe:g===n(d)&&r(d),L(se)}else r(d);g=n(d)}if(g!==null)var z=!0;else{var me=n(h);me!==null&&q(B,me.startTime-se),z=!1}return z}finally{g=null,b=A,x=!1}}var M=!1,Z=null,re=-1,ae=5,O=-1;function U(){return!(e.unstable_now()-OK||125j?(K.sortIndex=A,t(h,K),n(d)===null&&K===n(h)&&(P?(T(re),re=-1):P=!0,q(B,A-j))):(K.sortIndex=oe,t(d,K),S||x||(S=!0,J(W))),K},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(K){var se=b;return function(){var A=b;b=se;try{return K.apply(this,arguments)}finally{b=A}}}}(Ny)),Ny}var e1;function NR(){return e1||(e1=1,Dy.exports=DR()),Dy.exports}/** + */var Jw;function LR(){return Jw||(Jw=1,function(e){function t(K,se){var A=K.length;K.push(se);e:for(;0>>1,oe=K[j];if(0>>1;ji(Ee,A))wei(Be,Ee)?(K[j]=Be,K[we]=A,j=we):(K[j]=Ee,K[me]=A,j=me);else if(wei(Be,A))K[j]=Be,K[we]=A,j=we;else break e}}return se}function i(K,se){var A=K.sortIndex-se.sortIndex;return A!==0?A:K.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var d=[],h=[],m=1,g=null,b=3,x=!1,S=!1,P=!1,_=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(K){for(var se=n(h);se!==null;){if(se.callback===null)r(h);else if(se.startTime<=K)r(h),se.sortIndex=se.expirationTime,t(d,se);else break;se=n(h)}}function B(K){if(P=!1,L(K),!S)if(n(d)!==null)S=!0,J(W);else{var se=n(h);se!==null&&q(B,se.startTime-K)}}function W(K,se){S=!1,P&&(P=!1,T(re),re=-1),x=!0;var A=b;try{for(L(se),g=n(d);g!==null&&(!(g.expirationTime>se)||K&&!U());){var j=g.callback;if(typeof j=="function"){g.callback=null,b=g.priorityLevel;var oe=j(g.expirationTime<=se);se=e.unstable_now(),typeof oe=="function"?g.callback=oe:g===n(d)&&r(d),L(se)}else r(d);g=n(d)}if(g!==null)var z=!0;else{var me=n(h);me!==null&&q(B,me.startTime-se),z=!1}return z}finally{g=null,b=A,x=!1}}var M=!1,Z=null,re=-1,ae=5,O=-1;function U(){return!(e.unstable_now()-OK||125j?(K.sortIndex=A,t(h,K),n(d)===null&&K===n(h)&&(P?(T(re),re=-1):P=!0,q(B,A-j))):(K.sortIndex=oe,t(d,K),S||x||(S=!0,J(W))),K},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(K){var se=b;return function(){var A=b;b=se;try{return K.apply(this,arguments)}finally{b=A}}}}(Ny)),Ny}var Zw;function MR(){return Zw||(Zw=1,Dy.exports=LR()),Dy.exports}/** * @license React * react-dom.production.min.js * @@ -31,14 +31,14 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FeedbackForm-JU * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var t1;function FR(){if(t1)return ei;t1=1;var e=tx(),t=NR();function n(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,p=1;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},g={};function b(o){return d.call(g,o)?!0:d.call(m,o)?!1:h.test(o)?g[o]=!0:(m[o]=!0,!1)}function x(o,l,p,v){if(p!==null&&p.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return v?!1:p!==null?!p.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function S(o,l,p,v){if(l===null||typeof l>"u"||x(o,l,p,v))return!0;if(v)return!1;if(p!==null)switch(p.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function P(o,l,p,v,w,C,$){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=v,this.attributeNamespace=w,this.mustUseProperty=p,this.propertyName=o,this.type=l,this.sanitizeURL=C,this.removeEmptyString=$}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){_[o]=new P(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];_[l]=new P(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){_[o]=new P(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){_[o]=new P(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){_[o]=new P(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){_[o]=new P(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){_[o]=new P(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){_[o]=new P(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){_[o]=new P(o,5,!1,o.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function R(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var l=o.replace(T,R);_[l]=new P(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(T,R);_[l]=new P(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(T,R);_[l]=new P(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){_[o]=new P(o,1,!1,o.toLowerCase(),null,!1,!1)}),_.xlinkHref=new P("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){_[o]=new P(o,1,!1,o.toLowerCase(),null,!0,!0)});function L(o,l,p,v){var w=_.hasOwnProperty(l)?_[l]:null;(w!==null?w.type!==0:v||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},g={};function b(o){return d.call(g,o)?!0:d.call(m,o)?!1:h.test(o)?g[o]=!0:(m[o]=!0,!1)}function x(o,l,p,v){if(p!==null&&p.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return v?!1:p!==null?!p.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function S(o,l,p,v){if(l===null||typeof l>"u"||x(o,l,p,v))return!0;if(v)return!1;if(p!==null)switch(p.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function P(o,l,p,v,w,C,$){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=v,this.attributeNamespace=w,this.mustUseProperty=p,this.propertyName=o,this.type=l,this.sanitizeURL=C,this.removeEmptyString=$}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){_[o]=new P(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];_[l]=new P(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){_[o]=new P(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){_[o]=new P(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){_[o]=new P(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){_[o]=new P(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){_[o]=new P(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){_[o]=new P(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){_[o]=new P(o,5,!1,o.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function R(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var l=o.replace(T,R);_[l]=new P(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(T,R);_[l]=new P(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(T,R);_[l]=new P(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){_[o]=new P(o,1,!1,o.toLowerCase(),null,!1,!1)}),_.xlinkHref=new P("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){_[o]=new P(o,1,!1,o.toLowerCase(),null,!0,!0)});function L(o,l,p,v){var w=_.hasOwnProperty(l)?_[l]:null;(w!==null?w.type!==0:v||!(2V||w[$]!==C[V]){var Y=` -`+w[$].replace(" at new "," at ");return o.displayName&&Y.includes("")&&(Y=Y.replace("",o.displayName)),Y}while(1<=$&&0<=V);break}}}finally{z=!1,Error.prepareStackTrace=p}return(o=o?o.displayName||o.name:"")?oe(o):""}function Ee(o){switch(o.tag){case 5:return oe(o.type);case 16:return oe("Lazy");case 13:return oe("Suspense");case 19:return oe("SuspenseList");case 0:case 2:case 15:return o=me(o.type,!1),o;case 11:return o=me(o.type.render,!1),o;case 1:return o=me(o.type,!0),o;default:return""}}function we(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case Z:return"Fragment";case M:return"Portal";case ae:return"Profiler";case re:return"StrictMode";case ne:return"Suspense";case G:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case U:return(o.displayName||"Context")+".Consumer";case O:return(o._context.displayName||"Context")+".Provider";case X:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case fe:return l=o.displayName||null,l!==null?l:we(o.type)||"Memo";case J:l=o._payload,o=o._init;try{return we(o(l))}catch{}}return null}function Be(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return we(l);case 8:return l===re?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function Oe(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Te(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function tt(o){var l=Te(o)?"checked":"value",p=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),v=""+o[l];if(!o.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var w=p.get,C=p.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return w.call(this)},set:function($){v=""+$,C.call(this,$)}}),Object.defineProperty(o,l,{enumerable:p.enumerable}),{getValue:function(){return v},setValue:function($){v=""+$},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function yt(o){o._valueTracker||(o._valueTracker=tt(o))}function Ie(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var p=l.getValue(),v="";return o&&(v=Te(o)?o.checked?"true":"false":o.value),o=v,o!==p?(l.setValue(o),!0):!1}function Rt(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function bt(o,l){var p=l.checked;return A({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??o._wrapperState.initialChecked})}function Xt(o,l){var p=l.defaultValue==null?"":l.defaultValue,v=l.checked!=null?l.checked:l.defaultChecked;p=Oe(l.value!=null?l.value:p),o._wrapperState={initialChecked:v,initialValue:p,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Ue(o,l){l=l.checked,l!=null&&L(o,"checked",l,!1)}function st(o,l){Ue(o,l);var p=Oe(l.value),v=l.type;if(p!=null)v==="number"?(p===0&&o.value===""||o.value!=p)&&(o.value=""+p):o.value!==""+p&&(o.value=""+p);else if(v==="submit"||v==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Fr(o,l.type,p):l.hasOwnProperty("defaultValue")&&Fr(o,l.type,Oe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function An(o,l,p){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var v=l.type;if(!(v!=="submit"&&v!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,p||l===o.value||(o.value=l),o.defaultValue=l}p=o.name,p!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,p!==""&&(o.name=p)}function Fr(o,l,p){(l!=="number"||Rt(o.ownerDocument)!==o)&&(p==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+p&&(o.defaultValue=""+p))}var Sn=Array.isArray;function Lt(o,l,p,v){if(o=o.options,l){l={};for(var w=0;w"+l.valueOf().toString()+"",l=je.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function ct(o,l){if(l){var p=o.firstChild;if(p&&p===o.lastChild&&p.nodeType===3){p.nodeValue=l;return}}o.textContent=l}var Qt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ur=["Webkit","ms","Moz","O"];Object.keys(Qt).forEach(function(o){ur.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Qt[l]=Qt[o]})});function en(o,l,p){return l==null||typeof l=="boolean"||l===""?"":p||typeof l!="number"||l===0||Qt.hasOwnProperty(o)&&Qt[o]?(""+l).trim():l+"px"}function ln(o,l){o=o.style;for(var p in l)if(l.hasOwnProperty(p)){var v=p.indexOf("--")===0,w=en(p,l[p],v);p==="float"&&(p="cssFloat"),v?o.setProperty(p,w):o[p]=w}}var wr=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mt(o,l){if(l){if(wr[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function Xn(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tn=null;function rl(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var ds=null,si=null,li=null;function oa(o){if(o=Bn(o)){if(typeof ds!="function")throw Error(n(280));var l=o.stateNode;l&&(l=nc(l),ds(o.stateNode,o.type,l))}}function Tu(o){si?li?li.push(o):li=[o]:si=o}function ps(){if(si){var o=si,l=li;if(li=si=null,oa(o),l)for(o=0;o>>=0,o===0?32:31-(Ih(o)/$h|0)|0}var sl=64,$u=4194304;function ll(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function vs(o,l){var p=o.pendingLanes;if(p===0)return 0;var v=0,w=o.suspendedLanes,C=o.pingedLanes,$=p&268435455;if($!==0){var V=$&~w;V!==0?v=ll(V):(C&=$,C!==0&&(v=ll(C)))}else $=p&~w,$!==0?v=ll($):C!==0&&(v=ll(C));if(v===0)return 0;if(l!==0&&l!==v&&(l&w)===0&&(w=v&-v,C=l&-l,w>=C||w===16&&(C&4194240)!==0))return l;if((v&4)!==0&&(v|=p&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=v;0p;p++)l.push(o);return l}function da(o,l,p){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-ai(l),o[l]=p}function Lh(o,l){var p=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var v=o.eventTimes;for(o=o.expirationTimes;0=io),Gh=" ",qh=!1;function Yh(o,l){switch(o){case"keyup":return Sr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xh(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var pl=!1;function hl(o,l){switch(o){case"compositionend":return Xh(l);case"keypress":return l.which!==32?null:(qh=!0,Gh);case"textInput":return o=l.data,o===Gh&&qh?null:o;default:return null}}function Hv(o,l){if(pl)return o==="compositionend"||!va&&Yh(o,l)?(o=Yf(),Ii=ga=jt=null,pl=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:p,offset:l-o};o=v}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=nt(p)}}function an(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?an(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function Tt(){for(var o=window,l=Rt();l instanceof o.HTMLIFrameElement;){try{var p=typeof l.contentWindow.location.href=="string"}catch{p=!1}if(p)o=l.contentWindow;else break;l=Rt(o.document)}return l}function ya(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function Jv(o){var l=Tt(),p=o.focusedElem,v=o.selectionRange;if(l!==p&&p&&p.ownerDocument&&an(p.ownerDocument.documentElement,p)){if(v!==null&&ya(p)){if(l=v.start,o=v.end,o===void 0&&(o=l),"selectionStart"in p)p.selectionStart=l,p.selectionEnd=Math.min(o,p.value.length);else if(o=(l=p.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var w=p.textContent.length,C=Math.min(v.start,w);v=v.end===void 0?C:Math.min(v.end,w),!o.extend&&C>v&&(w=v,v=C,C=w),w=xt(p,C);var $=xt(p,v);w&&$&&(o.rangeCount!==1||o.anchorNode!==w.node||o.anchorOffset!==w.offset||o.focusNode!==$.node||o.focusOffset!==$.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),o.removeAllRanges(),C>v?(o.addRange(l),o.extend($.node,$.offset)):(l.setEnd($.node,$.offset),o.addRange(l)))}}for(l=[],o=p;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p=document.documentMode,oo=null,ad=null,$i=null,gl=!1;function ba(o,l,p){var v=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;gl||oo==null||oo!==Rt(v)||(v=oo,"selectionStart"in v&&ya(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),$i&&$e($i,v)||($i=v,v=Ju(ad,"onSelect"),0Cl||(o.current=pd[Cl],pd[Cl]=null,Cl--)}function $t(o,l){Cl++,pd[Cl]=o.current,o.current=l}var Uo={},jn=fr(Uo),dr=fr(!1),Zn=Uo;function El(o,l){var p=o.type.contextTypes;if(!p)return Uo;var v=o.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===l)return v.__reactInternalMemoizedMaskedChildContext;var w={},C;for(C in p)w[C]=l[C];return v&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=w),w}function pr(o){return o=o.childContextTypes,o!=null}function rc(){Nt(dr),Nt(jn)}function sm(o,l,p){if(jn.current!==Uo)throw Error(n(168));$t(jn,l),$t(dr,p)}function lm(o,l,p){var v=o.stateNode;if(l=l.childContextTypes,typeof v.getChildContext!="function")return p;v=v.getChildContext();for(var w in v)if(!(w in l))throw Error(n(108,Be(o)||"Unknown",w));return A({},p,v)}function jr(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Uo,Zn=jn.current,$t(jn,o),$t(dr,dr.current),!0}function am(o,l,p){var v=o.stateNode;if(!v)throw Error(n(169));p?(o=lm(o,l,Zn),v.__reactInternalMemoizedMergedChildContext=o,Nt(dr),Nt(jn),$t(jn,o)):Nt(dr),$t(dr,p)}var ao=null,ic=!1,hd=!1;function um(o){ao===null?ao=[o]:ao.push(o)}function Es(o){ic=!0,um(o)}function Ko(){if(!hd&&ao!==null){hd=!0;var o=0,l=Ct;try{var p=ao;for(Ct=1;o>=$,w-=$,Li=1<<32-ai(l)+w|p<Xe?(En=Ke,Ke=null):En=Ke.sibling;var St=ye(le,Ke,ue[Xe],Ce);if(St===null){Ke===null&&(Ke=En);break}o&&Ke&&St.alternate===null&&l(le,Ke),ee=C(St,ee,Xe),He===null?ze=St:He.sibling=St,He=St,Ke=En}if(Xe===ue.length)return p(le,Ke),Ft&&Ts(le,Xe),ze;if(Ke===null){for(;XeXe?(En=Ke,Ke=null):En=Ke.sibling;var ns=ye(le,Ke,St.value,Ce);if(ns===null){Ke===null&&(Ke=En);break}o&&Ke&&ns.alternate===null&&l(le,Ke),ee=C(ns,ee,Xe),He===null?ze=ns:He.sibling=ns,He=ns,Ke=En}if(St.done)return p(le,Ke),Ft&&Ts(le,Xe),ze;if(Ke===null){for(;!St.done;Xe++,St=ue.next())St=Se(le,St.value,Ce),St!==null&&(ee=C(St,ee,Xe),He===null?ze=St:He.sibling=St,He=St);return Ft&&Ts(le,Xe),ze}for(Ke=v(le,Ke);!St.done;Xe++,St=ue.next())St=Ae(Ke,le,Xe,St.value,Ce),St!==null&&(o&&St.alternate!==null&&Ke.delete(St.key===null?Xe:St.key),ee=C(St,ee,Xe),He===null?ze=St:He.sibling=St,He=St);return o&&Ke.forEach(function(xy){return l(le,xy)}),Ft&&Ts(le,Xe),ze}function rn(le,ee,ue,Ce){if(typeof ue=="object"&&ue!==null&&ue.type===Z&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case W:e:{for(var ze=ue.key,He=ee;He!==null;){if(He.key===ze){if(ze=ue.type,ze===Z){if(He.tag===7){p(le,He.sibling),ee=w(He,ue.props.children),ee.return=le,le=ee;break e}}else if(He.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===J&&pm(ze)===He.type){p(le,He.sibling),ee=w(He,ue.props),ee.ref=$a(le,He,ue),ee.return=le,le=ee;break e}p(le,He);break}else l(le,He);He=He.sibling}ue.type===Z?(ee=Bs(ue.props.children,le.mode,Ce,ue.key),ee.return=le,le=ee):(Ce=Vc(ue.type,ue.key,ue.props,null,le.mode,Ce),Ce.ref=$a(le,ee,ue),Ce.return=le,le=Ce)}return $(le);case M:e:{for(He=ue.key;ee!==null;){if(ee.key===He)if(ee.tag===4&&ee.stateNode.containerInfo===ue.containerInfo&&ee.stateNode.implementation===ue.implementation){p(le,ee.sibling),ee=w(ee,ue.children||[]),ee.return=le,le=ee;break e}else{p(le,ee);break}else l(le,ee);ee=ee.sibling}ee=rp(ue,le.mode,Ce),ee.return=le,le=ee}return $(le);case J:return He=ue._init,rn(le,ee,He(ue._payload),Ce)}if(Sn(ue))return Le(le,ee,ue,Ce);if(se(ue))return De(le,ee,ue,Ce);Is(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"?(ue=""+ue,ee!==null&&ee.tag===6?(p(le,ee.sibling),ee=w(ee,ue),ee.return=le,le=ee):(p(le,ee),ee=np(ue,le.mode,Ce),ee.return=le,le=ee),$(le)):p(le,ee)}return rn}var Jt=gd(!0),ac=gd(!1),Aa=fr(null),Pr=null,Wo=null,Tl=null;function co(){Tl=Wo=Pr=null}function uc(o){var l=Aa.current;Nt(Aa),o._currentValue=l}function Rn(o,l,p){for(;o!==null;){var v=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,v!==null&&(v.childLanes|=l)):v!==null&&(v.childLanes&l)!==l&&(v.childLanes|=l),o===p)break;o=o.return}}function Ho(o,l){Pr=o,Tl=Wo=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(tr=!0),o.firstContext=null)}function Kr(o){var l=o._currentValue;if(Tl!==o)if(o={context:o,memoizedValue:l,next:null},Wo===null){if(Pr===null)throw Error(n(308));Wo=o,Pr.dependencies={lanes:0,firstContext:o}}else Wo=Wo.next=o;return l}var $s=null;function vd(o){$s===null?$s=[o]:$s.push(o)}function cc(o,l,p,v){var w=l.interleaved;return w===null?(p.next=p,vd(l)):(p.next=w.next,w.next=p),l.interleaved=p,fo(o,v)}function fo(o,l){o.lanes|=l;var p=o.alternate;for(p!==null&&(p.lanes|=l),p=o,o=o.return;o!==null;)o.childLanes|=l,p=o.alternate,p!==null&&(p.childLanes|=l),p=o,o=o.return;return p.tag===3?p.stateNode:null}var Wr=!1;function fc(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hm(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function po(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Hr(o,l,p){var v=o.updateQueue;if(v===null)return null;if(v=v.shared,(gt&2)!==0){var w=v.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),v.pending=l,fo(o,p)}return w=v.interleaved,w===null?(l.next=l,vd(v)):(l.next=w.next,w.next=l),v.interleaved=l,fo(o,p)}function dc(o,l,p){if(l=l.updateQueue,l!==null&&(l=l.shared,(p&4194240)!==0)){var v=l.lanes;v&=o.pendingLanes,p|=v,l.lanes=p,pa(o,p)}}function mm(o,l){var p=o.updateQueue,v=o.alternate;if(v!==null&&(v=v.updateQueue,p===v)){var w=null,C=null;if(p=p.firstBaseUpdate,p!==null){do{var $={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};C===null?w=C=$:C=C.next=$,p=p.next}while(p!==null);C===null?w=C=l:C=C.next=l}else w=C=l;p={baseState:v.baseState,firstBaseUpdate:w,lastBaseUpdate:C,shared:v.shared,effects:v.effects},o.updateQueue=p;return}o=p.lastBaseUpdate,o===null?p.firstBaseUpdate=l:o.next=l,p.lastBaseUpdate=l}function _l(o,l,p,v){var w=o.updateQueue;Wr=!1;var C=w.firstBaseUpdate,$=w.lastBaseUpdate,V=w.shared.pending;if(V!==null){w.shared.pending=null;var Y=V,de=Y.next;Y.next=null,$===null?C=de:$.next=de,$=Y;var be=o.alternate;be!==null&&(be=be.updateQueue,V=be.lastBaseUpdate,V!==$&&(V===null?be.firstBaseUpdate=de:V.next=de,be.lastBaseUpdate=Y))}if(C!==null){var Se=w.baseState;$=0,be=de=Y=null,V=C;do{var ye=V.lane,Ae=V.eventTime;if((v&ye)===ye){be!==null&&(be=be.next={eventTime:Ae,lane:0,tag:V.tag,payload:V.payload,callback:V.callback,next:null});e:{var Le=o,De=V;switch(ye=l,Ae=p,De.tag){case 1:if(Le=De.payload,typeof Le=="function"){Se=Le.call(Ae,Se,ye);break e}Se=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=De.payload,ye=typeof Le=="function"?Le.call(Ae,Se,ye):Le,ye==null)break e;Se=A({},Se,ye);break e;case 2:Wr=!0}}V.callback!==null&&V.lane!==0&&(o.flags|=64,ye=w.effects,ye===null?w.effects=[V]:ye.push(V))}else Ae={eventTime:Ae,lane:ye,tag:V.tag,payload:V.payload,callback:V.callback,next:null},be===null?(de=be=Ae,Y=Se):be=be.next=Ae,$|=ye;if(V=V.next,V===null){if(V=w.shared.pending,V===null)break;ye=V,V=ye.next,ye.next=null,w.lastBaseUpdate=ye,w.shared.pending=null}}while(!0);if(be===null&&(Y=Se),w.baseState=Y,w.firstBaseUpdate=de,w.lastBaseUpdate=be,l=w.shared.interleaved,l!==null){w=l;do $|=w.lane,w=w.next;while(w!==l)}else C===null&&(w.shared.lanes=0);Qo|=$,o.lanes=$,o.memoizedState=Se}}function yd(o,l,p){if(o=l.effects,l.effects=null,o!==null)for(l=0;lp?p:4,o(!0);var v=Sd.transition;Sd.transition={};try{o(!1),l()}finally{Ct=p,Sd.transition=v}}function $d(){return Gr().memoizedState}function ey(o,l,p){var v=es(o);if(p={lane:v,action:p,hasEagerState:!1,eagerState:null,next:null},Ad(o))er(l,p);else if(p=cc(o,l,p,v),p!==null){var w=ir();gi(p,o,v,w),fi(p,l,v)}}function wm(o,l,p){var v=es(o),w={lane:v,action:p,hasEagerState:!1,eagerState:null,next:null};if(Ad(o))er(l,w);else{var C=o.alternate;if(o.lanes===0&&(C===null||C.lanes===0)&&(C=l.lastRenderedReducer,C!==null))try{var $=l.lastRenderedState,V=C($,p);if(w.hasEagerState=!0,w.eagerState=V,ce(V,$)){var Y=l.interleaved;Y===null?(w.next=w,vd(l)):(w.next=Y.next,Y.next=w),l.interleaved=w;return}}catch{}finally{}p=cc(o,l,w,v),p!==null&&(w=ir(),gi(p,o,v,w),fi(p,l,v))}}function Ad(o){var l=o.alternate;return o===Gt||l!==null&&l===Gt}function er(o,l){Da=$l=!0;var p=o.pending;p===null?l.next=l:(l.next=p.next,p.next=l),o.pending=l}function fi(o,l,p){if((p&4194240)!==0){var v=l.lanes;v&=o.pendingLanes,p|=v,l.lanes=p,pa(o,p)}}var xc={readContext:Kr,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},ty={readContext:Kr,useCallback:function(o,l){return zi().memoizedState=[o,l===void 0?null:l],o},useContext:Kr,useEffect:bc,useImperativeHandle:function(o,l,p){return p=p!=null?p.concat([o]):null,Fa(4194308,4,_d.bind(null,l,o),p)},useLayoutEffect:function(o,l){return Fa(4194308,4,o,l)},useInsertionEffect:function(o,l){return Fa(4,2,o,l)},useMemo:function(o,l){var p=zi();return l=l===void 0?null:l,o=o(),p.memoizedState=[o,l],o},useReducer:function(o,l,p){var v=zi();return l=p!==void 0?p(l):l,v.memoizedState=v.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},v.queue=o,o=o.dispatch=ey.bind(null,Gt,o),[v.memoizedState,o]},useRef:function(o){var l=zi();return o={current:o},l.memoizedState=o},useState:Na,useDebugValue:Oa,useDeferredValue:function(o){return zi().memoizedState=o},useTransition:function(){var o=Na(!1),l=o[0];return o=xm.bind(null,o[1]),zi().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,p){var v=Gt,w=zi();if(Ft){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),Cn===null)throw Error(n(349));(qo&30)!==0||Pd(v,l,p)}w.memoizedState=p;var C={value:p,getSnapshot:l};return w.queue=C,bc(mo.bind(null,v,C,o),[o]),v.flags|=2048,Rl(9,mr.bind(null,v,C,p,l),void 0,null),p},useId:function(){var o=zi(),l=Cn.identifierPrefix;if(Ft){var p=Mi,v=Li;p=(v&~(1<<32-ai(v)-1)).toString(32)+p,l=":"+l+"R"+p,p=Rs++,0")&&(Y=Y.replace("",o.displayName)),Y}while(1<=$&&0<=V);break}}}finally{z=!1,Error.prepareStackTrace=p}return(o=o?o.displayName||o.name:"")?oe(o):""}function Ee(o){switch(o.tag){case 5:return oe(o.type);case 16:return oe("Lazy");case 13:return oe("Suspense");case 19:return oe("SuspenseList");case 0:case 2:case 15:return o=me(o.type,!1),o;case 11:return o=me(o.type.render,!1),o;case 1:return o=me(o.type,!0),o;default:return""}}function we(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case Z:return"Fragment";case M:return"Portal";case ae:return"Profiler";case re:return"StrictMode";case ne:return"Suspense";case G:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case U:return(o.displayName||"Context")+".Consumer";case O:return(o._context.displayName||"Context")+".Provider";case X:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case fe:return l=o.displayName||null,l!==null?l:we(o.type)||"Memo";case J:l=o._payload,o=o._init;try{return we(o(l))}catch{}}return null}function Be(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return we(l);case 8:return l===re?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function Oe(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function Te(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function tt(o){var l=Te(o)?"checked":"value",p=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),v=""+o[l];if(!o.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var w=p.get,C=p.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return w.call(this)},set:function($){v=""+$,C.call(this,$)}}),Object.defineProperty(o,l,{enumerable:p.enumerable}),{getValue:function(){return v},setValue:function($){v=""+$},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function yt(o){o._valueTracker||(o._valueTracker=tt(o))}function Ie(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var p=l.getValue(),v="";return o&&(v=Te(o)?o.checked?"true":"false":o.value),o=v,o!==p?(l.setValue(o),!0):!1}function Rt(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function bt(o,l){var p=l.checked;return A({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:p??o._wrapperState.initialChecked})}function Xt(o,l){var p=l.defaultValue==null?"":l.defaultValue,v=l.checked!=null?l.checked:l.defaultChecked;p=Oe(l.value!=null?l.value:p),o._wrapperState={initialChecked:v,initialValue:p,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function Ue(o,l){l=l.checked,l!=null&&L(o,"checked",l,!1)}function st(o,l){Ue(o,l);var p=Oe(l.value),v=l.type;if(p!=null)v==="number"?(p===0&&o.value===""||o.value!=p)&&(o.value=""+p):o.value!==""+p&&(o.value=""+p);else if(v==="submit"||v==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Nr(o,l.type,p):l.hasOwnProperty("defaultValue")&&Nr(o,l.type,Oe(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function An(o,l,p){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var v=l.type;if(!(v!=="submit"&&v!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,p||l===o.value||(o.value=l),o.defaultValue=l}p=o.name,p!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,p!==""&&(o.name=p)}function Nr(o,l,p){(l!=="number"||Rt(o.ownerDocument)!==o)&&(p==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+p&&(o.defaultValue=""+p))}var Sn=Array.isArray;function Lt(o,l,p,v){if(o=o.options,l){l={};for(var w=0;w"+l.valueOf().toString()+"",l=je.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function ct(o,l){if(l){var p=o.firstChild;if(p&&p===o.lastChild&&p.nodeType===3){p.nodeValue=l;return}}o.textContent=l}var Qt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ur=["Webkit","ms","Moz","O"];Object.keys(Qt).forEach(function(o){ur.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Qt[l]=Qt[o]})});function en(o,l,p){return l==null||typeof l=="boolean"||l===""?"":p||typeof l!="number"||l===0||Qt.hasOwnProperty(o)&&Qt[o]?(""+l).trim():l+"px"}function ln(o,l){o=o.style;for(var p in l)if(l.hasOwnProperty(p)){var v=p.indexOf("--")===0,w=en(p,l[p],v);p==="float"&&(p="cssFloat"),v?o.setProperty(p,w):o[p]=w}}var wr=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mt(o,l){if(l){if(wr[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(n(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(n(61))}if(l.style!=null&&typeof l.style!="object")throw Error(n(62))}}function Xn(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tn=null;function rl(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var ds=null,oi=null,si=null;function ia(o){if(o=Bn(o)){if(typeof ds!="function")throw Error(n(280));var l=o.stateNode;l&&(l=tc(l),ds(o.stateNode,o.type,l))}}function Pu(o){oi?si?si.push(o):si=[o]:oi=o}function ps(){if(oi){var o=oi,l=si;if(si=oi=null,ia(o),l)for(o=0;o>>=0,o===0?32:31-(Ih(o)/$h|0)|0}var sl=64,Iu=4194304;function ll(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function vs(o,l){var p=o.pendingLanes;if(p===0)return 0;var v=0,w=o.suspendedLanes,C=o.pingedLanes,$=p&268435455;if($!==0){var V=$&~w;V!==0?v=ll(V):(C&=$,C!==0&&(v=ll(C)))}else $=p&~w,$!==0?v=ll($):C!==0&&(v=ll(C));if(v===0)return 0;if(l!==0&&l!==v&&(l&w)===0&&(w=v&-v,C=l&-l,w>=C||w===16&&(C&4194240)!==0))return l;if((v&4)!==0&&(v|=p&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=v;0p;p++)l.push(o);return l}function fa(o,l,p){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-li(l),o[l]=p}function Lh(o,l){var p=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var v=o.eventTimes;for(o=o.expirationTimes;0=io),Gh=" ",qh=!1;function Yh(o,l){switch(o){case"keyup":return Sr.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xh(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var pl=!1;function hl(o,l){switch(o){case"compositionend":return Xh(l);case"keypress":return l.which!==32?null:(qh=!0,Gh);case"textInput":return o=l.data,o===Gh&&qh?null:o;default:return null}}function Hv(o,l){if(pl)return o==="compositionend"||!ga&&Yh(o,l)?(o=Yf(),Ii=ma=jt=null,pl=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:p,offset:l-o};o=v}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=nt(p)}}function an(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?an(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function Tt(){for(var o=window,l=Rt();l instanceof o.HTMLIFrameElement;){try{var p=typeof l.contentWindow.location.href=="string"}catch{p=!1}if(p)o=l.contentWindow;else break;l=Rt(o.document)}return l}function va(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function Jv(o){var l=Tt(),p=o.focusedElem,v=o.selectionRange;if(l!==p&&p&&p.ownerDocument&&an(p.ownerDocument.documentElement,p)){if(v!==null&&va(p)){if(l=v.start,o=v.end,o===void 0&&(o=l),"selectionStart"in p)p.selectionStart=l,p.selectionEnd=Math.min(o,p.value.length);else if(o=(l=p.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var w=p.textContent.length,C=Math.min(v.start,w);v=v.end===void 0?C:Math.min(v.end,w),!o.extend&&C>v&&(w=v,v=C,C=w),w=xt(p,C);var $=xt(p,v);w&&$&&(o.rangeCount!==1||o.anchorNode!==w.node||o.anchorOffset!==w.offset||o.focusNode!==$.node||o.focusOffset!==$.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),o.removeAllRanges(),C>v?(o.addRange(l),o.extend($.node,$.offset)):(l.setEnd($.node,$.offset),o.addRange(l)))}}for(l=[],o=p;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p=document.documentMode,oo=null,ad=null,$i=null,gl=!1;function ya(o,l,p){var v=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;gl||oo==null||oo!==Rt(v)||(v=oo,"selectionStart"in v&&va(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),$i&&$e($i,v)||($i=v,v=Qu(ad,"onSelect"),0Cl||(o.current=pd[Cl],pd[Cl]=null,Cl--)}function $t(o,l){Cl++,pd[Cl]=o.current,o.current=l}var Uo={},jn=fr(Uo),dr=fr(!1),Zn=Uo;function El(o,l){var p=o.type.contextTypes;if(!p)return Uo;var v=o.stateNode;if(v&&v.__reactInternalMemoizedUnmaskedChildContext===l)return v.__reactInternalMemoizedMaskedChildContext;var w={},C;for(C in p)w[C]=l[C];return v&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=w),w}function pr(o){return o=o.childContextTypes,o!=null}function nc(){Nt(dr),Nt(jn)}function sm(o,l,p){if(jn.current!==Uo)throw Error(n(168));$t(jn,l),$t(dr,p)}function lm(o,l,p){var v=o.stateNode;if(l=l.childContextTypes,typeof v.getChildContext!="function")return p;v=v.getChildContext();for(var w in v)if(!(w in l))throw Error(n(108,Be(o)||"Unknown",w));return A({},p,v)}function Br(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Uo,Zn=jn.current,$t(jn,o),$t(dr,dr.current),!0}function am(o,l,p){var v=o.stateNode;if(!v)throw Error(n(169));p?(o=lm(o,l,Zn),v.__reactInternalMemoizedMergedChildContext=o,Nt(dr),Nt(jn),$t(jn,o)):Nt(dr),$t(dr,p)}var ao=null,rc=!1,hd=!1;function um(o){ao===null?ao=[o]:ao.push(o)}function Es(o){rc=!0,um(o)}function Ko(){if(!hd&&ao!==null){hd=!0;var o=0,l=Ct;try{var p=ao;for(Ct=1;o>=$,w-=$,Li=1<<32-li(l)+w|p<Xe?(En=Ke,Ke=null):En=Ke.sibling;var St=ye(le,Ke,ue[Xe],Ce);if(St===null){Ke===null&&(Ke=En);break}o&&Ke&&St.alternate===null&&l(le,Ke),ee=C(St,ee,Xe),He===null?ze=St:He.sibling=St,He=St,Ke=En}if(Xe===ue.length)return p(le,Ke),Ft&&Ts(le,Xe),ze;if(Ke===null){for(;XeXe?(En=Ke,Ke=null):En=Ke.sibling;var ns=ye(le,Ke,St.value,Ce);if(ns===null){Ke===null&&(Ke=En);break}o&&Ke&&ns.alternate===null&&l(le,Ke),ee=C(ns,ee,Xe),He===null?ze=ns:He.sibling=ns,He=ns,Ke=En}if(St.done)return p(le,Ke),Ft&&Ts(le,Xe),ze;if(Ke===null){for(;!St.done;Xe++,St=ue.next())St=Se(le,St.value,Ce),St!==null&&(ee=C(St,ee,Xe),He===null?ze=St:He.sibling=St,He=St);return Ft&&Ts(le,Xe),ze}for(Ke=v(le,Ke);!St.done;Xe++,St=ue.next())St=Ae(Ke,le,Xe,St.value,Ce),St!==null&&(o&&St.alternate!==null&&Ke.delete(St.key===null?Xe:St.key),ee=C(St,ee,Xe),He===null?ze=St:He.sibling=St,He=St);return o&&Ke.forEach(function(xy){return l(le,xy)}),Ft&&Ts(le,Xe),ze}function rn(le,ee,ue,Ce){if(typeof ue=="object"&&ue!==null&&ue.type===Z&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case W:e:{for(var ze=ue.key,He=ee;He!==null;){if(He.key===ze){if(ze=ue.type,ze===Z){if(He.tag===7){p(le,He.sibling),ee=w(He,ue.props.children),ee.return=le,le=ee;break e}}else if(He.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===J&&pm(ze)===He.type){p(le,He.sibling),ee=w(He,ue.props),ee.ref=Ia(le,He,ue),ee.return=le,le=ee;break e}p(le,He);break}else l(le,He);He=He.sibling}ue.type===Z?(ee=Bs(ue.props.children,le.mode,Ce,ue.key),ee.return=le,le=ee):(Ce=jc(ue.type,ue.key,ue.props,null,le.mode,Ce),Ce.ref=Ia(le,ee,ue),Ce.return=le,le=Ce)}return $(le);case M:e:{for(He=ue.key;ee!==null;){if(ee.key===He)if(ee.tag===4&&ee.stateNode.containerInfo===ue.containerInfo&&ee.stateNode.implementation===ue.implementation){p(le,ee.sibling),ee=w(ee,ue.children||[]),ee.return=le,le=ee;break e}else{p(le,ee);break}else l(le,ee);ee=ee.sibling}ee=rp(ue,le.mode,Ce),ee.return=le,le=ee}return $(le);case J:return He=ue._init,rn(le,ee,He(ue._payload),Ce)}if(Sn(ue))return Le(le,ee,ue,Ce);if(se(ue))return De(le,ee,ue,Ce);Is(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"?(ue=""+ue,ee!==null&&ee.tag===6?(p(le,ee.sibling),ee=w(ee,ue),ee.return=le,le=ee):(p(le,ee),ee=np(ue,le.mode,Ce),ee.return=le,le=ee),$(le)):p(le,ee)}return rn}var Jt=gd(!0),lc=gd(!1),$a=fr(null),Pr=null,Wo=null,Tl=null;function co(){Tl=Wo=Pr=null}function ac(o){var l=$a.current;Nt($a),o._currentValue=l}function Rn(o,l,p){for(;o!==null;){var v=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,v!==null&&(v.childLanes|=l)):v!==null&&(v.childLanes&l)!==l&&(v.childLanes|=l),o===p)break;o=o.return}}function Ho(o,l){Pr=o,Tl=Wo=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(tr=!0),o.firstContext=null)}function Ur(o){var l=o._currentValue;if(Tl!==o)if(o={context:o,memoizedValue:l,next:null},Wo===null){if(Pr===null)throw Error(n(308));Wo=o,Pr.dependencies={lanes:0,firstContext:o}}else Wo=Wo.next=o;return l}var $s=null;function vd(o){$s===null?$s=[o]:$s.push(o)}function uc(o,l,p,v){var w=l.interleaved;return w===null?(p.next=p,vd(l)):(p.next=w.next,w.next=p),l.interleaved=p,fo(o,v)}function fo(o,l){o.lanes|=l;var p=o.alternate;for(p!==null&&(p.lanes|=l),p=o,o=o.return;o!==null;)o.childLanes|=l,p=o.alternate,p!==null&&(p.childLanes|=l),p=o,o=o.return;return p.tag===3?p.stateNode:null}var Kr=!1;function cc(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hm(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function po(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Wr(o,l,p){var v=o.updateQueue;if(v===null)return null;if(v=v.shared,(gt&2)!==0){var w=v.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),v.pending=l,fo(o,p)}return w=v.interleaved,w===null?(l.next=l,vd(v)):(l.next=w.next,w.next=l),v.interleaved=l,fo(o,p)}function fc(o,l,p){if(l=l.updateQueue,l!==null&&(l=l.shared,(p&4194240)!==0)){var v=l.lanes;v&=o.pendingLanes,p|=v,l.lanes=p,da(o,p)}}function mm(o,l){var p=o.updateQueue,v=o.alternate;if(v!==null&&(v=v.updateQueue,p===v)){var w=null,C=null;if(p=p.firstBaseUpdate,p!==null){do{var $={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};C===null?w=C=$:C=C.next=$,p=p.next}while(p!==null);C===null?w=C=l:C=C.next=l}else w=C=l;p={baseState:v.baseState,firstBaseUpdate:w,lastBaseUpdate:C,shared:v.shared,effects:v.effects},o.updateQueue=p;return}o=p.lastBaseUpdate,o===null?p.firstBaseUpdate=l:o.next=l,p.lastBaseUpdate=l}function _l(o,l,p,v){var w=o.updateQueue;Kr=!1;var C=w.firstBaseUpdate,$=w.lastBaseUpdate,V=w.shared.pending;if(V!==null){w.shared.pending=null;var Y=V,de=Y.next;Y.next=null,$===null?C=de:$.next=de,$=Y;var be=o.alternate;be!==null&&(be=be.updateQueue,V=be.lastBaseUpdate,V!==$&&(V===null?be.firstBaseUpdate=de:V.next=de,be.lastBaseUpdate=Y))}if(C!==null){var Se=w.baseState;$=0,be=de=Y=null,V=C;do{var ye=V.lane,Ae=V.eventTime;if((v&ye)===ye){be!==null&&(be=be.next={eventTime:Ae,lane:0,tag:V.tag,payload:V.payload,callback:V.callback,next:null});e:{var Le=o,De=V;switch(ye=l,Ae=p,De.tag){case 1:if(Le=De.payload,typeof Le=="function"){Se=Le.call(Ae,Se,ye);break e}Se=Le;break e;case 3:Le.flags=Le.flags&-65537|128;case 0:if(Le=De.payload,ye=typeof Le=="function"?Le.call(Ae,Se,ye):Le,ye==null)break e;Se=A({},Se,ye);break e;case 2:Kr=!0}}V.callback!==null&&V.lane!==0&&(o.flags|=64,ye=w.effects,ye===null?w.effects=[V]:ye.push(V))}else Ae={eventTime:Ae,lane:ye,tag:V.tag,payload:V.payload,callback:V.callback,next:null},be===null?(de=be=Ae,Y=Se):be=be.next=Ae,$|=ye;if(V=V.next,V===null){if(V=w.shared.pending,V===null)break;ye=V,V=ye.next,ye.next=null,w.lastBaseUpdate=ye,w.shared.pending=null}}while(!0);if(be===null&&(Y=Se),w.baseState=Y,w.firstBaseUpdate=de,w.lastBaseUpdate=be,l=w.shared.interleaved,l!==null){w=l;do $|=w.lane,w=w.next;while(w!==l)}else C===null&&(w.shared.lanes=0);Qo|=$,o.lanes=$,o.memoizedState=Se}}function yd(o,l,p){if(o=l.effects,l.effects=null,o!==null)for(l=0;lp?p:4,o(!0);var v=Sd.transition;Sd.transition={};try{o(!1),l()}finally{Ct=p,Sd.transition=v}}function $d(){return Hr().memoizedState}function ey(o,l,p){var v=es(o);if(p={lane:v,action:p,hasEagerState:!1,eagerState:null,next:null},Ad(o))er(l,p);else if(p=uc(o,l,p,v),p!==null){var w=ir();mi(p,o,v,w),ci(p,l,v)}}function wm(o,l,p){var v=es(o),w={lane:v,action:p,hasEagerState:!1,eagerState:null,next:null};if(Ad(o))er(l,w);else{var C=o.alternate;if(o.lanes===0&&(C===null||C.lanes===0)&&(C=l.lastRenderedReducer,C!==null))try{var $=l.lastRenderedState,V=C($,p);if(w.hasEagerState=!0,w.eagerState=V,ce(V,$)){var Y=l.interleaved;Y===null?(w.next=w,vd(l)):(w.next=Y.next,Y.next=w),l.interleaved=w;return}}catch{}finally{}p=uc(o,l,w,v),p!==null&&(w=ir(),mi(p,o,v,w),ci(p,l,v))}}function Ad(o){var l=o.alternate;return o===Gt||l!==null&&l===Gt}function er(o,l){Ma=$l=!0;var p=o.pending;p===null?l.next=l:(l.next=p.next,p.next=l),o.pending=l}function ci(o,l,p){if((p&4194240)!==0){var v=l.lanes;v&=o.pendingLanes,p|=v,l.lanes=p,da(o,p)}}var bc={readContext:Ur,useCallback:Kn,useContext:Kn,useEffect:Kn,useImperativeHandle:Kn,useInsertionEffect:Kn,useLayoutEffect:Kn,useMemo:Kn,useReducer:Kn,useRef:Kn,useState:Kn,useDebugValue:Kn,useDeferredValue:Kn,useTransition:Kn,useMutableSource:Kn,useSyncExternalStore:Kn,useId:Kn,unstable_isNewReconciler:!1},ty={readContext:Ur,useCallback:function(o,l){return zi().memoizedState=[o,l===void 0?null:l],o},useContext:Ur,useEffect:yc,useImperativeHandle:function(o,l,p){return p=p!=null?p.concat([o]):null,Na(4194308,4,_d.bind(null,l,o),p)},useLayoutEffect:function(o,l){return Na(4194308,4,o,l)},useInsertionEffect:function(o,l){return Na(4,2,o,l)},useMemo:function(o,l){var p=zi();return l=l===void 0?null:l,o=o(),p.memoizedState=[o,l],o},useReducer:function(o,l,p){var v=zi();return l=p!==void 0?p(l):l,v.memoizedState=v.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},v.queue=o,o=o.dispatch=ey.bind(null,Gt,o),[v.memoizedState,o]},useRef:function(o){var l=zi();return o={current:o},l.memoizedState=o},useState:Da,useDebugValue:Fa,useDeferredValue:function(o){return zi().memoizedState=o},useTransition:function(){var o=Da(!1),l=o[0];return o=xm.bind(null,o[1]),zi().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,p){var v=Gt,w=zi();if(Ft){if(p===void 0)throw Error(n(407));p=p()}else{if(p=l(),Cn===null)throw Error(n(349));(qo&30)!==0||Pd(v,l,p)}w.memoizedState=p;var C={value:p,getSnapshot:l};return w.queue=C,yc(mo.bind(null,v,C,o),[o]),v.flags|=2048,Rl(9,mr.bind(null,v,C,p,l),void 0,null),p},useId:function(){var o=zi(),l=Cn.identifierPrefix;if(Ft){var p=Mi,v=Li;p=(v&~(1<<32-li(v)-1)).toString(32)+p,l=":"+l+"R"+p,p=Rs++,0<\/script>",o=o.removeChild(o.firstChild)):typeof v.is=="string"?o=$.createElement(p,{is:v.is}):(o=$.createElement(p),p==="select"&&($=o,v.multiple?$.multiple=!0:v.size&&($.size=v.size))):o=$.createElementNS(o,p),o[Ai]=l,o[Vo]=v,Mn(o,l,!1,!1),l.stateNode=o;e:{switch($=Xn(p,v),p){case"dialog":Dt("cancel",o),Dt("close",o),w=v;break;case"iframe":case"object":case"embed":Dt("load",o),w=v;break;case"video":case"audio":for(w=0;wNs&&(l.flags|=128,v=!0,Wa(C,!1),l.lanes=4194304)}else{if(!v)if(o=As($),o!==null){if(l.flags|=128,v=!0,p=o.updateQueue,p!==null&&(l.updateQueue=p,l.flags|=4),Wa(C,!0),C.tail===null&&C.tailMode==="hidden"&&!$.alternate&&!Ft)return Dn(l),null}else 2*Bt()-C.renderingStartTime>Ns&&p!==1073741824&&(l.flags|=128,v=!0,Wa(C,!1),l.lanes=4194304);C.isBackwards?($.sibling=l.child,l.child=$):(p=C.last,p!==null?p.sibling=$:l.child=$,C.last=$)}return C.tail!==null?(l=C.tail,C.rendering=l,C.tail=l.sibling,C.renderingStartTime=Bt(),l.sibling=null,p=Vt.current,$t(Vt,v?p&1|2:p&1),l):(Dn(l),null);case 22:case 23:return ep(),v=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==v&&(l.flags|=8192),v&&(l.mode&1)!==0?(_r&1073741824)!==0&&(Dn(l),l.subtreeFlags&6&&(l.flags|=8192)):Dn(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function ry(o,l){switch(_s(l),l.tag){case 1:return pr(l.type)&&rc(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Go(),Nt(dr),Nt(jn),hc(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return pc(l),null;case 13:if(Nt(Vt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Ni()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return Nt(Vt),null;case 4:return Go(),null;case 10:return uc(l.type._context),null;case 22:case 23:return ep(),null;case 24:return null;default:return null}}var Ic=!1,Ut=!1,nr=typeof WeakSet=="function"?WeakSet:Set,Re=null;function Ol(o,l){var p=o.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(v){qt(o,l,v)}else p.current=null}function Ha(o,l,p){try{p()}catch(v){qt(o,l,v)}}var _m=!1;function iy(o,l){if(Ea=Du,o=Tt(),ya(o)){if("selectionStart"in o)var p={start:o.selectionStart,end:o.selectionEnd};else e:{p=(p=o.ownerDocument)&&p.defaultView||window;var v=p.getSelection&&p.getSelection();if(v&&v.rangeCount!==0){p=v.anchorNode;var w=v.anchorOffset,C=v.focusNode;v=v.focusOffset;try{p.nodeType,C.nodeType}catch{p=null;break e}var $=0,V=-1,Y=-1,de=0,be=0,Se=o,ye=null;t:for(;;){for(var Ae;Se!==p||w!==0&&Se.nodeType!==3||(V=$+w),Se!==C||v!==0&&Se.nodeType!==3||(Y=$+v),Se.nodeType===3&&($+=Se.nodeValue.length),(Ae=Se.firstChild)!==null;)ye=Se,Se=Ae;for(;;){if(Se===o)break t;if(ye===p&&++de===w&&(V=$),ye===C&&++be===v&&(Y=$),(Ae=Se.nextSibling)!==null)break;Se=ye,ye=Se.parentNode}Se=Ae}p=V===-1||Y===-1?null:{start:V,end:Y}}else p=null}p=p||{start:0,end:0}}else p=null;for(Cs={focusedElem:o,selectionRange:p},Du=!1,Re=l;Re!==null;)if(l=Re,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Re=o;else for(;Re!==null;){l=Re;try{var Le=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var De=Le.memoizedProps,rn=Le.memoizedState,le=l.stateNode,ee=le.getSnapshotBeforeUpdate(l.elementType===l.type?De:qr(l.type,De),rn);le.__reactInternalSnapshotBeforeUpdate=ee}break;case 3:var ue=l.stateNode.containerInfo;ue.nodeType===1?ue.textContent="":ue.nodeType===9&&ue.documentElement&&ue.removeChild(ue.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ce){qt(l,l.return,Ce)}if(o=l.sibling,o!==null){o.return=l.return,Re=o;break}Re=l.return}return Le=_m,_m=!1,Le}function yo(o,l,p){var v=l.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var w=v=v.next;do{if((w.tag&o)===o){var C=w.destroy;w.destroy=void 0,C!==void 0&&Ha(l,p,C)}w=w.next}while(w!==v)}}function Ga(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var p=l=l.next;do{if((p.tag&o)===o){var v=p.create;p.destroy=v()}p=p.next}while(p!==l)}}function $c(o){var l=o.ref;if(l!==null){var p=o.stateNode;switch(o.tag){case 5:o=p;break;default:o=p}typeof l=="function"?l(o):l.current=o}}function Im(o){var l=o.alternate;l!==null&&(o.alternate=null,Im(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Ai],delete l[Vo],delete l[tc],delete l[D],delete l[kl])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function $m(o){return o.tag===5||o.tag===3||o.tag===4}function Am(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||$m(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Ud(o,l,p){var v=o.tag;if(v===5||v===6)o=o.stateNode,l?p.nodeType===8?p.parentNode.insertBefore(o,l):p.insertBefore(o,l):(p.nodeType===8?(l=p.parentNode,l.insertBefore(o,p)):(l=p,l.appendChild(o)),p=p._reactRootContainer,p!=null||l.onclick!==null||(l.onclick=Zu));else if(v!==4&&(o=o.child,o!==null))for(Ud(o,l,p),o=o.sibling;o!==null;)Ud(o,l,p),o=o.sibling}function Ac(o,l,p){var v=o.tag;if(v===5||v===6)o=o.stateNode,l?p.insertBefore(o,l):p.appendChild(o);else if(v!==4&&(o=o.child,o!==null))for(Ac(o,l,p),o=o.sibling;o!==null;)Ac(o,l,p),o=o.sibling}var kn=null,pi=!1;function Ui(o,l,p){for(p=p.child;p!==null;)Kd(o,l,p),p=p.sibling}function Kd(o,l,p){if(_i&&typeof _i.onCommitFiberUnmount=="function")try{_i.onCommitFiberUnmount(Iu,p)}catch{}switch(p.tag){case 5:Ut||Ol(p,l);case 6:var v=kn,w=pi;kn=null,Ui(o,l,p),kn=v,pi=w,kn!==null&&(pi?(o=kn,p=p.stateNode,o.nodeType===8?o.parentNode.removeChild(p):o.removeChild(p)):kn.removeChild(p.stateNode));break;case 18:kn!==null&&(pi?(o=kn,p=p.stateNode,o.nodeType===8?dd(o.parentNode,p):o.nodeType===1&&dd(o,p),Et(o)):dd(kn,p.stateNode));break;case 4:v=kn,w=pi,kn=p.stateNode.containerInfo,pi=!0,Ui(o,l,p),kn=v,pi=w;break;case 0:case 11:case 14:case 15:if(!Ut&&(v=p.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){w=v=v.next;do{var C=w,$=C.destroy;C=C.tag,$!==void 0&&((C&2)!==0||(C&4)!==0)&&Ha(p,l,$),w=w.next}while(w!==v)}Ui(o,l,p);break;case 1:if(!Ut&&(Ol(p,l),v=p.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=p.memoizedProps,v.state=p.memoizedState,v.componentWillUnmount()}catch(V){qt(p,l,V)}Ui(o,l,p);break;case 21:Ui(o,l,p);break;case 22:p.mode&1?(Ut=(v=Ut)||p.memoizedState!==null,Ui(o,l,p),Ut=v):Ui(o,l,p);break;default:Ui(o,l,p)}}function zl(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var p=o.stateNode;p===null&&(p=o.stateNode=new nr),l.forEach(function(v){var w=fy.bind(null,o,v);p.has(v)||(p.add(v),v.then(w,w))})}}function Tr(o,l){var p=l.deletions;if(p!==null)for(var v=0;vw&&(w=$),v&=~C}if(v=w,v=Bt()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*Lm(v/1960))-v,10o?16:o,Zo===null)var v=!1;else{if(o=Zo,Zo=null,rr=0,(gt&6)!==0)throw Error(n(331));var w=gt;for(gt|=4,Re=o.current;Re!==null;){var C=Re,$=C.child;if((Re.flags&16)!==0){var V=C.deletions;if(V!==null){for(var Y=0;YBt()-qd?Os(o,0):Mc|=p),vr(o,l)}function zm(o,l){l===0&&((o.mode&1)===0?l=1:(l=$u,$u<<=1,($u&130023424)===0&&($u=4194304)));var p=ir();o=fo(o,l),o!==null&&(da(o,l,p),vr(o,p))}function cy(o){var l=o.memoizedState,p=0;l!==null&&(p=l.retryLane),zm(o,p)}function fy(o,l){var p=0;switch(o.tag){case 13:var v=o.stateNode,w=o.memoizedState;w!==null&&(p=w.retryLane);break;case 19:v=o.stateNode;break;default:throw Error(n(314))}v!==null&&v.delete(l),zm(o,p)}var Bm;Bm=function(o,l,p){if(o!==null)if(o.memoizedProps!==l.pendingProps||dr.current)tr=!0;else{if((o.lanes&p)===0&&(l.flags&128)===0)return tr=!1,Pm(o,l,p);tr=(o.flags&131072)!==0}else tr=!1,Ft&&(l.flags&1048576)!==0&&cm(l,sc,l.index);switch(l.lanes=0,l.tag){case 2:var v=l.type;_c(o,l),o=l.pendingProps;var w=El(l,jn.current);Ho(l,p),w=Ls(null,l,v,o,w,p);var C=mc();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,pr(v)?(C=!0,jr(l)):C=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,fc(l),w.updater=kc,l.stateNode=w,w._reactInternals=l,Ld(l,v,o,p),l=Bd(null,l,v,!0,C,p)):(l.tag=0,Ft&&C&&_a(l),Ln(null,l,w,p),l=l.child),l;case 16:v=l.elementType;e:{switch(_c(o,l),o=l.pendingProps,w=v._init,v=w(v._payload),l.type=v,w=l.tag=py(v),o=qr(v,o),w){case 0:l=Od(null,l,v,o,p);break e;case 1:l=zd(null,l,v,o,p);break e;case 11:l=Cm(null,l,v,o,p);break e;case 14:l=Dd(null,l,v,qr(v.type,o),p);break e}throw Error(n(306,v,""))}return l;case 0:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:qr(v,w),Od(o,l,v,w,p);case 1:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:qr(v,w),zd(o,l,v,w,p);case 3:e:{if(Em(l),o===null)throw Error(n(387));v=l.pendingProps,C=l.memoizedState,w=C.element,hm(o,l),_l(l,v,null,p);var $=l.memoizedState;if(v=$.element,C.isDehydrated)if(C={element:v,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},l.updateQueue.baseState=C,l.memoizedState=C,l.flags&256){w=Ds(Error(n(423)),l),l=Vi(o,l,v,p,w);break e}else if(v!==w){w=Ds(Error(n(424)),l),l=Vi(o,l,v,p,w);break e}else for(Er=jo(l.stateNode.containerInfo.firstChild),Un=l,Ft=!0,ci=null,p=ac(l,null,v,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Ni(),v===w){l=di(o,l,p);break e}Ln(o,l,v,p)}l=l.child}return l;case 5:return xd(l),o===null&&hr(l),v=l.type,w=l.pendingProps,C=o!==null?o.memoizedProps:null,$=w.children,Pa(v,w)?$=null:C!==null&&Pa(v,C)&&(l.flags|=32),Fd(o,l),Ln(o,l,$,p),l.child;case 6:return o===null&&hr(l),null;case 13:return Tc(o,l,p);case 4:return bd(l,l.stateNode.containerInfo),v=l.pendingProps,o===null?l.child=Jt(l,null,v,p):Ln(o,l,v,p),l.child;case 11:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:qr(v,w),Cm(o,l,v,w,p);case 7:return Ln(o,l,l.pendingProps,p),l.child;case 8:return Ln(o,l,l.pendingProps.children,p),l.child;case 12:return Ln(o,l,l.pendingProps.children,p),l.child;case 10:e:{if(v=l.type._context,w=l.pendingProps,C=l.memoizedProps,$=w.value,$t(Aa,v._currentValue),v._currentValue=$,C!==null)if(ce(C.value,$)){if(C.children===w.children&&!dr.current){l=di(o,l,p);break e}}else for(C=l.child,C!==null&&(C.return=l);C!==null;){var V=C.dependencies;if(V!==null){$=C.child;for(var Y=V.firstContext;Y!==null;){if(Y.context===v){if(C.tag===1){Y=po(-1,p&-p),Y.tag=2;var de=C.updateQueue;if(de!==null){de=de.shared;var be=de.pending;be===null?Y.next=Y:(Y.next=be.next,be.next=Y),de.pending=Y}}C.lanes|=p,Y=C.alternate,Y!==null&&(Y.lanes|=p),Rn(C.return,p,l),V.lanes|=p;break}Y=Y.next}}else if(C.tag===10)$=C.type===l.type?null:C.child;else if(C.tag===18){if($=C.return,$===null)throw Error(n(341));$.lanes|=p,V=$.alternate,V!==null&&(V.lanes|=p),Rn($,p,l),$=C.sibling}else $=C.child;if($!==null)$.return=C;else for($=C;$!==null;){if($===l){$=null;break}if(C=$.sibling,C!==null){C.return=$.return,$=C;break}$=$.return}C=$}Ln(o,l,w.children,p),l=l.child}return l;case 9:return w=l.type,v=l.pendingProps.children,Ho(l,p),w=Kr(w),v=v(w),l.flags|=1,Ln(o,l,v,p),l.child;case 14:return v=l.type,w=qr(v,l.pendingProps),w=qr(v.type,w),Dd(o,l,v,w,p);case 15:return ji(o,l,l.type,l.pendingProps,p);case 17:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:qr(v,w),_c(o,l),l.tag=1,pr(v)?(o=!0,jr(l)):o=!1,Ho(l,p),Ms(l,v,w),Ld(l,v,w,p),Bd(null,l,v,!0,o,p);case 19:return Yo(o,l,p);case 22:return Nd(o,l,p)}throw Error(n(156,l.tag))};function jm(o,l){return Eh(o,l)}function dy(o,l,p,v){this.tag=o,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(o,l,p,v){return new dy(o,l,p,v)}function jc(o){return o=o.prototype,!(!o||!o.isReactComponent)}function py(o){if(typeof o=="function")return jc(o)?1:0;if(o!=null){if(o=o.$$typeof,o===X)return 11;if(o===fe)return 14}return 2}function vi(o,l){var p=o.alternate;return p===null?(p=Xr(o.tag,l,o.key,o.mode),p.elementType=o.elementType,p.type=o.type,p.stateNode=o.stateNode,p.alternate=o,o.alternate=p):(p.pendingProps=l,p.type=o.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=o.flags&14680064,p.childLanes=o.childLanes,p.lanes=o.lanes,p.child=o.child,p.memoizedProps=o.memoizedProps,p.memoizedState=o.memoizedState,p.updateQueue=o.updateQueue,l=o.dependencies,p.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},p.sibling=o.sibling,p.index=o.index,p.ref=o.ref,p}function Vc(o,l,p,v,w,C){var $=2;if(v=o,typeof o=="function")jc(o)&&($=1);else if(typeof o=="string")$=5;else e:switch(o){case Z:return Bs(p.children,w,C,l);case re:$=8,w|=8;break;case ae:return o=Xr(12,p,l,w|2),o.elementType=ae,o.lanes=C,o;case ne:return o=Xr(13,p,l,w),o.elementType=ne,o.lanes=C,o;case G:return o=Xr(19,p,l,w),o.elementType=G,o.lanes=C,o;case q:return Uc(p,w,C,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case O:$=10;break e;case U:$=9;break e;case X:$=11;break e;case fe:$=14;break e;case J:$=16,v=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return l=Xr($,p,l,w),l.elementType=o,l.type=v,l.lanes=C,l}function Bs(o,l,p,v){return o=Xr(7,o,v,l),o.lanes=p,o}function Uc(o,l,p,v){return o=Xr(22,o,v,l),o.elementType=q,o.lanes=p,o.stateNode={isHidden:!1},o}function np(o,l,p){return o=Xr(6,o,null,l),o.lanes=p,o}function rp(o,l,p){return l=Xr(4,o.children!==null?o.children:[],o.key,l),l.lanes=p,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function hy(o,l,p,v,w){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fa(0),this.expirationTimes=fa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.identifierPrefix=v,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function ip(o,l,p,v,w,C,$,V,Y){return o=new hy(o,l,p,V,Y),l===1?(l=1,C===!0&&(l|=8)):l=0,C=Xr(3,null,null,l),o.current=C,C.stateNode=o,C.memoizedState={element:v,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},fc(C),o}function my(o,l,p){var v=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),My.exports=FR(),My.exports}var r1;function OR(){if(r1)return Qm;r1=1;var e=iE();return Qm.createRoot=e.createRoot,Qm.hydrateRoot=e.hydrateRoot,Qm}var zR=OR();function nx(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=k.createContext(void 0);i.displayName=r;function s(){var a;const c=k.useContext(i);if(!c&&t){const d=new Error(n);throw d.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,d,s),d}return c}return[i.Provider,s,i]}function BR(e){return{UNSAFE_getDOMNode(){return e.current}}}function Xi(e){const t=k.useRef(null);return k.useImperativeHandle(e,()=>t.current),t}function rx(e){return Array.isArray(e)}function jR(e){return rx(e)&&e.length===0}function oE(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!rx(e)}function VR(e){return oE(e)&&Object.keys(e).length===0}function UR(e){return rx(e)?jR(e):oE(e)?VR(e):e==null||e===""}function KR(e){return typeof e=="function"}var Me=e=>e?"true":void 0;function sE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{let t=" ";for(const n of e)if(typeof n=="string"&&n.length>0){t=n;break}return t},HR=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"";function i1(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function GR(e){return`${e}-${Math.floor(Math.random()*1e6)}`}function zH(e){for(const t in e)t.startsWith("on")&&delete e[t];return e}function Zs(e){if(!e||typeof e!="object")return"";try{return JSON.stringify(e)}catch{return""}}function qR(e,t,n){return Math.min(Math.max(e,t),n)}function YR(e,t=100){return Math.min(Math.max(e,0),t)}var o1={};function XR(e,t,...n){const i=`[Hero UI] : ${e}`;typeof console>"u"||o1[i]||(o1[i]=!0)}function mf(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}var s1=new Map;function QR(e,t){if(e===t)return e;let n=s1.get(e);if(n)return n.forEach(i=>i.current=t),t;let r=s1.get(t);return r?(r.forEach(i=>i.current=e),e):t}function hn(...e){let t={...e[0]};for(let n=1;n=65&&i.charCodeAt(2)<=90?t[i]=mf(s,a):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof a=="string"?t[i]=pn(s,a):i==="id"&&s&&a?t.id=QR(s,a):t[i]=a!==void 0?a:s}}return t}function lE(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1;const r=e.map(i=>{const s=l1(i,t);return n||(n=typeof s=="function"),s});if(n)return()=>{r.forEach((i,s)=>{typeof i=="function"?i?.():l1(e[s],null)})}}}function l1(e,t){if(typeof e=="function")return()=>e(t);e!=null&&"current"in e&&(e.current=t)}function JR(e,t){if(e!=null){if(KR(e)){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function ZR(...e){return t=>{e.forEach(n=>JR(n,t))}}function eL(){const e=()=>()=>{};return k.useSyncExternalStore(e,()=>!0,()=>!1)}var tL=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","step","target","translate","typeMustMatch","useMap","value","wmode","wrap"]),nL=new Set(["onCopy","onCut","onPaste","onLoad","onError","onWheel","onScroll","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerEnter","onPointerLeave","onPointerUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd"]),a1=/^(data-.*)$/,rL=/^(aria-.*)$/,Jm=/^(on[A-Z].*)$/;function gf(e,t={}){let{labelable:n=!0,enabled:r=!0,propNames:i,omitPropNames:s,omitEventNames:a,omitDataProps:c,omitEventProps:d}=t,h={};if(!r)return e;for(const m in e)s?.has(m)||a?.has(m)&&Jm.test(m)||Jm.test(m)&&!nL.has(m)||c&&a1.test(m)||d&&Jm.test(m)||(Object.prototype.hasOwnProperty.call(e,m)&&(tL.has(m)||n&&rL.test(m)||i?.has(m)||a1.test(m))||Jm.test(m))&&(h[m]=e[m]);return h}var[iL,Pi]=nx({name:"ProviderContext",strict:!1});const oL=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),sL=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function aE(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return oL.has(n.script)}let t=e.split("-")[0];return sL.has(t)}const uE={prefix:String(Math.round(Math.random()*1e10)),current:0},cE=We.createContext(uE),lL=We.createContext(!1);let Fy=new WeakMap;function aL(e=!1){let t=k.useContext(cE),n=k.useRef(null);if(n.current===null&&!e){var r,i;let s=(i=We.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let a=Fy.get(s);a==null?Fy.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==a.state&&(t.current=a.id,Fy.delete(s))}n.current=++t.current}return n.current}function uL(e){let t=k.useContext(cE),n=aL(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function cL(e){let t=We.useId(),[n]=k.useState(nv()),r=n?"react-aria":`react-aria${uE.prefix}`;return e||`${r}-${t}`}const fL=typeof We.useId=="function"?cL:uL;function dL(){return!1}function pL(){return!0}function hL(e){return()=>{}}function nv(){return typeof We.useSyncExternalStore=="function"?We.useSyncExternalStore(hL,dL,pL):k.useContext(lL)}const mL=Symbol.for("react-aria.i18n.locale");function fE(){let e=typeof window<"u"&&window[mL]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:aE(e)?"rtl":"ltr"}}let F0=fE(),Cp=new Set;function u1(){F0=fE();for(let e of Cp)e(F0)}function dE(){let e=nv(),[t,n]=k.useState(F0);return k.useEffect(()=>(Cp.size===0&&window.addEventListener("languagechange",u1),Cp.add(n),()=>{Cp.delete(n),Cp.size===0&&window.removeEventListener("languagechange",u1)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const pE=We.createContext(null);function gL(e){let{locale:t,children:n}=e,r=dE(),i=We.useMemo(()=>t?{locale:t,direction:aE(t)?"rtl":"ltr"}:r,[r,t]);return We.createElement(pE.Provider,{value:i},n)}function uh(){let e=dE();return k.useContext(pE)||e}const vL=Symbol.for("react-aria.i18n.locale"),yL=Symbol.for("react-aria.i18n.strings");let Qc;class rv{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=bL(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[vL];if(Qc===void 0){let i=window[yL];if(!i)return null;Qc={};for(let s in i)Qc[s]=new rv({[n]:i[s]},n)}let r=Qc?.[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function bL(e,t,n="en-US"){if(t[e])return t[e];let r=xL(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function xL(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const c1=new Map,f1=new Map;class wL{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let s=this.locale+":"+r,a=c1.get(s);a||(a=new Intl.PluralRules(this.locale,{type:r}),c1.set(s,a));let c=a.select(t);return i=n[c]||n.other,typeof i=="function"?i():i}number(t){let n=f1.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),f1.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const d1=new WeakMap;function SL(e){let t=d1.get(e);return t||(t=new rv(e),d1.set(e,t)),t}function kL(e,t){return t&&rv.getGlobalDictionaryForPackage(t)||SL(e)}function CL(e,t){let{locale:n}=uh(),r=kL(e,t);return k.useMemo(()=>new wL(n,r),[n,r])}function EL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function PL(e,t,n){EL(e,t),t.set(e,n)}const Zt=typeof document<"u"?We.useLayoutEffect:()=>{};function Fn(e){const t=k.useRef(null);return Zt(()=>{t.current=e},[e]),k.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function TL(e){let[t,n]=k.useState(e),r=k.useRef(null),i=Fn(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}t===a.value?i():n(a.value)});Zt(()=>{r.current&&i()});let s=Fn(a=>{r.current=a(t),i()});return[t,s]}let _L=!!(typeof window<"u"&&window.document&&window.document.createElement),cf=new Map,Ep;typeof FinalizationRegistry<"u"&&(Ep=new FinalizationRegistry(e=>{cf.delete(e)}));function vf(e){let[t,n]=k.useState(e),r=k.useRef(null),i=fL(t),s=k.useRef(null);if(Ep&&Ep.register(s,i),_L){const a=cf.get(i);a&&!a.includes(r)?a.push(r):cf.set(i,[r])}return Zt(()=>{let a=i;return()=>{Ep&&Ep.unregister(s),cf.delete(a)}},[i]),k.useEffect(()=>{let a=r.current;return a&&n(a),()=>{a&&(r.current=null)}}),i}function IL(e,t){if(e===t)return e;let n=cf.get(e);if(n)return n.forEach(i=>i.current=t),t;let r=cf.get(t);return r?(r.forEach(i=>i.current=e),e):t}function O0(e=[]){let t=vf(),[n,r]=TL(t),i=k.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return Zt(i,[t,i,...e]),n}function yf(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const At=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Qi=e=>e&&"window"in e&&e.window===e?e:At(e).defaultView||window;function $L(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function AL(e){return $L(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let RL=!1;function iv(){return RL}function ri(e,t){if(!iv())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:AL(n)?n=n.host:n=n.parentNode}return!1}const Dr=(e=document)=>{var t;if(!iv())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function wn(e){return iv()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}class LL{get currentNode(){return this._currentNode}set currentNode(t){if(!ri(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=t,i=t;for(this._currentNode=t;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const a=r,c=this._doc.createTreeWalker(a,this.whatToShow,{acceptNode:this._acceptNode});n.push(c),c.currentNode=i,this._currentSetFor.add(c),r=i=a.host}else r=r.parentNode;const s=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=i,this._currentSetFor.add(s),this._walkerStack=n}get doc(){return this._doc}firstChild(){let t=this.currentNode,n=this.nextNode();return ri(t,n)?(n&&(this.currentNode=n),n):(this.currentNode=t,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(t):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(t)),i===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let s=this.nextNode();return s&&(this.currentNode=s),s}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null;return null}const n=t.previousNode();if(n){if(n.shadowRoot){var r;let s;if(typeof this.filter=="function"?s=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(s=this.filter.acceptNode(n)),s===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let a=this.lastChild();return a&&(this.currentNode=a),a}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(t,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=a=>{if(a.nodeType===Node.ELEMENT_NODE){const d=a.shadowRoot;if(d){const h=this._doc.createTreeWalker(d,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(h),NodeFilter.FILTER_ACCEPT}else{var c;if(typeof this.filter=="function")return this.filter(a);if(!((c=this.filter)===null||c===void 0)&&c.acceptNode)return this.filter.acceptNode(a);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=t,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(t.createTreeWalker(n,r,this._acceptNode));const s=n.shadowRoot;if(s){const a=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(a)}}}function ML(e,t,n,r){return iv()?new LL(e,t,n,r):e.createTreeWalker(t,n,r)}function hE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t=65&&i.charCodeAt(2)<=90?t[i]=yf(s,a):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof a=="string"?t[i]=DL(s,a):i==="id"&&s&&a?t.id=IL(s,a):t[i]=a!==void 0?a:s}}return t}const NL=new Set(["id"]),FL=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),OL=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),zL=/^(data-.*)$/;function _f(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,s={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(NL.has(a)||n&&FL.has(a)||r&&OL.has(a)||i?.has(a)||zL.test(a))&&(s[a]=e[a]);return s}function Ql(e){if(BL())e.focus({preventScroll:!0});else{let t=jL(e);e.focus(),VL(t)}}let Zm=null;function BL(){if(Zm==null){Zm=!1;try{document.createElement("div").focus({get preventScroll(){return Zm=!0,!0}})}catch{}}return Zm}function jL(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function ix(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function el(e){let t=null;return()=>(t==null&&(t=e()),t)}const vu=el(function(){return ix(/^Mac/i)}),UL=el(function(){return ix(/^iPhone/i)}),mE=el(function(){return ix(/^iPad/i)||vu()&&navigator.maxTouchPoints>1}),sv=el(function(){return UL()||mE()}),KL=el(function(){return vu()||sv()}),gE=el(function(){return ov(/AppleWebKit/i)&&!vE()}),vE=el(function(){return ov(/Chrome/i)}),ox=el(function(){return ov(/Android/i)}),WL=el(function(){return ov(/Firefox/i)}),yE=k.createContext({isNative:!0,open:qL,useHref:e=>e});function HL(e){let{children:t,navigate:n,useHref:r}=e,i=k.useMemo(()=>({isNative:!1,open:(s,a,c,d)=>{xE(s,h=>{GL(h,a)?n(c,d):yu(h,a)})},useHref:r||(s=>s)}),[n,r]);return We.createElement(yE.Provider,{value:i},t)}function bE(){return k.useContext(yE)}function GL(e,t){let n=e.getAttribute("target");return(!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function yu(e,t,n=!0){var r,i;let{metaKey:s,ctrlKey:a,altKey:c,shiftKey:d}=t;WL()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(vu()?s=!0:a=!0);let h=gE()&&vu()&&!mE()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:a,altKey:c,shiftKey:d}):new MouseEvent("click",{metaKey:s,ctrlKey:a,altKey:c,shiftKey:d,bubbles:!0,cancelable:!0});yu.isOpening=n,Ql(e),e.dispatchEvent(h),yu.isOpening=!1}yu.isOpening=!1;function xE(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function qL(e,t){xE(e,n=>yu(n,t))}function BH(e){let t=bE();var n;const r=t.useHref((n=e?.href)!==null&&n!==void 0?n:"");return{href:e?.href?r:void 0,target:e?.target,rel:e?.rel,download:e?.download,ping:e?.ping,referrerPolicy:e?.referrerPolicy}}let Hl=new Map,z0=new Set;function p1(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=Hl.get(r.target);i||(i=new Set,Hl.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=Hl.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Hl.delete(r.target)),Hl.size===0)){for(let s of z0)s();z0.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?p1():document.addEventListener("DOMContentLoaded",p1));function YL(){for(const[e]of Hl)"isConnected"in e&&!e.isConnected&&Hl.delete(e)}function wE(e){requestAnimationFrame(()=>{YL(),Hl.size===0?e():z0.add(e)})}function sx(){let e=k.useRef(new Map),t=k.useCallback((i,s,a,c)=>{let d=c?.once?(...h)=>{e.current.delete(a),a(...h)}:a;e.current.set(a,{type:s,eventTarget:i,fn:d,options:c}),i.addEventListener(s,d,c)},[]),n=k.useCallback((i,s,a,c)=>{var d;let h=((d=e.current.get(a))===null||d===void 0?void 0:d.fn)||a;i.removeEventListener(s,h,c),e.current.delete(a)},[]),r=k.useCallback(()=>{e.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return k.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function SE(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=vf(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function h1(e,t){const n=k.useRef(!0),r=k.useRef(null);Zt(()=>(n.current=!0,()=>{n.current=!1}),[]),Zt(()=>{n.current?n.current=!1:(!r.current||t.some((i,s)=>!Object.is(i,r[s])))&&e(),r.current=t},t)}function XL(){return typeof window.ResizeObserver<"u"}function m1(e){const{ref:t,box:n,onResize:r}=e;k.useEffect(()=>{let i=t?.current;if(i)if(XL()){const s=new window.ResizeObserver(a=>{a.length&&r()});return s.observe(i,{box:n}),()=>{i&&s.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,t,n])}function kE(e,t){Zt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Kp(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function CE(e,t){let n=e;for(Kp(n,t)&&(n=n.parentElement);n&&!Kp(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function QL(e,t){const n=[];for(;e&&e!==document.documentElement;)Kp(e,t)&&n.push(e),e=e.parentElement;return n}function eg(e,t,n,r){let i=Fn(n),s=n==null;k.useEffect(()=>{if(s||!e.current)return;let a=e.current;return a.addEventListener(t,i,r),()=>{a.removeEventListener(t,i,r)}},[e,t,r,s,i])}function EE(e,t){let n=g1(e,t,"left"),r=g1(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight,a=e.scrollLeft,c=e.scrollTop,{borderTopWidth:d,borderLeftWidth:h,scrollPaddingTop:m,scrollPaddingRight:g,scrollPaddingBottom:b,scrollPaddingLeft:x}=getComputedStyle(e),S=a+parseInt(h,10),P=c+parseInt(d,10),_=S+e.clientWidth,T=P+e.clientHeight,R=parseInt(m,10)||0,L=parseInt(b,10)||0,B=parseInt(g,10)||0,W=parseInt(x,10)||0;n<=a+W?a=n-parseInt(h,10)-W:n+i>_-B&&(a+=n+i-_+B),r<=P+R?c=r-parseInt(d,10)-R:r+s>T-L&&(c+=r+s-T+L),e.scrollLeft=a,e.scrollTop=c}function g1(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function v1(e,t){if(e&&document.contains(e)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let d=QL(e);for(let h of d)EE(h,e)}else{var n;let{left:d,top:h}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:m,top:g}=e.getBoundingClientRect();if(Math.abs(d-m)>1||Math.abs(h-g)>1){var r,i,s;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(s=e.scrollIntoView)===null||s===void 0||s.call(e,{block:"nearest"})}}}}function PE(e){return e.mozInputSource===0&&e.isTrusted?!0:ox()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function JL(e){return!ox()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function ZL(e,t,n){let r=k.useRef(t),i=Fn(()=>{n&&n(r.current)});k.useEffect(()=>{var s;let a=e==null||(s=e.current)===null||s===void 0?void 0:s.form;return a?.addEventListener("reset",i),()=>{a?.removeEventListener("reset",i)}},[e,i])}const eM="react-aria-clear-focus",tM="react-aria-focus";function up(e){return vu()?e.metaKey:e.ctrlKey}var TE=iE();const _E=tv(TE),lx=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],nM=lx.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";lx.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const rM=lx.join(':not([hidden]):not([tabindex="-1"]),');function IE(e){return e.matches(nM)}function iM(e){return e.matches(rM)}function If(e,t,n){let[r,i]=k.useState(e||t),s=k.useRef(e!==void 0),a=e!==void 0;k.useEffect(()=>{s.current,s.current=a},[a]);let c=a?e:r,d=k.useCallback((h,...m)=>{let g=(b,...x)=>{n&&(Object.is(c,b)||n(b,...x)),a||(c=b)};typeof h=="function"?i((x,...S)=>{let P=h(a?c:x,...S);return g(P,...m),a?x:P}):(a||i(h),g(h,...m))},[a,c,n]);return[c,d]}function Rg(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}let Oy=new Map,B0=!1;try{B0=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Lg=!1;try{Lg=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const $E={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class oM{format(t){let n="";if(!B0&&this.options.signDisplay!=null?n=lM(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Lg){var r;let{unit:i,unitDisplay:s="short",locale:a}=this.resolvedOptions();if(!i)return n;let c=(r=$E[i])===null||r===void 0?void 0:r[s];n+=c[a]||c.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...r.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!B0&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Lg&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=sM(t,n),this.options=n}}function sM(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Lg){var r;let{unit:a,unitDisplay:c="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=$E[a])===null||r===void 0)&&r[c]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${c}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((a,c)=>a[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=e.format(-n),s=e.format(n),a=i.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return e.format(n)}}function aM(e={}){let{locale:t}=uh();return k.useMemo(()=>new oM(t,e),[t,e])}let zy=new Map;function uM(e){let{locale:t}=uh(),n=t+(e?Object.entries(e).sort((i,s)=>i[0]-1&&e.splice(n,1)}const Qs=(e,t,n)=>n>t?t:n{};const cs={},AE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function RE(e){return typeof e=="object"&&e!==null}const LE=e=>/^0[^.\s]+$/u.test(e);function px(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zi=e=>e,cM=(e,t)=>n=>t(e(n)),fh=(...e)=>e.reduce(cM),Hp=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class hx{constructor(){this.subscriptions=[]}add(t){return cx(this.subscriptions,t),()=>fx(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;se*1e3,as=e=>e/1e3;function ME(e,t){return t?e*(1e3/t):0}const DE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,fM=1e-7,dM=12;function pM(e,t,n,r,i){let s,a,c=0;do a=t+(n-t)/2,s=DE(a,r,i)-e,s>0?n=a:t=a;while(Math.abs(s)>fM&&++cpM(s,0,1,e,n);return s=>s===0||s===1?s:DE(i(s),t,r)}const NE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,FE=e=>t=>1-e(1-t),OE=dh(.33,1.53,.69,.99),mx=FE(OE),zE=NE(mx),BE=e=>(e*=2)<1?.5*mx(e):.5*(2-Math.pow(2,-10*(e-1))),gx=e=>1-Math.sin(Math.acos(e)),jE=FE(gx),VE=NE(gx),hM=dh(.42,0,1,1),mM=dh(0,0,.58,1),UE=dh(.42,0,.58,1),gM=e=>Array.isArray(e)&&typeof e[0]!="number",KE=e=>Array.isArray(e)&&typeof e[0]=="number",vM={linear:Zi,easeIn:hM,easeInOut:UE,easeOut:mM,circIn:gx,circInOut:VE,circOut:jE,backIn:mx,backInOut:zE,backOut:OE,anticipate:BE},yM=e=>typeof e=="string",y1=e=>{if(KE(e)){dx(e.length===4);const[t,n,r,i]=e;return dh(t,n,r,i)}else if(yM(e))return vM[e];return e},tg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function bM(e,t){let n=new Set,r=new Set,i=!1,s=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(m){a.has(m)&&(h.schedule(m),e()),m(c)}const h={schedule:(m,g=!1,b=!1)=>{const S=b&&i?n:r;return g&&a.add(m),S.has(m)||S.add(m),m},cancel:m=>{r.delete(m),a.delete(m)},process:m=>{if(c=m,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(d),n.clear(),i=!1,s&&(s=!1,h.process(m))}};return h}const xM=40;function WE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=tg.reduce((L,B)=>(L[B]=bM(s),L),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:m,update:g,preRender:b,render:x,postRender:S}=a,P=()=>{const L=cs.useManualTiming?i.timestamp:performance.now();n=!1,cs.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(L-i.timestamp,xM),1)),i.timestamp=L,i.isProcessing=!0,c.process(i),d.process(i),h.process(i),m.process(i),g.process(i),b.process(i),x.process(i),S.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(P))},_=()=>{n=!0,r=!0,i.isProcessing||e(P)};return{schedule:tg.reduce((L,B)=>{const W=a[B];return L[B]=(M,Z=!1,re=!1)=>(n||_(),W.schedule(M,Z,re)),L},{}),cancel:L=>{for(let B=0;B(xg===void 0&&ii.set(sr.isProcessing||cs.useManualTiming?sr.timestamp:performance.now()),xg),set:e=>{xg=e,queueMicrotask(wM)}},HE=e=>t=>typeof t=="string"&&t.startsWith(e),vx=HE("--"),SM=HE("var(--"),yx=e=>SM(e)?kM.test(e.split("/*")[0].trim()):!1,kM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$f={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gp={...$f,transform:e=>Qs(0,1,e)},ng={...$f,default:1},Ap=e=>Math.round(e*1e5)/1e5,bx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function CM(e){return e==null}const EM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xx=(e,t)=>n=>!!(typeof n=="string"&&EM.test(n)&&n.startsWith(e)||t&&!CM(n)&&Object.prototype.hasOwnProperty.call(n,t)),GE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,a,c]=r.match(bx);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},PM=e=>Qs(0,255,e),jy={...$f,transform:e=>Math.round(PM(e))},fu={test:xx("rgb","red"),parse:GE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jy.transform(e)+", "+jy.transform(t)+", "+jy.transform(n)+", "+Ap(Gp.transform(r))+")"};function TM(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const j0={test:xx("#"),parse:TM,transform:fu.transform},ph=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wl=ph("deg"),us=ph("%"),et=ph("px"),_M=ph("vh"),IM=ph("vw"),b1={...us,parse:e=>us.parse(e)/100,transform:e=>us.transform(e*100)},rf={test:xx("hsl","hue"),parse:GE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+us.transform(Ap(t))+", "+us.transform(Ap(n))+", "+Ap(Gp.transform(r))+")"},Tn={test:e=>fu.test(e)||j0.test(e)||rf.test(e),parse:e=>fu.test(e)?fu.parse(e):rf.test(e)?rf.parse(e):j0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fu.transform(e):rf.transform(e),getAnimatableNone:e=>{const t=Tn.parse(e);return t.alpha=0,Tn.transform(t)}},$M=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function AM(e){return isNaN(e)&&typeof e=="string"&&(e.match(bx)?.length||0)+(e.match($M)?.length||0)>0}const qE="number",YE="color",RM="var",LM="var(",x1="${}",MM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function qp(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const c=t.replace(MM,d=>(Tn.test(d)?(r.color.push(s),i.push(YE),n.push(Tn.parse(d))):d.startsWith(LM)?(r.var.push(s),i.push(RM),n.push(d)):(r.number.push(s),i.push(qE),n.push(parseFloat(d))),++s,x1)).split(x1);return{values:n,split:c,indexes:r,types:i}}function XE(e){return qp(e).values}function QE(e){const{split:t,types:n}=qp(e),r=t.length;return i=>{let s="";for(let a=0;atypeof e=="number"?0:Tn.test(e)?Tn.getAnimatableNone(e):e;function NM(e){const t=XE(e);return QE(e)(t.map(DM))}const Zl={test:AM,parse:XE,createTransformer:QE,getAnimatableNone:NM};function Vy(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function FM({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,a=0;if(!t)i=s=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,d=2*n-c;i=Vy(d,c,e+1/3),s=Vy(d,c,e),a=Vy(d,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function Mg(e,t){return n=>n>0?t:e}const sn=(e,t,n)=>e+(t-e)*n,Uy=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},OM=[j0,fu,rf],zM=e=>OM.find(t=>t.test(e));function w1(e){const t=zM(e);if(!t)return!1;let n=t.parse(e);return t===rf&&(n=FM(n)),n}const S1=(e,t)=>{const n=w1(e),r=w1(t);if(!n||!r)return Mg(e,t);const i={...n};return s=>(i.red=Uy(n.red,r.red,s),i.green=Uy(n.green,r.green,s),i.blue=Uy(n.blue,r.blue,s),i.alpha=sn(n.alpha,r.alpha,s),fu.transform(i))},V0=new Set(["none","hidden"]);function BM(e,t){return V0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function jM(e,t){return n=>sn(e,t,n)}function wx(e){return typeof e=="number"?jM:typeof e=="string"?yx(e)?Mg:Tn.test(e)?S1:KM:Array.isArray(e)?JE:typeof e=="object"?Tn.test(e)?S1:VM:Mg}function JE(e,t){const n=[...e],r=n.length,i=e.map((s,a)=>wx(s)(s,t[a]));return s=>{for(let a=0;a{for(const s in r)n[s]=r[s](i);return n}}function UM(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=Zl.createTransformer(t),r=qp(e),i=qp(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?V0.has(e)&&!i.values.length||V0.has(t)&&!r.values.length?BM(e,t):fh(JE(UM(r,i),i.values),n):Mg(e,t)};function ZE(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?sn(e,t,n):wx(e)(e,t)}const WM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Yt.update(t,n),stop:()=>Jl(t),now:()=>sr.isProcessing?sr.timestamp:ii.now()}},eP=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s=Dg?1/0:t}function HM(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Sx(r),Dg);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:as(i)}}const GM=5;function tP(e,t,n){const r=Math.max(t-GM,0);return ME(n-e(r),t-r)}const dn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ky=.001;function qM({duration:e=dn.duration,bounce:t=dn.bounce,velocity:n=dn.velocity,mass:r=dn.mass}){let i,s,a=1-t;a=Qs(dn.minDamping,dn.maxDamping,a),e=Qs(dn.minDuration,dn.maxDuration,as(e)),a<1?(i=h=>{const m=h*a,g=m*e,b=m-n,x=U0(h,a),S=Math.exp(-g);return Ky-b/x*S},s=h=>{const g=h*a*e,b=g*n+n,x=Math.pow(a,2)*Math.pow(h,2)*e,S=Math.exp(-g),P=U0(Math.pow(h,2),a);return(-i(h)+Ky>0?-1:1)*((b-x)*S)/P}):(i=h=>{const m=Math.exp(-h*e),g=(h-n)*e+1;return-Ky+m*g},s=h=>{const m=Math.exp(-h*e),g=(n-h)*(e*e);return m*g});const c=5/e,d=XM(i,s,c);if(e=ls(e),isNaN(d))return{stiffness:dn.stiffness,damping:dn.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:a*2*Math.sqrt(r*h),duration:e}}}const YM=12;function XM(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function ZM(e){let t={velocity:dn.velocity,stiffness:dn.stiffness,damping:dn.damping,mass:dn.mass,isResolvedFromDuration:!1,...e};if(!k1(e,JM)&&k1(e,QM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Qs(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:dn.mass,stiffness:i,damping:s}}else{const n=qM(e);t={...t,...n,mass:dn.mass},t.isResolvedFromDuration=!0}return t}function Ng(e=dn.visualDuration,t=dn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:d,damping:h,mass:m,duration:g,velocity:b,isResolvedFromDuration:x}=ZM({...n,velocity:-as(n.velocity||0)}),S=b||0,P=h/(2*Math.sqrt(d*m)),_=a-s,T=as(Math.sqrt(d/m)),R=Math.abs(_)<5;r||(r=R?dn.restSpeed.granular:dn.restSpeed.default),i||(i=R?dn.restDelta.granular:dn.restDelta.default);let L;if(P<1){const W=U0(T,P);L=M=>{const Z=Math.exp(-P*T*M);return a-Z*((S+P*T*_)/W*Math.sin(W*M)+_*Math.cos(W*M))}}else if(P===1)L=W=>a-Math.exp(-T*W)*(_+(S+T*_)*W);else{const W=T*Math.sqrt(P*P-1);L=M=>{const Z=Math.exp(-P*T*M),re=Math.min(W*M,300);return a-Z*((S+P*T*_)*Math.sinh(re)+W*_*Math.cosh(re))/W}}const B={calculatedDuration:x&&g||null,next:W=>{const M=L(W);if(x)c.done=W>=g;else{let Z=W===0?S:0;P<1&&(Z=W===0?ls(S):tP(L,W,M));const re=Math.abs(Z)<=r,ae=Math.abs(a-M)<=i;c.done=re&&ae}return c.value=c.done?a:M,c},toString:()=>{const W=Math.min(Sx(B),Dg),M=eP(Z=>B.next(W*Z).value,W,30);return W+"ms "+M},toTransition:()=>{}};return B}Ng.applyToOptions=e=>{const t=HM(e,100,Ng);return e.ease=t.ease,e.duration=ls(t.duration),e.type="keyframes",e};function K0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:d,restDelta:h=.5,restSpeed:m}){const g=e[0],b={done:!1,value:g},x=re=>c!==void 0&&red,S=re=>c===void 0?d:d===void 0||Math.abs(c-re)-P*Math.exp(-re/r),L=re=>T+R(re),B=re=>{const ae=R(re),O=L(re);b.done=Math.abs(ae)<=h,b.value=b.done?T:O};let W,M;const Z=re=>{x(b.value)&&(W=re,M=Ng({keyframes:[b.value,S(b.value)],velocity:tP(L,re,b.value),damping:i,stiffness:s,restDelta:h,restSpeed:m}))};return Z(0),{calculatedDuration:null,next:re=>{let ae=!1;return!M&&W===void 0&&(ae=!0,B(re),Z(re)),W!==void 0&&re>=W?M.next(re-W):(!ae&&B(re),b)}}}function eD(e,t,n){const r=[],i=n||cs.mix||ZE,s=e.length-1;for(let a=0;at[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=eD(t,r,i),d=c.length,h=m=>{if(a&&m1)for(;gh(Qs(e[0],e[s-1],m)):h}function nD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Hp(0,t,r);e.push(sn(n,1,i))}}function rD(e){const t=[0];return nD(t,e.length-1),t}function iD(e,t){return e.map(n=>n*t)}function oD(e,t){return e.map(()=>t||UE).splice(0,e.length-1)}function Rp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=gM(r)?r.map(y1):y1(r),s={done:!1,value:t[0]},a=iD(n&&n.length===t.length?n:rD(t),e),c=tD(a,t,{ease:Array.isArray(i)?i:oD(t,i)});return{calculatedDuration:e,next:d=>(s.value=c(d),s.done=d>=e,s)}}const sD=e=>e!==null;function kx(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(sD),c=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!c||r===void 0?s[c]:r}const lD={decay:K0,inertia:K0,tween:Rp,keyframes:Rp,spring:Ng};function nP(e){typeof e.type=="string"&&(e.type=lD[e.type])}class Cx{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const aD=e=>e/100;class Ex extends Cx{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==ii.now()&&this.tick(ii.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;nP(t);const{type:n=Rp,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:a=0}=t;let{keyframes:c}=t;const d=n||Rp;d!==Rp&&typeof c[0]!="number"&&(this.mixKeyframes=fh(aD,ZE(c[0],c[1])),c=[0,100]);const h=d({...t,keyframes:c});s==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...c].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=Sx(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:m,repeat:g,repeatType:b,repeatDelay:x,type:S,onUpdate:P,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-h*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?T<0:T>i;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let L=this.currentTime,B=r;if(g){const re=Math.min(this.currentTime,i)/c;let ae=Math.floor(re),O=re%1;!O&&re>=1&&(O=1),O===1&&ae--,ae=Math.min(ae,g+1),!!(ae%2)&&(b==="reverse"?(O=1-O,x&&(O-=x/c)):b==="mirror"&&(B=a)),L=Qs(0,1,O)*c}const W=R?{done:!1,value:m[0]}:B.next(L);s&&(W.value=s(W.value));let{done:M}=W;!R&&d!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const Z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return Z&&S!==K0&&(W.value=kx(m,this.options,_,this.speed)),P&&P(W.value),Z&&this.finish(),W}then(t,n){return this.finished.then(t,n)}get duration(){return as(this.calculatedDuration)}get time(){return as(this.currentTime)}set time(t){t=ls(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ii.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=as(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=WM,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ii.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function uD(e){for(let t=1;te*180/Math.PI,W0=e=>{const t=du(Math.atan2(e[1],e[0]));return H0(t)},cD={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:W0,rotateZ:W0,skewX:e=>du(Math.atan(e[1])),skewY:e=>du(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},H0=e=>(e=e%360,e<0&&(e+=360),e),C1=W0,E1=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),P1=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fD={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:E1,scaleY:P1,scale:e=>(E1(e)+P1(e))/2,rotateX:e=>H0(du(Math.atan2(e[6],e[5]))),rotateY:e=>H0(du(Math.atan2(-e[2],e[0]))),rotateZ:C1,rotate:C1,skewX:e=>du(Math.atan(e[4])),skewY:e=>du(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function G0(e){return e.includes("scale")?1:0}function q0(e,t){if(!e||e==="none")return G0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=fD,i=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=cD,i=c}if(!i)return G0(t);const s=r[t],a=i[1].split(",").map(pD);return typeof s=="function"?s(a):a[s]}const dD=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return q0(n,t)};function pD(e){return parseFloat(e.trim())}const Af=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cu=new Set(Af),T1=e=>e===$f||e===et,hD=new Set(["x","y","z"]),mD=Af.filter(e=>!hD.has(e));function gD(e){const t=[];return mD.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mu={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>q0(t,"x"),y:(e,{transform:t})=>q0(t,"y")};mu.translateX=mu.x;mu.translateY=mu.y;const gu=new Set;let Y0=!1,X0=!1,Q0=!1;function rP(){if(X0){const e=Array.from(gu).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=gD(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,a])=>{r.getValue(s)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}X0=!1,Y0=!1,gu.forEach(e=>e.complete(Q0)),gu.clear()}function iP(){gu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(X0=!0)})}function vD(){Q0=!0,iP(),rP(),Q0=!1}class Px{constructor(t,n,r,i,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(gu.add(this),Y0||(Y0=!0,Yt.read(iP),Yt.resolveKeyframes(rP))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i?.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),i&&s===void 0&&i.set(t[0])}uD(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),gu.delete(this)}cancel(){this.state==="scheduled"&&(gu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const yD=e=>e.startsWith("--");function bD(e,t,n){yD(t)?e.style.setProperty(t,n):e.style[t]=n}const xD=px(()=>window.ScrollTimeline!==void 0),wD={};function SD(e,t){const n=px(e);return()=>wD[t]??n()}const oP=SD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,_1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pp([0,.65,.55,1]),circOut:Pp([.55,0,1,.45]),backIn:Pp([.31,.01,.66,-.59]),backOut:Pp([.33,1.53,.69,.99])};function sP(e,t){if(e)return typeof e=="function"?oP()?eP(e,t):"ease-out":KE(e)?Pp(e):Array.isArray(e)?e.map(n=>sP(n,t)||_1.easeOut):_1[e]}function kD(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:a="loop",ease:c="easeOut",times:d}={},h=void 0){const m={[t]:n};d&&(m.offset=d);const g=sP(c,i);Array.isArray(g)&&(m.easing=g);const b={delay:r,duration:i,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return h&&(b.pseudoElement=h),e.animate(m,b)}function lP(e){return typeof e=="function"&&"applyToOptions"in e}function CD({type:e,...t}){return lP(e)&&oP()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ED extends Cx{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:c,onComplete:d}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,dx(typeof t.type!="string");const h=CD(t);this.animation=kD(n,r,i,h,s),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=kx(i,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(m):bD(n,r,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return as(Number(t))}get time(){return as(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ls(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&xD()?(this.animation.timeline=t,Zi):n(this)}}const aP={anticipate:BE,backInOut:zE,circInOut:VE};function PD(e){return e in aP}function TD(e){typeof e.ease=="string"&&PD(e.ease)&&(e.ease=aP[e.ease])}const I1=10;class _D extends ED{constructor(t){TD(t),nP(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Ex({...a,autoplay:!1}),d=ls(this.finishedTime??this.time);n.setWithVelocity(c.sample(d-I1).value,c.sample(d).value,I1),c.stop()}}const $1=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Zl.test(e)||e==="0")&&!e.startsWith("url("));function ID(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function LD(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return RD()&&n&&AD.has(n)&&(n!=="transform"||!h)&&!d&&!r&&i!=="mirror"&&s!==0&&a!=="inertia"}const MD=40;class DD extends Cx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",keyframes:c,name:d,motionValue:h,element:m,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ii.now();const b={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:a,name:d,motionValue:h,element:m,...g},x=m?.KeyframeResolver||Px;this.keyframeResolver=new x(c,(S,P,_)=>this.onKeyframesResolved(S,P,b,!_),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:a,velocity:c,delay:d,isHandoff:h,onUpdate:m}=r;this.resolvedAt=ii.now(),$D(t,s,a,c)||((cs.instantAnimations||!d)&&m?.(kx(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const b={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>MD?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=!h&&LD(b)?new _D({...b,element:b.motionValue.owner.current}):new Ex(b);x.finished.then(()=>this.notifyFinished()).catch(Zi),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),vD()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const ND=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function FD(e){const t=ND.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function uP(e,t,n=1){const[r,i]=FD(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return AE(a)?parseFloat(a):a}return yx(i)?uP(i,t,n+1):i}function Tx(e,t){return e?.[t]??e?.default??e}const cP=new Set(["width","height","top","left","right","bottom",...Af]),OD={test:e=>e==="auto",parse:e=>e},fP=e=>t=>t.test(e),dP=[$f,et,us,Wl,IM,_M,OD],A1=e=>dP.find(fP(e));function zD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||LE(e):!0}const BD=new Set(["brightness","contrast","saturate","opacity"]);function jD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(bx)||[];if(!r)return e;const i=n.replace(r,"");let s=BD.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const VD=/\b([a-z-]*)\(.*?\)/gu,J0={...Zl,getAnimatableNone:e=>{const t=e.match(VD);return t?t.map(jD).join(" "):e}},R1={...$f,transform:Math.round},UD={rotate:Wl,rotateX:Wl,rotateY:Wl,rotateZ:Wl,scale:ng,scaleX:ng,scaleY:ng,scaleZ:ng,skew:Wl,skewX:Wl,skewY:Wl,distance:et,translateX:et,translateY:et,translateZ:et,x:et,y:et,z:et,perspective:et,transformPerspective:et,opacity:Gp,originX:b1,originY:b1,originZ:et},_x={borderWidth:et,borderTopWidth:et,borderRightWidth:et,borderBottomWidth:et,borderLeftWidth:et,borderRadius:et,radius:et,borderTopLeftRadius:et,borderTopRightRadius:et,borderBottomRightRadius:et,borderBottomLeftRadius:et,width:et,maxWidth:et,height:et,maxHeight:et,top:et,right:et,bottom:et,left:et,padding:et,paddingTop:et,paddingRight:et,paddingBottom:et,paddingLeft:et,margin:et,marginTop:et,marginRight:et,marginBottom:et,marginLeft:et,backgroundPositionX:et,backgroundPositionY:et,...UD,zIndex:R1,fillOpacity:Gp,strokeOpacity:Gp,numOctaves:R1},KD={..._x,color:Tn,backgroundColor:Tn,outlineColor:Tn,fill:Tn,stroke:Tn,borderColor:Tn,borderTopColor:Tn,borderRightColor:Tn,borderBottomColor:Tn,borderLeftColor:Tn,filter:J0,WebkitFilter:J0},pP=e=>KD[e];function hP(e,t){let n=pP(e);return n!==J0&&(n=Zl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const WD=new Set(["auto","none","0"]);function HD(e,t,n){let r=0,i;for(;r{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const qD=new Set(["opacity","clipPath","filter","transform"]);function YD(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const mP=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function gP(e){return RE(e)&&"offsetHeight"in e}const L1=30,XD=e=>!isNaN(parseFloat(e));class vP{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=ii.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty();i&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ii.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=XD(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new hx);const r=this.events[t].add(n);return t==="change"?()=>{r(),Yt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ii.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>L1)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,L1);return ME(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bf(e,t){return new vP(e,t)}const{schedule:Ix}=WE(queueMicrotask,!1),ko={x:!1,y:!1};function yP(){return ko.x||ko.y}function QD(e){return e==="x"||e==="y"?ko[e]?null:(ko[e]=!0,()=>{ko[e]=!1}):ko.x||ko.y?null:(ko.x=ko.y=!0,()=>{ko.x=ko.y=!1})}function bP(e,t){const n=YD(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function M1(e){return!(e.pointerType==="touch"||yP())}function JD(e,t,n={}){const[r,i,s]=bP(e,n),a=c=>{if(!M1(c))return;const{target:d}=c,h=t(d,c);if(typeof h!="function"||!d)return;const m=g=>{M1(g)&&(h(g),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,i)};return r.forEach(c=>{c.addEventListener("pointerenter",a,i)}),s}const xP=(e,t)=>t?e===t?!0:xP(e,t.parentElement):!1,$x=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ZD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function e3(e){return ZD.has(e.tagName)||e.tabIndex!==-1}const wg=new WeakSet;function D1(e){return t=>{t.key==="Enter"&&e(t)}}function Wy(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const t3=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=D1(()=>{if(wg.has(n))return;Wy(n,"down");const i=D1(()=>{Wy(n,"up")}),s=()=>Wy(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function N1(e){return $x(e)&&!yP()}function n3(e,t,n={}){const[r,i,s]=bP(e,n),a=c=>{const d=c.currentTarget;if(!N1(c))return;wg.add(d);const h=t(d,c),m=(x,S)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",b),wg.has(d)&&wg.delete(d),N1(x)&&typeof h=="function"&&h(x,{success:S})},g=x=>{m(x,d===window||d===document||n.useGlobalTarget||xP(d,x.target))},b=x=>{m(x,!1)};window.addEventListener("pointerup",g,i),window.addEventListener("pointercancel",b,i)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,i),gP(c)&&(c.addEventListener("focus",h=>t3(h,i)),!e3(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function wP(e){return RE(e)&&"ownerSVGElement"in e}function r3(e){return wP(e)&&e.tagName==="svg"}const yr=e=>!!(e&&e.getVelocity),i3=[...dP,Tn,Zl],o3=e=>i3.find(fP(e)),Yp=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class s3 extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=gP(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function l3({children:e,isPresent:t,anchorX:n,root:r}){const i=k.useId(),s=k.useRef(null),a=k.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=k.useContext(Yp);return k.useInsertionEffect(()=>{const{width:d,height:h,top:m,left:g,right:b}=a.current;if(t||!s.current||!d||!h)return;const x=n==="left"?`left: ${g}`:`right: ${b}`;s.current.dataset.motionPopId=i;const S=document.createElement("style");c&&(S.nonce=c);const P=r??document.head;return P.appendChild(S),S.sheet&&S.sheet.insertRule(` +`+C.stack}return{value:o,source:l,stack:w,digest:null}}function kc(o,l,p){return{value:o,source:null,stack:p??null,digest:l??null}}function Nl(o,l){try{console.error(l.value)}catch(p){setTimeout(function(){throw p})}}var Sm=typeof WeakMap=="function"?WeakMap:Map;function Oa(o,l,p){p=po(-1,p),p.tag=3,p.payload={element:null};var v=l.value;return p.callback=function(){Mc||(Mc=!0,Yd=v),Nl(o,l)},p}function Cc(o,l,p){p=po(-1,p),p.tag=3;var v=o.type.getDerivedStateFromError;if(typeof v=="function"){var w=l.value;p.payload=function(){return v(w)},p.callback=function(){Nl(o,l)}}var C=o.stateNode;return C!==null&&typeof C.componentDidCatch=="function"&&(p.callback=function(){Nl(o,l),typeof v!="function"&&(Jo===null?Jo=new Set([this]):Jo.add(this));var $=l.stack;this.componentDidCatch(l.value,{componentStack:$!==null?$:""})}),p}function za(o,l,p){var v=o.pingCache;if(v===null){v=o.pingCache=new Sm;var w=new Set;v.set(l,w)}else w=v.get(l),w===void 0&&(w=new Set,v.set(l,w));w.has(p)||(w.add(p),o=uy.bind(null,o,l,p),l.then(o,o))}function km(o){do{var l;if((l=o.tag===13)&&(l=o.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return o;o=o.return}while(o!==null);return null}function Md(o,l,p,v,w){return(o.mode&1)===0?(o===l?o.flags|=65536:(o.flags|=128,p.flags|=131072,p.flags&=-52805,p.tag===1&&(p.alternate===null?p.tag=17:(l=po(-1,1),l.tag=2,Wr(p,l,1))),p.lanes|=1),o):(o.flags|=65536,o.lanes=w,o)}var Ec=B.ReactCurrentOwner,tr=!1;function Ln(o,l,p,v){l.child=o===null?lc(l,null,p,v):Jt(l,o.child,p,v)}function Cm(o,l,p,v,w){p=p.render;var C=l.ref;return Ho(l,w),v=Ls(o,l,p,v,C,w),p=hc(),o!==null&&!tr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~w,fi(o,l,w)):(Ft&&p&&Ta(l),l.flags|=1,Ln(o,l,v,w),l.child)}function Dd(o,l,p,v,w){if(o===null){var C=p.type;return typeof C=="function"&&!Bc(C)&&C.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(l.tag=15,l.type=C,ji(o,l,C,v,w)):(o=jc(p.type,null,v,l,l.mode,w),o.ref=l.ref,o.return=l,l.child=o)}if(C=o.child,(o.lanes&w)===0){var $=C.memoizedProps;if(p=p.compare,p=p!==null?p:$e,p($,v)&&o.ref===l.ref)return fi(o,l,w)}return l.flags|=1,o=gi(C,v),o.ref=l.ref,o.return=l,l.child=o}function ji(o,l,p,v,w){if(o!==null){var C=o.memoizedProps;if($e(C,v)&&o.ref===l.ref)if(tr=!1,l.pendingProps=v=C,(o.lanes&w)!==0)(o.flags&131072)!==0&&(tr=!0);else return l.lanes=o.lanes,fi(o,l,w)}return Od(o,l,p,v,w)}function Nd(o,l,p){var v=l.pendingProps,w=v.children,C=o!==null?o.memoizedState:null;if(v.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},$t(Bl,_r),_r|=p;else{if((p&1073741824)===0)return o=C!==null?C.baseLanes|p:p,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:o,cachePool:null,transitions:null},l.updateQueue=null,$t(Bl,_r),_r|=o,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},v=C!==null?C.baseLanes:p,$t(Bl,_r),_r|=v}else C!==null?(v=C.baseLanes|p,l.memoizedState=null):v=p,$t(Bl,_r),_r|=v;return Ln(o,l,w,p),l.child}function Fd(o,l){var p=l.ref;(o===null&&p!==null||o!==null&&o.ref!==p)&&(l.flags|=512,l.flags|=2097152)}function Od(o,l,p,v,w){var C=pr(p)?Zn:jn.current;return C=El(l,C),Ho(l,w),p=Ls(o,l,p,v,C,w),v=hc(),o!==null&&!tr?(l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~w,fi(o,l,w)):(Ft&&v&&Ta(l),l.flags|=1,Ln(o,l,p,w),l.child)}function zd(o,l,p,v,w){if(pr(p)){var C=!0;Br(l)}else C=!1;if(Ho(l,w),l.stateNode===null)Tc(o,l),Ms(l,p,v),Ld(l,p,v,w),v=!0;else if(o===null){var $=l.stateNode,V=l.memoizedProps;$.props=V;var Y=$.context,de=p.contextType;typeof de=="object"&&de!==null?de=Ur(de):(de=pr(p)?Zn:jn.current,de=El(l,de));var be=p.getDerivedStateFromProps,Se=typeof be=="function"||typeof $.getSnapshotBeforeUpdate=="function";Se||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(V!==v||Y!==de)&&Dl(l,$,v,de),Kr=!1;var ye=l.memoizedState;$.state=ye,_l(l,v,$,w),Y=l.memoizedState,V!==v||ye!==Y||dr.current||Kr?(typeof be=="function"&&(wc(l,p,be,v),Y=l.memoizedState),(V=Kr||Rd(l,p,V,v,ye,Y,de))?(Se||typeof $.UNSAFE_componentWillMount!="function"&&typeof $.componentWillMount!="function"||(typeof $.componentWillMount=="function"&&$.componentWillMount(),typeof $.UNSAFE_componentWillMount=="function"&&$.UNSAFE_componentWillMount()),typeof $.componentDidMount=="function"&&(l.flags|=4194308)):(typeof $.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=v,l.memoizedState=Y),$.props=v,$.state=Y,$.context=de,v=V):(typeof $.componentDidMount=="function"&&(l.flags|=4194308),v=!1)}else{$=l.stateNode,hm(o,l),V=l.memoizedProps,de=l.type===l.elementType?V:Gr(l.type,V),$.props=de,Se=l.pendingProps,ye=$.context,Y=p.contextType,typeof Y=="object"&&Y!==null?Y=Ur(Y):(Y=pr(p)?Zn:jn.current,Y=El(l,Y));var Ae=p.getDerivedStateFromProps;(be=typeof Ae=="function"||typeof $.getSnapshotBeforeUpdate=="function")||typeof $.UNSAFE_componentWillReceiveProps!="function"&&typeof $.componentWillReceiveProps!="function"||(V!==Se||ye!==Y)&&Dl(l,$,v,Y),Kr=!1,ye=l.memoizedState,$.state=ye,_l(l,v,$,w);var Le=l.memoizedState;V!==Se||ye!==Le||dr.current||Kr?(typeof Ae=="function"&&(wc(l,p,Ae,v),Le=l.memoizedState),(de=Kr||Rd(l,p,de,v,ye,Le,Y)||!1)?(be||typeof $.UNSAFE_componentWillUpdate!="function"&&typeof $.componentWillUpdate!="function"||(typeof $.componentWillUpdate=="function"&&$.componentWillUpdate(v,Le,Y),typeof $.UNSAFE_componentWillUpdate=="function"&&$.UNSAFE_componentWillUpdate(v,Le,Y)),typeof $.componentDidUpdate=="function"&&(l.flags|=4),typeof $.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof $.componentDidUpdate!="function"||V===o.memoizedProps&&ye===o.memoizedState||(l.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||V===o.memoizedProps&&ye===o.memoizedState||(l.flags|=1024),l.memoizedProps=v,l.memoizedState=Le),$.props=v,$.state=Le,$.context=Y,v=de):(typeof $.componentDidUpdate!="function"||V===o.memoizedProps&&ye===o.memoizedState||(l.flags|=4),typeof $.getSnapshotBeforeUpdate!="function"||V===o.memoizedProps&&ye===o.memoizedState||(l.flags|=1024),v=!1)}return Bd(o,l,p,v,C,w)}function Bd(o,l,p,v,w,C){Fd(o,l);var $=(l.flags&128)!==0;if(!v&&!$)return w&&am(l,p,!1),fi(o,l,C);v=l.stateNode,Ec.current=l;var V=$&&typeof p.getDerivedStateFromError!="function"?null:v.render();return l.flags|=1,o!==null&&$?(l.child=Jt(l,o.child,null,C),l.child=Jt(l,null,V,C)):Ln(o,l,V,C),l.memoizedState=v.state,w&&am(l,p,!0),l.child}function Em(o){var l=o.stateNode;l.pendingContext?sm(o,l.pendingContext,l.pendingContext!==l.context):l.context&&sm(o,l.context,!1),bd(o,l.containerInfo)}function Vi(o,l,p,v,w){return Ni(),Fi(w),l.flags|=256,Ln(o,l,p,v),l.child}var Ba={dehydrated:null,treeContext:null,retryLane:0};function ja(o){return{baseLanes:o,cachePool:null,transitions:null}}function Pc(o,l,p){var v=l.pendingProps,w=Vt.current,C=!1,$=(l.flags&128)!==0,V;if((V=$)||(V=o!==null&&o.memoizedState===null?!1:(w&2)!==0),V?(C=!0,l.flags&=-129):(o===null||o.memoizedState!==null)&&(w|=1),$t(Vt,w&1),o===null)return hr(l),o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((l.mode&1)===0?l.lanes=1:o.data==="$!"?l.lanes=8:l.lanes=1073741824,null):($=v.children,o=v.fallback,C?(v=l.mode,C=l.child,$={mode:"hidden",children:$},(v&1)===0&&C!==null?(C.childLanes=0,C.pendingProps=$):C=Vc($,v,0,null),o=Bs(o,v,p,null),C.return=l,o.return=l,C.sibling=o,l.child=C,l.child.memoizedState=ja(p),l.memoizedState=Ba,o):Fl(l,$));if(w=o.memoizedState,w!==null&&(V=w.dehydrated,V!==null))return Ge(o,l,$,v,V,w,p);if(C){C=v.fallback,$=l.mode,w=o.child,V=w.sibling;var Y={mode:"hidden",children:v.children};return($&1)===0&&l.child!==w?(v=l.child,v.childLanes=0,v.pendingProps=Y,l.deletions=null):(v=gi(w,Y),v.subtreeFlags=w.subtreeFlags&14680064),V!==null?C=gi(V,C):(C=Bs(C,$,p,null),C.flags|=2),C.return=l,v.return=l,v.sibling=C,l.child=v,v=C,C=l.child,$=o.child.memoizedState,$=$===null?ja(p):{baseLanes:$.baseLanes|p,cachePool:null,transitions:$.transitions},C.memoizedState=$,C.childLanes=o.childLanes&~p,l.memoizedState=Ba,v}return C=o.child,o=C.sibling,v=gi(C,{mode:"visible",children:v.children}),(l.mode&1)===0&&(v.lanes=p),v.return=l,v.sibling=null,o!==null&&(p=l.deletions,p===null?(l.deletions=[o],l.flags|=16):p.push(o)),l.child=v,l.memoizedState=null,v}function Fl(o,l){return l=Vc({mode:"visible",children:l},o.mode,0,null),l.return=o,o.child=l}function vo(o,l,p,v){return v!==null&&Fi(v),Jt(l,o.child,null,p),o=Fl(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function Ge(o,l,p,v,w,C,$){if(p)return l.flags&256?(l.flags&=-257,v=kc(Error(n(422))),vo(o,l,$,v)):l.memoizedState!==null?(l.child=o.child,l.flags|=128,null):(C=v.fallback,w=l.mode,v=Vc({mode:"visible",children:v.children},w,0,null),C=Bs(C,w,$,null),C.flags|=2,v.return=l,C.return=l,v.sibling=C,l.child=v,(l.mode&1)!==0&&Jt(l,o.child,null,$),l.child.memoizedState=ja($),l.memoizedState=Ba,C);if((l.mode&1)===0)return vo(o,l,$,null);if(w.data==="$!"){if(v=w.nextSibling&&w.nextSibling.dataset,v)var V=v.dgst;return v=V,C=Error(n(419)),v=kc(C,v,void 0),vo(o,l,$,v)}if(V=($&o.childLanes)!==0,tr||V){if(v=Cn,v!==null){switch($&-$){case 4:w=2;break;case 16:w=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(v.suspendedLanes|$))!==0?0:w,w!==0&&w!==C.retryLane&&(C.retryLane=w,fo(o,w),mi(v,o,w,-1))}return tp(),v=kc(Error(n(421))),vo(o,l,$,v)}return w.data==="$?"?(l.flags|=128,l.child=o.child,l=cy.bind(null,o),w._reactRetry=l,null):(o=C.treeContext,Er=jo(w.nextSibling),Un=l,Ft=!0,ui=null,o!==null&&(jr[Vr++]=Li,jr[Vr++]=Mi,jr[Vr++]=Ps,Li=o.id,Mi=o.overflow,Ps=l),l=Fl(l,v.children),l.flags|=4096,l)}function Va(o,l,p){o.lanes|=l;var v=o.alternate;v!==null&&(v.lanes|=l),Rn(o.return,l,p)}function Ua(o,l,p,v,w){var C=o.memoizedState;C===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:v,tail:p,tailMode:w}:(C.isBackwards=l,C.rendering=null,C.renderingStartTime=0,C.last=v,C.tail=p,C.tailMode=w)}function Yo(o,l,p){var v=l.pendingProps,w=v.revealOrder,C=v.tail;if(Ln(o,l,v.children,p),v=Vt.current,(v&2)!==0)v=v&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Va(o,p,l);else if(o.tag===19)Va(o,p,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}v&=1}if($t(Vt,v),(l.mode&1)===0)l.memoizedState=null;else switch(w){case"forwards":for(p=l.child,w=null;p!==null;)o=p.alternate,o!==null&&As(o)===null&&(w=p),p=p.sibling;p=w,p===null?(w=l.child,l.child=null):(w=p.sibling,p.sibling=null),Ua(l,!1,w,p,C);break;case"backwards":for(p=null,w=l.child,l.child=null;w!==null;){if(o=w.alternate,o!==null&&As(o)===null){l.child=w;break}o=w.sibling,w.sibling=p,p=w,w=o}Ua(l,!0,p,null,C);break;case"together":Ua(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Tc(o,l){(l.mode&1)===0&&o!==null&&(o.alternate=null,l.alternate=null,l.flags|=2)}function fi(o,l,p){if(o!==null&&(l.dependencies=o.dependencies),Qo|=l.lanes,(p&l.childLanes)===0)return null;if(o!==null&&l.child!==o.child)throw Error(n(153));if(l.child!==null){for(o=l.child,p=gi(o,o.pendingProps),l.child=p,p.return=l;o.sibling!==null;)o=o.sibling,p=p.sibling=gi(o,o.pendingProps),p.return=l;p.sibling=null}return l.child}function Pm(o,l,p){switch(l.tag){case 3:Em(l),Ni();break;case 5:xd(l);break;case 1:pr(l.type)&&Br(l);break;case 4:bd(l,l.stateNode.containerInfo);break;case 10:var v=l.type._context,w=l.memoizedProps.value;$t($a,v._currentValue),v._currentValue=w;break;case 13:if(v=l.memoizedState,v!==null)return v.dehydrated!==null?($t(Vt,Vt.current&1),l.flags|=128,null):(p&l.child.childLanes)!==0?Pc(o,l,p):($t(Vt,Vt.current&1),o=fi(o,l,p),o!==null?o.sibling:null);$t(Vt,Vt.current&1);break;case 19:if(v=(p&l.childLanes)!==0,(o.flags&128)!==0){if(v)return Yo(o,l,p);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),$t(Vt,Vt.current),v)break;return null;case 22:case 23:return l.lanes=0,Nd(o,l,p)}return fi(o,l,p)}var Mn,jd,Tm,Vd;Mn=function(o,l){for(var p=l.child;p!==null;){if(p.tag===5||p.tag===6)o.appendChild(p.stateNode);else if(p.tag!==4&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===l)break;for(;p.sibling===null;){if(p.return===null||p.return===l)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},jd=function(){},Tm=function(o,l,p,v){var w=o.memoizedProps;if(w!==v){o=l.stateNode,ho(Oi.current);var C=null;switch(p){case"input":w=bt(o,w),v=bt(o,v),C=[];break;case"select":w=A({},w,{value:void 0}),v=A({},v,{value:void 0}),C=[];break;case"textarea":w=zt(o,w),v=zt(o,v),C=[];break;default:typeof w.onClick!="function"&&typeof v.onClick=="function"&&(o.onclick=Ju)}Mt(p,v);var $;p=null;for(de in w)if(!v.hasOwnProperty(de)&&w.hasOwnProperty(de)&&w[de]!=null)if(de==="style"){var V=w[de];for($ in V)V.hasOwnProperty($)&&(p||(p={}),p[$]="")}else de!=="dangerouslySetInnerHTML"&&de!=="children"&&de!=="suppressContentEditableWarning"&&de!=="suppressHydrationWarning"&&de!=="autoFocus"&&(i.hasOwnProperty(de)?C||(C=[]):(C=C||[]).push(de,null));for(de in v){var Y=v[de];if(V=w?.[de],v.hasOwnProperty(de)&&Y!==V&&(Y!=null||V!=null))if(de==="style")if(V){for($ in V)!V.hasOwnProperty($)||Y&&Y.hasOwnProperty($)||(p||(p={}),p[$]="");for($ in Y)Y.hasOwnProperty($)&&V[$]!==Y[$]&&(p||(p={}),p[$]=Y[$])}else p||(C||(C=[]),C.push(de,p)),p=Y;else de==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,V=V?V.__html:void 0,Y!=null&&V!==Y&&(C=C||[]).push(de,Y)):de==="children"?typeof Y!="string"&&typeof Y!="number"||(C=C||[]).push(de,""+Y):de!=="suppressContentEditableWarning"&&de!=="suppressHydrationWarning"&&(i.hasOwnProperty(de)?(Y!=null&&de==="onScroll"&&Dt("scroll",o),C||V===Y||(C=[])):(C=C||[]).push(de,Y))}p&&(C=C||[]).push("style",p);var de=C;(l.updateQueue=de)&&(l.flags|=4)}},Vd=function(o,l,p,v){p!==v&&(l.flags|=4)};function Ka(o,l){if(!Ft)switch(o.tailMode){case"hidden":l=o.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?o.tail=null:p.sibling=null;break;case"collapsed":p=o.tail;for(var v=null;p!==null;)p.alternate!==null&&(v=p),p=p.sibling;v===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:v.sibling=null}}function Dn(o){var l=o.alternate!==null&&o.alternate.child===o.child,p=0,v=0;if(l)for(var w=o.child;w!==null;)p|=w.lanes|w.childLanes,v|=w.subtreeFlags&14680064,v|=w.flags&14680064,w.return=o,w=w.sibling;else for(w=o.child;w!==null;)p|=w.lanes|w.childLanes,v|=w.subtreeFlags,v|=w.flags,w.return=o,w=w.sibling;return o.subtreeFlags|=v,o.childLanes=p,l}function ny(o,l,p){var v=l.pendingProps;switch(_s(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dn(l),null;case 1:return pr(l.type)&&nc(),Dn(l),null;case 3:return v=l.stateNode,Go(),Nt(dr),Nt(jn),pc(),v.pendingContext&&(v.context=v.pendingContext,v.pendingContext=null),(o===null||o.child===null)&&(_a(l)?l.flags|=4:o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ui!==null&&(Jd(ui),ui=null))),jd(o,l),Dn(l),null;case 5:dc(l);var w=ho(Il.current);if(p=l.type,o!==null&&l.stateNode!=null)Tm(o,l,p,v,w),o.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!v){if(l.stateNode===null)throw Error(n(166));return Dn(l),null}if(o=ho(Oi.current),_a(l)){v=l.stateNode,p=l.type;var C=l.memoizedProps;switch(v[Ai]=l,v[Vo]=C,o=(l.mode&1)!==0,p){case"dialog":Dt("cancel",v),Dt("close",v);break;case"iframe":case"object":case"embed":Dt("load",v);break;case"video":case"audio":for(w=0;w<\/script>",o=o.removeChild(o.firstChild)):typeof v.is=="string"?o=$.createElement(p,{is:v.is}):(o=$.createElement(p),p==="select"&&($=o,v.multiple?$.multiple=!0:v.size&&($.size=v.size))):o=$.createElementNS(o,p),o[Ai]=l,o[Vo]=v,Mn(o,l,!1,!1),l.stateNode=o;e:{switch($=Xn(p,v),p){case"dialog":Dt("cancel",o),Dt("close",o),w=v;break;case"iframe":case"object":case"embed":Dt("load",o),w=v;break;case"video":case"audio":for(w=0;wNs&&(l.flags|=128,v=!0,Ka(C,!1),l.lanes=4194304)}else{if(!v)if(o=As($),o!==null){if(l.flags|=128,v=!0,p=o.updateQueue,p!==null&&(l.updateQueue=p,l.flags|=4),Ka(C,!0),C.tail===null&&C.tailMode==="hidden"&&!$.alternate&&!Ft)return Dn(l),null}else 2*Bt()-C.renderingStartTime>Ns&&p!==1073741824&&(l.flags|=128,v=!0,Ka(C,!1),l.lanes=4194304);C.isBackwards?($.sibling=l.child,l.child=$):(p=C.last,p!==null?p.sibling=$:l.child=$,C.last=$)}return C.tail!==null?(l=C.tail,C.rendering=l,C.tail=l.sibling,C.renderingStartTime=Bt(),l.sibling=null,p=Vt.current,$t(Vt,v?p&1|2:p&1),l):(Dn(l),null);case 22:case 23:return ep(),v=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==v&&(l.flags|=8192),v&&(l.mode&1)!==0?(_r&1073741824)!==0&&(Dn(l),l.subtreeFlags&6&&(l.flags|=8192)):Dn(l),null;case 24:return null;case 25:return null}throw Error(n(156,l.tag))}function ry(o,l){switch(_s(l),l.tag){case 1:return pr(l.type)&&nc(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Go(),Nt(dr),Nt(jn),pc(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return dc(l),null;case 13:if(Nt(Vt),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Ni()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return Nt(Vt),null;case 4:return Go(),null;case 10:return ac(l.type._context),null;case 22:case 23:return ep(),null;case 24:return null;default:return null}}var _c=!1,Ut=!1,nr=typeof WeakSet=="function"?WeakSet:Set,Re=null;function Ol(o,l){var p=o.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(v){qt(o,l,v)}else p.current=null}function Wa(o,l,p){try{p()}catch(v){qt(o,l,v)}}var _m=!1;function iy(o,l){if(Ca=Mu,o=Tt(),va(o)){if("selectionStart"in o)var p={start:o.selectionStart,end:o.selectionEnd};else e:{p=(p=o.ownerDocument)&&p.defaultView||window;var v=p.getSelection&&p.getSelection();if(v&&v.rangeCount!==0){p=v.anchorNode;var w=v.anchorOffset,C=v.focusNode;v=v.focusOffset;try{p.nodeType,C.nodeType}catch{p=null;break e}var $=0,V=-1,Y=-1,de=0,be=0,Se=o,ye=null;t:for(;;){for(var Ae;Se!==p||w!==0&&Se.nodeType!==3||(V=$+w),Se!==C||v!==0&&Se.nodeType!==3||(Y=$+v),Se.nodeType===3&&($+=Se.nodeValue.length),(Ae=Se.firstChild)!==null;)ye=Se,Se=Ae;for(;;){if(Se===o)break t;if(ye===p&&++de===w&&(V=$),ye===C&&++be===v&&(Y=$),(Ae=Se.nextSibling)!==null)break;Se=ye,ye=Se.parentNode}Se=Ae}p=V===-1||Y===-1?null:{start:V,end:Y}}else p=null}p=p||{start:0,end:0}}else p=null;for(Cs={focusedElem:o,selectionRange:p},Mu=!1,Re=l;Re!==null;)if(l=Re,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Re=o;else for(;Re!==null;){l=Re;try{var Le=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Le!==null){var De=Le.memoizedProps,rn=Le.memoizedState,le=l.stateNode,ee=le.getSnapshotBeforeUpdate(l.elementType===l.type?De:Gr(l.type,De),rn);le.__reactInternalSnapshotBeforeUpdate=ee}break;case 3:var ue=l.stateNode.containerInfo;ue.nodeType===1?ue.textContent="":ue.nodeType===9&&ue.documentElement&&ue.removeChild(ue.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ce){qt(l,l.return,Ce)}if(o=l.sibling,o!==null){o.return=l.return,Re=o;break}Re=l.return}return Le=_m,_m=!1,Le}function yo(o,l,p){var v=l.updateQueue;if(v=v!==null?v.lastEffect:null,v!==null){var w=v=v.next;do{if((w.tag&o)===o){var C=w.destroy;w.destroy=void 0,C!==void 0&&Wa(l,p,C)}w=w.next}while(w!==v)}}function Ha(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var p=l=l.next;do{if((p.tag&o)===o){var v=p.create;p.destroy=v()}p=p.next}while(p!==l)}}function Ic(o){var l=o.ref;if(l!==null){var p=o.stateNode;switch(o.tag){case 5:o=p;break;default:o=p}typeof l=="function"?l(o):l.current=o}}function Im(o){var l=o.alternate;l!==null&&(o.alternate=null,Im(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Ai],delete l[Vo],delete l[ec],delete l[D],delete l[kl])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function $m(o){return o.tag===5||o.tag===3||o.tag===4}function Am(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||$m(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Ud(o,l,p){var v=o.tag;if(v===5||v===6)o=o.stateNode,l?p.nodeType===8?p.parentNode.insertBefore(o,l):p.insertBefore(o,l):(p.nodeType===8?(l=p.parentNode,l.insertBefore(o,p)):(l=p,l.appendChild(o)),p=p._reactRootContainer,p!=null||l.onclick!==null||(l.onclick=Ju));else if(v!==4&&(o=o.child,o!==null))for(Ud(o,l,p),o=o.sibling;o!==null;)Ud(o,l,p),o=o.sibling}function $c(o,l,p){var v=o.tag;if(v===5||v===6)o=o.stateNode,l?p.insertBefore(o,l):p.appendChild(o);else if(v!==4&&(o=o.child,o!==null))for($c(o,l,p),o=o.sibling;o!==null;)$c(o,l,p),o=o.sibling}var kn=null,di=!1;function Ui(o,l,p){for(p=p.child;p!==null;)Kd(o,l,p),p=p.sibling}function Kd(o,l,p){if(_i&&typeof _i.onCommitFiberUnmount=="function")try{_i.onCommitFiberUnmount(_u,p)}catch{}switch(p.tag){case 5:Ut||Ol(p,l);case 6:var v=kn,w=di;kn=null,Ui(o,l,p),kn=v,di=w,kn!==null&&(di?(o=kn,p=p.stateNode,o.nodeType===8?o.parentNode.removeChild(p):o.removeChild(p)):kn.removeChild(p.stateNode));break;case 18:kn!==null&&(di?(o=kn,p=p.stateNode,o.nodeType===8?dd(o.parentNode,p):o.nodeType===1&&dd(o,p),Et(o)):dd(kn,p.stateNode));break;case 4:v=kn,w=di,kn=p.stateNode.containerInfo,di=!0,Ui(o,l,p),kn=v,di=w;break;case 0:case 11:case 14:case 15:if(!Ut&&(v=p.updateQueue,v!==null&&(v=v.lastEffect,v!==null))){w=v=v.next;do{var C=w,$=C.destroy;C=C.tag,$!==void 0&&((C&2)!==0||(C&4)!==0)&&Wa(p,l,$),w=w.next}while(w!==v)}Ui(o,l,p);break;case 1:if(!Ut&&(Ol(p,l),v=p.stateNode,typeof v.componentWillUnmount=="function"))try{v.props=p.memoizedProps,v.state=p.memoizedState,v.componentWillUnmount()}catch(V){qt(p,l,V)}Ui(o,l,p);break;case 21:Ui(o,l,p);break;case 22:p.mode&1?(Ut=(v=Ut)||p.memoizedState!==null,Ui(o,l,p),Ut=v):Ui(o,l,p);break;default:Ui(o,l,p)}}function zl(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var p=o.stateNode;p===null&&(p=o.stateNode=new nr),l.forEach(function(v){var w=fy.bind(null,o,v);p.has(v)||(p.add(v),v.then(w,w))})}}function Tr(o,l){var p=l.deletions;if(p!==null)for(var v=0;vw&&(w=$),v&=~C}if(v=w,v=Bt()-v,v=(120>v?120:480>v?480:1080>v?1080:1920>v?1920:3e3>v?3e3:4320>v?4320:1960*Lm(v/1960))-v,10o?16:o,Zo===null)var v=!1;else{if(o=Zo,Zo=null,rr=0,(gt&6)!==0)throw Error(n(331));var w=gt;for(gt|=4,Re=o.current;Re!==null;){var C=Re,$=C.child;if((Re.flags&16)!==0){var V=C.deletions;if(V!==null){for(var Y=0;YBt()-qd?Os(o,0):Lc|=p),vr(o,l)}function zm(o,l){l===0&&((o.mode&1)===0?l=1:(l=Iu,Iu<<=1,(Iu&130023424)===0&&(Iu=4194304)));var p=ir();o=fo(o,l),o!==null&&(fa(o,l,p),vr(o,p))}function cy(o){var l=o.memoizedState,p=0;l!==null&&(p=l.retryLane),zm(o,p)}function fy(o,l){var p=0;switch(o.tag){case 13:var v=o.stateNode,w=o.memoizedState;w!==null&&(p=w.retryLane);break;case 19:v=o.stateNode;break;default:throw Error(n(314))}v!==null&&v.delete(l),zm(o,p)}var Bm;Bm=function(o,l,p){if(o!==null)if(o.memoizedProps!==l.pendingProps||dr.current)tr=!0;else{if((o.lanes&p)===0&&(l.flags&128)===0)return tr=!1,Pm(o,l,p);tr=(o.flags&131072)!==0}else tr=!1,Ft&&(l.flags&1048576)!==0&&cm(l,oc,l.index);switch(l.lanes=0,l.tag){case 2:var v=l.type;Tc(o,l),o=l.pendingProps;var w=El(l,jn.current);Ho(l,p),w=Ls(null,l,v,o,w,p);var C=hc();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,pr(v)?(C=!0,Br(l)):C=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,cc(l),w.updater=Sc,l.stateNode=w,w._reactInternals=l,Ld(l,v,o,p),l=Bd(null,l,v,!0,C,p)):(l.tag=0,Ft&&C&&Ta(l),Ln(null,l,w,p),l=l.child),l;case 16:v=l.elementType;e:{switch(Tc(o,l),o=l.pendingProps,w=v._init,v=w(v._payload),l.type=v,w=l.tag=py(v),o=Gr(v,o),w){case 0:l=Od(null,l,v,o,p);break e;case 1:l=zd(null,l,v,o,p);break e;case 11:l=Cm(null,l,v,o,p);break e;case 14:l=Dd(null,l,v,Gr(v.type,o),p);break e}throw Error(n(306,v,""))}return l;case 0:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:Gr(v,w),Od(o,l,v,w,p);case 1:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:Gr(v,w),zd(o,l,v,w,p);case 3:e:{if(Em(l),o===null)throw Error(n(387));v=l.pendingProps,C=l.memoizedState,w=C.element,hm(o,l),_l(l,v,null,p);var $=l.memoizedState;if(v=$.element,C.isDehydrated)if(C={element:v,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},l.updateQueue.baseState=C,l.memoizedState=C,l.flags&256){w=Ds(Error(n(423)),l),l=Vi(o,l,v,p,w);break e}else if(v!==w){w=Ds(Error(n(424)),l),l=Vi(o,l,v,p,w);break e}else for(Er=jo(l.stateNode.containerInfo.firstChild),Un=l,Ft=!0,ui=null,p=lc(l,null,v,p),l.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Ni(),v===w){l=fi(o,l,p);break e}Ln(o,l,v,p)}l=l.child}return l;case 5:return xd(l),o===null&&hr(l),v=l.type,w=l.pendingProps,C=o!==null?o.memoizedProps:null,$=w.children,Ea(v,w)?$=null:C!==null&&Ea(v,C)&&(l.flags|=32),Fd(o,l),Ln(o,l,$,p),l.child;case 6:return o===null&&hr(l),null;case 13:return Pc(o,l,p);case 4:return bd(l,l.stateNode.containerInfo),v=l.pendingProps,o===null?l.child=Jt(l,null,v,p):Ln(o,l,v,p),l.child;case 11:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:Gr(v,w),Cm(o,l,v,w,p);case 7:return Ln(o,l,l.pendingProps,p),l.child;case 8:return Ln(o,l,l.pendingProps.children,p),l.child;case 12:return Ln(o,l,l.pendingProps.children,p),l.child;case 10:e:{if(v=l.type._context,w=l.pendingProps,C=l.memoizedProps,$=w.value,$t($a,v._currentValue),v._currentValue=$,C!==null)if(ce(C.value,$)){if(C.children===w.children&&!dr.current){l=fi(o,l,p);break e}}else for(C=l.child,C!==null&&(C.return=l);C!==null;){var V=C.dependencies;if(V!==null){$=C.child;for(var Y=V.firstContext;Y!==null;){if(Y.context===v){if(C.tag===1){Y=po(-1,p&-p),Y.tag=2;var de=C.updateQueue;if(de!==null){de=de.shared;var be=de.pending;be===null?Y.next=Y:(Y.next=be.next,be.next=Y),de.pending=Y}}C.lanes|=p,Y=C.alternate,Y!==null&&(Y.lanes|=p),Rn(C.return,p,l),V.lanes|=p;break}Y=Y.next}}else if(C.tag===10)$=C.type===l.type?null:C.child;else if(C.tag===18){if($=C.return,$===null)throw Error(n(341));$.lanes|=p,V=$.alternate,V!==null&&(V.lanes|=p),Rn($,p,l),$=C.sibling}else $=C.child;if($!==null)$.return=C;else for($=C;$!==null;){if($===l){$=null;break}if(C=$.sibling,C!==null){C.return=$.return,$=C;break}$=$.return}C=$}Ln(o,l,w.children,p),l=l.child}return l;case 9:return w=l.type,v=l.pendingProps.children,Ho(l,p),w=Ur(w),v=v(w),l.flags|=1,Ln(o,l,v,p),l.child;case 14:return v=l.type,w=Gr(v,l.pendingProps),w=Gr(v.type,w),Dd(o,l,v,w,p);case 15:return ji(o,l,l.type,l.pendingProps,p);case 17:return v=l.type,w=l.pendingProps,w=l.elementType===v?w:Gr(v,w),Tc(o,l),l.tag=1,pr(v)?(o=!0,Br(l)):o=!1,Ho(l,p),Ms(l,v,w),Ld(l,v,w,p),Bd(null,l,v,!0,o,p);case 19:return Yo(o,l,p);case 22:return Nd(o,l,p)}throw Error(n(156,l.tag))};function jm(o,l){return Eh(o,l)}function dy(o,l,p,v){this.tag=o,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(o,l,p,v){return new dy(o,l,p,v)}function Bc(o){return o=o.prototype,!(!o||!o.isReactComponent)}function py(o){if(typeof o=="function")return Bc(o)?1:0;if(o!=null){if(o=o.$$typeof,o===X)return 11;if(o===fe)return 14}return 2}function gi(o,l){var p=o.alternate;return p===null?(p=Yr(o.tag,l,o.key,o.mode),p.elementType=o.elementType,p.type=o.type,p.stateNode=o.stateNode,p.alternate=o,o.alternate=p):(p.pendingProps=l,p.type=o.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=o.flags&14680064,p.childLanes=o.childLanes,p.lanes=o.lanes,p.child=o.child,p.memoizedProps=o.memoizedProps,p.memoizedState=o.memoizedState,p.updateQueue=o.updateQueue,l=o.dependencies,p.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},p.sibling=o.sibling,p.index=o.index,p.ref=o.ref,p}function jc(o,l,p,v,w,C){var $=2;if(v=o,typeof o=="function")Bc(o)&&($=1);else if(typeof o=="string")$=5;else e:switch(o){case Z:return Bs(p.children,w,C,l);case re:$=8,w|=8;break;case ae:return o=Yr(12,p,l,w|2),o.elementType=ae,o.lanes=C,o;case ne:return o=Yr(13,p,l,w),o.elementType=ne,o.lanes=C,o;case G:return o=Yr(19,p,l,w),o.elementType=G,o.lanes=C,o;case q:return Vc(p,w,C,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case O:$=10;break e;case U:$=9;break e;case X:$=11;break e;case fe:$=14;break e;case J:$=16,v=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return l=Yr($,p,l,w),l.elementType=o,l.type=v,l.lanes=C,l}function Bs(o,l,p,v){return o=Yr(7,o,v,l),o.lanes=p,o}function Vc(o,l,p,v){return o=Yr(22,o,v,l),o.elementType=q,o.lanes=p,o.stateNode={isHidden:!1},o}function np(o,l,p){return o=Yr(6,o,null,l),o.lanes=p,o}function rp(o,l,p){return l=Yr(4,o.children!==null?o.children:[],o.key,l),l.lanes=p,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function hy(o,l,p,v,w){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ca(0),this.expirationTimes=ca(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.identifierPrefix=v,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function ip(o,l,p,v,w,C,$,V,Y){return o=new hy(o,l,p,V,Y),l===1?(l=1,C===!0&&(l|=8)):l=0,C=Yr(3,null,null,l),o.current=C,C.stateNode=o,C.memoizedState={element:v,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},cc(C),o}function my(o,l,p){var v=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),My.exports=DR(),My.exports}var n1;function NR(){if(n1)return Qm;n1=1;var e=nE();return Qm.createRoot=e.createRoot,Qm.hydrateRoot=e.hydrateRoot,Qm}var FR=NR();function tx(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=k.createContext(void 0);i.displayName=r;function s(){var a;const c=k.useContext(i);if(!c&&t){const d=new Error(n);throw d.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,d,s),d}return c}return[i.Provider,s,i]}function OR(e){return{UNSAFE_getDOMNode(){return e.current}}}function Xi(e){const t=k.useRef(null);return k.useImperativeHandle(e,()=>t.current),t}function nx(e){return Array.isArray(e)}function zR(e){return nx(e)&&e.length===0}function rE(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!nx(e)}function BR(e){return rE(e)&&Object.keys(e).length===0}function jR(e){return nx(e)?zR(e):rE(e)?BR(e):e==null||e===""}function VR(e){return typeof e=="function"}var Me=e=>e?"true":void 0;function iE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{let t=" ";for(const n of e)if(typeof n=="string"&&n.length>0){t=n;break}return t},KR=e=>e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"";function r1(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function WR(e){return`${e}-${Math.floor(Math.random()*1e6)}`}function OH(e){for(const t in e)t.startsWith("on")&&delete e[t];return e}function Zs(e){if(!e||typeof e!="object")return"";try{return JSON.stringify(e)}catch{return""}}function HR(e,t,n){return Math.min(Math.max(e,t),n)}function GR(e,t=100){return Math.min(Math.max(e,0),t)}var i1={};function qR(e,t,...n){const i=`[Hero UI] : ${e}`;typeof console>"u"||i1[i]||(i1[i]=!0)}function mf(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}var o1=new Map;function YR(e,t){if(e===t)return e;let n=o1.get(e);if(n)return n.forEach(i=>i.current=t),t;let r=o1.get(t);return r?(r.forEach(i=>i.current=e),e):t}function hn(...e){let t={...e[0]};for(let n=1;n=65&&i.charCodeAt(2)<=90?t[i]=mf(s,a):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof a=="string"?t[i]=pn(s,a):i==="id"&&s&&a?t.id=YR(s,a):t[i]=a!==void 0?a:s}}return t}function oE(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1;const r=e.map(i=>{const s=s1(i,t);return n||(n=typeof s=="function"),s});if(n)return()=>{r.forEach((i,s)=>{typeof i=="function"?i?.():s1(e[s],null)})}}}function s1(e,t){if(typeof e=="function")return()=>e(t);e!=null&&"current"in e&&(e.current=t)}function XR(e,t){if(e!=null){if(VR(e)){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function QR(...e){return t=>{e.forEach(n=>XR(n,t))}}function JR(){const e=()=>()=>{};return k.useSyncExternalStore(e,()=>!0,()=>!1)}var ZR=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","step","target","translate","typeMustMatch","useMap","value","wmode","wrap"]),eL=new Set(["onCopy","onCut","onPaste","onLoad","onError","onWheel","onScroll","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerEnter","onPointerLeave","onPointerUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd"]),l1=/^(data-.*)$/,tL=/^(aria-.*)$/,Jm=/^(on[A-Z].*)$/;function gf(e,t={}){let{labelable:n=!0,enabled:r=!0,propNames:i,omitPropNames:s,omitEventNames:a,omitDataProps:c,omitEventProps:d}=t,h={};if(!r)return e;for(const m in e)s?.has(m)||a?.has(m)&&Jm.test(m)||Jm.test(m)&&!eL.has(m)||c&&l1.test(m)||d&&Jm.test(m)||(Object.prototype.hasOwnProperty.call(e,m)&&(ZR.has(m)||n&&tL.test(m)||i?.has(m)||l1.test(m))||Jm.test(m))&&(h[m]=e[m]);return h}var[nL,Pi]=tx({name:"ProviderContext",strict:!1});const rL=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),iL=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function sE(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return rL.has(n.script)}let t=e.split("-")[0];return iL.has(t)}const lE={prefix:String(Math.round(Math.random()*1e10)),current:0},aE=We.createContext(lE),oL=We.createContext(!1);let Fy=new WeakMap;function sL(e=!1){let t=k.useContext(aE),n=k.useRef(null);if(n.current===null&&!e){var r,i;let s=(i=We.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let a=Fy.get(s);a==null?Fy.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==a.state&&(t.current=a.id,Fy.delete(s))}n.current=++t.current}return n.current}function lL(e){let t=k.useContext(aE),n=sL(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function aL(e){let t=We.useId(),[n]=k.useState(nv()),r=n?"react-aria":`react-aria${lE.prefix}`;return e||`${r}-${t}`}const uL=typeof We.useId=="function"?aL:lL;function cL(){return!1}function fL(){return!0}function dL(e){return()=>{}}function nv(){return typeof We.useSyncExternalStore=="function"?We.useSyncExternalStore(dL,cL,fL):k.useContext(oL)}const pL=Symbol.for("react-aria.i18n.locale");function uE(){let e=typeof window<"u"&&window[pL]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:sE(e)?"rtl":"ltr"}}let F0=uE(),Cp=new Set;function a1(){F0=uE();for(let e of Cp)e(F0)}function cE(){let e=nv(),[t,n]=k.useState(F0);return k.useEffect(()=>(Cp.size===0&&window.addEventListener("languagechange",a1),Cp.add(n),()=>{Cp.delete(n),Cp.size===0&&window.removeEventListener("languagechange",a1)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const fE=We.createContext(null);function hL(e){let{locale:t,children:n}=e,r=cE(),i=We.useMemo(()=>t?{locale:t,direction:sE(t)?"rtl":"ltr"}:r,[r,t]);return We.createElement(fE.Provider,{value:i},n)}function uh(){let e=cE();return k.useContext(fE)||e}const mL=Symbol.for("react-aria.i18n.locale"),gL=Symbol.for("react-aria.i18n.strings");let Xc;class rv{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=vL(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[mL];if(Xc===void 0){let i=window[gL];if(!i)return null;Xc={};for(let s in i)Xc[s]=new rv({[n]:i[s]},n)}let r=Xc?.[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function vL(e,t,n="en-US"){if(t[e])return t[e];let r=yL(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function yL(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const u1=new Map,c1=new Map;class bL{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let s=this.locale+":"+r,a=u1.get(s);a||(a=new Intl.PluralRules(this.locale,{type:r}),u1.set(s,a));let c=a.select(t);return i=n[c]||n.other,typeof i=="function"?i():i}number(t){let n=c1.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),c1.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const f1=new WeakMap;function xL(e){let t=f1.get(e);return t||(t=new rv(e),f1.set(e,t)),t}function wL(e,t){return t&&rv.getGlobalDictionaryForPackage(t)||xL(e)}function SL(e,t){let{locale:n}=uh(),r=wL(e,t);return k.useMemo(()=>new bL(n,r),[n,r])}function kL(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function CL(e,t,n){kL(e,t),t.set(e,n)}const Zt=typeof document<"u"?We.useLayoutEffect:()=>{};function Fn(e){const t=k.useRef(null);return Zt(()=>{t.current=e},[e]),k.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}function EL(e){let[t,n]=k.useState(e),r=k.useRef(null),i=Fn(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}t===a.value?i():n(a.value)});Zt(()=>{r.current&&i()});let s=Fn(a=>{r.current=a(t),i()});return[t,s]}let PL=!!(typeof window<"u"&&window.document&&window.document.createElement),uf=new Map,Ep;typeof FinalizationRegistry<"u"&&(Ep=new FinalizationRegistry(e=>{uf.delete(e)}));function vf(e){let[t,n]=k.useState(e),r=k.useRef(null),i=uL(t),s=k.useRef(null);if(Ep&&Ep.register(s,i),PL){const a=uf.get(i);a&&!a.includes(r)?a.push(r):uf.set(i,[r])}return Zt(()=>{let a=i;return()=>{Ep&&Ep.unregister(s),uf.delete(a)}},[i]),k.useEffect(()=>{let a=r.current;return a&&n(a),()=>{a&&(r.current=null)}}),i}function TL(e,t){if(e===t)return e;let n=uf.get(e);if(n)return n.forEach(i=>i.current=t),t;let r=uf.get(t);return r?(r.forEach(i=>i.current=e),e):t}function O0(e=[]){let t=vf(),[n,r]=EL(t),i=k.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return Zt(i,[t,i,...e]),n}function yf(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const At=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Qi=e=>e&&"window"in e&&e.window===e?e:At(e).defaultView||window;function _L(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function IL(e){return _L(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let $L=!1;function iv(){return $L}function ni(e,t){if(!iv())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:IL(n)?n=n.host:n=n.parentNode}return!1}const Mr=(e=document)=>{var t;if(!iv())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function wn(e){return iv()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}class AL{get currentNode(){return this._currentNode}set currentNode(t){if(!ni(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=t,i=t;for(this._currentNode=t;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const a=r,c=this._doc.createTreeWalker(a,this.whatToShow,{acceptNode:this._acceptNode});n.push(c),c.currentNode=i,this._currentSetFor.add(c),r=i=a.host}else r=r.parentNode;const s=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=i,this._currentSetFor.add(s),this._walkerStack=n}get doc(){return this._doc}firstChild(){let t=this.currentNode,n=this.nextNode();return ni(t,n)?(n&&(this.currentNode=n),n):(this.currentNode=t,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(t):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(t)),i===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let s=this.nextNode();return s&&(this.currentNode=s),s}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null;return null}const n=t.previousNode();if(n){if(n.shadowRoot){var r;let s;if(typeof this.filter=="function"?s=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(s=this.filter.acceptNode(n)),s===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let a=this.lastChild();return a&&(this.currentNode=a),a}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(t,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=a=>{if(a.nodeType===Node.ELEMENT_NODE){const d=a.shadowRoot;if(d){const h=this._doc.createTreeWalker(d,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(h),NodeFilter.FILTER_ACCEPT}else{var c;if(typeof this.filter=="function")return this.filter(a);if(!((c=this.filter)===null||c===void 0)&&c.acceptNode)return this.filter.acceptNode(a);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=t,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(t.createTreeWalker(n,r,this._acceptNode));const s=n.shadowRoot;if(s){const a=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(a)}}}function RL(e,t,n,r){return iv()?new AL(e,t,n,r):e.createTreeWalker(t,n,r)}function dE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t=65&&i.charCodeAt(2)<=90?t[i]=yf(s,a):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof a=="string"?t[i]=LL(s,a):i==="id"&&s&&a?t.id=TL(s,a):t[i]=a!==void 0?a:s}}return t}const ML=new Set(["id"]),DL=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),NL=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),FL=/^(data-.*)$/;function _f(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,s={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(ML.has(a)||n&&DL.has(a)||r&&NL.has(a)||i?.has(a)||FL.test(a))&&(s[a]=e[a]);return s}function Xl(e){if(OL())e.focus({preventScroll:!0});else{let t=zL(e);e.focus(),BL(t)}}let Zm=null;function OL(){if(Zm==null){Zm=!1;try{document.createElement("div").focus({get preventScroll(){return Zm=!0,!0}})}catch{}}return Zm}function zL(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function rx(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function el(e){let t=null;return()=>(t==null&&(t=e()),t)}const gu=el(function(){return rx(/^Mac/i)}),jL=el(function(){return rx(/^iPhone/i)}),pE=el(function(){return rx(/^iPad/i)||gu()&&navigator.maxTouchPoints>1}),sv=el(function(){return jL()||pE()}),VL=el(function(){return gu()||sv()}),hE=el(function(){return ov(/AppleWebKit/i)&&!mE()}),mE=el(function(){return ov(/Chrome/i)}),ix=el(function(){return ov(/Android/i)}),UL=el(function(){return ov(/Firefox/i)}),gE=k.createContext({isNative:!0,open:HL,useHref:e=>e});function KL(e){let{children:t,navigate:n,useHref:r}=e,i=k.useMemo(()=>({isNative:!1,open:(s,a,c,d)=>{yE(s,h=>{WL(h,a)?n(c,d):vu(h,a)})},useHref:r||(s=>s)}),[n,r]);return We.createElement(gE.Provider,{value:i},t)}function vE(){return k.useContext(gE)}function WL(e,t){let n=e.getAttribute("target");return(!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function vu(e,t,n=!0){var r,i;let{metaKey:s,ctrlKey:a,altKey:c,shiftKey:d}=t;UL()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(gu()?s=!0:a=!0);let h=hE()&&gu()&&!pE()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:a,altKey:c,shiftKey:d}):new MouseEvent("click",{metaKey:s,ctrlKey:a,altKey:c,shiftKey:d,bubbles:!0,cancelable:!0});vu.isOpening=n,Xl(e),e.dispatchEvent(h),vu.isOpening=!1}vu.isOpening=!1;function yE(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function HL(e,t){yE(e,n=>vu(n,t))}function zH(e){let t=vE();var n;const r=t.useHref((n=e?.href)!==null&&n!==void 0?n:"");return{href:e?.href?r:void 0,target:e?.target,rel:e?.rel,download:e?.download,ping:e?.ping,referrerPolicy:e?.referrerPolicy}}let Hl=new Map,z0=new Set;function d1(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=Hl.get(r.target);i||(i=new Set,Hl.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=Hl.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Hl.delete(r.target)),Hl.size===0)){for(let s of z0)s();z0.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?d1():document.addEventListener("DOMContentLoaded",d1));function GL(){for(const[e]of Hl)"isConnected"in e&&!e.isConnected&&Hl.delete(e)}function bE(e){requestAnimationFrame(()=>{GL(),Hl.size===0?e():z0.add(e)})}function ox(){let e=k.useRef(new Map),t=k.useCallback((i,s,a,c)=>{let d=c?.once?(...h)=>{e.current.delete(a),a(...h)}:a;e.current.set(a,{type:s,eventTarget:i,fn:d,options:c}),i.addEventListener(s,d,c)},[]),n=k.useCallback((i,s,a,c)=>{var d;let h=((d=e.current.get(a))===null||d===void 0?void 0:d.fn)||a;i.removeEventListener(s,h,c),e.current.delete(a)},[]),r=k.useCallback(()=>{e.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return k.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function xE(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=vf(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function p1(e,t){const n=k.useRef(!0),r=k.useRef(null);Zt(()=>(n.current=!0,()=>{n.current=!1}),[]),Zt(()=>{n.current?n.current=!1:(!r.current||t.some((i,s)=>!Object.is(i,r[s])))&&e(),r.current=t},t)}function qL(){return typeof window.ResizeObserver<"u"}function h1(e){const{ref:t,box:n,onResize:r}=e;k.useEffect(()=>{let i=t?.current;if(i)if(qL()){const s=new window.ResizeObserver(a=>{a.length&&r()});return s.observe(i,{box:n}),()=>{i&&s.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,t,n])}function wE(e,t){Zt(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Kp(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function SE(e,t){let n=e;for(Kp(n,t)&&(n=n.parentElement);n&&!Kp(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function YL(e,t){const n=[];for(;e&&e!==document.documentElement;)Kp(e,t)&&n.push(e),e=e.parentElement;return n}function eg(e,t,n,r){let i=Fn(n),s=n==null;k.useEffect(()=>{if(s||!e.current)return;let a=e.current;return a.addEventListener(t,i,r),()=>{a.removeEventListener(t,i,r)}},[e,t,r,s,i])}function kE(e,t){let n=m1(e,t,"left"),r=m1(e,t,"top"),i=t.offsetWidth,s=t.offsetHeight,a=e.scrollLeft,c=e.scrollTop,{borderTopWidth:d,borderLeftWidth:h,scrollPaddingTop:m,scrollPaddingRight:g,scrollPaddingBottom:b,scrollPaddingLeft:x}=getComputedStyle(e),S=a+parseInt(h,10),P=c+parseInt(d,10),_=S+e.clientWidth,T=P+e.clientHeight,R=parseInt(m,10)||0,L=parseInt(b,10)||0,B=parseInt(g,10)||0,W=parseInt(x,10)||0;n<=a+W?a=n-parseInt(h,10)-W:n+i>_-B&&(a+=n+i-_+B),r<=P+R?c=r-parseInt(d,10)-R:r+s>T-L&&(c+=r+s-T+L),e.scrollLeft=a,e.scrollTop=c}function m1(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function g1(e,t){if(e&&document.contains(e)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let d=YL(e);for(let h of d)kE(h,e)}else{var n;let{left:d,top:h}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:m,top:g}=e.getBoundingClientRect();if(Math.abs(d-m)>1||Math.abs(h-g)>1){var r,i,s;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(s=e.scrollIntoView)===null||s===void 0||s.call(e,{block:"nearest"})}}}}function CE(e){return e.mozInputSource===0&&e.isTrusted?!0:ix()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function XL(e){return!ix()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function QL(e,t,n){let r=k.useRef(t),i=Fn(()=>{n&&n(r.current)});k.useEffect(()=>{var s;let a=e==null||(s=e.current)===null||s===void 0?void 0:s.form;return a?.addEventListener("reset",i),()=>{a?.removeEventListener("reset",i)}},[e,i])}const JL="react-aria-clear-focus",ZL="react-aria-focus";function up(e){return gu()?e.metaKey:e.ctrlKey}var EE=nE();const PE=tv(EE),sx=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],eM=sx.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";sx.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const tM=sx.join(':not([hidden]):not([tabindex="-1"]),');function TE(e){return e.matches(eM)}function nM(e){return e.matches(tM)}function If(e,t,n){let[r,i]=k.useState(e||t),s=k.useRef(e!==void 0),a=e!==void 0;k.useEffect(()=>{s.current,s.current=a},[a]);let c=a?e:r,d=k.useCallback((h,...m)=>{let g=(b,...x)=>{n&&(Object.is(c,b)||n(b,...x)),a||(c=b)};typeof h=="function"?i((x,...S)=>{let P=h(a?c:x,...S);return g(P,...m),a?x:P}):(a||i(h),g(h,...m))},[a,c,n]);return[c,d]}function Rg(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}let Oy=new Map,B0=!1;try{B0=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Lg=!1;try{Lg=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const _E={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class rM{format(t){let n="";if(!B0&&this.options.signDisplay!=null?n=oM(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Lg){var r;let{unit:i,unitDisplay:s="short",locale:a}=this.resolvedOptions();if(!i)return n;let c=(r=_E[i])===null||r===void 0?void 0:r[s];n+=c[a]||c.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...r.map(s=>({...s,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!B0&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Lg&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=iM(t,n),this.options=n}}function iM(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Lg){var r;let{unit:a,unitDisplay:c="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=_E[a])===null||r===void 0)&&r[c]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${c}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((a,c)=>a[0]0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=e.format(-n),s=e.format(n),a=i.replace(s,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return e.format(n)}}function sM(e={}){let{locale:t}=uh();return k.useMemo(()=>new rM(t,e),[t,e])}let zy=new Map;function lM(e){let{locale:t}=uh(),n=t+(e?Object.entries(e).sort((i,s)=>i[0]-1&&e.splice(n,1)}const Qs=(e,t,n)=>n>t?t:n{};const cs={},IE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function $E(e){return typeof e=="object"&&e!==null}const AE=e=>/^0[^.\s]+$/u.test(e);function dx(e){let t;return()=>(t===void 0&&(t=e()),t)}const Zi=e=>e,aM=(e,t)=>n=>t(e(n)),fh=(...e)=>e.reduce(aM),Hp=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class px{constructor(){this.subscriptions=[]}add(t){return ux(this.subscriptions,t),()=>cx(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;se*1e3,as=e=>e/1e3;function RE(e,t){return t?e*(1e3/t):0}const LE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uM=1e-7,cM=12;function fM(e,t,n,r,i){let s,a,c=0;do a=t+(n-t)/2,s=LE(a,r,i)-e,s>0?n=a:t=a;while(Math.abs(s)>uM&&++cfM(s,0,1,e,n);return s=>s===0||s===1?s:LE(i(s),t,r)}const ME=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,DE=e=>t=>1-e(1-t),NE=dh(.33,1.53,.69,.99),hx=DE(NE),FE=ME(hx),OE=e=>(e*=2)<1?.5*hx(e):.5*(2-Math.pow(2,-10*(e-1))),mx=e=>1-Math.sin(Math.acos(e)),zE=DE(mx),BE=ME(mx),dM=dh(.42,0,1,1),pM=dh(0,0,.58,1),jE=dh(.42,0,.58,1),hM=e=>Array.isArray(e)&&typeof e[0]!="number",VE=e=>Array.isArray(e)&&typeof e[0]=="number",mM={linear:Zi,easeIn:dM,easeInOut:jE,easeOut:pM,circIn:mx,circInOut:BE,circOut:zE,backIn:hx,backInOut:FE,backOut:NE,anticipate:OE},gM=e=>typeof e=="string",v1=e=>{if(VE(e)){fx(e.length===4);const[t,n,r,i]=e;return dh(t,n,r,i)}else if(gM(e))return mM[e];return e},tg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function vM(e,t){let n=new Set,r=new Set,i=!1,s=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(m){a.has(m)&&(h.schedule(m),e()),m(c)}const h={schedule:(m,g=!1,b=!1)=>{const S=b&&i?n:r;return g&&a.add(m),S.has(m)||S.add(m),m},cancel:m=>{r.delete(m),a.delete(m)},process:m=>{if(c=m,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(d),n.clear(),i=!1,s&&(s=!1,h.process(m))}};return h}const yM=40;function UE(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=tg.reduce((L,B)=>(L[B]=vM(s),L),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:m,update:g,preRender:b,render:x,postRender:S}=a,P=()=>{const L=cs.useManualTiming?i.timestamp:performance.now();n=!1,cs.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(L-i.timestamp,yM),1)),i.timestamp=L,i.isProcessing=!0,c.process(i),d.process(i),h.process(i),m.process(i),g.process(i),b.process(i),x.process(i),S.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(P))},_=()=>{n=!0,r=!0,i.isProcessing||e(P)};return{schedule:tg.reduce((L,B)=>{const W=a[B];return L[B]=(M,Z=!1,re=!1)=>(n||_(),W.schedule(M,Z,re)),L},{}),cancel:L=>{for(let B=0;B(xg===void 0&&ri.set(sr.isProcessing||cs.useManualTiming?sr.timestamp:performance.now()),xg),set:e=>{xg=e,queueMicrotask(bM)}},KE=e=>t=>typeof t=="string"&&t.startsWith(e),gx=KE("--"),xM=KE("var(--"),vx=e=>xM(e)?wM.test(e.split("/*")[0].trim()):!1,wM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,$f={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gp={...$f,transform:e=>Qs(0,1,e)},ng={...$f,default:1},Ap=e=>Math.round(e*1e5)/1e5,yx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function SM(e){return e==null}const kM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bx=(e,t)=>n=>!!(typeof n=="string"&&kM.test(n)&&n.startsWith(e)||t&&!SM(n)&&Object.prototype.hasOwnProperty.call(n,t)),WE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,a,c]=r.match(yx);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},CM=e=>Qs(0,255,e),jy={...$f,transform:e=>Math.round(CM(e))},cu={test:bx("rgb","red"),parse:WE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+jy.transform(e)+", "+jy.transform(t)+", "+jy.transform(n)+", "+Ap(Gp.transform(r))+")"};function EM(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const j0={test:bx("#"),parse:EM,transform:cu.transform},ph=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wl=ph("deg"),us=ph("%"),et=ph("px"),PM=ph("vh"),TM=ph("vw"),y1={...us,parse:e=>us.parse(e)/100,transform:e=>us.transform(e*100)},nf={test:bx("hsl","hue"),parse:WE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+us.transform(Ap(t))+", "+us.transform(Ap(n))+", "+Ap(Gp.transform(r))+")"},Tn={test:e=>cu.test(e)||j0.test(e)||nf.test(e),parse:e=>cu.test(e)?cu.parse(e):nf.test(e)?nf.parse(e):j0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?cu.transform(e):nf.transform(e),getAnimatableNone:e=>{const t=Tn.parse(e);return t.alpha=0,Tn.transform(t)}},_M=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IM(e){return isNaN(e)&&typeof e=="string"&&(e.match(yx)?.length||0)+(e.match(_M)?.length||0)>0}const HE="number",GE="color",$M="var",AM="var(",b1="${}",RM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function qp(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const c=t.replace(RM,d=>(Tn.test(d)?(r.color.push(s),i.push(GE),n.push(Tn.parse(d))):d.startsWith(AM)?(r.var.push(s),i.push($M),n.push(d)):(r.number.push(s),i.push(HE),n.push(parseFloat(d))),++s,b1)).split(b1);return{values:n,split:c,indexes:r,types:i}}function qE(e){return qp(e).values}function YE(e){const{split:t,types:n}=qp(e),r=t.length;return i=>{let s="";for(let a=0;atypeof e=="number"?0:Tn.test(e)?Tn.getAnimatableNone(e):e;function MM(e){const t=qE(e);return YE(e)(t.map(LM))}const Jl={test:IM,parse:qE,createTransformer:YE,getAnimatableNone:MM};function Vy(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function DM({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,a=0;if(!t)i=s=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,d=2*n-c;i=Vy(d,c,e+1/3),s=Vy(d,c,e),a=Vy(d,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:r}}function Mg(e,t){return n=>n>0?t:e}const sn=(e,t,n)=>e+(t-e)*n,Uy=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},NM=[j0,cu,nf],FM=e=>NM.find(t=>t.test(e));function x1(e){const t=FM(e);if(!t)return!1;let n=t.parse(e);return t===nf&&(n=DM(n)),n}const w1=(e,t)=>{const n=x1(e),r=x1(t);if(!n||!r)return Mg(e,t);const i={...n};return s=>(i.red=Uy(n.red,r.red,s),i.green=Uy(n.green,r.green,s),i.blue=Uy(n.blue,r.blue,s),i.alpha=sn(n.alpha,r.alpha,s),cu.transform(i))},V0=new Set(["none","hidden"]);function OM(e,t){return V0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function zM(e,t){return n=>sn(e,t,n)}function xx(e){return typeof e=="number"?zM:typeof e=="string"?vx(e)?Mg:Tn.test(e)?w1:VM:Array.isArray(e)?XE:typeof e=="object"?Tn.test(e)?w1:BM:Mg}function XE(e,t){const n=[...e],r=n.length,i=e.map((s,a)=>xx(s)(s,t[a]));return s=>{for(let a=0;a{for(const s in r)n[s]=r[s](i);return n}}function jM(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i{const n=Jl.createTransformer(t),r=qp(e),i=qp(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?V0.has(e)&&!i.values.length||V0.has(t)&&!r.values.length?OM(e,t):fh(XE(jM(r,i),i.values),n):Mg(e,t)};function QE(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?sn(e,t,n):xx(e)(e,t)}const UM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Yt.update(t,n),stop:()=>Ql(t),now:()=>sr.isProcessing?sr.timestamp:ri.now()}},JE=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s=Dg?1/0:t}function KM(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(wx(r),Dg);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:as(i)}}const WM=5;function ZE(e,t,n){const r=Math.max(t-WM,0);return RE(n-e(r),t-r)}const dn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ky=.001;function HM({duration:e=dn.duration,bounce:t=dn.bounce,velocity:n=dn.velocity,mass:r=dn.mass}){let i,s,a=1-t;a=Qs(dn.minDamping,dn.maxDamping,a),e=Qs(dn.minDuration,dn.maxDuration,as(e)),a<1?(i=h=>{const m=h*a,g=m*e,b=m-n,x=U0(h,a),S=Math.exp(-g);return Ky-b/x*S},s=h=>{const g=h*a*e,b=g*n+n,x=Math.pow(a,2)*Math.pow(h,2)*e,S=Math.exp(-g),P=U0(Math.pow(h,2),a);return(-i(h)+Ky>0?-1:1)*((b-x)*S)/P}):(i=h=>{const m=Math.exp(-h*e),g=(h-n)*e+1;return-Ky+m*g},s=h=>{const m=Math.exp(-h*e),g=(n-h)*(e*e);return m*g});const c=5/e,d=qM(i,s,c);if(e=ls(e),isNaN(d))return{stiffness:dn.stiffness,damping:dn.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:a*2*Math.sqrt(r*h),duration:e}}}const GM=12;function qM(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function QM(e){let t={velocity:dn.velocity,stiffness:dn.stiffness,damping:dn.damping,mass:dn.mass,isResolvedFromDuration:!1,...e};if(!S1(e,XM)&&S1(e,YM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Qs(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:dn.mass,stiffness:i,damping:s}}else{const n=HM(e);t={...t,...n,mass:dn.mass},t.isResolvedFromDuration=!0}return t}function Ng(e=dn.visualDuration,t=dn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:d,damping:h,mass:m,duration:g,velocity:b,isResolvedFromDuration:x}=QM({...n,velocity:-as(n.velocity||0)}),S=b||0,P=h/(2*Math.sqrt(d*m)),_=a-s,T=as(Math.sqrt(d/m)),R=Math.abs(_)<5;r||(r=R?dn.restSpeed.granular:dn.restSpeed.default),i||(i=R?dn.restDelta.granular:dn.restDelta.default);let L;if(P<1){const W=U0(T,P);L=M=>{const Z=Math.exp(-P*T*M);return a-Z*((S+P*T*_)/W*Math.sin(W*M)+_*Math.cos(W*M))}}else if(P===1)L=W=>a-Math.exp(-T*W)*(_+(S+T*_)*W);else{const W=T*Math.sqrt(P*P-1);L=M=>{const Z=Math.exp(-P*T*M),re=Math.min(W*M,300);return a-Z*((S+P*T*_)*Math.sinh(re)+W*_*Math.cosh(re))/W}}const B={calculatedDuration:x&&g||null,next:W=>{const M=L(W);if(x)c.done=W>=g;else{let Z=W===0?S:0;P<1&&(Z=W===0?ls(S):ZE(L,W,M));const re=Math.abs(Z)<=r,ae=Math.abs(a-M)<=i;c.done=re&&ae}return c.value=c.done?a:M,c},toString:()=>{const W=Math.min(wx(B),Dg),M=JE(Z=>B.next(W*Z).value,W,30);return W+"ms "+M},toTransition:()=>{}};return B}Ng.applyToOptions=e=>{const t=KM(e,100,Ng);return e.ease=t.ease,e.duration=ls(t.duration),e.type="keyframes",e};function K0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:d,restDelta:h=.5,restSpeed:m}){const g=e[0],b={done:!1,value:g},x=re=>c!==void 0&&red,S=re=>c===void 0?d:d===void 0||Math.abs(c-re)-P*Math.exp(-re/r),L=re=>T+R(re),B=re=>{const ae=R(re),O=L(re);b.done=Math.abs(ae)<=h,b.value=b.done?T:O};let W,M;const Z=re=>{x(b.value)&&(W=re,M=Ng({keyframes:[b.value,S(b.value)],velocity:ZE(L,re,b.value),damping:i,stiffness:s,restDelta:h,restSpeed:m}))};return Z(0),{calculatedDuration:null,next:re=>{let ae=!1;return!M&&W===void 0&&(ae=!0,B(re),Z(re)),W!==void 0&&re>=W?M.next(re-W):(!ae&&B(re),b)}}}function JM(e,t,n){const r=[],i=n||cs.mix||QE,s=e.length-1;for(let a=0;at[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=JM(t,r,i),d=c.length,h=m=>{if(a&&m1)for(;gh(Qs(e[0],e[s-1],m)):h}function eD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Hp(0,t,r);e.push(sn(n,1,i))}}function tD(e){const t=[0];return eD(t,e.length-1),t}function nD(e,t){return e.map(n=>n*t)}function rD(e,t){return e.map(()=>t||jE).splice(0,e.length-1)}function Rp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=hM(r)?r.map(v1):v1(r),s={done:!1,value:t[0]},a=nD(n&&n.length===t.length?n:tD(t),e),c=ZM(a,t,{ease:Array.isArray(i)?i:rD(t,i)});return{calculatedDuration:e,next:d=>(s.value=c(d),s.done=d>=e,s)}}const iD=e=>e!==null;function Sx(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(iD),c=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!c||r===void 0?s[c]:r}const oD={decay:K0,inertia:K0,tween:Rp,keyframes:Rp,spring:Ng};function eP(e){typeof e.type=="string"&&(e.type=oD[e.type])}class kx{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const sD=e=>e/100;class Cx extends kx{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==ri.now()&&this.tick(ri.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;eP(t);const{type:n=Rp,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:a=0}=t;let{keyframes:c}=t;const d=n||Rp;d!==Rp&&typeof c[0]!="number"&&(this.mixKeyframes=fh(sD,QE(c[0],c[1])),c=[0,100]);const h=d({...t,keyframes:c});s==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...c].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=wx(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:m,repeat:g,repeatType:b,repeatDelay:x,type:S,onUpdate:P,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-h*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?T<0:T>i;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let L=this.currentTime,B=r;if(g){const re=Math.min(this.currentTime,i)/c;let ae=Math.floor(re),O=re%1;!O&&re>=1&&(O=1),O===1&&ae--,ae=Math.min(ae,g+1),!!(ae%2)&&(b==="reverse"?(O=1-O,x&&(O-=x/c)):b==="mirror"&&(B=a)),L=Qs(0,1,O)*c}const W=R?{done:!1,value:m[0]}:B.next(L);s&&(W.value=s(W.value));let{done:M}=W;!R&&d!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const Z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return Z&&S!==K0&&(W.value=Sx(m,this.options,_,this.speed)),P&&P(W.value),Z&&this.finish(),W}then(t,n){return this.finished.then(t,n)}get duration(){return as(this.calculatedDuration)}get time(){return as(this.currentTime)}set time(t){t=ls(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ri.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=as(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=UM,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ri.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function lD(e){for(let t=1;te*180/Math.PI,W0=e=>{const t=fu(Math.atan2(e[1],e[0]));return H0(t)},aD={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:W0,rotateZ:W0,skewX:e=>fu(Math.atan(e[1])),skewY:e=>fu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},H0=e=>(e=e%360,e<0&&(e+=360),e),k1=W0,C1=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),E1=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),uD={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:C1,scaleY:E1,scale:e=>(C1(e)+E1(e))/2,rotateX:e=>H0(fu(Math.atan2(e[6],e[5]))),rotateY:e=>H0(fu(Math.atan2(-e[2],e[0]))),rotateZ:k1,rotate:k1,skewX:e=>fu(Math.atan(e[4])),skewY:e=>fu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function G0(e){return e.includes("scale")?1:0}function q0(e,t){if(!e||e==="none")return G0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=uD,i=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=aD,i=c}if(!i)return G0(t);const s=r[t],a=i[1].split(",").map(fD);return typeof s=="function"?s(a):a[s]}const cD=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return q0(n,t)};function fD(e){return parseFloat(e.trim())}const Af=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ku=new Set(Af),P1=e=>e===$f||e===et,dD=new Set(["x","y","z"]),pD=Af.filter(e=>!dD.has(e));function hD(e){const t=[];return pD.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const hu={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>q0(t,"x"),y:(e,{transform:t})=>q0(t,"y")};hu.translateX=hu.x;hu.translateY=hu.y;const mu=new Set;let Y0=!1,X0=!1,Q0=!1;function tP(){if(X0){const e=Array.from(mu).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=hD(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,a])=>{r.getValue(s)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}X0=!1,Y0=!1,mu.forEach(e=>e.complete(Q0)),mu.clear()}function nP(){mu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(X0=!0)})}function mD(){Q0=!0,nP(),tP(),Q0=!1}class Ex{constructor(t,n,r,i,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(mu.add(this),Y0||(Y0=!0,Yt.read(nP),Yt.resolveKeyframes(tP))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i?.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),i&&s===void 0&&i.set(t[0])}lD(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),mu.delete(this)}cancel(){this.state==="scheduled"&&(mu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const gD=e=>e.startsWith("--");function vD(e,t,n){gD(t)?e.style.setProperty(t,n):e.style[t]=n}const yD=dx(()=>window.ScrollTimeline!==void 0),bD={};function xD(e,t){const n=dx(e);return()=>bD[t]??n()}const rP=xD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Pp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,T1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Pp([0,.65,.55,1]),circOut:Pp([.55,0,1,.45]),backIn:Pp([.31,.01,.66,-.59]),backOut:Pp([.33,1.53,.69,.99])};function iP(e,t){if(e)return typeof e=="function"?rP()?JE(e,t):"ease-out":VE(e)?Pp(e):Array.isArray(e)?e.map(n=>iP(n,t)||T1.easeOut):T1[e]}function wD(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:a="loop",ease:c="easeOut",times:d}={},h=void 0){const m={[t]:n};d&&(m.offset=d);const g=iP(c,i);Array.isArray(g)&&(m.easing=g);const b={delay:r,duration:i,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return h&&(b.pseudoElement=h),e.animate(m,b)}function oP(e){return typeof e=="function"&&"applyToOptions"in e}function SD({type:e,...t}){return oP(e)&&rP()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class kD extends kx{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:c,onComplete:d}=t;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=t,fx(typeof t.type!="string");const h=SD(t);this.animation=wD(n,r,i,h,s),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const m=Sx(i,this.options,c,this.speed);this.updateMotionValue?this.updateMotionValue(m):vD(n,r,m),this.animation.cancel()}d?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return as(Number(t))}get time(){return as(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ls(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&yD()?(this.animation.timeline=t,Zi):n(this)}}const sP={anticipate:OE,backInOut:FE,circInOut:BE};function CD(e){return e in sP}function ED(e){typeof e.ease=="string"&&CD(e.ease)&&(e.ease=sP[e.ease])}const _1=10;class PD extends kD{constructor(t){ED(t),eP(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Cx({...a,autoplay:!1}),d=ls(this.finishedTime??this.time);n.setWithVelocity(c.sample(d-_1).value,c.sample(d).value,_1),c.stop()}}const I1=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Jl.test(e)||e==="0")&&!e.startsWith("url("));function TD(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nObject.hasOwnProperty.call(Element.prototype,"animate"));function AD(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return $D()&&n&&ID.has(n)&&(n!=="transform"||!h)&&!d&&!r&&i!=="mirror"&&s!==0&&a!=="inertia"}const RD=40;class LD extends kx{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:a="loop",keyframes:c,name:d,motionValue:h,element:m,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ri.now();const b={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:a,name:d,motionValue:h,element:m,...g},x=m?.KeyframeResolver||Ex;this.keyframeResolver=new x(c,(S,P,_)=>this.onKeyframesResolved(S,P,b,!_),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:a,velocity:c,delay:d,isHandoff:h,onUpdate:m}=r;this.resolvedAt=ri.now(),_D(t,s,a,c)||((cs.instantAnimations||!d)&&m?.(Sx(t,r,n)),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const b={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>RD?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=!h&&AD(b)?new PD({...b,element:b.motionValue.owner.current}):new Cx(b);x.finished.then(()=>this.notifyFinished()).catch(Zi),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),mD()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const MD=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function DD(e){const t=MD.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function lP(e,t,n=1){const[r,i]=DD(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const a=s.trim();return IE(a)?parseFloat(a):a}return vx(i)?lP(i,t,n+1):i}function Px(e,t){return e?.[t]??e?.default??e}const aP=new Set(["width","height","top","left","right","bottom",...Af]),ND={test:e=>e==="auto",parse:e=>e},uP=e=>t=>t.test(e),cP=[$f,et,us,Wl,TM,PM,ND],$1=e=>cP.find(uP(e));function FD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||AE(e):!0}const OD=new Set(["brightness","contrast","saturate","opacity"]);function zD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(yx)||[];if(!r)return e;const i=n.replace(r,"");let s=OD.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const BD=/\b([a-z-]*)\(.*?\)/gu,J0={...Jl,getAnimatableNone:e=>{const t=e.match(BD);return t?t.map(zD).join(" "):e}},A1={...$f,transform:Math.round},jD={rotate:Wl,rotateX:Wl,rotateY:Wl,rotateZ:Wl,scale:ng,scaleX:ng,scaleY:ng,scaleZ:ng,skew:Wl,skewX:Wl,skewY:Wl,distance:et,translateX:et,translateY:et,translateZ:et,x:et,y:et,z:et,perspective:et,transformPerspective:et,opacity:Gp,originX:y1,originY:y1,originZ:et},Tx={borderWidth:et,borderTopWidth:et,borderRightWidth:et,borderBottomWidth:et,borderLeftWidth:et,borderRadius:et,radius:et,borderTopLeftRadius:et,borderTopRightRadius:et,borderBottomRightRadius:et,borderBottomLeftRadius:et,width:et,maxWidth:et,height:et,maxHeight:et,top:et,right:et,bottom:et,left:et,padding:et,paddingTop:et,paddingRight:et,paddingBottom:et,paddingLeft:et,margin:et,marginTop:et,marginRight:et,marginBottom:et,marginLeft:et,backgroundPositionX:et,backgroundPositionY:et,...jD,zIndex:A1,fillOpacity:Gp,strokeOpacity:Gp,numOctaves:A1},VD={...Tx,color:Tn,backgroundColor:Tn,outlineColor:Tn,fill:Tn,stroke:Tn,borderColor:Tn,borderTopColor:Tn,borderRightColor:Tn,borderBottomColor:Tn,borderLeftColor:Tn,filter:J0,WebkitFilter:J0},fP=e=>VD[e];function dP(e,t){let n=fP(e);return n!==J0&&(n=Jl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const UD=new Set(["auto","none","0"]);function KD(e,t,n){let r=0,i;for(;r{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const HD=new Set(["opacity","clipPath","filter","transform"]);function GD(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const pP=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function hP(e){return $E(e)&&"offsetHeight"in e}const R1=30,qD=e=>!isNaN(parseFloat(e));class mP{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=ri.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty();i&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ri.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=qD(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new px);const r=this.events[t].add(n);return t==="change"?()=>{r(),Yt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ri.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>R1)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,R1);return RE(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bf(e,t){return new mP(e,t)}const{schedule:_x}=UE(queueMicrotask,!1),ko={x:!1,y:!1};function gP(){return ko.x||ko.y}function YD(e){return e==="x"||e==="y"?ko[e]?null:(ko[e]=!0,()=>{ko[e]=!1}):ko.x||ko.y?null:(ko.x=ko.y=!0,()=>{ko.x=ko.y=!1})}function vP(e,t){const n=GD(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function L1(e){return!(e.pointerType==="touch"||gP())}function XD(e,t,n={}){const[r,i,s]=vP(e,n),a=c=>{if(!L1(c))return;const{target:d}=c,h=t(d,c);if(typeof h!="function"||!d)return;const m=g=>{L1(g)&&(h(g),d.removeEventListener("pointerleave",m))};d.addEventListener("pointerleave",m,i)};return r.forEach(c=>{c.addEventListener("pointerenter",a,i)}),s}const yP=(e,t)=>t?e===t?!0:yP(e,t.parentElement):!1,Ix=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,QD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function JD(e){return QD.has(e.tagName)||e.tabIndex!==-1}const wg=new WeakSet;function M1(e){return t=>{t.key==="Enter"&&e(t)}}function Wy(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ZD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=M1(()=>{if(wg.has(n))return;Wy(n,"down");const i=M1(()=>{Wy(n,"up")}),s=()=>Wy(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function D1(e){return Ix(e)&&!gP()}function e3(e,t,n={}){const[r,i,s]=vP(e,n),a=c=>{const d=c.currentTarget;if(!D1(c))return;wg.add(d);const h=t(d,c),m=(x,S)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",b),wg.has(d)&&wg.delete(d),D1(x)&&typeof h=="function"&&h(x,{success:S})},g=x=>{m(x,d===window||d===document||n.useGlobalTarget||yP(d,x.target))},b=x=>{m(x,!1)};window.addEventListener("pointerup",g,i),window.addEventListener("pointercancel",b,i)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,i),hP(c)&&(c.addEventListener("focus",h=>ZD(h,i)),!JD(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function bP(e){return $E(e)&&"ownerSVGElement"in e}function t3(e){return bP(e)&&e.tagName==="svg"}const yr=e=>!!(e&&e.getVelocity),n3=[...cP,Tn,Jl],r3=e=>n3.find(uP(e)),Yp=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class i3 extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=hP(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function o3({children:e,isPresent:t,anchorX:n,root:r}){const i=k.useId(),s=k.useRef(null),a=k.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:c}=k.useContext(Yp);return k.useInsertionEffect(()=>{const{width:d,height:h,top:m,left:g,right:b}=a.current;if(t||!s.current||!d||!h)return;const x=n==="left"?`left: ${g}`:`right: ${b}`;s.current.dataset.motionPopId=i;const S=document.createElement("style");c&&(S.nonce=c);const P=r??document.head;return P.appendChild(S),S.sheet&&S.sheet.insertRule(` [data-motion-pop-id="${i}"] { position: absolute !important; width: ${d}px !important; @@ -46,30 +46,30 @@ Error generating stack: `+C.message+` ${x}px !important; top: ${m}px !important; } - `),()=>{P.removeChild(S),P.contains(S)&&P.removeChild(S)}},[t]),F.jsx(s3,{isPresent:t,childRef:s,sizeRef:a,children:k.cloneElement(e,{ref:s})})}const a3=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:a,anchorX:c,root:d})=>{const h=ch(u3),m=k.useId();let g=!0,b=k.useMemo(()=>(g=!1,{id:m,initial:t,isPresent:n,custom:i,onExitComplete:x=>{h.set(x,!0);for(const S of h.values())if(!S)return;r&&r()},register:x=>(h.set(x,!1),()=>h.delete(x))}),[n,h,r]);return s&&g&&(b={...b}),k.useMemo(()=>{h.forEach((x,S)=>h.set(S,!1))},[n]),k.useEffect(()=>{!n&&!h.size&&r&&r()},[n]),a==="popLayout"&&(e=F.jsx(l3,{isPresent:n,anchorX:c,root:d,children:e})),F.jsx(lv.Provider,{value:b,children:e})};function u3(){return new Map}function SP(e=!0){const t=k.useContext(lv);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=k.useId();k.useEffect(()=>{if(e)return i(s)},[e]);const a=k.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const rg=e=>e.key||"";function F1(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const Rf=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:a=!1,anchorX:c="left",root:d})=>{const[h,m]=SP(a),g=k.useMemo(()=>F1(e),[e]),b=a&&!h?[]:g.map(rg),x=k.useRef(!0),S=k.useRef(g),P=ch(()=>new Map),[_,T]=k.useState(g),[R,L]=k.useState(g);ux(()=>{x.current=!1,S.current=g;for(let M=0;M{const Z=rg(M),re=a&&!h?!1:g===R||b.includes(Z),ae=()=>{if(P.has(Z))P.set(Z,!0);else return;let O=!0;P.forEach(U=>{U||(O=!1)}),O&&(W?.(),L(S.current),a&&m?.(),r&&r())};return F.jsx(a3,{isPresent:re,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:d,onExitComplete:re?void 0:ae,anchorX:c,children:M},Z)})})},c3=k.createContext(null);function f3(){const e=k.useRef(!1);return ux(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function d3(){const e=f3(),[t,n]=k.useState(0),r=k.useCallback(()=>{e.current&&n(t+1)},[t]);return[k.useCallback(()=>Yt.postRender(r),[r]),t]}const p3=e=>!e.isLayoutDirty&&e.willUpdate(!1);function O1(){const e=new Set,t=new WeakMap,n=()=>e.forEach(p3);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}const kP=e=>e===!0,h3=e=>kP(e===!0)||e==="id",m3=({children:e,id:t,inherit:n=!0})=>{const r=k.useContext(Wp),i=k.useContext(c3),[s,a]=d3(),c=k.useRef(null),d=r.id||i;c.current===null&&(h3(n)&&d&&(t=t?d+"-"+t:d),c.current={id:t,group:kP(n)&&r.group||O1()});const h=k.useMemo(()=>({...c.current,forceRender:s}),[a]);return F.jsx(Wp.Provider,{value:h,children:e})},Ax=k.createContext({strict:!1}),z1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},xf={};for(const e in z1)xf[e]={isEnabled:t=>z1[e].some(n=>!!t[n])};function Z0(e){for(const t in e)xf[t]={...xf[t],...e[t]}}function wf({children:e,features:t,strict:n=!1}){const[,r]=k.useState(!Hy(t)),i=k.useRef(void 0);if(!Hy(t)){const{renderer:s,...a}=t;i.current=s,Z0(a)}return k.useEffect(()=>{Hy(t)&&t().then(({renderer:s,...a})=>{Z0(a),i.current=s,r(!0)})},[]),F.jsx(Ax.Provider,{value:{renderer:i.current,strict:n},children:e})}function Hy(e){return typeof e=="function"}const g3=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Fg(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||g3.has(e)}let CP=e=>!Fg(e);function EP(e){typeof e=="function"&&(CP=t=>t.startsWith("on")?!Fg(t):e(t))}try{EP(require("@emotion/is-prop-valid").default)}catch{}function v3(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(CP(i)||n===!0&&Fg(i)||!t&&!Fg(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function y3({children:e,isValidProp:t,...n}){t&&EP(t),n={...k.useContext(Yp),...n},n.isStatic=ch(()=>n.isStatic);const r=k.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return F.jsx(Yp.Provider,{value:r,children:e})}const av=k.createContext({});function uv(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Xp(e){return typeof e=="string"||Array.isArray(e)}const Rx=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lx=["initial",...Rx];function cv(e){return uv(e.animate)||Lx.some(t=>Xp(e[t]))}function PP(e){return!!(cv(e)||e.variants)}function b3(e,t){if(cv(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Xp(n)?n:void 0,animate:Xp(r)?r:void 0}}return e.inherit!==!1?t:{}}function x3(e){const{initial:t,animate:n}=b3(e,k.useContext(av));return k.useMemo(()=>({initial:t,animate:n}),[B1(t),B1(n)])}function B1(e){return Array.isArray(e)?e.join(" "):e}const Qp={};function w3(e){for(const t in e)Qp[t]=e[t],vx(t)&&(Qp[t].isCSSVariable=!0)}function TP(e,{layout:t,layoutId:n}){return Cu.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qp[e]||e==="opacity")}const S3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},k3=Af.length;function C3(e,t,n){let r="",i=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}});function _P(e,t,n){for(const r in t)!yr(t[r])&&!TP(r,n)&&(e[r]=t[r])}function E3({transformTemplate:e},t){return k.useMemo(()=>{const n=Dx();return Mx(n,t,e),Object.assign({},n.vars,n.style)},[t])}function P3(e,t){const n=e.style||{},r={};return _P(r,n,e),Object.assign(r,E3(e,t)),r}function T3(e,t){const n={},r=P3(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const _3={offset:"stroke-dashoffset",array:"stroke-dasharray"},I3={offset:"strokeDashoffset",array:"strokeDasharray"};function $3(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?_3:I3;e[s.offset]=et.transform(-r);const a=et.transform(t),c=et.transform(n);e[s.array]=`${a} ${c}`}function IP(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:a=0,...c},d,h,m){if(Mx(e,c,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:b}=e;g.transform&&(b.transform=g.transform,delete g.transform),(b.transform||g.transformOrigin)&&(b.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),b.transform&&(b.transformBox=m?.transformBox??"fill-box",delete g.transformBox),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),i!==void 0&&$3(g,i,s,a,!1)}const $P=()=>({...Dx(),attrs:{}}),AP=e=>typeof e=="string"&&e.toLowerCase()==="svg";function A3(e,t,n,r){const i=k.useMemo(()=>{const s=$P();return IP(s,t,AP(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};_P(s,e.style,e),i.style={...s,...i.style}}return i}const R3=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Nx(e){return typeof e!="string"||e.includes("-")?!1:!!(R3.indexOf(e)>-1||/[A-Z]/u.test(e))}function L3(e,t,n,{latestValues:r},i,s=!1){const c=(Nx(e)?A3:T3)(t,r,i,e),d=v3(t,typeof e=="string",s),h=e!==k.Fragment?{...d,...c,ref:n}:{},{children:m}=t,g=k.useMemo(()=>yr(m)?m.get():m,[m]);return k.createElement(e,{...h,children:g})}function j1(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Fx(e,t,n,r){if(typeof t=="function"){const[i,s]=j1(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=j1(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Sg(e){return yr(e)?e.get():e}function M3({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:D3(n,r,i,e),renderState:t()}}function D3(e,t,n,r){const i={},s=r(e,{});for(const b in s)i[b]=Sg(s[b]);let{initial:a,animate:c}=e;const d=cv(e),h=PP(e);t&&h&&!d&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||a===!1;const g=m?c:a;if(g&&typeof g!="boolean"&&!uv(g)){const b=Array.isArray(g)?g:[g];for(let x=0;x(t,n)=>{const r=k.useContext(av),i=k.useContext(lv),s=()=>M3(e,t,r,i);return n?s():ch(s)};function Ox(e,t,n){const{style:r}=e,i={};for(const s in r)(yr(r[s])||t.style&&yr(t.style[s])||TP(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}const N3=RP({scrapeMotionValuesFromProps:Ox,createRenderState:Dx});function LP(e,t,n){const r=Ox(e,t,n);for(const i in e)if(yr(e[i])||yr(t[i])){const s=Af.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const F3=RP({scrapeMotionValuesFromProps:LP,createRenderState:$P}),O3=Symbol.for("motionComponentSymbol");function of(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function z3(e,t,n){return k.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):of(n)&&(n.current=r))},[t])}const zx=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),B3="framerAppearId",MP="data-"+zx(B3),DP=k.createContext({});function j3(e,t,n,r,i){const{visualElement:s}=k.useContext(av),a=k.useContext(Ax),c=k.useContext(lv),d=k.useContext(Yp).reducedMotion,h=k.useRef(null);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d}));const m=h.current,g=k.useContext(DP);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&V3(h.current,n,i,g);const b=k.useRef(!1);k.useInsertionEffect(()=>{m&&b.current&&m.update(n,c)});const x=n[MP],S=k.useRef(!!x&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return ux(()=>{m&&(b.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),S.current&&m.animationState&&m.animationState.animateChanges())}),k.useEffect(()=>{m&&(!S.current&&m.animationState&&m.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),S.current=!1))}),m}function V3(e,t,n,r){const{layoutId:i,layout:s,drag:a,dragConstraints:c,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:NP(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!a||c&&of(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:h})}function NP(e){if(e)return e.options.allowProjection!==!1?e.projection:NP(e.parent)}function Gy(e,{forwardMotionProps:t=!1}={},n,r){n&&Z0(n);const i=Nx(e)?F3:N3;function s(c,d){let h;const m={...k.useContext(Yp),...c,layoutId:U3(c)},{isStatic:g}=m,b=x3(c),x=i(c,g);if(!g&&ax){K3();const S=W3(m);h=S.MeasureLayout,b.visualElement=j3(e,x,m,r,S.ProjectionNode)}return F.jsxs(av.Provider,{value:b,children:[h&&b.visualElement?F.jsx(h,{visualElement:b.visualElement,...m}):null,L3(e,c,z3(x,b.visualElement,d),x,g,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=k.forwardRef(s);return a[O3]=e,a}function U3({layoutId:e}){const t=k.useContext(Wp).id;return t&&e!==void 0?t+"-"+e:e}function K3(e,t){k.useContext(Ax).strict}function W3(e){const{drag:t,layout:n}=xf;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function FP(e,t){if(typeof Proxy>"u")return Gy;const n=new Map,r=(s,a)=>Gy(s,a,e,t),i=(s,a)=>r(s,a);return new Proxy(i,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,Gy(a,void 0,e,t)),n.get(a))})}const Sf=FP();function OP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function H3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function G3(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function qy(e){return e===void 0||e===1}function eb({scale:e,scaleX:t,scaleY:n}){return!qy(e)||!qy(t)||!qy(n)}function uu(e){return eb(e)||zP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zP(e){return V1(e.x)||V1(e.y)}function V1(e){return e&&e!=="0%"}function Og(e,t,n){const r=e-n,i=t*r;return n+i}function U1(e,t,n,r,i){return i!==void 0&&(e=Og(e,i,r)),Og(e,n,r)+t}function tb(e,t=0,n=1,r,i){e.min=U1(e.min,t,n,r,i),e.max=U1(e.max,t,n,r,i)}function BP(e,{x:t,y:n}){tb(e.x,t.translate,t.scale,t.originPoint),tb(e.y,n.translate,n.scale,n.originPoint)}const K1=.999999999999,W1=1.0000000000001;function q3(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,a;for(let c=0;cK1&&(t.x=1),t.yK1&&(t.y=1)}function sf(e,t){e.min=e.min+t,e.max=e.max+t}function H1(e,t,n,r,i=.5){const s=sn(e.min,e.max,i);tb(e,t,n,s,r)}function lf(e,t){H1(e.x,t.x,t.scaleX,t.scale,t.originX),H1(e.y,t.y,t.scaleY,t.scale,t.originY)}function jP(e,t){return OP(G3(e.getBoundingClientRect(),t))}function Y3(e,t,n){const r=jP(e,n),{scroll:i}=t;return i&&(sf(r.x,i.offset.x),sf(r.y,i.offset.y)),r}const G1=()=>({translate:0,scale:1,origin:0,originPoint:0}),af=()=>({x:G1(),y:G1()}),q1=()=>({min:0,max:0}),xn=()=>({x:q1(),y:q1()}),nb={current:null},VP={current:!1};function X3(){if(VP.current=!0,!!ax)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nb.current=e.matches;e.addEventListener("change",t),t()}else nb.current=!1}const Q3=new WeakMap;function J3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(yr(i))e.addValue(r,i);else if(yr(s))e.addValue(r,bf(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,bf(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Y1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Z3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Px,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=ii.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),VP.current||X3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:nb.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Jl(this.notifyUpdate),Jl(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Cu.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Yt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in xf){const n=xf[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=bf(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(AE(r)||LE(r))?r=parseFloat(r):!o3(r)&&Zl.test(n)&&(r=hP(t,n)),this.setBaseTarget(t,yr(r)?r.get():r)),yr(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=Fx(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!yr(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new hx),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Ix.render(this.render)}}class UP extends Z3{constructor(){super(...arguments),this.KeyframeResolver=GD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;yr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function KP(e,{style:t,vars:n},r,i){const s=e.style;let a;for(a in t)s[a]=t[a];i?.applyProjectionStyles(s,r);for(a in n)s.setProperty(a,n[a])}function e4(e){return window.getComputedStyle(e)}class t4 extends UP{constructor(){super(...arguments),this.type="html",this.renderInstance=KP}readValueFromInstance(t,n){if(Cu.has(n))return this.projection?.isProjecting?G0(n):dD(t,n);{const r=e4(t),i=(vx(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return jP(t,n)}build(t,n,r){Mx(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ox(t,n,r)}}const WP=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function n4(e,t,n,r){KP(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(WP.has(i)?i:zx(i),t.attrs[i])}class r4 extends UP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Cu.has(n)){const r=pP(n);return r&&r.default||0}return n=WP.has(n)?n:zx(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return LP(t,n,r)}build(t,n,r){IP(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){n4(t,n,r,i)}mount(t){this.isSVGTag=AP(t.tagName),super.mount(t)}}const i4=(e,t)=>Nx(e)?new r4(t):new t4(t,{allowProjection:e!==k.Fragment});function Jp(e,t,n){const r=e.getProps();return Fx(r,t,n!==void 0?n:r.custom,e)}const rb=e=>Array.isArray(e);function o4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bf(n))}function s4(e){return rb(e)?e[e.length-1]||0:e}function l4(e,t){const n=Jp(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const a in s){const c=s4(s[a]);o4(e,a,c)}}function a4(e){return!!(yr(e)&&e.add)}function ib(e,t){const n=e.getValue("willChange");if(a4(n))return n.add(t);if(!n&&cs.WillChange){const r=new cs.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function HP(e){return e.props[MP]}const u4=e=>e!==null;function c4(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(u4),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const f4={type:"spring",stiffness:500,damping:25,restSpeed:10},d4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),p4={type:"keyframes",duration:.8},h4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},m4=(e,{keyframes:t})=>t.length>2?p4:Cu.has(e)?e.startsWith("scale")?d4(t[1]):f4:h4;function g4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:a,repeatDelay:c,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const Bx=(e,t,n,r={},i,s)=>a=>{const c=Tx(r,e)||{},d=c.delay||r.delay||0;let{elapsed:h=0}=r;h=h-ls(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-h,onUpdate:b=>{t.set(b),c.onUpdate&&c.onUpdate(b)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:i};g4(c)||Object.assign(m,m4(e,m)),m.duration&&(m.duration=ls(m.duration)),m.repeatDelay&&(m.repeatDelay=ls(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(g=!0)),(cs.instantAnimations||cs.skipAnimations)&&(g=!0,m.duration=0,m.delay=0),m.allowFlatten=!c.type&&!c.ease,g&&!s&&t.get()!==void 0){const b=c4(m.keyframes,c);if(b!==void 0){Yt.update(()=>{m.onUpdate(b),m.onComplete()});return}}return c.isSync?new Ex(m):new DD(m)};function v4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function GP(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(s=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const m in c){const g=e.getValue(m,e.latestValues[m]??null),b=c[m];if(b===void 0||h&&v4(h,m))continue;const x={delay:n,...Tx(s||{},m)},S=g.get();if(S!==void 0&&!g.isAnimating&&!Array.isArray(b)&&b===S&&!x.velocity)continue;let P=!1;if(window.MotionHandoffAnimation){const T=HP(e);if(T){const R=window.MotionHandoffAnimation(T,m,Yt);R!==null&&(x.startTime=R,P=!0)}}ib(e,m),g.start(Bx(m,g,b,e.shouldReduceMotion&&cP.has(m)?{type:!1}:x,e,P));const _=g.animation;_&&d.push(_)}return a&&Promise.all(d).then(()=>{Yt.update(()=>{a&&l4(e,a)})}),d}function ob(e,t,n={}){const r=Jp(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(GP(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=i;return y4(e,t,d,h,m,g,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[d,h]=c==="beforeChildren"?[s,a]:[a,s];return d().then(()=>h())}else return Promise.all([s(),a(n.delay)])}function y4(e,t,n=0,r=0,i=0,s=1,a){const c=[],d=e.variantChildren.size,h=(d-1)*i,m=typeof r=="function",g=m?b=>r(b,d):s===1?(b=0)=>b*i:(b=0)=>h-b*i;return Array.from(e.variantChildren).sort(b4).forEach((b,x)=>{b.notify("AnimationStart",t),c.push(ob(b,t,{...a,delay:n+(m?0:r)+g(x)}).then(()=>b.notify("AnimationComplete",t)))}),Promise.all(c)}function b4(e,t){return e.sortNodePosition(t)}function x4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>ob(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=ob(e,t,n);else{const i=typeof t=="function"?Jp(e,t,n.custom):t;r=Promise.all(GP(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function qP(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>x4(e,n,r)))}function E4(e){let t=C4(e),n=X1(),r=!0;const i=d=>(h,m)=>{const g=Jp(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(g){const{transition:b,transitionEnd:x,...S}=g;h={...h,...S,...x}}return h};function s(d){t=d(e)}function a(d){const{props:h}=e,m=YP(e.parent)||{},g=[],b=new Set;let x={},S=1/0;for(let _=0;_S&&B,ae=!1;const O=Array.isArray(L)?L:[L];let U=O.reduce(i(T),{});W===!1&&(U={});const{prevResolvedValues:X={}}=R,ne={...X,...U},G=q=>{re=!0,b.has(q)&&(ae=!0,b.delete(q)),R.needsAnimating[q]=!0;const K=e.getValue(q);K&&(K.liveStyle=!1)};for(const q in ne){const K=U[q],se=X[q];if(x.hasOwnProperty(q))continue;let A=!1;rb(K)&&rb(se)?A=!qP(K,se):A=K!==se,A?K!=null?G(q):b.add(q):K!==void 0&&b.has(q)?G(q):R.protectedKeys[q]=!0}R.prevProp=L,R.prevResolvedValues=U,R.isActive&&(x={...x,...U}),r&&e.blockInitialAnimation&&(re=!1),re&&(!(M&&Z)||ae)&&g.push(...O.map(q=>({animation:q,options:{type:T}})))}if(b.size){const _={};if(typeof h.initial!="boolean"){const T=Jp(e,Array.isArray(h.initial)?h.initial[0]:h.initial);T&&T.transition&&(_.transition=T.transition)}b.forEach(T=>{const R=e.getBaseTarget(T),L=e.getValue(T);L&&(L.liveStyle=!0),_[T]=R??null}),g.push({animation:_})}let P=!!g.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(g):Promise.resolve()}function c(d,h){if(n[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(g=>g.animationState?.setActive(d,h)),n[d].isActive=h;const m=a(d);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=X1(),r=!0}}}function P4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qP(t,e):!1}function nu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function X1(){return{animate:nu(!0),whileInView:nu(),whileHover:nu(),whileTap:nu(),whileDrag:nu(),whileFocus:nu(),exit:nu()}}class ea{constructor(t){this.isMounted=!1,this.node=t}update(){}}class T4 extends ea{constructor(t){super(t),t.animationState||(t.animationState=E4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();uv(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let _4=0;class I4 extends ea{constructor(){super(...arguments),this.id=_4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const $4={animation:{Feature:T4},exit:{Feature:I4}};function Zp(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hh(e){return{point:{x:e.pageX,y:e.pageY}}}const A4=e=>t=>$x(t)&&e(t,hh(t));function Lp(e,t,n,r){return Zp(e,t,A4(n),r)}const XP=1e-4,R4=1-XP,L4=1+XP,QP=.01,M4=0-QP,D4=0+QP;function Mr(e){return e.max-e.min}function N4(e,t,n){return Math.abs(e-t)<=n}function Q1(e,t,n,r=.5){e.origin=r,e.originPoint=sn(t.min,t.max,e.origin),e.scale=Mr(n)/Mr(t),e.translate=sn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=R4&&e.scale<=L4||isNaN(e.scale))&&(e.scale=1),(e.translate>=M4&&e.translate<=D4||isNaN(e.translate))&&(e.translate=0)}function Mp(e,t,n,r){Q1(e.x,t.x,n.x,r?r.originX:void 0),Q1(e.y,t.y,n.y,r?r.originY:void 0)}function J1(e,t,n){e.min=n.min+t.min,e.max=e.min+Mr(t)}function F4(e,t,n){J1(e.x,t.x,n.x),J1(e.y,t.y,n.y)}function Z1(e,t,n){e.min=t.min-n.min,e.max=e.min+Mr(t)}function Dp(e,t,n){Z1(e.x,t.x,n.x),Z1(e.y,t.y,n.y)}function Gi(e){return[e("x"),e("y")]}const JP=({current:e})=>e?e.ownerDocument.defaultView:null,eS=(e,t)=>Math.abs(e-t);function O4(e,t){const n=eS(e.x,t.x),r=eS(e.y,t.y);return Math.sqrt(n**2+r**2)}class ZP{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Xy(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,S=O4(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!S)return;const{point:P}=b,{timestamp:_}=sr;this.history.push({...P,timestamp:_});const{onStart:T,onMove:R}=this.handlers;x||(T&&T(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,b)},this.handlePointerMove=(b,x)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Yy(x,this.transformPagePoint),Yt.update(this.updatePoint,!0)},this.handlePointerUp=(b,x)=>{this.end();const{onEnd:S,onSessionEnd:P,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Xy(b.type==="pointercancel"?this.lastMoveEventInfo:Yy(x,this.transformPagePoint),this.history);this.startEvent&&S&&S(b,T),P&&P(b,T)},!$x(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const c=hh(t),d=Yy(c,this.transformPagePoint),{point:h}=d,{timestamp:m}=sr;this.history=[{...h,timestamp:m}];const{onSessionStart:g}=n;g&&g(t,Xy(d,this.history)),this.removeListeners=fh(Lp(this.contextWindow,"pointermove",this.handlePointerMove),Lp(this.contextWindow,"pointerup",this.handlePointerUp),Lp(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Jl(this.updatePoint)}}function Yy(e,t){return t?{point:t(e.point)}:e}function tS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xy({point:e},t){return{point:e,delta:tS(e,eT(t)),offset:tS(e,z4(t)),velocity:B4(t,.1)}}function z4(e){return e[0]}function eT(e){return e[e.length-1]}function B4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=eT(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ls(t)));)n--;if(!r)return{x:0,y:0};const s=as(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function j4(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?sn(n,e,r.max):Math.min(e,n)),e}function nS(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function V4(e,{top:t,left:n,bottom:r,right:i}){return{x:nS(e.x,n,i),y:nS(e.y,t,r)}}function rS(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Hp(t.min,t.max-r,e.min):r>i&&(n=Hp(e.min,e.max-i,t.min)),Qs(0,1,n)}function W4(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const sb=.35;function H4(e=sb){return e===!1?e=0:e===!0&&(e=sb),{x:iS(e,"left","right"),y:iS(e,"top","bottom")}}function iS(e,t,n){return{min:oS(e,t),max:oS(e,n)}}function oS(e,t){return typeof e=="number"?e:e[t]||0}const G4=new WeakMap;class q4{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=g=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(hh(g).point)},a=(g,b)=>{const{drag:x,dragPropagation:S,onDragStart:P}=this.getProps();if(x&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=QD(x),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gi(T=>{let R=this.getAxisMotionValue(T).get()||0;if(us.test(R)){const{projection:L}=this.visualElement;if(L&&L.layout){const B=L.layout.layoutBox[T];B&&(R=Mr(B)*(parseFloat(R)/100))}}this.originPoint[T]=R}),P&&Yt.postRender(()=>P(g,b)),ib(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},c=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b;const{dragPropagation:x,dragDirectionLock:S,onDirectionLock:P,onDrag:_}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:T}=b;if(S&&this.currentDirection===null){this.currentDirection=Y4(T),this.currentDirection!==null&&P&&P(this.currentDirection);return}this.updateAxis("x",b.point,T),this.updateAxis("y",b.point,T),this.visualElement.render(),_&&_(g,b)},d=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b,this.stop(g,b),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Gi(g=>this.getAnimationState(g)==="paused"&&this.getAxisMotionValue(g).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new ZP(t,{onSessionStart:s,onStart:a,onMove:c,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:JP(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Yt.postRender(()=>c(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ig(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=j4(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&of(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=V4(r.layoutBox,t):this.constraints=!1,this.elastic=H4(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Gi(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=W4(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!of(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Y3(r,i.root,this.visualElement.getTransformPagePoint());let a=U4(i.layout.layoutBox,s);if(n){const c=n(H3(a));this.hasMutatedConstraints=!!c,c&&(a=OP(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),d=this.constraints||{},h=Gi(m=>{if(!ig(m,n,this.currentDirection))return;let g=d&&d[m]||{};a&&(g={min:0,max:0});const b=i?200:1e6,x=i?40:1e7,S={type:"inertia",velocity:r?t[m]:0,bounceStiffness:b,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...s,...g};return this.startAxisValueAnimation(m,S)});return Promise.all(h).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ib(this.visualElement,t),r.start(Bx(t,r,0,n,this.visualElement,!1))}stopAnimation(){Gi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Gi(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Gi(n=>{const{drag:r}=this.getProps();if(!ig(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:c}=i.layout.layoutBox[n];s.set(t[n]-sn(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!of(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Gi(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const d=c.get();i[a]=K4({min:d,max:d},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Gi(a=>{if(!ig(a,t,null))return;const c=this.getAxisMotionValue(a),{min:d,max:h}=this.constraints[a];c.set(sn(d,h,i[a]))})}addListeners(){if(!this.visualElement.current)return;G4.set(this.visualElement,this);const t=this.visualElement.current,n=Lp(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();of(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Yt.read(r);const a=Zp(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Gi(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=d[m].translate,g.set(g.get()+d[m].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=sb,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function ig(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Y4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class X4 extends ea{constructor(t){super(t),this.removeGroupControls=Zi,this.removeListeners=Zi,this.controls=new q4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zi}unmount(){this.removeGroupControls(),this.removeListeners()}}const sS=e=>(t,n)=>{e&&Yt.postRender(()=>e(t,n))};class Q4 extends ea{constructor(){super(...arguments),this.removePointerDownListener=Zi}onPointerDown(t){this.session=new ZP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:JP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:sS(t),onStart:sS(n),onMove:r,onEnd:(s,a)=>{delete this.session,i&&Yt.postRender(()=>i(s,a))}}}mount(){this.removePointerDownListener=Lp(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const kg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cp={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(et.test(e))e=parseFloat(e);else return e;const n=lS(e,t.target.x),r=lS(e,t.target.y);return`${n}% ${r}%`}},J4={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Zl.parse(e);if(i.length>5)return r;const s=Zl.createTransformer(e),a=typeof i[0]!="number"?1:0,c=n.x.scale*t.x,d=n.y.scale*t.y;i[0+a]/=c,i[1+a]/=d;const h=sn(c,d,.5);return typeof i[2+a]=="number"&&(i[2+a]/=h),typeof i[3+a]=="number"&&(i[3+a]/=h),s(i)}};let aS=!1;class Z4 extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;w3(eN),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),aS&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),kg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,aS=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Yt.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ix.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tT(e){const[t,n]=SP(),r=k.useContext(Wp);return F.jsx(Z4,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(DP),isPresent:t,safeToRemove:n})}const eN={borderRadius:{...cp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cp,borderTopRightRadius:cp,borderBottomLeftRadius:cp,borderBottomRightRadius:cp,boxShadow:J4};function tN(e,t,n){const r=yr(e)?e:bf(e);return r.start(Bx("",r,t,n)),r.animation}const nN=(e,t)=>e.depth-t.depth;class rN{constructor(){this.children=[],this.isDirty=!1}add(t){cx(this.children,t),this.isDirty=!0}remove(t){fx(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nN),this.isDirty=!1,this.children.forEach(t)}}function iN(e,t){const n=ii.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Jl(r),e(s-t))};return Yt.setup(r,!0),()=>Jl(r)}const nT=["TopLeft","TopRight","BottomLeft","BottomRight"],oN=nT.length,uS=e=>typeof e=="string"?parseFloat(e):e,cS=e=>typeof e=="number"||et.test(e);function sN(e,t,n,r,i,s){i?(e.opacity=sn(0,n.opacity??1,lN(r)),e.opacityExit=sn(t.opacity??1,0,aN(r))):s&&(e.opacity=sn(t.opacity??1,n.opacity??1,r));for(let a=0;art?1:n(Hp(e,t,r))}function dS(e,t){e.min=t.min,e.max=t.max}function Wi(e,t){dS(e.x,t.x),dS(e.y,t.y)}function pS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hS(e,t,n,r,i){return e-=t,e=Og(e,1/n,r),i!==void 0&&(e=Og(e,1/i,r)),e}function uN(e,t=0,n=1,r=.5,i,s=e,a=e){if(us.test(t)&&(t=parseFloat(t),t=sn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=sn(s.min,s.max,r);e===s&&(c-=t),e.min=hS(e.min,t,n,c,i),e.max=hS(e.max,t,n,c,i)}function mS(e,t,[n,r,i],s,a){uN(e,t[n],t[r],t[i],t.scale,s,a)}const cN=["x","scaleX","originX"],fN=["y","scaleY","originY"];function gS(e,t,n,r){mS(e.x,t,cN,n?n.x:void 0,r?r.x:void 0),mS(e.y,t,fN,n?n.y:void 0,r?r.y:void 0)}function vS(e){return e.translate===0&&e.scale===1}function iT(e){return vS(e.x)&&vS(e.y)}function yS(e,t){return e.min===t.min&&e.max===t.max}function dN(e,t){return yS(e.x,t.x)&&yS(e.y,t.y)}function bS(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function oT(e,t){return bS(e.x,t.x)&&bS(e.y,t.y)}function xS(e){return Mr(e.x)/Mr(e.y)}function wS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class pN{constructor(){this.members=[]}add(t){cx(this.members,t),t.scheduleRender()}remove(t){if(fx(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function hN(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,a=n?.z||0;if((i||s||a)&&(r=`translate3d(${i}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,rotateX:g,rotateY:b,skewX:x,skewY:S}=n;h&&(r=`perspective(${h}px) ${r}`),m&&(r+=`rotate(${m}deg) `),g&&(r+=`rotateX(${g}deg) `),b&&(r+=`rotateY(${b}deg) `),x&&(r+=`skewX(${x}deg) `),S&&(r+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,d=e.y.scale*t.y;return(c!==1||d!==1)&&(r+=`scale(${c}, ${d})`),r||"none"}const Qy=["","X","Y","Z"],mN=1e3;let gN=0;function Jy(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=HP(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Yt,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&sT(r)}function lT({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},c=t?.()){this.id=gN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(bN),this.nodes.forEach(kN),this.nodes.forEach(CN),this.nodes.forEach(xN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let d=0;dthis.root.updateBlockedByResize=!1;Yt.read(()=>{g=window.innerWidth}),e(a,()=>{const x=window.innerWidth;x!==g&&(g=x,this.root.updateBlockedByResize=!0,m&&m(),m=iN(b,250),kg.hasAnimatedSinceResize&&(kg.hasAnimatedSinceResize=!1,this.nodes.forEach(CS)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:b,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||IN,{onLayoutAnimationStart:P,onLayoutAnimationComplete:_}=h.getProps(),T=!this.targetLayout||!oT(this.targetLayout,x),R=!g&&b;if(this.options.layoutRoot||this.resumeFrom||R||g&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const L={...Tx(S,"layout"),onPlay:P,onComplete:_};(h.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L),this.setAnimationOrigin(m,R)}else g||CS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Jl(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(EN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Mr(this.snapshot.measuredBox.x)&&!Mr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d{const W=B/1e3;ES(g.x,a.x,W),ES(g.y,a.y,W),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dp(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),TN(this.relativeTarget,this.relativeTargetOrigin,b,W),L&&dN(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=xn()),Wi(L,this.relativeTarget)),P&&(this.animationValues=m,sN(m,h,this.latestValues,W,R,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=W},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Jl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Yt.update(()=>{kg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=bf(0)),this.currentAnimation=tN(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(mN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:d,layout:h,latestValues:m}=a;if(!(!c||!d||!h)){if(this!==a&&this.layout&&h&&aT(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||xn();const g=Mr(this.layout.layoutBox.x);d.x.min=a.target.x.min,d.x.max=d.x.min+g;const b=Mr(this.layout.layoutBox.y);d.y.min=a.target.y.min,d.y.max=d.y.min+b}Wi(c,d),lf(c,m),Mp(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new pN),this.sharedNodes.get(a).add(c);const h=c.options.initialPromotionConfig;c.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:d}=a;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(c=!0),!c)return;const h={};d.z&&Jy("z",a,h,this.animationValues);for(let m=0;ma.currentAnimation?.stop()),this.root.nodes.forEach(SS),this.root.sharedNodes.clear()}}}function vN(e){e.updateLayout()}function yN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,s=t.source!==e.layout.source;i==="size"?Gi(m=>{const g=s?t.measuredBox[m]:t.layoutBox[m],b=Mr(g);g.min=n[m].min,g.max=g.min+b}):aT(i,t.layoutBox,n)&&Gi(m=>{const g=s?t.measuredBox[m]:t.layoutBox[m],b=Mr(n[m]);g.max=g.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+b)});const a=af();Mp(a,n,t.layoutBox);const c=af();s?Mp(c,e.applyTransform(r,!0),t.measuredBox):Mp(c,n,t.layoutBox);const d=!iT(a);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:b}=m;if(g&&b){const x=xn();Dp(x,t.layoutBox,g.layoutBox);const S=xn();Dp(S,n,b.layoutBox),oT(x,S)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=x,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function bN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function xN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function wN(e){e.clearSnapshot()}function SS(e){e.clearMeasurements()}function kS(e){e.isLayoutDirty=!1}function SN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function CS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function kN(e){e.resolveTargetDelta()}function CN(e){e.calcProjection()}function EN(e){e.resetSkewAndRotation()}function PN(e){e.removeLeadSnapshot()}function ES(e,t,n){e.translate=sn(t.translate,0,n),e.scale=sn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function PS(e,t,n,r){e.min=sn(t.min,n.min,r),e.max=sn(t.max,n.max,r)}function TN(e,t,n,r){PS(e.x,t.x,n.x,r),PS(e.y,t.y,n.y,r)}function _N(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const IN={duration:.45,ease:[.4,0,.1,1]},TS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_S=TS("applewebkit/")&&!TS("chrome/")?Math.round:Zi;function IS(e){e.min=_S(e.min),e.max=_S(e.max)}function $N(e){IS(e.x),IS(e.y)}function aT(e,t,n){return e==="position"||e==="preserve-aspect"&&!N4(xS(t),xS(n),.2)}function AN(e){return e!==e.root&&e.scroll?.wasRoot}const RN=lT({attachResizeListener:(e,t)=>Zp(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zy={current:void 0},uT=lT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zy.current){const e=new RN({});e.mount(window),e.setOptions({layoutScroll:!0}),Zy.current=e}return Zy.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),LN={pan:{Feature:Q4},drag:{Feature:X4,ProjectionNode:uT,MeasureLayout:tT}};function $S(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&Yt.postRender(()=>s(t,hh(t)))}class MN extends ea{mount(){const{current:t}=this.node;t&&(this.unmount=JD(t,(n,r)=>($S(this.node,r,"Start"),i=>$S(this.node,i,"End"))))}unmount(){}}class DN extends ea{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fh(Zp(this.node.current,"focus",()=>this.onFocus()),Zp(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function AS(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&Yt.postRender(()=>s(t,hh(t)))}class NN extends ea{mount(){const{current:t}=this.node;t&&(this.unmount=n3(t,(n,r)=>(AS(this.node,r,"Start"),(i,{success:s})=>AS(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const lb=new WeakMap,e0=new WeakMap,FN=e=>{const t=lb.get(e.target);t&&t(e)},ON=e=>{e.forEach(FN)};function zN({root:e,...t}){const n=e||document;e0.has(n)||e0.set(n,{});const r=e0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ON,{root:e,...t})),r[i]}function BN(e,t,n){const r=zN(t);return lb.set(e,n),r.observe(e),()=>{lb.delete(e),r.unobserve(e)}}const jN={some:0,all:1};class VN extends ea{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:jN[i]},c=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),b=h?m:g;b&&b(d)};return BN(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(UN(t,n))&&this.startObserver()}unmount(){}}function UN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const KN={inView:{Feature:VN},tap:{Feature:NN},focus:{Feature:DN},hover:{Feature:MN}},WN={layout:{ProjectionNode:uT,MeasureLayout:tT}},HN={...$4,...KN,...LN,...WN},ff=FP(HN,i4);class GN extends vP{constructor(){super(...arguments),this.isEnabled=!1}add(t){(Cu.has(t)||qD.has(t))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?"transform":"auto")}}function qN(){return ch(()=>new GN("auto"))}const ss={top:"top",bottom:"top",left:"left",right:"left"},zg={top:"bottom",bottom:"top",left:"right",right:"left"},YN={top:"left",left:"top"},ab={top:"height",left:"width"},cT={width:"totalWidth",height:"totalHeight"},og={};let Gn=typeof document<"u"?window.visualViewport:null;function RS(e){let t=0,n=0,r=0,i=0,s=0,a=0,c={};var d;let h=((d=Gn?.scale)!==null&&d!==void 0?d:1)>1;if(e.tagName==="BODY"){let S=document.documentElement;r=S.clientWidth,i=S.clientHeight;var m;t=(m=Gn?.width)!==null&&m!==void 0?m:r;var g;n=(g=Gn?.height)!==null&&g!==void 0?g:i,c.top=S.scrollTop||e.scrollTop,c.left=S.scrollLeft||e.scrollLeft,Gn&&(s=Gn.offsetTop,a=Gn.offsetLeft)}else({width:t,height:n,top:s,left:a}=df(e)),c.top=e.scrollTop,c.left=e.scrollLeft,r=t,i=n;if(gE()&&(e.tagName==="BODY"||e.tagName==="HTML")&&h){c.top=0,c.left=0;var b;s=(b=Gn?.pageTop)!==null&&b!==void 0?b:0;var x;a=(x=Gn?.pageLeft)!==null&&x!==void 0?x:0}return{width:t,height:n,totalWidth:r,totalHeight:i,scroll:c,top:s,left:a}}function XN(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function LS(e,t,n,r,i,s,a){var c;let d=(c=i.scroll[e])!==null&&c!==void 0?c:0,h=r[ab[e]],m=r.scroll[ss[e]]+s,g=h+r.scroll[ss[e]]-s,b=t-d+a[e]-r[ss[e]],x=t-d+n+a[e]-r[ss[e]];return bg?Math.max(g-x,m-b):0}function QN(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function MS(e){if(og[e])return og[e];let[t,n]=e.split(" "),r=ss[t]||"right",i=YN[r];ss[n]||(n="center");let s=ab[r],a=ab[i];return og[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:s,crossSize:a},og[e]}function t0(e,t,n,r,i,s,a,c,d,h){let{placement:m,crossPlacement:g,axis:b,crossAxis:x,size:S,crossSize:P}=r,_={};var T;_[x]=(T=e[x])!==null&&T!==void 0?T:0;var R,L,B,W;g==="center"?_[x]+=(((R=e[P])!==null&&R!==void 0?R:0)-((L=n[P])!==null&&L!==void 0?L:0))/2:g!==x&&(_[x]+=((B=e[P])!==null&&B!==void 0?B:0)-((W=n[P])!==null&&W!==void 0?W:0)),_[x]+=s;const M=e[x]-n[P]+d+h,Z=e[x]+e[P]-d-h;if(_[x]=Rg(_[x],M,Z),m===b){const re=c?a[S]:t[cT[S]];_[zg[b]]=Math.floor(re-e[b]+i)}else _[b]=Math.floor(e[b]+e[S]+i);return _}function JN(e,t,n,r,i,s,a,c){const d=r?n.height:t[cT.height];var h;let m=e.top!=null?n.top+e.top:n.top+(d-((h=e.bottom)!==null&&h!==void 0?h:0)-a);var g,b,x,S,P,_;let T=c!=="top"?Math.max(0,t.height+t.top+((g=t.scroll.top)!==null&&g!==void 0?g:0)-m-(((b=i.top)!==null&&b!==void 0?b:0)+((x=i.bottom)!==null&&x!==void 0?x:0)+s)):Math.max(0,m+a-(t.top+((S=t.scroll.top)!==null&&S!==void 0?S:0))-(((P=i.top)!==null&&P!==void 0?P:0)+((_=i.bottom)!==null&&_!==void 0?_:0)+s));return Math.min(t.height-s*2,T)}function DS(e,t,n,r,i,s){let{placement:a,axis:c,size:d}=s;var h,m;if(a===c)return Math.max(0,n[c]-e[c]-((h=e.scroll[c])!==null&&h!==void 0?h:0)+t[c]-((m=r[c])!==null&&m!==void 0?m:0)-r[zg[c]]-i);var g;return Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-n[c]-n[d]-((g=r[c])!==null&&g!==void 0?g:0)-r[zg[c]]-i)}function ZN(e,t,n,r,i,s,a,c,d,h,m,g,b,x,S,P){let _=MS(e),{size:T,crossAxis:R,crossSize:L,placement:B,crossPlacement:W}=_,M=t0(t,c,n,_,m,g,h,b,S,P),Z=m,re=DS(c,h,t,i,s+m,_);if(a&&r[T]>re){let me=MS(`${zg[B]} ${W}`),Ee=t0(t,c,n,me,m,g,h,b,S,P);DS(c,h,t,i,s+m,me)>re&&(_=me,M=Ee,Z=m)}let ae="bottom";_.axis==="top"?_.placement==="top"?ae="top":_.placement==="bottom"&&(ae="bottom"):_.crossAxis==="top"&&(_.crossPlacement==="top"?ae="bottom":_.crossPlacement==="bottom"&&(ae="top"));let O=LS(R,M[R],n[L],c,d,s,h);M[R]+=O;let U=JN(M,c,h,b,i,s,n.height,ae);x&&x{if(!n||r===null)return;let i=s=>{let a=s.target;if(!t.current||a instanceof Node&&!a.contains(t.current)||s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement)return;let c=r||nF.get(t.current);c&&c()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let bn=typeof document<"u"?window.visualViewport:null;function iF(e){let{direction:t}=uh(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:s=i,placement:a="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:h=typeof document<"u"?document.body:null,offset:m=0,crossOffset:g=0,shouldUpdatePosition:b=!0,isOpen:x=!0,onClose:S,maxHeight:P,arrowBoundaryOffset:_=0}=e,[T,R]=k.useState(null),L=[b,a,i.current,r.current,s.current,c,d,h,m,g,x,t,P,_,n],B=k.useRef(bn?.scale);k.useEffect(()=>{x&&(B.current=bn?.scale)},[x]);let W=k.useCallback(()=>{if(b===!1||!x||!i.current||!r.current||!h||bn?.scale!==B.current)return;let O=null;if(s.current&&s.current.contains(document.activeElement)){var U;let K=(U=document.activeElement)===null||U===void 0?void 0:U.getBoundingClientRect(),se=s.current.getBoundingClientRect();var X;if(O={type:"top",offset:((X=K?.top)!==null&&X!==void 0?X:0)-se.top},O.offset>se.height/2){O.type="bottom";var ne;O.offset=((ne=K?.bottom)!==null&&ne!==void 0?ne:0)-se.bottom}}let G=i.current;if(!P&&i.current){var fe;G.style.top="0px",G.style.bottom="";var J;G.style.maxHeight=((J=(fe=window.visualViewport)===null||fe===void 0?void 0:fe.height)!==null&&J!==void 0?J:window.innerHeight)+"px"}let q=eF({placement:sF(a,t),overlayNode:i.current,targetNode:r.current,scrollNode:s.current||i.current,padding:c,shouldFlip:d,boundaryElement:h,offset:m,crossOffset:g,maxHeight:P,arrowSize:n,arrowBoundaryOffset:_});if(q.position){if(G.style.top="",G.style.bottom="",G.style.left="",G.style.right="",Object.keys(q.position).forEach(K=>G.style[K]=q.position[K]+"px"),G.style.maxHeight=q.maxHeight!=null?q.maxHeight+"px":"",O&&document.activeElement&&s.current){let K=document.activeElement.getBoundingClientRect(),se=s.current.getBoundingClientRect(),A=K[O.type]-se[O.type];s.current.scrollTop+=A-O.offset}R(q)}},L);Zt(W,L),oF(W),m1({ref:i,onResize:W}),m1({ref:r,onResize:W});let M=k.useRef(!1);Zt(()=>{let O,U=()=>{M.current=!0,clearTimeout(O),O=setTimeout(()=>{M.current=!1},500),W()},X=()=>{M.current&&U()};return bn?.addEventListener("resize",U),bn?.addEventListener("scroll",X),()=>{bn?.removeEventListener("resize",U),bn?.removeEventListener("scroll",X)}},[W]);let Z=k.useCallback(()=>{M.current||S?.()},[S,M]);rF({triggerRef:r,isOpen:x,onClose:S&&Z});var re,ae;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...T?.position,maxHeight:(re=T?.maxHeight)!==null&&re!==void 0?re:"100vh"}},placement:(ae=T?.placement)!==null&&ae!==void 0?ae:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:T?.arrowOffsetLeft,top:T?.arrowOffsetTop}},updatePosition:W}}function oF(e){Zt(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function sF(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}function lF(e){const t=Qi(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:s}=e.ownerDocument.defaultView;let{display:a,visibility:c}=s(e);i=a!=="none"&&c!=="hidden"&&c!=="collapse"}return i}function aF(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function fT(e,t){return e.nodeName!=="#comment"&&lF(e)&&aF(e,t)&&(!e.parentElement||fT(e.parentElement,e))}function jx(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function dT(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function pT(e){let t=k.useRef({isFocused:!1,observer:null});Zt(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Fn(r=>{e?.(r)});return k.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,s=a=>{if(t.current.isFocused=!1,i.disabled){let c=jx(a);n(c)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",s,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let c=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:c})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:c}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Bg=!1;function uF(e){for(;e&&!IE(e);)e=e.parentElement;let t=Qi(e),n=t.document.activeElement;if(!n||n===e)return;Bg=!0;let r=!1,i=m=>{(m.target===n||r)&&m.stopImmediatePropagation()},s=m=>{(m.target===n||r)&&(m.stopImmediatePropagation(),!e&&!r&&(r=!0,Ql(n),d()))},a=m=>{(m.target===e||r)&&m.stopImmediatePropagation()},c=m=>{(m.target===e||r)&&(m.stopImmediatePropagation(),r||(r=!0,Ql(n),d()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",s,!0),t.addEventListener("focusin",c,!0),t.addEventListener("focus",a,!0);let d=()=>{cancelAnimationFrame(h),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",s,!0),t.removeEventListener("focusin",c,!0),t.removeEventListener("focus",a,!0),Bg=!1,r=!1},h=requestAnimationFrame(d);return d}let uf="default",ub="",Cg=new WeakMap;function cF(e){if(sv()){if(uf==="default"){const t=At(e);ub=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}uf="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Cg.set(e,e.style[t]),e.style[t]="none"}}function OS(e){if(sv()){if(uf!=="disabled")return;uf="restoring",setTimeout(()=>{wE(()=>{if(uf==="restoring"){const t=At(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=ub||""),ub="",uf="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Cg.has(e)){let t=Cg.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Cg.delete(e)}}const Vx=We.createContext({register:()=>{}});Vx.displayName="PressResponderContext";function fF(e,t){return t.get?t.get.call(e):t.value}function hT(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function dF(e,t){var n=hT(e,t,"get");return fF(e,n)}function pF(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function zS(e,t,n){var r=hT(e,t,"set");return pF(e,r,n),n}function hF(e){let t=k.useContext(Vx);if(t){let{register:n,...r}=t;e=lr(r,e),n()}return kE(t,e.ref),e}var sg=new WeakMap;class lg{continuePropagation(){zS(this,sg,!1)}get shouldStopPropagation(){return dF(this,sg)}constructor(t,n,r,i){PL(this,sg,{writable:!0,value:void 0}),zS(this,sg,!0);var s;let a=(s=i?.target)!==null&&s!==void 0?s:r.currentTarget;const c=a?.getBoundingClientRect();let d,h=0,m,g=null;r.clientX!=null&&r.clientY!=null&&(m=r.clientX,g=r.clientY),c&&(m!=null&&g!=null?(d=m-c.left,h=g-c.top):(d=c.width/2,h=c.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=d,this.y=h}}const BS=Symbol("linkClicked"),jS="react-aria-pressable-style",VS="data-react-aria-pressable";function fv(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:s,onClick:a,isDisabled:c,isPressed:d,preventFocusOnPress:h,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:g,ref:b,...x}=hF(e),[S,P]=k.useState(!1),_=k.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:T,removeAllGlobalListeners:R}=sx(),L=Fn((U,X)=>{let ne=_.current;if(c||ne.didFirePressStart)return!1;let G=!0;if(ne.isTriggeringEvent=!0,r){let fe=new lg("pressstart",X,U);r(fe),G=fe.shouldStopPropagation}return n&&n(!0),ne.isTriggeringEvent=!1,ne.didFirePressStart=!0,P(!0),G}),B=Fn((U,X,ne=!0)=>{let G=_.current;if(!G.didFirePressStart)return!1;G.didFirePressStart=!1,G.isTriggeringEvent=!0;let fe=!0;if(i){let J=new lg("pressend",X,U);i(J),fe=J.shouldStopPropagation}if(n&&n(!1),P(!1),t&&ne&&!c){let J=new lg("press",X,U);t(J),fe&&(fe=J.shouldStopPropagation)}return G.isTriggeringEvent=!1,fe}),W=Fn((U,X)=>{let ne=_.current;if(c)return!1;if(s){ne.isTriggeringEvent=!0;let G=new lg("pressup",X,U);return s(G),ne.isTriggeringEvent=!1,G.shouldStopPropagation}return!0}),M=Fn(U=>{let X=_.current;if(X.isPressed&&X.target){X.didFirePressStart&&X.pointerType!=null&&B(ru(X.target,U),X.pointerType,!1),X.isPressed=!1,X.isOverTarget=!1,X.activePointerId=null,X.pointerType=null,R(),g||OS(X.target);for(let ne of X.disposables)ne();X.disposables=[]}}),Z=Fn(U=>{m&&M(U)}),re=Fn(U=>{a?.(U)}),ae=Fn((U,X)=>{if(a){let ne=new MouseEvent("click",U);dT(ne,X),a(jx(ne))}}),O=k.useMemo(()=>{let U=_.current,X={onKeyDown(G){if(n0(G.nativeEvent,G.currentTarget)&&ri(G.currentTarget,wn(G.nativeEvent))){var fe;US(wn(G.nativeEvent),G.key)&&G.preventDefault();let J=!0;if(!U.isPressed&&!G.repeat){U.target=G.currentTarget,U.isPressed=!0,U.pointerType="keyboard",J=L(G,"keyboard");let q=G.currentTarget,K=se=>{n0(se,q)&&!se.repeat&&ri(q,wn(se))&&U.target&&W(ru(U.target,se),"keyboard")};T(At(G.currentTarget),"keyup",yf(K,ne),!0)}J&&G.stopPropagation(),G.metaKey&&vu()&&((fe=U.metaKeyEvents)===null||fe===void 0||fe.set(G.key,G.nativeEvent))}else G.key==="Meta"&&(U.metaKeyEvents=new Map)},onClick(G){if(!(G&&!ri(G.currentTarget,wn(G.nativeEvent)))&&G&&G.button===0&&!U.isTriggeringEvent&&!yu.isOpening){let fe=!0;if(c&&G.preventDefault(),!U.ignoreEmulatedMouseEvents&&!U.isPressed&&(U.pointerType==="virtual"||PE(G.nativeEvent))){let J=L(G,"virtual"),q=W(G,"virtual"),K=B(G,"virtual");re(G),fe=J&&q&&K}else if(U.isPressed&&U.pointerType!=="keyboard"){let J=U.pointerType||G.nativeEvent.pointerType||"virtual",q=W(ru(G.currentTarget,G),J),K=B(ru(G.currentTarget,G),J,!0);fe=q&&K,U.isOverTarget=!1,re(G),M(G)}U.ignoreEmulatedMouseEvents=!1,fe&&G.stopPropagation()}}},ne=G=>{var fe;if(U.isPressed&&U.target&&n0(G,U.target)){var J;US(wn(G),G.key)&&G.preventDefault();let K=wn(G),se=ri(U.target,wn(G));B(ru(U.target,G),"keyboard",se),se&&ae(G,U.target),R(),G.key!=="Enter"&&Ux(U.target)&&ri(U.target,K)&&!G[BS]&&(G[BS]=!0,yu(U.target,G,!1)),U.isPressed=!1,(J=U.metaKeyEvents)===null||J===void 0||J.delete(G.key)}else if(G.key==="Meta"&&(!((fe=U.metaKeyEvents)===null||fe===void 0)&&fe.size)){var q;let K=U.metaKeyEvents;U.metaKeyEvents=void 0;for(let se of K.values())(q=U.target)===null||q===void 0||q.dispatchEvent(new KeyboardEvent("keyup",se))}};if(typeof PointerEvent<"u"){X.onPointerDown=J=>{if(J.button!==0||!ri(J.currentTarget,wn(J.nativeEvent)))return;if(JL(J.nativeEvent)){U.pointerType="virtual";return}U.pointerType=J.pointerType;let q=!0;if(!U.isPressed){U.isPressed=!0,U.isOverTarget=!0,U.activePointerId=J.pointerId,U.target=J.currentTarget,g||cF(U.target),q=L(J,U.pointerType);let K=wn(J.nativeEvent);"releasePointerCapture"in K&&K.releasePointerCapture(J.pointerId),T(At(J.currentTarget),"pointerup",G,!1),T(At(J.currentTarget),"pointercancel",fe,!1)}q&&J.stopPropagation()},X.onMouseDown=J=>{if(ri(J.currentTarget,wn(J.nativeEvent))&&J.button===0){if(h){let q=uF(J.target);q&&U.disposables.push(q)}J.stopPropagation()}},X.onPointerUp=J=>{!ri(J.currentTarget,wn(J.nativeEvent))||U.pointerType==="virtual"||J.button===0&&!U.isPressed&&W(J,U.pointerType||J.pointerType)},X.onPointerEnter=J=>{J.pointerId===U.activePointerId&&U.target&&!U.isOverTarget&&U.pointerType!=null&&(U.isOverTarget=!0,L(ru(U.target,J),U.pointerType))},X.onPointerLeave=J=>{J.pointerId===U.activePointerId&&U.target&&U.isOverTarget&&U.pointerType!=null&&(U.isOverTarget=!1,B(ru(U.target,J),U.pointerType,!1),Z(J))};let G=J=>{if(J.pointerId===U.activePointerId&&U.isPressed&&J.button===0&&U.target){if(ri(U.target,wn(J))&&U.pointerType!=null){let q=!1,K=setTimeout(()=>{U.isPressed&&U.target instanceof HTMLElement&&(q?M(J):(Ql(U.target),U.target.click()))},80);T(J.currentTarget,"click",()=>q=!0,!0),U.disposables.push(()=>clearTimeout(K))}else M(J);U.isOverTarget=!1}},fe=J=>{M(J)};X.onDragStart=J=>{ri(J.currentTarget,wn(J.nativeEvent))&&M(J)}}return X},[T,c,h,R,g,M,Z,B,L,W,re,ae]);return k.useEffect(()=>{if(!b)return;const U=At(b.current);if(!U||!U.head||U.getElementById(jS))return;const X=U.createElement("style");X.id=jS,X.textContent=` + `),()=>{P.removeChild(S),P.contains(S)&&P.removeChild(S)}},[t]),F.jsx(i3,{isPresent:t,childRef:s,sizeRef:a,children:k.cloneElement(e,{ref:s})})}const s3=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:a,anchorX:c,root:d})=>{const h=ch(l3),m=k.useId();let g=!0,b=k.useMemo(()=>(g=!1,{id:m,initial:t,isPresent:n,custom:i,onExitComplete:x=>{h.set(x,!0);for(const S of h.values())if(!S)return;r&&r()},register:x=>(h.set(x,!1),()=>h.delete(x))}),[n,h,r]);return s&&g&&(b={...b}),k.useMemo(()=>{h.forEach((x,S)=>h.set(S,!1))},[n]),k.useEffect(()=>{!n&&!h.size&&r&&r()},[n]),a==="popLayout"&&(e=F.jsx(o3,{isPresent:n,anchorX:c,root:d,children:e})),F.jsx(lv.Provider,{value:b,children:e})};function l3(){return new Map}function xP(e=!0){const t=k.useContext(lv);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=k.useId();k.useEffect(()=>{if(e)return i(s)},[e]);const a=k.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,a]:[!0]}const rg=e=>e.key||"";function N1(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const Rf=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:a=!1,anchorX:c="left",root:d})=>{const[h,m]=xP(a),g=k.useMemo(()=>N1(e),[e]),b=a&&!h?[]:g.map(rg),x=k.useRef(!0),S=k.useRef(g),P=ch(()=>new Map),[_,T]=k.useState(g),[R,L]=k.useState(g);ax(()=>{x.current=!1,S.current=g;for(let M=0;M{const Z=rg(M),re=a&&!h?!1:g===R||b.includes(Z),ae=()=>{if(P.has(Z))P.set(Z,!0);else return;let O=!0;P.forEach(U=>{U||(O=!1)}),O&&(W?.(),L(S.current),a&&m?.(),r&&r())};return F.jsx(s3,{isPresent:re,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:d,onExitComplete:re?void 0:ae,anchorX:c,children:M},Z)})})},a3=k.createContext(null);function u3(){const e=k.useRef(!1);return ax(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function c3(){const e=u3(),[t,n]=k.useState(0),r=k.useCallback(()=>{e.current&&n(t+1)},[t]);return[k.useCallback(()=>Yt.postRender(r),[r]),t]}const f3=e=>!e.isLayoutDirty&&e.willUpdate(!1);function F1(){const e=new Set,t=new WeakMap,n=()=>e.forEach(f3);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}const wP=e=>e===!0,d3=e=>wP(e===!0)||e==="id",p3=({children:e,id:t,inherit:n=!0})=>{const r=k.useContext(Wp),i=k.useContext(a3),[s,a]=c3(),c=k.useRef(null),d=r.id||i;c.current===null&&(d3(n)&&d&&(t=t?d+"-"+t:d),c.current={id:t,group:wP(n)&&r.group||F1()});const h=k.useMemo(()=>({...c.current,forceRender:s}),[a]);return F.jsx(Wp.Provider,{value:h,children:e})},$x=k.createContext({strict:!1}),O1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},xf={};for(const e in O1)xf[e]={isEnabled:t=>O1[e].some(n=>!!t[n])};function Z0(e){for(const t in e)xf[t]={...xf[t],...e[t]}}function wf({children:e,features:t,strict:n=!1}){const[,r]=k.useState(!Hy(t)),i=k.useRef(void 0);if(!Hy(t)){const{renderer:s,...a}=t;i.current=s,Z0(a)}return k.useEffect(()=>{Hy(t)&&t().then(({renderer:s,...a})=>{Z0(a),i.current=s,r(!0)})},[]),F.jsx($x.Provider,{value:{renderer:i.current,strict:n},children:e})}function Hy(e){return typeof e=="function"}const h3=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Fg(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||h3.has(e)}let SP=e=>!Fg(e);function kP(e){typeof e=="function"&&(SP=t=>t.startsWith("on")?!Fg(t):e(t))}try{kP(require("@emotion/is-prop-valid").default)}catch{}function m3(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(SP(i)||n===!0&&Fg(i)||!t&&!Fg(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function g3({children:e,isValidProp:t,...n}){t&&kP(t),n={...k.useContext(Yp),...n},n.isStatic=ch(()=>n.isStatic);const r=k.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return F.jsx(Yp.Provider,{value:r,children:e})}const av=k.createContext({});function uv(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Xp(e){return typeof e=="string"||Array.isArray(e)}const Ax=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rx=["initial",...Ax];function cv(e){return uv(e.animate)||Rx.some(t=>Xp(e[t]))}function CP(e){return!!(cv(e)||e.variants)}function v3(e,t){if(cv(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Xp(n)?n:void 0,animate:Xp(r)?r:void 0}}return e.inherit!==!1?t:{}}function y3(e){const{initial:t,animate:n}=v3(e,k.useContext(av));return k.useMemo(()=>({initial:t,animate:n}),[z1(t),z1(n)])}function z1(e){return Array.isArray(e)?e.join(" "):e}const Qp={};function b3(e){for(const t in e)Qp[t]=e[t],gx(t)&&(Qp[t].isCSSVariable=!0)}function EP(e,{layout:t,layoutId:n}){return ku.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qp[e]||e==="opacity")}const x3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w3=Af.length;function S3(e,t,n){let r="",i=!0;for(let s=0;s({style:{},transform:{},transformOrigin:{},vars:{}});function PP(e,t,n){for(const r in t)!yr(t[r])&&!EP(r,n)&&(e[r]=t[r])}function k3({transformTemplate:e},t){return k.useMemo(()=>{const n=Mx();return Lx(n,t,e),Object.assign({},n.vars,n.style)},[t])}function C3(e,t){const n=e.style||{},r={};return PP(r,n,e),Object.assign(r,k3(e,t)),r}function E3(e,t){const n={},r=C3(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const P3={offset:"stroke-dashoffset",array:"stroke-dasharray"},T3={offset:"strokeDashoffset",array:"strokeDasharray"};function _3(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?P3:T3;e[s.offset]=et.transform(-r);const a=et.transform(t),c=et.transform(n);e[s.array]=`${a} ${c}`}function TP(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:a=0,...c},d,h,m){if(Lx(e,c,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:b}=e;g.transform&&(b.transform=g.transform,delete g.transform),(b.transform||g.transformOrigin)&&(b.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),b.transform&&(b.transformBox=m?.transformBox??"fill-box",delete g.transformBox),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),i!==void 0&&_3(g,i,s,a,!1)}const _P=()=>({...Mx(),attrs:{}}),IP=e=>typeof e=="string"&&e.toLowerCase()==="svg";function I3(e,t,n,r){const i=k.useMemo(()=>{const s=_P();return TP(s,t,IP(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};PP(s,e.style,e),i.style={...s,...i.style}}return i}const $3=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Dx(e){return typeof e!="string"||e.includes("-")?!1:!!($3.indexOf(e)>-1||/[A-Z]/u.test(e))}function A3(e,t,n,{latestValues:r},i,s=!1){const c=(Dx(e)?I3:E3)(t,r,i,e),d=m3(t,typeof e=="string",s),h=e!==k.Fragment?{...d,...c,ref:n}:{},{children:m}=t,g=k.useMemo(()=>yr(m)?m.get():m,[m]);return k.createElement(e,{...h,children:g})}function B1(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nx(e,t,n,r){if(typeof t=="function"){const[i,s]=B1(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=B1(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Sg(e){return yr(e)?e.get():e}function R3({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:L3(n,r,i,e),renderState:t()}}function L3(e,t,n,r){const i={},s=r(e,{});for(const b in s)i[b]=Sg(s[b]);let{initial:a,animate:c}=e;const d=cv(e),h=CP(e);t&&h&&!d&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||a===!1;const g=m?c:a;if(g&&typeof g!="boolean"&&!uv(g)){const b=Array.isArray(g)?g:[g];for(let x=0;x(t,n)=>{const r=k.useContext(av),i=k.useContext(lv),s=()=>R3(e,t,r,i);return n?s():ch(s)};function Fx(e,t,n){const{style:r}=e,i={};for(const s in r)(yr(r[s])||t.style&&yr(t.style[s])||EP(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}const M3=$P({scrapeMotionValuesFromProps:Fx,createRenderState:Mx});function AP(e,t,n){const r=Fx(e,t,n);for(const i in e)if(yr(e[i])||yr(t[i])){const s=Af.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const D3=$P({scrapeMotionValuesFromProps:AP,createRenderState:_P}),N3=Symbol.for("motionComponentSymbol");function rf(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function F3(e,t,n){return k.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):rf(n)&&(n.current=r))},[t])}const Ox=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),O3="framerAppearId",RP="data-"+Ox(O3),LP=k.createContext({});function z3(e,t,n,r,i){const{visualElement:s}=k.useContext(av),a=k.useContext($x),c=k.useContext(lv),d=k.useContext(Yp).reducedMotion,h=k.useRef(null);r=r||a.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d}));const m=h.current,g=k.useContext(LP);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&B3(h.current,n,i,g);const b=k.useRef(!1);k.useInsertionEffect(()=>{m&&b.current&&m.update(n,c)});const x=n[RP],S=k.useRef(!!x&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return ax(()=>{m&&(b.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),S.current&&m.animationState&&m.animationState.animateChanges())}),k.useEffect(()=>{m&&(!S.current&&m.animationState&&m.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),S.current=!1))}),m}function B3(e,t,n,r){const{layoutId:i,layout:s,drag:a,dragConstraints:c,layoutScroll:d,layoutRoot:h,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:MP(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!a||c&&rf(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:h})}function MP(e){if(e)return e.options.allowProjection!==!1?e.projection:MP(e.parent)}function Gy(e,{forwardMotionProps:t=!1}={},n,r){n&&Z0(n);const i=Dx(e)?D3:M3;function s(c,d){let h;const m={...k.useContext(Yp),...c,layoutId:j3(c)},{isStatic:g}=m,b=y3(c),x=i(c,g);if(!g&&lx){V3();const S=U3(m);h=S.MeasureLayout,b.visualElement=z3(e,x,m,r,S.ProjectionNode)}return F.jsxs(av.Provider,{value:b,children:[h&&b.visualElement?F.jsx(h,{visualElement:b.visualElement,...m}):null,A3(e,c,F3(x,b.visualElement,d),x,g,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=k.forwardRef(s);return a[N3]=e,a}function j3({layoutId:e}){const t=k.useContext(Wp).id;return t&&e!==void 0?t+"-"+e:e}function V3(e,t){k.useContext($x).strict}function U3(e){const{drag:t,layout:n}=xf;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function DP(e,t){if(typeof Proxy>"u")return Gy;const n=new Map,r=(s,a)=>Gy(s,a,e,t),i=(s,a)=>r(s,a);return new Proxy(i,{get:(s,a)=>a==="create"?r:(n.has(a)||n.set(a,Gy(a,void 0,e,t)),n.get(a))})}const Sf=DP();function NP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function K3({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function W3(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function qy(e){return e===void 0||e===1}function eb({scale:e,scaleX:t,scaleY:n}){return!qy(e)||!qy(t)||!qy(n)}function au(e){return eb(e)||FP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function FP(e){return j1(e.x)||j1(e.y)}function j1(e){return e&&e!=="0%"}function Og(e,t,n){const r=e-n,i=t*r;return n+i}function V1(e,t,n,r,i){return i!==void 0&&(e=Og(e,i,r)),Og(e,n,r)+t}function tb(e,t=0,n=1,r,i){e.min=V1(e.min,t,n,r,i),e.max=V1(e.max,t,n,r,i)}function OP(e,{x:t,y:n}){tb(e.x,t.translate,t.scale,t.originPoint),tb(e.y,n.translate,n.scale,n.originPoint)}const U1=.999999999999,K1=1.0000000000001;function H3(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,a;for(let c=0;cU1&&(t.x=1),t.yU1&&(t.y=1)}function of(e,t){e.min=e.min+t,e.max=e.max+t}function W1(e,t,n,r,i=.5){const s=sn(e.min,e.max,i);tb(e,t,n,s,r)}function sf(e,t){W1(e.x,t.x,t.scaleX,t.scale,t.originX),W1(e.y,t.y,t.scaleY,t.scale,t.originY)}function zP(e,t){return NP(W3(e.getBoundingClientRect(),t))}function G3(e,t,n){const r=zP(e,n),{scroll:i}=t;return i&&(of(r.x,i.offset.x),of(r.y,i.offset.y)),r}const H1=()=>({translate:0,scale:1,origin:0,originPoint:0}),lf=()=>({x:H1(),y:H1()}),G1=()=>({min:0,max:0}),xn=()=>({x:G1(),y:G1()}),nb={current:null},BP={current:!1};function q3(){if(BP.current=!0,!!lx)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nb.current=e.matches;e.addEventListener("change",t),t()}else nb.current=!1}const Y3=new WeakMap;function X3(e,t,n){for(const r in t){const i=t[r],s=n[r];if(yr(i))e.addValue(r,i);else if(yr(s))e.addValue(r,bf(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,bf(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const q1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Q3{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ex,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=ri.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),BP.current||q3(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:nb.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ql(this.notifyUpdate),Ql(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ku.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Yt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in xf){const n=xf[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=bf(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(IE(r)||AE(r))?r=parseFloat(r):!r3(r)&&Jl.test(n)&&(r=dP(t,n)),this.setBaseTarget(t,yr(r)?r.get():r)),yr(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=Nx(this.props,n,this.presenceContext?.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!yr(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new px),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){_x.render(this.render)}}class jP extends Q3{constructor(){super(...arguments),this.KeyframeResolver=WD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;yr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function VP(e,{style:t,vars:n},r,i){const s=e.style;let a;for(a in t)s[a]=t[a];i?.applyProjectionStyles(s,r);for(a in n)s.setProperty(a,n[a])}function J3(e){return window.getComputedStyle(e)}class Z3 extends jP{constructor(){super(...arguments),this.type="html",this.renderInstance=VP}readValueFromInstance(t,n){if(ku.has(n))return this.projection?.isProjecting?G0(n):cD(t,n);{const r=J3(t),i=(gx(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return zP(t,n)}build(t,n,r){Lx(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Fx(t,n,r)}}const UP=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function e4(e,t,n,r){VP(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(UP.has(i)?i:Ox(i),t.attrs[i])}class t4 extends jP{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ku.has(n)){const r=fP(n);return r&&r.default||0}return n=UP.has(n)?n:Ox(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return AP(t,n,r)}build(t,n,r){TP(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){e4(t,n,r,i)}mount(t){this.isSVGTag=IP(t.tagName),super.mount(t)}}const n4=(e,t)=>Dx(e)?new t4(t):new Z3(t,{allowProjection:e!==k.Fragment});function Jp(e,t,n){const r=e.getProps();return Nx(r,t,n!==void 0?n:r.custom,e)}const rb=e=>Array.isArray(e);function r4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bf(n))}function i4(e){return rb(e)?e[e.length-1]||0:e}function o4(e,t){const n=Jp(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const a in s){const c=i4(s[a]);r4(e,a,c)}}function s4(e){return!!(yr(e)&&e.add)}function ib(e,t){const n=e.getValue("willChange");if(s4(n))return n.add(t);if(!n&&cs.WillChange){const r=new cs.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function KP(e){return e.props[RP]}const l4=e=>e!==null;function a4(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(l4),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const u4={type:"spring",stiffness:500,damping:25,restSpeed:10},c4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),f4={type:"keyframes",duration:.8},d4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},p4=(e,{keyframes:t})=>t.length>2?f4:ku.has(e)?e.startsWith("scale")?c4(t[1]):u4:d4;function h4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:a,repeatDelay:c,from:d,elapsed:h,...m}){return!!Object.keys(m).length}const zx=(e,t,n,r={},i,s)=>a=>{const c=Px(r,e)||{},d=c.delay||r.delay||0;let{elapsed:h=0}=r;h=h-ls(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-h,onUpdate:b=>{t.set(b),c.onUpdate&&c.onUpdate(b)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:i};h4(c)||Object.assign(m,p4(e,m)),m.duration&&(m.duration=ls(m.duration)),m.repeatDelay&&(m.repeatDelay=ls(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let g=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(g=!0)),(cs.instantAnimations||cs.skipAnimations)&&(g=!0,m.duration=0,m.delay=0),m.allowFlatten=!c.type&&!c.ease,g&&!s&&t.get()!==void 0){const b=a4(m.keyframes,c);if(b!==void 0){Yt.update(()=>{m.onUpdate(b),m.onComplete()});return}}return c.isSync?new Cx(m):new LD(m)};function m4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function WP(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(s=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const m in c){const g=e.getValue(m,e.latestValues[m]??null),b=c[m];if(b===void 0||h&&m4(h,m))continue;const x={delay:n,...Px(s||{},m)},S=g.get();if(S!==void 0&&!g.isAnimating&&!Array.isArray(b)&&b===S&&!x.velocity)continue;let P=!1;if(window.MotionHandoffAnimation){const T=KP(e);if(T){const R=window.MotionHandoffAnimation(T,m,Yt);R!==null&&(x.startTime=R,P=!0)}}ib(e,m),g.start(zx(m,g,b,e.shouldReduceMotion&&aP.has(m)?{type:!1}:x,e,P));const _=g.animation;_&&d.push(_)}return a&&Promise.all(d).then(()=>{Yt.update(()=>{a&&o4(e,a)})}),d}function ob(e,t,n={}){const r=Jp(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(WP(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=i;return g4(e,t,d,h,m,g,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[d,h]=c==="beforeChildren"?[s,a]:[a,s];return d().then(()=>h())}else return Promise.all([s(),a(n.delay)])}function g4(e,t,n=0,r=0,i=0,s=1,a){const c=[],d=e.variantChildren.size,h=(d-1)*i,m=typeof r=="function",g=m?b=>r(b,d):s===1?(b=0)=>b*i:(b=0)=>h-b*i;return Array.from(e.variantChildren).sort(v4).forEach((b,x)=>{b.notify("AnimationStart",t),c.push(ob(b,t,{...a,delay:n+(m?0:r)+g(x)}).then(()=>b.notify("AnimationComplete",t)))}),Promise.all(c)}function v4(e,t){return e.sortNodePosition(t)}function y4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>ob(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=ob(e,t,n);else{const i=typeof t=="function"?Jp(e,t,n.custom):t;r=Promise.all(WP(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function HP(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:n,options:r})=>y4(e,n,r)))}function k4(e){let t=S4(e),n=Y1(),r=!0;const i=d=>(h,m)=>{const g=Jp(e,m,d==="exit"?e.presenceContext?.custom:void 0);if(g){const{transition:b,transitionEnd:x,...S}=g;h={...h,...S,...x}}return h};function s(d){t=d(e)}function a(d){const{props:h}=e,m=GP(e.parent)||{},g=[],b=new Set;let x={},S=1/0;for(let _=0;_S&&B,ae=!1;const O=Array.isArray(L)?L:[L];let U=O.reduce(i(T),{});W===!1&&(U={});const{prevResolvedValues:X={}}=R,ne={...X,...U},G=q=>{re=!0,b.has(q)&&(ae=!0,b.delete(q)),R.needsAnimating[q]=!0;const K=e.getValue(q);K&&(K.liveStyle=!1)};for(const q in ne){const K=U[q],se=X[q];if(x.hasOwnProperty(q))continue;let A=!1;rb(K)&&rb(se)?A=!HP(K,se):A=K!==se,A?K!=null?G(q):b.add(q):K!==void 0&&b.has(q)?G(q):R.protectedKeys[q]=!0}R.prevProp=L,R.prevResolvedValues=U,R.isActive&&(x={...x,...U}),r&&e.blockInitialAnimation&&(re=!1),re&&(!(M&&Z)||ae)&&g.push(...O.map(q=>({animation:q,options:{type:T}})))}if(b.size){const _={};if(typeof h.initial!="boolean"){const T=Jp(e,Array.isArray(h.initial)?h.initial[0]:h.initial);T&&T.transition&&(_.transition=T.transition)}b.forEach(T=>{const R=e.getBaseTarget(T),L=e.getValue(T);L&&(L.liveStyle=!0),_[T]=R??null}),g.push({animation:_})}let P=!!g.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(g):Promise.resolve()}function c(d,h){if(n[d].isActive===h)return Promise.resolve();e.variantChildren?.forEach(g=>g.animationState?.setActive(d,h)),n[d].isActive=h;const m=a(d);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Y1(),r=!0}}}function C4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!HP(t,e):!1}function tu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Y1(){return{animate:tu(!0),whileInView:tu(),whileHover:tu(),whileTap:tu(),whileDrag:tu(),whileFocus:tu(),exit:tu()}}class Zl{constructor(t){this.isMounted=!1,this.node=t}update(){}}class E4 extends Zl{constructor(t){super(t),t.animationState||(t.animationState=k4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();uv(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let P4=0;class T4 extends Zl{constructor(){super(...arguments),this.id=P4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const _4={animation:{Feature:E4},exit:{Feature:T4}};function Zp(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hh(e){return{point:{x:e.pageX,y:e.pageY}}}const I4=e=>t=>Ix(t)&&e(t,hh(t));function Lp(e,t,n,r){return Zp(e,t,I4(n),r)}const qP=1e-4,$4=1-qP,A4=1+qP,YP=.01,R4=0-YP,L4=0+YP;function Lr(e){return e.max-e.min}function M4(e,t,n){return Math.abs(e-t)<=n}function X1(e,t,n,r=.5){e.origin=r,e.originPoint=sn(t.min,t.max,e.origin),e.scale=Lr(n)/Lr(t),e.translate=sn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$4&&e.scale<=A4||isNaN(e.scale))&&(e.scale=1),(e.translate>=R4&&e.translate<=L4||isNaN(e.translate))&&(e.translate=0)}function Mp(e,t,n,r){X1(e.x,t.x,n.x,r?r.originX:void 0),X1(e.y,t.y,n.y,r?r.originY:void 0)}function Q1(e,t,n){e.min=n.min+t.min,e.max=e.min+Lr(t)}function D4(e,t,n){Q1(e.x,t.x,n.x),Q1(e.y,t.y,n.y)}function J1(e,t,n){e.min=t.min-n.min,e.max=e.min+Lr(t)}function Dp(e,t,n){J1(e.x,t.x,n.x),J1(e.y,t.y,n.y)}function Gi(e){return[e("x"),e("y")]}const XP=({current:e})=>e?e.ownerDocument.defaultView:null,Z1=(e,t)=>Math.abs(e-t);function N4(e,t){const n=Z1(e.x,t.x),r=Z1(e.y,t.y);return Math.sqrt(n**2+r**2)}class QP{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Xy(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,S=N4(b.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!S)return;const{point:P}=b,{timestamp:_}=sr;this.history.push({...P,timestamp:_});const{onStart:T,onMove:R}=this.handlers;x||(T&&T(this.lastMoveEvent,b),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,b)},this.handlePointerMove=(b,x)=>{this.lastMoveEvent=b,this.lastMoveEventInfo=Yy(x,this.transformPagePoint),Yt.update(this.updatePoint,!0)},this.handlePointerUp=(b,x)=>{this.end();const{onEnd:S,onSessionEnd:P,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Xy(b.type==="pointercancel"?this.lastMoveEventInfo:Yy(x,this.transformPagePoint),this.history);this.startEvent&&S&&S(b,T),P&&P(b,T)},!Ix(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const c=hh(t),d=Yy(c,this.transformPagePoint),{point:h}=d,{timestamp:m}=sr;this.history=[{...h,timestamp:m}];const{onSessionStart:g}=n;g&&g(t,Xy(d,this.history)),this.removeListeners=fh(Lp(this.contextWindow,"pointermove",this.handlePointerMove),Lp(this.contextWindow,"pointerup",this.handlePointerUp),Lp(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ql(this.updatePoint)}}function Yy(e,t){return t?{point:t(e.point)}:e}function eS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xy({point:e},t){return{point:e,delta:eS(e,JP(t)),offset:eS(e,F4(t)),velocity:O4(t,.1)}}function F4(e){return e[0]}function JP(e){return e[e.length-1]}function O4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=JP(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ls(t)));)n--;if(!r)return{x:0,y:0};const s=as(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const a={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function z4(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?sn(n,e,r.max):Math.min(e,n)),e}function tS(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function B4(e,{top:t,left:n,bottom:r,right:i}){return{x:tS(e.x,n,i),y:tS(e.y,t,r)}}function nS(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Hp(t.min,t.max-r,e.min):r>i&&(n=Hp(e.min,e.max-i,t.min)),Qs(0,1,n)}function U4(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const sb=.35;function K4(e=sb){return e===!1?e=0:e===!0&&(e=sb),{x:rS(e,"left","right"),y:rS(e,"top","bottom")}}function rS(e,t,n){return{min:iS(e,t),max:iS(e,n)}}function iS(e,t){return typeof e=="number"?e:e[t]||0}const W4=new WeakMap;class H4{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=g=>{const{dragSnapToOrigin:b}=this.getProps();b?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(hh(g).point)},a=(g,b)=>{const{drag:x,dragPropagation:S,onDragStart:P}=this.getProps();if(x&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=YD(x),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Gi(T=>{let R=this.getAxisMotionValue(T).get()||0;if(us.test(R)){const{projection:L}=this.visualElement;if(L&&L.layout){const B=L.layout.layoutBox[T];B&&(R=Lr(B)*(parseFloat(R)/100))}}this.originPoint[T]=R}),P&&Yt.postRender(()=>P(g,b)),ib(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},c=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b;const{dragPropagation:x,dragDirectionLock:S,onDirectionLock:P,onDrag:_}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:T}=b;if(S&&this.currentDirection===null){this.currentDirection=G4(T),this.currentDirection!==null&&P&&P(this.currentDirection);return}this.updateAxis("x",b.point,T),this.updateAxis("y",b.point,T),this.visualElement.render(),_&&_(g,b)},d=(g,b)=>{this.latestPointerEvent=g,this.latestPanInfo=b,this.stop(g,b),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Gi(g=>this.getAnimationState(g)==="paused"&&this.getAxisMotionValue(g).animation?.play()),{dragSnapToOrigin:m}=this.getProps();this.panSession=new QP(t,{onSessionStart:s,onStart:a,onMove:c,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:XP(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Yt.postRender(()=>c(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!ig(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=z4(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&rf(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=B4(r.layoutBox,t):this.constraints=!1,this.elastic=K4(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Gi(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=U4(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!rf(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=G3(r,i.root,this.visualElement.getTransformPagePoint());let a=j4(i.layout.layoutBox,s);if(n){const c=n(K3(a));this.hasMutatedConstraints=!!c,c&&(a=NP(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),d=this.constraints||{},h=Gi(m=>{if(!ig(m,n,this.currentDirection))return;let g=d&&d[m]||{};a&&(g={min:0,max:0});const b=i?200:1e6,x=i?40:1e7,S={type:"inertia",velocity:r?t[m]:0,bounceStiffness:b,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...s,...g};return this.startAxisValueAnimation(m,S)});return Promise.all(h).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ib(this.visualElement,t),r.start(zx(t,r,0,n,this.visualElement,!1))}stopAnimation(){Gi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Gi(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Gi(n=>{const{drag:r}=this.getProps();if(!ig(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:c}=i.layout.layoutBox[n];s.set(t[n]-sn(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!rf(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Gi(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const d=c.get();i[a]=V4({min:d,max:d},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Gi(a=>{if(!ig(a,t,null))return;const c=this.getAxisMotionValue(a),{min:d,max:h}=this.constraints[a];c.set(sn(d,h,i[a]))})}addListeners(){if(!this.visualElement.current)return;W4.set(this.visualElement,this);const t=this.visualElement.current,n=Lp(t,"pointerdown",d=>{const{drag:h,dragListener:m=!0}=this.getProps();h&&m&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();rf(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Yt.read(r);const a=Zp(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(Gi(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=d[m].translate,g.set(g.get()+d[m].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:a=sb,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function ig(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function G4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class q4 extends Zl{constructor(t){super(t),this.removeGroupControls=Zi,this.removeListeners=Zi,this.controls=new H4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Zi}unmount(){this.removeGroupControls(),this.removeListeners()}}const oS=e=>(t,n)=>{e&&Yt.postRender(()=>e(t,n))};class Y4 extends Zl{constructor(){super(...arguments),this.removePointerDownListener=Zi}onPointerDown(t){this.session=new QP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:XP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:oS(t),onStart:oS(n),onMove:r,onEnd:(s,a)=>{delete this.session,i&&Yt.postRender(()=>i(s,a))}}}mount(){this.removePointerDownListener=Lp(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const kg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cp={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(et.test(e))e=parseFloat(e);else return e;const n=sS(e,t.target.x),r=sS(e,t.target.y);return`${n}% ${r}%`}},X4={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Jl.parse(e);if(i.length>5)return r;const s=Jl.createTransformer(e),a=typeof i[0]!="number"?1:0,c=n.x.scale*t.x,d=n.y.scale*t.y;i[0+a]/=c,i[1+a]/=d;const h=sn(c,d,.5);return typeof i[2+a]=="number"&&(i[2+a]/=h),typeof i[3+a]=="number"&&(i[3+a]/=h),s(i)}};let lS=!1;class Q4 extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;b3(J4),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),lS&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),kg.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:a}=r;return a&&(a.isPresent=s,lS=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Yt.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_x.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ZP(e){const[t,n]=xP(),r=k.useContext(Wp);return F.jsx(Q4,{...e,layoutGroup:r,switchLayoutGroup:k.useContext(LP),isPresent:t,safeToRemove:n})}const J4={borderRadius:{...cp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cp,borderTopRightRadius:cp,borderBottomLeftRadius:cp,borderBottomRightRadius:cp,boxShadow:X4};function Z4(e,t,n){const r=yr(e)?e:bf(e);return r.start(zx("",r,t,n)),r.animation}const eN=(e,t)=>e.depth-t.depth;class tN{constructor(){this.children=[],this.isDirty=!1}add(t){ux(this.children,t),this.isDirty=!0}remove(t){cx(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(eN),this.isDirty=!1,this.children.forEach(t)}}function nN(e,t){const n=ri.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Ql(r),e(s-t))};return Yt.setup(r,!0),()=>Ql(r)}const eT=["TopLeft","TopRight","BottomLeft","BottomRight"],rN=eT.length,aS=e=>typeof e=="string"?parseFloat(e):e,uS=e=>typeof e=="number"||et.test(e);function iN(e,t,n,r,i,s){i?(e.opacity=sn(0,n.opacity??1,oN(r)),e.opacityExit=sn(t.opacity??1,0,sN(r))):s&&(e.opacity=sn(t.opacity??1,n.opacity??1,r));for(let a=0;art?1:n(Hp(e,t,r))}function fS(e,t){e.min=t.min,e.max=t.max}function Wi(e,t){fS(e.x,t.x),fS(e.y,t.y)}function dS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function pS(e,t,n,r,i){return e-=t,e=Og(e,1/n,r),i!==void 0&&(e=Og(e,1/i,r)),e}function lN(e,t=0,n=1,r=.5,i,s=e,a=e){if(us.test(t)&&(t=parseFloat(t),t=sn(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=sn(s.min,s.max,r);e===s&&(c-=t),e.min=pS(e.min,t,n,c,i),e.max=pS(e.max,t,n,c,i)}function hS(e,t,[n,r,i],s,a){lN(e,t[n],t[r],t[i],t.scale,s,a)}const aN=["x","scaleX","originX"],uN=["y","scaleY","originY"];function mS(e,t,n,r){hS(e.x,t,aN,n?n.x:void 0,r?r.x:void 0),hS(e.y,t,uN,n?n.y:void 0,r?r.y:void 0)}function gS(e){return e.translate===0&&e.scale===1}function nT(e){return gS(e.x)&&gS(e.y)}function vS(e,t){return e.min===t.min&&e.max===t.max}function cN(e,t){return vS(e.x,t.x)&&vS(e.y,t.y)}function yS(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rT(e,t){return yS(e.x,t.x)&&yS(e.y,t.y)}function bS(e){return Lr(e.x)/Lr(e.y)}function xS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class fN{constructor(){this.members=[]}add(t){ux(this.members,t),t.scheduleRender()}remove(t){if(cx(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function dN(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,a=n?.z||0;if((i||s||a)&&(r=`translate3d(${i}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,rotateX:g,rotateY:b,skewX:x,skewY:S}=n;h&&(r=`perspective(${h}px) ${r}`),m&&(r+=`rotate(${m}deg) `),g&&(r+=`rotateX(${g}deg) `),b&&(r+=`rotateY(${b}deg) `),x&&(r+=`skewX(${x}deg) `),S&&(r+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,d=e.y.scale*t.y;return(c!==1||d!==1)&&(r+=`scale(${c}, ${d})`),r||"none"}const Qy=["","X","Y","Z"],pN=1e3;let hN=0;function Jy(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=KP(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Yt,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iT(r)}function oT({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},c=t?.()){this.id=hN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vN),this.nodes.forEach(wN),this.nodes.forEach(SN),this.nodes.forEach(yN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let d=0;dthis.root.updateBlockedByResize=!1;Yt.read(()=>{g=window.innerWidth}),e(a,()=>{const x=window.innerWidth;x!==g&&(g=x,this.root.updateBlockedByResize=!0,m&&m(),m=nN(b,250),kg.hasAnimatedSinceResize&&(kg.hasAnimatedSinceResize=!1,this.nodes.forEach(kS)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:b,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||TN,{onLayoutAnimationStart:P,onLayoutAnimationComplete:_}=h.getProps(),T=!this.targetLayout||!rT(this.targetLayout,x),R=!g&&b;if(this.options.layoutRoot||this.resumeFrom||R||g&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const L={...Px(S,"layout"),onPlay:P,onComplete:_};(h.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L),this.setAnimationOrigin(m,R)}else g||kS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ql(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(kN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Lr(this.snapshot.measuredBox.x)&&!Lr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d{const W=B/1e3;CS(g.x,a.x,W),CS(g.y,a.y,W),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Dp(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),EN(this.relativeTarget,this.relativeTargetOrigin,b,W),L&&cN(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=xn()),Wi(L,this.relativeTarget)),P&&(this.animationValues=m,iN(m,h,this.latestValues,W,R,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=W},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ql(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Yt.update(()=>{kg.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=bf(0)),this.currentAnimation=Z4(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:d,layout:h,latestValues:m}=a;if(!(!c||!d||!h)){if(this!==a&&this.layout&&h&&sT(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||xn();const g=Lr(this.layout.layoutBox.x);d.x.min=a.target.x.min,d.x.max=d.x.min+g;const b=Lr(this.layout.layoutBox.y);d.y.min=a.target.y.min,d.y.max=d.y.min+b}Wi(c,d),sf(c,m),Mp(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new fN),this.sharedNodes.get(a).add(c);const h=c.options.initialPromotionConfig;c.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:d}=a;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(c=!0),!c)return;const h={};d.z&&Jy("z",a,h,this.animationValues);for(let m=0;ma.currentAnimation?.stop()),this.root.nodes.forEach(wS),this.root.sharedNodes.clear()}}}function mN(e){e.updateLayout()}function gN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,s=t.source!==e.layout.source;i==="size"?Gi(m=>{const g=s?t.measuredBox[m]:t.layoutBox[m],b=Lr(g);g.min=n[m].min,g.max=g.min+b}):sT(i,t.layoutBox,n)&&Gi(m=>{const g=s?t.measuredBox[m]:t.layoutBox[m],b=Lr(n[m]);g.max=g.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+b)});const a=lf();Mp(a,n,t.layoutBox);const c=lf();s?Mp(c,e.applyTransform(r,!0),t.measuredBox):Mp(c,n,t.layoutBox);const d=!nT(a);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:b}=m;if(g&&b){const x=xn();Dp(x,t.layoutBox,g.layoutBox);const S=xn();Dp(S,n,b.layoutBox),rT(x,S)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=x,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function vN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function bN(e){e.clearSnapshot()}function wS(e){e.clearMeasurements()}function SS(e){e.isLayoutDirty=!1}function xN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function kS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wN(e){e.resolveTargetDelta()}function SN(e){e.calcProjection()}function kN(e){e.resetSkewAndRotation()}function CN(e){e.removeLeadSnapshot()}function CS(e,t,n){e.translate=sn(t.translate,0,n),e.scale=sn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ES(e,t,n,r){e.min=sn(t.min,n.min,r),e.max=sn(t.max,n.max,r)}function EN(e,t,n,r){ES(e.x,t.x,n.x,r),ES(e.y,t.y,n.y,r)}function PN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TN={duration:.45,ease:[.4,0,.1,1]},PS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),TS=PS("applewebkit/")&&!PS("chrome/")?Math.round:Zi;function _S(e){e.min=TS(e.min),e.max=TS(e.max)}function _N(e){_S(e.x),_S(e.y)}function sT(e,t,n){return e==="position"||e==="preserve-aspect"&&!M4(bS(t),bS(n),.2)}function IN(e){return e!==e.root&&e.scroll?.wasRoot}const $N=oT({attachResizeListener:(e,t)=>Zp(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zy={current:void 0},lT=oT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zy.current){const e=new $N({});e.mount(window),e.setOptions({layoutScroll:!0}),Zy.current=e}return Zy.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),AN={pan:{Feature:Y4},drag:{Feature:q4,ProjectionNode:lT,MeasureLayout:ZP}};function IS(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&Yt.postRender(()=>s(t,hh(t)))}class RN extends Zl{mount(){const{current:t}=this.node;t&&(this.unmount=XD(t,(n,r)=>(IS(this.node,r,"Start"),i=>IS(this.node,i,"End"))))}unmount(){}}class LN extends Zl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fh(Zp(this.node.current,"focus",()=>this.onFocus()),Zp(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $S(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&Yt.postRender(()=>s(t,hh(t)))}class MN extends Zl{mount(){const{current:t}=this.node;t&&(this.unmount=e3(t,(n,r)=>($S(this.node,r,"Start"),(i,{success:s})=>$S(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const lb=new WeakMap,e0=new WeakMap,DN=e=>{const t=lb.get(e.target);t&&t(e)},NN=e=>{e.forEach(DN)};function FN({root:e,...t}){const n=e||document;e0.has(n)||e0.set(n,{});const r=e0.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(NN,{root:e,...t})),r[i]}function ON(e,t,n){const r=FN(t);return lb.set(e,n),r.observe(e),()=>{lb.delete(e),r.unobserve(e)}}const zN={some:0,all:1};class BN extends Zl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:zN[i]},c=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,s&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),b=h?m:g;b&&b(d)};return ON(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jN(t,n))&&this.startObserver()}unmount(){}}function jN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const VN={inView:{Feature:BN},tap:{Feature:MN},focus:{Feature:LN},hover:{Feature:RN}},UN={layout:{ProjectionNode:lT,MeasureLayout:ZP}},KN={..._4,...VN,...AN,...UN},cf=DP(KN,n4);class WN extends mP{constructor(){super(...arguments),this.isEnabled=!1}add(t){(ku.has(t)||HD.has(t))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?"transform":"auto")}}function HN(){return ch(()=>new WN("auto"))}const ss={top:"top",bottom:"top",left:"left",right:"left"},zg={top:"bottom",bottom:"top",left:"right",right:"left"},GN={top:"left",left:"top"},ab={top:"height",left:"width"},aT={width:"totalWidth",height:"totalHeight"},og={};let Gn=typeof document<"u"?window.visualViewport:null;function AS(e){let t=0,n=0,r=0,i=0,s=0,a=0,c={};var d;let h=((d=Gn?.scale)!==null&&d!==void 0?d:1)>1;if(e.tagName==="BODY"){let S=document.documentElement;r=S.clientWidth,i=S.clientHeight;var m;t=(m=Gn?.width)!==null&&m!==void 0?m:r;var g;n=(g=Gn?.height)!==null&&g!==void 0?g:i,c.top=S.scrollTop||e.scrollTop,c.left=S.scrollLeft||e.scrollLeft,Gn&&(s=Gn.offsetTop,a=Gn.offsetLeft)}else({width:t,height:n,top:s,left:a}=ff(e)),c.top=e.scrollTop,c.left=e.scrollLeft,r=t,i=n;if(hE()&&(e.tagName==="BODY"||e.tagName==="HTML")&&h){c.top=0,c.left=0;var b;s=(b=Gn?.pageTop)!==null&&b!==void 0?b:0;var x;a=(x=Gn?.pageLeft)!==null&&x!==void 0?x:0}return{width:t,height:n,totalWidth:r,totalHeight:i,scroll:c,top:s,left:a}}function qN(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function RS(e,t,n,r,i,s,a){var c;let d=(c=i.scroll[e])!==null&&c!==void 0?c:0,h=r[ab[e]],m=r.scroll[ss[e]]+s,g=h+r.scroll[ss[e]]-s,b=t-d+a[e]-r[ss[e]],x=t-d+n+a[e]-r[ss[e]];return bg?Math.max(g-x,m-b):0}function YN(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function LS(e){if(og[e])return og[e];let[t,n]=e.split(" "),r=ss[t]||"right",i=GN[r];ss[n]||(n="center");let s=ab[r],a=ab[i];return og[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:s,crossSize:a},og[e]}function t0(e,t,n,r,i,s,a,c,d,h){let{placement:m,crossPlacement:g,axis:b,crossAxis:x,size:S,crossSize:P}=r,_={};var T;_[x]=(T=e[x])!==null&&T!==void 0?T:0;var R,L,B,W;g==="center"?_[x]+=(((R=e[P])!==null&&R!==void 0?R:0)-((L=n[P])!==null&&L!==void 0?L:0))/2:g!==x&&(_[x]+=((B=e[P])!==null&&B!==void 0?B:0)-((W=n[P])!==null&&W!==void 0?W:0)),_[x]+=s;const M=e[x]-n[P]+d+h,Z=e[x]+e[P]-d-h;if(_[x]=Rg(_[x],M,Z),m===b){const re=c?a[S]:t[aT[S]];_[zg[b]]=Math.floor(re-e[b]+i)}else _[b]=Math.floor(e[b]+e[S]+i);return _}function XN(e,t,n,r,i,s,a,c){const d=r?n.height:t[aT.height];var h;let m=e.top!=null?n.top+e.top:n.top+(d-((h=e.bottom)!==null&&h!==void 0?h:0)-a);var g,b,x,S,P,_;let T=c!=="top"?Math.max(0,t.height+t.top+((g=t.scroll.top)!==null&&g!==void 0?g:0)-m-(((b=i.top)!==null&&b!==void 0?b:0)+((x=i.bottom)!==null&&x!==void 0?x:0)+s)):Math.max(0,m+a-(t.top+((S=t.scroll.top)!==null&&S!==void 0?S:0))-(((P=i.top)!==null&&P!==void 0?P:0)+((_=i.bottom)!==null&&_!==void 0?_:0)+s));return Math.min(t.height-s*2,T)}function MS(e,t,n,r,i,s){let{placement:a,axis:c,size:d}=s;var h,m;if(a===c)return Math.max(0,n[c]-e[c]-((h=e.scroll[c])!==null&&h!==void 0?h:0)+t[c]-((m=r[c])!==null&&m!==void 0?m:0)-r[zg[c]]-i);var g;return Math.max(0,e[d]+e[c]+e.scroll[c]-t[c]-n[c]-n[d]-((g=r[c])!==null&&g!==void 0?g:0)-r[zg[c]]-i)}function QN(e,t,n,r,i,s,a,c,d,h,m,g,b,x,S,P){let _=LS(e),{size:T,crossAxis:R,crossSize:L,placement:B,crossPlacement:W}=_,M=t0(t,c,n,_,m,g,h,b,S,P),Z=m,re=MS(c,h,t,i,s+m,_);if(a&&r[T]>re){let me=LS(`${zg[B]} ${W}`),Ee=t0(t,c,n,me,m,g,h,b,S,P);MS(c,h,t,i,s+m,me)>re&&(_=me,M=Ee,Z=m)}let ae="bottom";_.axis==="top"?_.placement==="top"?ae="top":_.placement==="bottom"&&(ae="bottom"):_.crossAxis==="top"&&(_.crossPlacement==="top"?ae="bottom":_.crossPlacement==="bottom"&&(ae="top"));let O=RS(R,M[R],n[L],c,d,s,h);M[R]+=O;let U=XN(M,c,h,b,i,s,n.height,ae);x&&x{if(!n||r===null)return;let i=s=>{let a=s.target;if(!t.current||a instanceof Node&&!a.contains(t.current)||s.target instanceof HTMLInputElement||s.target instanceof HTMLTextAreaElement)return;let c=r||eF.get(t.current);c&&c()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let bn=typeof document<"u"?window.visualViewport:null;function nF(e){let{direction:t}=uh(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:s=i,placement:a="bottom",containerPadding:c=12,shouldFlip:d=!0,boundaryElement:h=typeof document<"u"?document.body:null,offset:m=0,crossOffset:g=0,shouldUpdatePosition:b=!0,isOpen:x=!0,onClose:S,maxHeight:P,arrowBoundaryOffset:_=0}=e,[T,R]=k.useState(null),L=[b,a,i.current,r.current,s.current,c,d,h,m,g,x,t,P,_,n],B=k.useRef(bn?.scale);k.useEffect(()=>{x&&(B.current=bn?.scale)},[x]);let W=k.useCallback(()=>{if(b===!1||!x||!i.current||!r.current||!h||bn?.scale!==B.current)return;let O=null;if(s.current&&s.current.contains(document.activeElement)){var U;let K=(U=document.activeElement)===null||U===void 0?void 0:U.getBoundingClientRect(),se=s.current.getBoundingClientRect();var X;if(O={type:"top",offset:((X=K?.top)!==null&&X!==void 0?X:0)-se.top},O.offset>se.height/2){O.type="bottom";var ne;O.offset=((ne=K?.bottom)!==null&&ne!==void 0?ne:0)-se.bottom}}let G=i.current;if(!P&&i.current){var fe;G.style.top="0px",G.style.bottom="";var J;G.style.maxHeight=((J=(fe=window.visualViewport)===null||fe===void 0?void 0:fe.height)!==null&&J!==void 0?J:window.innerHeight)+"px"}let q=JN({placement:iF(a,t),overlayNode:i.current,targetNode:r.current,scrollNode:s.current||i.current,padding:c,shouldFlip:d,boundaryElement:h,offset:m,crossOffset:g,maxHeight:P,arrowSize:n,arrowBoundaryOffset:_});if(q.position){if(G.style.top="",G.style.bottom="",G.style.left="",G.style.right="",Object.keys(q.position).forEach(K=>G.style[K]=q.position[K]+"px"),G.style.maxHeight=q.maxHeight!=null?q.maxHeight+"px":"",O&&document.activeElement&&s.current){let K=document.activeElement.getBoundingClientRect(),se=s.current.getBoundingClientRect(),A=K[O.type]-se[O.type];s.current.scrollTop+=A-O.offset}R(q)}},L);Zt(W,L),rF(W),h1({ref:i,onResize:W}),h1({ref:r,onResize:W});let M=k.useRef(!1);Zt(()=>{let O,U=()=>{M.current=!0,clearTimeout(O),O=setTimeout(()=>{M.current=!1},500),W()},X=()=>{M.current&&U()};return bn?.addEventListener("resize",U),bn?.addEventListener("scroll",X),()=>{bn?.removeEventListener("resize",U),bn?.removeEventListener("scroll",X)}},[W]);let Z=k.useCallback(()=>{M.current||S?.()},[S,M]);tF({triggerRef:r,isOpen:x,onClose:S&&Z});var re,ae;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...T?.position,maxHeight:(re=T?.maxHeight)!==null&&re!==void 0?re:"100vh"}},placement:(ae=T?.placement)!==null&&ae!==void 0?ae:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:T?.arrowOffsetLeft,top:T?.arrowOffsetTop}},updatePosition:W}}function rF(e){Zt(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function iF(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}function oF(e){const t=Qi(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:s}=e.ownerDocument.defaultView;let{display:a,visibility:c}=s(e);i=a!=="none"&&c!=="hidden"&&c!=="collapse"}return i}function sF(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function uT(e,t){return e.nodeName!=="#comment"&&oF(e)&&sF(e,t)&&(!e.parentElement||uT(e.parentElement,e))}function Bx(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function cT(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function fT(e){let t=k.useRef({isFocused:!1,observer:null});Zt(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Fn(r=>{e?.(r)});return k.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,s=a=>{if(t.current.isFocused=!1,i.disabled){let c=Bx(a);n(c)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",s,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let c=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:c})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:c}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Bg=!1;function lF(e){for(;e&&!TE(e);)e=e.parentElement;let t=Qi(e),n=t.document.activeElement;if(!n||n===e)return;Bg=!0;let r=!1,i=m=>{(m.target===n||r)&&m.stopImmediatePropagation()},s=m=>{(m.target===n||r)&&(m.stopImmediatePropagation(),!e&&!r&&(r=!0,Xl(n),d()))},a=m=>{(m.target===e||r)&&m.stopImmediatePropagation()},c=m=>{(m.target===e||r)&&(m.stopImmediatePropagation(),r||(r=!0,Xl(n),d()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",s,!0),t.addEventListener("focusin",c,!0),t.addEventListener("focus",a,!0);let d=()=>{cancelAnimationFrame(h),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",s,!0),t.removeEventListener("focusin",c,!0),t.removeEventListener("focus",a,!0),Bg=!1,r=!1},h=requestAnimationFrame(d);return d}let af="default",ub="",Cg=new WeakMap;function aF(e){if(sv()){if(af==="default"){const t=At(e);ub=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}af="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";Cg.set(e,e.style[t]),e.style[t]="none"}}function FS(e){if(sv()){if(af!=="disabled")return;af="restoring",setTimeout(()=>{bE(()=>{if(af==="restoring"){const t=At(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=ub||""),ub="",af="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Cg.has(e)){let t=Cg.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Cg.delete(e)}}const jx=We.createContext({register:()=>{}});jx.displayName="PressResponderContext";function uF(e,t){return t.get?t.get.call(e):t.value}function dT(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function cF(e,t){var n=dT(e,t,"get");return uF(e,n)}function fF(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function OS(e,t,n){var r=dT(e,t,"set");return fF(e,r,n),n}function dF(e){let t=k.useContext(jx);if(t){let{register:n,...r}=t;e=lr(r,e),n()}return wE(t,e.ref),e}var sg=new WeakMap;class lg{continuePropagation(){OS(this,sg,!1)}get shouldStopPropagation(){return cF(this,sg)}constructor(t,n,r,i){CL(this,sg,{writable:!0,value:void 0}),OS(this,sg,!0);var s;let a=(s=i?.target)!==null&&s!==void 0?s:r.currentTarget;const c=a?.getBoundingClientRect();let d,h=0,m,g=null;r.clientX!=null&&r.clientY!=null&&(m=r.clientX,g=r.clientY),c&&(m!=null&&g!=null?(d=m-c.left,h=g-c.top):(d=c.width/2,h=c.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=d,this.y=h}}const zS=Symbol("linkClicked"),BS="react-aria-pressable-style",jS="data-react-aria-pressable";function fv(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:s,onClick:a,isDisabled:c,isPressed:d,preventFocusOnPress:h,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:g,ref:b,...x}=dF(e),[S,P]=k.useState(!1),_=k.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:T,removeAllGlobalListeners:R}=ox(),L=Fn((U,X)=>{let ne=_.current;if(c||ne.didFirePressStart)return!1;let G=!0;if(ne.isTriggeringEvent=!0,r){let fe=new lg("pressstart",X,U);r(fe),G=fe.shouldStopPropagation}return n&&n(!0),ne.isTriggeringEvent=!1,ne.didFirePressStart=!0,P(!0),G}),B=Fn((U,X,ne=!0)=>{let G=_.current;if(!G.didFirePressStart)return!1;G.didFirePressStart=!1,G.isTriggeringEvent=!0;let fe=!0;if(i){let J=new lg("pressend",X,U);i(J),fe=J.shouldStopPropagation}if(n&&n(!1),P(!1),t&&ne&&!c){let J=new lg("press",X,U);t(J),fe&&(fe=J.shouldStopPropagation)}return G.isTriggeringEvent=!1,fe}),W=Fn((U,X)=>{let ne=_.current;if(c)return!1;if(s){ne.isTriggeringEvent=!0;let G=new lg("pressup",X,U);return s(G),ne.isTriggeringEvent=!1,G.shouldStopPropagation}return!0}),M=Fn(U=>{let X=_.current;if(X.isPressed&&X.target){X.didFirePressStart&&X.pointerType!=null&&B(nu(X.target,U),X.pointerType,!1),X.isPressed=!1,X.isOverTarget=!1,X.activePointerId=null,X.pointerType=null,R(),g||FS(X.target);for(let ne of X.disposables)ne();X.disposables=[]}}),Z=Fn(U=>{m&&M(U)}),re=Fn(U=>{a?.(U)}),ae=Fn((U,X)=>{if(a){let ne=new MouseEvent("click",U);cT(ne,X),a(Bx(ne))}}),O=k.useMemo(()=>{let U=_.current,X={onKeyDown(G){if(n0(G.nativeEvent,G.currentTarget)&&ni(G.currentTarget,wn(G.nativeEvent))){var fe;VS(wn(G.nativeEvent),G.key)&&G.preventDefault();let J=!0;if(!U.isPressed&&!G.repeat){U.target=G.currentTarget,U.isPressed=!0,U.pointerType="keyboard",J=L(G,"keyboard");let q=G.currentTarget,K=se=>{n0(se,q)&&!se.repeat&&ni(q,wn(se))&&U.target&&W(nu(U.target,se),"keyboard")};T(At(G.currentTarget),"keyup",yf(K,ne),!0)}J&&G.stopPropagation(),G.metaKey&&gu()&&((fe=U.metaKeyEvents)===null||fe===void 0||fe.set(G.key,G.nativeEvent))}else G.key==="Meta"&&(U.metaKeyEvents=new Map)},onClick(G){if(!(G&&!ni(G.currentTarget,wn(G.nativeEvent)))&&G&&G.button===0&&!U.isTriggeringEvent&&!vu.isOpening){let fe=!0;if(c&&G.preventDefault(),!U.ignoreEmulatedMouseEvents&&!U.isPressed&&(U.pointerType==="virtual"||CE(G.nativeEvent))){let J=L(G,"virtual"),q=W(G,"virtual"),K=B(G,"virtual");re(G),fe=J&&q&&K}else if(U.isPressed&&U.pointerType!=="keyboard"){let J=U.pointerType||G.nativeEvent.pointerType||"virtual",q=W(nu(G.currentTarget,G),J),K=B(nu(G.currentTarget,G),J,!0);fe=q&&K,U.isOverTarget=!1,re(G),M(G)}U.ignoreEmulatedMouseEvents=!1,fe&&G.stopPropagation()}}},ne=G=>{var fe;if(U.isPressed&&U.target&&n0(G,U.target)){var J;VS(wn(G),G.key)&&G.preventDefault();let K=wn(G),se=ni(U.target,wn(G));B(nu(U.target,G),"keyboard",se),se&&ae(G,U.target),R(),G.key!=="Enter"&&Vx(U.target)&&ni(U.target,K)&&!G[zS]&&(G[zS]=!0,vu(U.target,G,!1)),U.isPressed=!1,(J=U.metaKeyEvents)===null||J===void 0||J.delete(G.key)}else if(G.key==="Meta"&&(!((fe=U.metaKeyEvents)===null||fe===void 0)&&fe.size)){var q;let K=U.metaKeyEvents;U.metaKeyEvents=void 0;for(let se of K.values())(q=U.target)===null||q===void 0||q.dispatchEvent(new KeyboardEvent("keyup",se))}};if(typeof PointerEvent<"u"){X.onPointerDown=J=>{if(J.button!==0||!ni(J.currentTarget,wn(J.nativeEvent)))return;if(XL(J.nativeEvent)){U.pointerType="virtual";return}U.pointerType=J.pointerType;let q=!0;if(!U.isPressed){U.isPressed=!0,U.isOverTarget=!0,U.activePointerId=J.pointerId,U.target=J.currentTarget,g||aF(U.target),q=L(J,U.pointerType);let K=wn(J.nativeEvent);"releasePointerCapture"in K&&K.releasePointerCapture(J.pointerId),T(At(J.currentTarget),"pointerup",G,!1),T(At(J.currentTarget),"pointercancel",fe,!1)}q&&J.stopPropagation()},X.onMouseDown=J=>{if(ni(J.currentTarget,wn(J.nativeEvent))&&J.button===0){if(h){let q=lF(J.target);q&&U.disposables.push(q)}J.stopPropagation()}},X.onPointerUp=J=>{!ni(J.currentTarget,wn(J.nativeEvent))||U.pointerType==="virtual"||J.button===0&&!U.isPressed&&W(J,U.pointerType||J.pointerType)},X.onPointerEnter=J=>{J.pointerId===U.activePointerId&&U.target&&!U.isOverTarget&&U.pointerType!=null&&(U.isOverTarget=!0,L(nu(U.target,J),U.pointerType))},X.onPointerLeave=J=>{J.pointerId===U.activePointerId&&U.target&&U.isOverTarget&&U.pointerType!=null&&(U.isOverTarget=!1,B(nu(U.target,J),U.pointerType,!1),Z(J))};let G=J=>{if(J.pointerId===U.activePointerId&&U.isPressed&&J.button===0&&U.target){if(ni(U.target,wn(J))&&U.pointerType!=null){let q=!1,K=setTimeout(()=>{U.isPressed&&U.target instanceof HTMLElement&&(q?M(J):(Xl(U.target),U.target.click()))},80);T(J.currentTarget,"click",()=>q=!0,!0),U.disposables.push(()=>clearTimeout(K))}else M(J);U.isOverTarget=!1}},fe=J=>{M(J)};X.onDragStart=J=>{ni(J.currentTarget,wn(J.nativeEvent))&&M(J)}}return X},[T,c,h,R,g,M,Z,B,L,W,re,ae]);return k.useEffect(()=>{if(!b)return;const U=At(b.current);if(!U||!U.head||U.getElementById(BS))return;const X=U.createElement("style");X.id=BS,X.textContent=` @layer { - [${VS}] { + [${jS}] { touch-action: pan-x pan-y pinch-zoom; } } - `.trim(),U.head.prepend(X)},[b]),k.useEffect(()=>{let U=_.current;return()=>{var X;g||OS((X=U.target)!==null&&X!==void 0?X:void 0);for(let ne of U.disposables)ne();U.disposables=[]}},[g]),{isPressed:d||S,pressProps:lr(x,O,{[VS]:!0})}}function Ux(e){return e.tagName==="A"&&e.hasAttribute("href")}function n0(e,t){const{key:n,code:r}=e,i=t,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Qi(i).HTMLInputElement&&!mT(i,n)||i instanceof Qi(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Ux(i))&&n!=="Enter")}function ru(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function mF(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Ux(e)}function US(e,t){return e instanceof HTMLInputElement?!mT(e,t):mF(e)}const gF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function mT(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":gF.has(e.type)}let Eu=null,cb=new Set,Np=new Map,bu=!1,fb=!1;const vF={Tab:!0,Escape:!0};function dv(e,t){for(let n of cb)n(e,t)}function yF(e){return!(e.metaKey||!vu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function jg(e){bu=!0,yF(e)&&(Eu="keyboard",dv("keyboard",e))}function pf(e){Eu="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(bu=!0,dv("pointer",e))}function gT(e){PE(e)&&(bu=!0,Eu="virtual")}function vT(e){e.target===window||e.target===document||Bg||!e.isTrusted||(!bu&&!fb&&(Eu="virtual",dv("virtual",e)),bu=!1,fb=!1)}function yT(){Bg||(bu=!1,fb=!0)}function db(e){if(typeof window>"u"||typeof document>"u"||Np.get(Qi(e)))return;const t=Qi(e),n=At(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){bu=!0,r.apply(this,arguments)},n.addEventListener("keydown",jg,!0),n.addEventListener("keyup",jg,!0),n.addEventListener("click",gT,!0),t.addEventListener("focus",vT,!0),t.addEventListener("blur",yT,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",pf,!0),n.addEventListener("pointermove",pf,!0),n.addEventListener("pointerup",pf,!0)),t.addEventListener("beforeunload",()=>{bT(e)},{once:!0}),Np.set(t,{focus:r})}const bT=(e,t)=>{const n=Qi(e),r=At(e);t&&r.removeEventListener("DOMContentLoaded",t),Np.has(n)&&(n.HTMLElement.prototype.focus=Np.get(n).focus,r.removeEventListener("keydown",jg,!0),r.removeEventListener("keyup",jg,!0),r.removeEventListener("click",gT,!0),n.removeEventListener("focus",vT,!0),n.removeEventListener("blur",yT,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",pf,!0),r.removeEventListener("pointermove",pf,!0),r.removeEventListener("pointerup",pf,!0)),Np.delete(n))};function bF(e){const t=At(e);let n;return t.readyState!=="loading"?db(e):(n=()=>{db(e)},t.addEventListener("DOMContentLoaded",n)),()=>bT(e,n)}typeof document<"u"&&bF();function Kx(){return Eu!=="pointer"}function eh(){return Eu}function xF(e){Eu=e,dv(e,null)}const wF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function SF(e,t,n){let r=At(n?.target);const i=typeof window<"u"?Qi(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?Qi(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?Qi(n?.target).HTMLElement:HTMLElement,c=typeof window<"u"?Qi(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!wF.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!vF[n.key])}function kF(e,t,n){db(),k.useEffect(()=>{let r=(i,s)=>{SF(!!n?.isTextInput,i,s)&&e(Kx())};return cb.add(r),()=>{cb.delete(r)}},t)}function xu(e){const t=At(e),n=Dr(t);if(eh()==="virtual"){let r=n;wE(()=>{Dr(t)===r&&e.isConnected&&Ql(e)})}else Ql(e)}function xT(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=k.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),i&&i(!1),!0},[r,i]),a=pT(s),c=k.useCallback(d=>{const h=At(d.target),m=h?Dr(h):Dr();d.target===d.currentTarget&&m===wn(d.nativeEvent)&&(n&&n(d),i&&i(!0),a(d))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?s:void 0}}}function KS(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function CF(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:KS(e.onKeyDown),onKeyUp:KS(e.onKeyUp)}}}let EF=We.createContext(null);function PF(e){let t=k.useContext(EF)||{};kE(t,e);let{ref:n,...r}=t;return r}function pv(e,t){let{focusProps:n}=xT(e),{keyboardProps:r}=CF(e),i=lr(n,r),s=PF(t),a=e.isDisabled?{}:s,c=k.useRef(e.autoFocus);k.useEffect(()=>{c.current&&t.current&&xu(t.current),c.current=!1},[t]);let d=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(d=void 0),{focusableProps:lr({...i,tabIndex:d},a)}}function TF({children:e}){let t=k.useMemo(()=>({register:()=>{}}),[]);return We.createElement(Vx.Provider,{value:t},e)}function hv(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=k.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:c}=sx(),d=k.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,c(),n&&n(g),i&&i(!1))},[n,i,s,c]),h=pT(d),m=k.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=At(g.target),x=Dr(b);if(!s.current.isFocusWithin&&x===wn(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,h(g);let S=g.currentTarget;a(b,"focus",P=>{if(s.current.isFocusWithin&&!ri(S,P.target)){let _=new b.defaultView.FocusEvent("blur",{relatedTarget:P.target});dT(_,S);let T=jx(_);d(T)}},{capture:!0})}},[r,i,h,a,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:d}}}let pb=!1,r0=0;function _F(){pb=!0,setTimeout(()=>{pb=!1},50)}function WS(e){e.pointerType==="touch"&&_F()}function IF(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",WS),r0++,()=>{r0--,!(r0>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",WS)}}function kf(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,a]=k.useState(!1),c=k.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;k.useEffect(IF,[]);let{addGlobalListener:d,removeAllGlobalListeners:h}=sx(),{hoverProps:m,triggerHoverEnd:g}=k.useMemo(()=>{let b=(P,_)=>{if(c.pointerType=_,i||_==="touch"||c.isHovered||!P.currentTarget.contains(P.target))return;c.isHovered=!0;let T=P.currentTarget;c.target=T,d(At(P.target),"pointerover",R=>{c.isHovered&&c.target&&!ri(c.target,R.target)&&x(R,R.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:T,pointerType:_}),n&&n(!0),a(!0)},x=(P,_)=>{let T=c.target;c.pointerType="",c.target=null,!(_==="touch"||!c.isHovered||!T)&&(c.isHovered=!1,h(),r&&r({type:"hoverend",target:T,pointerType:_}),n&&n(!1),a(!1))},S={};return typeof PointerEvent<"u"&&(S.onPointerEnter=P=>{pb&&P.pointerType==="mouse"||b(P,P.pointerType)},S.onPointerLeave=P=>{!i&&P.currentTarget.contains(P.target)&&x(P,P.pointerType)}),{hoverProps:S,triggerHoverEnd:x}},[t,n,r,i,c,d,h]);return k.useEffect(()=>{i&&g({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:m,isHovered:s}}function $F(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,s=k.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Fn(d=>{n&&HS(d,t)&&(i&&i(d),s.current.isPointerDown=!0)}),c=Fn(d=>{n&&n(d)});k.useEffect(()=>{let d=s.current;if(r)return;const h=t.current,m=At(h);if(typeof PointerEvent<"u"){let g=b=>{d.isPointerDown&&HS(b,t)&&c(b),d.isPointerDown=!1};return m.addEventListener("pointerdown",a,!0),m.addEventListener("click",g,!0),()=>{m.removeEventListener("pointerdown",a,!0),m.removeEventListener("click",g,!0)}}},[t,r,a,c])}function HS(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const GS=We.createContext(null),hb="react-aria-focus-scope-restore";let Wt=null;function AF(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,s=k.useRef(null),a=k.useRef(null),c=k.useRef([]),{parentNode:d}=k.useContext(GS)||{},h=k.useMemo(()=>new gb({scopeRef:c}),[c]);Zt(()=>{let b=d||_n.root;if(_n.getTreeNode(b.scopeRef)&&Wt&&!Vg(Wt,b.scopeRef)){let x=_n.getTreeNode(Wt);x&&(b=x)}b.addChild(h),_n.addNode(h)},[h,d]),Zt(()=>{let b=_n.getTreeNode(c);b&&(b.contain=!!n)},[n]),Zt(()=>{var b;let x=(b=s.current)===null||b===void 0?void 0:b.nextSibling,S=[],P=_=>_.stopPropagation();for(;x&&x!==a.current;)S.push(x),x.addEventListener(hb,P),x=x.nextSibling;return c.current=S,()=>{for(let _ of S)_.removeEventListener(hb,P)}},[t]),NF(c,r,n),LF(c,n),FF(c,r,n),DF(c,i),k.useEffect(()=>{const b=Dr(At(c.current?c.current[0]:void 0));let x=null;if(eo(b,c.current)){for(let S of _n.traverse())S.scopeRef&&eo(b,S.scopeRef.current)&&(x=S);x===_n.getTreeNode(c)&&(Wt=x.scopeRef)}},[c]),Zt(()=>()=>{var b,x,S;let P=(S=(x=_n.getTreeNode(c))===null||x===void 0||(b=x.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&S!==void 0?S:null;(c===Wt||Vg(c,Wt))&&(!P||_n.getTreeNode(P))&&(Wt=P),_n.removeTreeNode(c)},[c]);let m=k.useMemo(()=>RF(c),[]),g=k.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return We.createElement(GS.Provider,{value:g},We.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,We.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function RF(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||Dr(At((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[0].previousElementSibling,m=pu(n),g=Ys(m,{tabbable:i,accept:a},n);g.currentNode=eo(d,n)?d:h;let b=g.nextNode();return!b&&s&&(g.currentNode=h,b=g.nextNode()),b&&qs(b,!0),b},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||Dr(At((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[n.length-1].nextElementSibling,m=pu(n),g=Ys(m,{tabbable:i,accept:a},n);g.currentNode=eo(d,n)?d:h;let b=g.previousNode();return!b&&s&&(g.currentNode=h,b=g.previousNode()),b&&qs(b,!0),b},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=pu(n),a=Ys(s,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let c=a.nextNode();return c&&qs(c,!0),c},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=pu(n),a=Ys(s,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let c=a.previousNode();return c&&qs(c,!0),c}}}function pu(e){return e[0].parentElement}function Tp(e){let t=_n.getTreeNode(Wt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function LF(e,t){let n=k.useRef(void 0),r=k.useRef(void 0);Zt(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=At(i?i[0]:void 0);let a=h=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Tp(e)||h.isComposing)return;let m=Dr(s),g=e.current;if(!g||!eo(m,g))return;let b=pu(g),x=Ys(b,{tabbable:!0},g);if(!m)return;x.currentNode=m;let S=h.shiftKey?x.previousNode():x.nextNode();S||(x.currentNode=h.shiftKey?g[g.length-1].nextElementSibling:g[0].previousElementSibling,S=h.shiftKey?x.previousNode():x.nextNode()),h.preventDefault(),S&&qs(S,!0)},c=h=>{(!Wt||Vg(Wt,e))&&eo(wn(h),e.current)?(Wt=e,n.current=wn(h)):Tp(e)&&!Gl(wn(h),e)?n.current?n.current.focus():Wt&&Wt.current&&mb(Wt.current):Tp(e)&&(n.current=wn(h))},d=h=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let m=eh(),g=(m==="virtual"||m===null)&&ox()&&vE(),b=Dr(s);if(!g&&b&&Tp(e)&&!Gl(b,e)){Wt=e;let S=wn(h);if(S&&S.isConnected){var x;n.current=S,(x=n.current)===null||x===void 0||x.focus()}else Wt.current&&mb(Wt.current)}})};return s.addEventListener("keydown",a,!1),s.addEventListener("focusin",c,!1),i?.forEach(h=>h.addEventListener("focusin",c,!1)),i?.forEach(h=>h.addEventListener("focusout",d,!1)),()=>{s.removeEventListener("keydown",a,!1),s.removeEventListener("focusin",c,!1),i?.forEach(h=>h.removeEventListener("focusin",c,!1)),i?.forEach(h=>h.removeEventListener("focusout",d,!1))}},[e,t]),Zt(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function wT(e){return Gl(e)}function eo(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Gl(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of _n.traverse(_n.getTreeNode(t)))if(n&&eo(e,n.current))return!0;return!1}function MF(e){return Gl(e,Wt)}function Vg(e,t){var n;let r=(n=_n.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function qs(e,t=!1){if(e!=null&&!t)try{xu(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function ST(e,t=!0){let n=e[0].previousElementSibling,r=pu(e),i=Ys(r,{tabbable:t},e);i.currentNode=n;let s=i.nextNode();return t&&!s&&(r=pu(e),i=Ys(r,{tabbable:!1},e),i.currentNode=n,s=i.nextNode()),s}function mb(e,t=!0){qs(ST(e,t))}function DF(e,t){const n=We.useRef(t);k.useEffect(()=>{if(n.current){Wt=e;const r=At(e.current?e.current[0]:void 0);!eo(Dr(r),Wt.current)&&e.current&&mb(e.current)}n.current=!1},[e])}function NF(e,t,n){Zt(()=>{if(t||n)return;let r=e.current;const i=At(r?r[0]:void 0);let s=a=>{let c=wn(a);eo(c,e.current)?Wt=e:wT(c)||(Wt=null)};return i.addEventListener("focusin",s,!1),r?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[e,t,n])}function qS(e){let t=_n.getTreeNode(Wt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function FF(e,t,n){const r=k.useRef(typeof document<"u"?Dr(At(e.current?e.current[0]:void 0)):null);Zt(()=>{let i=e.current;const s=At(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!Wt||Vg(Wt,e))&&eo(Dr(s),e.current)&&(Wt=e)};return s.addEventListener("focusin",a,!1),i?.forEach(c=>c.addEventListener("focusin",a,!1)),()=>{s.removeEventListener("focusin",a,!1),i?.forEach(c=>c.removeEventListener("focusin",a,!1))}},[e,n]),Zt(()=>{const i=At(e.current?e.current[0]:void 0);if(!t)return;let s=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Tp(e)||a.isComposing)return;let c=i.activeElement;if(!Gl(c,e)||!qS(e))return;let d=_n.getTreeNode(e);if(!d)return;let h=d.nodeToRestore,m=Ys(i.body,{tabbable:!0});m.currentNode=c;let g=a.shiftKey?m.previousNode():m.nextNode();if((!h||!h.isConnected||h===i.body)&&(h=void 0,d.nodeToRestore=void 0),(!g||!Gl(g,e))&&h){m.currentNode=h;do g=a.shiftKey?m.previousNode():m.nextNode();while(Gl(g,e));a.preventDefault(),a.stopPropagation(),g?qs(g,!0):wT(h)?qs(h,!0):c.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[e,t,n]),Zt(()=>{const i=At(e.current?e.current[0]:void 0);if(!t)return;let s=_n.getTreeNode(e);if(s){var a;return s.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let c=_n.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,h=Dr(i);if(t&&d&&(h&&Gl(h,e)||h===i.body&&qS(e))){let m=_n.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=m.getTreeNode(e);for(;g;){if(g.nodeToRestore&&g.nodeToRestore.isConnected){YS(g.nodeToRestore);return}g=g.parent}for(g=m.getTreeNode(e);g;){if(g.scopeRef&&g.scopeRef.current&&_n.getTreeNode(g.scopeRef)){let b=ST(g.scopeRef.current,!0);YS(b);return}g=g.parent}}})}}}},[e,t])}function YS(e){e.dispatchEvent(new CustomEvent(hb,{bubbles:!0,cancelable:!0}))&&qs(e)}function Ys(e,t,n){let r=t?.tabbable?iM:IE,i=e?.nodeType===Node.ELEMENT_NODE?e:null,s=At(i),a=ML(s,e||s,NodeFilter.SHOW_ELEMENT,{acceptNode(c){var d;return!(t==null||(d=t.from)===null||d===void 0)&&d.contains(c)?NodeFilter.FILTER_REJECT:r(c)&&fT(c)&&(!n||eo(c,n))&&(!t?.accept||t.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}class Wx{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new gb({scopeRef:t});i.addChild(s),s.parent=i,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&eo(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Wx;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new gb({scopeRef:null}),this.fastMap.set(null,this.root)}}class gb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let _n=new Wx;function th(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=k.useRef({isFocused:!1,isFocusVisible:t||Kx()}),[s,a]=k.useState(!1),[c,d]=k.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=k.useCallback(()=>d(i.current.isFocused&&i.current.isFocusVisible),[]),m=k.useCallback(x=>{i.current.isFocused=x,a(x),h()},[h]);kF(x=>{i.current.isFocusVisible=x,h()},[],{isTextInput:n});let{focusProps:g}=xT({isDisabled:r,onFocusChange:m}),{focusWithinProps:b}=hv({isDisabled:!r,onFocusWithinChange:m});return{isFocused:s,isFocusVisible:c,focusProps:r?b:g}}function OF(e){let t=jF(At(e));t!==e&&(t&&zF(t,e),e&&BF(e,t))}function zF(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function BF(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function jF(e){let t=Dr(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const i0=typeof document<"u"&&window.visualViewport,VF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ag=0,o0;function UF(e={}){let{isDisabled:t}=e;Zt(()=>{if(!t)return ag++,ag===1&&(sv()?o0=WF():o0=KF()),()=>{ag--,ag===0&&o0()}},[t])}function KF(){let e=window.innerWidth-document.documentElement.clientWidth;return yf(e>0&&("scrollbarGutter"in document.documentElement.style?hu(document.documentElement,"scrollbarGutter","stable"):hu(document.documentElement,"paddingRight",`${e}px`)),hu(document.documentElement,"overflow","hidden"))}function WF(){let e,t,n=h=>{e=CE(h.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=hu(e,"overscrollBehavior","contain"))},r=h=>{if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()},i=()=>{t&&t()},s=h=>{let m=h.target;HF(m)&&(c(),m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",i0&&(i0.height{XS(m)}):i0.addEventListener("resize",()=>XS(m),{once:!0}))}))},a=null,c=()=>{if(a)return;let h=()=>{window.scrollTo(0,0)},m=window.pageXOffset,g=window.pageYOffset;a=yf(fp(window,"scroll",h),hu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),hu(document.documentElement,"overflow","hidden"),hu(document.body,"marginTop",`-${g}px`),()=>{window.scrollTo(m,g)}),window.scrollTo(0,0)},d=yf(fp(document,"touchstart",n,{passive:!1,capture:!0}),fp(document,"touchmove",r,{passive:!1,capture:!0}),fp(document,"touchend",i,{passive:!1,capture:!0}),fp(document,"focus",s,!0));return()=>{t?.(),a?.(),d()}}function hu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function fp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function XS(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=CE(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,s=n.getBoundingClientRect().top;s>i+n.clientHeight&&(r.scrollTop+=s-i)}n=r.parentElement}}function HF(e){return e instanceof HTMLInputElement&&!VF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const GF=k.createContext({});function kT(){var e;return(e=k.useContext(GF))!==null&&e!==void 0?e:{}}const vb=We.createContext(null);function qF(e){let{children:t}=e,n=k.useContext(vb),[r,i]=k.useState(0),s=k.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return We.createElement(vb.Provider,{value:s},t)}function YF(){let e=k.useContext(vb);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function XF(e){let{modalProviderProps:t}=YF();return We.createElement("div",{"data-overlay-container":!0,...e,...t})}function CT(e){return We.createElement(qF,null,We.createElement(XF,e))}function QS(e){let t=nv(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=kT();if(!e.portalContainer&&i&&(n=i()),We.useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let s=We.createElement(CT,r);return _E.createPortal(s,n)}var ET={};ET={dismiss:"تجاهل"};var PT={};PT={dismiss:"Отхвърляне"};var TT={};TT={dismiss:"Odstranit"};var _T={};_T={dismiss:"Luk"};var IT={};IT={dismiss:"Schließen"};var $T={};$T={dismiss:"Απόρριψη"};var AT={};AT={dismiss:"Dismiss"};var RT={};RT={dismiss:"Descartar"};var LT={};LT={dismiss:"Lõpeta"};var MT={};MT={dismiss:"Hylkää"};var DT={};DT={dismiss:"Rejeter"};var NT={};NT={dismiss:"התעלם"};var FT={};FT={dismiss:"Odbaci"};var OT={};OT={dismiss:"Elutasítás"};var zT={};zT={dismiss:"Ignora"};var BT={};BT={dismiss:"閉じる"};var jT={};jT={dismiss:"무시"};var VT={};VT={dismiss:"Atmesti"};var UT={};UT={dismiss:"Nerādīt"};var KT={};KT={dismiss:"Lukk"};var WT={};WT={dismiss:"Negeren"};var HT={};HT={dismiss:"Zignoruj"};var GT={};GT={dismiss:"Descartar"};var qT={};qT={dismiss:"Dispensar"};var YT={};YT={dismiss:"Revocare"};var XT={};XT={dismiss:"Пропустить"};var QT={};QT={dismiss:"Zrušiť"};var JT={};JT={dismiss:"Opusti"};var ZT={};ZT={dismiss:"Odbaci"};var e_={};e_={dismiss:"Avvisa"};var t_={};t_={dismiss:"Kapat"};var n_={};n_={dismiss:"Скасувати"};var r_={};r_={dismiss:"取消"};var i_={};i_={dismiss:"關閉"};var o_={};o_={"ar-AE":ET,"bg-BG":PT,"cs-CZ":TT,"da-DK":_T,"de-DE":IT,"el-GR":$T,"en-US":AT,"es-ES":RT,"et-EE":LT,"fi-FI":MT,"fr-FR":DT,"he-IL":NT,"hr-HR":FT,"hu-HU":OT,"it-IT":zT,"ja-JP":BT,"ko-KR":jT,"lt-LT":VT,"lv-LV":UT,"nb-NO":KT,"nl-NL":WT,"pl-PL":HT,"pt-BR":GT,"pt-PT":qT,"ro-RO":YT,"ru-RU":XT,"sk-SK":QT,"sl-SI":JT,"sr-SP":ZT,"sv-SE":e_,"tr-TR":t_,"uk-UA":n_,"zh-CN":r_,"zh-TW":i_};const JS={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function QF(e={}){let{style:t,isFocusable:n}=e,[r,i]=k.useState(!1),{focusWithinProps:s}=hv({isDisabled:!n,onFocusWithinChange:c=>i(c)}),a=k.useMemo(()=>r?t:t?{...JS,...t}:JS,[r]);return{visuallyHiddenProps:{...s,style:a}}}function JF(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:a}=QF(e);return We.createElement(n,lr(s,a),t)}function ZF(e){return e&&e.__esModule?e.default:e}function ZS(e){let{onDismiss:t,...n}=e,r=CL(ZF(o_),"@react-aria/overlays"),i=SE(n,r.format("dismiss")),s=()=>{t&&t()};return We.createElement(JF,null,We.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}let dp=new WeakMap,Hi=[];function e5(e,t=document.body){let n=new Set(e),r=new Set,i=d=>{for(let b of d.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let h=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let x of n)if(b.contains(x))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},m=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,{acceptNode:h}),g=h(d);if(g===NodeFilter.FILTER_ACCEPT&&s(d),g!==NodeFilter.FILTER_REJECT){let b=m.nextNode();for(;b!=null;)s(b),b=m.nextNode()}},s=d=>{var h;let m=(h=dp.get(d))!==null&&h!==void 0?h:0;d.getAttribute("aria-hidden")==="true"&&m===0||(m===0&&d.setAttribute("aria-hidden","true"),r.add(d),dp.set(d,m+1))};Hi.length&&Hi[Hi.length-1].disconnect(),i(t);let a=new MutationObserver(d=>{for(let h of d)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...n,...r].some(m=>m.contains(h.target))){for(let m of h.removedNodes)m instanceof Element&&(n.delete(m),r.delete(m));for(let m of h.addedNodes)(m instanceof HTMLElement||m instanceof SVGElement)&&(m.dataset.liveAnnouncer==="true"||m.dataset.reactAriaTopLayer==="true")?n.add(m):m instanceof Element&&i(m)}});a.observe(t,{childList:!0,subtree:!0});let c={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Hi.push(c),()=>{a.disconnect();for(let d of r){let h=dp.get(d);h!=null&&(h===1?(d.removeAttribute("aria-hidden"),dp.delete(d)):dp.set(d,h-1))}c===Hi[Hi.length-1]?(Hi.pop(),Hi.length&&Hi[Hi.length-1].observe()):Hi.splice(Hi.indexOf(c),1)}}const s_=We.createContext(null);function t5(e){let t=nv(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,s]=k.useState(!1),a=k.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:c}=kT();if(!e.portalContainer&&c&&(n=c()),!n)return null;let d=e.children;return e.disableFocusManagement||(d=We.createElement(AF,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=We.createElement(s_.Provider,{value:a},We.createElement(TF,null,d)),_E.createPortal(d,n)}function l_(){let e=k.useContext(s_),t=e?.setContain;Zt(()=>{t?.(!0)},[t])}var n5=({children:e,navigate:t,disableAnimation:n,useHref:r,disableRipple:i=!1,skipFramerMotionAnimations:s=n,reducedMotion:a="never",validationBehavior:c,locale:d="en-US",labelPlacement:h,defaultDates:m,createCalendar:g,spinnerVariant:b,...x})=>{let S=e;t&&(S=F.jsx(HL,{navigate:t,useHref:r,children:S}));const P=k.useMemo(()=>(n&&s&&(cs.skipAnimations=!0),{createCalendar:g,defaultDates:m,disableAnimation:n,disableRipple:i,validationBehavior:c,labelPlacement:h,spinnerVariant:b}),[g,m?.maxDate,m?.minDate,n,i,c,h,b]);return F.jsx(iL,{value:P,children:F.jsx(gL,{locale:d,children:F.jsx(y3,{reducedMotion:a,children:F.jsx(CT,{...x,children:S})})})})};function VH(e){const t=Pi(),n=t?.labelPlacement;return k.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function r5(e){const t=Pi(),n=t?.labelPlacement;return k.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function Ti(e){return k.forwardRef(e)}var ta=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((i,s)=>s in e?{...i,[s]:e[s]}:i,{});return n?[Object.keys(e).filter(s=>!t.includes(s)).reduce((s,a)=>({...s,[a]:e[a]}),{}),r]:[e,r]},i5={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},o5={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},s5={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},l5={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},a5={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},u5={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},c5={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},Ze={solid:i5,shadow:o5,bordered:s5,flat:l5,faded:a5,light:u5,ghost:c5},f5={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},d5={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},p5={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},h5={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},rs="250ms",m5={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":rs},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":rs},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":rs},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":rs},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":rs},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":rs},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":rs},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":rs},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":rs},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":rs}},g5={...d5,...m5,...p5,...h5,...f5},ug=["small","medium","large"],yb={theme:{spacing:["divider"],radius:ug},classGroups:{shadow:[{shadow:ug}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...ug]}],"border-w":[{border:ug}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(g5).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},ek=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ti=e=>!e||typeof e!="object"||Object.keys(e).length===0,v5=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function a_(e,t){e.forEach(function(n){Array.isArray(n)?a_(n,t):t.push(n)})}function u_(e){let t=[];return a_(e,t),t}var c_=(...e)=>u_(e).filter(Boolean),f_=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let a=e[s],c=t[s];Array.isArray(a)||Array.isArray(c)?n[s]=c_(c,a):typeof a=="object"&&typeof c=="object"?n[s]=f_(a,c):n[s]=c+" "+a}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},tk=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Hx="-",y5=e=>{const t=x5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const c=a.split(Hx);return c[0]===""&&c.length!==1&&c.shift(),d_(c,t)||b5(a)},getConflictingClassGroupIds:(a,c)=>{const d=n[a]||[];return c&&r[a]?[...d,...r[a]]:d}}},d_=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?d_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Hx);return t.validators.find(({validator:a})=>a(s))?.classGroupId},nk=/^\[(.+)\]$/,b5=e=>{if(nk.test(e)){const t=nk.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},x5=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)bb(n[i],r,i,t);return r},bb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:rk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(w5(i)){bb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{bb(a,rk(t,s),n,r)})})},rk=(e,t)=>{let n=e;return t.split(Hx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},w5=e=>e.isThemeGetter,S5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},xb="!",wb=":",k5=wb.length,C5=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,c=0,d=0,h;for(let S=0;Sd?h-d:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:x}};if(t){const i=t+wb,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},E5=e=>e.endsWith(xb)?e.substring(0,e.length-1):e.startsWith(xb)?e.substring(1):e,P5=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},T5=e=>({cache:S5(e.cacheSize),parseClassName:C5(e),sortModifiers:P5(e),...y5(e)}),_5=/\s+/,I5=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],c=e.trim().split(_5);let d="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:P}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let _=!!P,T=r(_?S.substring(0,P):S);if(!T){if(!_){d=m+(d.length>0?" "+d:d);continue}if(T=r(S),!T){d=m+(d.length>0?" "+d:d);continue}_=!1}const R=s(b).join(":"),L=x?R+xb:R,B=L+T;if(a.includes(B))continue;a.push(B);const W=i(T,_);for(let M=0;M0?" "+d:d)}return d};function $5(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rg(m),e());return n=T5(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const m=I5(d,n);return i(d,m),m}return function(){return s($5.apply(null,arguments))}}const qn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},h_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,m_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,A5=/^\d+\/\d+$/,R5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,L5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,M5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,D5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,N5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Jc=e=>A5.test(e),mt=e=>!!e&&!Number.isNaN(Number(e)),iu=e=>!!e&&Number.isInteger(Number(e)),ik=e=>e.endsWith("%")&&mt(e.slice(0,-1)),Ul=e=>R5.test(e),F5=()=>!0,O5=e=>L5.test(e)&&!M5.test(e),Gx=()=>!1,z5=e=>D5.test(e),B5=e=>N5.test(e),j5=e=>!Ne(e)&&!Fe(e),V5=e=>Lf(e,y_,Gx),Ne=e=>h_.test(e),ou=e=>Lf(e,b_,O5),s0=e=>Lf(e,Z5,mt),U5=e=>Lf(e,g_,Gx),K5=e=>Lf(e,v_,B5),W5=e=>Lf(e,Gx,z5),Fe=e=>m_.test(e),cg=e=>Mf(e,b_),H5=e=>Mf(e,eO),G5=e=>Mf(e,g_),q5=e=>Mf(e,y_),Y5=e=>Mf(e,v_),X5=e=>Mf(e,tO,!0),Lf=(e,t,n)=>{const r=h_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mf=(e,t,n=!1)=>{const r=m_.exec(e);return r?r[1]?t(r[1]):n:!1},g_=e=>e==="position",Q5=new Set(["image","url"]),v_=e=>Q5.has(e),J5=new Set(["length","size","percentage"]),y_=e=>J5.has(e),b_=e=>e==="length",Z5=e=>e==="number",eO=e=>e==="family-name",tO=e=>e==="shadow",kb=()=>{const e=qn("color"),t=qn("font"),n=qn("text"),r=qn("font-weight"),i=qn("tracking"),s=qn("leading"),a=qn("breakpoint"),c=qn("container"),d=qn("spacing"),h=qn("radius"),m=qn("shadow"),g=qn("inset-shadow"),b=qn("drop-shadow"),x=qn("blur"),S=qn("perspective"),P=qn("aspect"),_=qn("ease"),T=qn("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],M=()=>[Fe,Ne,d],Z=()=>[Jc,"full","auto",...M()],re=()=>[iu,"none","subgrid",Fe,Ne],ae=()=>["auto",{span:["full",iu,Fe,Ne]},Fe,Ne],O=()=>[iu,"auto",Fe,Ne],U=()=>["auto","min","max","fr",Fe,Ne],X=()=>["start","end","center","between","around","evenly","stretch","baseline"],ne=()=>["start","end","center","stretch"],G=()=>["auto",...M()],fe=()=>[Jc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],J=()=>[e,Fe,Ne],q=()=>[ik,ou],K=()=>["","none","full",h,Fe,Ne],se=()=>["",mt,cg,ou],A=()=>["solid","dashed","dotted","double"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["","none",x,Fe,Ne],z=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Fe,Ne],me=()=>["none",mt,Fe,Ne],Ee=()=>["none",mt,Fe,Ne],we=()=>[mt,Fe,Ne],Be=()=>[Jc,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ul],breakpoint:[Ul],color:[F5],container:[Ul],"drop-shadow":[Ul],ease:["in","out","in-out"],font:[j5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ul],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ul],shadow:[Ul],spacing:["px",mt],text:[Ul],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jc,Ne,Fe,P]}],container:["container"],columns:[{columns:[mt,Ne,Fe,c]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...L(),Ne,Fe]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[iu,"auto",Fe,Ne]}],basis:[{basis:[Jc,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[mt,Jc,"auto","initial","none",Ne]}],grow:[{grow:["",mt,Fe,Ne]}],shrink:[{shrink:["",mt,Fe,Ne]}],order:[{order:[iu,"first","last","none",Fe,Ne]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...ne(),"baseline"]}],"align-self":[{self:["auto",...ne(),"baseline"]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:fe()}],w:[{w:[c,"screen",...fe()]}],"min-w":[{"min-w":[c,"screen","none",...fe()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...fe()]}],h:[{h:["screen",...fe()]}],"min-h":[{"min-h":["screen","none",...fe()]}],"max-h":[{"max-h":["screen",...fe()]}],"font-size":[{text:["base",n,cg,ou]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Fe,s0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ik,Ne]}],"font-family":[{font:[H5,Ne,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Fe,Ne]}],"line-clamp":[{"line-clamp":[mt,"none",Fe,s0]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",Fe,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Fe,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...A(),"wavy"]}],"text-decoration-thickness":[{decoration:[mt,"from-font","auto",Fe,ou]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[mt,"auto",Fe,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Fe,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Fe,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),G5,U5]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",q5,V5]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},iu,Fe,Ne],radial:["",Fe,Ne],conic:[iu,Fe,Ne]},Y5,K5]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...A(),"hidden","none"]}],"divide-style":[{divide:[...A(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...A(),"none","hidden"]}],"outline-offset":[{"outline-offset":[mt,Fe,Ne]}],"outline-w":[{outline:["",mt,cg,ou]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,X5,W5]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",Fe,Ne,g]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[mt,ou]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":J()}],opacity:[{opacity:[mt,Fe,Ne]}],"mix-blend":[{"mix-blend":[...j(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none",Fe,Ne]}],blur:[{blur:oe()}],brightness:[{brightness:[mt,Fe,Ne]}],contrast:[{contrast:[mt,Fe,Ne]}],"drop-shadow":[{"drop-shadow":["","none",b,Fe,Ne]}],grayscale:[{grayscale:["",mt,Fe,Ne]}],"hue-rotate":[{"hue-rotate":[mt,Fe,Ne]}],invert:[{invert:["",mt,Fe,Ne]}],saturate:[{saturate:[mt,Fe,Ne]}],sepia:[{sepia:["",mt,Fe,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",Fe,Ne]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[mt,Fe,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[mt,Fe,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",mt,Fe,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[mt,Fe,Ne]}],"backdrop-invert":[{"backdrop-invert":["",mt,Fe,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[mt,Fe,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[mt,Fe,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",mt,Fe,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Fe,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[mt,"initial",Fe,Ne]}],ease:[{ease:["linear","initial",_,Fe,Ne]}],delay:[{delay:[mt,Fe,Ne]}],animate:[{animate:["none",T,Fe,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Fe,Ne]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[Fe,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Fe,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Fe,Ne]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[mt,cg,ou,s0]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},nO=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(_p(e,"cacheSize",t),_p(e,"prefix",n),_p(e,"experimentalParseClassName",r),fg(e.theme,s.theme),fg(e.classGroups,s.classGroups),fg(e.conflictingClassGroups,s.conflictingClassGroups),fg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),_p(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),dg(e.theme,i.theme),dg(e.classGroups,i.classGroups),dg(e.conflictingClassGroups,i.conflictingClassGroups),dg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),x_(e,i,"orderSensitiveModifiers"),e),_p=(e,t,n)=>{n!==void 0&&(e[t]=n)},fg=(e,t)=>{if(t)for(const n in t)_p(e,n,t[n])},dg=(e,t)=>{if(t)for(const n in t)x_(e,t,n)},x_=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},w_=(e,...t)=>typeof e=="function"?Sb(kb,e,...t):Sb(()=>nO(kb(),e),...t),rO=Sb(kb);var iO={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},S_=e=>e||void 0,nh=(...e)=>S_(u_(e).filter(Boolean).join(" ")),l0=null,Gs={},Cb=!1,pp=(...e)=>t=>t.twMerge?((!l0||Cb)&&(Cb=!1,l0=ti(Gs)?rO:w_({...Gs,extend:{theme:Gs.theme,classGroups:Gs.classGroups,conflictingClassGroupModifiers:Gs.conflictingClassGroupModifiers,conflictingClassGroups:Gs.conflictingClassGroups,...Gs.extend}})),S_(l0(nh(e)))):nh(e),ok=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=nh(e[n],t[n]):e[n]=t[n];return e},oO=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:a=[],defaultVariants:c={}}=e,d={...iO,...t},h=n!=null&&n.base?nh(n.base,e?.base):e?.base,m=n!=null&&n.variants&&!ti(n.variants)?f_(i,n.variants):i,g=n!=null&&n.defaultVariants&&!ti(n.defaultVariants)?{...n.defaultVariants,...c}:c;!ti(d.twMergeConfig)&&!v5(d.twMergeConfig,Gs)&&(Cb=!0,Gs=d.twMergeConfig);let b=ti(n?.slots),x=ti(r)?{}:{base:nh(e?.base,b&&n?.base),...r},S=b?x:ok({...n?.slots},ti(x)?{base:e?.base}:x),P=ti(n?.compoundVariants)?s:c_(n?.compoundVariants,s),_=R=>{if(ti(m)&&ti(r)&&b)return pp(h,R?.class,R?.className)(d);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let L=(X,ne,G=[],fe)=>{let J=G;if(typeof ne=="string")J=J.concat(tk(ne).split(" ").map(q=>`${X}:${q}`));else if(Array.isArray(ne))J=J.concat(ne.reduce((q,K)=>q.concat(`${X}:${K}`),[]));else if(typeof ne=="object"&&typeof fe=="string"){for(let q in ne)if(ne.hasOwnProperty(q)&&q===fe){let K=ne[q];if(K&&typeof K=="string"){let se=tk(K);J[fe]?J[fe]=J[fe].concat(se.split(" ").map(A=>`${X}:${A}`)):J[fe]=se.split(" ").map(A=>`${X}:${A}`)}else Array.isArray(K)&&K.length>0&&(J[fe]=K.reduce((se,A)=>se.concat(`${X}:${A}`),[]))}}return J},B=(X,ne=m,G=null,fe=null)=>{var J;let q=ne[X];if(!q||ti(q))return null;let K=(J=fe?.[X])!=null?J:R?.[X];if(K===null)return null;let se=ek(K),A=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,j=g?.[X],oe=[];if(typeof se=="object"&&A)for(let[Ee,we]of Object.entries(se)){let Be=q[we];if(Ee==="initial"){j=we;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Ee)||(oe=L(Ee,Be,oe,G))}let z=se!=null&&typeof se!="object"?se:ek(j),me=q[z||"false"];return typeof oe=="object"&&typeof G=="string"&&oe[G]?ok(oe,me):oe.length>0?(oe.push(me),G==="base"?oe.join(" "):oe):me},W=()=>m?Object.keys(m).map(X=>B(X,m)):null,M=(X,ne)=>{if(!m||typeof m!="object")return null;let G=new Array;for(let fe in m){let J=B(fe,m,X,ne),q=X==="base"&&typeof J=="string"?J:J&&J[X];q&&(G[G.length]=q)}return G},Z={};for(let X in R)R[X]!==void 0&&(Z[X]=R[X]);let re=(X,ne)=>{var G;let fe=typeof R?.[X]=="object"?{[X]:(G=R[X])==null?void 0:G.initial}:{};return{...g,...Z,...fe,...ne}},ae=(X=[],ne)=>{let G=[];for(let{class:fe,className:J,...q}of X){let K=!0;for(let[se,A]of Object.entries(q)){let j=re(se,ne)[se];if(Array.isArray(A)){if(!A.includes(j)){K=!1;break}}else{let oe=z=>z==null||z===!1;if(oe(A)&&oe(j))continue;if(j!==A){K=!1;break}}}K&&(fe&&G.push(fe),J&&G.push(J))}return G},O=X=>{let ne=ae(P,X);if(!Array.isArray(ne))return ne;let G={};for(let fe of ne)if(typeof fe=="string"&&(G.base=pp(G.base,fe)(d)),typeof fe=="object")for(let[J,q]of Object.entries(fe))G[J]=pp(G[J],q)(d);return G},U=X=>{if(a.length<1)return null;let ne={};for(let{slots:G=[],class:fe,className:J,...q}of a){if(!ti(q)){let K=!0;for(let se of Object.keys(q)){let A=re(se,X)[se];if(A===void 0||(Array.isArray(q[se])?!q[se].includes(A):q[se]!==A)){K=!1;break}}if(!K)continue}for(let K of G)ne[K]=ne[K]||[],ne[K].push([fe,J])}return ne};if(!ti(r)||!b){let X={};if(typeof S=="object"&&!ti(S))for(let ne of Object.keys(S))X[ne]=G=>{var fe,J;return pp(S[ne],M(ne,G),((fe=O(G))!=null?fe:[])[ne],((J=U(G))!=null?J:[])[ne],G?.class,G?.className)(d)};return X}return pp(h,W(),ae(P),R?.class,R?.className)(d)},T=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return _.variantKeys=T(),_.extend=n,_.base=h,_.slots=S,_.variants=m,_.defaultVariants=g,_.compoundSlots=a,_.compoundVariants=P,_},Nr=(e,t)=>{var n,r,i;return oO(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...yb.theme},classGroups:{...(i=t?.twMergeConfig)==null?void 0:i.classGroups,...yb.classGroups}}})},sk=Nr({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),mh=["outline-hidden","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],sO=["outline-hidden","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],Zc={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},lk=Nr({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...mh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-hidden","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:Ze.solid.foreground},primary:{base:"before:bg-primary",content:Ze.solid.primary},secondary:{base:"before:bg-secondary",content:Ze.solid.secondary},success:{base:"before:bg-success",content:Ze.solid.success},warning:{base:"before:bg-warning",content:Ze.solid.warning},danger:{base:"before:bg-danger",content:Ze.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});Nr({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});var ak=Nr({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]}),lO=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],aO=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],uk=Nr({base:[],variants:{orientation:{vertical:["overflow-y-auto",...lO],horizontal:["overflow-x-auto",...aO]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),ck=Nr({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","pointer-events-none","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:pointer-events-auto","data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:animate-none before:transition-none after:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{}}),fk=Nr({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-xs px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-hidden placeholder:text-foreground-500 focus-visible:outline-hidden","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","data-[type=color]:rounded-none","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-hidden","select-none","opacity-0","cursor-pointer","active:!opacity-70","rounded-full",...mh],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large hover:!opacity-100"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large hover:!opacity-100"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},"outside-top":{mainWrapper:"flex flex-col",label:"relative text-foreground pb-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity,translate,scale]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1},compoundVariants:[{variant:"flat",color:"default",class:{input:"group-data-[has-value=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-100","data-[hover=true]:bg-primary-50","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-100","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-100","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-100","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"default",class:{input:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary",label:"text-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary",label:"text-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success",label:"text-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning",label:"text-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger",label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled-within=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled-within=true]:text-foreground"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...sO]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["!bg-danger-50","data-[hover=true]:!bg-danger-100","group-data-[focus=true]:!bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:!border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:!bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{inputWrapper:"h-16 py-2.5 gap-0"}},{labelPlacement:"inside",size:"sm",variant:["bordered","faded"],class:{inputWrapper:"py-1"}},{labelPlacement:["inside","outside"],class:{label:["group-data-[filled-within=true]:pointer-events-auto"]}},{labelPlacement:"outside",isMultiline:!1,class:{base:"relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled-within=true]:start-0"]}},{labelPlacement:["inside"],class:{label:["group-data-[filled-within=true]:scale-85"]}},{labelPlacement:["inside"],variant:"flat",class:{innerWrapper:"pb-0.5"}},{variant:"underlined",size:"sm",class:{innerWrapper:"pb-1"}},{variant:"underlined",size:["md","lg"],class:{innerWrapper:"pb-1.5"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",size:"lg",isMultiline:!1,class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",size:"md",isMultiline:!1,class:{label:["start-3","end-auto","text-small","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",size:"lg",isMultiline:!1,class:{label:["start-3","end-auto","text-medium","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:["outside","outside-left"],isMultiline:!0,class:{inputWrapper:"py-2"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:"inside",isMultiline:!0,class:{label:"pb-0.5",input:"pt-0"}},{isMultiline:!0,disableAnimation:!1,class:{input:"transition-height !duration-100 motion-reduce:transition-none"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{isMultiline:!0,radius:"full",class:{inputWrapper:"data-[has-multiple-rows=true]:rounded-large"}},{isClearable:!0,isMultiline:!0,class:{clearButton:["group-data-[has-value=true]:opacity-70 group-data-[has-value=true]:block","group-data-[has-value=true]:scale-100","group-data-[has-value=true]:pointer-events-auto"]}}]}),dk=Nr({slots:{wrapper:["flex","w-screen","h-[100dvh]","fixed","inset-0","z-50","overflow-x-auto","justify-center","h-[--visual-viewport-height]"],base:["flex","flex-col","relative","bg-white","z-50","w-full","box-border","bg-content1","outline-hidden","mx-1","my-1","sm:mx-6","sm:my-16"],backdrop:"z-50",header:"flex py-4 px-6 flex-initial text-large font-semibold",body:"flex flex-1 flex-col gap-3 px-6 py-2",footer:"flex flex-row gap-2 px-6 py-4 justify-end",closeButton:["absolute","appearance-none","outline-hidden","select-none","top-1","end-1","p-2","text-foreground-500","rounded-full","hover:bg-default-100","active:bg-default-200","tap-highlight-transparent",...mh]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},placement:{auto:{wrapper:"items-end sm:items-center"},center:{wrapper:"items-center sm:items-center"},top:{wrapper:"items-start sm:items-start"},"top-center":{wrapper:"items-start sm:items-center"},bottom:{wrapper:"items-end sm:items-end"},"bottom-center":{wrapper:"items-end sm:items-center"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"hidden"},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},scrollBehavior:{normal:{base:"overflow-y-hidden"},inside:{base:"max-h-[calc(100%_-_8rem)]",body:"overflow-y-auto"},outside:{wrapper:"items-start sm:items-start overflow-y-auto",base:"my-16"}},disableAnimation:{false:{wrapper:["[--scale-enter:100%]","[--scale-exit:100%]","[--slide-enter:0px]","[--slide-exit:80px]","sm:[--scale-enter:100%]","sm:[--scale-exit:103%]","sm:[--slide-enter:0px]","sm:[--slide-exit:0px]"]}}},defaultVariants:{size:"md",radius:"lg",shadow:"sm",placement:"auto",backdrop:"opaque",scrollBehavior:"normal"},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"w-screen h-screen fixed inset-0"}}]}),uO=Nr({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),cO=Nr({base:"flex flex-col gap-2 items-start"}),pk=Nr({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]}),fO=Nr({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-hidden","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...mh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:Ze.solid.default},{variant:"solid",color:"primary",class:Ze.solid.primary},{variant:"solid",color:"secondary",class:Ze.solid.secondary},{variant:"solid",color:"success",class:Ze.solid.success},{variant:"solid",color:"warning",class:Ze.solid.warning},{variant:"solid",color:"danger",class:Ze.solid.danger},{variant:"shadow",color:"default",class:Ze.shadow.default},{variant:"shadow",color:"primary",class:Ze.shadow.primary},{variant:"shadow",color:"secondary",class:Ze.shadow.secondary},{variant:"shadow",color:"success",class:Ze.shadow.success},{variant:"shadow",color:"warning",class:Ze.shadow.warning},{variant:"shadow",color:"danger",class:Ze.shadow.danger},{variant:"bordered",color:"default",class:Ze.bordered.default},{variant:"bordered",color:"primary",class:Ze.bordered.primary},{variant:"bordered",color:"secondary",class:Ze.bordered.secondary},{variant:"bordered",color:"success",class:Ze.bordered.success},{variant:"bordered",color:"warning",class:Ze.bordered.warning},{variant:"bordered",color:"danger",class:Ze.bordered.danger},{variant:"flat",color:"default",class:Ze.flat.default},{variant:"flat",color:"primary",class:Ze.flat.primary},{variant:"flat",color:"secondary",class:Ze.flat.secondary},{variant:"flat",color:"success",class:Ze.flat.success},{variant:"flat",color:"warning",class:Ze.flat.warning},{variant:"flat",color:"danger",class:Ze.flat.danger},{variant:"faded",color:"default",class:Ze.faded.default},{variant:"faded",color:"primary",class:Ze.faded.primary},{variant:"faded",color:"secondary",class:Ze.faded.secondary},{variant:"faded",color:"success",class:Ze.faded.success},{variant:"faded",color:"warning",class:Ze.faded.warning},{variant:"faded",color:"danger",class:Ze.faded.danger},{variant:"light",color:"default",class:[Ze.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[Ze.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[Ze.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[Ze.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[Ze.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[Ze.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[Ze.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[Ze.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[Ze.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[Ze.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[Ze.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[Ze.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:Zc.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:Zc.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:Zc.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:Zc.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:Zc.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:Zc.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});Nr({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var dO=Nr({base:"px-2",variants:{variant:{light:"",shadow:"px-4 shadow-medium rounded-medium bg-content1",bordered:"px-4 border-medium border-divider rounded-medium",splitted:"flex flex-col gap-2"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"light",fullWidth:!0}}),pO=Nr({slots:{base:"",heading:"",trigger:["flex py-4 w-full h-full gap-3 outline-hidden items-center tap-highlight-transparent",...mh],startContent:"shrink-0",indicator:"text-default-400",titleWrapper:"flex-1 flex flex-col text-start",title:"text-foreground text-medium",subtitle:"text-small text-foreground-500 font-normal",content:"py-2"},variants:{variant:{splitted:{base:"px-4 bg-content1 shadow-medium rounded-medium"}},isCompact:{true:{trigger:"py-2",title:"text-medium",subtitle:"text-small",indicator:"text-medium",content:"py-1"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},hideIndicator:{true:{indicator:"hidden"}},disableAnimation:{true:{content:"hidden data-[open=true]:block"},false:{indicator:"transition-transform",trigger:"transition-opacity"}},disableIndicatorAnimation:{true:{indicator:"transition-none"},false:{indicator:"rotate-0 data-[open=true]:-rotate-90 rtl:-rotate-180 rtl:data-[open=true]:-rotate-90"}}},defaultVariants:{size:"md",radius:"lg",isDisabled:!1,hideIndicator:!1,disableIndicatorAnimation:!1}});function k_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");i=d(n.map(h=>{if(h=vO(h),h in hk)return;hk[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":gO,m||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((x,S)=>{b.addEventListener("load",x),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function yO(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:S,type:P="button"}=e,_;n==="button"?_={type:P,disabled:r}:_={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?S:void 0};let{pressProps:T,isPressed:R}=fv({onPressStart:s,onPressEnd:a,onPressChange:d,onPress:i,onPressUp:c,onClick:g,isDisabled:r,preventFocusOnPress:h,ref:t}),{focusableProps:L}=pv(e,t);m&&(L.tabIndex=r?-1:L.tabIndex);let B=lr(L,T,_f(e,{labelable:!0}));return{isPressed:R,buttonProps:lr(_,B,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function bO(e,t,n){let{item:r,isDisabled:i}=e,s=r.key,a=t.selectionManager,c=k.useId(),d=k.useId(),h=t.disabledKeys.has(r.key)||i;k.useEffect(()=>{s===t.focusedKey&&document.activeElement!==n.current&&n.current&&xu(n.current)},[n,s,t.focusedKey]);let m=k.useCallback(P=>{a.canSelectItem(s)&&(a.select(s,P),t.toggleKey(s))},[s,a]);const g=k.useCallback(P=>{a.selectionBehavior==="replace"&&a.extendSelection(P),a.setFocusedKey(P)},[a]),b=k.useCallback(P=>{const T={ArrowDown:()=>{const R=t.collection.getKeyAfter(s);if(R&&t.disabledKeys.has(R)){const L=t.collection.getKeyAfter(R);L&&g(L)}else R&&g(R)},ArrowUp:()=>{const R=t.collection.getKeyBefore(s);if(R&&t.disabledKeys.has(R)){const L=t.collection.getKeyBefore(R);L&&g(L)}else R&&g(R)},Home:()=>{const R=t.collection.getFirstKey();R&&g(R)},End:()=>{const R=t.collection.getLastKey();R&&g(R)}}[P.key];T&&(P.preventDefault(),a.canSelectItem(s)&&T(P))},[s,a]);let{buttonProps:x}=yO({id:c,elementType:"button",isDisabled:h,onKeyDown:b,onPress:m},n),S=t.selectionManager.isSelected(r.key);return{buttonProps:{...x,"aria-expanded":S,"aria-controls":S?d:void 0},regionProps:{id:d,role:"region","aria-labelledby":c}}}function mk(e){return KL()?e.altKey:e.ctrlKey}function Eg(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,s=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return s&&(i=`[data-collection="${CSS.escape(s)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const C_=new WeakMap;function xO(e){let t=vf();return C_.set(e,t),t}function UH(e){return C_.get(e)}const wO=1e3;function SO(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=k.useRef({search:"",timeout:void 0}).current,s=a=>{let c=kO(a.key);if(!(!c||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(c===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=c,t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.search,n.focusedKey);d==null&&(d=t.getKeyForSearch(i.search)),d!=null&&(n.setFocusedKey(d),r&&r(d))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},wO)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0}}}function kO(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function CO(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:a=!1,disallowSelectAll:c=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:g,allowsTabNavigation:b=!1,isVirtualized:x,scrollRef:S=r,linkBehavior:P="action"}=e,{direction:_}=uh(),T=bE(),R=q=>{var K;if(q.altKey&&q.key==="Tab"&&q.preventDefault(),!(!((K=r.current)===null||K===void 0)&&K.contains(q.target)))return;const se=(Ie,Rt)=>{if(Ie!=null){if(t.isLink(Ie)&&P==="selection"&&h&&!mk(q)){TE.flushSync(()=>{t.setFocusedKey(Ie,Rt)});let bt=Eg(r,Ie),Xt=t.getItemProps(Ie);bt&&T.open(bt,q,Xt.href,Xt.routerOptions);return}if(t.setFocusedKey(Ie,Rt),t.isLink(Ie)&&P==="override")return;q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&!mk(q)&&t.replaceSelection(Ie)}};switch(q.key){case"ArrowDown":if(n.getKeyBelow){var A,j,oe;let Ie=t.focusedKey!=null?(A=n.getKeyBelow)===null||A===void 0?void 0:A.call(n,t.focusedKey):(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n);Ie==null&&s&&(Ie=(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),Ie!=null&&(q.preventDefault(),se(Ie))}break;case"ArrowUp":if(n.getKeyAbove){var z,me,Ee;let Ie=t.focusedKey!=null?(z=n.getKeyAbove)===null||z===void 0?void 0:z.call(n,t.focusedKey):(me=n.getLastKey)===null||me===void 0?void 0:me.call(n);Ie==null&&s&&(Ie=(Ee=n.getLastKey)===null||Ee===void 0?void 0:Ee.call(n,t.focusedKey)),Ie!=null&&(q.preventDefault(),se(Ie))}break;case"ArrowLeft":if(n.getKeyLeftOf){var we,Be,Oe;let Ie=t.focusedKey!=null?(we=n.getKeyLeftOf)===null||we===void 0?void 0:we.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=_==="rtl"?(Be=n.getFirstKey)===null||Be===void 0?void 0:Be.call(n,t.focusedKey):(Oe=n.getLastKey)===null||Oe===void 0?void 0:Oe.call(n,t.focusedKey)),Ie!=null&&(q.preventDefault(),se(Ie,_==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var Te,tt,yt;let Ie=t.focusedKey!=null?(Te=n.getKeyRightOf)===null||Te===void 0?void 0:Te.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=_==="rtl"?(tt=n.getLastKey)===null||tt===void 0?void 0:tt.call(n,t.focusedKey):(yt=n.getFirstKey)===null||yt===void 0?void 0:yt.call(n,t.focusedKey)),Ie!=null&&(q.preventDefault(),se(Ie,_==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&q.shiftKey)return;q.preventDefault();let Ie=n.getFirstKey(t.focusedKey,up(q));t.setFocusedKey(Ie),Ie!=null&&(up(q)&&q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&q.shiftKey)return;q.preventDefault();let Ie=n.getLastKey(t.focusedKey,up(q));t.setFocusedKey(Ie),Ie!=null&&(up(q)&&q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let Ie=n.getKeyPageBelow(t.focusedKey);Ie!=null&&(q.preventDefault(),se(Ie))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let Ie=n.getKeyPageAbove(t.focusedKey);Ie!=null&&(q.preventDefault(),se(Ie))}break;case"a":up(q)&&t.selectionMode==="multiple"&&c!==!0&&(q.preventDefault(),t.selectAll());break;case"Escape":d==="clearSelection"&&!a&&t.selectedKeys.size!==0&&(q.stopPropagation(),q.preventDefault(),t.clearSelection());break;case"Tab":if(!b){if(q.shiftKey)r.current.focus();else{let Ie=Ys(r.current,{tabbable:!0}),Rt,bt;do bt=Ie.lastChild(),bt&&(Rt=bt);while(bt);Rt&&!Rt.contains(document.activeElement)&&Ql(Rt)}break}}},L=k.useRef({top:0,left:0});eg(S,"scroll",x?void 0:()=>{var q,K,se,A;L.current={top:(se=(q=S.current)===null||q===void 0?void 0:q.scrollTop)!==null&&se!==void 0?se:0,left:(A=(K=S.current)===null||K===void 0?void 0:K.scrollLeft)!==null&&A!==void 0?A:0}});let B=q=>{if(t.isFocused){q.currentTarget.contains(q.target)||t.setFocused(!1);return}if(q.currentTarget.contains(q.target)){if(t.setFocused(!0),t.focusedKey==null){var K,se;let oe=me=>{me!=null&&(t.setFocusedKey(me),h&&!t.isSelected(me)&&t.replaceSelection(me))},z=q.relatedTarget;var A,j;z&&q.currentTarget.compareDocumentPosition(z)&Node.DOCUMENT_POSITION_FOLLOWING?oe((A=t.lastSelectedKey)!==null&&A!==void 0?A:(K=n.getLastKey)===null||K===void 0?void 0:K.call(n)):oe((j=t.firstSelectedKey)!==null&&j!==void 0?j:(se=n.getFirstKey)===null||se===void 0?void 0:se.call(n))}else!x&&S.current&&(S.current.scrollTop=L.current.top,S.current.scrollLeft=L.current.left);if(t.focusedKey!=null&&S.current){let oe=Eg(r,t.focusedKey);oe instanceof HTMLElement&&(!oe.contains(document.activeElement)&&!g&&Ql(oe),eh()==="keyboard"&&v1(oe,{containingElement:r.current}))}}},W=q=>{q.currentTarget.contains(q.relatedTarget)||t.setFocused(!1)},M=k.useRef(!1);eg(r,tM,g?q=>{let{detail:K}=q;q.stopPropagation(),t.setFocused(!0),K?.focusStrategy==="first"&&(M.current=!0)}:void 0);let Z=Fn(()=>{var q,K;let se=(K=(q=n.getFirstKey)===null||q===void 0?void 0:q.call(n))!==null&&K!==void 0?K:null;se==null?(OF(r.current),t.collection.size>0&&(M.current=!1)):(t.setFocusedKey(se),M.current=!1)});h1(()=>{M.current&&Z()},[t.collection,Z]);let re=Fn(()=>{t.collection.size>0&&(M.current=!1)});h1(()=>{re()},[t.focusedKey,re]),eg(r,eM,g?q=>{var K;q.stopPropagation(),t.setFocused(!1),!((K=q.detail)===null||K===void 0)&&K.clearFocusKey&&t.setFocusedKey(null)}:void 0);const ae=k.useRef(i),O=k.useRef(!1);k.useEffect(()=>{if(ae.current){var q,K;let j=null;var se;i==="first"&&(j=(se=(q=n.getFirstKey)===null||q===void 0?void 0:q.call(n))!==null&&se!==void 0?se:null);var A;i==="last"&&(j=(A=(K=n.getLastKey)===null||K===void 0?void 0:K.call(n))!==null&&A!==void 0?A:null);let oe=t.selectedKeys;if(oe.size){for(let z of oe)if(t.canSelectItem(z)){j=z;break}}t.setFocused(!0),t.setFocusedKey(j),j==null&&!g&&r.current&&xu(r.current),t.collection.size>0&&(ae.current=!1,O.current=!0)}});let U=k.useRef(t.focusedKey),X=k.useRef(null);k.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==U.current||O.current)&&S.current&&r.current){let q=eh(),K=Eg(r,t.focusedKey);if(!(K instanceof HTMLElement))return;(q==="keyboard"||O.current)&&(X.current&&cancelAnimationFrame(X.current),X.current=requestAnimationFrame(()=>{S.current&&(EE(S.current,K),q!=="virtual"&&v1(K,{containingElement:r.current}))}))}!g&&t.isFocused&&t.focusedKey==null&&U.current!=null&&r.current&&xu(r.current),U.current=t.focusedKey,O.current=!1}),k.useEffect(()=>()=>{X.current&&cancelAnimationFrame(X.current)},[]),eg(r,"react-aria-focus-scope-restore",q=>{q.preventDefault(),t.setFocused(!0)});let ne={onKeyDown:R,onFocus:B,onBlur:W,onMouseDown(q){S.current===q.target&&q.preventDefault()}},{typeSelectProps:G}=SO({keyboardDelegate:n,selectionManager:t});m||(ne=lr(G,ne));let fe;g||(fe=t.focusedKey==null?0:-1);let J=xO(t.collection);return{collectionProps:lr(ne,{tabIndex:fe,"data-collection":J})}}class gk{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?Eg(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left+n.scrollLeft,y:s.top-i.top+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,s;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(s=t?.offsetHeight)!==null&&s!==void 0?s:0}}constructor(t){this.ref=t}}class EO{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let a=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(a,s)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!Kp(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let s=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!Kp(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let s=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.xs||new EO({collection:n,disabledKeys:r,disabledBehavior:d,ref:i,collator:c,layoutDelegate:a}),[s,a,n,r,i,c,d]),{collectionProps:m}=CO({...e,ref:i,selectionManager:t,keyboardDelegate:h});return{listProps:m}}function TO(e,t,n){let{listProps:r}=PO({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:n});return delete r.onKeyDownCapture,{accordionProps:{...r,tabIndex:void 0}}}function _O(e){var t,n;const r=Pi(),{ref:i,as:s,item:a,onFocusChange:c}=e,{state:d,className:h,indicator:m,children:g,title:b,subtitle:x,startContent:S,motionProps:P,focusedKey:_,variant:T,isCompact:R=!1,classNames:L={},isDisabled:B=!1,hideIndicator:W=!1,disableAnimation:M=(t=r?.disableAnimation)!=null?t:!1,keepContentMounted:Z=!1,disableIndicatorAnimation:re=!1,HeadingComponent:ae=s||"h2",onPress:O,onPressStart:U,onPressEnd:X,onPressChange:ne,onPressUp:G,onClick:fe,...J}=e,q=s||"div",K=typeof q=="string",se=Xi(i),A=d.disabledKeys.has(a.key)||B,j=d.selectionManager.isSelected(a.key),{buttonProps:oe,regionProps:z}=bO({item:a,isDisabled:A},{...d,focusedKey:_},se),{onFocus:me,onBlur:Ee,...we}=oe,{isFocused:Be,isFocusVisible:Oe,focusProps:Te}=th({autoFocus:(n=a.props)==null?void 0:n.autoFocus}),{isHovered:tt,hoverProps:yt}=kf({isDisabled:A}),{pressProps:Ie,isPressed:Rt}=fv({ref:se,isDisabled:A,onPress:O,onPressStart:U,onPressEnd:X,onPressChange:ne,onPressUp:G}),bt=k.useCallback(()=>{c?.(!0,a.key)},[]),Xt=k.useCallback(()=>{c?.(!1,a.key)},[]),Ue=k.useMemo(()=>({...L}),[Zs(L)]),st=k.useMemo(()=>pO({isCompact:R,isDisabled:A,hideIndicator:W,disableAnimation:M,disableIndicatorAnimation:re,variant:T}),[R,A,W,M,re,T]),An=pn(Ue?.base,h),Fr=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"base",className:st.base({class:An}),...hn(gf(J,{enabled:K}),pe)}),[An,K,J,st,a.props,j,A]),Sn=(pe={})=>{var ke,je;return{ref:se,"data-open":Me(j),"data-focus":Me(Be),"data-focus-visible":Me(Oe),"data-disabled":Me(A),"data-hover":Me(tt),"data-pressed":Me(Rt),"data-slot":"trigger",className:st.trigger({class:Ue?.trigger}),onFocus:i1(bt,me,Te.onFocus,J.onFocus,(ke=a.props)==null?void 0:ke.onFocus),onBlur:i1(Xt,Ee,Te.onBlur,J.onBlur,(je=a.props)==null?void 0:je.onBlur),...hn(we,yt,Ie,pe,{onClick:mf(Ie.onClick,fe)})}},Lt=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"content",className:st.content({class:Ue?.content}),...hn(z,pe)}),[st,Ue,z,j,A,Ue?.content]),zt=k.useCallback((pe={})=>({"aria-hidden":Me(!0),"data-open":Me(j),"data-disabled":Me(A),"data-slot":"indicator",className:st.indicator({class:Ue?.indicator}),...pe}),[st,Ue?.indicator,j,A,Ue?.indicator]),ar=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"heading",className:st.heading({class:Ue?.heading}),...pe}),[st,Ue?.heading,j,A,Ue?.heading]),no=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"title",className:st.title({class:Ue?.title}),...pe}),[st,Ue?.title,j,A,Ue?.title]),Yn=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"subtitle",className:st.subtitle({class:Ue?.subtitle}),...pe}),[st,Ue,j,A,Ue?.subtitle]);return{Component:q,HeadingComponent:ae,item:a,slots:st,classNames:Ue,domRef:se,indicator:m,children:g,title:b,subtitle:x,startContent:S,isOpen:j,isDisabled:A,hideIndicator:W,keepContentMounted:Z,disableAnimation:M,motionProps:P,getBaseProps:Fr,getHeadingProps:ar,getButtonProps:Sn,getContentProps:Lt,getIndicatorProps:zt,getTitleProps:no,getSubtitleProps:Yn}}var vk=e=>F.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:F.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),IO=e=>F.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:F.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),$O=e=>{const{isSelected:t,isIndeterminate:n,disableAnimation:r,...i}=e;return F.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...i,children:F.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},Fp={ease:[.36,.66,.4,1]},Ug={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Fp.ease}},exit:{opacity:0,transition:{duration:.3,ease:Fp.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},yk=()=>na(()=>import("./index-r4BHDEze.js"),[]).then(e=>e.default),E_=Ti((e,t)=>{const{Component:n,HeadingComponent:r,classNames:i,slots:s,indicator:a,children:c,title:d,subtitle:h,startContent:m,isOpen:g,isDisabled:b,hideIndicator:x,keepContentMounted:S,disableAnimation:P,motionProps:_,getBaseProps:T,getHeadingProps:R,getButtonProps:L,getTitleProps:B,getSubtitleProps:W,getContentProps:M,getIndicatorProps:Z}=_O({...e,ref:t}),re=qN(),O=k.useMemo(()=>typeof a=="function"?a({indicator:F.jsx(vk,{}),isOpen:g,isDisabled:b}):a||null,[a,g,b])||F.jsx(vk,{}),U=k.useMemo(()=>{if(P)return S?F.jsx("div",{...M(),children:c}):g&&F.jsx("div",{...M(),children:c});const X={exit:{...Ug.collapse.exit,overflowY:"hidden"},enter:{...Ug.collapse.enter,overflowY:"unset"}};return S?F.jsx(wf,{features:yk,children:F.jsx(Sf.section,{animate:g?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:re},variants:X,onKeyDown:ne=>{ne.stopPropagation()},..._,children:F.jsx("div",{...M(),children:c})},"accordion-content")}):F.jsx(Rf,{initial:!1,children:g&&F.jsx(wf,{features:yk,children:F.jsx(Sf.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:re},variants:X,onKeyDown:ne=>{ne.stopPropagation()},..._,children:F.jsx("div",{...M(),children:c})},"accordion-content")})})},[g,P,S,c,_]);return F.jsxs(n,{...T(),children:[F.jsx(r,{...R(),children:F.jsxs("button",{...L(),children:[m&&F.jsx("div",{className:s.startContent({class:i?.startContent}),children:m}),F.jsxs("div",{className:s.titleWrapper({class:i?.titleWrapper}),children:[d&&F.jsx("span",{...B(),children:d}),h&&F.jsx("span",{...W(),children:h})]}),!x&&O&&F.jsx("span",{...Z(),children:O})]})}),U]})});E_.displayName="HeroUI.AccordionItem";var AO=E_;class RO{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&(c.type==="section"||n.has(c.key)))for(let d of c.childNodes)r(d)};for(let c of t)r(c);let i=null,s=0;for(let[c,d]of this.keyMap)i?(i.nextKey=c,d.prevKey=i.key):(this.firstKey=c,d.prevKey=void 0),d.type==="item"&&(d.index=s++),i=d,i.nextKey=void 0;var a;this.lastKey=(a=i?.key)!==null&&a!==void 0?a:null}}class Co extends Set{constructor(t,n,r){super(t),t instanceof Co?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function LO(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function MO(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,a=k.useRef(!1),[,c]=k.useState(!1),d=k.useRef(null),h=k.useRef(null),[,m]=k.useState(null),g=k.useMemo(()=>bk(e.selectedKeys),[e.selectedKeys]),b=k.useMemo(()=>bk(e.defaultSelectedKeys,new Co),[e.defaultSelectedKeys]),[x,S]=If(g,b,e.onSelectionChange),P=k.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[_,T]=k.useState(i);i==="replace"&&_==="toggle"&&typeof x=="object"&&x.size===0&&T("replace");let R=k.useRef(i);return k.useEffect(()=>{i!==R.current&&(T(i),R.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:_,setSelectionBehavior:T,get isFocused(){return a.current},setFocused(L){a.current=L,c(L)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(L,B="first"){d.current=L,h.current=B,m(L)},selectedKeys:x,setSelectedKeys(L){(r||!LO(L,x))&&S(L)},disabledKeys:P,disabledBehavior:s}}function bk(e,t){return e?e==="all"?"all":new Co(e):t}function P_(e){return null}P_.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:s}=t,a=t.title||t.children,c=t.textValue||(typeof a=="string"?a:"")||t["aria-label"]||"";!c&&n?.suppressTextValueWarning,yield{type:"item",props:t,rendered:a,textValue:c,"aria-label":t["aria-label"],hasChildNodes:DO(t),*childNodes(){if(r)for(let d of r)yield{type:"item",value:d};else if(i){let d=[];We.Children.forEach(s,h=>{d.push({type:"item",element:h})}),yield*d}}}};function DO(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&We.Children.count(e.children)>0)}let NO=P_;class FO{build(t,n){return this.context=n,xk(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(We.isValidElement(n)&&n.type===We.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];We.Children.forEach(n,a=>{a&&i.push(a)});let s=0;for(let a of i){let c=this.getFullNode({element:a,index:s},{});for(let d of c)s++,yield d}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){var a;let c=(a=s.key)!==null&&a!==void 0?a:s.id;if(c==null)throw new Error("No key found for item");return c}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(We.isValidElement(t.element)&&t.element.type===We.Fragment){let _=[];We.Children.forEach(t.element.props.children,R=>{_.push(R)});var s;let T=(s=t.index)!==null&&s!==void 0?s:0;for(const R of _)yield*this.getFullNode({element:R,index:T++},n,r,i);return}let a=t.element;if(!a&&t.value&&n&&n.renderer){let _=this.cache.get(t.value);if(_&&(!_.shouldInvalidate||!_.shouldInvalidate(this.context))){_.index=t.index,_.parentKey=i?i.key:null,yield _;return}a=n.renderer(t.value)}if(We.isValidElement(a)){let _=a.type;if(typeof _!="function"&&typeof _.getCollectionNode!="function"){let B=a.type;throw new Error(`Unknown element <${B}> in collection.`)}let T=_.getCollectionNode(a.props,this.context);var c;let R=(c=t.index)!==null&&c!==void 0?c:0,L=T.next();for(;!L.done&&L.value;){let B=L.value;t.index=R;var d;let W=(d=B.key)!==null&&d!==void 0?d:null;W==null&&(W=B.element?null:this.getKey(a,t,n,r));let Z=[...this.getFullNode({...B,key:W,index:R,wrapper:OO(t.wrapper,B.wrapper)},this.getChildState(n,B),r?`${r}${a.key}`:a.key,i)];for(let re of Z){var h,m;re.value=(m=(h=B.value)!==null&&h!==void 0?h:t.value)!==null&&m!==void 0?m:null,re.value&&this.cache.set(re.value,re);var g;if(t.type&&re.type!==t.type)throw new Error(`Unsupported type <${a0(re.type)}> in <${a0((g=i?.type)!==null&&g!==void 0?g:"unknown parent type")}>. Only <${a0(t.type)}> is supported.`);R++,yield re}L=T.next(Z)}return}if(t.key==null||t.type==null)return;let b=this;var x,S;let P={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(x=t.value)!==null&&x!==void 0?x:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(S=t.textValue)!==null&&S!==void 0?S:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:xk(function*(){if(!t.hasChildNodes||!t.childNodes)return;let _=0;for(let T of t.childNodes()){T.key!=null&&(T.key=`${P.key}${T.key}`);let R=b.getFullNode({...T,index:_},b.getChildState(n,T),P.key,P);for(let L of R)_++,yield L}})};yield P}constructor(){this.cache=new WeakMap}}function xk(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function OO(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function a0(e){return e[0].toUpperCase()+e.slice(1)}function zO(e,t,n){let r=k.useMemo(()=>new FO,[]),{children:i,items:s,collection:a}=e;return k.useMemo(()=>{if(a)return a;let d=r.build({children:i,items:s},n);return t(d)},[r,i,s,a,n,t])}function BO(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function jO(e){return VO(e)}function VO(e,t){for(let n of e)return n}function u0(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...wk(e,t),t],i=[...wk(e,n),n],s=r.slice(0,i.length).findIndex((a,c)=>a!==i[c]);return s!==-1?(t=r[s],n=i[s],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function wk(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class qx{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&u0(this.collection,i,t)<0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&u0(this.collection,i,t)>0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Co([n],n,n);else{let a=this.state.selectedKeys;var i;let c=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new Co(a,c,n);var s;for(let d of this.getKeyRange(c,(s=a.currentKey)!==null&&s!==void 0?s:n))r.delete(d);for(let d of this.getKeyRange(n,c))this.canSelectItem(d)&&r.add(d)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?u0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],s=t;for(;s!=null;){let a=this.collection.getItem(s);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Co(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Co([n],n,n):new Co;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Co;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);a?.type==="item"&&t.push(r);var s;a?.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((s=(i=jO(BO(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Co)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new qx(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function UO(e){let{onExpandedChange:t}=e,[n,r]=If(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=MO(e),s=k.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=zO(e,k.useCallback(d=>new RO(d,{expandedKeys:n}),[n]),null);return k.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:s,toggleKey:d=>{r(KO(n,d))},setExpandedKeys:r,selectionManager:new qx(a,i)}}function KO(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function WO(e){var t;const n=Pi(),{ref:r,as:i,className:s,items:a,variant:c,motionProps:d,expandedKeys:h,disabledKeys:m,selectedKeys:g,children:b,defaultExpandedKeys:x,selectionMode:S="single",selectionBehavior:P="toggle",keepContentMounted:_=!1,disallowEmptySelection:T,defaultSelectedKeys:R,onExpandedChange:L,onSelectionChange:B,dividerProps:W={},isCompact:M=!1,isDisabled:Z=!1,showDivider:re=!0,hideIndicator:ae=!1,disableAnimation:O=(t=n?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:U=!1,itemClasses:X,...ne}=e,[G,fe]=k.useState(null),J=i||"div",q=typeof J=="string",K=Xi(r),se=k.useMemo(()=>dO({variant:c,className:s}),[c,s]),j={children:k.useMemo(()=>{let Te=[];return We.Children.map(b,tt=>{var yt;if(We.isValidElement(tt)&&typeof((yt=tt.props)==null?void 0:yt.children)!="string"){const Ie=We.cloneElement(tt,{hasChildItems:!1});Te.push(Ie)}else Te.push(tt)}),Te},[b]),items:a},oe={expandedKeys:h,defaultExpandedKeys:x,onExpandedChange:L},z={disabledKeys:m,selectedKeys:g,selectionMode:S,selectionBehavior:P,disallowEmptySelection:T,defaultSelectedKeys:R??x,onSelectionChange:B,...j,...oe},me=UO(z);me.selectionManager.setFocusedKey=Te=>{fe(Te)};const{accordionProps:Ee}=TO({...j,...oe},me,K),we=k.useMemo(()=>({state:me,focusedKey:G,motionProps:d,isCompact:M,isDisabled:Z,hideIndicator:ae,disableAnimation:O,keepContentMounted:_,disableIndicatorAnimation:U}),[G,M,Z,ae,g,O,_,me?.expandedKeys.values,U,me.expandedKeys.size,me.disabledKeys.size,d]),Be=k.useCallback((Te={})=>({ref:K,className:se,"data-orientation":"vertical",...hn(Ee,gf(ne,{enabled:q}),Te)}),[]),Oe=k.useCallback((Te,tt)=>{Te&&fe(tt)},[]);return{Component:J,values:we,state:me,focusedKey:G,getBaseProps:Be,isSplitted:c==="splitted",classNames:se,showDivider:re,dividerProps:W,disableAnimation:O,handleFocusChanged:Oe,itemClasses:X}}function HO(e){let t=gf(e,{enabled:typeof e.elementType=="string"}),n;return e.orientation==="vertical"&&(n="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":n}}:{separatorProps:t}}function GO(e){const{as:t,className:n,orientation:r,...i}=e;let s=t||"hr";s==="hr"&&r==="vertical"&&(s="div");const{separatorProps:a}=HO({elementType:typeof s=="string"?s:"hr",orientation:r}),c=k.useMemo(()=>uO({orientation:r,className:n}),[r,n]),d=k.useCallback((h={})=>({className:c,role:"separator","data-orientation":r,...a,...i,...h}),[c,r,a,i]);return{Component:s,getDividerProps:d}}var T_=Ti((e,t)=>{const{Component:n,getDividerProps:r}=GO({...e});return F.jsx(n,{ref:t,...r()})});T_.displayName="HeroUI.Divider";var qO=T_,__=Ti((e,t)=>{const{Component:n,values:r,state:i,isSplitted:s,showDivider:a,getBaseProps:c,disableAnimation:d,handleFocusChanged:h,itemClasses:m,dividerProps:g}=WO({...e,ref:t}),b=k.useCallback((S,P)=>h(S,P),[h]),x=k.useMemo(()=>[...i.collection].map((S,P)=>{const _={...m,...S.props.classNames||{}};return F.jsxs(k.Fragment,{children:[F.jsx(AO,{item:S,variant:e.variant,onFocusChange:b,...r,...S.props,classNames:_}),!S.props.hidden&&!s&&a&&P{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},XO=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],KH=(e,t)=>{if(t.includes("-")){const[n]=t.split("-");if(n.includes(e))return!1}return!0},kk=(e,t)=>{if(t.includes("-")){const[,n]=t.split("-");return`${e}-${n}`}return e},QO=NO,hp=QO,mv=globalThis?.document?k.useLayoutEffect:k.useEffect;function JO(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:i,crossOrigin:s,srcSet:a,sizes:c,loading:d,shouldBypassImageLoad:h=!1}=e,m=eL(),g=k.useRef(m?new Image:null),[b,x]=k.useState("pending");k.useEffect(()=>{g.current&&(g.current.onload=_=>{S(),x("loaded"),t?.(_)},g.current.onerror=_=>{S(),x("failed"),n?.(_)})},[g.current]);const S=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)},P=k.useCallback(()=>{if(!i)return"pending";if(r||h)return"loaded";const _=new Image;return _.src=i,s&&(_.crossOrigin=s),a&&(_.srcset=a),c&&(_.sizes=c),d&&(_.loading=d),g.current=_,_.complete&&_.naturalWidth?"loaded":"loading"},[i,s,a,c,t,n,d,h]);return mv(()=>{m&&x(P())},[m,P]),r?"loaded":b}var[WH,ZO]=nx({name:"ButtonGroupContext",strict:!1});function I_(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:S,type:P="button",allowTextSelectionOnPress:_}=e,T;n==="button"?T={type:P,disabled:r}:T={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?S:void 0};let{pressProps:R,isPressed:L}=fv({onClick:g,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,onPress:i,isDisabled:r,preventFocusOnPress:h,allowTextSelectionOnPress:_,ref:t}),{focusableProps:B}=pv(e,t);m&&(B.tabIndex=r?-1:B.tabIndex);let W=lr(B,R,_f(e,{labelable:!0}));return{isPressed:L,buttonProps:lr(T,W,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var e6=()=>na(()=>import("./index-r4BHDEze.js"),[]).then(e=>e.default),$_=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:i,onClear:s}=e;return F.jsx(F.Fragment,{children:t.map(a=>{const c=qR(.01*a.size,.2,a.size>100?.75:.5);return F.jsx(wf,{features:e6,children:F.jsx(Rf,{mode:"popLayout",children:F.jsx(Sf.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:a.y,left:a.x,width:`${a.size}px`,height:`${a.size}px`,...i},transition:{duration:c},onAnimationComplete:()=>{s(a.key)},...n})})},a.key)})})};$_.displayName="HeroUI.Ripple";var t6=$_;function n6(e={}){const[t,n]=k.useState([]),r=k.useCallback(s=>{const a=s.target,c=Math.max(a.clientWidth,a.clientHeight);n(d=>[...d,{key:GR(d.length.toString()),size:c,x:s.x-c/2,y:s.y-c/2}])},[]),i=k.useCallback(s=>{n(a=>a.filter(c=>c.key!==s))},[]);return{ripples:t,onClear:i,onPress:r,...e}}function r6(e){var t,n,r,i,s,a,c,d,h;const m=ZO(),g=Pi(),b=!!m,{ref:x,as:S,children:P,startContent:_,endContent:T,autoFocus:R,className:L,spinner:B,isLoading:W=!1,disableRipple:M=!1,fullWidth:Z=(t=m?.fullWidth)!=null?t:!1,radius:re=m?.radius,size:ae=(n=m?.size)!=null?n:"md",color:O=(r=m?.color)!=null?r:"default",variant:U=(i=m?.variant)!=null?i:"solid",disableAnimation:X=(a=(s=m?.disableAnimation)!=null?s:g?.disableAnimation)!=null?a:!1,isDisabled:ne=(c=m?.isDisabled)!=null?c:!1,isIconOnly:G=(d=m?.isIconOnly)!=null?d:!1,spinnerPlacement:fe="start",onPress:J,onClick:q,...K}=e,se=S||"button",A=typeof se=="string",j=Xi(x),oe=(h=M||g?.disableRipple)!=null?h:X,{isFocusVisible:z,isFocused:me,focusProps:Ee}=th({autoFocus:R}),we=ne||W,Be=k.useMemo(()=>fO({size:ae,color:O,variant:U,radius:re,fullWidth:Z,isDisabled:we,isInGroup:b,disableAnimation:X,isIconOnly:G,className:L}),[ae,O,U,re,Z,we,b,G,X,L]),{onPress:Oe,onClear:Te,ripples:tt}=n6(),yt=k.useCallback(zt=>{oe||we||X||j.current&&Oe(zt)},[oe,we,X,j,Oe]),{buttonProps:Ie,isPressed:Rt}=I_({elementType:S,isDisabled:we,onPress:mf(J,yt),onClick:q,...K},j),{isHovered:bt,hoverProps:Xt}=kf({isDisabled:we}),Ue=k.useCallback((zt={})=>({"data-disabled":Me(we),"data-focus":Me(me),"data-pressed":Me(Rt),"data-focus-visible":Me(z),"data-hover":Me(bt),"data-loading":Me(W),...hn(Ie,Ee,Xt,gf(K,{enabled:A}),gf(zt)),className:Be}),[W,we,me,Rt,A,z,bt,Ie,Ee,Xt,K,Be]),st=zt=>k.isValidElement(zt)?k.cloneElement(zt,{"aria-hidden":!0,focusable:!1}):null,An=st(_),Fr=st(T),Sn=k.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[ae],[ae]),Lt=k.useCallback(()=>({ripples:tt,onClear:Te}),[tt,Te]);return{Component:se,children:P,domRef:j,spinner:B,styles:Be,startContent:An,endContent:Fr,isLoading:W,spinnerPlacement:fe,spinnerSize:Sn,disableRipple:oe,getButtonProps:Ue,getRippleProps:Lt,isIconOnly:G}}function i6(e){var t,n;const[r,i]=ta(e,sk.variantKeys),s=Pi(),a=(n=(t=e?.variant)!=null?t:s?.spinnerVariant)!=null?n:"default",{children:c,className:d,classNames:h,label:m,...g}=r,b=k.useMemo(()=>sk({...i}),[Zs(i)]),x=pn(h?.base,d),S=m||c,P=k.useMemo(()=>S&&typeof S=="string"?S:g["aria-label"]?"":"Loading",[c,S,g["aria-label"]]),_=k.useCallback(()=>({"aria-label":P,className:b.base({class:x}),...g}),[P,b,x,g]);return{label:S,slots:b,classNames:h,variant:a,getSpinnerProps:_}}var A_=Ti((e,t)=>{const{slots:n,classNames:r,label:i,variant:s,getSpinnerProps:a}=i6({...e});return s==="wave"||s==="dots"?F.jsxs("div",{ref:t,...a(),children:[F.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((c,d)=>F.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":d}},`dot-${d}`))}),i&&F.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="simple"?F.jsxs("div",{ref:t,...a(),children:[F.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[F.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),F.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&F.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="spinner"?F.jsxs("div",{ref:t,...a(),children:[F.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((c,d)=>F.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":d}},`star-${d}`))}),i&&F.jsx("span",{className:n.label({class:r?.label}),children:i})]}):F.jsxs("div",{ref:t,...a(),children:[F.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[F.jsx("i",{className:n.circle1({class:r?.circle1})}),F.jsx("i",{className:n.circle2({class:r?.circle2})})]}),i&&F.jsx("span",{className:n.label({class:r?.label}),children:i})]})});A_.displayName="HeroUI.Spinner";var o6=A_,R_=Ti((e,t)=>{const{Component:n,domRef:r,children:i,spinnerSize:s,spinner:a=F.jsx(o6,{color:"current",size:s}),spinnerPlacement:c,startContent:d,endContent:h,isLoading:m,disableRipple:g,getButtonProps:b,getRippleProps:x,isIconOnly:S}=r6({...e,ref:t});return F.jsxs(n,{ref:r,...b(),children:[d,m&&c==="start"&&a,m&&S?null:i,m&&c==="end"&&a,h,!g&&F.jsx(t6,{...x()})]})});R_.displayName="HeroUI.Button";var To=R_;const L_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},M_={...L_,customError:!0,valid:!1},mp={isInvalid:!1,validationDetails:L_,validationErrors:[]},D_=k.createContext({}),Ck="__formValidationState"+Date.now();function s6(e){if(e[Ck]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=e[Ck];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return l6(e)}function l6(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:s,validate:a,validationBehavior:c="aria"}=e;n&&(t||(t=n==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:M_}:null,h=k.useMemo(()=>{if(!a||i==null)return null;let O=a6(a,i);return Ek(O)},[a,i]);s?.validationDetails.valid&&(s=void 0);let m=k.useContext(D_),g=k.useMemo(()=>r?Array.isArray(r)?r.flatMap(O=>Eb(m[O])):Eb(m[r]):[],[m,r]),[b,x]=k.useState(m),[S,P]=k.useState(!1);m!==b&&(x(m),P(!1));let _=k.useMemo(()=>Ek(S?[]:g),[S,g]),T=k.useRef(mp),[R,L]=k.useState(mp),B=k.useRef(mp),W=()=>{if(!M)return;Z(!1);let O=h||s||T.current;c0(O,B.current)||(B.current=O,L(O))},[M,Z]=k.useState(!1);return k.useEffect(W),{realtimeValidation:d||_||h||s||mp,displayValidation:c==="native"?d||_||R:d||_||h||s||R,updateValidation(O){c==="aria"&&!c0(R,O)?L(O):T.current=O},resetValidation(){let O=mp;c0(O,B.current)||(B.current=O,L(O)),c==="native"&&Z(!1),P(!0)},commitValidation(){c==="native"&&Z(!0),P(!0)}}}function Eb(e){return e?Array.isArray(e)?e:[e]:[]}function a6(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Eb(n)}return[]}function Ek(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:M_}:null}function c0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function u6(e,t,n){let{validationBehavior:r,focus:i}=e;Zt(()=>{if(r==="native"&&n?.current&&!n.current.disabled){let d=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(d),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(f6(n.current))}});let s=Fn(()=>{t.resetValidation()}),a=Fn(d=>{var h;t.displayValidation.isInvalid||t.commitValidation();let m=n==null||(h=n.current)===null||h===void 0?void 0:h.form;if(!d.defaultPrevented&&n&&m&&d6(m)===n.current){var g;i?i():(g=n.current)===null||g===void 0||g.focus(),xF("keyboard")}d.preventDefault()}),c=Fn(()=>{t.commitValidation()});k.useEffect(()=>{let d=n?.current;if(!d)return;let h=d.form;return d.addEventListener("invalid",a),d.addEventListener("change",c),h?.addEventListener("reset",s),()=>{d.removeEventListener("invalid",a),d.removeEventListener("change",c),h?.removeEventListener("reset",s)}},[n,a,c,s,r])}function c6(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function f6(e){return{isInvalid:!e.validity.valid,validationDetails:c6(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function d6(e){for(let t=0;t{if(typeof e=="function"){const s=e,a=s(i);return()=>{typeof a=="function"?a():s(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return k.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function F_(e,t){let n=k.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!t&&!n.slots[Pk])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||Pk;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function m6(e,t,n){let r=F_(n,e.slot)||{},{ref:i,...s}=r,a=h6(k.useMemo(()=>lE(t,i),[t,i])),c=hn(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?c.style=d=>{let h=typeof s.style=="function"?s.style(d):s.style,m={...d.defaultStyle,...h},g=typeof e.style=="function"?e.style({...d,defaultStyle:m}):e.style;return{...m,...g}}:c.style={...s.style,...e.style}),[c,a]}var Pb=k.createContext(null),g6=k.forwardRef(function(t,n){[t,n]=m6(t,n,Pb);let{validationErrors:r,validationBehavior:i="native",children:s,className:a,...c}=t;const d=k.useMemo(()=>cO({className:a}),[a]);return F.jsx("form",{noValidate:i!=="native",...c,ref:n,className:d,children:F.jsx(Pb.Provider,{value:{...t,validationBehavior:i},children:F.jsx(D_.Provider,{value:r??{},children:s})})})}),v6=k.forwardRef(function(t,n){var r,i;const s=Pi(),a=(i=(r=t.validationBehavior)!=null?r:s?.validationBehavior)!=null?i:"native";return F.jsx(g6,{...t,ref:n,validationBehavior:a})});function Tk(e,t=[]){const n=k.useRef(e);return mv(()=>{n.current=e}),k.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function O_(e){let[t,n]=If(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=k.useCallback(()=>{n(!0)},[n]),i=k.useCallback(()=>{n(!1)},[n]),s=k.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:s}}const y6=1500,_k=500;let su={},b6=0,gp=!1,Ws=null,lu=null;function x6(e={}){let{delay:t=y6,closeDelay:n=_k}=e,{isOpen:r,open:i,close:s}=O_(e),a=k.useMemo(()=>`${++b6}`,[]),c=k.useRef(null),d=k.useRef(s),h=()=>{su[a]=b},m=()=>{for(let S in su)S!==a&&(su[S](!0),delete su[S])},g=()=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),gp=!0,i(),Ws&&(clearTimeout(Ws),Ws=null),lu&&(clearTimeout(lu),lu=null)},b=S=>{S||n<=0?(c.current&&clearTimeout(c.current),c.current=null,d.current()):c.current||(c.current=setTimeout(()=>{c.current=null,d.current()},n)),Ws&&(clearTimeout(Ws),Ws=null),gp&&(lu&&clearTimeout(lu),lu=setTimeout(()=>{delete su[a],lu=null,gp=!1},Math.max(_k,n)))},x=()=>{m(),h(),!r&&!Ws&&!gp?Ws=setTimeout(()=>{Ws=null,gp=!0,g()},t):r||g()};return k.useEffect(()=>{d.current=s},[s]),k.useEffect(()=>()=>{c.current&&clearTimeout(c.current),su[a]&&delete su[a]},[a]),{isOpen:r,open:S=>{!S&&t>0&&!c.current?x():g()},close:b}}function w6(e,t){let n=_f(e,{labelable:!0}),{hoverProps:r}=kf({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:lr(n,r,{role:"tooltip"})}}function S6(e,t,n){let{isDisabled:r,trigger:i}=e,s=vf(),a=k.useRef(!1),c=k.useRef(!1),d=()=>{(a.current||c.current)&&t.open(c.current)},h=T=>{!a.current&&!c.current&&t.close(T)};k.useEffect(()=>{let T=R=>{n&&n.current&&R.key==="Escape"&&(R.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",T,!0),()=>{document.removeEventListener("keydown",T,!0)}},[n,t]);let m=()=>{i!=="focus"&&(eh()==="pointer"?a.current=!0:a.current=!1,d())},g=()=>{i!=="focus"&&(c.current=!1,a.current=!1,h())},b=()=>{c.current=!1,a.current=!1,h(!0)},x=()=>{Kx()&&(c.current=!0,d())},S=()=>{c.current=!1,a.current=!1,h(!0)},{hoverProps:P}=kf({isDisabled:r,onHoverStart:m,onHoverEnd:g}),{focusableProps:_}=pv({isDisabled:r,onFocus:x,onBlur:S},n);return{triggerProps:{"aria-describedby":t.isOpen?s:void 0,...lr(_,P,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:s}}}var Hs=[];function z_(e,t){const{disableOutsideEvents:n=!0,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,isOpen:s,onClose:a,shouldCloseOnBlur:c,shouldCloseOnInteractOutside:d}=e;k.useEffect(()=>(s&&Hs.push(t),()=>{const P=Hs.indexOf(t);P>=0&&Hs.splice(P,1)}),[s,t]);const h=()=>{Hs[Hs.length-1]===t&&a&&a()},m=P=>{(!d||d(P.target))&&(Hs[Hs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),P.pointerType!=="touch"&&h())},g=P=>{P.pointerType==="touch"&&(!d||d(P.target))&&(Hs[Hs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),h())},b=P=>{P.key==="Escape"&&!i&&!P.nativeEvent.isComposing&&(P.stopPropagation(),P.preventDefault(),h())};$F({isDisabled:!(r&&s),onInteractOutside:r&&s?g:void 0,onInteractOutsideStart:m,ref:t});const{focusWithinProps:x}=hv({isDisabled:!c,onBlurWithin:P=>{!P.relatedTarget||MF(P.relatedTarget)||(!d||d(P.relatedTarget))&&h()}}),S=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:b,...x},underlayProps:{onPointerDown:S}}}function k6(e){var t,n;const r=Pi(),[i,s]=ta(e,lk.variantKeys),{ref:a,as:c,isOpen:d,content:h,children:m,defaultOpen:g,onOpenChange:b,isDisabled:x,trigger:S,shouldFlip:P=!0,containerPadding:_=12,placement:T="top",delay:R=0,closeDelay:L=500,showArrow:B=!1,offset:W=7,crossOffset:M=0,isDismissable:Z,shouldCloseOnBlur:re=!0,portalContainer:ae,isKeyboardDismissDisabled:O=!1,updatePositionDeps:U=[],shouldCloseOnInteractOutside:X,className:ne,onClose:G,motionProps:fe,classNames:J,...q}=i,K=c||"div",se=(n=(t=e?.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,A=x6({delay:R,closeDelay:L,isDisabled:x,defaultOpen:g,isOpen:d,onOpenChange:Ue=>{b?.(Ue),Ue||G?.()}}),j=k.useRef(null),oe=k.useRef(null),z=k.useId(),me=A.isOpen&&!x;k.useImperativeHandle(a,()=>BR(oe));const{triggerProps:Ee,tooltipProps:we}=S6({isDisabled:x,trigger:S},A,j),{tooltipProps:Be}=w6({isOpen:me,...hn(i,we)},A),{overlayProps:Oe,placement:Te,updatePosition:tt}=iF({isOpen:me,targetRef:j,placement:XO(T),overlayRef:oe,offset:B?W+3:W,crossOffset:M,shouldFlip:P,containerPadding:_});mv(()=>{U.length&&tt()},U);const{overlayProps:yt}=z_({isOpen:me,onClose:A.close,isDismissable:Z,shouldCloseOnBlur:re,isKeyboardDismissDisabled:O,shouldCloseOnInteractOutside:X},oe),Ie=k.useMemo(()=>{var Ue,st,An;return lk({...s,disableAnimation:se,radius:(Ue=e?.radius)!=null?Ue:"md",size:(st=e?.size)!=null?st:"md",shadow:(An=e?.shadow)!=null?An:"sm"})},[Zs(s),se,e?.radius,e?.size,e?.shadow]),Rt=k.useCallback((Ue={},st=null)=>({...hn(Ee,Ue),ref:ZR(st,j),"aria-describedby":me?z:void 0}),[Ee,me,z,A]),bt=k.useCallback(()=>({ref:oe,"data-slot":"base","data-open":Me(me),"data-arrow":Me(B),"data-disabled":Me(x),"data-placement":kk(Te||"top",T),...hn(Be,yt,q),style:hn(Oe.style,q.style,i.style),className:Ie.base({class:J?.base}),id:z}),[Ie,me,B,x,Te,T,Be,yt,q,Oe,i,z]),Xt=k.useCallback(()=>({"data-slot":"content","data-open":Me(me),"data-arrow":Me(B),"data-disabled":Me(x),"data-placement":kk(Te||"top",T),className:Ie.content({class:pn(J?.content,ne)})}),[Ie,me,B,x,Te,T,J]);return{Component:K,content:h,children:m,isOpen:me,triggerRef:j,showArrow:B,portalContainer:ae,placement:T,disableAnimation:se,isDisabled:x,motionProps:fe,getTooltipContentProps:Xt,getTriggerProps:Rt,getTooltipProps:bt}}var C6=()=>na(()=>import("./index-r4BHDEze.js"),[]).then(e=>e.default),B_=Ti((e,t)=>{var n;const{Component:r,children:i,content:s,isOpen:a,portalContainer:c,placement:d,disableAnimation:h,motionProps:m,getTriggerProps:g,getTooltipProps:b,getTooltipContentProps:x}=k6({...e,ref:t});let S;try{if(k.Children.count(i)!==1)throw new Error;if(!k.isValidElement(i))S=F.jsx("p",{...g(),children:i});else{const W=i,M=(n=W.props.ref)!=null?n:W.ref;S=k.cloneElement(W,g(W.props,M))}}catch{S=F.jsx("span",{}),XR("Tooltip must have only one child node. Please, check your code.")}const{ref:P,id:_,style:T,...R}=b(),L=F.jsx("div",{ref:P,id:_,style:T,children:F.jsx(Sf.div,{animate:"enter",exit:"exit",initial:"exit",variants:Ug.scaleSpring,...hn(m,R),style:{...YO(d)},children:F.jsx(r,{...x(),children:s})},`${_}-tooltip-inner`)},`${_}-tooltip-content`);return F.jsxs(F.Fragment,{children:[S,h?a&&F.jsx(QS,{portalContainer:c,children:F.jsx("div",{ref:P,id:_,style:T,...R,children:F.jsx(r,{...x(),children:s})})}):F.jsx(wf,{features:C6,children:F.jsx(Rf,{children:a&&F.jsx(QS,{portalContainer:c,children:L})})})]})});B_.displayName="HeroUI.Tooltip";var E6=B_;function P6(e={}){const{rerender:t=!1,delay:n=0}=e,r=k.useRef(!1),[i,s]=k.useState(!1);return k.useEffect(()=>{r.current=!0;let a=null;return t&&(n>0?a=setTimeout(()=>{s(!0)},n):s(!0)),()=>{r.current=!1,t&&s(!1),a&&clearTimeout(a)}},[t]),[k.useCallback(()=>r.current,[]),i]}function T6(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:s,formatOptions:a={style:"percent"}}=e,c=_f(e,{labelable:!0}),{labelProps:d,fieldProps:h}=N_({...e,labelElementType:"span"});t=Rg(t,n,r);let m=(t-n)/(r-n),g=aM(a);if(!s&&!i){let b=a.style==="percent"?m:t;i=g.format(b)}return{progressBarProps:lr(c,{...h,"aria-valuenow":s?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":s?void 0:i,role:"progressbar"}),labelProps:d}}function _6(e){var t,n,r;const i=Pi(),[s,a]=ta(e,ak.variantKeys),{ref:c,as:d,id:h,className:m,classNames:g,label:b,valueLabel:x,value:S=void 0,minValue:P=0,maxValue:_=100,strokeWidth:T,showValueLabel:R=!1,formatOptions:L={style:"percent"},...B}=s,W=d||"div",M=Xi(c),Z=pn(g?.base,m),[,re]=P6({rerender:!0,delay:100}),ae=((t=e.isIndeterminate)!=null?t:!0)&&S===void 0,O=(r=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?r:!1,{progressBarProps:U,labelProps:X}=T6({id:h,label:b,value:S,minValue:P,maxValue:_,valueLabel:x,formatOptions:L,isIndeterminate:ae,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),ne=k.useMemo(()=>ak({...a,disableAnimation:O,isIndeterminate:ae}),[Zs(a),O,ae]),G=O?!0:re,fe=16,J=T||(e.size==="sm"?2:3),q=16-J,K=2*q*Math.PI,se=k.useMemo(()=>G?ae?.25:S?YR((S-P)/(_-P),1):0:0,[G,S,P,_,ae]),A=K-se*K,j=k.useCallback((we={})=>({ref:M,"data-indeterminate":Me(ae),"data-disabled":Me(e.isDisabled),className:ne.base({class:Z}),...hn(U,B,we)}),[M,ne,ae,e.isDisabled,Z,U,B]),oe=k.useCallback((we={})=>({className:ne.label({class:g?.label}),...hn(X,we)}),[ne,g,X]),z=k.useCallback((we={})=>({viewBox:"0 0 32 32",fill:"none",strokeWidth:J,className:ne.svg({class:g?.svg}),...we}),[J,ne,g]),me=k.useCallback((we={})=>({cx:fe,cy:fe,r:q,role:"presentation",strokeDasharray:`${K} ${K}`,strokeDashoffset:A,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ne.indicator({class:g?.indicator}),...we}),[ne,g,A,K,q]),Ee=k.useCallback((we={})=>({cx:fe,cy:fe,r:q,role:"presentation",strokeDasharray:`${K} ${K}`,strokeDashoffset:0,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ne.track({class:g?.track}),...we}),[ne,g,K,q]);return{Component:W,domRef:M,slots:ne,classNames:g,label:b,showValueLabel:R,getProgressBarProps:j,getLabelProps:oe,getSvgProps:z,getIndicatorProps:me,getTrackProps:Ee}}var j_=Ti((e,t)=>{const{Component:n,slots:r,classNames:i,label:s,showValueLabel:a,getProgressBarProps:c,getLabelProps:d,getSvgProps:h,getIndicatorProps:m,getTrackProps:g}=_6({ref:t,...e}),b=c();return F.jsxs(n,{...b,children:[F.jsxs("div",{className:r.svgWrapper({class:i?.svgWrapper}),children:[F.jsxs("svg",{...h(),children:[F.jsx("circle",{...g()}),F.jsx("circle",{...m()})]}),a&&F.jsx("span",{className:r.value({class:i?.value}),children:b["aria-valuetext"]})]}),s&&F.jsx("span",{...d(),children:s})]})});j_.displayName="HeroUI.CircularProgress";var I6=j_;function $6(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:a="text",validationBehavior:c="aria"}=e,[d,h]=If(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=pv(e,t),g=s6({...e,value:d}),{isInvalid:b,validationErrors:x,validationDetails:S}=g.displayValidation,{labelProps:P,fieldProps:_,descriptionProps:T,errorMessageProps:R}=p6({...e,isInvalid:b,errorMessage:e.errorMessage||x}),L=_f(e,{labelable:!0});const B={type:a,pattern:e.pattern};return ZL(t,d,h),u6(e,g,t),k.useEffect(()=>{if(t.current instanceof Qi(t.current).HTMLTextAreaElement){let W=t.current;Object.defineProperty(W,"defaultValue",{get:()=>W.value,set:()=>{},configurable:!0})}},[t]),{labelProps:P,inputProps:lr(L,n==="input"?B:void 0,{disabled:r,readOnly:s,required:i&&c==="native","aria-required":i&&c==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:d,onChange:W=>h(W.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(We.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,..._}),descriptionProps:T,errorMessageProps:R,isInvalid:b,validationErrors:x,validationDetails:S}}function A6(e){var t,n,r,i,s,a,c;const d=Pi(),{validationBehavior:h}=F_(Pb)||{},[m,g]=ta(e,fk.variantKeys),{ref:b,as:x,type:S,label:P,baseRef:_,wrapperRef:T,description:R,className:L,classNames:B,autoFocus:W,startContent:M,endContent:Z,onClear:re,onChange:ae,validationState:O,validationBehavior:U=(t=h??d?.validationBehavior)!=null?t:"native",innerWrapperRef:X,onValueChange:ne=()=>{},...G}=m,fe=k.useCallback(Ye=>{ne(Ye??"")},[ne]),[J,q]=k.useState(!1),K=x||"div",se=(r=(n=e.disableAnimation)!=null?n:d?.disableAnimation)!=null?r:!1,A=Xi(b),j=Xi(_),oe=Xi(T),z=Xi(X),[me,Ee]=If(m.value,(i=m.defaultValue)!=null?i:"",fe),we=S==="file",Be=((c=(a=(s=A?.current)==null?void 0:s.files)==null?void 0:a.length)!=null?c:0)>0,Oe=["date","time","month","week","range"].includes(S),Te=!UR(me)||Oe||Be,tt=Te||J,yt=S==="hidden",Ie=e.isMultiline,Rt=pn(B?.base,L,Te?"is-filled":""),bt=k.useCallback(()=>{var Ye;we?A.current.value="":Ee(""),re?.(),(Ye=A.current)==null||Ye.focus()},[Ee,re,we]);mv(()=>{A.current&&Ee(A.current.value)},[A.current]);const{labelProps:Xt,inputProps:Ue,isInvalid:st,validationErrors:An,validationDetails:Fr,descriptionProps:Sn,errorMessageProps:Lt}=$6({...e,validationBehavior:U,autoCapitalize:e.autoCapitalize,value:me,"aria-label":e.label?e["aria-label"]:WR(e["aria-label"],e.placeholder),inputElementType:Ie?"textarea":"input",onChange:Ee},A);we&&(delete Ue.value,delete Ue.onChange);const{isFocusVisible:zt,isFocused:ar,focusProps:no}=th({autoFocus:W,isTextInput:!0}),{isHovered:Yn,hoverProps:pe}=kf({isDisabled:!!e?.isDisabled}),{isHovered:ke,hoverProps:je}=kf({isDisabled:!!e?.isDisabled}),{focusProps:rt,isFocusVisible:ct}=th(),{focusWithinProps:Qt}=hv({onFocusWithinChange:q}),{pressProps:ur}=fv({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:bt}),en=O==="invalid"||st,ln=r5({labelPlacement:e.labelPlacement,label:P}),wr=typeof m.errorMessage=="function"?m.errorMessage({isInvalid:en,validationErrors:An,validationDetails:Fr}):m.errorMessage||An?.join(" "),Mt=!!re||e.isClearable,Xn=!!P||!!R||!!wr,tn=!!m.placeholder,rl=!!P,ds=!!R||!!wr,si=ln==="outside-left",li=ln==="outside-top",oa=ln==="outside"||si||li,Tu=ln==="inside",ps=A.current?(!A.current.value||A.current.value===""||!me||me==="")&&tn:!1,Or=!!M,sa=oa?si||li||tn||ln==="outside"&&Or:!1,la=ln==="outside"&&!tn&&!Or,Ht=k.useMemo(()=>fk({...g,isInvalid:en,labelPlacement:ln,isClearable:Mt,disableAnimation:se}),[Zs(g),en,ln,Mt,Or,se]),hs=k.useCallback((Ye={})=>({ref:j,className:Ht.base({class:Rt}),"data-slot":"base","data-filled":Me(Te||tn||Or||ps||we),"data-filled-within":Me(tt||tn||Or||ps||we),"data-focus-within":Me(J),"data-focus-visible":Me(zt),"data-readonly":Me(e.isReadOnly),"data-focus":Me(ar),"data-hover":Me(Yn||ke),"data-required":Me(e.isRequired),"data-invalid":Me(en),"data-disabled":Me(e.isDisabled),"data-has-elements":Me(Xn),"data-has-helper":Me(ds),"data-has-label":Me(rl),"data-has-value":Me(!ps),"data-hidden":Me(yt),...Qt,...Ye}),[Ht,Rt,Te,ar,Yn,ke,en,ds,rl,Xn,ps,Or,J,zt,tt,tn,Qt,yt,e.isReadOnly,e.isRequired,e.isDisabled]),ms=k.useCallback((Ye={})=>({"data-slot":"label",className:Ht.label({class:B?.label}),...hn(Xt,je,Ye)}),[Ht,ke,Xt,B?.label]),Ao=k.useCallback(Ye=>{Ye.key==="Escape"&&me&&(Mt||re)&&!e.isReadOnly&&(Ee(""),re?.())},[me,Ee,re,Mt,e.isReadOnly]),aa=k.useCallback((Ye={})=>({"data-slot":"input","data-filled":Me(Te),"data-filled-within":Me(tt),"data-has-start-content":Me(Or),"data-has-end-content":Me(!!Z),"data-type":S,className:Ht.input({class:pn(B?.input,Te?"is-filled":"",Ie?"pe-0":"",S==="password"?"[&::-ms-reveal]:hidden":"")}),...hn(no,Ue,gf(G,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(Ue))}),Ye),"aria-readonly":Me(e.isReadOnly),onChange:mf(Ue.onChange,ae),onKeyDown:mf(Ue.onKeyDown,Ye.onKeyDown,Ao),ref:A}),[Ht,me,no,Ue,G,Te,tt,Or,Z,B?.input,e.isReadOnly,e.isRequired,ae,Ao]),gs=k.useCallback((Ye={})=>({ref:oe,"data-slot":"input-wrapper","data-hover":Me(Yn||ke),"data-focus-visible":Me(zt),"data-focus":Me(ar),className:Ht.inputWrapper({class:pn(B?.inputWrapper,Te?"is-filled":"")}),...hn(Ye,pe),onClick:ro=>{A.current&&ro.currentTarget===ro.target&&A.current.focus()},style:{cursor:"text",...Ye.style}}),[Ht,Yn,ke,zt,ar,me,B?.inputWrapper]),il=k.useCallback((Ye={})=>({...Ye,ref:z,"data-slot":"inner-wrapper",onClick:ro=>{A.current&&ro.currentTarget===ro.target&&A.current.focus()},className:Ht.innerWrapper({class:pn(B?.innerWrapper,Ye?.className)})}),[Ht,B?.innerWrapper]),ol=k.useCallback((Ye={})=>({...Ye,"data-slot":"main-wrapper",className:Ht.mainWrapper({class:pn(B?.mainWrapper,Ye?.className)})}),[Ht,B?.mainWrapper]),ua=k.useCallback((Ye={})=>({...Ye,"data-slot":"helper-wrapper",className:Ht.helperWrapper({class:pn(B?.helperWrapper,Ye?.className)})}),[Ht,B?.helperWrapper]),zf=k.useCallback((Ye={})=>({...Ye,...Sn,"data-slot":"description",className:Ht.description({class:pn(B?.description,Ye?.className)})}),[Ht,B?.description]),Bf=k.useCallback((Ye={})=>({...Ye,...Lt,"data-slot":"error-message",className:Ht.errorMessage({class:pn(B?.errorMessage,Ye?.className)})}),[Ht,Lt,B?.errorMessage]),jf=k.useCallback((Ye={})=>({...Ye,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":Me(ct),className:Ht.clearButton({class:pn(B?.clearButton,Ye?.className)}),...hn(ur,rt)}),[Ht,ct,ur,rt,B?.clearButton]);return{Component:K,classNames:B,domRef:A,label:P,description:R,startContent:M,endContent:Z,labelPlacement:ln,isClearable:Mt,hasHelper:ds,hasStartContent:Or,isLabelOutside:sa,isOutsideLeft:si,isOutsideTop:li,isLabelOutsideAsPlaceholder:la,shouldLabelBeOutside:oa,shouldLabelBeInside:Tu,hasPlaceholder:tn,isInvalid:en,errorMessage:wr,getBaseProps:hs,getLabelProps:ms,getInputProps:aa,getMainWrapperProps:ol,getInputWrapperProps:gs,getInnerWrapperProps:il,getHelperWrapperProps:ua,getDescriptionProps:zf,getErrorMessageProps:Bf,getClearButtonProps:jf}}function Tb(){return Tb=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{Component:d,label:h,description:m,startContent:g,endContent:b,hasHelper:x,shouldLabelBeOutside:S,shouldLabelBeInside:P,isInvalid:_,errorMessage:T,getBaseProps:R,getLabelProps:L,getInputProps:B,getInnerWrapperProps:W,getInputWrapperProps:M,getHelperWrapperProps:Z,getDescriptionProps:re,getErrorMessageProps:ae,isClearable:O,getClearButtonProps:U}=A6({...a,ref:c,isMultiline:!0}),[X,ne]=k.useState(t>1),[G,fe]=k.useState(!1),J=h?F.jsx("label",{...L(),children:h}):null,q=B(),K=(me,Ee)=>{if(t===1&&ne(me>=Ee.rowHeight*2),n>t){const we=me>=n*Ee.rowHeight;fe(we)}s?.(me,Ee)},se=i?F.jsx("textarea",{...q,style:hn(q.style,e??{})}):F.jsx(q6,{...q,cacheMeasurements:r,"data-hide-scroll":Me(!G),maxRows:n,minRows:t,style:hn(q.style,e??{}),onHeightChange:K}),A=k.useMemo(()=>O?F.jsx("button",{...U(),children:F.jsx(IO,{})}):null,[O,U]),j=k.useMemo(()=>g||b?F.jsxs("div",{...W(),children:[g,se,b]}):F.jsx("div",{...W(),children:se}),[g,q,b,W]),oe=_&&T,z=oe||m;return F.jsxs(d,{...R(),children:[S?J:null,F.jsxs("div",{...M(),"data-has-multiple-rows":Me(X),children:[P?J:null,j,A]}),x&&z?F.jsx("div",{...Z(),children:oe?F.jsx("div",{...ae(),children:T}):F.jsx("div",{...re(),children:m})}):null]})});V_.displayName="HeroUI.Textarea";var Y6=V_;function X6(e,t){let{role:n="dialog"}=e,r=O0();r=e["aria-label"]?void 0:r;let i=k.useRef(!1);return k.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){xu(t.current);let s=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),xu(t.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[t]),l_(),{dialogProps:{..._f(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}function Q6(e){var t,n;const r=Pi(),[i,s]=ta(e,pk.variantKeys),{ref:a,as:c,src:d,className:h,classNames:m,loading:g,isBlurred:b,fallbackSrc:x,isLoading:S,disableSkeleton:P=!!x,removeWrapper:_=!1,onError:T,onLoad:R,srcSet:L,sizes:B,crossOrigin:W,...M}=i,Z=JO({src:d,loading:g,onError:T,onLoad:R,ignoreFallback:!1,srcSet:L,sizes:B,crossOrigin:W,shouldBypassImageLoad:c!==void 0}),re=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,ae=Z==="loaded"&&!S,O=Z==="loading"||S,U=e.isZoomed,X=c||"img",ne=Xi(a),{w:G,h:fe}=k.useMemo(()=>({w:i.width?typeof i.width=="number"?`${i.width}px`:i.width:"fit-content",h:i.height?typeof i.height=="number"?`${i.height}px`:i.height:"auto"}),[i?.width,i?.height]),J=(!d||!ae)&&!!x,q=O&&!P,K=k.useMemo(()=>pk({...s,disableAnimation:re,showSkeleton:q}),[Zs(s),re,q]),se=pn(h,m?.img),A=(z={})=>{const me=pn(se,z?.className);return{src:d,ref:ne,"data-loaded":Me(ae),className:K.img({class:me}),loading:g,srcSet:L,sizes:B,crossOrigin:W,...M,style:{...M?.height&&{height:fe},...z.style,...M.style}}},j=k.useCallback(()=>{const z=J?{backgroundImage:`url(${x})`}:{};return{className:K.wrapper({class:m?.wrapper}),style:{...z,maxWidth:G}}},[K,J,x,m?.wrapper,G]),oe=k.useCallback(()=>({src:d,"aria-hidden":Me(!0),className:K.blurredImg({class:m?.blurredImg})}),[K,d,m?.blurredImg]);return{Component:X,domRef:ne,slots:K,classNames:m,isBlurred:b,disableSkeleton:P,fallbackSrc:x,removeWrapper:_,isZoomed:U,isLoading:O,getImgProps:A,getWrapperProps:j,getBlurredImgProps:oe}}var U_=Ti((e,t)=>{const{Component:n,domRef:r,slots:i,classNames:s,isBlurred:a,isZoomed:c,fallbackSrc:d,removeWrapper:h,disableSkeleton:m,getImgProps:g,getWrapperProps:b,getBlurredImgProps:x}=Q6({...e,ref:t}),S=F.jsx(n,{ref:r,...g()});if(h)return S;const P=F.jsx("div",{className:i.zoomedWrapper({class:s?.zoomedWrapper}),children:S});return a?F.jsxs("div",{...b(),children:[c?P:S,k.cloneElement(S,x())]}):c||!m||d?F.jsxs("div",{...b(),children:[" ",c?P:S]}):S});U_.displayName="HeroUI.Image";var f0=U_,[J6,K_]=nx({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),W_=Ti((e,t)=>{const{as:n,children:r,className:i,...s}=e,{slots:a,classNames:c,bodyId:d,setBodyMounted:h}=K_(),m=Xi(t),g=n||"div";return k.useEffect(()=>(h(!0),()=>h(!1)),[h]),F.jsx(g,{ref:m,className:a.body({class:pn(c?.body,i)}),id:d,...s,children:r})});W_.displayName="HeroUI.ModalBody";var Z6=W_,ez={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Fp.ease},opacity:{duration:.4,ease:Fp.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Fp.ease}}},os=typeof document<"u"&&window.visualViewport,tz=We.createContext(!1);function nz(){return!1}function rz(){return!0}function iz(e){return()=>{}}function oz(){return typeof We.useSyncExternalStore=="function"?We.useSyncExternalStore(iz,nz,rz):k.useContext(tz)}function sz(){let e=oz(),[t,n]=k.useState(()=>e?{width:0,height:0}:Mk());return k.useEffect(()=>{let r=()=>{n(i=>{let s=Mk();return s.width===i.width&&s.height===i.height?i:s})};return os?os.addEventListener("resize",r):window.addEventListener("resize",r),()=>{os?os.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Mk(){return{width:os&&os?.width||window.innerWidth,height:os&&os?.height||window.innerHeight}}var Dk=()=>na(()=>import("./index-r4BHDEze.js"),[]).then(e=>e.default),H_=e=>{const{as:t,children:n,role:r="dialog",...i}=e,{Component:s,domRef:a,slots:c,classNames:d,motionProps:h,backdrop:m,closeButton:g,hideCloseButton:b,disableAnimation:x,getDialogProps:S,getBackdropProps:P,getCloseButtonProps:_,onClose:T}=K_(),R=t||s||"div",L=sz(),{dialogProps:B}=X6({role:r},a),W=k.isValidElement(g)?k.cloneElement(g,_()):F.jsx("button",{..._(),children:F.jsx($O,{})}),M=k.useCallback(X=>{X.key==="Tab"&&X.nativeEvent.isComposing&&(X.stopPropagation(),X.preventDefault())},[]),Z=S(hn(B,i)),re=F.jsxs(R,{...Z,onKeyDown:mf(Z.onKeyDown,M),children:[F.jsx(ZS,{onDismiss:T}),!b&&W,typeof n=="function"?n(T):n,F.jsx(ZS,{onDismiss:T})]}),ae=k.useMemo(()=>m==="transparent"?null:x?F.jsx("div",{...P()}):F.jsx(wf,{features:Dk,children:F.jsx(Sf.div,{animate:"enter",exit:"exit",initial:"exit",variants:Ug.fade,...P()})}),[m,x,P]),O={"--visual-viewport-height":L.height+"px"},U=x?F.jsx("div",{className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",style:O,children:re}):F.jsx(wf,{features:Dk,children:F.jsx(Sf.div,{animate:"enter",className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:ez,...h,style:O,children:re})});return F.jsxs("div",{tabIndex:-1,children:[ae,U]})};H_.displayName="HeroUI.ModalContent";var lz=H_;function az(e={shouldBlockScroll:!0},t,n){let{overlayProps:r,underlayProps:i}=z_({...e,isOpen:t.isOpen,onClose:t.close},n);return UF({isDisabled:!t.isOpen||!e.shouldBlockScroll}),l_(),k.useEffect(()=>{if(t.isOpen&&n.current)return e5([n.current])},[t.isOpen,n]),{modalProps:lr(r),underlayProps:i}}function uz(e){var t,n,r;const i=Pi(),[s,a]=ta(e,dk.variantKeys),{ref:c,as:d,className:h,classNames:m,isOpen:g,defaultOpen:b,onOpenChange:x,motionProps:S,closeButton:P,isDismissable:_=!0,hideCloseButton:T=!1,shouldBlockScroll:R=!0,portalContainer:L,isKeyboardDismissDisabled:B=!1,onClose:W,...M}=s,Z=d||"section",re=Xi(c),ae=k.useRef(null),[O,U]=k.useState(!1),[X,ne]=k.useState(!1),G=(n=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?n:!1,fe=k.useId(),J=k.useId(),q=k.useId(),K=O_({isOpen:g,defaultOpen:b,onOpenChange:Te=>{x?.(Te),Te||W?.()}}),{modalProps:se,underlayProps:A}=az({isDismissable:_,shouldBlockScroll:R,isKeyboardDismissDisabled:B},K,re),{buttonProps:j}=I_({onPress:K.close},ae),{isFocusVisible:oe,focusProps:z}=th(),me=pn(m?.base,h),Ee=k.useMemo(()=>dk({...a,disableAnimation:G}),[Zs(a),G]),we=(Te={},tt=null)=>{var yt;return{ref:lE(tt,re),...hn(se,M,Te),className:Ee.base({class:pn(me,Te.className)}),id:fe,"data-open":Me(K.isOpen),"data-dismissable":Me(_),"aria-modal":Me(!0),"data-placement":(yt=e?.placement)!=null?yt:"right","aria-labelledby":O?J:void 0,"aria-describedby":X?q:void 0}},Be=k.useCallback((Te={})=>({className:Ee.backdrop({class:m?.backdrop}),...A,...Te}),[Ee,m,A]),Oe=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":Me(oe),className:Ee.closeButton({class:m?.closeButton}),...hn(j,z)});return{Component:Z,slots:Ee,domRef:re,headerId:J,bodyId:q,motionProps:S,classNames:m,isDismissable:_,closeButton:P,hideCloseButton:T,portalContainer:L,shouldBlockScroll:R,backdrop:(r=e.backdrop)!=null?r:"opaque",isOpen:K.isOpen,onClose:K.close,disableAnimation:G,setBodyMounted:ne,setHeaderMounted:U,getDialogProps:we,getBackdropProps:Be,getCloseButtonProps:Oe}}var G_=Ti((e,t)=>{const{children:n,...r}=e,i=uz({...r,ref:t}),s=F.jsx(t5,{portalContainer:i.portalContainer,children:n});return F.jsx(J6,{value:i,children:i.disableAnimation&&i.isOpen?s:F.jsx(Rf,{children:i.isOpen?s:null})})});G_.displayName="HeroUI.Modal";var cz=G_;function fz(e={}){const{id:t,defaultOpen:n,isOpen:r,onClose:i,onOpen:s,onChange:a=()=>{}}=e,c=Tk(s),d=Tk(i),[h,m]=If(r,n||!1,a),g=k.useId(),b=t||g,x=r!==void 0,S=k.useCallback(()=>{x||m(!1),d?.()},[x,d]),P=k.useCallback(()=>{x||m(!0),c?.()},[x,c]),_=k.useCallback(()=>{(h?S:P)()},[h,P,S]);return{isOpen:!!h,onOpen:P,onClose:S,onOpenChange:_,isControlled:x,getButtonProps:(T={})=>({...T,"aria-expanded":h,"aria-controls":b,onClick:yf(T.onClick,_)}),getDisclosureProps:(T={})=>({...T,hidden:!h,id:b})}}function dz(e){var t,n;const r=Pi(),[i,s]=ta(e,ck.variantKeys),{as:a,children:c,isLoaded:d=!1,className:h,classNames:m,...g}=i,b=a||"div",x=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,S=k.useMemo(()=>ck({...s,disableAnimation:x}),[Zs(s),x,c]),P=pn(m?.base,h);return{Component:b,children:c,slots:S,classNames:m,getSkeletonProps:(R={})=>({"data-loaded":Me(d),className:S.base({class:pn(P,R?.className)}),...g}),getContentProps:(R={})=>({className:S.content({class:pn(m?.content,R?.className)})})}}var q_=Ti((e,t)=>{const{Component:n,children:r,getSkeletonProps:i,getContentProps:s}=dz({...e});return F.jsx(n,{ref:t,...i(),children:F.jsx("div",{...s(),children:r})})});q_.displayName="HeroUI.Skeleton";var pz=q_;function hz(e={}){const{domRef:t,isEnabled:n=!0,overflowCheck:r="vertical",visibility:i="auto",offset:s=0,onVisibilityChange:a,updateDeps:c=[]}=e,d=k.useRef(i);k.useEffect(()=>{const h=t?.current;if(!h||!n)return;const m=(x,S,P,_,T)=>{if(i==="auto"){const R=`${_}${HR(T)}Scroll`;S&&P?(h.dataset[R]="true",h.removeAttribute(`data-${_}-scroll`),h.removeAttribute(`data-${T}-scroll`)):(h.dataset[`${_}Scroll`]=S.toString(),h.dataset[`${T}Scroll`]=P.toString(),h.removeAttribute(`data-${_}-${T}-scroll`))}else{const R=S&&P?"both":S?_:P?T:"none";R!==d.current&&(a?.(R),d.current=R)}},g=()=>{var x,S;const P=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],_=h.querySelector('ul[data-slot="list"]'),T=+((x=_?.getAttribute("data-virtual-scroll-height"))!=null?x:h.scrollHeight),R=+((S=_?.getAttribute("data-virtual-scroll-top"))!=null?S:h.scrollTop);for(const{type:L,prefix:B,suffix:W}of P)if(r===L||r==="both"){const M=L==="vertical"?R>s:h.scrollLeft>s,Z=L==="vertical"?R+h.clientHeight+s{["top","bottom","top-bottom","left","right","left-right"].forEach(x=>{h.removeAttribute(`data-${x}-scroll`)})};return g(),h.addEventListener("scroll",g,!0),i!=="auto"&&(b(),i==="both"?(h.dataset.topBottomScroll=String(r==="vertical"),h.dataset.leftRightScroll=String(r==="horizontal")):(h.dataset.topBottomScroll="false",h.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(x=>{h.dataset[`${x}Scroll`]=String(i===x)}))),()=>{h.removeEventListener("scroll",g,!0),b()}},[...c,n,i,r,a,t])}function mz(e){var t;const[n,r]=ta(e,uk.variantKeys),{ref:i,as:s,children:a,className:c,style:d,size:h=40,offset:m=0,visibility:g="auto",isEnabled:b=!0,onVisibilityChange:x,...S}=n,P=s||"div",_=Xi(i);hz({domRef:_,offset:m,visibility:g,isEnabled:b,onVisibilityChange:x,updateDeps:[a],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const T=k.useMemo(()=>uk({...r,className:c}),[Zs(r),c]);return{Component:P,styles:T,domRef:_,children:a,getBaseProps:(L={})=>{var B;return{ref:_,className:T,"data-orientation":(B=e.orientation)!=null?B:"vertical",style:{"--scroll-shadow-size":`${h}px`,...d,...L.style},...S,...L}}}}var Y_=Ti((e,t)=>{const{Component:n,children:r,getBaseProps:i}=mz({...e,ref:t});return F.jsx(n,{...i(),children:r})});Y_.displayName="HeroUI.ScrollShadow";var X_=Y_,Eo=(e=>(e.LIGHT="light",e.DARK="dark",e))(Eo||{});const Q_=k.createContext(null);function gz(){return window.matchMedia("(prefers-color-scheme: dark)").matches?Eo.DARK:Eo.LIGHT}function Nk(){const e=window.localStorage.getItem("theme");return e===Eo.DARK||e===Eo.LIGHT?e:gz()}function vz(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}const yz=({children:e})=>{const t=k.useSyncExternalStore(vz,Nk,Nk);k.useEffect(()=>{document.documentElement.classList.toggle("dark",t===Eo.DARK)},[t]);const n=k.useCallback(i=>{window.localStorage.setItem("theme",i),window.dispatchEvent(new Event("storage"))},[]),r=k.useMemo(()=>({theme:t,setTheme:n}),[t,n]);return F.jsx(Q_.Provider,{value:r,children:e})};var Yl;(function(e){e.USER="user",e.ASSISTANT="assistant",e.SYSTEM="system"})(Yl||(Yl={}));var Rr;(function(e){e.MESSAGE="message",e.REFERENCE="reference",e.STATE_UPDATE="state_update",e.TEXT="text",e.MESSAGE_ID="message_id",e.CONVERSATION_ID="conversation_id",e.LIVE_UPDATE="live_update",e.FOLLOWUP_MESSAGES="followup_messages",e.IMAGE="image"})(Rr||(Rr={}));var Fk;(function(e){e.LIKE="like",e.DISLIKE="dislike"})(Fk||(Fk={}));var _b;(function(e){e.START="START",e.FINISH="FINISH"})(_b||(_b={}));class J_{constructor(t={}){if(this.baseUrl=t.baseUrl??"",this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.slice(0,-1)),!!this.baseUrl)try{new URL(this.baseUrl)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}. Please provide a valid URL.`)}}getBaseUrl(){return this.baseUrl}_buildApiUrl(t){return`${this.baseUrl}${t}`}async _makeRequest(t,n={}){const i=await fetch(t,{...{headers:{"Content-Type":"application/json"}},...n});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i}async makeRequest(t,n){const{method:r="GET",body:i,headers:s={},...a}=n||{},c={method:r,headers:s,...a};return i&&r!=="GET"&&(c.body=typeof i=="string"?i:JSON.stringify(i)),(await this._makeRequest(this._buildApiUrl(t.toString()),c)).json()}makeStreamRequest(t,n,r,i){let s=!1;const a=async d=>{const h=d.body?.pipeThrough(new TextDecoderStream).getReader();if(!h)throw new Error("Response body is null");for(;!s&&!i?.aborted;)try{const{value:m,done:g}=await h.read();if(g){r.onClose?.();break}const b=m.split(` -`);for(const x of b)if(x.startsWith("data: "))try{const S=x.replace("data: ","").trim(),P=JSON.parse(S);await r.onMessage(P)}catch(S){console.error("Error parsing JSON:",S),await r.onError(new Error("Error processing server response"))}}catch(m){if(i?.aborted)return;console.error("Stream error:",m),await r.onError(new Error("Error reading stream"));break}},c=async()=>{try{const d=await fetch(this._buildApiUrl(t.toString()),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(n),signal:i});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);await a(d)}catch(d){if(i?.aborted)return;console.error("Request error:",d);const h=d instanceof Error?d.message:"Error connecting to server";await r.onError(new Error(h))}};try{c()}catch(d){const h=d instanceof Error?d.message:"Failed to start stream";r.onError(new Error(h))}return()=>{s=!0}}}const Z_=k.createContext(null);function bz({children:e,...t}){const n=k.useMemo(()=>new J_(t),[t]),r=k.useMemo(()=>({client:n}),[n]);return F.jsx(Z_.Provider,{value:r,children:e})}function xz(){const e=k.useContext(Z_);if(!e)throw new Error("useRagbitsContext must be used within a RagbitsProvider");return e}function wz(e,t){const{client:n}=xz(),[r,i]=k.useState(null),[s,a]=k.useState(null),[c,d]=k.useState(!1),h=k.useRef(null),m=k.useCallback(()=>{if(!h.current)return null;h.current.abort(),h.current=null,d(!1)},[]),g=k.useCallback(async(x={})=>{h.current&&c&&h.current.abort();const S=new AbortController;h.current=S,d(!0),a(null);try{const _={...{...t,...x,headers:{...t?.headers,...x.headers}},signal:S.signal},T=await n.makeRequest(e,_);return S.signal.aborted||(i(T),h.current=null),T}catch(P){if(!S.signal.aborted){const _=P instanceof Error?P:new Error("API call failed");throw a(_),h.current=null,_}throw P}finally{S.signal.aborted||d(!1)}},[n,e,t,c]),b=k.useCallback(()=>{m(),i(null),a(null),d(!1)},[m]);return{data:r,error:s,isLoading:c,call:g,reset:b,abort:m}}const e2=Object.freeze({left:0,top:0,width:16,height:16}),Kg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Xx=Object.freeze({...e2,...Kg}),Ib=Object.freeze({...Xx,body:"",hidden:!1});function Sz(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Ok(e,t){const n=Sz(e,t);for(const r in Ib)r in Kg?r in e&&!(r in n)&&(n[r]=Kg[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function kz(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const c=r[a]&&r[a].parent,d=c&&s(c);d&&(i[a]=[c].concat(d))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function Cz(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function a(c){s=Ok(r[c]||i[c],s)}return a(t),n.forEach(a),Ok(e,s)}function t2(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=kz(e);for(const i in r){const s=r[i];s&&(t(i,Cz(e,i,s)),n.push(i))}return n}const Ez={provider:"",aliases:{},not_found:{},...e2};function d0(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function n2(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!d0(e,Ez))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!d0(s,Ib))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!d0(s,Ib))return null}return t}const r2=/^[a-z0-9]+(-[a-z0-9]+)*$/,gv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),d=i.pop(),h={provider:i.length>0?i[0]:r,prefix:d,name:c};return t&&!Pg(h)?null:h}const s=i[0],a=s.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Pg(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Pg(c,n)?null:c}return null},Pg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,zk=Object.create(null);function Pz(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Cf(e,t){const n=zk[e]||(zk[e]=Object.create(null));return n[t]||(n[t]=Pz(e,t))}function i2(e,t){return n2(t)?t2(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Tz(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let rh=!1;function o2(e){return typeof e=="boolean"&&(rh=e),rh}function Bk(e){const t=typeof e=="string"?gv(e,!0,rh):e;if(t){const n=Cf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function _z(e,t){const n=gv(e,!0,rh);if(!n)return!1;const r=Cf(n.provider,n.prefix);return t?Tz(r,n.name,t):(r.missing.add(n.name),!0)}function Iz(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),rh&&!t&&!e.prefix){let i=!1;return n2(e)&&(e.prefix="",t2(e,(s,a)=>{_z(s,a)&&(i=!0)})),i}const n=e.prefix;if(!Pg({prefix:n,name:"a"}))return!1;const r=Cf(t,n);return!!i2(r,e)}const s2=Object.freeze({width:null,height:null}),l2=Object.freeze({...s2,...Kg}),$z=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Az=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function jk(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split($z);if(r===null||!r.length)return e;const i=[];let s=r.shift(),a=Az.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function Rz(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),s=e.indexOf("",s);if(a===-1)break;n+=e.slice(i+1,s).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function Lz(e,t){return e?""+e+""+t:t}function Mz(e,t,n){const r=Rz(e);return Lz(r.defs,t+r.content+n)}const Dz=e=>e==="unset"||e==="undefined"||e==="none";function Nz(e,t){const n={...Xx,...e},r={...l2,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(P=>{const _=[],T=P.hFlip,R=P.vFlip;let L=P.rotate;T?R?L+=2:(_.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),_.push("scale(-1 1)"),i.top=i.left=0):R&&(_.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),_.push("scale(1 -1)"),i.top=i.left=0);let B;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:B=i.height/2+i.top,_.unshift("rotate(90 "+B.toString()+" "+B.toString()+")");break;case 2:_.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:B=i.width/2+i.left,_.unshift("rotate(-90 "+B.toString()+" "+B.toString()+")");break}L%2===1&&(i.left!==i.top&&(B=i.left,i.left=i.top,i.top=B),i.width!==i.height&&(B=i.width,i.width=i.height,i.height=B)),_.length&&(s=Mz(s,'',""))});const a=r.width,c=r.height,d=i.width,h=i.height;let m,g;a===null?(g=c===null?"1em":c==="auto"?h:c,m=jk(g,d/h)):(m=a==="auto"?d:a,g=c===null?jk(m,h/d):c==="auto"?h:c);const b={},x=(P,_)=>{Dz(_)||(b[P]=_.toString())};x("width",m),x("height",g);const S=[i.left,i.top,d,h];return b.viewBox=S.join(" "),{attributes:b,viewBox:S,body:s}}const Fz=/\sid="(\S+)"/g,Oz="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let zz=0;function Bz(e,t=Oz){const n=[];let r;for(;r=Fz.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(zz++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const $b=Object.create(null);function jz(e,t){$b[e]=t}function Ab(e){return $b[e]||$b[""]}function Qx(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Jx=Object.create(null),vp=["https://api.simplesvg.com","https://api.unisvg.com"],Tg=[];for(;vp.length>0;)vp.length===1||Math.random()>.5?Tg.push(vp.shift()):Tg.push(vp.pop());Jx[""]=Qx({resources:["https://api.iconify.design"].concat(Tg)});function Vz(e,t){const n=Qx(t);return n===null?!1:(Jx[e]=n,!0)}function Zx(e){return Jx[e]}const Uz=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Vk=Uz();function Kz(e,t){const n=Zx(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function Wz(e){return e===404}const Hz=(e,t,n)=>{const r=[],i=Kz(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,h)=>{c+=d.length+1,c>=i&&h>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},c=d.length),a.icons.push(d)}),r.push(a),r};function Gz(e){if(typeof e=="string"){const t=Zx(e);if(t)return t.path}return"/"}const qz=(e,t,n)=>{if(!Vk){n("abort",424);return}let r=Gz(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});r+=s+".json?"+d.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;Vk(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(Wz(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},Yz={prepare:Hz,send:qz};function Xz(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,c=i.name,d=n[s]||(n[s]=Object.create(null)),h=d[a]||(d[a]=Cf(s,a));let m;c in h.icons?m=t.loaded:a===""||h.missing.has(c)?m=t.missing:m=t.pending;const g={provider:s,prefix:a,name:c};m.push(g)}),t}function a2(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function Qz(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const a=s.icons,c=a.pending.length;a.pending=a.pending.filter(d=>{if(d.prefix!==i)return!0;const h=d.name;if(e.icons[h])a.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))a.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||a2([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let Jz=0;function Zz(e,t,n){const r=Jz++,i=a2.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function e8(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?gv(i,t,n):i;s&&r.push(s)}),r}var t8={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function n8(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let M=e.resources.slice(0);for(a=[];M.length>1;){const Z=Math.floor(Math.random()*M.length);a.push(M[Z]),M=M.slice(0,Z).concat(M.slice(Z+1))}a=a.concat(M)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let d="pending",h=0,m,g=null,b=[],x=[];typeof r=="function"&&x.push(r);function S(){g&&(clearTimeout(g),g=null)}function P(){d==="pending"&&(d="aborted"),S(),b.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),b=[]}function _(M,Z){Z&&(x=[]),typeof M=="function"&&x.push(M)}function T(){return{startTime:c,payload:t,status:d,queriesSent:h,queriesPending:b.length,subscribe:_,abort:P}}function R(){d="failed",x.forEach(M=>{M(void 0,m)})}function L(){b.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),b=[]}function B(M,Z,re){const ae=Z!=="success";switch(b=b.filter(O=>O!==M),d){case"pending":break;case"failed":if(ae||!e.dataAfterTimeout)return;break;default:return}if(Z==="abort"){m=re,R();return}if(ae){m=re,b.length||(a.length?W():R());return}if(S(),L(),!e.random){const O=e.resources.indexOf(M.resource);O!==-1&&O!==e.index&&(e.index=O)}d="completed",x.forEach(O=>{O(re)})}function W(){if(d!=="pending")return;S();const M=a.shift();if(M===void 0){if(b.length){g=setTimeout(()=>{S(),d==="pending"&&(L(),R())},e.timeout);return}R();return}const Z={status:"pending",resource:M,callback:(re,ae)=>{B(Z,re,ae)}};b.push(Z),h++,g=setTimeout(W,e.rotate),n(M,t,Z.callback)}return setTimeout(W),T}function u2(e){const t={...t8,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,d,h){const m=n8(t,c,d,(g,b)=>{r(),h&&h(g,b)});return n.push(m),m}function s(c){return n.find(d=>c(d))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function Uk(){}const p0=Object.create(null);function r8(e){if(!p0[e]){const t=Zx(e);if(!t)return;const n=u2(t),r={config:t,redundancy:n};p0[e]=r}return p0[e]}function i8(e,t,n){let r,i;if(typeof e=="string"){const s=Ab(e);if(!s)return n(void 0,424),Uk;i=s.send;const a=r8(e);a&&(r=a.redundancy)}else{const s=Qx(e);if(s){r=u2(s);const a=e.resources?e.resources[0]:"",c=Ab(a);c&&(i=c.send)}}return!r||!i?(n(void 0,424),Uk):r.query(t,i,n)().abort}function Kk(){}function o8(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Qz(e)}))}function s8(e){const t=[],n=[];return e.forEach(r=>{(r.match(r2)?t:n).push(r)}),{valid:t,invalid:n}}function yp(e,t,n){function r(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!i2(e,n).length){r();return}}catch(i){console.error(i)}r(),o8(e)}function Wk(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function l8(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const s=e.loadIcon;if(e.loadIcons&&(i.length>1||!s)){Wk(e.loadIcons(i,r,n),m=>{yp(e,i,m)});return}if(s){i.forEach(m=>{const g=s(m,r,n);Wk(g,b=>{const x=b?{prefix:r,icons:{[m]:b}}:null;yp(e,[m],x)})});return}const{valid:a,invalid:c}=s8(i);if(c.length&&yp(e,c,null),!a.length)return;const d=r.match(r2)?Ab(n):null;if(!d){yp(e,a,null);return}d.prepare(n,r,a).forEach(m=>{i8(n,m,g=>{yp(e,m.icons,g)})})}))}const c2=(e,t)=>{const n=e8(e,!0,o2()),r=Xz(n);if(!r.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(r.loaded,r.missing,r.pending,Kk)}),()=>{d=!1}}const i=Object.create(null),s=[];let a,c;return r.pending.forEach(d=>{const{provider:h,prefix:m}=d;if(m===c&&h===a)return;a=h,c=m,s.push(Cf(h,m));const g=i[h]||(i[h]=Object.create(null));g[m]||(g[m]=[])}),r.pending.forEach(d=>{const{provider:h,prefix:m,name:g}=d,b=Cf(h,m),x=b.pendingIcons||(b.pendingIcons=new Set);x.has(g)||(x.add(g),i[h][m].push(g))}),s.forEach(d=>{const h=i[d.provider][d.prefix];h.length&&l8(d,h)}),t?Zz(t,r,s):Kk};function a8(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in s2?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const u8=/[\s,]+/;function c8(e,t){t.split(u8).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function f8(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function d8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function p8(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function h8(e){return"data:image/svg+xml,"+p8(e)}function m8(e){return'url("'+h8(e)+'")'}let Op;function g8(){try{Op=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Op=null}}function v8(e){return Op===void 0&&g8(),Op?Op.createHTML(e):e}const f2={...l2,inline:!1},y8={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},b8={display:"inline-block"},Rb={backgroundColor:"currentColor"},d2={backgroundColor:"transparent"},Hk={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Gk={WebkitMask:Rb,mask:Rb,background:d2};for(const e in Gk){const t=Gk[e];for(const n in Hk)t[e+n]=Hk[n]}const x8={...f2,inline:!0};function qk(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const w8=(e,t,n)=>{const r=t.inline?x8:f2,i=a8(r,t),s=t.mode||"svg",a={},c=t.style||{},d={...s==="svg"?y8:{}};if(n){const _=gv(n,!1,!0);if(_){const T=["iconify"],R=["provider","prefix"];for(const L of R)_[L]&&T.push("iconify--"+_[L]);d.className=T.join(" ")}}for(let _ in t){const T=t[_];if(T!==void 0)switch(_){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=T;break;case"className":d[_]=(d[_]?d[_]+" ":"")+T;break;case"inline":case"hFlip":case"vFlip":i[_]=T===!0||T==="true"||T===1;break;case"flip":typeof T=="string"&&c8(i,T);break;case"color":a.color=T;break;case"rotate":typeof T=="string"?i[_]=f8(T):typeof T=="number"&&(i[_]=T);break;case"ariaHidden":case"aria-hidden":T!==!0&&T!=="true"&&delete d["aria-hidden"];break;default:r[_]===void 0&&(d[_]=T)}}const h=Nz(e,i),m=h.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),s==="svg"){d.style={...a,...c},Object.assign(d,m);let _=0,T=t.id;return typeof T=="string"&&(T=T.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:v8(Bz(h.body,T?()=>T+"ID"+_++:"iconifyReact"))},k.createElement("svg",d)}const{body:g,width:b,height:x}=e,S=s==="mask"||(s==="bg"?!1:g.indexOf("currentColor")!==-1),P=d8(g,{...m,width:b+"",height:x+""});return d.style={...a,"--svg":m8(P),width:qk(m.width),height:qk(m.height),...b8,...S?Rb:d2,...c},k.createElement("span",d)};o2(!0);jz("",Yz);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!Iz(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;Vz(n,i)||console.error(r)}catch{console.error(r)}}}}function p2(e){const[t,n]=k.useState(!!e.ssr),[r,i]=k.useState({});function s(x){if(x){const S=e.icon;if(typeof S=="object")return{name:"",data:S};const P=Bk(S);if(P)return{name:S,data:P}}return{name:""}}const[a,c]=k.useState(s(!!e.ssr));function d(){const x=r.callback;x&&(x(),i({}))}function h(x){if(JSON.stringify(a)!==JSON.stringify(x))return d(),c(x),!0}function m(){var x;const S=e.icon;if(typeof S=="object"){h({name:"",data:S});return}const P=Bk(S);if(h({name:S,data:P}))if(P===void 0){const _=c2([S],m);i({callback:_})}else P&&((x=e.onLoad)===null||x===void 0||x.call(e,S))}k.useEffect(()=>(n(!0),d),[]),k.useEffect(()=>{t&&m()},[e.icon,t]);const{name:g,data:b}=a;return b?w8({...Xx,...b},e,g):e.children?e.children:e.fallback?e.fallback:k.createElement("span",{})}const Si=k.forwardRef((e,t)=>p2({...e,_ref:t}));k.forwardRef((e,t)=>p2({inline:!0,...e,_ref:t}));var Ip={exports:{}};/** + `.trim(),U.head.prepend(X)},[b]),k.useEffect(()=>{let U=_.current;return()=>{var X;g||FS((X=U.target)!==null&&X!==void 0?X:void 0);for(let ne of U.disposables)ne();U.disposables=[]}},[g]),{isPressed:d||S,pressProps:lr(x,O,{[jS]:!0})}}function Vx(e){return e.tagName==="A"&&e.hasAttribute("href")}function n0(e,t){const{key:n,code:r}=e,i=t,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof Qi(i).HTMLInputElement&&!pT(i,n)||i instanceof Qi(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&Vx(i))&&n!=="Enter")}function nu(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function pF(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Vx(e)}function VS(e,t){return e instanceof HTMLInputElement?!pT(e,t):pF(e)}const hF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function pT(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":hF.has(e.type)}let Cu=null,cb=new Set,Np=new Map,yu=!1,fb=!1;const mF={Tab:!0,Escape:!0};function dv(e,t){for(let n of cb)n(e,t)}function gF(e){return!(e.metaKey||!gu()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function jg(e){yu=!0,gF(e)&&(Cu="keyboard",dv("keyboard",e))}function df(e){Cu="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(yu=!0,dv("pointer",e))}function hT(e){CE(e)&&(yu=!0,Cu="virtual")}function mT(e){e.target===window||e.target===document||Bg||!e.isTrusted||(!yu&&!fb&&(Cu="virtual",dv("virtual",e)),yu=!1,fb=!1)}function gT(){Bg||(yu=!1,fb=!0)}function db(e){if(typeof window>"u"||typeof document>"u"||Np.get(Qi(e)))return;const t=Qi(e),n=At(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){yu=!0,r.apply(this,arguments)},n.addEventListener("keydown",jg,!0),n.addEventListener("keyup",jg,!0),n.addEventListener("click",hT,!0),t.addEventListener("focus",mT,!0),t.addEventListener("blur",gT,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",df,!0),n.addEventListener("pointermove",df,!0),n.addEventListener("pointerup",df,!0)),t.addEventListener("beforeunload",()=>{vT(e)},{once:!0}),Np.set(t,{focus:r})}const vT=(e,t)=>{const n=Qi(e),r=At(e);t&&r.removeEventListener("DOMContentLoaded",t),Np.has(n)&&(n.HTMLElement.prototype.focus=Np.get(n).focus,r.removeEventListener("keydown",jg,!0),r.removeEventListener("keyup",jg,!0),r.removeEventListener("click",hT,!0),n.removeEventListener("focus",mT,!0),n.removeEventListener("blur",gT,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",df,!0),r.removeEventListener("pointermove",df,!0),r.removeEventListener("pointerup",df,!0)),Np.delete(n))};function vF(e){const t=At(e);let n;return t.readyState!=="loading"?db(e):(n=()=>{db(e)},t.addEventListener("DOMContentLoaded",n)),()=>vT(e,n)}typeof document<"u"&&vF();function Ux(){return Cu!=="pointer"}function eh(){return Cu}function yF(e){Cu=e,dv(e,null)}const bF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xF(e,t,n){let r=At(n?.target);const i=typeof window<"u"?Qi(n?.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?Qi(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?Qi(n?.target).HTMLElement:HTMLElement,c=typeof window<"u"?Qi(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!bF.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof c&&!mF[n.key])}function wF(e,t,n){db(),k.useEffect(()=>{let r=(i,s)=>{xF(!!n?.isTextInput,i,s)&&e(Ux())};return cb.add(r),()=>{cb.delete(r)}},t)}function bu(e){const t=At(e),n=Mr(t);if(eh()==="virtual"){let r=n;bE(()=>{Mr(t)===r&&e.isConnected&&Xl(e)})}else Xl(e)}function yT(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const s=k.useCallback(d=>{if(d.target===d.currentTarget)return r&&r(d),i&&i(!1),!0},[r,i]),a=fT(s),c=k.useCallback(d=>{const h=At(d.target),m=h?Mr(h):Mr();d.target===d.currentTarget&&m===wn(d.nativeEvent)&&(n&&n(d),i&&i(!0),a(d))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?c:void 0,onBlur:!t&&(r||i)?s:void 0}}}function US(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function SF(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:US(e.onKeyDown),onKeyUp:US(e.onKeyUp)}}}let kF=We.createContext(null);function CF(e){let t=k.useContext(kF)||{};wE(t,e);let{ref:n,...r}=t;return r}function pv(e,t){let{focusProps:n}=yT(e),{keyboardProps:r}=SF(e),i=lr(n,r),s=CF(t),a=e.isDisabled?{}:s,c=k.useRef(e.autoFocus);k.useEffect(()=>{c.current&&t.current&&bu(t.current),c.current=!1},[t]);let d=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(d=void 0),{focusableProps:lr({...i,tabIndex:d},a)}}function EF({children:e}){let t=k.useMemo(()=>({register:()=>{}}),[]);return We.createElement(jx.Provider,{value:t},e)}function hv(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,s=k.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:c}=ox(),d=k.useCallback(g=>{g.currentTarget.contains(g.target)&&s.current.isFocusWithin&&!g.currentTarget.contains(g.relatedTarget)&&(s.current.isFocusWithin=!1,c(),n&&n(g),i&&i(!1))},[n,i,s,c]),h=fT(d),m=k.useCallback(g=>{if(!g.currentTarget.contains(g.target))return;const b=At(g.target),x=Mr(b);if(!s.current.isFocusWithin&&x===wn(g.nativeEvent)){r&&r(g),i&&i(!0),s.current.isFocusWithin=!0,h(g);let S=g.currentTarget;a(b,"focus",P=>{if(s.current.isFocusWithin&&!ni(S,P.target)){let _=new b.defaultView.FocusEvent("blur",{relatedTarget:P.target});cT(_,S);let T=Bx(_);d(T)}},{capture:!0})}},[r,i,h,a,d]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:m,onBlur:d}}}let pb=!1,r0=0;function PF(){pb=!0,setTimeout(()=>{pb=!1},50)}function KS(e){e.pointerType==="touch"&&PF()}function TF(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",KS),r0++,()=>{r0--,!(r0>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",KS)}}function kf(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[s,a]=k.useState(!1),c=k.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;k.useEffect(TF,[]);let{addGlobalListener:d,removeAllGlobalListeners:h}=ox(),{hoverProps:m,triggerHoverEnd:g}=k.useMemo(()=>{let b=(P,_)=>{if(c.pointerType=_,i||_==="touch"||c.isHovered||!P.currentTarget.contains(P.target))return;c.isHovered=!0;let T=P.currentTarget;c.target=T,d(At(P.target),"pointerover",R=>{c.isHovered&&c.target&&!ni(c.target,R.target)&&x(R,R.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:T,pointerType:_}),n&&n(!0),a(!0)},x=(P,_)=>{let T=c.target;c.pointerType="",c.target=null,!(_==="touch"||!c.isHovered||!T)&&(c.isHovered=!1,h(),r&&r({type:"hoverend",target:T,pointerType:_}),n&&n(!1),a(!1))},S={};return typeof PointerEvent<"u"&&(S.onPointerEnter=P=>{pb&&P.pointerType==="mouse"||b(P,P.pointerType)},S.onPointerLeave=P=>{!i&&P.currentTarget.contains(P.target)&&x(P,P.pointerType)}),{hoverProps:S,triggerHoverEnd:x}},[t,n,r,i,c,d,h]);return k.useEffect(()=>{i&&g({currentTarget:c.target},c.pointerType)},[i]),{hoverProps:m,isHovered:s}}function _F(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,s=k.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Fn(d=>{n&&WS(d,t)&&(i&&i(d),s.current.isPointerDown=!0)}),c=Fn(d=>{n&&n(d)});k.useEffect(()=>{let d=s.current;if(r)return;const h=t.current,m=At(h);if(typeof PointerEvent<"u"){let g=b=>{d.isPointerDown&&WS(b,t)&&c(b),d.isPointerDown=!1};return m.addEventListener("pointerdown",a,!0),m.addEventListener("click",g,!0),()=>{m.removeEventListener("pointerdown",a,!0),m.removeEventListener("click",g,!0)}}},[t,r,a,c])}function WS(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const HS=We.createContext(null),hb="react-aria-focus-scope-restore";let Wt=null;function IF(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,s=k.useRef(null),a=k.useRef(null),c=k.useRef([]),{parentNode:d}=k.useContext(HS)||{},h=k.useMemo(()=>new gb({scopeRef:c}),[c]);Zt(()=>{let b=d||_n.root;if(_n.getTreeNode(b.scopeRef)&&Wt&&!Vg(Wt,b.scopeRef)){let x=_n.getTreeNode(Wt);x&&(b=x)}b.addChild(h),_n.addNode(h)},[h,d]),Zt(()=>{let b=_n.getTreeNode(c);b&&(b.contain=!!n)},[n]),Zt(()=>{var b;let x=(b=s.current)===null||b===void 0?void 0:b.nextSibling,S=[],P=_=>_.stopPropagation();for(;x&&x!==a.current;)S.push(x),x.addEventListener(hb,P),x=x.nextSibling;return c.current=S,()=>{for(let _ of S)_.removeEventListener(hb,P)}},[t]),MF(c,r,n),AF(c,n),DF(c,r,n),LF(c,i),k.useEffect(()=>{const b=Mr(At(c.current?c.current[0]:void 0));let x=null;if(eo(b,c.current)){for(let S of _n.traverse())S.scopeRef&&eo(b,S.scopeRef.current)&&(x=S);x===_n.getTreeNode(c)&&(Wt=x.scopeRef)}},[c]),Zt(()=>()=>{var b,x,S;let P=(S=(x=_n.getTreeNode(c))===null||x===void 0||(b=x.parent)===null||b===void 0?void 0:b.scopeRef)!==null&&S!==void 0?S:null;(c===Wt||Vg(c,Wt))&&(!P||_n.getTreeNode(P))&&(Wt=P),_n.removeTreeNode(c)},[c]);let m=k.useMemo(()=>$F(c),[]),g=k.useMemo(()=>({focusManager:m,parentNode:h}),[h,m]);return We.createElement(HS.Provider,{value:g},We.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:s}),t,We.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function $F(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||Mr(At((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[0].previousElementSibling,m=du(n),g=Ys(m,{tabbable:i,accept:a},n);g.currentNode=eo(d,n)?d:h;let b=g.nextNode();return!b&&s&&(g.currentNode=h,b=g.nextNode()),b&&qs(b,!0),b},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:s,accept:a}=t;var c;let d=r||Mr(At((c=n[0])!==null&&c!==void 0?c:void 0)),h=n[n.length-1].nextElementSibling,m=du(n),g=Ys(m,{tabbable:i,accept:a},n);g.currentNode=eo(d,n)?d:h;let b=g.previousNode();return!b&&s&&(g.currentNode=h,b=g.previousNode()),b&&qs(b,!0),b},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=du(n),a=Ys(s,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let c=a.nextNode();return c&&qs(c,!0),c},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,s=du(n),a=Ys(s,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let c=a.previousNode();return c&&qs(c,!0),c}}}function du(e){return e[0].parentElement}function Tp(e){let t=_n.getTreeNode(Wt);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function AF(e,t){let n=k.useRef(void 0),r=k.useRef(void 0);Zt(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const s=At(i?i[0]:void 0);let a=h=>{if(h.key!=="Tab"||h.altKey||h.ctrlKey||h.metaKey||!Tp(e)||h.isComposing)return;let m=Mr(s),g=e.current;if(!g||!eo(m,g))return;let b=du(g),x=Ys(b,{tabbable:!0},g);if(!m)return;x.currentNode=m;let S=h.shiftKey?x.previousNode():x.nextNode();S||(x.currentNode=h.shiftKey?g[g.length-1].nextElementSibling:g[0].previousElementSibling,S=h.shiftKey?x.previousNode():x.nextNode()),h.preventDefault(),S&&qs(S,!0)},c=h=>{(!Wt||Vg(Wt,e))&&eo(wn(h),e.current)?(Wt=e,n.current=wn(h)):Tp(e)&&!Gl(wn(h),e)?n.current?n.current.focus():Wt&&Wt.current&&mb(Wt.current):Tp(e)&&(n.current=wn(h))},d=h=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let m=eh(),g=(m==="virtual"||m===null)&&ix()&&mE(),b=Mr(s);if(!g&&b&&Tp(e)&&!Gl(b,e)){Wt=e;let S=wn(h);if(S&&S.isConnected){var x;n.current=S,(x=n.current)===null||x===void 0||x.focus()}else Wt.current&&mb(Wt.current)}})};return s.addEventListener("keydown",a,!1),s.addEventListener("focusin",c,!1),i?.forEach(h=>h.addEventListener("focusin",c,!1)),i?.forEach(h=>h.addEventListener("focusout",d,!1)),()=>{s.removeEventListener("keydown",a,!1),s.removeEventListener("focusin",c,!1),i?.forEach(h=>h.removeEventListener("focusin",c,!1)),i?.forEach(h=>h.removeEventListener("focusout",d,!1))}},[e,t]),Zt(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function bT(e){return Gl(e)}function eo(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Gl(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of _n.traverse(_n.getTreeNode(t)))if(n&&eo(e,n.current))return!0;return!1}function RF(e){return Gl(e,Wt)}function Vg(e,t){var n;let r=(n=_n.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function qs(e,t=!1){if(e!=null&&!t)try{bu(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function xT(e,t=!0){let n=e[0].previousElementSibling,r=du(e),i=Ys(r,{tabbable:t},e);i.currentNode=n;let s=i.nextNode();return t&&!s&&(r=du(e),i=Ys(r,{tabbable:!1},e),i.currentNode=n,s=i.nextNode()),s}function mb(e,t=!0){qs(xT(e,t))}function LF(e,t){const n=We.useRef(t);k.useEffect(()=>{if(n.current){Wt=e;const r=At(e.current?e.current[0]:void 0);!eo(Mr(r),Wt.current)&&e.current&&mb(e.current)}n.current=!1},[e])}function MF(e,t,n){Zt(()=>{if(t||n)return;let r=e.current;const i=At(r?r[0]:void 0);let s=a=>{let c=wn(a);eo(c,e.current)?Wt=e:bT(c)||(Wt=null)};return i.addEventListener("focusin",s,!1),r?.forEach(a=>a.addEventListener("focusin",s,!1)),()=>{i.removeEventListener("focusin",s,!1),r?.forEach(a=>a.removeEventListener("focusin",s,!1))}},[e,t,n])}function GS(e){let t=_n.getTreeNode(Wt);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function DF(e,t,n){const r=k.useRef(typeof document<"u"?Mr(At(e.current?e.current[0]:void 0)):null);Zt(()=>{let i=e.current;const s=At(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!Wt||Vg(Wt,e))&&eo(Mr(s),e.current)&&(Wt=e)};return s.addEventListener("focusin",a,!1),i?.forEach(c=>c.addEventListener("focusin",a,!1)),()=>{s.removeEventListener("focusin",a,!1),i?.forEach(c=>c.removeEventListener("focusin",a,!1))}},[e,n]),Zt(()=>{const i=At(e.current?e.current[0]:void 0);if(!t)return;let s=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Tp(e)||a.isComposing)return;let c=i.activeElement;if(!Gl(c,e)||!GS(e))return;let d=_n.getTreeNode(e);if(!d)return;let h=d.nodeToRestore,m=Ys(i.body,{tabbable:!0});m.currentNode=c;let g=a.shiftKey?m.previousNode():m.nextNode();if((!h||!h.isConnected||h===i.body)&&(h=void 0,d.nodeToRestore=void 0),(!g||!Gl(g,e))&&h){m.currentNode=h;do g=a.shiftKey?m.previousNode():m.nextNode();while(Gl(g,e));a.preventDefault(),a.stopPropagation(),g?qs(g,!0):bT(h)?qs(h,!0):c.blur()}};return n||i.addEventListener("keydown",s,!0),()=>{n||i.removeEventListener("keydown",s,!0)}},[e,t,n]),Zt(()=>{const i=At(e.current?e.current[0]:void 0);if(!t)return;let s=_n.getTreeNode(e);if(s){var a;return s.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let c=_n.getTreeNode(e);if(!c)return;let d=c.nodeToRestore,h=Mr(i);if(t&&d&&(h&&Gl(h,e)||h===i.body&&GS(e))){let m=_n.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let g=m.getTreeNode(e);for(;g;){if(g.nodeToRestore&&g.nodeToRestore.isConnected){qS(g.nodeToRestore);return}g=g.parent}for(g=m.getTreeNode(e);g;){if(g.scopeRef&&g.scopeRef.current&&_n.getTreeNode(g.scopeRef)){let b=xT(g.scopeRef.current,!0);qS(b);return}g=g.parent}}})}}}},[e,t])}function qS(e){e.dispatchEvent(new CustomEvent(hb,{bubbles:!0,cancelable:!0}))&&qs(e)}function Ys(e,t,n){let r=t?.tabbable?nM:TE,i=e?.nodeType===Node.ELEMENT_NODE?e:null,s=At(i),a=RL(s,e||s,NodeFilter.SHOW_ELEMENT,{acceptNode(c){var d;return!(t==null||(d=t.from)===null||d===void 0)&&d.contains(c)?NodeFilter.FILTER_REJECT:r(c)&&uT(c)&&(!n||eo(c,n))&&(!t?.accept||t.accept(c))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}class Kx{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let s=new gb({scopeRef:t});i.addChild(s),s.parent=i,this.fastMap.set(t,s),r&&(s.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&eo(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(s=>r&&r.addChild(s))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Kx;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new gb({scopeRef:null}),this.fastMap.set(null,this.root)}}class gb{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let _n=new Kx;function th(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=k.useRef({isFocused:!1,isFocusVisible:t||Ux()}),[s,a]=k.useState(!1),[c,d]=k.useState(()=>i.current.isFocused&&i.current.isFocusVisible),h=k.useCallback(()=>d(i.current.isFocused&&i.current.isFocusVisible),[]),m=k.useCallback(x=>{i.current.isFocused=x,a(x),h()},[h]);wF(x=>{i.current.isFocusVisible=x,h()},[],{isTextInput:n});let{focusProps:g}=yT({isDisabled:r,onFocusChange:m}),{focusWithinProps:b}=hv({isDisabled:!r,onFocusWithinChange:m});return{isFocused:s,isFocusVisible:c,focusProps:r?b:g}}function NF(e){let t=zF(At(e));t!==e&&(t&&FF(t,e),e&&OF(e,t))}function FF(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function OF(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function zF(e){let t=Mr(e),n=t?.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}const i0=typeof document<"u"&&window.visualViewport,BF=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let ag=0,o0;function jF(e={}){let{isDisabled:t}=e;Zt(()=>{if(!t)return ag++,ag===1&&(sv()?o0=UF():o0=VF()),()=>{ag--,ag===0&&o0()}},[t])}function VF(){let e=window.innerWidth-document.documentElement.clientWidth;return yf(e>0&&("scrollbarGutter"in document.documentElement.style?pu(document.documentElement,"scrollbarGutter","stable"):pu(document.documentElement,"paddingRight",`${e}px`)),pu(document.documentElement,"overflow","hidden"))}function UF(){let e,t,n=h=>{e=SE(h.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=pu(e,"overscrollBehavior","contain"))},r=h=>{if(!e||e===document.documentElement||e===document.body){h.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&h.preventDefault()},i=()=>{t&&t()},s=h=>{let m=h.target;KF(m)&&(c(),m.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{m.style.transform="",i0&&(i0.height{YS(m)}):i0.addEventListener("resize",()=>YS(m),{once:!0}))}))},a=null,c=()=>{if(a)return;let h=()=>{window.scrollTo(0,0)},m=window.pageXOffset,g=window.pageYOffset;a=yf(fp(window,"scroll",h),pu(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),pu(document.documentElement,"overflow","hidden"),pu(document.body,"marginTop",`-${g}px`),()=>{window.scrollTo(m,g)}),window.scrollTo(0,0)},d=yf(fp(document,"touchstart",n,{passive:!1,capture:!0}),fp(document,"touchmove",r,{passive:!1,capture:!0}),fp(document,"touchend",i,{passive:!1,capture:!0}),fp(document,"focus",s,!0));return()=>{t?.(),a?.(),d()}}function pu(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function fp(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function YS(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=SE(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,s=n.getBoundingClientRect().top;s>i+n.clientHeight&&(r.scrollTop+=s-i)}n=r.parentElement}}function KF(e){return e instanceof HTMLInputElement&&!BF.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const WF=k.createContext({});function wT(){var e;return(e=k.useContext(WF))!==null&&e!==void 0?e:{}}const vb=We.createContext(null);function HF(e){let{children:t}=e,n=k.useContext(vb),[r,i]=k.useState(0),s=k.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return We.createElement(vb.Provider,{value:s},t)}function GF(){let e=k.useContext(vb);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function qF(e){let{modalProviderProps:t}=GF();return We.createElement("div",{"data-overlay-container":!0,...e,...t})}function ST(e){return We.createElement(HF,null,We.createElement(qF,e))}function XS(e){let t=nv(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=wT();if(!e.portalContainer&&i&&(n=i()),We.useEffect(()=>{if(n?.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let s=We.createElement(ST,r);return PE.createPortal(s,n)}var kT={};kT={dismiss:"تجاهل"};var CT={};CT={dismiss:"Отхвърляне"};var ET={};ET={dismiss:"Odstranit"};var PT={};PT={dismiss:"Luk"};var TT={};TT={dismiss:"Schließen"};var _T={};_T={dismiss:"Απόρριψη"};var IT={};IT={dismiss:"Dismiss"};var $T={};$T={dismiss:"Descartar"};var AT={};AT={dismiss:"Lõpeta"};var RT={};RT={dismiss:"Hylkää"};var LT={};LT={dismiss:"Rejeter"};var MT={};MT={dismiss:"התעלם"};var DT={};DT={dismiss:"Odbaci"};var NT={};NT={dismiss:"Elutasítás"};var FT={};FT={dismiss:"Ignora"};var OT={};OT={dismiss:"閉じる"};var zT={};zT={dismiss:"무시"};var BT={};BT={dismiss:"Atmesti"};var jT={};jT={dismiss:"Nerādīt"};var VT={};VT={dismiss:"Lukk"};var UT={};UT={dismiss:"Negeren"};var KT={};KT={dismiss:"Zignoruj"};var WT={};WT={dismiss:"Descartar"};var HT={};HT={dismiss:"Dispensar"};var GT={};GT={dismiss:"Revocare"};var qT={};qT={dismiss:"Пропустить"};var YT={};YT={dismiss:"Zrušiť"};var XT={};XT={dismiss:"Opusti"};var QT={};QT={dismiss:"Odbaci"};var JT={};JT={dismiss:"Avvisa"};var ZT={};ZT={dismiss:"Kapat"};var e_={};e_={dismiss:"Скасувати"};var t_={};t_={dismiss:"取消"};var n_={};n_={dismiss:"關閉"};var r_={};r_={"ar-AE":kT,"bg-BG":CT,"cs-CZ":ET,"da-DK":PT,"de-DE":TT,"el-GR":_T,"en-US":IT,"es-ES":$T,"et-EE":AT,"fi-FI":RT,"fr-FR":LT,"he-IL":MT,"hr-HR":DT,"hu-HU":NT,"it-IT":FT,"ja-JP":OT,"ko-KR":zT,"lt-LT":BT,"lv-LV":jT,"nb-NO":VT,"nl-NL":UT,"pl-PL":KT,"pt-BR":WT,"pt-PT":HT,"ro-RO":GT,"ru-RU":qT,"sk-SK":YT,"sl-SI":XT,"sr-SP":QT,"sv-SE":JT,"tr-TR":ZT,"uk-UA":e_,"zh-CN":t_,"zh-TW":n_};const QS={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function YF(e={}){let{style:t,isFocusable:n}=e,[r,i]=k.useState(!1),{focusWithinProps:s}=hv({isDisabled:!n,onFocusWithinChange:c=>i(c)}),a=k.useMemo(()=>r?t:t?{...QS,...t}:QS,[r]);return{visuallyHiddenProps:{...s,style:a}}}function XF(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:a}=YF(e);return We.createElement(n,lr(s,a),t)}function QF(e){return e&&e.__esModule?e.default:e}function JS(e){let{onDismiss:t,...n}=e,r=SL(QF(r_),"@react-aria/overlays"),i=xE(n,r.format("dismiss")),s=()=>{t&&t()};return We.createElement(XF,null,We.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}let dp=new WeakMap,Hi=[];function JF(e,t=document.body){let n=new Set(e),r=new Set,i=d=>{for(let b of d.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(b);let h=b=>{if(n.has(b)||b.parentElement&&r.has(b.parentElement)&&b.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let x of n)if(b.contains(x))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},m=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT,{acceptNode:h}),g=h(d);if(g===NodeFilter.FILTER_ACCEPT&&s(d),g!==NodeFilter.FILTER_REJECT){let b=m.nextNode();for(;b!=null;)s(b),b=m.nextNode()}},s=d=>{var h;let m=(h=dp.get(d))!==null&&h!==void 0?h:0;d.getAttribute("aria-hidden")==="true"&&m===0||(m===0&&d.setAttribute("aria-hidden","true"),r.add(d),dp.set(d,m+1))};Hi.length&&Hi[Hi.length-1].disconnect(),i(t);let a=new MutationObserver(d=>{for(let h of d)if(!(h.type!=="childList"||h.addedNodes.length===0)&&![...n,...r].some(m=>m.contains(h.target))){for(let m of h.removedNodes)m instanceof Element&&(n.delete(m),r.delete(m));for(let m of h.addedNodes)(m instanceof HTMLElement||m instanceof SVGElement)&&(m.dataset.liveAnnouncer==="true"||m.dataset.reactAriaTopLayer==="true")?n.add(m):m instanceof Element&&i(m)}});a.observe(t,{childList:!0,subtree:!0});let c={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Hi.push(c),()=>{a.disconnect();for(let d of r){let h=dp.get(d);h!=null&&(h===1?(d.removeAttribute("aria-hidden"),dp.delete(d)):dp.set(d,h-1))}c===Hi[Hi.length-1]?(Hi.pop(),Hi.length&&Hi[Hi.length-1].observe()):Hi.splice(Hi.indexOf(c),1)}}const i_=We.createContext(null);function ZF(e){let t=nv(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,s]=k.useState(!1),a=k.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:c}=wT();if(!e.portalContainer&&c&&(n=c()),!n)return null;let d=e.children;return e.disableFocusManagement||(d=We.createElement(IF,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=We.createElement(i_.Provider,{value:a},We.createElement(EF,null,d)),PE.createPortal(d,n)}function o_(){let e=k.useContext(i_),t=e?.setContain;Zt(()=>{t?.(!0)},[t])}var e5=({children:e,navigate:t,disableAnimation:n,useHref:r,disableRipple:i=!1,skipFramerMotionAnimations:s=n,reducedMotion:a="never",validationBehavior:c,locale:d="en-US",labelPlacement:h,defaultDates:m,createCalendar:g,spinnerVariant:b,...x})=>{let S=e;t&&(S=F.jsx(KL,{navigate:t,useHref:r,children:S}));const P=k.useMemo(()=>(n&&s&&(cs.skipAnimations=!0),{createCalendar:g,defaultDates:m,disableAnimation:n,disableRipple:i,validationBehavior:c,labelPlacement:h,spinnerVariant:b}),[g,m?.maxDate,m?.minDate,n,i,c,h,b]);return F.jsx(nL,{value:P,children:F.jsx(hL,{locale:d,children:F.jsx(g3,{reducedMotion:a,children:F.jsx(ST,{...x,children:S})})})})};function jH(e){const t=Pi(),n=t?.labelPlacement;return k.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function t5(e){const t=Pi(),n=t?.labelPlacement;return k.useMemo(()=>{var r,i;const s=(i=(r=e.labelPlacement)!=null?r:n)!=null?i:"inside";return s==="inside"&&!e.label?"outside":s},[e.labelPlacement,n,e.label])}function Ti(e){return k.forwardRef(e)}var ea=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((i,s)=>s in e?{...i,[s]:e[s]}:i,{});return n?[Object.keys(e).filter(s=>!t.includes(s)).reduce((s,a)=>({...s,[a]:e[a]}),{}),r]:[e,r]},n5={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},r5={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},i5={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},o5={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},s5={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},l5={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},a5={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},Ze={solid:n5,shadow:r5,bordered:i5,flat:o5,faded:s5,light:l5,ghost:a5},u5={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},c5={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},f5={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},d5={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},rs="250ms",p5={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":rs},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":rs},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":rs},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":rs},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":rs},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":rs},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":rs},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":rs},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":rs},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":rs}},h5={...c5,...p5,...f5,...d5,...u5},ug=["small","medium","large"],yb={theme:{spacing:["divider"],radius:ug},classGroups:{shadow:[{shadow:ug}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...ug]}],"border-w":[{border:ug}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(h5).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},ZS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ei=e=>!e||typeof e!="object"||Object.keys(e).length===0,m5=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function s_(e,t){e.forEach(function(n){Array.isArray(n)?s_(n,t):t.push(n)})}function l_(e){let t=[];return s_(e,t),t}var a_=(...e)=>l_(e).filter(Boolean),u_=(e,t)=>{let n={},r=Object.keys(e),i=Object.keys(t);for(let s of r)if(i.includes(s)){let a=e[s],c=t[s];Array.isArray(a)||Array.isArray(c)?n[s]=a_(c,a):typeof a=="object"&&typeof c=="object"?n[s]=u_(a,c):n[s]=c+" "+a}else n[s]=e[s];for(let s of i)r.includes(s)||(n[s]=t[s]);return n},ek=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Wx="-",g5=e=>{const t=y5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const c=a.split(Wx);return c[0]===""&&c.length!==1&&c.shift(),c_(c,t)||v5(a)},getConflictingClassGroupIds:(a,c)=>{const d=n[a]||[];return c&&r[a]?[...d,...r[a]]:d}}},c_=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?c_(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Wx);return t.validators.find(({validator:a})=>a(s))?.classGroupId},tk=/^\[(.+)\]$/,v5=e=>{if(tk.test(e)){const t=tk.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},y5=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)bb(n[i],r,i,t);return r},bb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:nk(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(b5(i)){bb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{bb(a,nk(t,s),n,r)})})},nk=(e,t)=>{let n=e;return t.split(Wx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},b5=e=>e.isThemeGetter,x5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},xb="!",wb=":",w5=wb.length,S5=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,c=0,d=0,h;for(let S=0;Sd?h-d:void 0;return{modifiers:s,hasImportantModifier:b,baseClassName:g,maybePostfixModifierPosition:x}};if(t){const i=t+wb,s=r;r=a=>a.startsWith(i)?s(a.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},k5=e=>e.endsWith(xb)?e.substring(0,e.length-1):e.startsWith(xb)?e.substring(1):e,C5=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(i.push(...s.sort(),a),s=[]):s.push(a)}),i.push(...s.sort()),i}},E5=e=>({cache:x5(e.cacheSize),parseClassName:S5(e),sortModifiers:C5(e),...g5(e)}),P5=/\s+/,T5=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],c=e.trim().split(P5);let d="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:g,modifiers:b,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:P}=n(m);if(g){d=m+(d.length>0?" "+d:d);continue}let _=!!P,T=r(_?S.substring(0,P):S);if(!T){if(!_){d=m+(d.length>0?" "+d:d);continue}if(T=r(S),!T){d=m+(d.length>0?" "+d:d);continue}_=!1}const R=s(b).join(":"),L=x?R+xb:R,B=L+T;if(a.includes(B))continue;a.push(B);const W=i(T,_);for(let M=0;M0?" "+d:d)}return d};function _5(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rg(m),e());return n=E5(h),r=n.cache.get,i=n.cache.set,s=c,c(d)}function c(d){const h=r(d);if(h)return h;const m=T5(d,n);return i(d,m),m}return function(){return s(_5.apply(null,arguments))}}const qn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},d_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,p_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,I5=/^\d+\/\d+$/,$5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,R5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,L5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,M5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qc=e=>I5.test(e),mt=e=>!!e&&!Number.isNaN(Number(e)),ru=e=>!!e&&Number.isInteger(Number(e)),rk=e=>e.endsWith("%")&&mt(e.slice(0,-1)),Ul=e=>$5.test(e),D5=()=>!0,N5=e=>A5.test(e)&&!R5.test(e),Hx=()=>!1,F5=e=>L5.test(e),O5=e=>M5.test(e),z5=e=>!Ne(e)&&!Fe(e),B5=e=>Lf(e,g_,Hx),Ne=e=>d_.test(e),iu=e=>Lf(e,v_,N5),s0=e=>Lf(e,Q5,mt),j5=e=>Lf(e,h_,Hx),V5=e=>Lf(e,m_,O5),U5=e=>Lf(e,Hx,F5),Fe=e=>p_.test(e),cg=e=>Mf(e,v_),K5=e=>Mf(e,J5),W5=e=>Mf(e,h_),H5=e=>Mf(e,g_),G5=e=>Mf(e,m_),q5=e=>Mf(e,Z5,!0),Lf=(e,t,n)=>{const r=d_.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mf=(e,t,n=!1)=>{const r=p_.exec(e);return r?r[1]?t(r[1]):n:!1},h_=e=>e==="position",Y5=new Set(["image","url"]),m_=e=>Y5.has(e),X5=new Set(["length","size","percentage"]),g_=e=>X5.has(e),v_=e=>e==="length",Q5=e=>e==="number",J5=e=>e==="family-name",Z5=e=>e==="shadow",kb=()=>{const e=qn("color"),t=qn("font"),n=qn("text"),r=qn("font-weight"),i=qn("tracking"),s=qn("leading"),a=qn("breakpoint"),c=qn("container"),d=qn("spacing"),h=qn("radius"),m=qn("shadow"),g=qn("inset-shadow"),b=qn("drop-shadow"),x=qn("blur"),S=qn("perspective"),P=qn("aspect"),_=qn("ease"),T=qn("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],M=()=>[Fe,Ne,d],Z=()=>[Qc,"full","auto",...M()],re=()=>[ru,"none","subgrid",Fe,Ne],ae=()=>["auto",{span:["full",ru,Fe,Ne]},Fe,Ne],O=()=>[ru,"auto",Fe,Ne],U=()=>["auto","min","max","fr",Fe,Ne],X=()=>["start","end","center","between","around","evenly","stretch","baseline"],ne=()=>["start","end","center","stretch"],G=()=>["auto",...M()],fe=()=>[Qc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],J=()=>[e,Fe,Ne],q=()=>[rk,iu],K=()=>["","none","full",h,Fe,Ne],se=()=>["",mt,cg,iu],A=()=>["solid","dashed","dotted","double"],j=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>["","none",x,Fe,Ne],z=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Fe,Ne],me=()=>["none",mt,Fe,Ne],Ee=()=>["none",mt,Fe,Ne],we=()=>[mt,Fe,Ne],Be=()=>[Qc,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ul],breakpoint:[Ul],color:[D5],container:[Ul],"drop-shadow":[Ul],ease:["in","out","in-out"],font:[z5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ul],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ul],shadow:[Ul],spacing:["px",mt],text:[Ul],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qc,Ne,Fe,P]}],container:["container"],columns:[{columns:[mt,Ne,Fe,c]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...L(),Ne,Fe]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[ru,"auto",Fe,Ne]}],basis:[{basis:[Qc,"full","auto",c,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[mt,Qc,"auto","initial","none",Ne]}],grow:[{grow:["",mt,Fe,Ne]}],shrink:[{shrink:["",mt,Fe,Ne]}],order:[{order:[ru,"first","last","none",Fe,Ne]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...ne(),"baseline"]}],"align-self":[{self:["auto",...ne(),"baseline"]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:fe()}],w:[{w:[c,"screen",...fe()]}],"min-w":[{"min-w":[c,"screen","none",...fe()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...fe()]}],h:[{h:["screen",...fe()]}],"min-h":[{"min-h":["screen","none",...fe()]}],"max-h":[{"max-h":["screen",...fe()]}],"font-size":[{text:["base",n,cg,iu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Fe,s0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rk,Ne]}],"font-family":[{font:[K5,Ne,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Fe,Ne]}],"line-clamp":[{"line-clamp":[mt,"none",Fe,s0]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",Fe,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Fe,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:J()}],"text-color":[{text:J()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...A(),"wavy"]}],"text-decoration-thickness":[{decoration:[mt,"from-font","auto",Fe,iu]}],"text-decoration-color":[{decoration:J()}],"underline-offset":[{"underline-offset":[mt,"auto",Fe,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Fe,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Fe,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),W5,j5]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",H5,B5]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ru,Fe,Ne],radial:["",Fe,Ne],conic:[ru,Fe,Ne]},G5,V5]}],"bg-color":[{bg:J()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:J()}],"gradient-via":[{via:J()}],"gradient-to":[{to:J()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...A(),"hidden","none"]}],"divide-style":[{divide:[...A(),"hidden","none"]}],"border-color":[{border:J()}],"border-color-x":[{"border-x":J()}],"border-color-y":[{"border-y":J()}],"border-color-s":[{"border-s":J()}],"border-color-e":[{"border-e":J()}],"border-color-t":[{"border-t":J()}],"border-color-r":[{"border-r":J()}],"border-color-b":[{"border-b":J()}],"border-color-l":[{"border-l":J()}],"divide-color":[{divide:J()}],"outline-style":[{outline:[...A(),"none","hidden"]}],"outline-offset":[{"outline-offset":[mt,Fe,Ne]}],"outline-w":[{outline:["",mt,cg,iu]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",m,q5,U5]}],"shadow-color":[{shadow:J()}],"inset-shadow":[{"inset-shadow":["none",Fe,Ne,g]}],"inset-shadow-color":[{"inset-shadow":J()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:J()}],"ring-offset-w":[{"ring-offset":[mt,iu]}],"ring-offset-color":[{"ring-offset":J()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":J()}],opacity:[{opacity:[mt,Fe,Ne]}],"mix-blend":[{"mix-blend":[...j(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":j()}],filter:[{filter:["","none",Fe,Ne]}],blur:[{blur:oe()}],brightness:[{brightness:[mt,Fe,Ne]}],contrast:[{contrast:[mt,Fe,Ne]}],"drop-shadow":[{"drop-shadow":["","none",b,Fe,Ne]}],grayscale:[{grayscale:["",mt,Fe,Ne]}],"hue-rotate":[{"hue-rotate":[mt,Fe,Ne]}],invert:[{invert:["",mt,Fe,Ne]}],saturate:[{saturate:[mt,Fe,Ne]}],sepia:[{sepia:["",mt,Fe,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",Fe,Ne]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[mt,Fe,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[mt,Fe,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",mt,Fe,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[mt,Fe,Ne]}],"backdrop-invert":[{"backdrop-invert":["",mt,Fe,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[mt,Fe,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[mt,Fe,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",mt,Fe,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Fe,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[mt,"initial",Fe,Ne]}],ease:[{ease:["linear","initial",_,Fe,Ne]}],delay:[{delay:[mt,Fe,Ne]}],animate:[{animate:["none",T,Fe,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Fe,Ne]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[Fe,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:J()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:J()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Fe,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Fe,Ne]}],fill:[{fill:["none",...J()]}],"stroke-w":[{stroke:[mt,cg,iu,s0]}],stroke:[{stroke:["none",...J()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},eO=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:s={}})=>(_p(e,"cacheSize",t),_p(e,"prefix",n),_p(e,"experimentalParseClassName",r),fg(e.theme,s.theme),fg(e.classGroups,s.classGroups),fg(e.conflictingClassGroups,s.conflictingClassGroups),fg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),_p(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),dg(e.theme,i.theme),dg(e.classGroups,i.classGroups),dg(e.conflictingClassGroups,i.conflictingClassGroups),dg(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),y_(e,i,"orderSensitiveModifiers"),e),_p=(e,t,n)=>{n!==void 0&&(e[t]=n)},fg=(e,t)=>{if(t)for(const n in t)_p(e,n,t[n])},dg=(e,t)=>{if(t)for(const n in t)y_(e,t,n)},y_=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},b_=(e,...t)=>typeof e=="function"?Sb(kb,e,...t):Sb(()=>eO(kb(),e),...t),tO=Sb(kb);var nO={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},x_=e=>e||void 0,nh=(...e)=>x_(l_(e).filter(Boolean).join(" ")),l0=null,Gs={},Cb=!1,pp=(...e)=>t=>t.twMerge?((!l0||Cb)&&(Cb=!1,l0=ei(Gs)?tO:b_({...Gs,extend:{theme:Gs.theme,classGroups:Gs.classGroups,conflictingClassGroupModifiers:Gs.conflictingClassGroupModifiers,conflictingClassGroups:Gs.conflictingClassGroups,...Gs.extend}})),x_(l0(nh(e)))):nh(e),ik=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=nh(e[n],t[n]):e[n]=t[n];return e},rO=(e,t)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:a=[],defaultVariants:c={}}=e,d={...nO,...t},h=n!=null&&n.base?nh(n.base,e?.base):e?.base,m=n!=null&&n.variants&&!ei(n.variants)?u_(i,n.variants):i,g=n!=null&&n.defaultVariants&&!ei(n.defaultVariants)?{...n.defaultVariants,...c}:c;!ei(d.twMergeConfig)&&!m5(d.twMergeConfig,Gs)&&(Cb=!0,Gs=d.twMergeConfig);let b=ei(n?.slots),x=ei(r)?{}:{base:nh(e?.base,b&&n?.base),...r},S=b?x:ik({...n?.slots},ei(x)?{base:e?.base}:x),P=ei(n?.compoundVariants)?s:a_(n?.compoundVariants,s),_=R=>{if(ei(m)&&ei(r)&&b)return pp(h,R?.class,R?.className)(d);if(P&&!Array.isArray(P))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof P}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let L=(X,ne,G=[],fe)=>{let J=G;if(typeof ne=="string")J=J.concat(ek(ne).split(" ").map(q=>`${X}:${q}`));else if(Array.isArray(ne))J=J.concat(ne.reduce((q,K)=>q.concat(`${X}:${K}`),[]));else if(typeof ne=="object"&&typeof fe=="string"){for(let q in ne)if(ne.hasOwnProperty(q)&&q===fe){let K=ne[q];if(K&&typeof K=="string"){let se=ek(K);J[fe]?J[fe]=J[fe].concat(se.split(" ").map(A=>`${X}:${A}`)):J[fe]=se.split(" ").map(A=>`${X}:${A}`)}else Array.isArray(K)&&K.length>0&&(J[fe]=K.reduce((se,A)=>se.concat(`${X}:${A}`),[]))}}return J},B=(X,ne=m,G=null,fe=null)=>{var J;let q=ne[X];if(!q||ei(q))return null;let K=(J=fe?.[X])!=null?J:R?.[X];if(K===null)return null;let se=ZS(K),A=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,j=g?.[X],oe=[];if(typeof se=="object"&&A)for(let[Ee,we]of Object.entries(se)){let Be=q[we];if(Ee==="initial"){j=we;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Ee)||(oe=L(Ee,Be,oe,G))}let z=se!=null&&typeof se!="object"?se:ZS(j),me=q[z||"false"];return typeof oe=="object"&&typeof G=="string"&&oe[G]?ik(oe,me):oe.length>0?(oe.push(me),G==="base"?oe.join(" "):oe):me},W=()=>m?Object.keys(m).map(X=>B(X,m)):null,M=(X,ne)=>{if(!m||typeof m!="object")return null;let G=new Array;for(let fe in m){let J=B(fe,m,X,ne),q=X==="base"&&typeof J=="string"?J:J&&J[X];q&&(G[G.length]=q)}return G},Z={};for(let X in R)R[X]!==void 0&&(Z[X]=R[X]);let re=(X,ne)=>{var G;let fe=typeof R?.[X]=="object"?{[X]:(G=R[X])==null?void 0:G.initial}:{};return{...g,...Z,...fe,...ne}},ae=(X=[],ne)=>{let G=[];for(let{class:fe,className:J,...q}of X){let K=!0;for(let[se,A]of Object.entries(q)){let j=re(se,ne)[se];if(Array.isArray(A)){if(!A.includes(j)){K=!1;break}}else{let oe=z=>z==null||z===!1;if(oe(A)&&oe(j))continue;if(j!==A){K=!1;break}}}K&&(fe&&G.push(fe),J&&G.push(J))}return G},O=X=>{let ne=ae(P,X);if(!Array.isArray(ne))return ne;let G={};for(let fe of ne)if(typeof fe=="string"&&(G.base=pp(G.base,fe)(d)),typeof fe=="object")for(let[J,q]of Object.entries(fe))G[J]=pp(G[J],q)(d);return G},U=X=>{if(a.length<1)return null;let ne={};for(let{slots:G=[],class:fe,className:J,...q}of a){if(!ei(q)){let K=!0;for(let se of Object.keys(q)){let A=re(se,X)[se];if(A===void 0||(Array.isArray(q[se])?!q[se].includes(A):q[se]!==A)){K=!1;break}}if(!K)continue}for(let K of G)ne[K]=ne[K]||[],ne[K].push([fe,J])}return ne};if(!ei(r)||!b){let X={};if(typeof S=="object"&&!ei(S))for(let ne of Object.keys(S))X[ne]=G=>{var fe,J;return pp(S[ne],M(ne,G),((fe=O(G))!=null?fe:[])[ne],((J=U(G))!=null?J:[])[ne],G?.class,G?.className)(d)};return X}return pp(h,W(),ae(P),R?.class,R?.className)(d)},T=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return _.variantKeys=T(),_.extend=n,_.base=h,_.slots=S,_.variants=m,_.defaultVariants=g,_.compoundSlots=a,_.compoundVariants=P,_},Dr=(e,t)=>{var n,r,i;return rO(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...yb.theme},classGroups:{...(i=t?.twMergeConfig)==null?void 0:i.classGroups,...yb.classGroups}}})},ok=Dr({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),mh=["outline-hidden","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],iO=["outline-hidden","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],Jc={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},sk=Dr({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...mh],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-hidden","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:Ze.solid.foreground},primary:{base:"before:bg-primary",content:Ze.solid.primary},secondary:{base:"before:bg-secondary",content:Ze.solid.secondary},success:{base:"before:bg-success",content:Ze.solid.success},warning:{base:"before:bg-warning",content:Ze.solid.warning},danger:{base:"before:bg-danger",content:Ze.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});Dr({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});var lk=Dr({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]}),oO=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],sO=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],ak=Dr({base:[],variants:{orientation:{vertical:["overflow-y-auto",...oO],horizontal:["overflow-x-auto",...sO]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),uk=Dr({slots:{base:["group","relative","overflow-hidden","bg-content3 dark:bg-content2","pointer-events-none","before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2","data-[loaded=true]:pointer-events-auto","data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent","data-[loaded=true]:before:opacity-0 data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0"],content:["opacity-0","group-data-[loaded=true]:opacity-100"]},variants:{disableAnimation:{true:{base:"before:animate-none before:transition-none after:transition-none",content:"transition-none"},false:{base:"transition-background !duration-300",content:"transition-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{}}),ck=Dr({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-xs px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-hidden placeholder:text-foreground-500 focus-visible:outline-hidden","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","data-[type=color]:rounded-none","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-hidden","select-none","opacity-0","cursor-pointer","active:!opacity-70","rounded-full",...mh],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large hover:!opacity-100"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large hover:!opacity-100"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},"outside-top":{mainWrapper:"flex flex-col",label:"relative text-foreground pb-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity,translate,scale]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,isDisabled:!1,isMultiline:!1},compoundVariants:[{variant:"flat",color:"default",class:{input:"group-data-[has-value=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{inputWrapper:["bg-primary-100","data-[hover=true]:bg-primary-50","text-primary","group-data-[focus=true]:bg-primary-50","placeholder:text-primary"],input:"placeholder:text-primary",label:"text-primary"}},{variant:"flat",color:"secondary",class:{inputWrapper:["bg-secondary-100","text-secondary","data-[hover=true]:bg-secondary-50","group-data-[focus=true]:bg-secondary-50","placeholder:text-secondary"],input:"placeholder:text-secondary",label:"text-secondary"}},{variant:"flat",color:"success",class:{inputWrapper:["bg-success-100","text-success-600","dark:text-success","placeholder:text-success-600","dark:placeholder:text-success","data-[hover=true]:bg-success-50","group-data-[focus=true]:bg-success-50"],input:"placeholder:text-success-600 dark:placeholder:text-success",label:"text-success-600 dark:text-success"}},{variant:"flat",color:"warning",class:{inputWrapper:["bg-warning-100","text-warning-600","dark:text-warning","placeholder:text-warning-600","dark:placeholder:text-warning","data-[hover=true]:bg-warning-50","group-data-[focus=true]:bg-warning-50"],input:"placeholder:text-warning-600 dark:placeholder:text-warning",label:"text-warning-600 dark:text-warning"}},{variant:"flat",color:"danger",class:{inputWrapper:["bg-danger-100","text-danger","dark:text-danger-500","placeholder:text-danger","dark:placeholder:text-danger-500","data-[hover=true]:bg-danger-50","group-data-[focus=true]:bg-danger-50"],input:"placeholder:text-danger dark:placeholder:text-danger-500",label:"text-danger dark:text-danger-500"}},{variant:"faded",color:"primary",class:{label:"text-primary",inputWrapper:"data-[hover=true]:border-primary focus-within:border-primary"}},{variant:"faded",color:"secondary",class:{label:"text-secondary",inputWrapper:"data-[hover=true]:border-secondary focus-within:border-secondary"}},{variant:"faded",color:"success",class:{label:"text-success",inputWrapper:"data-[hover=true]:border-success focus-within:border-success"}},{variant:"faded",color:"warning",class:{label:"text-warning",inputWrapper:"data-[hover=true]:border-warning focus-within:border-warning"}},{variant:"faded",color:"danger",class:{label:"text-danger",inputWrapper:"data-[hover=true]:border-danger focus-within:border-danger"}},{variant:"underlined",color:"default",class:{input:"group-data-[has-value=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{inputWrapper:"after:bg-primary",label:"text-primary"}},{variant:"underlined",color:"secondary",class:{inputWrapper:"after:bg-secondary",label:"text-secondary"}},{variant:"underlined",color:"success",class:{inputWrapper:"after:bg-success",label:"text-success"}},{variant:"underlined",color:"warning",class:{inputWrapper:"after:bg-warning",label:"text-warning"}},{variant:"underlined",color:"danger",class:{inputWrapper:"after:bg-danger",label:"text-danger"}},{variant:"bordered",color:"primary",class:{inputWrapper:"group-data-[focus=true]:border-primary",label:"text-primary"}},{variant:"bordered",color:"secondary",class:{inputWrapper:"group-data-[focus=true]:border-secondary",label:"text-secondary"}},{variant:"bordered",color:"success",class:{inputWrapper:"group-data-[focus=true]:border-success",label:"text-success"}},{variant:"bordered",color:"warning",class:{inputWrapper:"group-data-[focus=true]:border-warning",label:"text-warning"}},{variant:"bordered",color:"danger",class:{inputWrapper:"group-data-[focus=true]:border-danger",label:"text-danger"}},{labelPlacement:"inside",color:"default",class:{label:"group-data-[filled-within=true]:text-default-600"}},{labelPlacement:"outside",color:"default",class:{label:"group-data-[filled-within=true]:text-foreground"}},{radius:"full",size:["sm"],class:{inputWrapper:"px-3"}},{radius:"full",size:"md",class:{inputWrapper:"px-4"}},{radius:"full",size:"lg",class:{inputWrapper:"px-5"}},{disableAnimation:!1,variant:["faded","bordered"],class:{inputWrapper:"transition-colors motion-reduce:transition-none"}},{disableAnimation:!1,variant:"underlined",class:{inputWrapper:"after:transition-width motion-reduce:after:transition-none"}},{variant:["flat","faded"],class:{inputWrapper:[...iO]}},{isInvalid:!0,variant:"flat",class:{inputWrapper:["!bg-danger-50","data-[hover=true]:!bg-danger-100","group-data-[focus=true]:!bg-danger-50"]}},{isInvalid:!0,variant:"bordered",class:{inputWrapper:"!border-danger group-data-[focus=true]:!border-danger"}},{isInvalid:!0,variant:"underlined",class:{inputWrapper:"after:!bg-danger"}},{labelPlacement:"inside",size:"sm",class:{inputWrapper:"h-12 py-1.5 px-3"}},{labelPlacement:"inside",size:"md",class:{inputWrapper:"h-14 py-2"}},{labelPlacement:"inside",size:"lg",class:{inputWrapper:"h-16 py-2.5 gap-0"}},{labelPlacement:"inside",size:"sm",variant:["bordered","faded"],class:{inputWrapper:"py-1"}},{labelPlacement:["inside","outside"],class:{label:["group-data-[filled-within=true]:pointer-events-auto"]}},{labelPlacement:"outside",isMultiline:!1,class:{base:"relative justify-end",label:["pb-0","z-20","top-1/2","-translate-y-1/2","group-data-[filled-within=true]:start-0"]}},{labelPlacement:["inside"],class:{label:["group-data-[filled-within=true]:scale-85"]}},{labelPlacement:["inside"],variant:"flat",class:{innerWrapper:"pb-0.5"}},{variant:"underlined",size:"sm",class:{innerWrapper:"pb-1"}},{variant:"underlined",size:["md","lg"],class:{innerWrapper:"pb-1.5"}},{labelPlacement:"inside",size:["sm","md"],class:{label:"text-small"}},{labelPlacement:"inside",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px)]"]}},{labelPlacement:"inside",isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px)]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_6px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:["faded","bordered"],isMultiline:!1,size:"lg",class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_8px_-_var(--heroui-border-width-medium))]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"sm",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-tiny)/2_-_5px)]"]}},{labelPlacement:"inside",variant:"underlined",isMultiline:!1,size:"md",class:{label:["group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_3.5px)]"]}},{labelPlacement:"inside",variant:"underlined",size:"lg",isMultiline:!1,class:{label:["text-medium","group-data-[filled-within=true]:-translate-y-[calc(50%_+_var(--heroui-font-size-small)/2_-_4px)]"]}},{labelPlacement:"outside",size:"sm",isMultiline:!1,class:{label:["start-2","text-tiny","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-tiny)/2_+_16px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_8px)]"}},{labelPlacement:"outside",size:"md",isMultiline:!1,class:{label:["start-3","end-auto","text-small","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_20px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_10px)]"}},{labelPlacement:"outside",size:"lg",isMultiline:!1,class:{label:["start-3","end-auto","text-medium","group-data-[filled-within=true]:-translate-y-[calc(100%_+_var(--heroui-font-size-small)/2_+_24px)]"],base:"data-[has-label=true]:mt-[calc(var(--heroui-font-size-small)_+_12px)]"}},{labelPlacement:"outside-left",size:"sm",class:{label:"group-data-[has-helper=true]:pt-2"}},{labelPlacement:"outside-left",size:"md",class:{label:"group-data-[has-helper=true]:pt-3"}},{labelPlacement:"outside-left",size:"lg",class:{label:"group-data-[has-helper=true]:pt-4"}},{labelPlacement:["outside","outside-left"],isMultiline:!0,class:{inputWrapper:"py-2"}},{labelPlacement:"outside",isMultiline:!0,class:{label:"pb-1.5"}},{labelPlacement:"inside",isMultiline:!0,class:{label:"pb-0.5",input:"pt-0"}},{isMultiline:!0,disableAnimation:!1,class:{input:"transition-height !duration-100 motion-reduce:transition-none"}},{labelPlacement:["inside","outside"],class:{label:["pe-2","max-w-full","text-ellipsis","overflow-hidden"]}},{isMultiline:!0,radius:"full",class:{inputWrapper:"data-[has-multiple-rows=true]:rounded-large"}},{isClearable:!0,isMultiline:!0,class:{clearButton:["group-data-[has-value=true]:opacity-70 group-data-[has-value=true]:block","group-data-[has-value=true]:scale-100","group-data-[has-value=true]:pointer-events-auto"]}}]}),fk=Dr({slots:{wrapper:["flex","w-screen","h-[100dvh]","fixed","inset-0","z-50","overflow-x-auto","justify-center","h-[--visual-viewport-height]"],base:["flex","flex-col","relative","bg-white","z-50","w-full","box-border","bg-content1","outline-hidden","mx-1","my-1","sm:mx-6","sm:my-16"],backdrop:"z-50",header:"flex py-4 px-6 flex-initial text-large font-semibold",body:"flex flex-1 flex-col gap-3 px-6 py-2",footer:"flex flex-row gap-2 px-6 py-4 justify-end",closeButton:["absolute","appearance-none","outline-hidden","select-none","top-1","end-1","p-2","text-foreground-500","rounded-full","hover:bg-default-100","active:bg-default-200","tap-highlight-transparent",...mh]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"my-0 mx-0 sm:mx-0 sm:my-0 max-w-full h-[100dvh] min-h-[100dvh] !rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},placement:{auto:{wrapper:"items-end sm:items-center"},center:{wrapper:"items-center sm:items-center"},top:{wrapper:"items-start sm:items-start"},"top-center":{wrapper:"items-start sm:items-center"},bottom:{wrapper:"items-end sm:items-end"},"bottom-center":{wrapper:"items-end sm:items-center"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"hidden"},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-md backdrop-saturate-150 bg-overlay/30"}},scrollBehavior:{normal:{base:"overflow-y-hidden"},inside:{base:"max-h-[calc(100%_-_8rem)]",body:"overflow-y-auto"},outside:{wrapper:"items-start sm:items-start overflow-y-auto",base:"my-16"}},disableAnimation:{false:{wrapper:["[--scale-enter:100%]","[--scale-exit:100%]","[--slide-enter:0px]","[--slide-exit:80px]","sm:[--scale-enter:100%]","sm:[--scale-exit:103%]","sm:[--slide-enter:0px]","sm:[--slide-exit:0px]"]}}},defaultVariants:{size:"md",radius:"lg",shadow:"sm",placement:"auto",backdrop:"opaque",scrollBehavior:"normal"},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"w-screen h-screen fixed inset-0"}}]}),lO=Dr({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}}),aO=Dr({base:"flex flex-col gap-2 items-start"}),dk=Dr({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-shimmer","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]}),uO=Dr({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-hidden","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...mh],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:Ze.solid.default},{variant:"solid",color:"primary",class:Ze.solid.primary},{variant:"solid",color:"secondary",class:Ze.solid.secondary},{variant:"solid",color:"success",class:Ze.solid.success},{variant:"solid",color:"warning",class:Ze.solid.warning},{variant:"solid",color:"danger",class:Ze.solid.danger},{variant:"shadow",color:"default",class:Ze.shadow.default},{variant:"shadow",color:"primary",class:Ze.shadow.primary},{variant:"shadow",color:"secondary",class:Ze.shadow.secondary},{variant:"shadow",color:"success",class:Ze.shadow.success},{variant:"shadow",color:"warning",class:Ze.shadow.warning},{variant:"shadow",color:"danger",class:Ze.shadow.danger},{variant:"bordered",color:"default",class:Ze.bordered.default},{variant:"bordered",color:"primary",class:Ze.bordered.primary},{variant:"bordered",color:"secondary",class:Ze.bordered.secondary},{variant:"bordered",color:"success",class:Ze.bordered.success},{variant:"bordered",color:"warning",class:Ze.bordered.warning},{variant:"bordered",color:"danger",class:Ze.bordered.danger},{variant:"flat",color:"default",class:Ze.flat.default},{variant:"flat",color:"primary",class:Ze.flat.primary},{variant:"flat",color:"secondary",class:Ze.flat.secondary},{variant:"flat",color:"success",class:Ze.flat.success},{variant:"flat",color:"warning",class:Ze.flat.warning},{variant:"flat",color:"danger",class:Ze.flat.danger},{variant:"faded",color:"default",class:Ze.faded.default},{variant:"faded",color:"primary",class:Ze.faded.primary},{variant:"faded",color:"secondary",class:Ze.faded.secondary},{variant:"faded",color:"success",class:Ze.faded.success},{variant:"faded",color:"warning",class:Ze.faded.warning},{variant:"faded",color:"danger",class:Ze.faded.danger},{variant:"light",color:"default",class:[Ze.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[Ze.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[Ze.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[Ze.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[Ze.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[Ze.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[Ze.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[Ze.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[Ze.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[Ze.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[Ze.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[Ze.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:Jc.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:Jc.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:Jc.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:Jc.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:Jc.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:Jc.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});Dr({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var cO=Dr({base:"px-2",variants:{variant:{light:"",shadow:"px-4 shadow-medium rounded-medium bg-content1",bordered:"px-4 border-medium border-divider rounded-medium",splitted:"flex flex-col gap-2"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"light",fullWidth:!0}}),fO=Dr({slots:{base:"",heading:"",trigger:["flex py-4 w-full h-full gap-3 outline-hidden items-center tap-highlight-transparent",...mh],startContent:"shrink-0",indicator:"text-default-400",titleWrapper:"flex-1 flex flex-col text-start",title:"text-foreground text-medium",subtitle:"text-small text-foreground-500 font-normal",content:"py-2"},variants:{variant:{splitted:{base:"px-4 bg-content1 shadow-medium rounded-medium"}},isCompact:{true:{trigger:"py-2",title:"text-medium",subtitle:"text-small",indicator:"text-medium",content:"py-1"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},hideIndicator:{true:{indicator:"hidden"}},disableAnimation:{true:{content:"hidden data-[open=true]:block"},false:{indicator:"transition-transform",trigger:"transition-opacity"}},disableIndicatorAnimation:{true:{indicator:"transition-none"},false:{indicator:"rotate-0 data-[open=true]:-rotate-90 rtl:-rotate-180 rtl:data-[open=true]:-rotate-90"}}},defaultVariants:{size:"md",radius:"lg",isDisabled:!1,hideIndicator:!1,disableIndicatorAnimation:!1}});function w_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t0){let d=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=a?.nonce||a?.getAttribute("nonce");i=d(n.map(h=>{if(h=mO(h),h in pk)return;pk[h]=!0;const m=h.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":hO,m||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),m)return new Promise((x,S)=>{b.addEventListener("load",x),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};function gO(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:S,type:P="button"}=e,_;n==="button"?_={type:P,disabled:r}:_={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?S:void 0};let{pressProps:T,isPressed:R}=fv({onPressStart:s,onPressEnd:a,onPressChange:d,onPress:i,onPressUp:c,onClick:g,isDisabled:r,preventFocusOnPress:h,ref:t}),{focusableProps:L}=pv(e,t);m&&(L.tabIndex=r?-1:L.tabIndex);let B=lr(L,T,_f(e,{labelable:!0}));return{isPressed:R,buttonProps:lr(_,B,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function vO(e,t,n){let{item:r,isDisabled:i}=e,s=r.key,a=t.selectionManager,c=k.useId(),d=k.useId(),h=t.disabledKeys.has(r.key)||i;k.useEffect(()=>{s===t.focusedKey&&document.activeElement!==n.current&&n.current&&bu(n.current)},[n,s,t.focusedKey]);let m=k.useCallback(P=>{a.canSelectItem(s)&&(a.select(s,P),t.toggleKey(s))},[s,a]);const g=k.useCallback(P=>{a.selectionBehavior==="replace"&&a.extendSelection(P),a.setFocusedKey(P)},[a]),b=k.useCallback(P=>{const T={ArrowDown:()=>{const R=t.collection.getKeyAfter(s);if(R&&t.disabledKeys.has(R)){const L=t.collection.getKeyAfter(R);L&&g(L)}else R&&g(R)},ArrowUp:()=>{const R=t.collection.getKeyBefore(s);if(R&&t.disabledKeys.has(R)){const L=t.collection.getKeyBefore(R);L&&g(L)}else R&&g(R)},Home:()=>{const R=t.collection.getFirstKey();R&&g(R)},End:()=>{const R=t.collection.getLastKey();R&&g(R)}}[P.key];T&&(P.preventDefault(),a.canSelectItem(s)&&T(P))},[s,a]);let{buttonProps:x}=gO({id:c,elementType:"button",isDisabled:h,onKeyDown:b,onPress:m},n),S=t.selectionManager.isSelected(r.key);return{buttonProps:{...x,"aria-expanded":S,"aria-controls":S?d:void 0},regionProps:{id:d,role:"region","aria-labelledby":c}}}function hk(e){return VL()?e.altKey:e.ctrlKey}function Eg(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,s=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return s&&(i=`[data-collection="${CSS.escape(s)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const S_=new WeakMap;function yO(e){let t=vf();return S_.set(e,t),t}function VH(e){return S_.get(e)}const bO=1e3;function xO(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=k.useRef({search:"",timeout:void 0}).current,s=a=>{let c=wO(a.key);if(!(!c||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(c===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=c,t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.search,n.focusedKey);d==null&&(d=t.getKeyForSearch(i.search)),d!=null&&(n.setFocusedKey(d),r&&r(d))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},bO)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0}}}function wO(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function SO(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:a=!1,disallowSelectAll:c=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:m=!1,shouldUseVirtualFocus:g,allowsTabNavigation:b=!1,isVirtualized:x,scrollRef:S=r,linkBehavior:P="action"}=e,{direction:_}=uh(),T=vE(),R=q=>{var K;if(q.altKey&&q.key==="Tab"&&q.preventDefault(),!(!((K=r.current)===null||K===void 0)&&K.contains(q.target)))return;const se=(Ie,Rt)=>{if(Ie!=null){if(t.isLink(Ie)&&P==="selection"&&h&&!hk(q)){EE.flushSync(()=>{t.setFocusedKey(Ie,Rt)});let bt=Eg(r,Ie),Xt=t.getItemProps(Ie);bt&&T.open(bt,q,Xt.href,Xt.routerOptions);return}if(t.setFocusedKey(Ie,Rt),t.isLink(Ie)&&P==="override")return;q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&!hk(q)&&t.replaceSelection(Ie)}};switch(q.key){case"ArrowDown":if(n.getKeyBelow){var A,j,oe;let Ie=t.focusedKey!=null?(A=n.getKeyBelow)===null||A===void 0?void 0:A.call(n,t.focusedKey):(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n);Ie==null&&s&&(Ie=(oe=n.getFirstKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey)),Ie!=null&&(q.preventDefault(),se(Ie))}break;case"ArrowUp":if(n.getKeyAbove){var z,me,Ee;let Ie=t.focusedKey!=null?(z=n.getKeyAbove)===null||z===void 0?void 0:z.call(n,t.focusedKey):(me=n.getLastKey)===null||me===void 0?void 0:me.call(n);Ie==null&&s&&(Ie=(Ee=n.getLastKey)===null||Ee===void 0?void 0:Ee.call(n,t.focusedKey)),Ie!=null&&(q.preventDefault(),se(Ie))}break;case"ArrowLeft":if(n.getKeyLeftOf){var we,Be,Oe;let Ie=t.focusedKey!=null?(we=n.getKeyLeftOf)===null||we===void 0?void 0:we.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=_==="rtl"?(Be=n.getFirstKey)===null||Be===void 0?void 0:Be.call(n,t.focusedKey):(Oe=n.getLastKey)===null||Oe===void 0?void 0:Oe.call(n,t.focusedKey)),Ie!=null&&(q.preventDefault(),se(Ie,_==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var Te,tt,yt;let Ie=t.focusedKey!=null?(Te=n.getKeyRightOf)===null||Te===void 0?void 0:Te.call(n,t.focusedKey):null;Ie==null&&s&&(Ie=_==="rtl"?(tt=n.getLastKey)===null||tt===void 0?void 0:tt.call(n,t.focusedKey):(yt=n.getFirstKey)===null||yt===void 0?void 0:yt.call(n,t.focusedKey)),Ie!=null&&(q.preventDefault(),se(Ie,_==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&q.shiftKey)return;q.preventDefault();let Ie=n.getFirstKey(t.focusedKey,up(q));t.setFocusedKey(Ie),Ie!=null&&(up(q)&&q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&q.shiftKey)return;q.preventDefault();let Ie=n.getLastKey(t.focusedKey,up(q));t.setFocusedKey(Ie),Ie!=null&&(up(q)&&q.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(Ie):h&&t.replaceSelection(Ie))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let Ie=n.getKeyPageBelow(t.focusedKey);Ie!=null&&(q.preventDefault(),se(Ie))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let Ie=n.getKeyPageAbove(t.focusedKey);Ie!=null&&(q.preventDefault(),se(Ie))}break;case"a":up(q)&&t.selectionMode==="multiple"&&c!==!0&&(q.preventDefault(),t.selectAll());break;case"Escape":d==="clearSelection"&&!a&&t.selectedKeys.size!==0&&(q.stopPropagation(),q.preventDefault(),t.clearSelection());break;case"Tab":if(!b){if(q.shiftKey)r.current.focus();else{let Ie=Ys(r.current,{tabbable:!0}),Rt,bt;do bt=Ie.lastChild(),bt&&(Rt=bt);while(bt);Rt&&!Rt.contains(document.activeElement)&&Xl(Rt)}break}}},L=k.useRef({top:0,left:0});eg(S,"scroll",x?void 0:()=>{var q,K,se,A;L.current={top:(se=(q=S.current)===null||q===void 0?void 0:q.scrollTop)!==null&&se!==void 0?se:0,left:(A=(K=S.current)===null||K===void 0?void 0:K.scrollLeft)!==null&&A!==void 0?A:0}});let B=q=>{if(t.isFocused){q.currentTarget.contains(q.target)||t.setFocused(!1);return}if(q.currentTarget.contains(q.target)){if(t.setFocused(!0),t.focusedKey==null){var K,se;let oe=me=>{me!=null&&(t.setFocusedKey(me),h&&!t.isSelected(me)&&t.replaceSelection(me))},z=q.relatedTarget;var A,j;z&&q.currentTarget.compareDocumentPosition(z)&Node.DOCUMENT_POSITION_FOLLOWING?oe((A=t.lastSelectedKey)!==null&&A!==void 0?A:(K=n.getLastKey)===null||K===void 0?void 0:K.call(n)):oe((j=t.firstSelectedKey)!==null&&j!==void 0?j:(se=n.getFirstKey)===null||se===void 0?void 0:se.call(n))}else!x&&S.current&&(S.current.scrollTop=L.current.top,S.current.scrollLeft=L.current.left);if(t.focusedKey!=null&&S.current){let oe=Eg(r,t.focusedKey);oe instanceof HTMLElement&&(!oe.contains(document.activeElement)&&!g&&Xl(oe),eh()==="keyboard"&&g1(oe,{containingElement:r.current}))}}},W=q=>{q.currentTarget.contains(q.relatedTarget)||t.setFocused(!1)},M=k.useRef(!1);eg(r,ZL,g?q=>{let{detail:K}=q;q.stopPropagation(),t.setFocused(!0),K?.focusStrategy==="first"&&(M.current=!0)}:void 0);let Z=Fn(()=>{var q,K;let se=(K=(q=n.getFirstKey)===null||q===void 0?void 0:q.call(n))!==null&&K!==void 0?K:null;se==null?(NF(r.current),t.collection.size>0&&(M.current=!1)):(t.setFocusedKey(se),M.current=!1)});p1(()=>{M.current&&Z()},[t.collection,Z]);let re=Fn(()=>{t.collection.size>0&&(M.current=!1)});p1(()=>{re()},[t.focusedKey,re]),eg(r,JL,g?q=>{var K;q.stopPropagation(),t.setFocused(!1),!((K=q.detail)===null||K===void 0)&&K.clearFocusKey&&t.setFocusedKey(null)}:void 0);const ae=k.useRef(i),O=k.useRef(!1);k.useEffect(()=>{if(ae.current){var q,K;let j=null;var se;i==="first"&&(j=(se=(q=n.getFirstKey)===null||q===void 0?void 0:q.call(n))!==null&&se!==void 0?se:null);var A;i==="last"&&(j=(A=(K=n.getLastKey)===null||K===void 0?void 0:K.call(n))!==null&&A!==void 0?A:null);let oe=t.selectedKeys;if(oe.size){for(let z of oe)if(t.canSelectItem(z)){j=z;break}}t.setFocused(!0),t.setFocusedKey(j),j==null&&!g&&r.current&&bu(r.current),t.collection.size>0&&(ae.current=!1,O.current=!0)}});let U=k.useRef(t.focusedKey),X=k.useRef(null);k.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==U.current||O.current)&&S.current&&r.current){let q=eh(),K=Eg(r,t.focusedKey);if(!(K instanceof HTMLElement))return;(q==="keyboard"||O.current)&&(X.current&&cancelAnimationFrame(X.current),X.current=requestAnimationFrame(()=>{S.current&&(kE(S.current,K),q!=="virtual"&&g1(K,{containingElement:r.current}))}))}!g&&t.isFocused&&t.focusedKey==null&&U.current!=null&&r.current&&bu(r.current),U.current=t.focusedKey,O.current=!1}),k.useEffect(()=>()=>{X.current&&cancelAnimationFrame(X.current)},[]),eg(r,"react-aria-focus-scope-restore",q=>{q.preventDefault(),t.setFocused(!0)});let ne={onKeyDown:R,onFocus:B,onBlur:W,onMouseDown(q){S.current===q.target&&q.preventDefault()}},{typeSelectProps:G}=xO({keyboardDelegate:n,selectionManager:t});m||(ne=lr(G,ne));let fe;g||(fe=t.focusedKey==null?0:-1);let J=yO(t.collection);return{collectionProps:lr(ne,{tabIndex:fe,"data-collection":J})}}class mk{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?Eg(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),s=r.getBoundingClientRect();return{x:s.left-i.left+n.scrollLeft,y:s.top-i.top+n.scrollTop,width:s.width,height:s.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t?.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t?.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,s;return{x:(n=t?.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t?.scrollTop)!==null&&r!==void 0?r:0,width:(i=t?.offsetWidth)!==null&&i!==void 0?i:0,height:(s=t?.offsetHeight)!==null&&s!==void 0?s:0}}constructor(t){this.ref=t}}class kO{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if(i?.type==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,s=this.layoutDelegate.getItemRect(i);if(!s||i==null)return null;let a=s;do{if(i=n(i),i==null)break;s=this.layoutDelegate.getItemRect(i)}while(s&&r(a,s)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!Kp(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let s=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let s=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>s&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!Kp(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let s=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.xs||new kO({collection:n,disabledKeys:r,disabledBehavior:d,ref:i,collator:c,layoutDelegate:a}),[s,a,n,r,i,c,d]),{collectionProps:m}=SO({...e,ref:i,selectionManager:t,keyboardDelegate:h});return{listProps:m}}function EO(e,t,n){let{listProps:r}=CO({...e,...t,allowsTabNavigation:!0,disallowSelectAll:!0,ref:n});return delete r.onKeyDownCapture,{accordionProps:{...r,tabIndex:void 0}}}function PO(e){var t,n;const r=Pi(),{ref:i,as:s,item:a,onFocusChange:c}=e,{state:d,className:h,indicator:m,children:g,title:b,subtitle:x,startContent:S,motionProps:P,focusedKey:_,variant:T,isCompact:R=!1,classNames:L={},isDisabled:B=!1,hideIndicator:W=!1,disableAnimation:M=(t=r?.disableAnimation)!=null?t:!1,keepContentMounted:Z=!1,disableIndicatorAnimation:re=!1,HeadingComponent:ae=s||"h2",onPress:O,onPressStart:U,onPressEnd:X,onPressChange:ne,onPressUp:G,onClick:fe,...J}=e,q=s||"div",K=typeof q=="string",se=Xi(i),A=d.disabledKeys.has(a.key)||B,j=d.selectionManager.isSelected(a.key),{buttonProps:oe,regionProps:z}=vO({item:a,isDisabled:A},{...d,focusedKey:_},se),{onFocus:me,onBlur:Ee,...we}=oe,{isFocused:Be,isFocusVisible:Oe,focusProps:Te}=th({autoFocus:(n=a.props)==null?void 0:n.autoFocus}),{isHovered:tt,hoverProps:yt}=kf({isDisabled:A}),{pressProps:Ie,isPressed:Rt}=fv({ref:se,isDisabled:A,onPress:O,onPressStart:U,onPressEnd:X,onPressChange:ne,onPressUp:G}),bt=k.useCallback(()=>{c?.(!0,a.key)},[]),Xt=k.useCallback(()=>{c?.(!1,a.key)},[]),Ue=k.useMemo(()=>({...L}),[Zs(L)]),st=k.useMemo(()=>fO({isCompact:R,isDisabled:A,hideIndicator:W,disableAnimation:M,disableIndicatorAnimation:re,variant:T}),[R,A,W,M,re,T]),An=pn(Ue?.base,h),Nr=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"base",className:st.base({class:An}),...hn(gf(J,{enabled:K}),pe)}),[An,K,J,st,a.props,j,A]),Sn=(pe={})=>{var ke,je;return{ref:se,"data-open":Me(j),"data-focus":Me(Be),"data-focus-visible":Me(Oe),"data-disabled":Me(A),"data-hover":Me(tt),"data-pressed":Me(Rt),"data-slot":"trigger",className:st.trigger({class:Ue?.trigger}),onFocus:r1(bt,me,Te.onFocus,J.onFocus,(ke=a.props)==null?void 0:ke.onFocus),onBlur:r1(Xt,Ee,Te.onBlur,J.onBlur,(je=a.props)==null?void 0:je.onBlur),...hn(we,yt,Ie,pe,{onClick:mf(Ie.onClick,fe)})}},Lt=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"content",className:st.content({class:Ue?.content}),...hn(z,pe)}),[st,Ue,z,j,A,Ue?.content]),zt=k.useCallback((pe={})=>({"aria-hidden":Me(!0),"data-open":Me(j),"data-disabled":Me(A),"data-slot":"indicator",className:st.indicator({class:Ue?.indicator}),...pe}),[st,Ue?.indicator,j,A,Ue?.indicator]),ar=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"heading",className:st.heading({class:Ue?.heading}),...pe}),[st,Ue?.heading,j,A,Ue?.heading]),no=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"title",className:st.title({class:Ue?.title}),...pe}),[st,Ue?.title,j,A,Ue?.title]),Yn=k.useCallback((pe={})=>({"data-open":Me(j),"data-disabled":Me(A),"data-slot":"subtitle",className:st.subtitle({class:Ue?.subtitle}),...pe}),[st,Ue,j,A,Ue?.subtitle]);return{Component:q,HeadingComponent:ae,item:a,slots:st,classNames:Ue,domRef:se,indicator:m,children:g,title:b,subtitle:x,startContent:S,isOpen:j,isDisabled:A,hideIndicator:W,keepContentMounted:Z,disableAnimation:M,motionProps:P,getBaseProps:Nr,getHeadingProps:ar,getButtonProps:Sn,getContentProps:Lt,getIndicatorProps:zt,getTitleProps:no,getSubtitleProps:Yn}}var gk=e=>F.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:F.jsx("path",{d:"M15.5 19l-7-7 7-7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),TO=e=>F.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...e,children:F.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})}),_O=e=>{const{isSelected:t,isIndeterminate:n,disableAnimation:r,...i}=e;return F.jsx("svg",{"aria-hidden":"true",className:"fill-current",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:"1em",...i,children:F.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})},Fp={ease:[.36,.66,.4,1]},Ug={scaleSpring:{enter:{transform:"scale(1)",opacity:1,transition:{type:"spring",bounce:0,duration:.2}},exit:{transform:"scale(0.85)",opacity:0,transition:{type:"easeOut",duration:.15}}},scaleSpringOpacity:{initial:{opacity:0,transform:"scale(0.8)"},enter:{opacity:1,transform:"scale(1)",transition:{type:"spring",bounce:0,duration:.3}},exit:{opacity:0,transform:"scale(0.96)",transition:{type:"easeOut",bounce:0,duration:.15}}},fade:{enter:{opacity:1,transition:{duration:.4,ease:Fp.ease}},exit:{opacity:0,transition:{duration:.3,ease:Fp.ease}}},collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}},vk=()=>ta(()=>import("./index-MCoEOEoa.js"),[]).then(e=>e.default),k_=Ti((e,t)=>{const{Component:n,HeadingComponent:r,classNames:i,slots:s,indicator:a,children:c,title:d,subtitle:h,startContent:m,isOpen:g,isDisabled:b,hideIndicator:x,keepContentMounted:S,disableAnimation:P,motionProps:_,getBaseProps:T,getHeadingProps:R,getButtonProps:L,getTitleProps:B,getSubtitleProps:W,getContentProps:M,getIndicatorProps:Z}=PO({...e,ref:t}),re=HN(),O=k.useMemo(()=>typeof a=="function"?a({indicator:F.jsx(gk,{}),isOpen:g,isDisabled:b}):a||null,[a,g,b])||F.jsx(gk,{}),U=k.useMemo(()=>{if(P)return S?F.jsx("div",{...M(),children:c}):g&&F.jsx("div",{...M(),children:c});const X={exit:{...Ug.collapse.exit,overflowY:"hidden"},enter:{...Ug.collapse.enter,overflowY:"unset"}};return S?F.jsx(wf,{features:vk,children:F.jsx(Sf.section,{animate:g?"enter":"exit",exit:"exit",initial:"exit",style:{willChange:re},variants:X,onKeyDown:ne=>{ne.stopPropagation()},..._,children:F.jsx("div",{...M(),children:c})},"accordion-content")}):F.jsx(Rf,{initial:!1,children:g&&F.jsx(wf,{features:vk,children:F.jsx(Sf.section,{animate:"enter",exit:"exit",initial:"exit",style:{willChange:re},variants:X,onKeyDown:ne=>{ne.stopPropagation()},..._,children:F.jsx("div",{...M(),children:c})},"accordion-content")})})},[g,P,S,c,_]);return F.jsxs(n,{...T(),children:[F.jsx(r,{...R(),children:F.jsxs("button",{...L(),children:[m&&F.jsx("div",{className:s.startContent({class:i?.startContent}),children:m}),F.jsxs("div",{className:s.titleWrapper({class:i?.titleWrapper}),children:[d&&F.jsx("span",{...B(),children:d}),h&&F.jsx("span",{...W(),children:h})]}),!x&&O&&F.jsx("span",{...Z(),children:O})]})}),U]})});k_.displayName="HeroUI.AccordionItem";var IO=k_;class $O{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=c=>{if(this.keyMap.set(c.key,c),c.childNodes&&(c.type==="section"||n.has(c.key)))for(let d of c.childNodes)r(d)};for(let c of t)r(c);let i=null,s=0;for(let[c,d]of this.keyMap)i?(i.nextKey=c,d.prevKey=i.key):(this.firstKey=c,d.prevKey=void 0),d.type==="item"&&(d.index=s++),i=d,i.nextKey=void 0;var a;this.lastKey=(a=i?.key)!==null&&a!==void 0?a:null}}class Co extends Set{constructor(t,n,r){super(t),t instanceof Co?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function AO(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function RO(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,a=k.useRef(!1),[,c]=k.useState(!1),d=k.useRef(null),h=k.useRef(null),[,m]=k.useState(null),g=k.useMemo(()=>yk(e.selectedKeys),[e.selectedKeys]),b=k.useMemo(()=>yk(e.defaultSelectedKeys,new Co),[e.defaultSelectedKeys]),[x,S]=If(g,b,e.onSelectionChange),P=k.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[_,T]=k.useState(i);i==="replace"&&_==="toggle"&&typeof x=="object"&&x.size===0&&T("replace");let R=k.useRef(i);return k.useEffect(()=>{i!==R.current&&(T(i),R.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:_,setSelectionBehavior:T,get isFocused(){return a.current},setFocused(L){a.current=L,c(L)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(L,B="first"){d.current=L,h.current=B,m(L)},selectedKeys:x,setSelectedKeys(L){(r||!AO(L,x))&&S(L)},disabledKeys:P,disabledBehavior:s}}function yk(e,t){return e?e==="all"?"all":new Co(e):t}function C_(e){return null}C_.getCollectionNode=function*(t,n){let{childItems:r,title:i,children:s}=t,a=t.title||t.children,c=t.textValue||(typeof a=="string"?a:"")||t["aria-label"]||"";!c&&n?.suppressTextValueWarning,yield{type:"item",props:t,rendered:a,textValue:c,"aria-label":t["aria-label"],hasChildNodes:LO(t),*childNodes(){if(r)for(let d of r)yield{type:"item",value:d};else if(i){let d=[];We.Children.forEach(s,h=>{d.push({type:"item",element:h})}),yield*d}}}};function LO(e){return e.hasChildItems!=null?e.hasChildItems:!!(e.childItems||e.title&&We.Children.count(e.children)>0)}let MO=C_;class DO{build(t,n){return this.context=n,bk(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(We.isValidElement(n)&&n.type===We.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:n}),i++}else{let i=[];We.Children.forEach(n,a=>{a&&i.push(a)});let s=0;for(let a of i){let c=this.getFullNode({element:a,index:s},{});for(let d of c)s++,yield d}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let s=n.value;if(s!=null){var a;let c=(a=s.key)!==null&&a!==void 0?a:s.id;if(c==null)throw new Error("No key found for item");return c}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(We.isValidElement(t.element)&&t.element.type===We.Fragment){let _=[];We.Children.forEach(t.element.props.children,R=>{_.push(R)});var s;let T=(s=t.index)!==null&&s!==void 0?s:0;for(const R of _)yield*this.getFullNode({element:R,index:T++},n,r,i);return}let a=t.element;if(!a&&t.value&&n&&n.renderer){let _=this.cache.get(t.value);if(_&&(!_.shouldInvalidate||!_.shouldInvalidate(this.context))){_.index=t.index,_.parentKey=i?i.key:null,yield _;return}a=n.renderer(t.value)}if(We.isValidElement(a)){let _=a.type;if(typeof _!="function"&&typeof _.getCollectionNode!="function"){let B=a.type;throw new Error(`Unknown element <${B}> in collection.`)}let T=_.getCollectionNode(a.props,this.context);var c;let R=(c=t.index)!==null&&c!==void 0?c:0,L=T.next();for(;!L.done&&L.value;){let B=L.value;t.index=R;var d;let W=(d=B.key)!==null&&d!==void 0?d:null;W==null&&(W=B.element?null:this.getKey(a,t,n,r));let Z=[...this.getFullNode({...B,key:W,index:R,wrapper:NO(t.wrapper,B.wrapper)},this.getChildState(n,B),r?`${r}${a.key}`:a.key,i)];for(let re of Z){var h,m;re.value=(m=(h=B.value)!==null&&h!==void 0?h:t.value)!==null&&m!==void 0?m:null,re.value&&this.cache.set(re.value,re);var g;if(t.type&&re.type!==t.type)throw new Error(`Unsupported type <${a0(re.type)}> in <${a0((g=i?.type)!==null&&g!==void 0?g:"unknown parent type")}>. Only <${a0(t.type)}> is supported.`);R++,yield re}L=T.next(Z)}return}if(t.key==null||t.type==null)return;let b=this;var x,S;let P={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(x=t.value)!==null&&x!==void 0?x:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(S=t.textValue)!==null&&S!==void 0?S:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:bk(function*(){if(!t.hasChildNodes||!t.childNodes)return;let _=0;for(let T of t.childNodes()){T.key!=null&&(T.key=`${P.key}${T.key}`);let R=b.getFullNode({...T,index:_},b.getChildState(n,T),P.key,P);for(let L of R)_++,yield L}})};yield P}constructor(){this.cache=new WeakMap}}function bk(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function NO(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function a0(e){return e[0].toUpperCase()+e.slice(1)}function FO(e,t,n){let r=k.useMemo(()=>new DO,[]),{children:i,items:s,collection:a}=e;return k.useMemo(()=>{if(a)return a;let d=r.build({children:i,items:s},n);return t(d)},[r,i,s,a,n,t])}function OO(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function zO(e){return BO(e)}function BO(e,t){for(let n of e)return n}function u0(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...xk(e,t),t],i=[...xk(e,n),n],s=r.slice(0,i.length).findIndex((a,c)=>a!==i[c]);return s!==-1?(t=r[s],n=i[s],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function xk(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}class Gx{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&u0(this.collection,i,t)<0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&u0(this.collection,i,t)>0)&&(t=i)}var n;return(n=t?.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Co([n],n,n);else{let a=this.state.selectedKeys;var i;let c=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new Co(a,c,n);var s;for(let d of this.getKeyRange(c,(s=a.currentKey)!==null&&s!==void 0?s:n))r.delete(d);for(let d of this.getKeyRange(n,c))this.canSelectItem(d)&&r.add(d)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?u0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],s=t;for(;s!=null;){let a=this.collection.getItem(s);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(s),s===n)return i;s=this.collection.getKeyAfter(s)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Co(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Co([n],n,n):new Co;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Co;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);a?.type==="item"&&t.push(r);var s;a?.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((s=(i=zO(OO(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&s!==void 0?s:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Co)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new Gx(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r?.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=r?.layoutDelegate||null}}function jO(e){let{onExpandedChange:t}=e,[n,r]=If(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=RO(e),s=k.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=FO(e,k.useCallback(d=>new $O(d,{expandedKeys:n}),[n]),null);return k.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:s,toggleKey:d=>{r(VO(n,d))},setExpandedKeys:r,selectionManager:new Gx(a,i)}}function VO(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function UO(e){var t;const n=Pi(),{ref:r,as:i,className:s,items:a,variant:c,motionProps:d,expandedKeys:h,disabledKeys:m,selectedKeys:g,children:b,defaultExpandedKeys:x,selectionMode:S="single",selectionBehavior:P="toggle",keepContentMounted:_=!1,disallowEmptySelection:T,defaultSelectedKeys:R,onExpandedChange:L,onSelectionChange:B,dividerProps:W={},isCompact:M=!1,isDisabled:Z=!1,showDivider:re=!0,hideIndicator:ae=!1,disableAnimation:O=(t=n?.disableAnimation)!=null?t:!1,disableIndicatorAnimation:U=!1,itemClasses:X,...ne}=e,[G,fe]=k.useState(null),J=i||"div",q=typeof J=="string",K=Xi(r),se=k.useMemo(()=>cO({variant:c,className:s}),[c,s]),j={children:k.useMemo(()=>{let Te=[];return We.Children.map(b,tt=>{var yt;if(We.isValidElement(tt)&&typeof((yt=tt.props)==null?void 0:yt.children)!="string"){const Ie=We.cloneElement(tt,{hasChildItems:!1});Te.push(Ie)}else Te.push(tt)}),Te},[b]),items:a},oe={expandedKeys:h,defaultExpandedKeys:x,onExpandedChange:L},z={disabledKeys:m,selectedKeys:g,selectionMode:S,selectionBehavior:P,disallowEmptySelection:T,defaultSelectedKeys:R??x,onSelectionChange:B,...j,...oe},me=jO(z);me.selectionManager.setFocusedKey=Te=>{fe(Te)};const{accordionProps:Ee}=EO({...j,...oe},me,K),we=k.useMemo(()=>({state:me,focusedKey:G,motionProps:d,isCompact:M,isDisabled:Z,hideIndicator:ae,disableAnimation:O,keepContentMounted:_,disableIndicatorAnimation:U}),[G,M,Z,ae,g,O,_,me?.expandedKeys.values,U,me.expandedKeys.size,me.disabledKeys.size,d]),Be=k.useCallback((Te={})=>({ref:K,className:se,"data-orientation":"vertical",...hn(Ee,gf(ne,{enabled:q}),Te)}),[]),Oe=k.useCallback((Te,tt)=>{Te&&fe(tt)},[]);return{Component:J,values:we,state:me,focusedKey:G,getBaseProps:Be,isSplitted:c==="splitted",classNames:se,showDivider:re,dividerProps:W,disableAnimation:O,handleFocusChanged:Oe,itemClasses:X}}function KO(e){let t=gf(e,{enabled:typeof e.elementType=="string"}),n;return e.orientation==="vertical"&&(n="vertical"),e.elementType!=="hr"?{separatorProps:{...t,role:"separator","aria-orientation":n}}:{separatorProps:t}}function WO(e){const{as:t,className:n,orientation:r,...i}=e;let s=t||"hr";s==="hr"&&r==="vertical"&&(s="div");const{separatorProps:a}=KO({elementType:typeof s=="string"?s:"hr",orientation:r}),c=k.useMemo(()=>lO({orientation:r,className:n}),[r,n]),d=k.useCallback((h={})=>({className:c,role:"separator","data-orientation":r,...a,...i,...h}),[c,r,a,i]);return{Component:s,getDividerProps:d}}var E_=Ti((e,t)=>{const{Component:n,getDividerProps:r}=WO({...e});return F.jsx(n,{ref:t,...r()})});E_.displayName="HeroUI.Divider";var HO=E_,P_=Ti((e,t)=>{const{Component:n,values:r,state:i,isSplitted:s,showDivider:a,getBaseProps:c,disableAnimation:d,handleFocusChanged:h,itemClasses:m,dividerProps:g}=UO({...e,ref:t}),b=k.useCallback((S,P)=>h(S,P),[h]),x=k.useMemo(()=>[...i.collection].map((S,P)=>{const _={...m,...S.props.classNames||{}};return F.jsxs(k.Fragment,{children:[F.jsx(IO,{item:S,variant:e.variant,onFocusChange:b,...r,...S.props,classNames:_}),!S.props.hidden&&!s&&a&&P{const t={top:{originY:1},bottom:{originY:0},left:{originX:1},right:{originX:0},"top-start":{originX:0,originY:1},"top-end":{originX:1,originY:1},"bottom-start":{originX:0,originY:0},"bottom-end":{originX:1,originY:0},"right-start":{originX:0,originY:0},"right-end":{originX:0,originY:1},"left-start":{originX:1,originY:0},"left-end":{originX:1,originY:1}};return t?.[e]||{}},qO=e=>({top:"top",bottom:"bottom",left:"left",right:"right","top-start":"top start","top-end":"top end","bottom-start":"bottom start","bottom-end":"bottom end","left-start":"left top","left-end":"left bottom","right-start":"right top","right-end":"right bottom"})[e],UH=(e,t)=>{if(t.includes("-")){const[n]=t.split("-");if(n.includes(e))return!1}return!0},Sk=(e,t)=>{if(t.includes("-")){const[,n]=t.split("-");return`${e}-${n}`}return e},YO=MO,hp=YO,mv=globalThis?.document?k.useLayoutEffect:k.useEffect;function XO(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:i,crossOrigin:s,srcSet:a,sizes:c,loading:d,shouldBypassImageLoad:h=!1}=e,m=JR(),g=k.useRef(m?new Image:null),[b,x]=k.useState("pending");k.useEffect(()=>{g.current&&(g.current.onload=_=>{S(),x("loaded"),t?.(_)},g.current.onerror=_=>{S(),x("failed"),n?.(_)})},[g.current]);const S=()=>{g.current&&(g.current.onload=null,g.current.onerror=null,g.current=null)},P=k.useCallback(()=>{if(!i)return"pending";if(r||h)return"loaded";const _=new Image;return _.src=i,s&&(_.crossOrigin=s),a&&(_.srcset=a),c&&(_.sizes=c),d&&(_.loading=d),g.current=_,_.complete&&_.naturalWidth?"loaded":"loading"},[i,s,a,c,t,n,d,h]);return mv(()=>{m&&x(P())},[m,P]),r?"loaded":b}var[KH,QO]=tx({name:"ButtonGroupContext",strict:!1});function T_(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,preventFocusOnPress:h,allowFocusWhenDisabled:m,onClick:g,href:b,target:x,rel:S,type:P="button",allowTextSelectionOnPress:_}=e,T;n==="button"?T={type:P,disabled:r}:T={role:"button",href:n==="a"&&!r?b:void 0,target:n==="a"?x:void 0,type:n==="input"?P:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?S:void 0};let{pressProps:R,isPressed:L}=fv({onClick:g,onPressStart:s,onPressEnd:a,onPressUp:c,onPressChange:d,onPress:i,isDisabled:r,preventFocusOnPress:h,allowTextSelectionOnPress:_,ref:t}),{focusableProps:B}=pv(e,t);m&&(B.tabIndex=r?-1:B.tabIndex);let W=lr(B,R,_f(e,{labelable:!0}));return{isPressed:L,buttonProps:lr(T,W,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var JO=()=>ta(()=>import("./index-MCoEOEoa.js"),[]).then(e=>e.default),__=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:i,onClear:s}=e;return F.jsx(F.Fragment,{children:t.map(a=>{const c=HR(.01*a.size,.2,a.size>100?.75:.5);return F.jsx(wf,{features:JO,children:F.jsx(Rf,{mode:"popLayout",children:F.jsx(Sf.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:a.y,left:a.x,width:`${a.size}px`,height:`${a.size}px`,...i},transition:{duration:c},onAnimationComplete:()=>{s(a.key)},...n})})},a.key)})})};__.displayName="HeroUI.Ripple";var ZO=__;function e6(e={}){const[t,n]=k.useState([]),r=k.useCallback(s=>{const a=s.target,c=Math.max(a.clientWidth,a.clientHeight);n(d=>[...d,{key:WR(d.length.toString()),size:c,x:s.x-c/2,y:s.y-c/2}])},[]),i=k.useCallback(s=>{n(a=>a.filter(c=>c.key!==s))},[]);return{ripples:t,onClear:i,onPress:r,...e}}function t6(e){var t,n,r,i,s,a,c,d,h;const m=QO(),g=Pi(),b=!!m,{ref:x,as:S,children:P,startContent:_,endContent:T,autoFocus:R,className:L,spinner:B,isLoading:W=!1,disableRipple:M=!1,fullWidth:Z=(t=m?.fullWidth)!=null?t:!1,radius:re=m?.radius,size:ae=(n=m?.size)!=null?n:"md",color:O=(r=m?.color)!=null?r:"default",variant:U=(i=m?.variant)!=null?i:"solid",disableAnimation:X=(a=(s=m?.disableAnimation)!=null?s:g?.disableAnimation)!=null?a:!1,isDisabled:ne=(c=m?.isDisabled)!=null?c:!1,isIconOnly:G=(d=m?.isIconOnly)!=null?d:!1,spinnerPlacement:fe="start",onPress:J,onClick:q,...K}=e,se=S||"button",A=typeof se=="string",j=Xi(x),oe=(h=M||g?.disableRipple)!=null?h:X,{isFocusVisible:z,isFocused:me,focusProps:Ee}=th({autoFocus:R}),we=ne||W,Be=k.useMemo(()=>uO({size:ae,color:O,variant:U,radius:re,fullWidth:Z,isDisabled:we,isInGroup:b,disableAnimation:X,isIconOnly:G,className:L}),[ae,O,U,re,Z,we,b,G,X,L]),{onPress:Oe,onClear:Te,ripples:tt}=e6(),yt=k.useCallback(zt=>{oe||we||X||j.current&&Oe(zt)},[oe,we,X,j,Oe]),{buttonProps:Ie,isPressed:Rt}=T_({elementType:S,isDisabled:we,onPress:mf(J,yt),onClick:q,...K},j),{isHovered:bt,hoverProps:Xt}=kf({isDisabled:we}),Ue=k.useCallback((zt={})=>({"data-disabled":Me(we),"data-focus":Me(me),"data-pressed":Me(Rt),"data-focus-visible":Me(z),"data-hover":Me(bt),"data-loading":Me(W),...hn(Ie,Ee,Xt,gf(K,{enabled:A}),gf(zt)),className:Be}),[W,we,me,Rt,A,z,bt,Ie,Ee,Xt,K,Be]),st=zt=>k.isValidElement(zt)?k.cloneElement(zt,{"aria-hidden":!0,focusable:!1}):null,An=st(_),Nr=st(T),Sn=k.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[ae],[ae]),Lt=k.useCallback(()=>({ripples:tt,onClear:Te}),[tt,Te]);return{Component:se,children:P,domRef:j,spinner:B,styles:Be,startContent:An,endContent:Nr,isLoading:W,spinnerPlacement:fe,spinnerSize:Sn,disableRipple:oe,getButtonProps:Ue,getRippleProps:Lt,isIconOnly:G}}function n6(e){var t,n;const[r,i]=ea(e,ok.variantKeys),s=Pi(),a=(n=(t=e?.variant)!=null?t:s?.spinnerVariant)!=null?n:"default",{children:c,className:d,classNames:h,label:m,...g}=r,b=k.useMemo(()=>ok({...i}),[Zs(i)]),x=pn(h?.base,d),S=m||c,P=k.useMemo(()=>S&&typeof S=="string"?S:g["aria-label"]?"":"Loading",[c,S,g["aria-label"]]),_=k.useCallback(()=>({"aria-label":P,className:b.base({class:x}),...g}),[P,b,x,g]);return{label:S,slots:b,classNames:h,variant:a,getSpinnerProps:_}}var I_=Ti((e,t)=>{const{slots:n,classNames:r,label:i,variant:s,getSpinnerProps:a}=n6({...e});return s==="wave"||s==="dots"?F.jsxs("div",{ref:t,...a(),children:[F.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((c,d)=>F.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":d}},`dot-${d}`))}),i&&F.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="simple"?F.jsxs("div",{ref:t,...a(),children:[F.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[F.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),F.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),i&&F.jsx("span",{className:n.label({class:r?.label}),children:i})]}):s==="spinner"?F.jsxs("div",{ref:t,...a(),children:[F.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((c,d)=>F.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":d}},`star-${d}`))}),i&&F.jsx("span",{className:n.label({class:r?.label}),children:i})]}):F.jsxs("div",{ref:t,...a(),children:[F.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[F.jsx("i",{className:n.circle1({class:r?.circle1})}),F.jsx("i",{className:n.circle2({class:r?.circle2})})]}),i&&F.jsx("span",{className:n.label({class:r?.label}),children:i})]})});I_.displayName="HeroUI.Spinner";var r6=I_,$_=Ti((e,t)=>{const{Component:n,domRef:r,children:i,spinnerSize:s,spinner:a=F.jsx(r6,{color:"current",size:s}),spinnerPlacement:c,startContent:d,endContent:h,isLoading:m,disableRipple:g,getButtonProps:b,getRippleProps:x,isIconOnly:S}=t6({...e,ref:t});return F.jsxs(n,{ref:r,...b(),children:[d,m&&c==="start"&&a,m&&S?null:i,m&&c==="end"&&a,h,!g&&F.jsx(ZO,{...x()})]})});$_.displayName="HeroUI.Button";var To=$_;const A_={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},R_={...A_,customError:!0,valid:!1},mp={isInvalid:!1,validationDetails:A_,validationErrors:[]},L_=k.createContext({}),kk="__formValidationState"+Date.now();function i6(e){if(e[kk]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}=e[kk];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:s}}return o6(e)}function o6(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:s,validate:a,validationBehavior:c="aria"}=e;n&&(t||(t=n==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:R_}:null,h=k.useMemo(()=>{if(!a||i==null)return null;let O=s6(a,i);return Ck(O)},[a,i]);s?.validationDetails.valid&&(s=void 0);let m=k.useContext(L_),g=k.useMemo(()=>r?Array.isArray(r)?r.flatMap(O=>Eb(m[O])):Eb(m[r]):[],[m,r]),[b,x]=k.useState(m),[S,P]=k.useState(!1);m!==b&&(x(m),P(!1));let _=k.useMemo(()=>Ck(S?[]:g),[S,g]),T=k.useRef(mp),[R,L]=k.useState(mp),B=k.useRef(mp),W=()=>{if(!M)return;Z(!1);let O=h||s||T.current;c0(O,B.current)||(B.current=O,L(O))},[M,Z]=k.useState(!1);return k.useEffect(W),{realtimeValidation:d||_||h||s||mp,displayValidation:c==="native"?d||_||R:d||_||h||s||R,updateValidation(O){c==="aria"&&!c0(R,O)?L(O):T.current=O},resetValidation(){let O=mp;c0(O,B.current)||(B.current=O,L(O)),c==="native"&&Z(!1),P(!0)},commitValidation(){c==="native"&&Z(!0),P(!0)}}}function Eb(e){return e?Array.isArray(e)?e:[e]:[]}function s6(e,t){if(typeof e=="function"){let n=e(t);if(n&&typeof n!="boolean")return Eb(n)}return[]}function Ck(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:R_}:null}function c0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((n,r)=>n===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([n,r])=>t.validationDetails[n]===r)}function l6(e,t,n){let{validationBehavior:r,focus:i}=e;Zt(()=>{if(r==="native"&&n?.current&&!n.current.disabled){let d=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(d),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(u6(n.current))}});let s=Fn(()=>{t.resetValidation()}),a=Fn(d=>{var h;t.displayValidation.isInvalid||t.commitValidation();let m=n==null||(h=n.current)===null||h===void 0?void 0:h.form;if(!d.defaultPrevented&&n&&m&&c6(m)===n.current){var g;i?i():(g=n.current)===null||g===void 0||g.focus(),yF("keyboard")}d.preventDefault()}),c=Fn(()=>{t.commitValidation()});k.useEffect(()=>{let d=n?.current;if(!d)return;let h=d.form;return d.addEventListener("invalid",a),d.addEventListener("change",c),h?.addEventListener("reset",s),()=>{d.removeEventListener("invalid",a),d.removeEventListener("change",c),h?.removeEventListener("reset",s)}},[n,a,c,s,r])}function a6(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function u6(e){return{isInvalid:!e.validity.valid,validationDetails:a6(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function c6(e){for(let t=0;t{if(typeof e=="function"){const s=e,a=s(i);return()=>{typeof a=="function"?a():s(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return k.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function D_(e,t){let n=k.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(s=>`"${s}"`));if(!t&&!n.slots[Ek])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||Ek;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function p6(e,t,n){let r=D_(n,e.slot)||{},{ref:i,...s}=r,a=d6(k.useMemo(()=>oE(t,i),[t,i])),c=hn(s,e);return"style"in s&&s.style&&"style"in e&&e.style&&(typeof s.style=="function"||typeof e.style=="function"?c.style=d=>{let h=typeof s.style=="function"?s.style(d):s.style,m={...d.defaultStyle,...h},g=typeof e.style=="function"?e.style({...d,defaultStyle:m}):e.style;return{...m,...g}}:c.style={...s.style,...e.style}),[c,a]}var Pb=k.createContext(null),h6=k.forwardRef(function(t,n){[t,n]=p6(t,n,Pb);let{validationErrors:r,validationBehavior:i="native",children:s,className:a,...c}=t;const d=k.useMemo(()=>aO({className:a}),[a]);return F.jsx("form",{noValidate:i!=="native",...c,ref:n,className:d,children:F.jsx(Pb.Provider,{value:{...t,validationBehavior:i},children:F.jsx(L_.Provider,{value:r??{},children:s})})})}),m6=k.forwardRef(function(t,n){var r,i;const s=Pi(),a=(i=(r=t.validationBehavior)!=null?r:s?.validationBehavior)!=null?i:"native";return F.jsx(h6,{...t,ref:n,validationBehavior:a})});function Pk(e,t=[]){const n=k.useRef(e);return mv(()=>{n.current=e}),k.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function N_(e){let[t,n]=If(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=k.useCallback(()=>{n(!0)},[n]),i=k.useCallback(()=>{n(!1)},[n]),s=k.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:s}}const g6=1500,Tk=500;let ou={},v6=0,gp=!1,Ws=null,su=null;function y6(e={}){let{delay:t=g6,closeDelay:n=Tk}=e,{isOpen:r,open:i,close:s}=N_(e),a=k.useMemo(()=>`${++v6}`,[]),c=k.useRef(null),d=k.useRef(s),h=()=>{ou[a]=b},m=()=>{for(let S in ou)S!==a&&(ou[S](!0),delete ou[S])},g=()=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),gp=!0,i(),Ws&&(clearTimeout(Ws),Ws=null),su&&(clearTimeout(su),su=null)},b=S=>{S||n<=0?(c.current&&clearTimeout(c.current),c.current=null,d.current()):c.current||(c.current=setTimeout(()=>{c.current=null,d.current()},n)),Ws&&(clearTimeout(Ws),Ws=null),gp&&(su&&clearTimeout(su),su=setTimeout(()=>{delete ou[a],su=null,gp=!1},Math.max(Tk,n)))},x=()=>{m(),h(),!r&&!Ws&&!gp?Ws=setTimeout(()=>{Ws=null,gp=!0,g()},t):r||g()};return k.useEffect(()=>{d.current=s},[s]),k.useEffect(()=>()=>{c.current&&clearTimeout(c.current),ou[a]&&delete ou[a]},[a]),{isOpen:r,open:S=>{!S&&t>0&&!c.current?x():g()},close:b}}function b6(e,t){let n=_f(e,{labelable:!0}),{hoverProps:r}=kf({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:lr(n,r,{role:"tooltip"})}}function x6(e,t,n){let{isDisabled:r,trigger:i}=e,s=vf(),a=k.useRef(!1),c=k.useRef(!1),d=()=>{(a.current||c.current)&&t.open(c.current)},h=T=>{!a.current&&!c.current&&t.close(T)};k.useEffect(()=>{let T=R=>{n&&n.current&&R.key==="Escape"&&(R.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",T,!0),()=>{document.removeEventListener("keydown",T,!0)}},[n,t]);let m=()=>{i!=="focus"&&(eh()==="pointer"?a.current=!0:a.current=!1,d())},g=()=>{i!=="focus"&&(c.current=!1,a.current=!1,h())},b=()=>{c.current=!1,a.current=!1,h(!0)},x=()=>{Ux()&&(c.current=!0,d())},S=()=>{c.current=!1,a.current=!1,h(!0)},{hoverProps:P}=kf({isDisabled:r,onHoverStart:m,onHoverEnd:g}),{focusableProps:_}=pv({isDisabled:r,onFocus:x,onBlur:S},n);return{triggerProps:{"aria-describedby":t.isOpen?s:void 0,...lr(_,P,{onPointerDown:b,onKeyDown:b,tabIndex:void 0})},tooltipProps:{id:s}}}var Hs=[];function F_(e,t){const{disableOutsideEvents:n=!0,isDismissable:r=!1,isKeyboardDismissDisabled:i=!1,isOpen:s,onClose:a,shouldCloseOnBlur:c,shouldCloseOnInteractOutside:d}=e;k.useEffect(()=>(s&&Hs.push(t),()=>{const P=Hs.indexOf(t);P>=0&&Hs.splice(P,1)}),[s,t]);const h=()=>{Hs[Hs.length-1]===t&&a&&a()},m=P=>{(!d||d(P.target))&&(Hs[Hs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),P.pointerType!=="touch"&&h())},g=P=>{P.pointerType==="touch"&&(!d||d(P.target))&&(Hs[Hs.length-1]===t&&n&&(P.stopPropagation(),P.preventDefault()),h())},b=P=>{P.key==="Escape"&&!i&&!P.nativeEvent.isComposing&&(P.stopPropagation(),P.preventDefault(),h())};_F({isDisabled:!(r&&s),onInteractOutside:r&&s?g:void 0,onInteractOutsideStart:m,ref:t});const{focusWithinProps:x}=hv({isDisabled:!c,onBlurWithin:P=>{!P.relatedTarget||RF(P.relatedTarget)||(!d||d(P.relatedTarget))&&h()}}),S=P=>{P.target===P.currentTarget&&P.preventDefault()};return{overlayProps:{onKeyDown:b,...x},underlayProps:{onPointerDown:S}}}function w6(e){var t,n;const r=Pi(),[i,s]=ea(e,sk.variantKeys),{ref:a,as:c,isOpen:d,content:h,children:m,defaultOpen:g,onOpenChange:b,isDisabled:x,trigger:S,shouldFlip:P=!0,containerPadding:_=12,placement:T="top",delay:R=0,closeDelay:L=500,showArrow:B=!1,offset:W=7,crossOffset:M=0,isDismissable:Z,shouldCloseOnBlur:re=!0,portalContainer:ae,isKeyboardDismissDisabled:O=!1,updatePositionDeps:U=[],shouldCloseOnInteractOutside:X,className:ne,onClose:G,motionProps:fe,classNames:J,...q}=i,K=c||"div",se=(n=(t=e?.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,A=y6({delay:R,closeDelay:L,isDisabled:x,defaultOpen:g,isOpen:d,onOpenChange:Ue=>{b?.(Ue),Ue||G?.()}}),j=k.useRef(null),oe=k.useRef(null),z=k.useId(),me=A.isOpen&&!x;k.useImperativeHandle(a,()=>OR(oe));const{triggerProps:Ee,tooltipProps:we}=x6({isDisabled:x,trigger:S},A,j),{tooltipProps:Be}=b6({isOpen:me,...hn(i,we)},A),{overlayProps:Oe,placement:Te,updatePosition:tt}=nF({isOpen:me,targetRef:j,placement:qO(T),overlayRef:oe,offset:B?W+3:W,crossOffset:M,shouldFlip:P,containerPadding:_});mv(()=>{U.length&&tt()},U);const{overlayProps:yt}=F_({isOpen:me,onClose:A.close,isDismissable:Z,shouldCloseOnBlur:re,isKeyboardDismissDisabled:O,shouldCloseOnInteractOutside:X},oe),Ie=k.useMemo(()=>{var Ue,st,An;return sk({...s,disableAnimation:se,radius:(Ue=e?.radius)!=null?Ue:"md",size:(st=e?.size)!=null?st:"md",shadow:(An=e?.shadow)!=null?An:"sm"})},[Zs(s),se,e?.radius,e?.size,e?.shadow]),Rt=k.useCallback((Ue={},st=null)=>({...hn(Ee,Ue),ref:QR(st,j),"aria-describedby":me?z:void 0}),[Ee,me,z,A]),bt=k.useCallback(()=>({ref:oe,"data-slot":"base","data-open":Me(me),"data-arrow":Me(B),"data-disabled":Me(x),"data-placement":Sk(Te||"top",T),...hn(Be,yt,q),style:hn(Oe.style,q.style,i.style),className:Ie.base({class:J?.base}),id:z}),[Ie,me,B,x,Te,T,Be,yt,q,Oe,i,z]),Xt=k.useCallback(()=>({"data-slot":"content","data-open":Me(me),"data-arrow":Me(B),"data-disabled":Me(x),"data-placement":Sk(Te||"top",T),className:Ie.content({class:pn(J?.content,ne)})}),[Ie,me,B,x,Te,T,J]);return{Component:K,content:h,children:m,isOpen:me,triggerRef:j,showArrow:B,portalContainer:ae,placement:T,disableAnimation:se,isDisabled:x,motionProps:fe,getTooltipContentProps:Xt,getTriggerProps:Rt,getTooltipProps:bt}}var S6=()=>ta(()=>import("./index-MCoEOEoa.js"),[]).then(e=>e.default),O_=Ti((e,t)=>{var n;const{Component:r,children:i,content:s,isOpen:a,portalContainer:c,placement:d,disableAnimation:h,motionProps:m,getTriggerProps:g,getTooltipProps:b,getTooltipContentProps:x}=w6({...e,ref:t});let S;try{if(k.Children.count(i)!==1)throw new Error;if(!k.isValidElement(i))S=F.jsx("p",{...g(),children:i});else{const W=i,M=(n=W.props.ref)!=null?n:W.ref;S=k.cloneElement(W,g(W.props,M))}}catch{S=F.jsx("span",{}),qR("Tooltip must have only one child node. Please, check your code.")}const{ref:P,id:_,style:T,...R}=b(),L=F.jsx("div",{ref:P,id:_,style:T,children:F.jsx(Sf.div,{animate:"enter",exit:"exit",initial:"exit",variants:Ug.scaleSpring,...hn(m,R),style:{...GO(d)},children:F.jsx(r,{...x(),children:s})},`${_}-tooltip-inner`)},`${_}-tooltip-content`);return F.jsxs(F.Fragment,{children:[S,h?a&&F.jsx(XS,{portalContainer:c,children:F.jsx("div",{ref:P,id:_,style:T,...R,children:F.jsx(r,{...x(),children:s})})}):F.jsx(wf,{features:S6,children:F.jsx(Rf,{children:a&&F.jsx(XS,{portalContainer:c,children:L})})})]})});O_.displayName="HeroUI.Tooltip";var k6=O_;function C6(e={}){const{rerender:t=!1,delay:n=0}=e,r=k.useRef(!1),[i,s]=k.useState(!1);return k.useEffect(()=>{r.current=!0;let a=null;return t&&(n>0?a=setTimeout(()=>{s(!0)},n):s(!0)),()=>{r.current=!1,t&&s(!1),a&&clearTimeout(a)}},[t]),[k.useCallback(()=>r.current,[]),i]}function E6(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:s,formatOptions:a={style:"percent"}}=e,c=_f(e,{labelable:!0}),{labelProps:d,fieldProps:h}=M_({...e,labelElementType:"span"});t=Rg(t,n,r);let m=(t-n)/(r-n),g=sM(a);if(!s&&!i){let b=a.style==="percent"?m:t;i=g.format(b)}return{progressBarProps:lr(c,{...h,"aria-valuenow":s?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":s?void 0:i,role:"progressbar"}),labelProps:d}}function P6(e){var t,n,r;const i=Pi(),[s,a]=ea(e,lk.variantKeys),{ref:c,as:d,id:h,className:m,classNames:g,label:b,valueLabel:x,value:S=void 0,minValue:P=0,maxValue:_=100,strokeWidth:T,showValueLabel:R=!1,formatOptions:L={style:"percent"},...B}=s,W=d||"div",M=Xi(c),Z=pn(g?.base,m),[,re]=C6({rerender:!0,delay:100}),ae=((t=e.isIndeterminate)!=null?t:!0)&&S===void 0,O=(r=(n=e.disableAnimation)!=null?n:i?.disableAnimation)!=null?r:!1,{progressBarProps:U,labelProps:X}=E6({id:h,label:b,value:S,minValue:P,maxValue:_,valueLabel:x,formatOptions:L,isIndeterminate:ae,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),ne=k.useMemo(()=>lk({...a,disableAnimation:O,isIndeterminate:ae}),[Zs(a),O,ae]),G=O?!0:re,fe=16,J=T||(e.size==="sm"?2:3),q=16-J,K=2*q*Math.PI,se=k.useMemo(()=>G?ae?.25:S?GR((S-P)/(_-P),1):0:0,[G,S,P,_,ae]),A=K-se*K,j=k.useCallback((we={})=>({ref:M,"data-indeterminate":Me(ae),"data-disabled":Me(e.isDisabled),className:ne.base({class:Z}),...hn(U,B,we)}),[M,ne,ae,e.isDisabled,Z,U,B]),oe=k.useCallback((we={})=>({className:ne.label({class:g?.label}),...hn(X,we)}),[ne,g,X]),z=k.useCallback((we={})=>({viewBox:"0 0 32 32",fill:"none",strokeWidth:J,className:ne.svg({class:g?.svg}),...we}),[J,ne,g]),me=k.useCallback((we={})=>({cx:fe,cy:fe,r:q,role:"presentation",strokeDasharray:`${K} ${K}`,strokeDashoffset:A,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ne.indicator({class:g?.indicator}),...we}),[ne,g,A,K,q]),Ee=k.useCallback((we={})=>({cx:fe,cy:fe,r:q,role:"presentation",strokeDasharray:`${K} ${K}`,strokeDashoffset:0,transform:"rotate(-90 16 16)",strokeLinecap:"round",className:ne.track({class:g?.track}),...we}),[ne,g,K,q]);return{Component:W,domRef:M,slots:ne,classNames:g,label:b,showValueLabel:R,getProgressBarProps:j,getLabelProps:oe,getSvgProps:z,getIndicatorProps:me,getTrackProps:Ee}}var z_=Ti((e,t)=>{const{Component:n,slots:r,classNames:i,label:s,showValueLabel:a,getProgressBarProps:c,getLabelProps:d,getSvgProps:h,getIndicatorProps:m,getTrackProps:g}=P6({ref:t,...e}),b=c();return F.jsxs(n,{...b,children:[F.jsxs("div",{className:r.svgWrapper({class:i?.svgWrapper}),children:[F.jsxs("svg",{...h(),children:[F.jsx("circle",{...g()}),F.jsx("circle",{...m()})]}),a&&F.jsx("span",{className:r.value({class:i?.value}),children:b["aria-valuetext"]})]}),s&&F.jsx("span",{...d(),children:s})]})});z_.displayName="HeroUI.CircularProgress";var T6=z_;function _6(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:i=!1,isReadOnly:s=!1,type:a="text",validationBehavior:c="aria"}=e,[d,h]=If(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=pv(e,t),g=i6({...e,value:d}),{isInvalid:b,validationErrors:x,validationDetails:S}=g.displayValidation,{labelProps:P,fieldProps:_,descriptionProps:T,errorMessageProps:R}=f6({...e,isInvalid:b,errorMessage:e.errorMessage||x}),L=_f(e,{labelable:!0});const B={type:a,pattern:e.pattern};return QL(t,d,h),l6(e,g,t),k.useEffect(()=>{if(t.current instanceof Qi(t.current).HTMLTextAreaElement){let W=t.current;Object.defineProperty(W,"defaultValue",{get:()=>W.value,set:()=>{},configurable:!0})}},[t]),{labelProps:P,inputProps:lr(L,n==="input"?B:void 0,{disabled:r,readOnly:s,required:i&&c==="native","aria-required":i&&c==="aria"||void 0,"aria-invalid":b||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:d,onChange:W=>h(W.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(We.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,..._}),descriptionProps:T,errorMessageProps:R,isInvalid:b,validationErrors:x,validationDetails:S}}function I6(e){var t,n,r,i,s,a,c;const d=Pi(),{validationBehavior:h}=D_(Pb)||{},[m,g]=ea(e,ck.variantKeys),{ref:b,as:x,type:S,label:P,baseRef:_,wrapperRef:T,description:R,className:L,classNames:B,autoFocus:W,startContent:M,endContent:Z,onClear:re,onChange:ae,validationState:O,validationBehavior:U=(t=h??d?.validationBehavior)!=null?t:"native",innerWrapperRef:X,onValueChange:ne=()=>{},...G}=m,fe=k.useCallback(Ye=>{ne(Ye??"")},[ne]),[J,q]=k.useState(!1),K=x||"div",se=(r=(n=e.disableAnimation)!=null?n:d?.disableAnimation)!=null?r:!1,A=Xi(b),j=Xi(_),oe=Xi(T),z=Xi(X),[me,Ee]=If(m.value,(i=m.defaultValue)!=null?i:"",fe),we=S==="file",Be=((c=(a=(s=A?.current)==null?void 0:s.files)==null?void 0:a.length)!=null?c:0)>0,Oe=["date","time","month","week","range"].includes(S),Te=!jR(me)||Oe||Be,tt=Te||J,yt=S==="hidden",Ie=e.isMultiline,Rt=pn(B?.base,L,Te?"is-filled":""),bt=k.useCallback(()=>{var Ye;we?A.current.value="":Ee(""),re?.(),(Ye=A.current)==null||Ye.focus()},[Ee,re,we]);mv(()=>{A.current&&Ee(A.current.value)},[A.current]);const{labelProps:Xt,inputProps:Ue,isInvalid:st,validationErrors:An,validationDetails:Nr,descriptionProps:Sn,errorMessageProps:Lt}=_6({...e,validationBehavior:U,autoCapitalize:e.autoCapitalize,value:me,"aria-label":e.label?e["aria-label"]:UR(e["aria-label"],e.placeholder),inputElementType:Ie?"textarea":"input",onChange:Ee},A);we&&(delete Ue.value,delete Ue.onChange);const{isFocusVisible:zt,isFocused:ar,focusProps:no}=th({autoFocus:W,isTextInput:!0}),{isHovered:Yn,hoverProps:pe}=kf({isDisabled:!!e?.isDisabled}),{isHovered:ke,hoverProps:je}=kf({isDisabled:!!e?.isDisabled}),{focusProps:rt,isFocusVisible:ct}=th(),{focusWithinProps:Qt}=hv({onFocusWithinChange:q}),{pressProps:ur}=fv({isDisabled:!!e?.isDisabled||!!e?.isReadOnly,onPress:bt}),en=O==="invalid"||st,ln=t5({labelPlacement:e.labelPlacement,label:P}),wr=typeof m.errorMessage=="function"?m.errorMessage({isInvalid:en,validationErrors:An,validationDetails:Nr}):m.errorMessage||An?.join(" "),Mt=!!re||e.isClearable,Xn=!!P||!!R||!!wr,tn=!!m.placeholder,rl=!!P,ds=!!R||!!wr,oi=ln==="outside-left",si=ln==="outside-top",ia=ln==="outside"||oi||si,Pu=ln==="inside",ps=A.current?(!A.current.value||A.current.value===""||!me||me==="")&&tn:!1,Fr=!!M,oa=ia?oi||si||tn||ln==="outside"&&Fr:!1,sa=ln==="outside"&&!tn&&!Fr,Ht=k.useMemo(()=>ck({...g,isInvalid:en,labelPlacement:ln,isClearable:Mt,disableAnimation:se}),[Zs(g),en,ln,Mt,Fr,se]),hs=k.useCallback((Ye={})=>({ref:j,className:Ht.base({class:Rt}),"data-slot":"base","data-filled":Me(Te||tn||Fr||ps||we),"data-filled-within":Me(tt||tn||Fr||ps||we),"data-focus-within":Me(J),"data-focus-visible":Me(zt),"data-readonly":Me(e.isReadOnly),"data-focus":Me(ar),"data-hover":Me(Yn||ke),"data-required":Me(e.isRequired),"data-invalid":Me(en),"data-disabled":Me(e.isDisabled),"data-has-elements":Me(Xn),"data-has-helper":Me(ds),"data-has-label":Me(rl),"data-has-value":Me(!ps),"data-hidden":Me(yt),...Qt,...Ye}),[Ht,Rt,Te,ar,Yn,ke,en,ds,rl,Xn,ps,Fr,J,zt,tt,tn,Qt,yt,e.isReadOnly,e.isRequired,e.isDisabled]),ms=k.useCallback((Ye={})=>({"data-slot":"label",className:Ht.label({class:B?.label}),...hn(Xt,je,Ye)}),[Ht,ke,Xt,B?.label]),Ao=k.useCallback(Ye=>{Ye.key==="Escape"&&me&&(Mt||re)&&!e.isReadOnly&&(Ee(""),re?.())},[me,Ee,re,Mt,e.isReadOnly]),la=k.useCallback((Ye={})=>({"data-slot":"input","data-filled":Me(Te),"data-filled-within":Me(tt),"data-has-start-content":Me(Fr),"data-has-end-content":Me(!!Z),"data-type":S,className:Ht.input({class:pn(B?.input,Te?"is-filled":"",Ie?"pe-0":"",S==="password"?"[&::-ms-reveal]:hidden":"")}),...hn(no,Ue,gf(G,{enabled:!0,labelable:!0,omitEventNames:new Set(Object.keys(Ue))}),Ye),"aria-readonly":Me(e.isReadOnly),onChange:mf(Ue.onChange,ae),onKeyDown:mf(Ue.onKeyDown,Ye.onKeyDown,Ao),ref:A}),[Ht,me,no,Ue,G,Te,tt,Fr,Z,B?.input,e.isReadOnly,e.isRequired,ae,Ao]),gs=k.useCallback((Ye={})=>({ref:oe,"data-slot":"input-wrapper","data-hover":Me(Yn||ke),"data-focus-visible":Me(zt),"data-focus":Me(ar),className:Ht.inputWrapper({class:pn(B?.inputWrapper,Te?"is-filled":"")}),...hn(Ye,pe),onClick:ro=>{A.current&&ro.currentTarget===ro.target&&A.current.focus()},style:{cursor:"text",...Ye.style}}),[Ht,Yn,ke,zt,ar,me,B?.inputWrapper]),il=k.useCallback((Ye={})=>({...Ye,ref:z,"data-slot":"inner-wrapper",onClick:ro=>{A.current&&ro.currentTarget===ro.target&&A.current.focus()},className:Ht.innerWrapper({class:pn(B?.innerWrapper,Ye?.className)})}),[Ht,B?.innerWrapper]),ol=k.useCallback((Ye={})=>({...Ye,"data-slot":"main-wrapper",className:Ht.mainWrapper({class:pn(B?.mainWrapper,Ye?.className)})}),[Ht,B?.mainWrapper]),aa=k.useCallback((Ye={})=>({...Ye,"data-slot":"helper-wrapper",className:Ht.helperWrapper({class:pn(B?.helperWrapper,Ye?.className)})}),[Ht,B?.helperWrapper]),zf=k.useCallback((Ye={})=>({...Ye,...Sn,"data-slot":"description",className:Ht.description({class:pn(B?.description,Ye?.className)})}),[Ht,B?.description]),Bf=k.useCallback((Ye={})=>({...Ye,...Lt,"data-slot":"error-message",className:Ht.errorMessage({class:pn(B?.errorMessage,Ye?.className)})}),[Ht,Lt,B?.errorMessage]),jf=k.useCallback((Ye={})=>({...Ye,type:"button",tabIndex:-1,disabled:e.isDisabled,"aria-label":"clear input","data-slot":"clear-button","data-focus-visible":Me(ct),className:Ht.clearButton({class:pn(B?.clearButton,Ye?.className)}),...hn(ur,rt)}),[Ht,ct,ur,rt,B?.clearButton]);return{Component:K,classNames:B,domRef:A,label:P,description:R,startContent:M,endContent:Z,labelPlacement:ln,isClearable:Mt,hasHelper:ds,hasStartContent:Fr,isLabelOutside:oa,isOutsideLeft:oi,isOutsideTop:si,isLabelOutsideAsPlaceholder:sa,shouldLabelBeOutside:ia,shouldLabelBeInside:Pu,hasPlaceholder:tn,isInvalid:en,errorMessage:wr,getBaseProps:hs,getLabelProps:ms,getInputProps:la,getMainWrapperProps:ol,getInputWrapperProps:gs,getInnerWrapperProps:il,getHelperWrapperProps:aa,getDescriptionProps:zf,getErrorMessageProps:Bf,getClearButtonProps:jf}}function Tb(){return Tb=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{Component:d,label:h,description:m,startContent:g,endContent:b,hasHelper:x,shouldLabelBeOutside:S,shouldLabelBeInside:P,isInvalid:_,errorMessage:T,getBaseProps:R,getLabelProps:L,getInputProps:B,getInnerWrapperProps:W,getInputWrapperProps:M,getHelperWrapperProps:Z,getDescriptionProps:re,getErrorMessageProps:ae,isClearable:O,getClearButtonProps:U}=I6({...a,ref:c,isMultiline:!0}),[X,ne]=k.useState(t>1),[G,fe]=k.useState(!1),J=h?F.jsx("label",{...L(),children:h}):null,q=B(),K=(me,Ee)=>{if(t===1&&ne(me>=Ee.rowHeight*2),n>t){const we=me>=n*Ee.rowHeight;fe(we)}s?.(me,Ee)},se=i?F.jsx("textarea",{...q,style:hn(q.style,e??{})}):F.jsx(H6,{...q,cacheMeasurements:r,"data-hide-scroll":Me(!G),maxRows:n,minRows:t,style:hn(q.style,e??{}),onHeightChange:K}),A=k.useMemo(()=>O?F.jsx("button",{...U(),children:F.jsx(TO,{})}):null,[O,U]),j=k.useMemo(()=>g||b?F.jsxs("div",{...W(),children:[g,se,b]}):F.jsx("div",{...W(),children:se}),[g,q,b,W]),oe=_&&T,z=oe||m;return F.jsxs(d,{...R(),children:[S?J:null,F.jsxs("div",{...M(),"data-has-multiple-rows":Me(X),children:[P?J:null,j,A]}),x&&z?F.jsx("div",{...Z(),children:oe?F.jsx("div",{...ae(),children:T}):F.jsx("div",{...re(),children:m})}):null]})});B_.displayName="HeroUI.Textarea";var G6=B_;function q6(e,t){let{role:n="dialog"}=e,r=O0();r=e["aria-label"]?void 0:r;let i=k.useRef(!1);return k.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){bu(t.current);let s=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),bu(t.current)),i.current=!1)},500);return()=>{clearTimeout(s)}}},[t]),o_(),{dialogProps:{..._f(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:s=>{i.current&&s.stopPropagation()}},titleProps:{id:r}}}function Y6(e){var t,n;const r=Pi(),[i,s]=ea(e,dk.variantKeys),{ref:a,as:c,src:d,className:h,classNames:m,loading:g,isBlurred:b,fallbackSrc:x,isLoading:S,disableSkeleton:P=!!x,removeWrapper:_=!1,onError:T,onLoad:R,srcSet:L,sizes:B,crossOrigin:W,...M}=i,Z=XO({src:d,loading:g,onError:T,onLoad:R,ignoreFallback:!1,srcSet:L,sizes:B,crossOrigin:W,shouldBypassImageLoad:c!==void 0}),re=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,ae=Z==="loaded"&&!S,O=Z==="loading"||S,U=e.isZoomed,X=c||"img",ne=Xi(a),{w:G,h:fe}=k.useMemo(()=>({w:i.width?typeof i.width=="number"?`${i.width}px`:i.width:"fit-content",h:i.height?typeof i.height=="number"?`${i.height}px`:i.height:"auto"}),[i?.width,i?.height]),J=(!d||!ae)&&!!x,q=O&&!P,K=k.useMemo(()=>dk({...s,disableAnimation:re,showSkeleton:q}),[Zs(s),re,q]),se=pn(h,m?.img),A=(z={})=>{const me=pn(se,z?.className);return{src:d,ref:ne,"data-loaded":Me(ae),className:K.img({class:me}),loading:g,srcSet:L,sizes:B,crossOrigin:W,...M,style:{...M?.height&&{height:fe},...z.style,...M.style}}},j=k.useCallback(()=>{const z=J?{backgroundImage:`url(${x})`}:{};return{className:K.wrapper({class:m?.wrapper}),style:{...z,maxWidth:G}}},[K,J,x,m?.wrapper,G]),oe=k.useCallback(()=>({src:d,"aria-hidden":Me(!0),className:K.blurredImg({class:m?.blurredImg})}),[K,d,m?.blurredImg]);return{Component:X,domRef:ne,slots:K,classNames:m,isBlurred:b,disableSkeleton:P,fallbackSrc:x,removeWrapper:_,isZoomed:U,isLoading:O,getImgProps:A,getWrapperProps:j,getBlurredImgProps:oe}}var j_=Ti((e,t)=>{const{Component:n,domRef:r,slots:i,classNames:s,isBlurred:a,isZoomed:c,fallbackSrc:d,removeWrapper:h,disableSkeleton:m,getImgProps:g,getWrapperProps:b,getBlurredImgProps:x}=Y6({...e,ref:t}),S=F.jsx(n,{ref:r,...g()});if(h)return S;const P=F.jsx("div",{className:i.zoomedWrapper({class:s?.zoomedWrapper}),children:S});return a?F.jsxs("div",{...b(),children:[c?P:S,k.cloneElement(S,x())]}):c||!m||d?F.jsxs("div",{...b(),children:[" ",c?P:S]}):S});j_.displayName="HeroUI.Image";var f0=j_,[X6,V_]=tx({name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),U_=Ti((e,t)=>{const{as:n,children:r,className:i,...s}=e,{slots:a,classNames:c,bodyId:d,setBodyMounted:h}=V_(),m=Xi(t),g=n||"div";return k.useEffect(()=>(h(!0),()=>h(!1)),[h]),F.jsx(g,{ref:m,className:a.body({class:pn(c?.body,i)}),id:d,...s,children:r})});U_.displayName="HeroUI.ModalBody";var Q6=U_,J6={enter:{scale:"var(--scale-enter)",y:"var(--slide-enter)",opacity:1,willChange:"auto",transition:{scale:{duration:.4,ease:Fp.ease},opacity:{duration:.4,ease:Fp.ease},y:{type:"spring",bounce:0,duration:.6}}},exit:{scale:"var(--scale-exit)",y:"var(--slide-exit)",opacity:0,willChange:"transform",transition:{duration:.3,ease:Fp.ease}}},os=typeof document<"u"&&window.visualViewport,Z6=We.createContext(!1);function ez(){return!1}function tz(){return!0}function nz(e){return()=>{}}function rz(){return typeof We.useSyncExternalStore=="function"?We.useSyncExternalStore(nz,ez,tz):k.useContext(Z6)}function iz(){let e=rz(),[t,n]=k.useState(()=>e?{width:0,height:0}:Lk());return k.useEffect(()=>{let r=()=>{n(i=>{let s=Lk();return s.width===i.width&&s.height===i.height?i:s})};return os?os.addEventListener("resize",r):window.addEventListener("resize",r),()=>{os?os.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Lk(){return{width:os&&os?.width||window.innerWidth,height:os&&os?.height||window.innerHeight}}var Mk=()=>ta(()=>import("./index-MCoEOEoa.js"),[]).then(e=>e.default),K_=e=>{const{as:t,children:n,role:r="dialog",...i}=e,{Component:s,domRef:a,slots:c,classNames:d,motionProps:h,backdrop:m,closeButton:g,hideCloseButton:b,disableAnimation:x,getDialogProps:S,getBackdropProps:P,getCloseButtonProps:_,onClose:T}=V_(),R=t||s||"div",L=iz(),{dialogProps:B}=q6({role:r},a),W=k.isValidElement(g)?k.cloneElement(g,_()):F.jsx("button",{..._(),children:F.jsx(_O,{})}),M=k.useCallback(X=>{X.key==="Tab"&&X.nativeEvent.isComposing&&(X.stopPropagation(),X.preventDefault())},[]),Z=S(hn(B,i)),re=F.jsxs(R,{...Z,onKeyDown:mf(Z.onKeyDown,M),children:[F.jsx(JS,{onDismiss:T}),!b&&W,typeof n=="function"?n(T):n,F.jsx(JS,{onDismiss:T})]}),ae=k.useMemo(()=>m==="transparent"?null:x?F.jsx("div",{...P()}):F.jsx(wf,{features:Mk,children:F.jsx(Sf.div,{animate:"enter",exit:"exit",initial:"exit",variants:Ug.fade,...P()})}),[m,x,P]),O={"--visual-viewport-height":L.height+"px"},U=x?F.jsx("div",{className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",style:O,children:re}):F.jsx(wf,{features:Mk,children:F.jsx(Sf.div,{animate:"enter",className:c.wrapper({class:d?.wrapper}),"data-slot":"wrapper",exit:"exit",initial:"exit",variants:J6,...h,style:O,children:re})});return F.jsxs("div",{tabIndex:-1,children:[ae,U]})};K_.displayName="HeroUI.ModalContent";var oz=K_;function sz(e={shouldBlockScroll:!0},t,n){let{overlayProps:r,underlayProps:i}=F_({...e,isOpen:t.isOpen,onClose:t.close},n);return jF({isDisabled:!t.isOpen||!e.shouldBlockScroll}),o_(),k.useEffect(()=>{if(t.isOpen&&n.current)return JF([n.current])},[t.isOpen,n]),{modalProps:lr(r),underlayProps:i}}function lz(e){var t,n,r;const i=Pi(),[s,a]=ea(e,fk.variantKeys),{ref:c,as:d,className:h,classNames:m,isOpen:g,defaultOpen:b,onOpenChange:x,motionProps:S,closeButton:P,isDismissable:_=!0,hideCloseButton:T=!1,shouldBlockScroll:R=!0,portalContainer:L,isKeyboardDismissDisabled:B=!1,onClose:W,...M}=s,Z=d||"section",re=Xi(c),ae=k.useRef(null),[O,U]=k.useState(!1),[X,ne]=k.useState(!1),G=(n=(t=e.disableAnimation)!=null?t:i?.disableAnimation)!=null?n:!1,fe=k.useId(),J=k.useId(),q=k.useId(),K=N_({isOpen:g,defaultOpen:b,onOpenChange:Te=>{x?.(Te),Te||W?.()}}),{modalProps:se,underlayProps:A}=sz({isDismissable:_,shouldBlockScroll:R,isKeyboardDismissDisabled:B},K,re),{buttonProps:j}=T_({onPress:K.close},ae),{isFocusVisible:oe,focusProps:z}=th(),me=pn(m?.base,h),Ee=k.useMemo(()=>fk({...a,disableAnimation:G}),[Zs(a),G]),we=(Te={},tt=null)=>{var yt;return{ref:oE(tt,re),...hn(se,M,Te),className:Ee.base({class:pn(me,Te.className)}),id:fe,"data-open":Me(K.isOpen),"data-dismissable":Me(_),"aria-modal":Me(!0),"data-placement":(yt=e?.placement)!=null?yt:"right","aria-labelledby":O?J:void 0,"aria-describedby":X?q:void 0}},Be=k.useCallback((Te={})=>({className:Ee.backdrop({class:m?.backdrop}),...A,...Te}),[Ee,m,A]),Oe=()=>({role:"button",tabIndex:0,"aria-label":"Close","data-focus-visible":Me(oe),className:Ee.closeButton({class:m?.closeButton}),...hn(j,z)});return{Component:Z,slots:Ee,domRef:re,headerId:J,bodyId:q,motionProps:S,classNames:m,isDismissable:_,closeButton:P,hideCloseButton:T,portalContainer:L,shouldBlockScroll:R,backdrop:(r=e.backdrop)!=null?r:"opaque",isOpen:K.isOpen,onClose:K.close,disableAnimation:G,setBodyMounted:ne,setHeaderMounted:U,getDialogProps:we,getBackdropProps:Be,getCloseButtonProps:Oe}}var W_=Ti((e,t)=>{const{children:n,...r}=e,i=lz({...r,ref:t}),s=F.jsx(ZF,{portalContainer:i.portalContainer,children:n});return F.jsx(X6,{value:i,children:i.disableAnimation&&i.isOpen?s:F.jsx(Rf,{children:i.isOpen?s:null})})});W_.displayName="HeroUI.Modal";var az=W_;function uz(e={}){const{id:t,defaultOpen:n,isOpen:r,onClose:i,onOpen:s,onChange:a=()=>{}}=e,c=Pk(s),d=Pk(i),[h,m]=If(r,n||!1,a),g=k.useId(),b=t||g,x=r!==void 0,S=k.useCallback(()=>{x||m(!1),d?.()},[x,d]),P=k.useCallback(()=>{x||m(!0),c?.()},[x,c]),_=k.useCallback(()=>{(h?S:P)()},[h,P,S]);return{isOpen:!!h,onOpen:P,onClose:S,onOpenChange:_,isControlled:x,getButtonProps:(T={})=>({...T,"aria-expanded":h,"aria-controls":b,onClick:yf(T.onClick,_)}),getDisclosureProps:(T={})=>({...T,hidden:!h,id:b})}}function cz(e){var t,n;const r=Pi(),[i,s]=ea(e,uk.variantKeys),{as:a,children:c,isLoaded:d=!1,className:h,classNames:m,...g}=i,b=a||"div",x=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,S=k.useMemo(()=>uk({...s,disableAnimation:x}),[Zs(s),x,c]),P=pn(m?.base,h);return{Component:b,children:c,slots:S,classNames:m,getSkeletonProps:(R={})=>({"data-loaded":Me(d),className:S.base({class:pn(P,R?.className)}),...g}),getContentProps:(R={})=>({className:S.content({class:pn(m?.content,R?.className)})})}}var H_=Ti((e,t)=>{const{Component:n,children:r,getSkeletonProps:i,getContentProps:s}=cz({...e});return F.jsx(n,{ref:t,...i(),children:F.jsx("div",{...s(),children:r})})});H_.displayName="HeroUI.Skeleton";var fz=H_;function dz(e={}){const{domRef:t,isEnabled:n=!0,overflowCheck:r="vertical",visibility:i="auto",offset:s=0,onVisibilityChange:a,updateDeps:c=[]}=e,d=k.useRef(i);k.useEffect(()=>{const h=t?.current;if(!h||!n)return;const m=(x,S,P,_,T)=>{if(i==="auto"){const R=`${_}${KR(T)}Scroll`;S&&P?(h.dataset[R]="true",h.removeAttribute(`data-${_}-scroll`),h.removeAttribute(`data-${T}-scroll`)):(h.dataset[`${_}Scroll`]=S.toString(),h.dataset[`${T}Scroll`]=P.toString(),h.removeAttribute(`data-${_}-${T}-scroll`))}else{const R=S&&P?"both":S?_:P?T:"none";R!==d.current&&(a?.(R),d.current=R)}},g=()=>{var x,S;const P=[{type:"vertical",prefix:"top",suffix:"bottom"},{type:"horizontal",prefix:"left",suffix:"right"}],_=h.querySelector('ul[data-slot="list"]'),T=+((x=_?.getAttribute("data-virtual-scroll-height"))!=null?x:h.scrollHeight),R=+((S=_?.getAttribute("data-virtual-scroll-top"))!=null?S:h.scrollTop);for(const{type:L,prefix:B,suffix:W}of P)if(r===L||r==="both"){const M=L==="vertical"?R>s:h.scrollLeft>s,Z=L==="vertical"?R+h.clientHeight+s{["top","bottom","top-bottom","left","right","left-right"].forEach(x=>{h.removeAttribute(`data-${x}-scroll`)})};return g(),h.addEventListener("scroll",g,!0),i!=="auto"&&(b(),i==="both"?(h.dataset.topBottomScroll=String(r==="vertical"),h.dataset.leftRightScroll=String(r==="horizontal")):(h.dataset.topBottomScroll="false",h.dataset.leftRightScroll="false",["top","bottom","left","right"].forEach(x=>{h.dataset[`${x}Scroll`]=String(i===x)}))),()=>{h.removeEventListener("scroll",g,!0),b()}},[...c,n,i,r,a,t])}function pz(e){var t;const[n,r]=ea(e,ak.variantKeys),{ref:i,as:s,children:a,className:c,style:d,size:h=40,offset:m=0,visibility:g="auto",isEnabled:b=!0,onVisibilityChange:x,...S}=n,P=s||"div",_=Xi(i);dz({domRef:_,offset:m,visibility:g,isEnabled:b,onVisibilityChange:x,updateDeps:[a],overflowCheck:(t=e.orientation)!=null?t:"vertical"});const T=k.useMemo(()=>ak({...r,className:c}),[Zs(r),c]);return{Component:P,styles:T,domRef:_,children:a,getBaseProps:(L={})=>{var B;return{ref:_,className:T,"data-orientation":(B=e.orientation)!=null?B:"vertical",style:{"--scroll-shadow-size":`${h}px`,...d,...L.style},...S,...L}}}}var G_=Ti((e,t)=>{const{Component:n,children:r,getBaseProps:i}=pz({...e,ref:t});return F.jsx(n,{...i(),children:r})});G_.displayName="HeroUI.ScrollShadow";var q_=G_,Eo=(e=>(e.LIGHT="light",e.DARK="dark",e))(Eo||{});const Y_=k.createContext(null);function hz(){return window.matchMedia("(prefers-color-scheme: dark)").matches?Eo.DARK:Eo.LIGHT}function Dk(){const e=window.localStorage.getItem("theme");return e===Eo.DARK||e===Eo.LIGHT?e:hz()}function mz(e){return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}const gz=({children:e})=>{const t=k.useSyncExternalStore(mz,Dk,Dk);k.useEffect(()=>{document.documentElement.classList.toggle("dark",t===Eo.DARK)},[t]);const n=k.useCallback(i=>{window.localStorage.setItem("theme",i),window.dispatchEvent(new Event("storage"))},[]),r=k.useMemo(()=>({theme:t,setTheme:n}),[t,n]);return F.jsx(Y_.Provider,{value:r,children:e})},wi={Text:"text",Reference:"reference",StateUpdate:"state_update",MessageId:"message_id",ConversationId:"conversation_id",LiveUpdate:"live_update",FollowupMessages:"followup_messages",Image:"image"},WH={Like:"like",Dislike:"dislike"},vz={Start:"START"},pf={User:"user",Assistant:"assistant"};class X_{constructor(t={}){if(this.baseUrl=t.baseUrl??"",this.baseUrl.endsWith("/")&&(this.baseUrl=this.baseUrl.slice(0,-1)),!!this.baseUrl)try{new URL(this.baseUrl)}catch{throw new Error(`Invalid base URL: ${this.baseUrl}. Please provide a valid URL.`)}}getBaseUrl(){return this.baseUrl}_buildApiUrl(t){return`${this.baseUrl}${t}`}async _makeRequest(t,n={}){const i=await fetch(t,{...{headers:{"Content-Type":"application/json"}},...n});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i}async makeRequest(t,n){const{method:r="GET",body:i,headers:s={},...a}=n||{},c={method:r,headers:s,...a};return i&&r!=="GET"&&(c.body=typeof i=="string"?i:JSON.stringify(i)),(await this._makeRequest(this._buildApiUrl(t.toString()),c)).json()}makeStreamRequest(t,n,r,i){let s=!1;const a=async d=>{const h=d.body?.pipeThrough(new TextDecoderStream).getReader();if(!h)throw new Error("Response body is null");for(;!s&&!i?.aborted;)try{const{value:m,done:g}=await h.read();if(g){r.onClose?.();break}const b=m.split(` +`);for(const x of b)if(x.startsWith("data: "))try{const S=x.replace("data: ","").trim(),P=JSON.parse(S);await r.onMessage(P)}catch(S){console.error("Error parsing JSON:",S),await r.onError(new Error("Error processing server response"))}}catch(m){if(i?.aborted)return;console.error("Stream error:",m),await r.onError(new Error("Error reading stream"));break}},c=async()=>{try{const d=await fetch(this._buildApiUrl(t.toString()),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(n),signal:i});if(!d.ok)throw new Error(`HTTP error! status: ${d.status}`);await a(d)}catch(d){if(i?.aborted)return;console.error("Request error:",d);const h=d instanceof Error?d.message:"Error connecting to server";await r.onError(new Error(h))}};try{c()}catch(d){const h=d instanceof Error?d.message:"Failed to start stream";r.onError(new Error(h))}return()=>{s=!0}}}const Q_=k.createContext(null);function yz({children:e,...t}){const n=k.useMemo(()=>new X_(t),[t]),r=k.useMemo(()=>({client:n}),[n]);return F.jsx(Q_.Provider,{value:r,children:e})}function bz(){const e=k.useContext(Q_);if(!e)throw new Error("useRagbitsContext must be used within a RagbitsProvider");return e}function xz(e,t){const{client:n}=bz(),[r,i]=k.useState(null),[s,a]=k.useState(null),[c,d]=k.useState(!1),h=k.useRef(null),m=k.useCallback(()=>{if(!h.current)return null;h.current.abort(),h.current=null,d(!1)},[]),g=k.useCallback(async(x={})=>{h.current&&c&&h.current.abort();const S=new AbortController;h.current=S,d(!0),a(null);try{const _={...{...t,...x,headers:{...t?.headers,...x.headers}},signal:S.signal},T=await n.makeRequest(e,_);return S.signal.aborted||(i(T),h.current=null),T}catch(P){if(!S.signal.aborted){const _=P instanceof Error?P:new Error("API call failed");throw a(_),h.current=null,_}throw P}finally{S.signal.aborted||d(!1)}},[n,e,t,c]),b=k.useCallback(()=>{m(),i(null),a(null),d(!1)},[m]);return{data:r,error:s,isLoading:c,call:g,reset:b,abort:m}}const J_=Object.freeze({left:0,top:0,width:16,height:16}),Kg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Yx=Object.freeze({...J_,...Kg}),_b=Object.freeze({...Yx,body:"",hidden:!1});function wz(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Nk(e,t){const n=wz(e,t);for(const r in _b)r in Kg?r in e&&!(r in n)&&(n[r]=Kg[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Sz(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const c=r[a]&&r[a].parent,d=c&&s(c);d&&(i[a]=[c].concat(d))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(s),i}function kz(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function a(c){s=Nk(r[c]||i[c],s)}return a(t),n.forEach(a),Nk(e,s)}function Z_(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=Sz(e);for(const i in r){const s=r[i];s&&(t(i,kz(e,i,s)),n.push(i))}return n}const Cz={provider:"",aliases:{},not_found:{},...J_};function d0(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function e2(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!d0(e,Cz))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i||typeof s.body!="string"||!d0(s,_b))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!d0(s,_b))return null}return t}const t2=/^[a-z0-9]+(-[a-z0-9]+)*$/,gv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),d=i.pop(),h={provider:i.length>0?i[0]:r,prefix:d,name:c};return t&&!Pg(h)?null:h}const s=i[0],a=s.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!Pg(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!Pg(c,n)?null:c}return null},Pg=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Fk=Object.create(null);function Ez(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Cf(e,t){const n=Fk[e]||(Fk[e]=Object.create(null));return n[t]||(n[t]=Ez(e,t))}function n2(e,t){return e2(t)?Z_(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function Pz(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let rh=!1;function r2(e){return typeof e=="boolean"&&(rh=e),rh}function Ok(e){const t=typeof e=="string"?gv(e,!0,rh):e;if(t){const n=Cf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Tz(e,t){const n=gv(e,!0,rh);if(!n)return!1;const r=Cf(n.provider,n.prefix);return t?Pz(r,n.name,t):(r.missing.add(n.name),!0)}function _z(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),rh&&!t&&!e.prefix){let i=!1;return e2(e)&&(e.prefix="",Z_(e,(s,a)=>{Tz(s,a)&&(i=!0)})),i}const n=e.prefix;if(!Pg({prefix:n,name:"a"}))return!1;const r=Cf(t,n);return!!n2(r,e)}const i2=Object.freeze({width:null,height:null}),o2=Object.freeze({...i2,...Kg}),Iz=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$z=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function zk(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Iz);if(r===null||!r.length)return e;const i=[];let s=r.shift(),a=$z.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}function Az(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),s=e.indexOf("",s);if(a===-1)break;n+=e.slice(i+1,s).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function Rz(e,t){return e?""+e+""+t:t}function Lz(e,t,n){const r=Az(e);return Rz(r.defs,t+r.content+n)}const Mz=e=>e==="unset"||e==="undefined"||e==="none";function Dz(e,t){const n={...Yx,...e},r={...o2,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(P=>{const _=[],T=P.hFlip,R=P.vFlip;let L=P.rotate;T?R?L+=2:(_.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),_.push("scale(-1 1)"),i.top=i.left=0):R&&(_.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),_.push("scale(1 -1)"),i.top=i.left=0);let B;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:B=i.height/2+i.top,_.unshift("rotate(90 "+B.toString()+" "+B.toString()+")");break;case 2:_.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:B=i.width/2+i.left,_.unshift("rotate(-90 "+B.toString()+" "+B.toString()+")");break}L%2===1&&(i.left!==i.top&&(B=i.left,i.left=i.top,i.top=B),i.width!==i.height&&(B=i.width,i.width=i.height,i.height=B)),_.length&&(s=Lz(s,'',""))});const a=r.width,c=r.height,d=i.width,h=i.height;let m,g;a===null?(g=c===null?"1em":c==="auto"?h:c,m=zk(g,d/h)):(m=a==="auto"?d:a,g=c===null?zk(m,h/d):c==="auto"?h:c);const b={},x=(P,_)=>{Mz(_)||(b[P]=_.toString())};x("width",m),x("height",g);const S=[i.left,i.top,d,h];return b.viewBox=S.join(" "),{attributes:b,viewBox:S,body:s}}const Nz=/\sid="(\S+)"/g,Fz="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Oz=0;function zz(e,t=Fz){const n=[];let r;for(;r=Nz.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(Oz++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const Ib=Object.create(null);function Bz(e,t){Ib[e]=t}function $b(e){return Ib[e]||Ib[""]}function Xx(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Qx=Object.create(null),vp=["https://api.simplesvg.com","https://api.unisvg.com"],Tg=[];for(;vp.length>0;)vp.length===1||Math.random()>.5?Tg.push(vp.shift()):Tg.push(vp.pop());Qx[""]=Xx({resources:["https://api.iconify.design"].concat(Tg)});function jz(e,t){const n=Xx(t);return n===null?!1:(Qx[e]=n,!0)}function Jx(e){return Qx[e]}const Vz=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Bk=Vz();function Uz(e,t){const n=Jx(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function Kz(e){return e===404}const Wz=(e,t,n)=>{const r=[],i=Uz(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,h)=>{c+=d.length+1,c>=i&&h>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},c=d.length),a.icons.push(d)}),r.push(a),r};function Hz(e){if(typeof e=="string"){const t=Jx(e);if(t)return t.path}return"/"}const Gz=(e,t,n)=>{if(!Bk){n("abort",424);return}let r=Hz(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});r+=s+".json?"+d.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;Bk(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(Kz(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},qz={prepare:Wz,send:Gz};function Yz(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,c=i.name,d=n[s]||(n[s]=Object.create(null)),h=d[a]||(d[a]=Cf(s,a));let m;c in h.icons?m=t.loaded:a===""||h.missing.has(c)?m=t.missing:m=t.pending;const g={provider:s,prefix:a,name:c};m.push(g)}),t}function s2(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function Xz(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const a=s.icons,c=a.pending.length;a.pending=a.pending.filter(d=>{if(d.prefix!==i)return!0;const h=d.name;if(e.icons[h])a.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))a.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||s2([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let Qz=0;function Jz(e,t,n){const r=Qz++,i=s2.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function Zz(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?gv(i,t,n):i;s&&r.push(s)}),r}var e8={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function t8(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let M=e.resources.slice(0);for(a=[];M.length>1;){const Z=Math.floor(Math.random()*M.length);a.push(M[Z]),M=M.slice(0,Z).concat(M.slice(Z+1))}a=a.concat(M)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let d="pending",h=0,m,g=null,b=[],x=[];typeof r=="function"&&x.push(r);function S(){g&&(clearTimeout(g),g=null)}function P(){d==="pending"&&(d="aborted"),S(),b.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),b=[]}function _(M,Z){Z&&(x=[]),typeof M=="function"&&x.push(M)}function T(){return{startTime:c,payload:t,status:d,queriesSent:h,queriesPending:b.length,subscribe:_,abort:P}}function R(){d="failed",x.forEach(M=>{M(void 0,m)})}function L(){b.forEach(M=>{M.status==="pending"&&(M.status="aborted")}),b=[]}function B(M,Z,re){const ae=Z!=="success";switch(b=b.filter(O=>O!==M),d){case"pending":break;case"failed":if(ae||!e.dataAfterTimeout)return;break;default:return}if(Z==="abort"){m=re,R();return}if(ae){m=re,b.length||(a.length?W():R());return}if(S(),L(),!e.random){const O=e.resources.indexOf(M.resource);O!==-1&&O!==e.index&&(e.index=O)}d="completed",x.forEach(O=>{O(re)})}function W(){if(d!=="pending")return;S();const M=a.shift();if(M===void 0){if(b.length){g=setTimeout(()=>{S(),d==="pending"&&(L(),R())},e.timeout);return}R();return}const Z={status:"pending",resource:M,callback:(re,ae)=>{B(Z,re,ae)}};b.push(Z),h++,g=setTimeout(W,e.rotate),n(M,t,Z.callback)}return setTimeout(W),T}function l2(e){const t={...e8,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,d,h){const m=t8(t,c,d,(g,b)=>{r(),h&&h(g,b)});return n.push(m),m}function s(c){return n.find(d=>c(d))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function jk(){}const p0=Object.create(null);function n8(e){if(!p0[e]){const t=Jx(e);if(!t)return;const n=l2(t),r={config:t,redundancy:n};p0[e]=r}return p0[e]}function r8(e,t,n){let r,i;if(typeof e=="string"){const s=$b(e);if(!s)return n(void 0,424),jk;i=s.send;const a=n8(e);a&&(r=a.redundancy)}else{const s=Xx(e);if(s){r=l2(s);const a=e.resources?e.resources[0]:"",c=$b(a);c&&(i=c.send)}}return!r||!i?(n(void 0,424),jk):r.query(t,i,n)().abort}function Vk(){}function i8(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Xz(e)}))}function o8(e){const t=[],n=[];return e.forEach(r=>{(r.match(t2)?t:n).push(r)}),{valid:t,invalid:n}}function yp(e,t,n){function r(){const i=e.pendingIcons;t.forEach(s=>{i&&i.delete(s),e.icons[s]||e.missing.add(s)})}if(n&&typeof n=="object")try{if(!n2(e,n).length){r();return}}catch(i){console.error(i)}r(),i8(e)}function Uk(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function s8(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const s=e.loadIcon;if(e.loadIcons&&(i.length>1||!s)){Uk(e.loadIcons(i,r,n),m=>{yp(e,i,m)});return}if(s){i.forEach(m=>{const g=s(m,r,n);Uk(g,b=>{const x=b?{prefix:r,icons:{[m]:b}}:null;yp(e,[m],x)})});return}const{valid:a,invalid:c}=o8(i);if(c.length&&yp(e,c,null),!a.length)return;const d=r.match(t2)?$b(n):null;if(!d){yp(e,a,null);return}d.prepare(n,r,a).forEach(m=>{r8(n,m,g=>{yp(e,m.icons,g)})})}))}const a2=(e,t)=>{const n=Zz(e,!0,r2()),r=Yz(n);if(!r.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(r.loaded,r.missing,r.pending,Vk)}),()=>{d=!1}}const i=Object.create(null),s=[];let a,c;return r.pending.forEach(d=>{const{provider:h,prefix:m}=d;if(m===c&&h===a)return;a=h,c=m,s.push(Cf(h,m));const g=i[h]||(i[h]=Object.create(null));g[m]||(g[m]=[])}),r.pending.forEach(d=>{const{provider:h,prefix:m,name:g}=d,b=Cf(h,m),x=b.pendingIcons||(b.pendingIcons=new Set);x.has(g)||(x.add(g),i[h][m].push(g))}),s.forEach(d=>{const h=i[d.provider][d.prefix];h.length&&s8(d,h)}),t?Jz(t,r,s):Vk};function l8(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in i2?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const a8=/[\s,]+/;function u8(e,t){t.split(a8).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function c8(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function f8(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function d8(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function p8(e){return"data:image/svg+xml,"+d8(e)}function h8(e){return'url("'+p8(e)+'")'}let Op;function m8(){try{Op=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Op=null}}function g8(e){return Op===void 0&&m8(),Op?Op.createHTML(e):e}const u2={...o2,inline:!1},v8={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},y8={display:"inline-block"},Ab={backgroundColor:"currentColor"},c2={backgroundColor:"transparent"},Kk={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Wk={WebkitMask:Ab,mask:Ab,background:c2};for(const e in Wk){const t=Wk[e];for(const n in Kk)t[e+n]=Kk[n]}const b8={...u2,inline:!0};function Hk(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const x8=(e,t,n)=>{const r=t.inline?b8:u2,i=l8(r,t),s=t.mode||"svg",a={},c=t.style||{},d={...s==="svg"?v8:{}};if(n){const _=gv(n,!1,!0);if(_){const T=["iconify"],R=["provider","prefix"];for(const L of R)_[L]&&T.push("iconify--"+_[L]);d.className=T.join(" ")}}for(let _ in t){const T=t[_];if(T!==void 0)switch(_){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=T;break;case"className":d[_]=(d[_]?d[_]+" ":"")+T;break;case"inline":case"hFlip":case"vFlip":i[_]=T===!0||T==="true"||T===1;break;case"flip":typeof T=="string"&&u8(i,T);break;case"color":a.color=T;break;case"rotate":typeof T=="string"?i[_]=c8(T):typeof T=="number"&&(i[_]=T);break;case"ariaHidden":case"aria-hidden":T!==!0&&T!=="true"&&delete d["aria-hidden"];break;default:r[_]===void 0&&(d[_]=T)}}const h=Dz(e,i),m=h.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),s==="svg"){d.style={...a,...c},Object.assign(d,m);let _=0,T=t.id;return typeof T=="string"&&(T=T.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:g8(zz(h.body,T?()=>T+"ID"+_++:"iconifyReact"))},k.createElement("svg",d)}const{body:g,width:b,height:x}=e,S=s==="mask"||(s==="bg"?!1:g.indexOf("currentColor")!==-1),P=f8(g,{...m,width:b+"",height:x+""});return d.style={...a,"--svg":h8(P),width:Hk(m.width),height:Hk(m.height),...y8,...S?Ab:c2,...c},k.createElement("span",d)};r2(!0);Bz("",qz);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!_z(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;jz(n,i)||console.error(r)}catch{console.error(r)}}}}function f2(e){const[t,n]=k.useState(!!e.ssr),[r,i]=k.useState({});function s(x){if(x){const S=e.icon;if(typeof S=="object")return{name:"",data:S};const P=Ok(S);if(P)return{name:S,data:P}}return{name:""}}const[a,c]=k.useState(s(!!e.ssr));function d(){const x=r.callback;x&&(x(),i({}))}function h(x){if(JSON.stringify(a)!==JSON.stringify(x))return d(),c(x),!0}function m(){var x;const S=e.icon;if(typeof S=="object"){h({name:"",data:S});return}const P=Ok(S);if(h({name:S,data:P}))if(P===void 0){const _=a2([S],m);i({callback:_})}else P&&((x=e.onLoad)===null||x===void 0||x.call(e,S))}k.useEffect(()=>(n(!0),d),[]),k.useEffect(()=>{t&&m()},[e.icon,t]);const{name:g,data:b}=a;return b?x8({...Yx,...b},e,g):e.children?e.children:e.fallback?e.fallback:k.createElement("span",{})}const Si=k.forwardRef((e,t)=>f2({...e,_ref:t}));k.forwardRef((e,t)=>f2({inline:!0,...e,_ref:t}));var Ip={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */var S8=Ip.exports,Yk;function k8(){return Yk||(Yk=1,function(e,t){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",g=1,b=2,x=4,S=1,P=2,_=1,T=2,R=4,L=8,B=16,W=32,M=64,Z=128,re=256,ae=512,O=30,U="...",X=800,ne=16,G=1,fe=2,J=3,q=1/0,K=9007199254740991,se=17976931348623157e292,A=NaN,j=4294967295,oe=j-1,z=j>>>1,me=[["ary",Z],["bind",_],["bindKey",T],["curry",L],["curryRight",B],["flip",ae],["partial",W],["partialRight",M],["rearg",re]],Ee="[object Arguments]",we="[object Array]",Be="[object AsyncFunction]",Oe="[object Boolean]",Te="[object Date]",tt="[object DOMException]",yt="[object Error]",Ie="[object Function]",Rt="[object GeneratorFunction]",bt="[object Map]",Xt="[object Number]",Ue="[object Null]",st="[object Object]",An="[object Promise]",Fr="[object Proxy]",Sn="[object RegExp]",Lt="[object Set]",zt="[object String]",ar="[object Symbol]",no="[object Undefined]",Yn="[object WeakMap]",pe="[object WeakSet]",ke="[object ArrayBuffer]",je="[object DataView]",rt="[object Float32Array]",ct="[object Float64Array]",Qt="[object Int8Array]",ur="[object Int16Array]",en="[object Int32Array]",ln="[object Uint8Array]",wr="[object Uint8ClampedArray]",Mt="[object Uint16Array]",Xn="[object Uint32Array]",tn=/\b__p \+= '';/g,rl=/\b(__p \+=) '' \+/g,ds=/(__e\(.*?\)|\b__t\)) \+\n'';/g,si=/&(?:amp|lt|gt|quot|#39);/g,li=/[&<>"']/g,oa=RegExp(si.source),Tu=RegExp(li.source),ps=/<%-([\s\S]+?)%>/g,Or=/<%([\s\S]+?)%>/g,sa=/<%=([\s\S]+?)%>/g,la=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ht=/^\w*$/,hs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ms=/[\\^$.*+?()[\]{}|]/g,Ao=RegExp(ms.source),aa=/^\s+/,gs=/\s/,il=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ol=/\{\n\/\* \[wrapped with (.+)\] \*/,ua=/,? & /,zf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bf=/[()=,{}\[\]\/\s]/,jf=/\\(\\)?/g,Ye=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ro=/\w*$/,Sh=/^[-+]0x[0-9a-f]+$/i,Av=/^0b[01]+$/i,kh=/^\[object .+?Constructor\]$/,Ch=/^0o[0-7]+$/i,Eh=/^(?:0|[1-9]\d*)$/,Ph=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_u=/($^)/,Rv=/['\n\r\u2028\u2029\\]/g,Bt="\\ud800-\\udfff",Lv="\\u0300-\\u036f",Vf="\\ufe20-\\ufe2f",Th="\\u20d0-\\u20ff",ca=Lv+Vf+Th,_h="\\u2700-\\u27bf",Uf="a-z\\xdf-\\xf6\\xf8-\\xff",Iu="\\xac\\xb1\\xd7\\xf7",_i="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mv="\\u2000-\\u206f",ai=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ih="A-Z\\xc0-\\xd6\\xd8-\\xde",$h="\\ufe0e\\ufe0f",Ah=Iu+_i+Mv+ai,sl="['’]",$u="["+Bt+"]",ll="["+Ah+"]",vs="["+ca+"]",Rh="\\d+",Dv="["+_h+"]",Au="["+Uf+"]",Kf="[^"+Bt+Ah+Rh+_h+Uf+Ih+"]",fa="\\ud83c[\\udffb-\\udfff]",da="(?:"+vs+"|"+fa+")",Lh="[^"+Bt+"]",pa="(?:\\ud83c[\\udde6-\\uddff]){2}",Ct="[\\ud800-\\udbff][\\udc00-\\udfff]",ys="["+Ih+"]",Wf="\\u200d",Ru="(?:"+Au+"|"+Kf+")",Mh="(?:"+ys+"|"+Kf+")",Hf="(?:"+sl+"(?:d|ll|m|re|s|t|ve))?",Gf="(?:"+sl+"(?:D|LL|M|RE|S|T|VE))?",Lu=da+"?",ha="["+$h+"]?",Ro="(?:"+Wf+"(?:"+[Lh,pa,Ct].join("|")+")"+ha+Lu+")*",Lo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",al=ha+Lu+Ro,ma="(?:"+[Dv,pa,Ct].join("|")+")"+al,Do="(?:"+[Lh+vs+"?",vs,pa,Ct,$u].join("|")+")",Nv=RegExp(sl,"g"),Dh=RegExp(vs,"g"),bs=RegExp(fa+"(?="+fa+")|"+Do+al,"g"),Fv=RegExp([ys+"?"+Au+"+"+Hf+"(?="+[ll,ys,"$"].join("|")+")",Mh+"+"+Gf+"(?="+[ll,ys+Ru,"$"].join("|")+")",ys+"?"+Ru+"+"+Hf,ys+"+"+Gf,Mo,Lo,Rh,ma].join("|"),"g"),Nh=RegExp("["+Wf+Bt+ca+$h+"]"),Mu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fh=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ov=-1,Pt={};Pt[rt]=Pt[ct]=Pt[Qt]=Pt[ur]=Pt[en]=Pt[ln]=Pt[wr]=Pt[Mt]=Pt[Xn]=!0,Pt[Ee]=Pt[we]=Pt[ke]=Pt[Oe]=Pt[je]=Pt[Te]=Pt[yt]=Pt[Ie]=Pt[bt]=Pt[Xt]=Pt[st]=Pt[Sn]=Pt[Lt]=Pt[zt]=Pt[Yn]=!1;var Et={};Et[Ee]=Et[we]=Et[ke]=Et[je]=Et[Oe]=Et[Te]=Et[rt]=Et[ct]=Et[Qt]=Et[ur]=Et[en]=Et[bt]=Et[Xt]=Et[st]=Et[Sn]=Et[Lt]=Et[zt]=Et[ar]=Et[ln]=Et[wr]=Et[Mt]=Et[Xn]=!0,Et[yt]=Et[Ie]=Et[Yn]=!1;var ul={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Du={"&":"&","<":"<",">":">",'"':""","'":"'"},zv={"&":"&","<":"<",">":">",""":'"',"'":"'"},Bv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qf=parseFloat,Nu=parseInt,Fu=typeof Xm=="object"&&Xm&&Xm.Object===Object&&Xm,Oh=typeof self=="object"&&self&&self.Object===Object&&self,jt=Fu||Oh||Function("return this")(),ga=t&&!t.nodeType&&t,Ii=ga&&!0&&e&&!e.nodeType&&e,Yf=Ii&&Ii.exports===ga,cl=Yf&&Fu.process,Qn=function(){try{var te=Ii&&Ii.require&&Ii.require("util").types;return te||cl&&cl.binding&&cl.binding("util")}catch{}}(),Xf=Qn&&Qn.isArrayBuffer,cr=Qn&&Qn.isDate,xs=Qn&&Qn.isMap,Ou=Qn&&Qn.isRegExp,fl=Qn&&Qn.isSet,zh=Qn&&Qn.isTypedArray;function Jn(te,he,ce){switch(ce.length){case 0:return te.call(he);case 1:return te.call(he,ce[0]);case 2:return te.call(he,ce[0],ce[1]);case 3:return te.call(he,ce[0],ce[1],ce[2])}return te.apply(he,ce)}function Qf(te,he,ce,$e){for(var nt=-1,xt=te==null?0:te.length;++nt-1}function Zf(te,he,ce){for(var $e=-1,nt=te==null?0:te.length;++$e-1;);return ce}function sd(te,he){for(var ce=te.length;ce--&&dl(he,te[ce],0)>-1;);return ce}function Gh(te,he){for(var ce=te.length,$e=0;ce--;)te[ce]===he&&++$e;return $e}var qh=Vu(ul),Yh=Vu(Du);function Xh(te){return"\\"+Bv[te]}function pl(te,he){return te==null?n:te[he]}function hl(te){return Nh.test(te)}function Hv(te){return Mu.test(te)}function Gv(te){for(var he,ce=[];!(he=te.next()).done;)ce.push(he.value);return ce}function Uu(te){var he=-1,ce=Array(te.size);return te.forEach(function($e,nt){ce[++he]=[nt,$e]}),ce}function ld(te,he){return function(ce){return te(he(ce))}}function zr(te,he){for(var ce=-1,$e=te.length,nt=0,xt=[];++ce<$e;){var an=te[ce];(an===he||an===m)&&(te[ce]=m,xt[nt++]=ce)}return xt}function Oo(te){var he=-1,ce=Array(te.size);return te.forEach(function($e){ce[++he]=$e}),ce}function qv(te){var he=-1,ce=Array(te.size);return te.forEach(function($e){ce[++he]=[$e,$e]}),ce}function Ku(te,he,ce){for(var $e=ce-1,nt=te.length;++$e-1}function lm(u,f){var y=this.__data__,E=Un(y,u);return E<0?(++this.size,y.push([u,f])):y[E][1]=f,this}Zn.prototype.clear=El,Zn.prototype.delete=pr,Zn.prototype.get=rc,Zn.prototype.has=sm,Zn.prototype.set=lm;function jr(u){var f=-1,y=u==null?0:u.length;for(this.clear();++f=f?u:f)),u}function hr(u,f,y,E,I,N){var H,Q=f&g,ie=f&b,ge=f&x;if(y&&(H=I?y(u,E,I,N):y(u)),H!==n)return H;if(!on(u))return u;var ve=ot(u);if(ve){if(H=Wa(u),!Q)return er(u,H)}else{var xe=Mn(u),_e=xe==Ie||xe==Rt;if(Vl(u))return Id(u,Q);if(xe==st||xe==Ee||_e&&!I){if(H=ie||_e?{}:Dn(u),!Q)return ie?ty(u,ci(H,u)):xc(u,Ft(H,u))}else{if(!Et[xe])return I?u:{};H=ny(u,xe,Q)}}N||(N=new Vn);var Ve=N.get(u);if(Ve)return Ve;N.set(u,H),Mw(u)?u.forEach(function(Je){H.add(hr(Je,f,y,Je,u,N))}):Rw(u)&&u.forEach(function(Je,pt){H.set(pt,hr(Je,f,y,pt,u,N))});var Qe=ge?ie?Va:ja:ie?Jr:Hn,ft=ve?n:Qe(u);return On(ft||u,function(Je,pt){ft&&(pt=Je,Je=u[pt]),_s(H,pt,hr(Je,f,y,pt,u,N))}),H}function fm(u){var f=Hn(u);return function(y){return Ia(y,u,f)}}function Ia(u,f,y){var E=y.length;if(u==null)return!E;for(u=Tt(u);E--;){var I=y[E],N=f[I],H=u[I];if(H===n&&!(I in u)||!N(H))return!1}return!0}function md(u,f,y){if(typeof u!="function")throw new Br(a);return zl(function(){u.apply(n,y)},f)}function Ni(u,f,y,E){var I=-1,N=Bu,H=!0,Q=u.length,ie=[],ge=f.length;if(!Q)return ie;y&&(f=It(f,Sr(y))),E?(N=Zf,H=!1):f.length>=i&&(N=io,H=!1,f=new Es(f));e:for(;++II?0:I+y),E=E===n||E>I?I:at(E),E<0&&(E+=I),E=y>E?0:Nw(E);y0&&y(Q)?f>1?Jt(Q,f-1,y,E,I):Fo(I,Q):E||(I[I.length]=Q)}return I}var ac=Sc(),Aa=Sc(!0);function Pr(u,f){return u&&ac(u,f,Hn)}function Wo(u,f){return u&&Aa(u,f,Hn)}function Tl(u,f){return No(f,function(y){return Vs(u[y])})}function co(u,f){f=Bi(f,u);for(var y=0,E=f.length;u!=null&&yf}function Kr(u,f){return u!=null&&wt.call(u,f)}function $s(u,f){return u!=null&&f in Tt(u)}function vd(u,f,y){return u>=zn(f,y)&&u=120&&ve.length>=120)?new Es(H&&ve):n}ve=u[0];var xe=-1,_e=Q[0];e:for(;++xe-1;)Q!==u&&Xu.call(Q,ie,1),Xu.call(u,ie,1);return u}function mn(u,f){for(var y=u?f.length:0,E=y-1;y--;){var I=f[y];if(y==E||I!==N){var N=I;Ut(I)?Xu.call(u,I,1):vc(u,I)}}return u}function $l(u,f){return u+zo(Ca()*(f-u+1))}function Da(u,f,y,E){for(var I=-1,N=un(ks((f-u)/(y||1)),0),H=ce(N);N--;)H[E?N:++I]=u,u+=y;return H}function Rs(u,f){var y="";if(!u||f<1||f>K)return y;do f%2&&(y+=u),f=zo(f/2),f&&(u+=u);while(f);return y}function lt(u,f){return Tr(Ac(u,f,Zr),u+"")}function Kn(u){return Mi(Xc(u))}function kd(u,f){var y=Xc(u);return Rc(y,uo(f,0,y.length))}function Ls(u,f,y,E){if(!on(u))return u;f=Bi(f,u);for(var I=-1,N=f.length,H=N-1,Q=u;Q!=null&&++II?0:I+f),y=y>I?I:y,y<0&&(y+=I),I=f>y?0:y-f>>>0,f>>>=0;for(var N=ce(I);++E>>1,H=u[N];H!==null&&!yi(H)&&(y?H<=f:H=i){var ge=f?null:Cm(u);if(ge)return Oo(ge);H=!1,I=io,ie=new Es}else ie=f?[]:Q;e:for(;++E=E?u:Wn(u,f,y)}var _d=rm||function(u){return jt.clearTimeout(u)};function Id(u,f){if(f)return u.slice();var y=u.length,E=ud?ud(y):new u.constructor(y);return u.copy(E),E}function Oa(u){var f=new u.constructor(u.byteLength);return new Sa(f).set(new Sa(u)),f}function vm(u,f){var y=f?Oa(u.buffer):u.buffer;return new u.constructor(y,u.byteOffset,u.byteLength)}function ym(u){var f=new u.constructor(u.source,ro.exec(u));return f.lastIndex=u.lastIndex,f}function bm(u){return Cr?Tt(Cr.call(u)):{}}function xm(u,f){var y=f?Oa(u.buffer):u.buffer;return new u.constructor(y,u.byteOffset,u.length)}function $d(u,f){if(u!==f){var y=u!==n,E=u===null,I=u===u,N=yi(u),H=f!==n,Q=f===null,ie=f===f,ge=yi(f);if(!Q&&!ge&&!N&&u>f||N&&H&&ie&&!Q&&!ge||E&&H&&ie||!y&&ie||!I)return 1;if(!E&&!N&&!ge&&u=Q)return ie;var ge=y[E];return ie*(ge=="desc"?-1:1)}}return u.index-f.index}function wm(u,f,y,E){for(var I=-1,N=u.length,H=y.length,Q=-1,ie=f.length,ge=un(N-H,0),ve=ce(ie+ge),xe=!E;++Q1?y[I-1]:n,H=I>2?y[2]:n;for(N=u.length>3&&typeof N=="function"?(I--,N):n,H&&nr(y[0],y[1],H)&&(N=I<3?n:N,I=1),f=Tt(f);++E-1?I[N?f[H]:H]:n}}function Cc(u){return Vi(function(f){var y=f.length,E=y,I=Bn.prototype.thru;for(u&&f.reverse();E--;){var N=f[E];if(typeof N!="function")throw new Br(a);if(I&&!H&&Fl(N)=="wrapper")var H=new Bn([],!0)}for(E=H?E:y;++E1&&vt.reverse(),ve&&ieQ))return!1;var ge=N.get(u),ve=N.get(f);if(ge&&ve)return ge==f&&ve==u;var xe=-1,_e=!0,Ve=y&P?new Es:n;for(N.set(u,f),N.set(f,u);++xe1?"& ":"")+f[E],f=f.join(y>2?", ":" "),u.replace(il,`{ + */var w8=Ip.exports,Gk;function S8(){return Gk||(Gk=1,function(e,t){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",g=1,b=2,x=4,S=1,P=2,_=1,T=2,R=4,L=8,B=16,W=32,M=64,Z=128,re=256,ae=512,O=30,U="...",X=800,ne=16,G=1,fe=2,J=3,q=1/0,K=9007199254740991,se=17976931348623157e292,A=NaN,j=4294967295,oe=j-1,z=j>>>1,me=[["ary",Z],["bind",_],["bindKey",T],["curry",L],["curryRight",B],["flip",ae],["partial",W],["partialRight",M],["rearg",re]],Ee="[object Arguments]",we="[object Array]",Be="[object AsyncFunction]",Oe="[object Boolean]",Te="[object Date]",tt="[object DOMException]",yt="[object Error]",Ie="[object Function]",Rt="[object GeneratorFunction]",bt="[object Map]",Xt="[object Number]",Ue="[object Null]",st="[object Object]",An="[object Promise]",Nr="[object Proxy]",Sn="[object RegExp]",Lt="[object Set]",zt="[object String]",ar="[object Symbol]",no="[object Undefined]",Yn="[object WeakMap]",pe="[object WeakSet]",ke="[object ArrayBuffer]",je="[object DataView]",rt="[object Float32Array]",ct="[object Float64Array]",Qt="[object Int8Array]",ur="[object Int16Array]",en="[object Int32Array]",ln="[object Uint8Array]",wr="[object Uint8ClampedArray]",Mt="[object Uint16Array]",Xn="[object Uint32Array]",tn=/\b__p \+= '';/g,rl=/\b(__p \+=) '' \+/g,ds=/(__e\(.*?\)|\b__t\)) \+\n'';/g,oi=/&(?:amp|lt|gt|quot|#39);/g,si=/[&<>"']/g,ia=RegExp(oi.source),Pu=RegExp(si.source),ps=/<%-([\s\S]+?)%>/g,Fr=/<%([\s\S]+?)%>/g,oa=/<%=([\s\S]+?)%>/g,sa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ht=/^\w*$/,hs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ms=/[\\^$.*+?()[\]{}|]/g,Ao=RegExp(ms.source),la=/^\s+/,gs=/\s/,il=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ol=/\{\n\/\* \[wrapped with (.+)\] \*/,aa=/,? & /,zf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bf=/[()=,{}\[\]\/\s]/,jf=/\\(\\)?/g,Ye=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ro=/\w*$/,Sh=/^[-+]0x[0-9a-f]+$/i,Av=/^0b[01]+$/i,kh=/^\[object .+?Constructor\]$/,Ch=/^0o[0-7]+$/i,Eh=/^(?:0|[1-9]\d*)$/,Ph=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Tu=/($^)/,Rv=/['\n\r\u2028\u2029\\]/g,Bt="\\ud800-\\udfff",Lv="\\u0300-\\u036f",Vf="\\ufe20-\\ufe2f",Th="\\u20d0-\\u20ff",ua=Lv+Vf+Th,_h="\\u2700-\\u27bf",Uf="a-z\\xdf-\\xf6\\xf8-\\xff",_u="\\xac\\xb1\\xd7\\xf7",_i="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mv="\\u2000-\\u206f",li=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ih="A-Z\\xc0-\\xd6\\xd8-\\xde",$h="\\ufe0e\\ufe0f",Ah=_u+_i+Mv+li,sl="['’]",Iu="["+Bt+"]",ll="["+Ah+"]",vs="["+ua+"]",Rh="\\d+",Dv="["+_h+"]",$u="["+Uf+"]",Kf="[^"+Bt+Ah+Rh+_h+Uf+Ih+"]",ca="\\ud83c[\\udffb-\\udfff]",fa="(?:"+vs+"|"+ca+")",Lh="[^"+Bt+"]",da="(?:\\ud83c[\\udde6-\\uddff]){2}",Ct="[\\ud800-\\udbff][\\udc00-\\udfff]",ys="["+Ih+"]",Wf="\\u200d",Au="(?:"+$u+"|"+Kf+")",Mh="(?:"+ys+"|"+Kf+")",Hf="(?:"+sl+"(?:d|ll|m|re|s|t|ve))?",Gf="(?:"+sl+"(?:D|LL|M|RE|S|T|VE))?",Ru=fa+"?",pa="["+$h+"]?",Ro="(?:"+Wf+"(?:"+[Lh,da,Ct].join("|")+")"+pa+Ru+")*",Lo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",al=pa+Ru+Ro,ha="(?:"+[Dv,da,Ct].join("|")+")"+al,Do="(?:"+[Lh+vs+"?",vs,da,Ct,Iu].join("|")+")",Nv=RegExp(sl,"g"),Dh=RegExp(vs,"g"),bs=RegExp(ca+"(?="+ca+")|"+Do+al,"g"),Fv=RegExp([ys+"?"+$u+"+"+Hf+"(?="+[ll,ys,"$"].join("|")+")",Mh+"+"+Gf+"(?="+[ll,ys+Au,"$"].join("|")+")",ys+"?"+Au+"+"+Hf,ys+"+"+Gf,Mo,Lo,Rh,ha].join("|"),"g"),Nh=RegExp("["+Wf+Bt+ua+$h+"]"),Lu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fh=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ov=-1,Pt={};Pt[rt]=Pt[ct]=Pt[Qt]=Pt[ur]=Pt[en]=Pt[ln]=Pt[wr]=Pt[Mt]=Pt[Xn]=!0,Pt[Ee]=Pt[we]=Pt[ke]=Pt[Oe]=Pt[je]=Pt[Te]=Pt[yt]=Pt[Ie]=Pt[bt]=Pt[Xt]=Pt[st]=Pt[Sn]=Pt[Lt]=Pt[zt]=Pt[Yn]=!1;var Et={};Et[Ee]=Et[we]=Et[ke]=Et[je]=Et[Oe]=Et[Te]=Et[rt]=Et[ct]=Et[Qt]=Et[ur]=Et[en]=Et[bt]=Et[Xt]=Et[st]=Et[Sn]=Et[Lt]=Et[zt]=Et[ar]=Et[ln]=Et[wr]=Et[Mt]=Et[Xn]=!0,Et[yt]=Et[Ie]=Et[Yn]=!1;var ul={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Mu={"&":"&","<":"<",">":">",'"':""","'":"'"},zv={"&":"&","<":"<",">":">",""":'"',"'":"'"},Bv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},qf=parseFloat,Du=parseInt,Nu=typeof Xm=="object"&&Xm&&Xm.Object===Object&&Xm,Oh=typeof self=="object"&&self&&self.Object===Object&&self,jt=Nu||Oh||Function("return this")(),ma=t&&!t.nodeType&&t,Ii=ma&&!0&&e&&!e.nodeType&&e,Yf=Ii&&Ii.exports===ma,cl=Yf&&Nu.process,Qn=function(){try{var te=Ii&&Ii.require&&Ii.require("util").types;return te||cl&&cl.binding&&cl.binding("util")}catch{}}(),Xf=Qn&&Qn.isArrayBuffer,cr=Qn&&Qn.isDate,xs=Qn&&Qn.isMap,Fu=Qn&&Qn.isRegExp,fl=Qn&&Qn.isSet,zh=Qn&&Qn.isTypedArray;function Jn(te,he,ce){switch(ce.length){case 0:return te.call(he);case 1:return te.call(he,ce[0]);case 2:return te.call(he,ce[0],ce[1]);case 3:return te.call(he,ce[0],ce[1],ce[2])}return te.apply(he,ce)}function Qf(te,he,ce,$e){for(var nt=-1,xt=te==null?0:te.length;++nt-1}function Zf(te,he,ce){for(var $e=-1,nt=te==null?0:te.length;++$e-1;);return ce}function sd(te,he){for(var ce=te.length;ce--&&dl(he,te[ce],0)>-1;);return ce}function Gh(te,he){for(var ce=te.length,$e=0;ce--;)te[ce]===he&&++$e;return $e}var qh=ju(ul),Yh=ju(Mu);function Xh(te){return"\\"+Bv[te]}function pl(te,he){return te==null?n:te[he]}function hl(te){return Nh.test(te)}function Hv(te){return Lu.test(te)}function Gv(te){for(var he,ce=[];!(he=te.next()).done;)ce.push(he.value);return ce}function Vu(te){var he=-1,ce=Array(te.size);return te.forEach(function($e,nt){ce[++he]=[nt,$e]}),ce}function ld(te,he){return function(ce){return te(he(ce))}}function Or(te,he){for(var ce=-1,$e=te.length,nt=0,xt=[];++ce<$e;){var an=te[ce];(an===he||an===m)&&(te[ce]=m,xt[nt++]=ce)}return xt}function Oo(te){var he=-1,ce=Array(te.size);return te.forEach(function($e){ce[++he]=$e}),ce}function qv(te){var he=-1,ce=Array(te.size);return te.forEach(function($e){ce[++he]=[$e,$e]}),ce}function Uu(te,he,ce){for(var $e=ce-1,nt=te.length;++$e-1}function lm(u,f){var y=this.__data__,E=Un(y,u);return E<0?(++this.size,y.push([u,f])):y[E][1]=f,this}Zn.prototype.clear=El,Zn.prototype.delete=pr,Zn.prototype.get=nc,Zn.prototype.has=sm,Zn.prototype.set=lm;function Br(u){var f=-1,y=u==null?0:u.length;for(this.clear();++f=f?u:f)),u}function hr(u,f,y,E,I,N){var H,Q=f&g,ie=f&b,ge=f&x;if(y&&(H=I?y(u,E,I,N):y(u)),H!==n)return H;if(!on(u))return u;var ve=ot(u);if(ve){if(H=Ka(u),!Q)return er(u,H)}else{var xe=Mn(u),_e=xe==Ie||xe==Rt;if(Vl(u))return Id(u,Q);if(xe==st||xe==Ee||_e&&!I){if(H=ie||_e?{}:Dn(u),!Q)return ie?ty(u,ui(H,u)):bc(u,Ft(H,u))}else{if(!Et[xe])return I?u:{};H=ny(u,xe,Q)}}N||(N=new Vn);var Ve=N.get(u);if(Ve)return Ve;N.set(u,H),Lw(u)?u.forEach(function(Je){H.add(hr(Je,f,y,Je,u,N))}):Aw(u)&&u.forEach(function(Je,pt){H.set(pt,hr(Je,f,y,pt,u,N))});var Qe=ge?ie?ja:Ba:ie?Qr:Hn,ft=ve?n:Qe(u);return On(ft||u,function(Je,pt){ft&&(pt=Je,Je=u[pt]),_s(H,pt,hr(Je,f,y,pt,u,N))}),H}function fm(u){var f=Hn(u);return function(y){return _a(y,u,f)}}function _a(u,f,y){var E=y.length;if(u==null)return!E;for(u=Tt(u);E--;){var I=y[E],N=f[I],H=u[I];if(H===n&&!(I in u)||!N(H))return!1}return!0}function md(u,f,y){if(typeof u!="function")throw new zr(a);return zl(function(){u.apply(n,y)},f)}function Ni(u,f,y,E){var I=-1,N=zu,H=!0,Q=u.length,ie=[],ge=f.length;if(!Q)return ie;y&&(f=It(f,Sr(y))),E?(N=Zf,H=!1):f.length>=i&&(N=io,H=!1,f=new Es(f));e:for(;++II?0:I+y),E=E===n||E>I?I:at(E),E<0&&(E+=I),E=y>E?0:Dw(E);y0&&y(Q)?f>1?Jt(Q,f-1,y,E,I):Fo(I,Q):E||(I[I.length]=Q)}return I}var lc=wc(),$a=wc(!0);function Pr(u,f){return u&&lc(u,f,Hn)}function Wo(u,f){return u&&$a(u,f,Hn)}function Tl(u,f){return No(f,function(y){return Vs(u[y])})}function co(u,f){f=Bi(f,u);for(var y=0,E=f.length;u!=null&&yf}function Ur(u,f){return u!=null&&wt.call(u,f)}function $s(u,f){return u!=null&&f in Tt(u)}function vd(u,f,y){return u>=zn(f,y)&&u=120&&ve.length>=120)?new Es(H&&ve):n}ve=u[0];var xe=-1,_e=Q[0];e:for(;++xe-1;)Q!==u&&Yu.call(Q,ie,1),Yu.call(u,ie,1);return u}function mn(u,f){for(var y=u?f.length:0,E=y-1;y--;){var I=f[y];if(y==E||I!==N){var N=I;Ut(I)?Yu.call(u,I,1):gc(u,I)}}return u}function $l(u,f){return u+zo(ka()*(f-u+1))}function Ma(u,f,y,E){for(var I=-1,N=un(ks((f-u)/(y||1)),0),H=ce(N);N--;)H[E?N:++I]=u,u+=y;return H}function Rs(u,f){var y="";if(!u||f<1||f>K)return y;do f%2&&(y+=u),f=zo(f/2),f&&(u+=u);while(f);return y}function lt(u,f){return Tr($c(u,f,Jr),u+"")}function Kn(u){return Mi(Yc(u))}function kd(u,f){var y=Yc(u);return Ac(y,uo(f,0,y.length))}function Ls(u,f,y,E){if(!on(u))return u;f=Bi(f,u);for(var I=-1,N=f.length,H=N-1,Q=u;Q!=null&&++II?0:I+f),y=y>I?I:y,y<0&&(y+=I),I=f>y?0:y-f>>>0,f>>>=0;for(var N=ce(I);++E>>1,H=u[N];H!==null&&!vi(H)&&(y?H<=f:H=i){var ge=f?null:Cm(u);if(ge)return Oo(ge);H=!1,I=io,ie=new Es}else ie=f?[]:Q;e:for(;++E=E?u:Wn(u,f,y)}var _d=rm||function(u){return jt.clearTimeout(u)};function Id(u,f){if(f)return u.slice();var y=u.length,E=ud?ud(y):new u.constructor(y);return u.copy(E),E}function Fa(u){var f=new u.constructor(u.byteLength);return new wa(f).set(new wa(u)),f}function vm(u,f){var y=f?Fa(u.buffer):u.buffer;return new u.constructor(y,u.byteOffset,u.byteLength)}function ym(u){var f=new u.constructor(u.source,ro.exec(u));return f.lastIndex=u.lastIndex,f}function bm(u){return Cr?Tt(Cr.call(u)):{}}function xm(u,f){var y=f?Fa(u.buffer):u.buffer;return new u.constructor(y,u.byteOffset,u.length)}function $d(u,f){if(u!==f){var y=u!==n,E=u===null,I=u===u,N=vi(u),H=f!==n,Q=f===null,ie=f===f,ge=vi(f);if(!Q&&!ge&&!N&&u>f||N&&H&&ie&&!Q&&!ge||E&&H&&ie||!y&&ie||!I)return 1;if(!E&&!N&&!ge&&u=Q)return ie;var ge=y[E];return ie*(ge=="desc"?-1:1)}}return u.index-f.index}function wm(u,f,y,E){for(var I=-1,N=u.length,H=y.length,Q=-1,ie=f.length,ge=un(N-H,0),ve=ce(ie+ge),xe=!E;++Q1?y[I-1]:n,H=I>2?y[2]:n;for(N=u.length>3&&typeof N=="function"?(I--,N):n,H&&nr(y[0],y[1],H)&&(N=I<3?n:N,I=1),f=Tt(f);++E-1?I[N?f[H]:H]:n}}function kc(u){return Vi(function(f){var y=f.length,E=y,I=Bn.prototype.thru;for(u&&f.reverse();E--;){var N=f[E];if(typeof N!="function")throw new zr(a);if(I&&!H&&Fl(N)=="wrapper")var H=new Bn([],!0)}for(E=H?E:y;++E1&&vt.reverse(),ve&&ieQ))return!1;var ge=N.get(u),ve=N.get(f);if(ge&&ve)return ge==f&&ve==u;var xe=-1,_e=!0,Ve=y&P?new Es:n;for(N.set(u,f),N.set(f,u);++xe1?"& ":"")+f[E],f=f.join(y>2?", ":" "),u.replace(il,`{ /* [wrapped with `+f+`] */ -`)}function Ic(u){return ot(u)||tu(u)||!!(nm&&u&&u[nm])}function Ut(u,f){var y=typeof u;return f=f??K,!!f&&(y=="number"||y!="symbol"&&Eh.test(u))&&u>-1&&u%1==0&&u0){if(++f>=X)return arguments[0]}else f=0;return u.apply(n,arguments)}}function Rc(u,f){var y=-1,E=u.length,I=E-1;for(f=f===n?E:f;++y1?u[f-1]:n;return y=typeof y=="function"?(u.pop(),y):n,qt(u,y)});function jc(u){var f=D(u);return f.__chain__=!0,f}function py(u,f){return f(u),u}function vi(u,f){return f(u)}var Vc=Vi(function(u){var f=u.length,y=f?u[0]:0,E=this.__wrapped__,I=function(N){return lc(N,u)};return f>1||this.__actions__.length||!(E instanceof it)||!Ut(y)?this.thru(I):(E=E.slice(y,+y+(f?1:0)),E.__actions__.push({func:vi,args:[I],thisArg:n}),new Bn(E,this.__chain__).thru(function(N){return f&&!N.length&&N.push(n),N}))});function Bs(){return jc(this)}function Uc(){return new Bn(this.value(),this.__chain__)}function np(){this.__values__===n&&(this.__values__=Dw(this.value()));var u=this.__index__>=this.__values__.length,f=u?n:this.__values__[this.__index__++];return{done:u,value:f}}function rp(){return this}function hy(u){for(var f,y=this;y instanceof Ri;){var E=Lm(y);E.__index__=0,E.__values__=n,f?I.__wrapped__=E:f=E;var I=E;y=y.__wrapped__}return I.__wrapped__=u,f}function ip(){var u=this.__wrapped__;if(u instanceof it){var f=u;return this.__actions__.length&&(f=new it(this)),f=f.reverse(),f.__actions__.push({func:vi,args:[Oc],thisArg:n}),new Bn(f,this.__chain__)}return this.thru(Oc)}function my(){return Rl(this.__wrapped__,this.__actions__)}var Vm=wc(function(u,f,y){wt.call(u,y)?++u[y]:Di(u,y,1)});function Um(u,f,y){var E=ot(u)?Jf:$a;return y&&nr(u,f,y)&&(f=n),E(u,Ge(f,3))}function Kc(u,f){var y=ot(u)?No:gd;return y(u,Ge(f,3))}var Wc=Ds(Qo),Km=Ds(Ya);function op(u,f){return Jt(js(u,f),1)}function gy(u,f){return Jt(js(u,f),q)}function Wm(u,f,y){return y=y===n?1:at(y),Jt(js(u,f),y)}function Hc(u,f){var y=ot(u)?On:Fi;return y(u,Ge(f,3))}function Za(u,f){var y=ot(u)?zu:dm;return y(u,Ge(f,3))}var sp=wc(function(u,f,y){wt.call(u,y)?u[y].push(f):Di(u,y,[f])});function Gc(u,f,y,E){u=Qr(u)?u:Xc(u),y=y&&!E?at(y):0;var I=u.length;return y<0&&(y=un(I+y,0)),qm(u)?y<=I&&u.indexOf(f,y)>-1:!!I&&dl(u,f,y)>-1}var Hm=lt(function(u,f,y){var E=-1,I=typeof f=="function",N=Qr(u)?ce(u.length):[];return Fi(u,function(H){N[++E]=I?Jn(f,H,y):Wr(H,f,y)}),N}),vy=wc(function(u,f,y){Di(u,y,f)});function js(u,f){var y=ot(u)?It:xd;return y(u,Ge(f,3))}function yy(u,f,y,E){return u==null?[]:(ot(f)||(f=f==null?[]:[f]),y=E?n:y,ot(y)||(y=y==null?[]:[y]),Ma(u,f,y))}var eu=wc(function(u,f,y){u[y?0:1].push(f)},function(){return[[],[]]});function by(u,f,y){var E=ot(u)?ed:Kh,I=arguments.length<3;return E(u,Ge(f,4),y,I,Fi)}function qc(u,f,y){var E=ot(u)?jv:Kh,I=arguments.length<3;return E(u,Ge(f,4),y,I,dm)}function o(u,f){var y=ot(u)?No:gd;return y(u,Ce(Ge(f,3)))}function l(u){var f=ot(u)?Mi:Kn;return f(u)}function p(u,f,y){(y?nr(u,f,y):f===n)?f=1:f=at(f);var E=ot(u)?Ts:kd;return E(u,f)}function v(u){var f=ot(u)?cm:Gr;return f(u)}function w(u){if(u==null)return 0;if(Qr(u))return qm(u)?ws(u):u.length;var f=Mn(u);return f==bt||f==Lt?u.size:ho(u).length}function C(u,f,y){var E=ot(u)?td:Cd;return y&&nr(u,f,y)&&(f=n),E(u,Ge(f,3))}var $=lt(function(u,f){if(u==null)return[];var y=f.length;return y>1&&nr(u,f[0],f[1])?f=[]:y>2&&nr(f[0],f[1],f[2])&&(f=[f[0]]),Ma(u,Jt(f,1),[])}),V=Dt||function(){return jt.Date.now()};function Y(u,f){if(typeof f!="function")throw new Br(a);return u=at(u),function(){if(--u<1)return f.apply(this,arguments)}}function de(u,f,y){return f=y?n:f,f=u&&f==null?u.length:f,ji(u,Z,n,n,n,n,f)}function be(u,f){var y;if(typeof f!="function")throw new Br(a);return u=at(u),function(){return--u>0&&(y=f.apply(this,arguments)),u<=1&&(f=n),y}}var Se=lt(function(u,f,y){var E=_;if(y.length){var I=zr(y,vo(Se));E|=W}return ji(u,E,f,y,I)}),ye=lt(function(u,f,y){var E=_|T;if(y.length){var I=zr(y,vo(ye));E|=W}return ji(f,E,u,y,I)});function Ae(u,f,y){f=y?n:f;var E=ji(u,L,n,n,n,n,n,f);return E.placeholder=Ae.placeholder,E}function Le(u,f,y){f=y?n:f;var E=ji(u,B,n,n,n,n,n,f);return E.placeholder=Le.placeholder,E}function De(u,f,y){var E,I,N,H,Q,ie,ge=0,ve=!1,xe=!1,_e=!0;if(typeof u!="function")throw new Br(a);f=Ki(f)||0,on(y)&&(ve=!!y.leading,xe="maxWait"in y,N=xe?un(Ki(y.maxWait)||0,f):N,_e="trailing"in y?!!y.trailing:_e);function Ve(yn){var wo=E,Ks=I;return E=I=n,ge=yn,H=u.apply(Ks,wo),H}function Qe(yn){return ge=yn,Q=zl(pt,f),ve?Ve(yn):H}function ft(yn){var wo=yn-ie,Ks=yn-ge,qw=f-wo;return xe?zn(qw,N-Ks):qw}function Je(yn){var wo=yn-ie,Ks=yn-ge;return ie===n||wo>=f||wo<0||xe&&Ks>=N}function pt(){var yn=V();if(Je(yn))return vt(yn);Q=zl(pt,ft(yn))}function vt(yn){return Q=n,_e&&E?Ve(yn):(E=I=n,H)}function bi(){Q!==n&&_d(Q),ge=0,E=ie=I=Q=n}function Ir(){return Q===n?H:vt(V())}function xi(){var yn=V(),wo=Je(yn);if(E=arguments,I=this,ie=yn,wo){if(Q===n)return Qe(ie);if(xe)return _d(Q),Q=zl(pt,f),Ve(ie)}return Q===n&&(Q=zl(pt,f)),H}return xi.cancel=bi,xi.flush=Ir,xi}var rn=lt(function(u,f){return md(u,1,f)}),le=lt(function(u,f,y){return md(u,Ki(f)||0,y)});function ee(u){return ji(u,ae)}function ue(u,f){if(typeof u!="function"||f!=null&&typeof f!="function")throw new Br(a);var y=function(){var E=arguments,I=f?f.apply(this,E):E[0],N=y.cache;if(N.has(I))return N.get(I);var H=u.apply(this,E);return y.cache=N.set(I,H)||N,H};return y.cache=new(ue.Cache||jr),y}ue.Cache=jr;function Ce(u){if(typeof u!="function")throw new Br(a);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}function ze(u){return be(2,u)}var He=gm(function(u,f){f=f.length==1&&ot(f[0])?It(f[0],Sr(Ge())):It(Jt(f,1),Sr(Ge()));var y=f.length;return lt(function(E){for(var I=-1,N=zn(E.length,y);++I=f}),tu=fc(function(){return arguments}())?fc:function(u){return fn(u)&&wt.call(u,"callee")&&!Yu.call(u,"callee")},ot=ce.isArray,b$=Xf?Sr(Xf):hm;function Qr(u){return u!=null&&Gm(u.length)&&!Vs(u)}function vn(u){return fn(u)&&Qr(u)}function x$(u){return u===!0||u===!1||fn(u)&&Rn(u)==Oe}var Vl=fd||Ay,w$=cr?Sr(cr):po;function S$(u){return fn(u)&&u.nodeType===1&&!lp(u)}function k$(u){if(u==null)return!0;if(Qr(u)&&(ot(u)||typeof u=="string"||typeof u.splice=="function"||Vl(u)||Yc(u)||tu(u)))return!u.length;var f=Mn(u);if(f==bt||f==Lt)return!u.size;if(yo(u))return!ho(u).length;for(var y in u)if(wt.call(u,y))return!1;return!0}function C$(u,f){return Hr(u,f)}function E$(u,f,y){y=typeof y=="function"?y:n;var E=y?y(u,f):n;return E===n?Hr(u,f,n,y):!!E}function wy(u){if(!fn(u))return!1;var f=Rn(u);return f==yt||f==tt||typeof u.message=="string"&&typeof u.name=="string"&&!lp(u)}function P$(u){return typeof u=="number"&&yl(u)}function Vs(u){if(!on(u))return!1;var f=Rn(u);return f==Ie||f==Rt||f==Be||f==Fr}function Aw(u){return typeof u=="number"&&u==at(u)}function Gm(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=K}function on(u){var f=typeof u;return u!=null&&(f=="object"||f=="function")}function fn(u){return u!=null&&typeof u=="object"}var Rw=xs?Sr(xs):mm;function T$(u,f){return u===f||_l(u,f,Ka(f))}function _$(u,f,y){return y=typeof y=="function"?y:n,_l(u,f,Ka(f),y)}function I$(u){return Lw(u)&&u!=+u}function $$(u){if(iy(u))throw new nt(s);return yd(u)}function A$(u){return u===null}function R$(u){return u==null}function Lw(u){return typeof u=="number"||fn(u)&&Rn(u)==Xt}function lp(u){if(!fn(u)||Rn(u)!=st)return!1;var f=ui(u);if(f===null)return!0;var y=wt.call(f,"constructor")&&f.constructor;return typeof y=="function"&&y instanceof y&&ba.call(y)==Gu}var Sy=Ou?Sr(Ou):Ra;function L$(u){return Aw(u)&&u>=-K&&u<=K}var Mw=fl?Sr(fl):Oi;function qm(u){return typeof u=="string"||!ot(u)&&fn(u)&&Rn(u)==zt}function yi(u){return typeof u=="symbol"||fn(u)&&Rn(u)==ar}var Yc=zh?Sr(zh):La;function M$(u){return u===n}function D$(u){return fn(u)&&Mn(u)==Yn}function N$(u){return fn(u)&&Rn(u)==pe}var F$=Pc(Go),O$=Pc(function(u,f){return u<=f});function Dw(u){if(!u)return[];if(Qr(u))return qm(u)?kr(u):er(u);if(lo&&u[lo])return Gv(u[lo]());var f=Mn(u),y=f==bt?Uu:f==Lt?Oo:Xc;return y(u)}function Us(u){if(!u)return u===0?u:0;if(u=Ki(u),u===q||u===-q){var f=u<0?-1:1;return f*se}return u===u?u:0}function at(u){var f=Us(u),y=f%1;return f===f?y?f-y:f:0}function Nw(u){return u?uo(at(u),0,j):0}function Ki(u){if(typeof u=="number")return u;if(yi(u))return A;if(on(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=on(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=Wh(u);var y=Av.test(u);return y||Ch.test(u)?Nu(u.slice(2),y?2:8):Sh.test(u)?A:+u}function Fw(u){return fi(u,Jr(u))}function z$(u){return u?uo(at(u),-K,K):u===0?u:0}function _t(u){return u==null?"":mr(u)}var B$=Ml(function(u,f){if(yo(f)||Qr(f)){fi(f,Hn(f),u);return}for(var y in f)wt.call(f,y)&&_s(u,y,f[y])}),Ow=Ml(function(u,f){fi(f,Jr(f),u)}),Ym=Ml(function(u,f,y,E){fi(f,Jr(f),u,E)}),j$=Ml(function(u,f,y,E){fi(f,Hn(f),u,E)}),V$=Vi(lc);function U$(u,f){var y=kl(u);return f==null?y:Ft(y,f)}var K$=lt(function(u,f){u=Tt(u);var y=-1,E=f.length,I=E>2?f[2]:n;for(I&&nr(f[0],f[1],I)&&(E=1);++y1),N}),fi(u,Va(u),y),E&&(y=hr(y,g|b|x,Od));for(var I=f.length;I--;)vc(y,f[I]);return y});function aA(u,f){return Bw(u,Ce(Ge(f)))}var uA=Vi(function(u,f){return u==null?{}:Sd(u,f)});function Bw(u,f){if(u==null)return{};var y=It(Va(u),function(E){return[E]});return f=Ge(f),qo(u,y,function(E,I){return f(E,I[0])})}function cA(u,f,y){f=Bi(f,u);var E=-1,I=f.length;for(I||(I=1,u=n);++Ef){var E=u;u=f,f=E}if(y||u%1||f%1){var I=Ca();return zn(u+I*(f-u+qf("1e-"+((I+"").length-1))),f)}return $l(u,f)}var wA=Ms(function(u,f,y){return f=f.toLowerCase(),u+(y?Uw(f):f)});function Uw(u){return Ey(_t(u).toLowerCase())}function Kw(u){return u=_t(u),u&&u.replace(Ph,qh).replace(Dh,"")}function SA(u,f,y){u=_t(u),f=mr(f);var E=u.length;y=y===n?E:uo(at(y),0,E);var I=y;return y-=f.length,y>=0&&u.slice(y,I)==f}function kA(u){return u=_t(u),u&&Tu.test(u)?u.replace(li,Yh):u}function CA(u){return u=_t(u),u&&Ao.test(u)?u.replace(ms,"\\$&"):u}var EA=Ms(function(u,f,y){return u+(y?"-":"")+f.toLowerCase()}),PA=Ms(function(u,f,y){return u+(y?" ":"")+f.toLowerCase()}),TA=Rd("toLowerCase");function _A(u,f,y){u=_t(u),f=at(f);var E=f?ws(u):0;if(!f||E>=f)return u;var I=(f-E)/2;return Ba(zo(I),y)+u+Ba(ks(I),y)}function IA(u,f,y){u=_t(u),f=at(f);var E=f?ws(u):0;return f&&E>>0,y?(u=_t(u),u&&(typeof f=="string"||f!=null&&!Sy(f))&&(f=mr(f),!f&&hl(u))?go(kr(u),0,y):u.split(f,y)):[]}var NA=Ms(function(u,f,y){return u+(y?" ":"")+Ey(f)});function FA(u,f,y){return u=_t(u),y=y==null?0:uo(at(y),0,u.length),f=mr(f),u.slice(y,y+f.length)==f}function OA(u,f,y){var E=D.templateSettings;y&&nr(u,f,y)&&(f=n),u=_t(u),f=Ym({},f,E,Nd);var I=Ym({},f.imports,E.imports,Nd),N=Hn(I),H=va(I,N),Q,ie,ge=0,ve=f.interpolate||_u,xe="__p += '",_e=ya((f.escape||_u).source+"|"+ve.source+"|"+(ve===sa?Ye:_u).source+"|"+(f.evaluate||_u).source+"|$","g"),Ve="//# sourceURL="+(wt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ov+"]")+` -`;u.replace(_e,function(Je,pt,vt,bi,Ir,xi){return vt||(vt=bi),xe+=u.slice(ge,xi).replace(Rv,Xh),pt&&(Q=!0,xe+=`' + +`)}function _c(u){return ot(u)||eu(u)||!!(nm&&u&&u[nm])}function Ut(u,f){var y=typeof u;return f=f??K,!!f&&(y=="number"||y!="symbol"&&Eh.test(u))&&u>-1&&u%1==0&&u0){if(++f>=X)return arguments[0]}else f=0;return u.apply(n,arguments)}}function Ac(u,f){var y=-1,E=u.length,I=E-1;for(f=f===n?E:f;++y1?u[f-1]:n;return y=typeof y=="function"?(u.pop(),y):n,qt(u,y)});function Bc(u){var f=D(u);return f.__chain__=!0,f}function py(u,f){return f(u),u}function gi(u,f){return f(u)}var jc=Vi(function(u){var f=u.length,y=f?u[0]:0,E=this.__wrapped__,I=function(N){return sc(N,u)};return f>1||this.__actions__.length||!(E instanceof it)||!Ut(y)?this.thru(I):(E=E.slice(y,+y+(f?1:0)),E.__actions__.push({func:gi,args:[I],thisArg:n}),new Bn(E,this.__chain__).thru(function(N){return f&&!N.length&&N.push(n),N}))});function Bs(){return Bc(this)}function Vc(){return new Bn(this.value(),this.__chain__)}function np(){this.__values__===n&&(this.__values__=Mw(this.value()));var u=this.__index__>=this.__values__.length,f=u?n:this.__values__[this.__index__++];return{done:u,value:f}}function rp(){return this}function hy(u){for(var f,y=this;y instanceof Ri;){var E=Lm(y);E.__index__=0,E.__values__=n,f?I.__wrapped__=E:f=E;var I=E;y=y.__wrapped__}return I.__wrapped__=u,f}function ip(){var u=this.__wrapped__;if(u instanceof it){var f=u;return this.__actions__.length&&(f=new it(this)),f=f.reverse(),f.__actions__.push({func:gi,args:[Fc],thisArg:n}),new Bn(f,this.__chain__)}return this.thru(Fc)}function my(){return Rl(this.__wrapped__,this.__actions__)}var Vm=xc(function(u,f,y){wt.call(u,y)?++u[y]:Di(u,y,1)});function Um(u,f,y){var E=ot(u)?Jf:Ia;return y&&nr(u,f,y)&&(f=n),E(u,Ge(f,3))}function Uc(u,f){var y=ot(u)?No:gd;return y(u,Ge(f,3))}var Kc=Ds(Qo),Km=Ds(qa);function op(u,f){return Jt(js(u,f),1)}function gy(u,f){return Jt(js(u,f),q)}function Wm(u,f,y){return y=y===n?1:at(y),Jt(js(u,f),y)}function Wc(u,f){var y=ot(u)?On:Fi;return y(u,Ge(f,3))}function Ja(u,f){var y=ot(u)?Ou:dm;return y(u,Ge(f,3))}var sp=xc(function(u,f,y){wt.call(u,y)?u[y].push(f):Di(u,y,[f])});function Hc(u,f,y,E){u=Xr(u)?u:Yc(u),y=y&&!E?at(y):0;var I=u.length;return y<0&&(y=un(I+y,0)),qm(u)?y<=I&&u.indexOf(f,y)>-1:!!I&&dl(u,f,y)>-1}var Hm=lt(function(u,f,y){var E=-1,I=typeof f=="function",N=Xr(u)?ce(u.length):[];return Fi(u,function(H){N[++E]=I?Jn(f,H,y):Kr(H,f,y)}),N}),vy=xc(function(u,f,y){Di(u,y,f)});function js(u,f){var y=ot(u)?It:xd;return y(u,Ge(f,3))}function yy(u,f,y,E){return u==null?[]:(ot(f)||(f=f==null?[]:[f]),y=E?n:y,ot(y)||(y=y==null?[]:[y]),La(u,f,y))}var Za=xc(function(u,f,y){u[y?0:1].push(f)},function(){return[[],[]]});function by(u,f,y){var E=ot(u)?ed:Kh,I=arguments.length<3;return E(u,Ge(f,4),y,I,Fi)}function Gc(u,f,y){var E=ot(u)?jv:Kh,I=arguments.length<3;return E(u,Ge(f,4),y,I,dm)}function o(u,f){var y=ot(u)?No:gd;return y(u,Ce(Ge(f,3)))}function l(u){var f=ot(u)?Mi:Kn;return f(u)}function p(u,f,y){(y?nr(u,f,y):f===n)?f=1:f=at(f);var E=ot(u)?Ts:kd;return E(u,f)}function v(u){var f=ot(u)?cm:Hr;return f(u)}function w(u){if(u==null)return 0;if(Xr(u))return qm(u)?ws(u):u.length;var f=Mn(u);return f==bt||f==Lt?u.size:ho(u).length}function C(u,f,y){var E=ot(u)?td:Cd;return y&&nr(u,f,y)&&(f=n),E(u,Ge(f,3))}var $=lt(function(u,f){if(u==null)return[];var y=f.length;return y>1&&nr(u,f[0],f[1])?f=[]:y>2&&nr(f[0],f[1],f[2])&&(f=[f[0]]),La(u,Jt(f,1),[])}),V=Dt||function(){return jt.Date.now()};function Y(u,f){if(typeof f!="function")throw new zr(a);return u=at(u),function(){if(--u<1)return f.apply(this,arguments)}}function de(u,f,y){return f=y?n:f,f=u&&f==null?u.length:f,ji(u,Z,n,n,n,n,f)}function be(u,f){var y;if(typeof f!="function")throw new zr(a);return u=at(u),function(){return--u>0&&(y=f.apply(this,arguments)),u<=1&&(f=n),y}}var Se=lt(function(u,f,y){var E=_;if(y.length){var I=Or(y,vo(Se));E|=W}return ji(u,E,f,y,I)}),ye=lt(function(u,f,y){var E=_|T;if(y.length){var I=Or(y,vo(ye));E|=W}return ji(f,E,u,y,I)});function Ae(u,f,y){f=y?n:f;var E=ji(u,L,n,n,n,n,n,f);return E.placeholder=Ae.placeholder,E}function Le(u,f,y){f=y?n:f;var E=ji(u,B,n,n,n,n,n,f);return E.placeholder=Le.placeholder,E}function De(u,f,y){var E,I,N,H,Q,ie,ge=0,ve=!1,xe=!1,_e=!0;if(typeof u!="function")throw new zr(a);f=Ki(f)||0,on(y)&&(ve=!!y.leading,xe="maxWait"in y,N=xe?un(Ki(y.maxWait)||0,f):N,_e="trailing"in y?!!y.trailing:_e);function Ve(yn){var wo=E,Ks=I;return E=I=n,ge=yn,H=u.apply(Ks,wo),H}function Qe(yn){return ge=yn,Q=zl(pt,f),ve?Ve(yn):H}function ft(yn){var wo=yn-ie,Ks=yn-ge,Gw=f-wo;return xe?zn(Gw,N-Ks):Gw}function Je(yn){var wo=yn-ie,Ks=yn-ge;return ie===n||wo>=f||wo<0||xe&&Ks>=N}function pt(){var yn=V();if(Je(yn))return vt(yn);Q=zl(pt,ft(yn))}function vt(yn){return Q=n,_e&&E?Ve(yn):(E=I=n,H)}function yi(){Q!==n&&_d(Q),ge=0,E=ie=I=Q=n}function Ir(){return Q===n?H:vt(V())}function bi(){var yn=V(),wo=Je(yn);if(E=arguments,I=this,ie=yn,wo){if(Q===n)return Qe(ie);if(xe)return _d(Q),Q=zl(pt,f),Ve(ie)}return Q===n&&(Q=zl(pt,f)),H}return bi.cancel=yi,bi.flush=Ir,bi}var rn=lt(function(u,f){return md(u,1,f)}),le=lt(function(u,f,y){return md(u,Ki(f)||0,y)});function ee(u){return ji(u,ae)}function ue(u,f){if(typeof u!="function"||f!=null&&typeof f!="function")throw new zr(a);var y=function(){var E=arguments,I=f?f.apply(this,E):E[0],N=y.cache;if(N.has(I))return N.get(I);var H=u.apply(this,E);return y.cache=N.set(I,H)||N,H};return y.cache=new(ue.Cache||Br),y}ue.Cache=Br;function Ce(u){if(typeof u!="function")throw new zr(a);return function(){var f=arguments;switch(f.length){case 0:return!u.call(this);case 1:return!u.call(this,f[0]);case 2:return!u.call(this,f[0],f[1]);case 3:return!u.call(this,f[0],f[1],f[2])}return!u.apply(this,f)}}function ze(u){return be(2,u)}var He=gm(function(u,f){f=f.length==1&&ot(f[0])?It(f[0],Sr(Ge())):It(Jt(f,1),Sr(Ge()));var y=f.length;return lt(function(E){for(var I=-1,N=zn(E.length,y);++I=f}),eu=cc(function(){return arguments}())?cc:function(u){return fn(u)&&wt.call(u,"callee")&&!qu.call(u,"callee")},ot=ce.isArray,v$=Xf?Sr(Xf):hm;function Xr(u){return u!=null&&Gm(u.length)&&!Vs(u)}function vn(u){return fn(u)&&Xr(u)}function y$(u){return u===!0||u===!1||fn(u)&&Rn(u)==Oe}var Vl=fd||Ay,b$=cr?Sr(cr):po;function x$(u){return fn(u)&&u.nodeType===1&&!lp(u)}function w$(u){if(u==null)return!0;if(Xr(u)&&(ot(u)||typeof u=="string"||typeof u.splice=="function"||Vl(u)||qc(u)||eu(u)))return!u.length;var f=Mn(u);if(f==bt||f==Lt)return!u.size;if(yo(u))return!ho(u).length;for(var y in u)if(wt.call(u,y))return!1;return!0}function S$(u,f){return Wr(u,f)}function k$(u,f,y){y=typeof y=="function"?y:n;var E=y?y(u,f):n;return E===n?Wr(u,f,n,y):!!E}function wy(u){if(!fn(u))return!1;var f=Rn(u);return f==yt||f==tt||typeof u.message=="string"&&typeof u.name=="string"&&!lp(u)}function C$(u){return typeof u=="number"&&yl(u)}function Vs(u){if(!on(u))return!1;var f=Rn(u);return f==Ie||f==Rt||f==Be||f==Nr}function $w(u){return typeof u=="number"&&u==at(u)}function Gm(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=K}function on(u){var f=typeof u;return u!=null&&(f=="object"||f=="function")}function fn(u){return u!=null&&typeof u=="object"}var Aw=xs?Sr(xs):mm;function E$(u,f){return u===f||_l(u,f,Ua(f))}function P$(u,f,y){return y=typeof y=="function"?y:n,_l(u,f,Ua(f),y)}function T$(u){return Rw(u)&&u!=+u}function _$(u){if(iy(u))throw new nt(s);return yd(u)}function I$(u){return u===null}function $$(u){return u==null}function Rw(u){return typeof u=="number"||fn(u)&&Rn(u)==Xt}function lp(u){if(!fn(u)||Rn(u)!=st)return!1;var f=ai(u);if(f===null)return!0;var y=wt.call(f,"constructor")&&f.constructor;return typeof y=="function"&&y instanceof y&&ya.call(y)==Hu}var Sy=Fu?Sr(Fu):Aa;function A$(u){return $w(u)&&u>=-K&&u<=K}var Lw=fl?Sr(fl):Oi;function qm(u){return typeof u=="string"||!ot(u)&&fn(u)&&Rn(u)==zt}function vi(u){return typeof u=="symbol"||fn(u)&&Rn(u)==ar}var qc=zh?Sr(zh):Ra;function R$(u){return u===n}function L$(u){return fn(u)&&Mn(u)==Yn}function M$(u){return fn(u)&&Rn(u)==pe}var D$=Ec(Go),N$=Ec(function(u,f){return u<=f});function Mw(u){if(!u)return[];if(Xr(u))return qm(u)?kr(u):er(u);if(lo&&u[lo])return Gv(u[lo]());var f=Mn(u),y=f==bt?Vu:f==Lt?Oo:Yc;return y(u)}function Us(u){if(!u)return u===0?u:0;if(u=Ki(u),u===q||u===-q){var f=u<0?-1:1;return f*se}return u===u?u:0}function at(u){var f=Us(u),y=f%1;return f===f?y?f-y:f:0}function Dw(u){return u?uo(at(u),0,j):0}function Ki(u){if(typeof u=="number")return u;if(vi(u))return A;if(on(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=on(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=Wh(u);var y=Av.test(u);return y||Ch.test(u)?Du(u.slice(2),y?2:8):Sh.test(u)?A:+u}function Nw(u){return ci(u,Qr(u))}function F$(u){return u?uo(at(u),-K,K):u===0?u:0}function _t(u){return u==null?"":mr(u)}var O$=Ml(function(u,f){if(yo(f)||Xr(f)){ci(f,Hn(f),u);return}for(var y in f)wt.call(f,y)&&_s(u,y,f[y])}),Fw=Ml(function(u,f){ci(f,Qr(f),u)}),Ym=Ml(function(u,f,y,E){ci(f,Qr(f),u,E)}),z$=Ml(function(u,f,y,E){ci(f,Hn(f),u,E)}),B$=Vi(sc);function j$(u,f){var y=kl(u);return f==null?y:Ft(y,f)}var V$=lt(function(u,f){u=Tt(u);var y=-1,E=f.length,I=E>2?f[2]:n;for(I&&nr(f[0],f[1],I)&&(E=1);++y1),N}),ci(u,ja(u),y),E&&(y=hr(y,g|b|x,Od));for(var I=f.length;I--;)gc(y,f[I]);return y});function sA(u,f){return zw(u,Ce(Ge(f)))}var lA=Vi(function(u,f){return u==null?{}:Sd(u,f)});function zw(u,f){if(u==null)return{};var y=It(ja(u),function(E){return[E]});return f=Ge(f),qo(u,y,function(E,I){return f(E,I[0])})}function aA(u,f,y){f=Bi(f,u);var E=-1,I=f.length;for(I||(I=1,u=n);++Ef){var E=u;u=f,f=E}if(y||u%1||f%1){var I=ka();return zn(u+I*(f-u+qf("1e-"+((I+"").length-1))),f)}return $l(u,f)}var bA=Ms(function(u,f,y){return f=f.toLowerCase(),u+(y?Vw(f):f)});function Vw(u){return Ey(_t(u).toLowerCase())}function Uw(u){return u=_t(u),u&&u.replace(Ph,qh).replace(Dh,"")}function xA(u,f,y){u=_t(u),f=mr(f);var E=u.length;y=y===n?E:uo(at(y),0,E);var I=y;return y-=f.length,y>=0&&u.slice(y,I)==f}function wA(u){return u=_t(u),u&&Pu.test(u)?u.replace(si,Yh):u}function SA(u){return u=_t(u),u&&Ao.test(u)?u.replace(ms,"\\$&"):u}var kA=Ms(function(u,f,y){return u+(y?"-":"")+f.toLowerCase()}),CA=Ms(function(u,f,y){return u+(y?" ":"")+f.toLowerCase()}),EA=Rd("toLowerCase");function PA(u,f,y){u=_t(u),f=at(f);var E=f?ws(u):0;if(!f||E>=f)return u;var I=(f-E)/2;return za(zo(I),y)+u+za(ks(I),y)}function TA(u,f,y){u=_t(u),f=at(f);var E=f?ws(u):0;return f&&E>>0,y?(u=_t(u),u&&(typeof f=="string"||f!=null&&!Sy(f))&&(f=mr(f),!f&&hl(u))?go(kr(u),0,y):u.split(f,y)):[]}var MA=Ms(function(u,f,y){return u+(y?" ":"")+Ey(f)});function DA(u,f,y){return u=_t(u),y=y==null?0:uo(at(y),0,u.length),f=mr(f),u.slice(y,y+f.length)==f}function NA(u,f,y){var E=D.templateSettings;y&&nr(u,f,y)&&(f=n),u=_t(u),f=Ym({},f,E,Nd);var I=Ym({},f.imports,E.imports,Nd),N=Hn(I),H=ga(I,N),Q,ie,ge=0,ve=f.interpolate||Tu,xe="__p += '",_e=va((f.escape||Tu).source+"|"+ve.source+"|"+(ve===oa?Ye:Tu).source+"|"+(f.evaluate||Tu).source+"|$","g"),Ve="//# sourceURL="+(wt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ov+"]")+` +`;u.replace(_e,function(Je,pt,vt,yi,Ir,bi){return vt||(vt=yi),xe+=u.slice(ge,bi).replace(Rv,Xh),pt&&(Q=!0,xe+=`' + __e(`+pt+`) + '`),Ir&&(ie=!0,xe+=`'; `+Ir+`; __p += '`),vt&&(xe+=`' + ((__t = (`+vt+`)) == null ? '' : __t) + -'`),ge=xi+Je.length,Je}),xe+=`'; +'`),ge=bi+Je.length,Je}),xe+=`'; `;var Qe=wt.call(f,"variable")&&f.variable;if(!Qe)xe=`with (obj) { `+xe+` } @@ -79,7 +79,7 @@ __p += '`),vt&&(xe+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+xe+`return __p -}`;var ft=Hw(function(){return xt(N,Ve+"return "+xe).apply(n,H)});if(ft.source=xe,wy(ft))throw ft;return ft}function zA(u){return _t(u).toLowerCase()}function BA(u){return _t(u).toUpperCase()}function jA(u,f,y){if(u=_t(u),u&&(y||f===n))return Wh(u);if(!u||!(f=mr(f)))return u;var E=kr(u),I=kr(f),N=Hh(E,I),H=sd(E,I)+1;return go(E,N,H).join("")}function VA(u,f,y){if(u=_t(u),u&&(y||f===n))return u.slice(0,Wu(u)+1);if(!u||!(f=mr(f)))return u;var E=kr(u),I=sd(E,kr(f))+1;return go(E,0,I).join("")}function UA(u,f,y){if(u=_t(u),u&&(y||f===n))return u.replace(aa,"");if(!u||!(f=mr(f)))return u;var E=kr(u),I=Hh(E,kr(f));return go(E,I).join("")}function KA(u,f){var y=O,E=U;if(on(f)){var I="separator"in f?f.separator:I;y="length"in f?at(f.length):y,E="omission"in f?mr(f.omission):E}u=_t(u);var N=u.length;if(hl(u)){var H=kr(u);N=H.length}if(y>=N)return u;var Q=y-ws(E);if(Q<1)return E;var ie=H?go(H,0,Q).join(""):u.slice(0,Q);if(I===n)return ie+E;if(H&&(Q+=ie.length-Q),Sy(I)){if(u.slice(Q).search(I)){var ge,ve=ie;for(I.global||(I=ya(I.source,_t(ro.exec(I))+"g")),I.lastIndex=0;ge=I.exec(ve);)var xe=ge.index;ie=ie.slice(0,xe===n?Q:xe)}}else if(u.indexOf(mr(I),Q)!=Q){var _e=ie.lastIndexOf(I);_e>-1&&(ie=ie.slice(0,_e))}return ie+E}function WA(u){return u=_t(u),u&&oa.test(u)?u.replace(si,Qh):u}var HA=Ms(function(u,f,y){return u+(y?" ":"")+f.toUpperCase()}),Ey=Rd("toUpperCase");function Ww(u,f,y){return u=_t(u),f=y?n:f,f===n?Hv(u)?Xv(u):Uv(u):u.match(f)||[]}var Hw=lt(function(u,f){try{return Jn(u,n,f)}catch(y){return wy(y)?y:new nt(y)}}),GA=Vi(function(u,f){return On(f,function(y){y=mi(y),Di(u,y,Se(u[y],u))}),u});function qA(u){var f=u==null?0:u.length,y=Ge();return u=f?It(u,function(E){if(typeof E[1]!="function")throw new Br(a);return[y(E[0]),E[1]]}):[],lt(function(E){for(var I=-1;++IK)return[];var y=j,E=zn(u,j);f=Ge(f),u-=j;for(var I=od(E,f);++y0||f<0)?new it(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),f!==n&&(f=at(f),y=f<0?y.dropRight(-f):y.take(f-u)),y)},it.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},it.prototype.toArray=function(){return this.take(j)},Pr(it.prototype,function(u,f){var y=/^(?:filter|find|map|reject)|While$/.test(f),E=/^(?:head|last)$/.test(f),I=D[E?"take"+(f=="last"?"Right":""):f],N=E||/^find/.test(f);I&&(D.prototype[f]=function(){var H=this.__wrapped__,Q=E?[1]:arguments,ie=H instanceof it,ge=Q[0],ve=ie||ot(H),xe=function(pt){var vt=I.apply(D,Fo([pt],Q));return E&&_e?vt[0]:vt};ve&&y&&typeof ge=="function"&&ge.length!=1&&(ie=ve=!1);var _e=this.__chain__,Ve=!!this.__actions__.length,Qe=N&&!_e,ft=ie&&!Ve;if(!N&&ve){H=ft?H:new it(this);var Je=u.apply(H,Q);return Je.__actions__.push({func:vi,args:[xe],thisArg:n}),new Bn(Je,_e)}return Qe&&ft?u.apply(this,Q):(Je=this.thru(xe),Qe?E?Je.value()[0]:Je.value():Je)})}),On(["pop","push","shift","sort","splice","unshift"],function(u){var f=oo[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);D.prototype[u]=function(){var I=arguments;if(E&&!this.__chain__){var N=this.value();return f.apply(ot(N)?N:[],I)}return this[y](function(H){return f.apply(ot(H)?H:[],I)})}}),Pr(it.prototype,function(u,f){var y=D[f];if(y){var E=y.name+"";wt.call(wl,E)||(wl[E]=[]),wl[E].push({name:f,func:y})}}),wl[Nl(n,T).name]=[{name:"wrapper",func:n}],it.prototype.clone=nc,it.prototype.reverse=pd,it.prototype.value=Cl,D.prototype.at=Vc,D.prototype.chain=Bs,D.prototype.commit=Uc,D.prototype.next=np,D.prototype.plant=hy,D.prototype.reverse=ip,D.prototype.toJSON=D.prototype.valueOf=D.prototype.value=my,D.prototype.first=D.prototype.head,lo&&(D.prototype[lo]=rp),D},ml=Qv();Ii?((Ii.exports=ml)._=ml,ga._=ml):jt._=ml}).call(S8)}(Ip,Ip.exports)),Ip.exports}var ew=k8();class C8{plugins={};activePlugins=[];listeners=new Set;register(t){this.plugins[t.name]={isActivated:!1,config:t},this.notify()}activate(t){const n=this.plugins[t];!n||n.isActivated||(n.isActivated=!0,n.config.onActivate&&n.config.onActivate(),this.produceActivePlugins(),this.notify())}deactivate(t){const n=this.plugins[t];!n||!n.isActivated||(n.isActivated=!1,n.config.onDeactivate&&n.config.onDeactivate(),this.produceActivePlugins(),this.notify())}isPluginActivated(t){const n=this.plugins[t];return!!n&&n.isActivated}getPlugin(t){const n=this.plugins[t];return!n||!n.isActivated?null:n}getActivePlugins(){return this.activePlugins}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}produceActivePlugins(){this.activePlugins=ew.transform(this.plugins,(t,n)=>{n.isActivated&&t.push(n.config)},[])}}const Ji=new C8;const h2="FeedbackFormPlugin",m2={name:h2,components:{FeedbackForm:k.lazy(()=>na(()=>import("./FeedbackForm-JUvhaJp1.js"),__vite__mapDeps([0,1,2])))}},g2="ChatOptionsPlugin",v2={name:g2,components:{ChatOptionsForm:k.lazy(()=>na(()=>import("./ChatOptionsForm-Qtpz3wfl.js"),__vite__mapDeps([3,1,2])))}},y2=k.createContext(void 0),b2="SharePluginName",x2={name:b2,components:{ShareButton:k.lazy(()=>na(()=>import("./ShareButton-BdWYUpIl.js"),__vite__mapDeps([4,2])))}},Xk=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,b))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,i,c);return c},Qk=e=>e?Xk(e):Xk,E8=e=>e;function P8(e,t=E8){const n=We.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return We.useDebugValue(n),n}const or=[];for(let e=0;e<256;++e)or.push((e+256).toString(16).slice(1));function T8(e,t=0){return(or[e[t+0]]+or[e[t+1]]+or[e[t+2]]+or[e[t+3]]+"-"+or[e[t+4]]+or[e[t+5]]+"-"+or[e[t+6]]+or[e[t+7]]+"-"+or[e[t+8]]+or[e[t+9]]+"-"+or[e[t+10]]+or[e[t+11]]+or[e[t+12]]+or[e[t+13]]+or[e[t+14]]+or[e[t+15]]).toLowerCase()}let h0;const _8=new Uint8Array(16);function I8(){if(!h0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");h0=crypto.getRandomValues.bind(crypto)}return h0(_8)}const $8=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Jk={randomUUID:$8};function w2(e,t,n){if(Jk.randomUUID&&!e)return Jk.randomUUID();e=e||{};const r=e.random??e.rng?.()??I8();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,T8(r)}var S2=Symbol.for("immer-nothing"),Zk=Symbol.for("immer-draftable"),Ci=Symbol.for("immer-state");function Po(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ef=Object.getPrototypeOf;function Pf(e){return!!e&&!!e[Ci]}function wu(e){return e?k2(e)||Array.isArray(e)||!!e[Zk]||!!e.constructor?.[Zk]||yv(e)||bv(e):!1}var A8=Object.prototype.constructor.toString();function k2(e){if(!e||typeof e!="object")return!1;const t=Ef(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===A8}function Wg(e,t){vv(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function vv(e){const t=e[Ci];return t?t.type_:Array.isArray(e)?1:yv(e)?2:bv(e)?3:0}function Lb(e,t){return vv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function C2(e,t,n){const r=vv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function R8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function yv(e){return e instanceof Map}function bv(e){return e instanceof Set}function cu(e){return e.copy_||e.base_}function Mb(e,t){if(yv(e))return new Map(e);if(bv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=k2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ci];let i=Reflect.ownKeys(r);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=L8),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>tw(r,!0))),e}function L8(){Po(2)}function xv(e){return Object.isFrozen(e)}var M8={};function Su(e){const t=M8[e];return t||Po(0,e),t}var ih;function E2(){return ih}function D8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function eC(e,t){t&&(Su("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Db(e){Nb(e),e.drafts_.forEach(N8),e.drafts_=null}function Nb(e){e===ih&&(ih=e.parent_)}function tC(e){return ih=D8(ih,e)}function N8(e){const t=e[Ci];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function nC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ci].modified_&&(Db(t),Po(4)),wu(e)&&(e=Hg(t,e),t.parent_||Gg(t,e)),t.patches_&&Su("Patches").generateReplacementPatches_(n[Ci].base_,e,t.patches_,t.inversePatches_)):e=Hg(t,n,[]),Db(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==S2?e:void 0}function Hg(e,t,n){if(xv(t))return t;const r=t[Ci];if(!r)return Wg(t,(i,s)=>rC(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Gg(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,a=!1;r.type_===3&&(s=new Set(i),i.clear(),a=!0),Wg(s,(c,d)=>rC(e,r,i,c,d,n,a)),Gg(e,i,!1),n&&e.patches_&&Su("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function rC(e,t,n,r,i,s,a){if(Pf(i)){const c=s&&t&&t.type_!==3&&!Lb(t.assigned_,r)?s.concat(r):void 0,d=Hg(e,i,c);if(C2(n,r,d),Pf(d))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(wu(i)&&!xv(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Hg(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Gg(e,i)}}function Gg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&tw(t,n)}function F8(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:E2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=nw;n&&(i=[r],s=oh);const{revoke:a,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=a,c}var nw={get(e,t){if(t===Ci)return e;const n=cu(e);if(!Lb(n,t))return O8(e,n,t);const r=n[t];return e.finalized_||!wu(r)?r:r===m0(e.base_,t)?(g0(e),e.copy_[t]=Ob(r,e)):r},has(e,t){return t in cu(e)},ownKeys(e){return Reflect.ownKeys(cu(e))},set(e,t,n){const r=P2(cu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=m0(cu(e),t),s=i?.[Ci];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(R8(n,i)&&(n!==void 0||Lb(e.base_,t)))return!0;g0(e),Fb(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return m0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,g0(e),Fb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=cu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Po(11)},getPrototypeOf(e){return Ef(e.base_)},setPrototypeOf(){Po(12)}},oh={};Wg(nw,(e,t)=>{oh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});oh.deleteProperty=function(e,t){return oh.set.call(this,e,t,void 0)};oh.set=function(e,t,n){return nw.set.call(this,e[0],t,n,e[0])};function m0(e,t){const n=e[Ci];return(n?cu(n):e)[t]}function O8(e,t,n){const r=P2(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function P2(e,t){if(!(t in e))return;let n=Ef(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ef(n)}}function Fb(e){e.modified_||(e.modified_=!0,e.parent_&&Fb(e.parent_))}function g0(e){e.copy_||(e.copy_=Mb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var z8=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(d=s,...h){return a.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&Po(6),r!==void 0&&typeof r!="function"&&Po(7);let i;if(wu(t)){const s=tC(this),a=Ob(t,void 0);let c=!0;try{i=n(a),c=!1}finally{c?Db(s):Nb(s)}return eC(s,r),nC(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===S2&&(i=void 0),this.autoFreeze_&&tw(i,!0),r){const s=[],a=[];Su("Patches").generateReplacementPatches_(t,i,s,a),r(s,a)}return i}else Po(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,d=>t(d,...c));let r,i;return[this.produce(t,n,(a,c)=>{r=a,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){wu(e)||Po(8),Pf(e)&&(e=B8(e));const t=tC(this),n=Ob(e,void 0);return n[Ci].isManual_=!0,Nb(t),n}finishDraft(e,t){const n=e&&e[Ci];(!n||!n.isManual_)&&Po(9);const{scope_:r}=n;return eC(r,t),nC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Su("Patches").applyPatches_;return Pf(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Ob(e,t){const n=yv(e)?Su("MapSet").proxyMap_(e,t):bv(e)?Su("MapSet").proxySet_(e,t):F8(e,t);return(t?t.scope_:E2()).drafts_.push(n),n}function B8(e){return Pf(e)||Po(10,e),T2(e)}function T2(e){if(!wu(e)||xv(e))return e;const t=e[Ci];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Mb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Mb(e,!0);return Wg(n,(r,i)=>{C2(n,r,T2(i))}),t&&(t.finalized_=!1),n}var Ei=new z8,zb=Ei.produce;Ei.produceWithPatches.bind(Ei);Ei.setAutoFreeze.bind(Ei);Ei.setUseStrictShallowCopy.bind(Ei);Ei.applyPatches.bind(Ei);Ei.createDraft.bind(Ei);Ei.finishDraft.bind(Ei);function j8(e){return Object.values(e).map(t=>({role:t.role,content:t.content}))}function V8(){const e=k.useContext(Q_);if(!e)throw new Error("useThemeContext must be used within a ThemeContextProvider");return e}const _g=e=>F.jsx(E6,{delay:300,closeDelay:0,...e}),rw=()=>{const e=k.useContext(y2);if(!e)throw new Error("useChat must be used within a ConfigContextProvider");return e},U8=e=>typeof e=="boolean"||e instanceof Boolean,K8=e=>typeof e=="number"||e instanceof Number,W8=e=>typeof e=="bigint"||e instanceof BigInt,_2=e=>!!e&&e instanceof Date,H8=e=>typeof e=="string"||e instanceof String,G8=e=>Array.isArray(e),q8=e=>typeof e=="object"&&e!==null,I2=e=>!!e&&e instanceof Object&&typeof e=="function";function qg(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function Y8(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function $2(e){let{field:t,value:n,data:r,lastElement:i,openBracket:s,closeBracket:a,level:c,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const x=k.useRef(!1),[S,P]=k.useState(()=>h(c,n,t)),_=k.useRef(null);k.useEffect(()=>{x.current?P(h(c,n,t)):x.current=!0},[h]);const T=k.useId();if(r.length===0)return X8({field:t,openBracket:s,closeBracket:a,lastElement:i,style:d});const R=S?d.collapseIcon:d.expandIcon,L=S?d.ariaLables.collapseJson:d.ariaLables.expandJson,B=c+1,W=r.length-1,M=ae=>{S!==ae&&(!b||b({level:c,value:n,field:t,newExpandValue:ae}))&&P(ae)},Z=ae=>{if(ae.key==="ArrowRight"||ae.key==="ArrowLeft")ae.preventDefault(),M(ae.key==="ArrowRight");else if(ae.key==="ArrowUp"||ae.key==="ArrowDown"){ae.preventDefault();const O=ae.key==="ArrowUp"?-1:1;if(!g.current)return;const U=g.current.querySelectorAll("[role=button]");let X=-1;for(let G=0;G{var ae;M(!S);const O=_.current;if(!O)return;const U=(ae=g.current)===null||ae===void 0?void 0:ae.querySelector('[role=button][tabindex="0"]');U&&(U.tabIndex=-1),O.tabIndex=0,O.focus()};return k.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":S,"aria-selected":void 0},k.createElement("span",{className:R,onClick:re,onKeyDown:Z,role:"button","aria-label":L,"aria-expanded":S,"aria-controls":S?T:void 0,ref:_,tabIndex:c===0?0:-1}),(t||t==="")&&(m?k.createElement("span",{className:d.clickableLabel,onClick:re,onKeyDown:Z},qg(t,d.quotesForFieldNames),":"):k.createElement("span",{className:d.label},qg(t,d.quotesForFieldNames),":")),k.createElement("span",{className:d.punctuation},s),S?k.createElement("ul",{id:T,role:"group",className:d.childFieldsContainer},r.map((ae,O)=>k.createElement(A2,{key:ae[0]||O,field:ae[0],value:ae[1],style:d,lastElement:O===W,level:B,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}))):k.createElement("span",{className:d.collapsedContent,onClick:re,onKeyDown:Z}),k.createElement("span",{className:d.punctuation},a),!i&&k.createElement("span",{className:d.punctuation},","))}function X8(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:s}=e;return k.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&k.createElement("span",{className:s.label},qg(t,s.quotesForFieldNames),":"),k.createElement("span",{className:s.punctuation},n),k.createElement("span",{className:s.punctuation},r),!i&&k.createElement("span",{className:s.punctuation},","))}function Q8(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:s,clickToExpandNode:a,level:c,outerRef:d,beforeExpandChange:h}=e;return $2({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:s,clickToExpandNode:a,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:h})}function J8(e){let{field:t,value:n,style:r,lastElement:i,level:s,shouldExpandNode:a,clickToExpandNode:c,outerRef:d,beforeExpandChange:h}=e;return $2({field:t,value:n,lastElement:i||!1,level:s,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:h})}function Z8(e){let{field:t,value:n,style:r,lastElement:i}=e,s,a=r.otherValue;return n===null?(s="null",a=r.nullValue):n===void 0?(s="undefined",a=r.undefinedValue):H8(n)?(s=Y8(n,!r.noQuotesForStringValues,r.stringifyStringValues),a=r.stringValue):U8(n)?(s=n?"true":"false",a=r.booleanValue):K8(n)?(s=n.toString(),a=r.numberValue):W8(n)?(s=`${n.toString()}n`,a=r.numberValue):_2(n)?s=n.toISOString():I2(n)?s="function() { }":s=n.toString(),k.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&k.createElement("span",{className:r.label},qg(t,r.quotesForFieldNames),":"),k.createElement("span",{className:a},s),!i&&k.createElement("span",{className:r.punctuation},","))}function A2(e){const t=e.value;return G8(t)?k.createElement(J8,Object.assign({},e)):q8(t)&&!_2(t)&&!I2(t)?k.createElement(Q8,Object.assign({},e)):k.createElement(Z8,Object.assign({},e))}var Ar={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const e7={collapseJson:"collapse JSON",expandJson:"expand JSON"},qi={container:Ar["container-light"],basicChildStyle:Ar["basic-element-style"],childFieldsContainer:Ar["child-fields-container"],label:Ar["label-light"],clickableLabel:Ar["clickable-label-light"],nullValue:Ar["value-null-light"],undefinedValue:Ar["value-undefined-light"],stringValue:Ar["value-string-light"],booleanValue:Ar["value-boolean-light"],numberValue:Ar["value-number-light"],otherValue:Ar["value-other-light"],punctuation:Ar["punctuation-light"],collapseIcon:Ar["collapse-icon-light"],expandIcon:Ar["expand-icon-light"],collapsedContent:Ar["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:e7,stringifyStringValues:!1},$p=()=>!0,pg=e=>{let{data:t,style:n=qi,shouldExpandNode:r=$p,clickToExpandNode:i=!1,beforeExpandChange:s,...a}=e;const c=k.useRef(null);return k.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:c,role:"tree"}),k.createElement(A2,{value:t,style:{...qi,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:c,beforeExpandChange:s}))};function t7(e){return typeof e=="string"?e:`map:${String(e)}`}function ql(e,t=new WeakSet){if(e===null||typeof e!="object")return typeof e=="bigint"?e.toString():typeof e>"u"||typeof e=="function"?void 0:e;if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Date)return e.toISOString();if(e instanceof Map){const r={};for(const[i,s]of e.entries())r[t7(i)]=ql(s,t);return r}if(e instanceof Set)return Array.from(e).map(r=>ql(r,t));if(Array.isArray(e))return e.map(r=>ql(r,t));const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=ql(e[r],t);i!==void 0&&(n[r]=i)}return n}const iC=e=>Symbol.iterator in e,oC=e=>"entries"in e,sC=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!Object.is(s,r.get(i)))return!1;return!0},n7=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function r7(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:iC(e)&&iC(t)?oC(e)&&oC(t)?sC(e,t):n7(e,t):sC({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function gh(e){const t=We.useRef(void 0);return n=>{const r=e(n);return r7(t.current,r)?t.current:t.current=r}}const R2=k.createContext(null),tl=e=>{const t=k.useContext(R2);if(!t)throw new Error("useHistoryStore must be used within a HistoryStoreContextProvider");return P8(t,e)},wv=()=>tl(e=>e.actions),HH=()=>tl(e=>e.primitives),Xl=e=>tl(gh(t=>e(t.primitives.getCurrentConversation()))),L2=e=>tl(t=>e?t.primitives.getCurrentConversation().history[e]:void 0),i7=()=>tl(gh(e=>Object.keys(e.primitives.getCurrentConversation().history))),o7=()=>tl(gh(e=>Object.values(e.primitives.getCurrentConversation().history))),hg={container:"max-w-full overflow-auto rounded bg-default p-2 font-mono font-normal",label:`${qi.label} !text-default-900`,collapseIcon:`${qi.collapseIcon} !text-default-900`,expandIcon:`${qi.expandIcon} !text-default-900`,collapsedContent:`${qi.collapsedContent} !text-default-900`,punctuation:"!text-default-900",stringValue:`${qi.stringValue} !text-green-600`,otherValue:`${qi.otherValue} !text-purple-500`,numberValue:`${qi.numberValue}`,nullValue:`${qi.nullValue}`,booleanValue:`${qi.booleanValue} !text-yellow-600`,undefinedValue:`${qi.undefinedValue}`};function s7({isOpen:e}){const t=Xl(s=>s.history),n=Xl(s=>s.followupMessages),r=Xl(s=>s.eventsLog),i=tl(gh(s=>s.computed.getContext()));return F.jsx(Rf,{children:e&&F.jsx(ff.div,{initial:{scale:.6,opacity:0,width:0},animate:{scale:1,opacity:1,width:"100%"},exit:{scale:.6,opacity:0,width:0},className:"w-full max-w-[33%] overflow-hidden px-4",children:F.jsxs("div",{className:"rounded-medium border-small border-divider mr-4 h-full overflow-auto","data-testid":"debug-panel",children:[F.jsx("div",{className:"border-b-small border-divider min-h-16 p-4 text-lg font-bold",children:F.jsx("span",{children:"Debug"})}),F.jsxs(Sk,{className:"max-h-full",children:[F.jsx(hp,{"aria-label":"Context",title:"Context",children:F.jsx("div",{className:"max-h-[664px] overflow-auto",children:F.jsx(pg,{data:ql(i)??{},shouldExpandNode:$p,style:hg})})},"context"),F.jsx(hp,{"aria-label":"History",title:"History",children:F.jsx("div",{className:"max-h-[664px] overflow-auto",children:F.jsx(pg,{data:ql(t)??{},shouldExpandNode:$p,style:hg})})},"history"),F.jsx(hp,{"aria-label":"Followup messages",title:"Followup messages",children:F.jsx("div",{className:"max-h-[664px] overflow-auto",children:F.jsx(pg,{data:ql(n)??{},shouldExpandNode:$p,style:hg})})},"folowup-messages"),F.jsx(hp,{"aria-label":"Events",title:"Events",children:r.length===0?F.jsx("p",{children:"No events in the log"}):F.jsx(Sk,{children:r.map((s,a)=>F.jsx(hp,{"aria-label":`Events for response number ${a+1}`,title:`Events for response number ${a+1}`,children:F.jsx(pg,{data:ql(s)??{},shouldExpandNode:$p,style:hg})},`events-${a+1}`))})},"events")]})]})})})}const M2=e=>{const t=r=>Ji.subscribe(r),n=()=>Ji.getPlugin(e);return k.useSyncExternalStore(t,n)},Yg=({plugin:e,component:t,skeletonSize:n,disableSkeleton:r,componentProps:i})=>{const s=M2(e.name),a=n?{width:n.width,height:n.height}:{};if(!s)return null;const c=s.config.components[t];try{return F.jsx(k.Suspense,{fallback:r?null:F.jsx(pz,{className:"rounded-lg",style:a}),children:F.jsx(c,{...i||{}})})}catch(d){return console.error(d),null}};/** +}`;var ft=Ww(function(){return xt(N,Ve+"return "+xe).apply(n,H)});if(ft.source=xe,wy(ft))throw ft;return ft}function FA(u){return _t(u).toLowerCase()}function OA(u){return _t(u).toUpperCase()}function zA(u,f,y){if(u=_t(u),u&&(y||f===n))return Wh(u);if(!u||!(f=mr(f)))return u;var E=kr(u),I=kr(f),N=Hh(E,I),H=sd(E,I)+1;return go(E,N,H).join("")}function BA(u,f,y){if(u=_t(u),u&&(y||f===n))return u.slice(0,Ku(u)+1);if(!u||!(f=mr(f)))return u;var E=kr(u),I=sd(E,kr(f))+1;return go(E,0,I).join("")}function jA(u,f,y){if(u=_t(u),u&&(y||f===n))return u.replace(la,"");if(!u||!(f=mr(f)))return u;var E=kr(u),I=Hh(E,kr(f));return go(E,I).join("")}function VA(u,f){var y=O,E=U;if(on(f)){var I="separator"in f?f.separator:I;y="length"in f?at(f.length):y,E="omission"in f?mr(f.omission):E}u=_t(u);var N=u.length;if(hl(u)){var H=kr(u);N=H.length}if(y>=N)return u;var Q=y-ws(E);if(Q<1)return E;var ie=H?go(H,0,Q).join(""):u.slice(0,Q);if(I===n)return ie+E;if(H&&(Q+=ie.length-Q),Sy(I)){if(u.slice(Q).search(I)){var ge,ve=ie;for(I.global||(I=va(I.source,_t(ro.exec(I))+"g")),I.lastIndex=0;ge=I.exec(ve);)var xe=ge.index;ie=ie.slice(0,xe===n?Q:xe)}}else if(u.indexOf(mr(I),Q)!=Q){var _e=ie.lastIndexOf(I);_e>-1&&(ie=ie.slice(0,_e))}return ie+E}function UA(u){return u=_t(u),u&&ia.test(u)?u.replace(oi,Qh):u}var KA=Ms(function(u,f,y){return u+(y?" ":"")+f.toUpperCase()}),Ey=Rd("toUpperCase");function Kw(u,f,y){return u=_t(u),f=y?n:f,f===n?Hv(u)?Xv(u):Uv(u):u.match(f)||[]}var Ww=lt(function(u,f){try{return Jn(u,n,f)}catch(y){return wy(y)?y:new nt(y)}}),WA=Vi(function(u,f){return On(f,function(y){y=hi(y),Di(u,y,Se(u[y],u))}),u});function HA(u){var f=u==null?0:u.length,y=Ge();return u=f?It(u,function(E){if(typeof E[1]!="function")throw new zr(a);return[y(E[0]),E[1]]}):[],lt(function(E){for(var I=-1;++IK)return[];var y=j,E=zn(u,j);f=Ge(f),u-=j;for(var I=od(E,f);++y0||f<0)?new it(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),f!==n&&(f=at(f),y=f<0?y.dropRight(-f):y.take(f-u)),y)},it.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},it.prototype.toArray=function(){return this.take(j)},Pr(it.prototype,function(u,f){var y=/^(?:filter|find|map|reject)|While$/.test(f),E=/^(?:head|last)$/.test(f),I=D[E?"take"+(f=="last"?"Right":""):f],N=E||/^find/.test(f);I&&(D.prototype[f]=function(){var H=this.__wrapped__,Q=E?[1]:arguments,ie=H instanceof it,ge=Q[0],ve=ie||ot(H),xe=function(pt){var vt=I.apply(D,Fo([pt],Q));return E&&_e?vt[0]:vt};ve&&y&&typeof ge=="function"&&ge.length!=1&&(ie=ve=!1);var _e=this.__chain__,Ve=!!this.__actions__.length,Qe=N&&!_e,ft=ie&&!Ve;if(!N&&ve){H=ft?H:new it(this);var Je=u.apply(H,Q);return Je.__actions__.push({func:gi,args:[xe],thisArg:n}),new Bn(Je,_e)}return Qe&&ft?u.apply(this,Q):(Je=this.thru(xe),Qe?E?Je.value()[0]:Je.value():Je)})}),On(["pop","push","shift","sort","splice","unshift"],function(u){var f=oo[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);D.prototype[u]=function(){var I=arguments;if(E&&!this.__chain__){var N=this.value();return f.apply(ot(N)?N:[],I)}return this[y](function(H){return f.apply(ot(H)?H:[],I)})}}),Pr(it.prototype,function(u,f){var y=D[f];if(y){var E=y.name+"";wt.call(wl,E)||(wl[E]=[]),wl[E].push({name:f,func:y})}}),wl[Nl(n,T).name]=[{name:"wrapper",func:n}],it.prototype.clone=tc,it.prototype.reverse=pd,it.prototype.value=Cl,D.prototype.at=jc,D.prototype.chain=Bs,D.prototype.commit=Vc,D.prototype.next=np,D.prototype.plant=hy,D.prototype.reverse=ip,D.prototype.toJSON=D.prototype.valueOf=D.prototype.value=my,D.prototype.first=D.prototype.head,lo&&(D.prototype[lo]=rp),D},ml=Qv();Ii?((Ii.exports=ml)._=ml,ma._=ml):jt._=ml}).call(w8)}(Ip,Ip.exports)),Ip.exports}var Zx=S8();class k8{plugins={};activePlugins=[];listeners=new Set;register(t){this.plugins[t.name]={isActivated:!1,config:t},this.notify()}activate(t){const n=this.plugins[t];!n||n.isActivated||(n.isActivated=!0,n.config.onActivate&&n.config.onActivate(),this.produceActivePlugins(),this.notify())}deactivate(t){const n=this.plugins[t];!n||!n.isActivated||(n.isActivated=!1,n.config.onDeactivate&&n.config.onDeactivate(),this.produceActivePlugins(),this.notify())}isPluginActivated(t){const n=this.plugins[t];return!!n&&n.isActivated}getPlugin(t){const n=this.plugins[t];return!n||!n.isActivated?null:n}getActivePlugins(){return this.activePlugins}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}produceActivePlugins(){this.activePlugins=Zx.transform(this.plugins,(t,n)=>{n.isActivated&&t.push(n.config)},[])}}const Ji=new k8;const d2="FeedbackFormPlugin",p2={name:d2,components:{FeedbackForm:k.lazy(()=>ta(()=>import("./FeedbackForm-DFwtFn3g.js"),__vite__mapDeps([0,1,2])))}},h2="ChatOptionsPlugin",m2={name:h2,components:{ChatOptionsForm:k.lazy(()=>ta(()=>import("./ChatOptionsForm-D2-2zwqJ.js"),__vite__mapDeps([3,1,2])))}},g2=k.createContext(void 0),v2="SharePluginName",y2={name:v2,components:{ShareButton:k.lazy(()=>ta(()=>import("./ShareButton-BdhRQHuN.js"),__vite__mapDeps([4,2])))}},qk=e=>{let t;const n=new Set,r=(h,m)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(x=>x(t,b))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,i,c);return c},Yk=e=>e?qk(e):qk,C8=e=>e;function E8(e,t=C8){const n=We.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return We.useDebugValue(n),n}const or=[];for(let e=0;e<256;++e)or.push((e+256).toString(16).slice(1));function P8(e,t=0){return(or[e[t+0]]+or[e[t+1]]+or[e[t+2]]+or[e[t+3]]+"-"+or[e[t+4]]+or[e[t+5]]+"-"+or[e[t+6]]+or[e[t+7]]+"-"+or[e[t+8]]+or[e[t+9]]+"-"+or[e[t+10]]+or[e[t+11]]+or[e[t+12]]+or[e[t+13]]+or[e[t+14]]+or[e[t+15]]).toLowerCase()}let h0;const T8=new Uint8Array(16);function _8(){if(!h0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");h0=crypto.getRandomValues.bind(crypto)}return h0(T8)}const I8=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xk={randomUUID:I8};function b2(e,t,n){if(Xk.randomUUID&&!e)return Xk.randomUUID();e=e||{};const r=e.random??e.rng?.()??_8();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,P8(r)}var x2=Symbol.for("immer-nothing"),Qk=Symbol.for("immer-draftable"),Ci=Symbol.for("immer-state");function Po(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ef=Object.getPrototypeOf;function Pf(e){return!!e&&!!e[Ci]}function xu(e){return e?w2(e)||Array.isArray(e)||!!e[Qk]||!!e.constructor?.[Qk]||yv(e)||bv(e):!1}var $8=Object.prototype.constructor.toString();function w2(e){if(!e||typeof e!="object")return!1;const t=Ef(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===$8}function Wg(e,t){vv(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function vv(e){const t=e[Ci];return t?t.type_:Array.isArray(e)?1:yv(e)?2:bv(e)?3:0}function Rb(e,t){return vv(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function S2(e,t,n){const r=vv(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function A8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function yv(e){return e instanceof Map}function bv(e){return e instanceof Set}function uu(e){return e.copy_||e.base_}function Lb(e,t){if(yv(e))return new Map(e);if(bv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=w2(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ci];let i=Reflect.ownKeys(r);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=R8),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ew(r,!0))),e}function R8(){Po(2)}function xv(e){return Object.isFrozen(e)}var L8={};function wu(e){const t=L8[e];return t||Po(0,e),t}var ih;function k2(){return ih}function M8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Jk(e,t){t&&(wu("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Mb(e){Db(e),e.drafts_.forEach(D8),e.drafts_=null}function Db(e){e===ih&&(ih=e.parent_)}function Zk(e){return ih=M8(ih,e)}function D8(e){const t=e[Ci];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function eC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ci].modified_&&(Mb(t),Po(4)),xu(e)&&(e=Hg(t,e),t.parent_||Gg(t,e)),t.patches_&&wu("Patches").generateReplacementPatches_(n[Ci].base_,e,t.patches_,t.inversePatches_)):e=Hg(t,n,[]),Mb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==x2?e:void 0}function Hg(e,t,n){if(xv(t))return t;const r=t[Ci];if(!r)return Wg(t,(i,s)=>tC(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Gg(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,a=!1;r.type_===3&&(s=new Set(i),i.clear(),a=!0),Wg(s,(c,d)=>tC(e,r,i,c,d,n,a)),Gg(e,i,!1),n&&e.patches_&&wu("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function tC(e,t,n,r,i,s,a){if(Pf(i)){const c=s&&t&&t.type_!==3&&!Rb(t.assigned_,r)?s.concat(r):void 0,d=Hg(e,i,c);if(S2(n,r,d),Pf(d))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(xu(i)&&!xv(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Hg(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Gg(e,i)}}function Gg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ew(t,n)}function N8(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:k2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=tw;n&&(i=[r],s=oh);const{revoke:a,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=a,c}var tw={get(e,t){if(t===Ci)return e;const n=uu(e);if(!Rb(n,t))return F8(e,n,t);const r=n[t];return e.finalized_||!xu(r)?r:r===m0(e.base_,t)?(g0(e),e.copy_[t]=Fb(r,e)):r},has(e,t){return t in uu(e)},ownKeys(e){return Reflect.ownKeys(uu(e))},set(e,t,n){const r=C2(uu(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=m0(uu(e),t),s=i?.[Ci];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(A8(n,i)&&(n!==void 0||Rb(e.base_,t)))return!0;g0(e),Nb(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return m0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,g0(e),Nb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=uu(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Po(11)},getPrototypeOf(e){return Ef(e.base_)},setPrototypeOf(){Po(12)}},oh={};Wg(tw,(e,t)=>{oh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});oh.deleteProperty=function(e,t){return oh.set.call(this,e,t,void 0)};oh.set=function(e,t,n){return tw.set.call(this,e[0],t,n,e[0])};function m0(e,t){const n=e[Ci];return(n?uu(n):e)[t]}function F8(e,t,n){const r=C2(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function C2(e,t){if(!(t in e))return;let n=Ef(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ef(n)}}function Nb(e){e.modified_||(e.modified_=!0,e.parent_&&Nb(e.parent_))}function g0(e){e.copy_||(e.copy_=Lb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var O8=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(d=s,...h){return a.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&Po(6),r!==void 0&&typeof r!="function"&&Po(7);let i;if(xu(t)){const s=Zk(this),a=Fb(t,void 0);let c=!0;try{i=n(a),c=!1}finally{c?Mb(s):Db(s)}return Jk(s,r),eC(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===x2&&(i=void 0),this.autoFreeze_&&ew(i,!0),r){const s=[],a=[];wu("Patches").generateReplacementPatches_(t,i,s,a),r(s,a)}return i}else Po(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,d=>t(d,...c));let r,i;return[this.produce(t,n,(a,c)=>{r=a,i=c}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){xu(e)||Po(8),Pf(e)&&(e=z8(e));const t=Zk(this),n=Fb(e,void 0);return n[Ci].isManual_=!0,Db(t),n}finishDraft(e,t){const n=e&&e[Ci];(!n||!n.isManual_)&&Po(9);const{scope_:r}=n;return Jk(r,t),eC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=wu("Patches").applyPatches_;return Pf(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Fb(e,t){const n=yv(e)?wu("MapSet").proxyMap_(e,t):bv(e)?wu("MapSet").proxySet_(e,t):N8(e,t);return(t?t.scope_:k2()).drafts_.push(n),n}function z8(e){return Pf(e)||Po(10,e),E2(e)}function E2(e){if(!xu(e)||xv(e))return e;const t=e[Ci];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Lb(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Lb(e,!0);return Wg(n,(r,i)=>{S2(n,r,E2(i))}),t&&(t.finalized_=!1),n}var Ei=new O8,Ob=Ei.produce;Ei.produceWithPatches.bind(Ei);Ei.setAutoFreeze.bind(Ei);Ei.setUseStrictShallowCopy.bind(Ei);Ei.applyPatches.bind(Ei);Ei.createDraft.bind(Ei);Ei.finishDraft.bind(Ei);function B8(e){return Object.values(e).map(t=>({role:t.role,content:t.content}))}function j8(){const e=k.useContext(Y_);if(!e)throw new Error("useThemeContext must be used within a ThemeContextProvider");return e}const _g=e=>F.jsx(k6,{delay:300,closeDelay:0,...e}),nw=()=>{const e=k.useContext(g2);if(!e)throw new Error("useChat must be used within a ConfigContextProvider");return e},V8=e=>typeof e=="boolean"||e instanceof Boolean,U8=e=>typeof e=="number"||e instanceof Number,K8=e=>typeof e=="bigint"||e instanceof BigInt,P2=e=>!!e&&e instanceof Date,W8=e=>typeof e=="string"||e instanceof String,H8=e=>Array.isArray(e),G8=e=>typeof e=="object"&&e!==null,T2=e=>!!e&&e instanceof Object&&typeof e=="function";function qg(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function q8(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}function _2(e){let{field:t,value:n,data:r,lastElement:i,openBracket:s,closeBracket:a,level:c,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:b}=e;const x=k.useRef(!1),[S,P]=k.useState(()=>h(c,n,t)),_=k.useRef(null);k.useEffect(()=>{x.current?P(h(c,n,t)):x.current=!0},[h]);const T=k.useId();if(r.length===0)return Y8({field:t,openBracket:s,closeBracket:a,lastElement:i,style:d});const R=S?d.collapseIcon:d.expandIcon,L=S?d.ariaLables.collapseJson:d.ariaLables.expandJson,B=c+1,W=r.length-1,M=ae=>{S!==ae&&(!b||b({level:c,value:n,field:t,newExpandValue:ae}))&&P(ae)},Z=ae=>{if(ae.key==="ArrowRight"||ae.key==="ArrowLeft")ae.preventDefault(),M(ae.key==="ArrowRight");else if(ae.key==="ArrowUp"||ae.key==="ArrowDown"){ae.preventDefault();const O=ae.key==="ArrowUp"?-1:1;if(!g.current)return;const U=g.current.querySelectorAll("[role=button]");let X=-1;for(let G=0;G{var ae;M(!S);const O=_.current;if(!O)return;const U=(ae=g.current)===null||ae===void 0?void 0:ae.querySelector('[role=button][tabindex="0"]');U&&(U.tabIndex=-1),O.tabIndex=0,O.focus()};return k.createElement("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":S,"aria-selected":void 0},k.createElement("span",{className:R,onClick:re,onKeyDown:Z,role:"button","aria-label":L,"aria-expanded":S,"aria-controls":S?T:void 0,ref:_,tabIndex:c===0?0:-1}),(t||t==="")&&(m?k.createElement("span",{className:d.clickableLabel,onClick:re,onKeyDown:Z},qg(t,d.quotesForFieldNames),":"):k.createElement("span",{className:d.label},qg(t,d.quotesForFieldNames),":")),k.createElement("span",{className:d.punctuation},s),S?k.createElement("ul",{id:T,role:"group",className:d.childFieldsContainer},r.map((ae,O)=>k.createElement(I2,{key:ae[0]||O,field:ae[0],value:ae[1],style:d,lastElement:O===W,level:B,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}))):k.createElement("span",{className:d.collapsedContent,onClick:re,onKeyDown:Z}),k.createElement("span",{className:d.punctuation},a),!i&&k.createElement("span",{className:d.punctuation},","))}function Y8(e){let{field:t,openBracket:n,closeBracket:r,lastElement:i,style:s}=e;return k.createElement("div",{className:s.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&k.createElement("span",{className:s.label},qg(t,s.quotesForFieldNames),":"),k.createElement("span",{className:s.punctuation},n),k.createElement("span",{className:s.punctuation},r),!i&&k.createElement("span",{className:s.punctuation},","))}function X8(e){let{field:t,value:n,style:r,lastElement:i,shouldExpandNode:s,clickToExpandNode:a,level:c,outerRef:d,beforeExpandChange:h}=e;return _2({field:t,value:n,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:s,clickToExpandNode:a,data:Object.keys(n).map(m=>[m,n[m]]),outerRef:d,beforeExpandChange:h})}function Q8(e){let{field:t,value:n,style:r,lastElement:i,level:s,shouldExpandNode:a,clickToExpandNode:c,outerRef:d,beforeExpandChange:h}=e;return _2({field:t,value:n,lastElement:i||!1,level:s,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:c,data:n.map(m=>[void 0,m]),outerRef:d,beforeExpandChange:h})}function J8(e){let{field:t,value:n,style:r,lastElement:i}=e,s,a=r.otherValue;return n===null?(s="null",a=r.nullValue):n===void 0?(s="undefined",a=r.undefinedValue):W8(n)?(s=q8(n,!r.noQuotesForStringValues,r.stringifyStringValues),a=r.stringValue):V8(n)?(s=n?"true":"false",a=r.booleanValue):U8(n)?(s=n.toString(),a=r.numberValue):K8(n)?(s=`${n.toString()}n`,a=r.numberValue):P2(n)?s=n.toISOString():T2(n)?s="function() { }":s=n.toString(),k.createElement("div",{className:r.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&k.createElement("span",{className:r.label},qg(t,r.quotesForFieldNames),":"),k.createElement("span",{className:a},s),!i&&k.createElement("span",{className:r.punctuation},","))}function I2(e){const t=e.value;return H8(t)?k.createElement(Q8,Object.assign({},e)):G8(t)&&!P2(t)&&!T2(t)?k.createElement(X8,Object.assign({},e)):k.createElement(J8,Object.assign({},e))}var Ar={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const Z8={collapseJson:"collapse JSON",expandJson:"expand JSON"},qi={container:Ar["container-light"],basicChildStyle:Ar["basic-element-style"],childFieldsContainer:Ar["child-fields-container"],label:Ar["label-light"],clickableLabel:Ar["clickable-label-light"],nullValue:Ar["value-null-light"],undefinedValue:Ar["value-undefined-light"],stringValue:Ar["value-string-light"],booleanValue:Ar["value-boolean-light"],numberValue:Ar["value-number-light"],otherValue:Ar["value-other-light"],punctuation:Ar["punctuation-light"],collapseIcon:Ar["collapse-icon-light"],expandIcon:Ar["expand-icon-light"],collapsedContent:Ar["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:Z8,stringifyStringValues:!1},$p=()=>!0,pg=e=>{let{data:t,style:n=qi,shouldExpandNode:r=$p,clickToExpandNode:i=!1,beforeExpandChange:s,...a}=e;const c=k.useRef(null);return k.createElement("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:c,role:"tree"}),k.createElement(I2,{value:t,style:{...qi,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:i,outerRef:c,beforeExpandChange:s}))};function e7(e){return typeof e=="string"?e:`map:${String(e)}`}function ql(e,t=new WeakSet){if(e===null||typeof e!="object")return typeof e=="bigint"?e.toString():typeof e>"u"||typeof e=="function"?void 0:e;if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Date)return e.toISOString();if(e instanceof Map){const r={};for(const[i,s]of e.entries())r[e7(i)]=ql(s,t);return r}if(e instanceof Set)return Array.from(e).map(r=>ql(r,t));if(Array.isArray(e))return e.map(r=>ql(r,t));const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const i=ql(e[r],t);i!==void 0&&(n[r]=i)}return n}const nC=e=>Symbol.iterator in e,rC=e=>"entries"in e,iC=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[i,s]of n)if(!Object.is(s,r.get(i)))return!1;return!0},t7=(e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let i=n.next(),s=r.next();for(;!i.done&&!s.done;){if(!Object.is(i.value,s.value))return!1;i=n.next(),s=r.next()}return!!i.done&&!!s.done};function n7(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:nC(e)&&nC(t)?rC(e)&&rC(t)?iC(e,t):t7(e,t):iC({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function gh(e){const t=We.useRef(void 0);return n=>{const r=e(n);return n7(t.current,r)?t.current:t.current=r}}const $2=k.createContext(null),tl=e=>{const t=k.useContext($2);if(!t)throw new Error("useHistoryStore must be used within a HistoryStoreContextProvider");return E8(t,e)},wv=()=>tl(e=>e.actions),HH=()=>tl(e=>e.primitives),Yl=e=>tl(gh(t=>e(t.primitives.getCurrentConversation()))),A2=e=>tl(t=>e?t.primitives.getCurrentConversation().history[e]:void 0),r7=()=>tl(gh(e=>Object.keys(e.primitives.getCurrentConversation().history))),i7=()=>tl(gh(e=>Object.values(e.primitives.getCurrentConversation().history))),hg={container:"max-w-full overflow-auto rounded bg-default p-2 font-mono font-normal",label:`${qi.label} !text-default-900`,collapseIcon:`${qi.collapseIcon} !text-default-900`,expandIcon:`${qi.expandIcon} !text-default-900`,collapsedContent:`${qi.collapsedContent} !text-default-900`,punctuation:"!text-default-900",stringValue:`${qi.stringValue} !text-green-600`,otherValue:`${qi.otherValue} !text-purple-500`,numberValue:`${qi.numberValue}`,nullValue:`${qi.nullValue}`,booleanValue:`${qi.booleanValue} !text-yellow-600`,undefinedValue:`${qi.undefinedValue}`};function o7({isOpen:e}){const t=Yl(s=>s.history),n=Yl(s=>s.followupMessages),r=Yl(s=>s.eventsLog),i=tl(gh(s=>s.computed.getContext()));return F.jsx(Rf,{children:e&&F.jsx(cf.div,{initial:{scale:.6,opacity:0,width:0},animate:{scale:1,opacity:1,width:"100%"},exit:{scale:.6,opacity:0,width:0},className:"w-full max-w-[33%] overflow-hidden px-4",children:F.jsxs("div",{className:"rounded-medium border-small border-divider mr-4 h-full overflow-auto","data-testid":"debug-panel",children:[F.jsx("div",{className:"border-b-small border-divider min-h-16 p-4 text-lg font-bold",children:F.jsx("span",{children:"Debug"})}),F.jsxs(wk,{className:"max-h-full",children:[F.jsx(hp,{"aria-label":"Context",title:"Context",children:F.jsx("div",{className:"max-h-[664px] overflow-auto",children:F.jsx(pg,{data:ql(i)??{},shouldExpandNode:$p,style:hg})})},"context"),F.jsx(hp,{"aria-label":"History",title:"History",children:F.jsx("div",{className:"max-h-[664px] overflow-auto",children:F.jsx(pg,{data:ql(t)??{},shouldExpandNode:$p,style:hg})})},"history"),F.jsx(hp,{"aria-label":"Followup messages",title:"Followup messages",children:F.jsx("div",{className:"max-h-[664px] overflow-auto",children:F.jsx(pg,{data:ql(n)??{},shouldExpandNode:$p,style:hg})})},"folowup-messages"),F.jsx(hp,{"aria-label":"Events",title:"Events",children:r.length===0?F.jsx("p",{children:"No events in the log"}):F.jsx(wk,{children:r.map((s,a)=>F.jsx(hp,{"aria-label":`Events for response number ${a+1}`,title:`Events for response number ${a+1}`,children:F.jsx(pg,{data:ql(s)??{},shouldExpandNode:$p,style:hg})},`events-${a+1}`))})},"events")]})]})})})}const R2=e=>{const t=r=>Ji.subscribe(r),n=()=>Ji.getPlugin(e);return k.useSyncExternalStore(t,n)},Yg=({plugin:e,component:t,skeletonSize:n,disableSkeleton:r,componentProps:i})=>{const s=R2(e.name),a=n?{width:n.width,height:n.height}:{};if(!s)return null;const c=s.config.components[t];try{return F.jsx(k.Suspense,{fallback:r?null:F.jsx(fz,{className:"rounded-lg",style:a}),children:F.jsx(c,{...i||{}})})}catch(d){return console.error(d),null}};/** * react-router v7.7.1 * * Copyright (c) Remix Software Inc. @@ -88,35 +88,35 @@ function print() { __p += __j.call(arguments, '') } * LICENSE.md file in the root directory of this source tree. * * @license MIT - */var lC="popstate";function l7(e={}){function t(r,i){let{pathname:s,search:a,hash:c}=r.location;return Bb("",{pathname:s,search:a,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:sh(i)}return u7(t,n,null,e)}function $n(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Io(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function a7(){return Math.random().toString(36).substring(2,10)}function aC(e,t){return{usr:e.state,key:e.key,idx:t}}function Bb(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?vh(t):t,state:n,key:t&&t.key||r||a7()}}function sh({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function vh(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function u7(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,c="POP",d=null,h=m();h==null&&(h=0,a.replaceState({...a.state,idx:h},""));function m(){return(a.state||{idx:null}).idx}function g(){c="POP";let _=m(),T=_==null?null:_-h;h=_,d&&d({action:c,location:P.location,delta:T})}function b(_,T){c="PUSH";let R=Bb(P.location,_,T);h=m()+1;let L=aC(R,h),B=P.createHref(R);try{a.pushState(L,"",B)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;i.location.assign(B)}s&&d&&d({action:c,location:P.location,delta:1})}function x(_,T){c="REPLACE";let R=Bb(P.location,_,T);h=m();let L=aC(R,h),B=P.createHref(R);a.replaceState(L,"",B),s&&d&&d({action:c,location:P.location,delta:0})}function S(_){return c7(_)}let P={get action(){return c},get location(){return e(i,a)},listen(_){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(lC,g),d=_,()=>{i.removeEventListener(lC,g),d=null}},createHref(_){return t(i,_)},createURL:S,encodeLocation(_){let T=S(_);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:x,go(_){return a.go(_)}};return P}function c7(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),$n(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:sh(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function D2(e,t,n="/"){return f7(e,t,n,!1)}function f7(e,t,n,r){let i=typeof t=="string"?vh(t):t,s=Js(i.pathname||"/",n);if(s==null)return null;let a=N2(e);d7(a);let c=null;for(let d=0;c==null&&d{let d={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};d.relativePath.startsWith("/")&&($n(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let h=Xs([r,d.relativePath]),m=n.concat(d);s.children&&s.children.length>0&&($n(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),N2(s.children,t,m,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:b7(h,s.index),routesMeta:m})};return e.forEach((s,a)=>{if(s.path===""||!s.path?.includes("?"))i(s,a);else for(let c of F2(s.path))i(s,a,c)}),t}function F2(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=F2(r.join("/")),c=[];return c.push(...a.map(d=>d===""?s:[s,d].join("/"))),i&&c.push(...a),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function d7(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:x7(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var p7=/^:[\w-]+$/,h7=3,m7=2,g7=1,v7=10,y7=-2,uC=e=>e==="*";function b7(e,t){let n=e.split("/"),r=n.length;return n.some(uC)&&(r+=y7),t&&(r+=m7),n.filter(i=>!uC(i)).reduce((i,s)=>i+(p7.test(s)?h7:s===""?g7:v7),r)}function x7(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function w7(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",a=[];for(let c=0;c{if(m==="*"){let S=c[b]||"";a=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const x=c[b];return g&&!x?h[m]=void 0:h[m]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:a,pattern:e}}function S7(e,t=!1,n=!0){Io(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function k7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Io(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Js(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function C7(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?vh(e):e;return{pathname:n?n.startsWith("/")?n:E7(n,t):t,search:_7(r),hash:I7(i)}}function E7(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function v0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function P7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function iw(e){let t=P7(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function ow(e,t,n,r=!1){let i;typeof e=="string"?i=vh(e):(i={...e},$n(!i.pathname||!i.pathname.includes("?"),v0("?","pathname","search",i)),$n(!i.pathname||!i.pathname.includes("#"),v0("#","pathname","hash",i)),$n(!i.search||!i.search.includes("#"),v0("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,c;if(a==null)c=n;else{let g=t.length-1;if(!r&&a.startsWith("..")){let b=a.split("/");for(;b[0]==="..";)b.shift(),g-=1;i.pathname=b.join("/")}c=g>=0?t[g]:"/"}let d=C7(i,c),h=a&&a!=="/"&&a.endsWith("/"),m=(s||a===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var Xs=e=>e.join("/").replace(/\/\/+/g,"/"),T7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var O2=["POST","PUT","PATCH","DELETE"];new Set(O2);var A7=["GET",...O2];new Set(A7);var Df=k.createContext(null);Df.displayName="DataRouter";var Sv=k.createContext(null);Sv.displayName="DataRouterState";k.createContext(!1);var z2=k.createContext({isTransitioning:!1});z2.displayName="ViewTransition";var R7=k.createContext(new Map);R7.displayName="Fetchers";var L7=k.createContext(null);L7.displayName="Await";var $o=k.createContext(null);$o.displayName="Navigation";var kv=k.createContext(null);kv.displayName="Location";var to=k.createContext({outlet:null,matches:[],isDataRoute:!1});to.displayName="Route";var sw=k.createContext(null);sw.displayName="RouteError";function M7(e,{relative:t}={}){$n(Nf(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=k.useContext($o),{hash:i,pathname:s,search:a}=yh(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:Xs([n,s])),r.createHref({pathname:c,search:a,hash:i})}function Nf(){return k.useContext(kv)!=null}function ra(){return $n(Nf(),"useLocation() may be used only in the context of a component."),k.useContext(kv).location}var B2="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function j2(e){k.useContext($o).static||k.useLayoutEffect(e)}function V2(){let{isDataRoute:e}=k.useContext(to);return e?Y7():D7()}function D7(){$n(Nf(),"useNavigate() may be used only in the context of a component.");let e=k.useContext(Df),{basename:t,navigator:n}=k.useContext($o),{matches:r}=k.useContext(to),{pathname:i}=ra(),s=JSON.stringify(iw(r)),a=k.useRef(!1);return j2(()=>{a.current=!0}),k.useCallback((d,h={})=>{if(Io(a.current,B2),!a.current)return;if(typeof d=="number"){n.go(d);return}let m=ow(d,JSON.parse(s),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Xs([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,i,e])}var N7=k.createContext(null);function F7(e){let t=k.useContext(to).outlet;return t&&k.createElement(N7.Provider,{value:e},t)}function U2(){let{matches:e}=k.useContext(to),t=e[e.length-1];return t?t.params:{}}function yh(e,{relative:t}={}){let{matches:n}=k.useContext(to),{pathname:r}=ra(),i=JSON.stringify(iw(n));return k.useMemo(()=>ow(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function O7(e,t){return K2(e)}function K2(e,t,n,r){$n(Nf(),"useRoutes() may be used only in the context of a component.");let{navigator:i}=k.useContext($o),{matches:s}=k.useContext(to),a=s[s.length-1],c=a?a.params:{},d=a?a.pathname:"/",h=a?a.pathnameBase:"/",m=a&&a.route;{let T=m&&m.path||"";W2(d,!m||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${d}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + */var oC="popstate";function s7(e={}){function t(r,i){let{pathname:s,search:a,hash:c}=r.location;return zb("",{pathname:s,search:a,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:sh(i)}return a7(t,n,null,e)}function $n(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Io(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function l7(){return Math.random().toString(36).substring(2,10)}function sC(e,t){return{usr:e.state,key:e.key,idx:t}}function zb(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?vh(t):t,state:n,key:t&&t.key||r||l7()}}function sh({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function vh(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function a7(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,c="POP",d=null,h=m();h==null&&(h=0,a.replaceState({...a.state,idx:h},""));function m(){return(a.state||{idx:null}).idx}function g(){c="POP";let _=m(),T=_==null?null:_-h;h=_,d&&d({action:c,location:P.location,delta:T})}function b(_,T){c="PUSH";let R=zb(P.location,_,T);h=m()+1;let L=sC(R,h),B=P.createHref(R);try{a.pushState(L,"",B)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;i.location.assign(B)}s&&d&&d({action:c,location:P.location,delta:1})}function x(_,T){c="REPLACE";let R=zb(P.location,_,T);h=m();let L=sC(R,h),B=P.createHref(R);a.replaceState(L,"",B),s&&d&&d({action:c,location:P.location,delta:0})}function S(_){return u7(_)}let P={get action(){return c},get location(){return e(i,a)},listen(_){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(oC,g),d=_,()=>{i.removeEventListener(oC,g),d=null}},createHref(_){return t(i,_)},createURL:S,encodeLocation(_){let T=S(_);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:x,go(_){return a.go(_)}};return P}function u7(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),$n(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:sh(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function L2(e,t,n="/"){return c7(e,t,n,!1)}function c7(e,t,n,r){let i=typeof t=="string"?vh(t):t,s=Js(i.pathname||"/",n);if(s==null)return null;let a=M2(e);f7(a);let c=null;for(let d=0;c==null&&d{let d={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};d.relativePath.startsWith("/")&&($n(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length));let h=Xs([r,d.relativePath]),m=n.concat(d);s.children&&s.children.length>0&&($n(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),M2(s.children,t,m,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:y7(h,s.index),routesMeta:m})};return e.forEach((s,a)=>{if(s.path===""||!s.path?.includes("?"))i(s,a);else for(let c of D2(s.path))i(s,a,c)}),t}function D2(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=D2(r.join("/")),c=[];return c.push(...a.map(d=>d===""?s:[s,d].join("/"))),i&&c.push(...a),c.map(d=>e.startsWith("/")&&d===""?"/":d)}function f7(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:b7(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var d7=/^:[\w-]+$/,p7=3,h7=2,m7=1,g7=10,v7=-2,lC=e=>e==="*";function y7(e,t){let n=e.split("/"),r=n.length;return n.some(lC)&&(r+=v7),t&&(r+=h7),n.filter(i=>!lC(i)).reduce((i,s)=>i+(d7.test(s)?p7:s===""?m7:g7),r)}function b7(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function x7(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",a=[];for(let c=0;c{if(m==="*"){let S=c[b]||"";a=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const x=c[b];return g&&!x?h[m]=void 0:h[m]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:a,pattern:e}}function w7(e,t=!1,n=!0){Io(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,c,d)=>(r.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function S7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Io(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Js(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function k7(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?vh(e):e;return{pathname:n?n.startsWith("/")?n:C7(n,t):t,search:T7(r),hash:_7(i)}}function C7(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function v0(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function E7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function rw(e){let t=E7(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function iw(e,t,n,r=!1){let i;typeof e=="string"?i=vh(e):(i={...e},$n(!i.pathname||!i.pathname.includes("?"),v0("?","pathname","search",i)),$n(!i.pathname||!i.pathname.includes("#"),v0("#","pathname","hash",i)),$n(!i.search||!i.search.includes("#"),v0("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,c;if(a==null)c=n;else{let g=t.length-1;if(!r&&a.startsWith("..")){let b=a.split("/");for(;b[0]==="..";)b.shift(),g-=1;i.pathname=b.join("/")}c=g>=0?t[g]:"/"}let d=k7(i,c),h=a&&a!=="/"&&a.endsWith("/"),m=(s||a===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(h||m)&&(d.pathname+="/"),d}var Xs=e=>e.join("/").replace(/\/\/+/g,"/"),P7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),T7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function I7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var N2=["POST","PUT","PATCH","DELETE"];new Set(N2);var $7=["GET",...N2];new Set($7);var Df=k.createContext(null);Df.displayName="DataRouter";var Sv=k.createContext(null);Sv.displayName="DataRouterState";k.createContext(!1);var F2=k.createContext({isTransitioning:!1});F2.displayName="ViewTransition";var A7=k.createContext(new Map);A7.displayName="Fetchers";var R7=k.createContext(null);R7.displayName="Await";var $o=k.createContext(null);$o.displayName="Navigation";var kv=k.createContext(null);kv.displayName="Location";var to=k.createContext({outlet:null,matches:[],isDataRoute:!1});to.displayName="Route";var ow=k.createContext(null);ow.displayName="RouteError";function L7(e,{relative:t}={}){$n(Nf(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=k.useContext($o),{hash:i,pathname:s,search:a}=yh(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:Xs([n,s])),r.createHref({pathname:c,search:a,hash:i})}function Nf(){return k.useContext(kv)!=null}function na(){return $n(Nf(),"useLocation() may be used only in the context of a component."),k.useContext(kv).location}var O2="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function z2(e){k.useContext($o).static||k.useLayoutEffect(e)}function B2(){let{isDataRoute:e}=k.useContext(to);return e?q7():M7()}function M7(){$n(Nf(),"useNavigate() may be used only in the context of a component.");let e=k.useContext(Df),{basename:t,navigator:n}=k.useContext($o),{matches:r}=k.useContext(to),{pathname:i}=na(),s=JSON.stringify(rw(r)),a=k.useRef(!1);return z2(()=>{a.current=!0}),k.useCallback((d,h={})=>{if(Io(a.current,O2),!a.current)return;if(typeof d=="number"){n.go(d);return}let m=iw(d,JSON.parse(s),i,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:Xs([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,s,i,e])}var D7=k.createContext(null);function N7(e){let t=k.useContext(to).outlet;return t&&k.createElement(D7.Provider,{value:e},t)}function j2(){let{matches:e}=k.useContext(to),t=e[e.length-1];return t?t.params:{}}function yh(e,{relative:t}={}){let{matches:n}=k.useContext(to),{pathname:r}=na(),i=JSON.stringify(rw(n));return k.useMemo(()=>iw(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function F7(e,t){return V2(e)}function V2(e,t,n,r){$n(Nf(),"useRoutes() may be used only in the context of a component.");let{navigator:i}=k.useContext($o),{matches:s}=k.useContext(to),a=s[s.length-1],c=a?a.params:{},d=a?a.pathname:"/",h=a?a.pathnameBase:"/",m=a&&a.route;{let T=m&&m.path||"";U2(d,!m||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${d}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let g=ra(),b;b=g;let x=b.pathname||"/",S=x;if(h!=="/"){let T=h.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(T.length).join("/")}let P=D2(e,{pathname:S});return Io(m||P!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Io(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),U7(P&&P.map(T=>Object.assign({},T,{params:Object.assign({},c,T.params),pathname:Xs([h,i.encodeLocation?i.encodeLocation(T.pathname).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?h:Xs([h,i.encodeLocation?i.encodeLocation(T.pathnameBase).pathname:T.pathnameBase])})),s,n,r)}function z7(){let e=q7(),t=$7(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:s},"ErrorBoundary")," or"," ",k.createElement("code",{style:s},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,a)}var B7=k.createElement(z7,null),j7=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?k.createElement(to.Provider,{value:this.props.routeContext},k.createElement(sw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function V7({routeContext:e,match:t,children:n}){let r=k.useContext(Df);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement(to.Provider,{value:e},n)}function U7(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n?.errors;if(s!=null){let d=i.findIndex(h=>h.route.id&&s?.[h.route.id]!==void 0);$n(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,d+1))}let a=!1,c=-1;if(n)for(let d=0;d=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,h,m)=>{let g,b=!1,x=null,S=null;n&&(g=s&&h.route.id?s[h.route.id]:void 0,x=h.route.errorElement||B7,a&&(c<0&&m===0?(W2("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,S=null):c===m&&(b=!0,S=h.route.hydrateFallbackElement||null)));let P=t.concat(i.slice(0,m+1)),_=()=>{let T;return g?T=x:b?T=S:h.route.Component?T=k.createElement(h.route.Component,null):h.route.element?T=h.route.element:T=d,k.createElement(V7,{match:h,routeContext:{outlet:d,matches:P,isDataRoute:n!=null},children:T})};return n&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?k.createElement(j7,{location:n.location,revalidation:n.revalidation,component:x,error:g,children:_(),routeContext:{outlet:null,matches:P,isDataRoute:!0}}):_()},null)}function lw(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function K7(e){let t=k.useContext(Df);return $n(t,lw(e)),t}function W7(e){let t=k.useContext(Sv);return $n(t,lw(e)),t}function H7(e){let t=k.useContext(to);return $n(t,lw(e)),t}function aw(e){let t=H7(e),n=t.matches[t.matches.length-1];return $n(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function G7(){return aw("useRouteId")}function q7(){let e=k.useContext(sw),t=W7("useRouteError"),n=aw("useRouteError");return e!==void 0?e:t.errors?.[n]}function Y7(){let{router:e}=K7("useNavigate"),t=aw("useNavigate"),n=k.useRef(!1);return j2(()=>{n.current=!0}),k.useCallback(async(i,s={})=>{Io(n.current,B2),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var cC={};function W2(e,t,n){!t&&!cC[e]&&(cC[e]=!0,Io(!1,n))}k.memo(X7);function X7({routes:e,future:t,state:n}){return K2(e,void 0,n,t)}function Q7({to:e,replace:t,state:n,relative:r}){$n(Nf()," may be used only in the context of a component.");let{static:i}=k.useContext($o);Io(!i," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:s}=k.useContext(to),{pathname:a}=ra(),c=V2(),d=ow(e,iw(s),a,r==="path"),h=JSON.stringify(d);return k.useEffect(()=>{c(JSON.parse(h),{replace:t,state:n,relative:r})},[c,h,r,t,n]),null}function J7(e){return F7(e.context)}function Z7({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){$n(!Nf(),"You cannot render a inside another . You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),c=k.useMemo(()=>({basename:a,navigator:i,static:s,future:{}}),[a,i,s]);typeof n=="string"&&(n=vh(n));let{pathname:d="/",search:h="",hash:m="",state:g=null,key:b="default"}=n,x=k.useMemo(()=>{let S=Js(d,a);return S==null?null:{location:{pathname:S,search:h,hash:m,state:g,key:b},navigationType:r}},[a,d,h,m,g,b,r]);return Io(x!=null,` is not able to match the URL "${d}${h}${m}" because it does not start with the basename, so the won't render anything.`),x==null?null:k.createElement($o.Provider,{value:c},k.createElement(kv.Provider,{children:t,value:x}))}var Ig="get",$g="application/x-www-form-urlencoded";function Cv(e){return e!=null&&typeof e.tagName=="string"}function e9(e){return Cv(e)&&e.tagName.toLowerCase()==="button"}function t9(e){return Cv(e)&&e.tagName.toLowerCase()==="form"}function n9(e){return Cv(e)&&e.tagName.toLowerCase()==="input"}function r9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function i9(e,t){return e.button===0&&(!t||t==="_self")&&!r9(e)}var mg=null;function o9(){if(mg===null)try{new FormData(document.createElement("form"),0),mg=!1}catch{mg=!0}return mg}var s9=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function y0(e){return e!=null&&!s9.has(e)?(Io(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${$g}"`),null):e}function l9(e,t){let n,r,i,s,a;if(t9(e)){let c=e.getAttribute("action");r=c?Js(c,t):null,n=e.getAttribute("method")||Ig,i=y0(e.getAttribute("enctype"))||$g,s=new FormData(e)}else if(e9(e)||n9(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a