diff --git a/.ci/windows_nightly_base_files/run_nvidia_gpu_fast_fp16_accumulation.bat b/.ci/windows_nightly_base_files/run_nvidia_gpu_fast_fp16_accumulation.bat new file mode 100644 index 000000000..38f06ecb2 --- /dev/null +++ b/.ci/windows_nightly_base_files/run_nvidia_gpu_fast_fp16_accumulation.bat @@ -0,0 +1,2 @@ +.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --fast fp16_accumulation +pause diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml index 4a5ba58f6..f7d30a9a4 100644 --- a/.github/workflows/stable-release.yml +++ b/.github/workflows/stable-release.yml @@ -12,7 +12,7 @@ on: description: 'CUDA version' required: true type: string - default: "124" + default: "126" python_minor: description: 'Python minor version' required: true @@ -22,7 +22,7 @@ on: description: 'Python patch version' required: true type: string - default: "8" + default: "9" jobs: diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 865e1ec25..419873ad8 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index b3a4b4ea0..78c918031 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.12' - name: Install requirements run: | python -m pip install --upgrade pip diff --git a/.github/workflows/update-frontend.yml b/.github/workflows/update-frontend.yml deleted file mode 100644 index 0c5774789..000000000 --- a/.github/workflows/update-frontend.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Update Frontend Release - -on: - workflow_dispatch: - inputs: - version: - description: "Frontend version to update to (e.g., 1.0.0)" - required: true - type: string - -jobs: - update-frontend: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - - steps: - - name: Checkout ComfyUI - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install requirements - run: | - python -m pip install --upgrade pip - pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu - pip install -r requirements.txt - pip install wait-for-it - # Frontend asset will be downloaded to ComfyUI/web_custom_versions/Comfy-Org_ComfyUI_frontend/{version} - - name: Start ComfyUI server - run: | - python main.py --cpu --front-end-version Comfy-Org/ComfyUI_frontend@${{ github.event.inputs.version }} 2>&1 | tee console_output.log & - wait-for-it --service 127.0.0.1:8188 -t 30 - - name: Configure Git - run: | - git config --global user.name "GitHub Action" - git config --global user.email "action@github.com" - # Replace existing frontend content with the new version and remove .js.map files - # See https://github.com/Comfy-Org/ComfyUI_frontend/issues/2145 for why we remove .js.map files - - name: Update frontend content - run: | - rm -rf web/ - cp -r web_custom_versions/Comfy-Org_ComfyUI_frontend/${{ github.event.inputs.version }} web/ - rm web/**/*.js.map - - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 - with: - token: ${{ secrets.PR_BOT_PAT }} - commit-message: "Update frontend to v${{ github.event.inputs.version }}" - title: "Frontend Update: v${{ github.event.inputs.version }}" - body: | - Automated PR to update frontend content to version ${{ github.event.inputs.version }} - - This PR was created automatically by the frontend update workflow. - branch: release-${{ github.event.inputs.version }} - base: master - labels: Frontend,dependencies diff --git a/.github/workflows/windows_release_dependencies.yml b/.github/workflows/windows_release_dependencies.yml index 6c7937ae2..7a8ec5782 100644 --- a/.github/workflows/windows_release_dependencies.yml +++ b/.github/workflows/windows_release_dependencies.yml @@ -17,7 +17,7 @@ on: description: 'cuda version' required: true type: string - default: "124" + default: "126" python_minor: description: 'python minor version' @@ -29,7 +29,7 @@ on: description: 'python patch version' required: true type: string - default: "8" + default: "9" # push: # branches: # - master diff --git a/.github/workflows/windows_release_nightly_pytorch.yml b/.github/workflows/windows_release_nightly_pytorch.yml index f90488705..24599249a 100644 --- a/.github/workflows/windows_release_nightly_pytorch.yml +++ b/.github/workflows/windows_release_nightly_pytorch.yml @@ -7,7 +7,7 @@ on: description: 'cuda version' required: true type: string - default: "126" + default: "128" python_minor: description: 'python minor version' @@ -19,7 +19,7 @@ on: description: 'python patch version' required: true type: string - default: "1" + default: "2" # push: # branches: # - master @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 30 persist-credentials: false - uses: actions/setup-python@v5 with: @@ -74,7 +74,7 @@ jobs: pause" > ./update/update_comfyui_and_python_dependencies.bat cd .. - "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=8 -mfb=64 -md=32m -ms=on -mf=BCJ2 ComfyUI_windows_portable_nightly_pytorch.7z ComfyUI_windows_portable_nightly_pytorch + "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=9 -mfb=128 -md=512m -ms=on -mf=BCJ2 ComfyUI_windows_portable_nightly_pytorch.7z ComfyUI_windows_portable_nightly_pytorch mv ComfyUI_windows_portable_nightly_pytorch.7z ComfyUI/ComfyUI_windows_portable_nvidia_or_cpu_nightly_pytorch.7z cd ComfyUI_windows_portable_nightly_pytorch diff --git a/.github/workflows/windows_release_package.yml b/.github/workflows/windows_release_package.yml index 24f928ee0..416544f71 100644 --- a/.github/workflows/windows_release_package.yml +++ b/.github/workflows/windows_release_package.yml @@ -7,7 +7,7 @@ on: description: 'cuda version' required: true type: string - default: "124" + default: "126" python_minor: description: 'python minor version' @@ -19,7 +19,7 @@ on: description: 'python patch version' required: true type: string - default: "8" + default: "9" # push: # branches: # - master diff --git a/CODEOWNERS b/CODEOWNERS index 814d1ecdc..72a59effe 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -11,13 +11,14 @@ /notebooks/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink /script_examples/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink /.github/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink +/requirements.txt @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink +/pyproject.toml @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata @Kosinkadink # Python web server /api_server/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata /app/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata +/utils/ @yoland68 @robinjhuang @huchenlei @webfiltered @pythongosssss @ltdrdata -# Frontend assets -/web/ @huchenlei @webfiltered @pythongosssss @yoland68 @robinjhuang - -# Extra nodes -/comfy_extras/ @yoland68 @robinjhuang @huchenlei @pythongosssss @ltdrdata @Kosinkadink +# Node developers +/comfy_extras/ @yoland68 @robinjhuang @huchenlei @pythongosssss @ltdrdata @Kosinkadink @webfiltered +/comfy/comfy_types/ @yoland68 @robinjhuang @huchenlei @pythongosssss @ltdrdata @Kosinkadink @webfiltered diff --git a/README.md b/README.md index fd21f5624..a807ea9d6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
# ComfyUI -**The most powerful and modular diffusion model GUI and backend.** +**The most powerful and modular visual AI engine and application.** [![Website][website-shield]][website-url] @@ -31,10 +31,24 @@ ![ComfyUI Screenshot](https://github.com/user-attachments/assets/7ccaf2c1-9b72-41ae-9a89-5688c94b7abe)
-This ui will let you design and execute advanced stable diffusion pipelines using a graph/nodes/flowchart based interface. For some workflow examples and see what ComfyUI can do you can check out: -### [ComfyUI Examples](https://comfyanonymous.github.io/ComfyUI_examples/) +ComfyUI lets you design and execute advanced stable diffusion pipelines using a graph/nodes/flowchart based interface. Available on Windows, Linux, and macOS. + +## Get Started + +#### [Desktop Application](https://www.comfy.org/download) +- The easiest way to get started. +- Available on Windows & macOS. + +#### [Windows Portable Package](#installing) +- Get the latest commits and completely portable. +- Available on Windows. + +#### [Manual Install](#manual-install-windows-linux) +Supports all operating systems and GPU types (NVIDIA, AMD, Intel, Apple Silicon, Ascend). + +## [Examples](https://comfyanonymous.github.io/ComfyUI_examples/) +See what ComfyUI can do with the [example workflows](https://comfyanonymous.github.io/ComfyUI_examples/). -### [Installing ComfyUI](#installing) ## Features - Nodes/graph/flowchart interface to experiment and create complex Stable Diffusion workflows without needing to code anything. @@ -47,12 +61,14 @@ This ui will let you design and execute advanced stable diffusion pipelines usin - [AuraFlow](https://comfyanonymous.github.io/ComfyUI_examples/aura_flow/) - [HunyuanDiT](https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_dit/) - [Flux](https://comfyanonymous.github.io/ComfyUI_examples/flux/) + - [Lumina Image 2.0](https://comfyanonymous.github.io/ComfyUI_examples/lumina2/) - Video Models - [Stable Video Diffusion](https://comfyanonymous.github.io/ComfyUI_examples/video/) - [Mochi](https://comfyanonymous.github.io/ComfyUI_examples/mochi/) - [LTX-Video](https://comfyanonymous.github.io/ComfyUI_examples/ltxv/) - [Hunyuan Video](https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_video/) - [Nvidia Cosmos](https://comfyanonymous.github.io/ComfyUI_examples/cosmos/) + - [Wan 2.1](https://comfyanonymous.github.io/ComfyUI_examples/wan/) - [Stable Audio](https://comfyanonymous.github.io/ComfyUI_examples/audio/) - Asynchronous Queue system - Many optimizations: Only re-executes the parts of the workflow that changes between executions. @@ -120,7 +136,7 @@ Workflow examples can be found on the [Examples page](https://comfyanonymous.git # Installing -## Windows +## Windows Portable There is a portable standalone build for Windows that should work for running on Nvidia GPUs or for running on your CPU only on the [releases page](https://github.com/comfyanonymous/ComfyUI/releases). @@ -130,6 +146,8 @@ Simply download, extract with [7-Zip](https://7-zip.org) and run. Make sure you If you have trouble extracting it, right click the file -> properties -> unblock +If you have a 50 series Blackwell card like a 5090 or 5080 see [this discussion thread](https://github.com/comfyanonymous/ComfyUI/discussions/6643) + #### How do I share models between another UI and ComfyUI? See the [Config file](extra_model_paths.yaml.example) to set the search paths for models. In the standalone windows build you can find this file in the ComfyUI directory. Rename this file to extra_model_paths.yaml and edit it with your favorite text editor. @@ -138,9 +156,18 @@ See the [Config file](extra_model_paths.yaml.example) to set the search paths fo To run it on services like paperspace, kaggle or colab you can use my [Jupyter Notebook](notebooks/comfyui_colab.ipynb) + +## [comfy-cli](https://docs.comfy.org/comfy-cli/getting-started) + +You can install and start ComfyUI using comfy-cli: +```bash +pip install comfy-cli +comfy install +``` + ## Manual Install (Windows, Linux) -Note that some dependencies do not yet support python 3.13 so using 3.12 is recommended. +python 3.13 is supported but using 3.12 is recommended because some custom nodes and their dependencies might not support it yet. Git clone this repo. @@ -152,11 +179,11 @@ Put your VAE in: models/vae ### AMD GPUs (Linux only) AMD users can install rocm and pytorch with pip if you don't have it already installed, this is the command to install the stable version: -```pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2``` +```pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2.4``` -This is the command to install the nightly with ROCm 6.2 which might have some performance improvements: +This is the command to install the nightly with ROCm 6.3 which might have some performance improvements: -```pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm6.2.4``` +```pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm6.3``` ### Intel GPUs (Windows and Linux) @@ -186,11 +213,11 @@ Additional discussion and help can be found [here](https://github.com/comfyanony Nvidia users should install stable pytorch using this command: -```pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu124``` +```pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu126``` -This is the command to install pytorch nightly instead which might have performance improvements: +This is the command to install pytorch nightly instead which supports the new blackwell 50xx series GPUs and might have performance improvements. -```pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu126``` +```pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128``` #### Troubleshooting @@ -234,6 +261,13 @@ For models compatible with Ascend Extension for PyTorch (torch_npu). To get star 3. Next, install the necessary packages for torch-npu by adhering to the platform-specific instructions on the [Installation](https://ascend.github.io/docs/sources/pytorch/install.html#pytorch) page. 4. Finally, adhere to the [ComfyUI manual installation](#manual-install-windows-linux) guide for Linux. Once all components are installed, you can run ComfyUI as described earlier. +#### Cambricon MLUs + +For models compatible with Cambricon Extension for PyTorch (torch_mlu). Here's a step-by-step guide tailored to your platform and installation method: + +1. Install the Cambricon CNToolkit by adhering to the platform-specific instructions on the [Installation](https://www.cambricon.com/docs/sdk_1.15.0/cntoolkit_3.7.2/cntoolkit_install_3.7.2/index.html) +2. Next, install the PyTorch(torch_mlu) following the instructions on the [Installation](https://www.cambricon.com/docs/sdk_1.15.0/cambricon_pytorch_1.17.0/user_guide_1.9/index.html) +3. Launch ComfyUI by running `python main.py` # Running @@ -290,6 +324,8 @@ Use `--tls-keyfile key.pem --tls-certfile cert.pem` to enable TLS/SSL, the app w ## Support and dev channel +[Discord](https://comfy.org/discord): Try the #help or #feedback channels. + [Matrix space: #comfyui_space:matrix.org](https://app.element.io/#/room/%23comfyui_space%3Amatrix.org) (it's like discord but open source). See also: [https://www.comfy.org/](https://www.comfy.org/) @@ -306,7 +342,7 @@ For any bugs, issues, or feature requests related to the frontend, please use th The new frontend is now the default for ComfyUI. However, please note: -1. The frontend in the main ComfyUI repository is updated weekly. +1. The frontend in the main ComfyUI repository is updated fortnightly. 2. Daily releases are available in the separate frontend repository. To use the most up-to-date frontend version: @@ -323,7 +359,7 @@ To use the most up-to-date frontend version: --front-end-version Comfy-Org/ComfyUI_frontend@1.2.2 ``` -This approach allows you to easily switch between the stable weekly release and the cutting-edge daily updates, or even specific versions for testing purposes. +This approach allows you to easily switch between the stable fortnightly release and the cutting-edge daily updates, or even specific versions for testing purposes. ### Accessing the Legacy Frontend diff --git a/api_server/routes/internal/internal_routes.py b/api_server/routes/internal/internal_routes.py index 8f74529ba..613b0f7c7 100644 --- a/api_server/routes/internal/internal_routes.py +++ b/api_server/routes/internal/internal_routes.py @@ -1,9 +1,9 @@ from aiohttp import web from typing import Optional -from folder_paths import models_dir, user_directory, output_directory, folder_names_and_paths -from api_server.services.file_service import FileService +from folder_paths import folder_names_and_paths, get_directory_by_type from api_server.services.terminal_service import TerminalService import app.logger +import os class InternalRoutes: ''' @@ -15,26 +15,10 @@ class InternalRoutes: def __init__(self, prompt_server): self.routes: web.RouteTableDef = web.RouteTableDef() self._app: Optional[web.Application] = None - self.file_service = FileService({ - "models": models_dir, - "user": user_directory, - "output": output_directory - }) self.prompt_server = prompt_server self.terminal_service = TerminalService(prompt_server) def setup_routes(self): - @self.routes.get('/files') - async def list_files(request): - directory_key = request.query.get('directory', '') - try: - file_list = self.file_service.list_files(directory_key) - return web.json_response({"files": file_list}) - except ValueError as e: - return web.json_response({"error": str(e)}, status=400) - except Exception as e: - return web.json_response({"error": str(e)}, status=500) - @self.routes.get('/logs') async def get_logs(request): return web.json_response("".join([(l["t"] + " - " + l["m"]) for l in app.logger.get_logs()])) @@ -67,6 +51,20 @@ class InternalRoutes: response[key] = folder_names_and_paths[key][0] return web.json_response(response) + @self.routes.get('/files/{directory_type}') + async def get_files(request: web.Request) -> web.Response: + directory_type = request.match_info['directory_type'] + if directory_type not in ("output", "input", "temp"): + return web.json_response({"error": "Invalid directory type"}, status=400) + + directory = get_directory_by_type(directory_type) + sorted_files = sorted( + (entry for entry in os.scandir(directory) if entry.is_file()), + key=lambda entry: -entry.stat().st_mtime + ) + return web.json_response([entry.name for entry in sorted_files], status=200) + + def get_app(self): if self._app is None: self._app = web.Application() diff --git a/api_server/services/file_service.py b/api_server/services/file_service.py deleted file mode 100644 index 115edccd3..000000000 --- a/api_server/services/file_service.py +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Dict, List, Optional -from api_server.utils.file_operations import FileSystemOperations, FileSystemItem - -class FileService: - def __init__(self, allowed_directories: Dict[str, str], file_system_ops: Optional[FileSystemOperations] = None): - self.allowed_directories: Dict[str, str] = allowed_directories - self.file_system_ops: FileSystemOperations = file_system_ops or FileSystemOperations() - - def list_files(self, directory_key: str) -> List[FileSystemItem]: - if directory_key not in self.allowed_directories: - raise ValueError("Invalid directory key") - directory_path: str = self.allowed_directories[directory_key] - return self.file_system_ops.walk_directory(directory_path) diff --git a/app/custom_node_manager.py b/app/custom_node_manager.py index 7f9f645cd..42b0d75ba 100644 --- a/app/custom_node_manager.py +++ b/app/custom_node_manager.py @@ -4,12 +4,93 @@ import os import folder_paths import glob from aiohttp import web +import json +import logging +from functools import lru_cache + +from utils.json_util import merge_json_recursive + + +# Extra locale files to load into main.json +EXTRA_LOCALE_FILES = [ + "nodeDefs.json", + "commands.json", + "settings.json", +] + + +def safe_load_json_file(file_path: str) -> dict: + if not os.path.exists(file_path): + return {} + + try: + with open(file_path, "r", encoding="utf-8") as f: + return json.load(f) + except json.JSONDecodeError: + logging.error(f"Error loading {file_path}") + return {} + class CustomNodeManager: - """ - Placeholder to refactor the custom node management features from ComfyUI-Manager. - Currently it only contains the custom workflow templates feature. - """ + @lru_cache(maxsize=1) + def build_translations(self): + """Load all custom nodes translations during initialization. Translations are + expected to be loaded from `locales/` folder. + + The folder structure is expected to be the following: + - custom_nodes/ + - custom_node_1/ + - locales/ + - en/ + - main.json + - commands.json + - settings.json + + returned translations are expected to be in the following format: + { + "en": { + "nodeDefs": {...}, + "commands": {...}, + "settings": {...}, + ...{other main.json keys} + } + } + """ + + translations = {} + + for folder in folder_paths.get_folder_paths("custom_nodes"): + # Sort glob results for deterministic ordering + for custom_node_dir in sorted(glob.glob(os.path.join(folder, "*/"))): + locales_dir = os.path.join(custom_node_dir, "locales") + if not os.path.exists(locales_dir): + continue + + for lang_dir in glob.glob(os.path.join(locales_dir, "*/")): + lang_code = os.path.basename(os.path.dirname(lang_dir)) + + if lang_code not in translations: + translations[lang_code] = {} + + # Load main.json + main_file = os.path.join(lang_dir, "main.json") + node_translations = safe_load_json_file(main_file) + + # Load extra locale files + for extra_file in EXTRA_LOCALE_FILES: + extra_file_path = os.path.join(lang_dir, extra_file) + key = extra_file.split(".")[0] + json_data = safe_load_json_file(extra_file_path) + if json_data: + node_translations[key] = json_data + + if node_translations: + translations[lang_code] = merge_json_recursive( + translations[lang_code], node_translations + ) + + return translations + def add_routes(self, routes, webapp, loadedModules): @routes.get("/workflow_templates") @@ -18,17 +99,36 @@ class CustomNodeManager: files = [ file for folder in folder_paths.get_folder_paths("custom_nodes") - for file in glob.glob(os.path.join(folder, '*/example_workflows/*.json')) + for file in glob.glob( + os.path.join(folder, "*/example_workflows/*.json") + ) ] - workflow_templates_dict = {} # custom_nodes folder name -> example workflow names + workflow_templates_dict = ( + {} + ) # custom_nodes folder name -> example workflow names for file in files: - custom_nodes_name = os.path.basename(os.path.dirname(os.path.dirname(file))) + custom_nodes_name = os.path.basename( + os.path.dirname(os.path.dirname(file)) + ) workflow_name = os.path.splitext(os.path.basename(file))[0] - workflow_templates_dict.setdefault(custom_nodes_name, []).append(workflow_name) + workflow_templates_dict.setdefault(custom_nodes_name, []).append( + workflow_name + ) return web.json_response(workflow_templates_dict) # Serve workflow templates from custom nodes. for module_name, module_dir in loadedModules: - workflows_dir = os.path.join(module_dir, 'example_workflows') + workflows_dir = os.path.join(module_dir, "example_workflows") if os.path.exists(workflows_dir): - webapp.add_routes([web.static('/api/workflow_templates/' + module_name, workflows_dir)]) + webapp.add_routes( + [ + web.static( + "/api/workflow_templates/" + module_name, workflows_dir + ) + ] + ) + + @routes.get("/i18n") + async def get_i18n(request): + """Returns translations from all custom nodes' locales folders.""" + return web.json_response(self.build_translations()) diff --git a/app/frontend_management.py b/app/frontend_management.py index 6f20e439c..b4ba994d1 100644 --- a/app/frontend_management.py +++ b/app/frontend_management.py @@ -3,16 +3,51 @@ import argparse import logging import os import re +import sys import tempfile import zipfile +import importlib from dataclasses import dataclass from functools import cached_property from pathlib import Path from typing import TypedDict, Optional +from importlib.metadata import version import requests from typing_extensions import NotRequired + from comfy.cli_args import DEFAULT_VERSION_STRING +import app.logger + +# The path to the requirements.txt file +req_path = Path(__file__).parents[1] / "requirements.txt" + +def frontend_install_warning_message(): + """The warning message to display when the frontend version is not up to date.""" + + extra = "" + if sys.flags.no_user_site: + extra = "-s " + return f"Please install the updated requirements.txt file by running:\n{sys.executable} {extra}-m pip install -r {req_path}\n\nThis error is happening because the ComfyUI frontend is no longer shipped as part of the main repo but as a pip package instead.\n\nIf you are on the portable package you can run: update\\update_comfyui.bat to solve this problem" + + +def check_frontend_version(): + """Check if the frontend version is up to date.""" + + def parse_version(version: str) -> tuple[int, int, int]: + return tuple(map(int, version.split("."))) + + try: + frontend_version_str = version("comfyui-frontend-package") + frontend_version = parse_version(frontend_version_str) + with open(req_path, "r", encoding="utf-8") as f: + required_frontend = parse_version(f.readline().split("=")[-1]) + if frontend_version < required_frontend: + app.logger.log_startup_warning("________________________________________________________________________\nWARNING WARNING WARNING WARNING WARNING\n\nInstalled frontend version {} is lower than the recommended version {}.\n\n{}\n________________________________________________________________________".format('.'.join(map(str, frontend_version)), '.'.join(map(str, required_frontend)), frontend_install_warning_message())) + else: + logging.info("ComfyUI frontend version: {}".format(frontend_version_str)) + except Exception as e: + logging.error(f"Failed to check frontend version: {e}") REQUEST_TIMEOUT = 10 # seconds @@ -109,9 +144,17 @@ def download_release_asset_zip(release: Release, destination_path: str) -> None: class FrontendManager: - DEFAULT_FRONTEND_PATH = str(Path(__file__).parents[1] / "web") CUSTOM_FRONTENDS_ROOT = str(Path(__file__).parents[1] / "web_custom_versions") + @classmethod + def default_frontend_path(cls) -> str: + try: + import comfyui_frontend_package + return str(importlib.resources.files(comfyui_frontend_package) / "static") + except ImportError: + logging.error(f"\n\n********** ERROR ***********\n\ncomfyui-frontend-package is not installed. {frontend_install_warning_message()}\n********** ERROR **********\n") + sys.exit(-1) + @classmethod def parse_version_string(cls, value: str) -> tuple[str, str, str]: """ @@ -148,7 +191,8 @@ class FrontendManager: main error source might be request timeout or invalid URL. """ if version_string == DEFAULT_VERSION_STRING: - return cls.DEFAULT_FRONTEND_PATH + check_frontend_version() + return cls.default_frontend_path() repo_owner, repo_name, version = cls.parse_version_string(version_string) @@ -201,4 +245,5 @@ class FrontendManager: except Exception as e: logging.error("Failed to initialize frontend: %s", e) logging.info("Falling back to the default frontend.") - return cls.DEFAULT_FRONTEND_PATH + check_frontend_version() + return cls.default_frontend_path() diff --git a/app/logger.py b/app/logger.py index 9e9f84ccf..3d26d98fe 100644 --- a/app/logger.py +++ b/app/logger.py @@ -82,3 +82,17 @@ def setup_logger(log_level: str = 'INFO', capacity: int = 300, use_stdout: bool logger.addHandler(stdout_handler) logger.addHandler(stream_handler) + + +STARTUP_WARNINGS = [] + + +def log_startup_warning(msg): + logging.warning(msg) + STARTUP_WARNINGS.append(msg) + + +def print_startup_warnings(): + for s in STARTUP_WARNINGS: + logging.warning(s) + STARTUP_WARNINGS.clear() diff --git a/comfy/cli_args.py b/comfy/cli_args.py index 812798bf8..91c1fe705 100644 --- a/comfy/cli_args.py +++ b/comfy/cli_args.py @@ -1,7 +1,6 @@ import argparse import enum import os -from typing import Optional import comfy.options @@ -43,10 +42,11 @@ parser.add_argument("--tls-certfile", type=str, help="Path to TLS (SSL) certific parser.add_argument("--enable-cors-header", type=str, default=None, metavar="ORIGIN", nargs="?", const="*", help="Enable CORS (Cross-Origin Resource Sharing) with optional origin or allow all with default '*'.") parser.add_argument("--max-upload-size", type=float, default=100, help="Set the maximum upload size in MB.") +parser.add_argument("--base-directory", type=str, default=None, help="Set the ComfyUI base directory for models, custom_nodes, input, output, temp, and user directories.") parser.add_argument("--extra-model-paths-config", type=str, default=None, metavar="PATH", nargs='+', action='append', help="Load one or more extra_model_paths.yaml files.") -parser.add_argument("--output-directory", type=str, default=None, help="Set the ComfyUI output directory.") -parser.add_argument("--temp-directory", type=str, default=None, help="Set the ComfyUI temp directory (default is in the ComfyUI directory).") -parser.add_argument("--input-directory", type=str, default=None, help="Set the ComfyUI input directory.") +parser.add_argument("--output-directory", type=str, default=None, help="Set the ComfyUI output directory. Overrides --base-directory.") +parser.add_argument("--temp-directory", type=str, default=None, help="Set the ComfyUI temp directory (default is in the ComfyUI directory). Overrides --base-directory.") +parser.add_argument("--input-directory", type=str, default=None, help="Set the ComfyUI input directory. Overrides --base-directory.") parser.add_argument("--auto-launch", action="store_true", help="Automatically launch ComfyUI in the default browser.") parser.add_argument("--disable-auto-launch", action="store_true", help="Disable auto launching the browser.") parser.add_argument("--cuda-device", type=int, default=None, metavar="DEVICE_ID", help="Set the id of the cuda device this instance will use.") @@ -106,6 +106,7 @@ attn_group.add_argument("--use-split-cross-attention", action="store_true", help attn_group.add_argument("--use-quad-cross-attention", action="store_true", help="Use the sub-quadratic cross attention optimization . Ignored when xformers is used.") attn_group.add_argument("--use-pytorch-cross-attention", action="store_true", help="Use the new pytorch 2.0 cross attention function.") attn_group.add_argument("--use-sage-attention", action="store_true", help="Use sage attention.") +attn_group.add_argument("--use-flash-attention", action="store_true", help="Use FlashAttention.") parser.add_argument("--disable-xformers", action="store_true", help="Disable xformers.") @@ -129,7 +130,12 @@ parser.add_argument("--default-hashing-function", type=str, choices=['md5', 'sha parser.add_argument("--disable-smart-memory", action="store_true", help="Force ComfyUI to agressively offload to regular ram instead of keeping models in vram when it can.") parser.add_argument("--deterministic", action="store_true", help="Make pytorch use slower deterministic algorithms when it can. Note that this might not make images deterministic in all cases.") -parser.add_argument("--fast", action="store_true", help="Enable some untested and potentially quality deteriorating optimizations.") + +class PerformanceFeature(enum.Enum): + Fp16Accumulation = "fp16_accumulation" + Fp8MatrixMultiplication = "fp8_matrix_mult" + +parser.add_argument("--fast", nargs="*", type=PerformanceFeature, help="Enable some untested and potentially quality deteriorating optimizations. --fast with no arguments enables everything. You can pass a list specific optimizations if you only want to enable specific ones. Current valid optimizations: fp16_accumulation fp8_matrix_mult") parser.add_argument("--dont-print-server", action="store_true", help="Don't print server output.") parser.add_argument("--quick-test-for-ci", action="store_true", help="Quick test for CI.") @@ -160,13 +166,14 @@ parser.add_argument( """, ) -def is_valid_directory(path: Optional[str]) -> Optional[str]: - """Validate if the given path is a directory.""" - if path is None: - return None - +def is_valid_directory(path: str) -> str: + """Validate if the given path is a directory, and check permissions.""" + if not os.path.exists(path): + raise argparse.ArgumentTypeError(f"The path '{path}' does not exist.") if not os.path.isdir(path): - raise argparse.ArgumentTypeError(f"{path} is not a valid directory.") + raise argparse.ArgumentTypeError(f"'{path}' is not a directory.") + if not os.access(path, os.R_OK): + raise argparse.ArgumentTypeError(f"You do not have read permissions for '{path}'.") return path parser.add_argument( @@ -176,7 +183,9 @@ parser.add_argument( help="The local filesystem path to the directory where the frontend is located. Overrides --front-end-version.", ) -parser.add_argument("--user-directory", type=is_valid_directory, default=None, help="Set the ComfyUI user directory with an absolute path.") +parser.add_argument("--user-directory", type=is_valid_directory, default=None, help="Set the ComfyUI user directory with an absolute path. Overrides --base-directory.") + +parser.add_argument("--enable-compress-response-body", action="store_true", help="Enable compressing response body.") if comfy.options.args_parsing: args = parser.parse_args() @@ -188,3 +197,17 @@ if args.windows_standalone_build: if args.disable_auto_launch: args.auto_launch = False + +if args.force_fp16: + args.fp16_unet = True + + +# '--fast' is not provided, use an empty set +if args.fast is None: + args.fast = set() +# '--fast' is provided with an empty list, enable all optimizations +elif args.fast == []: + args.fast = set(PerformanceFeature) +# '--fast' is provided with a list of performance features, use that list +else: + args.fast = set(args.fast) diff --git a/comfy/clip_model.py b/comfy/clip_model.py index 23ddea9c0..c8294d483 100644 --- a/comfy/clip_model.py +++ b/comfy/clip_model.py @@ -97,14 +97,19 @@ class CLIPTextModel_(torch.nn.Module): self.encoder = CLIPEncoder(num_layers, embed_dim, heads, intermediate_size, intermediate_activation, dtype, device, operations) self.final_layer_norm = operations.LayerNorm(embed_dim, dtype=dtype, device=device) - def forward(self, input_tokens, attention_mask=None, intermediate_output=None, final_layer_norm_intermediate=True, dtype=torch.float32): - x = self.embeddings(input_tokens, dtype=dtype) + def forward(self, input_tokens=None, attention_mask=None, embeds=None, num_tokens=None, intermediate_output=None, final_layer_norm_intermediate=True, dtype=torch.float32): + if embeds is not None: + x = embeds + comfy.ops.cast_to(self.embeddings.position_embedding.weight, dtype=dtype, device=embeds.device) + else: + x = self.embeddings(input_tokens, dtype=dtype) + mask = None if attention_mask is not None: mask = 1.0 - attention_mask.to(x.dtype).reshape((attention_mask.shape[0], 1, -1, attention_mask.shape[-1])).expand(attention_mask.shape[0], 1, attention_mask.shape[-1], attention_mask.shape[-1]) - mask = mask.masked_fill(mask.to(torch.bool), float("-inf")) + mask = mask.masked_fill(mask.to(torch.bool), -torch.finfo(x.dtype).max) + + causal_mask = torch.full((x.shape[1], x.shape[1]), -torch.finfo(x.dtype).max, dtype=x.dtype, device=x.device).triu_(1) - causal_mask = torch.empty(x.shape[1], x.shape[1], dtype=x.dtype, device=x.device).fill_(float("-inf")).triu_(1) if mask is not None: mask += causal_mask else: @@ -115,7 +120,10 @@ class CLIPTextModel_(torch.nn.Module): if i is not None and final_layer_norm_intermediate: i = self.final_layer_norm(i) - pooled_output = x[torch.arange(x.shape[0], device=x.device), (torch.round(input_tokens).to(dtype=torch.int, device=x.device) == self.eos_token_id).int().argmax(dim=-1),] + if num_tokens is not None: + pooled_output = x[list(range(x.shape[0])), list(map(lambda a: a - 1, num_tokens))] + else: + pooled_output = x[torch.arange(x.shape[0], device=x.device), (torch.round(input_tokens).to(dtype=torch.int, device=x.device) == self.eos_token_id).int().argmax(dim=-1),] return x, i, pooled_output class CLIPTextModel(torch.nn.Module): @@ -203,6 +211,15 @@ class CLIPVision(torch.nn.Module): pooled_output = self.post_layernorm(x[:, 0, :]) return x, i, pooled_output +class LlavaProjector(torch.nn.Module): + def __init__(self, in_dim, out_dim, dtype, device, operations): + super().__init__() + self.linear_1 = operations.Linear(in_dim, out_dim, bias=True, device=device, dtype=dtype) + self.linear_2 = operations.Linear(out_dim, out_dim, bias=True, device=device, dtype=dtype) + + def forward(self, x): + return self.linear_2(torch.nn.functional.gelu(self.linear_1(x[:, 1:]))) + class CLIPVisionModelProjection(torch.nn.Module): def __init__(self, config_dict, dtype, device, operations): super().__init__() @@ -212,7 +229,16 @@ class CLIPVisionModelProjection(torch.nn.Module): else: self.visual_projection = lambda a: a + if "llava3" == config_dict.get("projector_type", None): + self.multi_modal_projector = LlavaProjector(config_dict["hidden_size"], 4096, dtype, device, operations) + else: + self.multi_modal_projector = None + def forward(self, *args, **kwargs): x = self.vision_model(*args, **kwargs) out = self.visual_projection(x[2]) - return (x[0], x[1], out) + projected = None + if self.multi_modal_projector is not None: + projected = self.multi_modal_projector(x[1]) + + return (x[0], x[1], out, projected) diff --git a/comfy/clip_vision.py b/comfy/clip_vision.py index c9c82e9ad..297b3bca3 100644 --- a/comfy/clip_vision.py +++ b/comfy/clip_vision.py @@ -65,6 +65,7 @@ class ClipVisionModel(): outputs["last_hidden_state"] = out[0].to(comfy.model_management.intermediate_device()) outputs["image_embeds"] = out[2].to(comfy.model_management.intermediate_device()) outputs["penultimate_hidden_states"] = out[1].to(comfy.model_management.intermediate_device()) + outputs["mm_projected"] = out[3] return outputs def convert_to_transformers(sd, prefix): @@ -104,7 +105,10 @@ def load_clipvision_from_sd(sd, prefix="", convert_keys=False): if sd["vision_model.encoder.layers.0.layer_norm1.weight"].shape[0] == 1152: json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_siglip_384.json") elif sd["vision_model.embeddings.position_embedding.weight"].shape[0] == 577: - json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_vitl_336.json") + if "multi_modal_projector.linear_1.bias" in sd: + json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_vitl_336_llava.json") + else: + json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_vitl_336.json") else: json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_vitl.json") else: diff --git a/comfy/clip_vision_config_vitl_336_llava.json b/comfy/clip_vision_config_vitl_336_llava.json new file mode 100644 index 000000000..f23a50d8b --- /dev/null +++ b/comfy/clip_vision_config_vitl_336_llava.json @@ -0,0 +1,19 @@ +{ + "attention_dropout": 0.0, + "dropout": 0.0, + "hidden_act": "quick_gelu", + "hidden_size": 1024, + "image_size": 336, + "initializer_factor": 1.0, + "initializer_range": 0.02, + "intermediate_size": 4096, + "layer_norm_eps": 1e-5, + "model_type": "clip_vision_model", + "num_attention_heads": 16, + "num_channels": 3, + "num_hidden_layers": 24, + "patch_size": 14, + "projection_dim": 768, + "projector_type": "llava3", + "torch_dtype": "float32" +} diff --git a/comfy/comfy_types/__init__.py b/comfy/comfy_types/__init__.py index 19ec33f98..7640fbe3f 100644 --- a/comfy/comfy_types/__init__.py +++ b/comfy/comfy_types/__init__.py @@ -1,6 +1,6 @@ import torch from typing import Callable, Protocol, TypedDict, Optional, List -from .node_typing import IO, InputTypeDict, ComfyNodeABC, CheckLazyMixin +from .node_typing import IO, InputTypeDict, ComfyNodeABC, CheckLazyMixin, FileLocator class UnetApplyFunction(Protocol): @@ -42,4 +42,5 @@ __all__ = [ InputTypeDict.__name__, ComfyNodeABC.__name__, CheckLazyMixin.__name__, + FileLocator.__name__, ] diff --git a/comfy/comfy_types/node_typing.py b/comfy/comfy_types/node_typing.py index 056b1aa65..1b71208d4 100644 --- a/comfy/comfy_types/node_typing.py +++ b/comfy/comfy_types/node_typing.py @@ -2,6 +2,7 @@ from __future__ import annotations from typing import Literal, TypedDict +from typing_extensions import NotRequired from abc import ABC, abstractmethod from enum import Enum @@ -26,6 +27,7 @@ class IO(StrEnum): BOOLEAN = "BOOLEAN" INT = "INT" FLOAT = "FLOAT" + COMBO = "COMBO" CONDITIONING = "CONDITIONING" SAMPLER = "SAMPLER" SIGMAS = "SIGMAS" @@ -67,12 +69,34 @@ class IO(StrEnum): return not (b.issubset(a) or a.issubset(b)) +class RemoteInputOptions(TypedDict): + route: str + """The route to the remote source.""" + refresh_button: bool + """Specifies whether to show a refresh button in the UI below the widget.""" + control_after_refresh: Literal["first", "last"] + """Specifies the control after the refresh button is clicked. If "first", the first item will be automatically selected, and so on.""" + timeout: int + """The maximum amount of time to wait for a response from the remote source in milliseconds.""" + max_retries: int + """The maximum number of retries before aborting the request.""" + refresh: int + """The TTL of the remote input's value in milliseconds. Specifies the interval at which the remote input's value is refreshed.""" + + +class MultiSelectOptions(TypedDict): + placeholder: NotRequired[str] + """The placeholder text to display in the multi-select widget when no items are selected.""" + chip: NotRequired[bool] + """Specifies whether to use chips instead of comma separated values for the multi-select widget.""" + + class InputTypeOptions(TypedDict): """Provides type hinting for the return type of the INPUT_TYPES node function. Due to IDE limitations with unions, for now all options are available for all types (e.g. `label_on` is hinted even when the type is not `IO.BOOLEAN`). - Comfy Docs: https://docs.comfy.org/essentials/custom_node_datatypes + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/datatypes """ default: bool | str | float | int | list | tuple @@ -101,7 +125,7 @@ class InputTypeOptions(TypedDict): # default: bool label_on: str """The label to use in the UI when the bool is True (``BOOLEAN``)""" - label_on: str + label_off: str """The label to use in the UI when the bool is False (``BOOLEAN``)""" # class InputTypeString(InputTypeOptions): # default: str @@ -113,6 +137,29 @@ class InputTypeOptions(TypedDict): # defaultVal: str dynamicPrompts: bool """Causes the front-end to evaluate dynamic prompts (``STRING``)""" + # class InputTypeCombo(InputTypeOptions): + image_upload: bool + """Specifies whether the input should have an image upload button and image preview attached to it. Requires that the input's name is `image`.""" + image_folder: Literal["input", "output", "temp"] + """Specifies which folder to get preview images from if the input has the ``image_upload`` flag. + """ + remote: RemoteInputOptions + """Specifies the configuration for a remote input. + Available after ComfyUI frontend v1.9.7 + https://github.com/Comfy-Org/ComfyUI_frontend/pull/2422""" + control_after_generate: bool + """Specifies whether a control widget should be added to the input, adding options to automatically change the value after each prompt is queued. Currently only used for INT and COMBO types.""" + options: NotRequired[list[str | int | float]] + """COMBO type only. Specifies the selectable options for the combo widget. + Prefer: + ["COMBO", {"options": ["Option 1", "Option 2", "Option 3"]}] + Over: + [["Option 1", "Option 2", "Option 3"]] + """ + multi_select: NotRequired[MultiSelectOptions] + """COMBO type only. Specifies the configuration for a multi-select widget. + Available after ComfyUI frontend v1.13.4 + https://github.com/Comfy-Org/ComfyUI_frontend/pull/2987""" class HiddenInputTypeDict(TypedDict): @@ -133,7 +180,7 @@ class HiddenInputTypeDict(TypedDict): class InputTypeDict(TypedDict): """Provides type hinting for node INPUT_TYPES. - Comfy Docs: https://docs.comfy.org/essentials/custom_node_more_on_inputs + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/more_on_inputs """ required: dict[str, tuple[IO, InputTypeOptions]] @@ -143,14 +190,14 @@ class InputTypeDict(TypedDict): hidden: HiddenInputTypeDict """Offers advanced functionality and server-client communication. - Comfy Docs: https://docs.comfy.org/essentials/custom_node_more_on_inputs#hidden-inputs + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/more_on_inputs#hidden-inputs """ class ComfyNodeABC(ABC): """Abstract base class for Comfy nodes. Includes the names and expected types of attributes. - Comfy Docs: https://docs.comfy.org/essentials/custom_node_server_overview + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/server_overview """ DESCRIPTION: str @@ -167,7 +214,7 @@ class ComfyNodeABC(ABC): CATEGORY: str """The category of the node, as per the "Add Node" menu. - Comfy Docs: https://docs.comfy.org/essentials/custom_node_server_overview#category + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/server_overview#category """ EXPERIMENTAL: bool """Flags a node as experimental, informing users that it may change or not work as expected.""" @@ -181,9 +228,9 @@ class ComfyNodeABC(ABC): * Must include the ``required`` key, which describes all inputs that must be connected for the node to execute. * The ``optional`` key can be added to describe inputs which do not need to be connected. - * The ``hidden`` key offers some advanced functionality. More info at: https://docs.comfy.org/essentials/custom_node_more_on_inputs#hidden-inputs + * The ``hidden`` key offers some advanced functionality. More info at: https://docs.comfy.org/custom-nodes/backend/more_on_inputs#hidden-inputs - Comfy Docs: https://docs.comfy.org/essentials/custom_node_server_overview#input-types + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/server_overview#input-types """ return {"required": {}} @@ -198,7 +245,7 @@ class ComfyNodeABC(ABC): By default, a node is not considered an output. Set ``OUTPUT_NODE = True`` to specify that it is. - Comfy Docs: https://docs.comfy.org/essentials/custom_node_server_overview#output-node + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/server_overview#output-node """ INPUT_IS_LIST: bool """A flag indicating if this node implements the additional code necessary to deal with OUTPUT_IS_LIST nodes. @@ -209,7 +256,7 @@ class ComfyNodeABC(ABC): A node can also override the default input behaviour and receive the whole list in a single call. This is done by setting a class attribute `INPUT_IS_LIST` to ``True``. - Comfy Docs: https://docs.comfy.org/essentials/custom_node_lists#list-processing + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/lists#list-processing """ OUTPUT_IS_LIST: tuple[bool] """A tuple indicating which node outputs are lists, but will be connected to nodes that expect individual items. @@ -227,7 +274,7 @@ class ComfyNodeABC(ABC): the node should provide a class attribute `OUTPUT_IS_LIST`, which is a ``tuple[bool]``, of the same length as `RETURN_TYPES`, specifying which outputs which should be so treated. - Comfy Docs: https://docs.comfy.org/essentials/custom_node_lists#list-processing + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/lists#list-processing """ RETURN_TYPES: tuple[IO] @@ -237,19 +284,19 @@ class ComfyNodeABC(ABC): RETURN_TYPES = (IO.INT, "INT", "CUSTOM_TYPE") - Comfy Docs: https://docs.comfy.org/essentials/custom_node_server_overview#return-types + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/server_overview#return-types """ RETURN_NAMES: tuple[str] """The output slot names for each item in `RETURN_TYPES`, e.g. ``RETURN_NAMES = ("count", "filter_string")`` - Comfy Docs: https://docs.comfy.org/essentials/custom_node_server_overview#return-names + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/server_overview#return-names """ OUTPUT_TOOLTIPS: tuple[str] """A tuple of strings to use as tooltips for node outputs, one for each item in `RETURN_TYPES`.""" FUNCTION: str """The name of the function to execute as a literal string, e.g. `FUNCTION = "execute"` - Comfy Docs: https://docs.comfy.org/essentials/custom_node_server_overview#function + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/server_overview#function """ @@ -267,8 +314,19 @@ class CheckLazyMixin: Params should match the nodes execution ``FUNCTION`` (self, and all inputs by name). Will be executed repeatedly until it returns an empty list, or all requested items were already evaluated (and sent as params). - Comfy Docs: https://docs.comfy.org/essentials/custom_node_lazy_evaluation#defining-check-lazy-status + Comfy Docs: https://docs.comfy.org/custom-nodes/backend/lazy_evaluation#defining-check-lazy-status """ need = [name for name in kwargs if kwargs[name] is None] return need + + +class FileLocator(TypedDict): + """Provides type hinting for the file location""" + + filename: str + """The filename of the file.""" + subfolder: str + """The subfolder of the file.""" + type: Literal["input", "output", "temp"] + """The root folder of the file.""" diff --git a/comfy/conds.py b/comfy/conds.py index 660690af8..211fb8d57 100644 --- a/comfy/conds.py +++ b/comfy/conds.py @@ -3,9 +3,6 @@ import math import comfy.utils -def lcm(a, b): #TODO: eventually replace by math.lcm (added in python3.9) - return abs(a*b) // math.gcd(a, b) - class CONDRegular: def __init__(self, cond): self.cond = cond @@ -46,7 +43,7 @@ class CONDCrossAttn(CONDRegular): if s1[0] != s2[0] or s1[2] != s2[2]: #these 2 cases should not happen return False - mult_min = lcm(s1[1], s2[1]) + mult_min = math.lcm(s1[1], s2[1]) diff = mult_min // min(s1[1], s2[1]) if diff > 4: #arbitrary limit on the padding because it's probably going to impact performance negatively if it's too much return False @@ -57,7 +54,7 @@ class CONDCrossAttn(CONDRegular): crossattn_max_len = self.cond.shape[1] for x in others: c = x.cond - crossattn_max_len = lcm(crossattn_max_len, c.shape[1]) + crossattn_max_len = math.lcm(crossattn_max_len, c.shape[1]) conds.append(c) out = [] diff --git a/comfy/controlnet.py b/comfy/controlnet.py index ee29251b9..ceb24c852 100644 --- a/comfy/controlnet.py +++ b/comfy/controlnet.py @@ -418,10 +418,7 @@ def controlnet_config(sd, model_options={}): weight_dtype = comfy.utils.weight_dtype(sd) supported_inference_dtypes = list(model_config.supported_inference_dtypes) - if weight_dtype is not None: - supported_inference_dtypes.append(weight_dtype) - - unet_dtype = comfy.model_management.unet_dtype(model_params=-1, supported_dtypes=supported_inference_dtypes) + unet_dtype = comfy.model_management.unet_dtype(model_params=-1, supported_dtypes=supported_inference_dtypes, weight_dtype=weight_dtype) load_device = comfy.model_management.get_torch_device() manual_cast_dtype = comfy.model_management.unet_manual_cast(unet_dtype, load_device) @@ -689,10 +686,7 @@ def load_controlnet_state_dict(state_dict, model=None, model_options={}): if supported_inference_dtypes is None: supported_inference_dtypes = [comfy.model_management.unet_dtype()] - if weight_dtype is not None: - supported_inference_dtypes.append(weight_dtype) - - unet_dtype = comfy.model_management.unet_dtype(model_params=-1, supported_dtypes=supported_inference_dtypes) + unet_dtype = comfy.model_management.unet_dtype(model_params=-1, supported_dtypes=supported_inference_dtypes, weight_dtype=weight_dtype) load_device = comfy.model_management.get_torch_device() diff --git a/comfy/diffusers_convert.py b/comfy/diffusers_convert.py index 26e8d96d5..fb9495348 100644 --- a/comfy/diffusers_convert.py +++ b/comfy/diffusers_convert.py @@ -4,105 +4,6 @@ import logging # conversion code from https://github.com/huggingface/diffusers/blob/main/scripts/convert_diffusers_to_original_stable_diffusion.py -# =================# -# UNet Conversion # -# =================# - -unet_conversion_map = [ - # (stable-diffusion, HF Diffusers) - ("time_embed.0.weight", "time_embedding.linear_1.weight"), - ("time_embed.0.bias", "time_embedding.linear_1.bias"), - ("time_embed.2.weight", "time_embedding.linear_2.weight"), - ("time_embed.2.bias", "time_embedding.linear_2.bias"), - ("input_blocks.0.0.weight", "conv_in.weight"), - ("input_blocks.0.0.bias", "conv_in.bias"), - ("out.0.weight", "conv_norm_out.weight"), - ("out.0.bias", "conv_norm_out.bias"), - ("out.2.weight", "conv_out.weight"), - ("out.2.bias", "conv_out.bias"), -] - -unet_conversion_map_resnet = [ - # (stable-diffusion, HF Diffusers) - ("in_layers.0", "norm1"), - ("in_layers.2", "conv1"), - ("out_layers.0", "norm2"), - ("out_layers.3", "conv2"), - ("emb_layers.1", "time_emb_proj"), - ("skip_connection", "conv_shortcut"), -] - -unet_conversion_map_layer = [] -# hardcoded number of downblocks and resnets/attentions... -# would need smarter logic for other networks. -for i in range(4): - # loop over downblocks/upblocks - - for j in range(2): - # loop over resnets/attentions for downblocks - hf_down_res_prefix = f"down_blocks.{i}.resnets.{j}." - sd_down_res_prefix = f"input_blocks.{3 * i + j + 1}.0." - unet_conversion_map_layer.append((sd_down_res_prefix, hf_down_res_prefix)) - - if i < 3: - # no attention layers in down_blocks.3 - hf_down_atn_prefix = f"down_blocks.{i}.attentions.{j}." - sd_down_atn_prefix = f"input_blocks.{3 * i + j + 1}.1." - unet_conversion_map_layer.append((sd_down_atn_prefix, hf_down_atn_prefix)) - - for j in range(3): - # loop over resnets/attentions for upblocks - hf_up_res_prefix = f"up_blocks.{i}.resnets.{j}." - sd_up_res_prefix = f"output_blocks.{3 * i + j}.0." - unet_conversion_map_layer.append((sd_up_res_prefix, hf_up_res_prefix)) - - if i > 0: - # no attention layers in up_blocks.0 - hf_up_atn_prefix = f"up_blocks.{i}.attentions.{j}." - sd_up_atn_prefix = f"output_blocks.{3 * i + j}.1." - unet_conversion_map_layer.append((sd_up_atn_prefix, hf_up_atn_prefix)) - - if i < 3: - # no downsample in down_blocks.3 - hf_downsample_prefix = f"down_blocks.{i}.downsamplers.0.conv." - sd_downsample_prefix = f"input_blocks.{3 * (i + 1)}.0.op." - unet_conversion_map_layer.append((sd_downsample_prefix, hf_downsample_prefix)) - - # no upsample in up_blocks.3 - hf_upsample_prefix = f"up_blocks.{i}.upsamplers.0." - sd_upsample_prefix = f"output_blocks.{3 * i + 2}.{1 if i == 0 else 2}." - unet_conversion_map_layer.append((sd_upsample_prefix, hf_upsample_prefix)) - -hf_mid_atn_prefix = "mid_block.attentions.0." -sd_mid_atn_prefix = "middle_block.1." -unet_conversion_map_layer.append((sd_mid_atn_prefix, hf_mid_atn_prefix)) - -for j in range(2): - hf_mid_res_prefix = f"mid_block.resnets.{j}." - sd_mid_res_prefix = f"middle_block.{2 * j}." - unet_conversion_map_layer.append((sd_mid_res_prefix, hf_mid_res_prefix)) - - -def convert_unet_state_dict(unet_state_dict): - # buyer beware: this is a *brittle* function, - # and correct output requires that all of these pieces interact in - # the exact order in which I have arranged them. - mapping = {k: k for k in unet_state_dict.keys()} - for sd_name, hf_name in unet_conversion_map: - mapping[hf_name] = sd_name - for k, v in mapping.items(): - if "resnets" in k: - for sd_part, hf_part in unet_conversion_map_resnet: - v = v.replace(hf_part, sd_part) - mapping[k] = v - for k, v in mapping.items(): - for sd_part, hf_part in unet_conversion_map_layer: - v = v.replace(hf_part, sd_part) - mapping[k] = v - new_state_dict = {v: unet_state_dict[k] for k, v in mapping.items()} - return new_state_dict - - # ================# # VAE Conversion # # ================# @@ -213,6 +114,7 @@ textenc_pattern = re.compile("|".join(protected.keys())) # Ordering is from https://github.com/pytorch/pytorch/blob/master/test/cpp/api/modules.cpp code2idx = {"q": 0, "k": 1, "v": 2} + # This function exists because at the time of writing torch.cat can't do fp8 with cuda def cat_tensors(tensors): x = 0 @@ -229,6 +131,7 @@ def cat_tensors(tensors): return out + def convert_text_enc_state_dict_v20(text_enc_dict, prefix=""): new_state_dict = {} capture_qkv_weight = {} @@ -284,5 +187,3 @@ def convert_text_enc_state_dict_v20(text_enc_dict, prefix=""): def convert_text_enc_state_dict(text_enc_dict): return text_enc_dict - - diff --git a/comfy/k_diffusion/sampling.py b/comfy/k_diffusion/sampling.py index 845fedab3..bd8eca6f9 100644 --- a/comfy/k_diffusion/sampling.py +++ b/comfy/k_diffusion/sampling.py @@ -690,10 +690,10 @@ def sample_dpmpp_sde(model, x, sigmas, extra_args=None, callback=None, disable=N if len(sigmas) <= 1: return x + extra_args = {} if extra_args is None else extra_args sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() seed = extra_args.get("seed", None) noise_sampler = BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=seed, cpu=True) if noise_sampler is None else noise_sampler - extra_args = {} if extra_args is None else extra_args s_in = x.new_ones([x.shape[0]]) sigma_fn = lambda t: t.neg().exp() t_fn = lambda sigma: sigma.log().neg() @@ -764,10 +764,10 @@ def sample_dpmpp_2m_sde(model, x, sigmas, extra_args=None, callback=None, disabl if solver_type not in {'heun', 'midpoint'}: raise ValueError('solver_type must be \'heun\' or \'midpoint\'') + extra_args = {} if extra_args is None else extra_args seed = extra_args.get("seed", None) sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() noise_sampler = BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=seed, cpu=True) if noise_sampler is None else noise_sampler - extra_args = {} if extra_args is None else extra_args s_in = x.new_ones([x.shape[0]]) old_denoised = None @@ -810,10 +810,10 @@ def sample_dpmpp_3m_sde(model, x, sigmas, extra_args=None, callback=None, disabl if len(sigmas) <= 1: return x + extra_args = {} if extra_args is None else extra_args seed = extra_args.get("seed", None) sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() noise_sampler = BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=seed, cpu=True) if noise_sampler is None else noise_sampler - extra_args = {} if extra_args is None else extra_args s_in = x.new_ones([x.shape[0]]) denoised_1, denoised_2 = None, None @@ -860,7 +860,7 @@ def sample_dpmpp_3m_sde(model, x, sigmas, extra_args=None, callback=None, disabl def sample_dpmpp_3m_sde_gpu(model, x, sigmas, extra_args=None, callback=None, disable=None, eta=1., s_noise=1., noise_sampler=None): if len(sigmas) <= 1: return x - + extra_args = {} if extra_args is None else extra_args sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() noise_sampler = BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=extra_args.get("seed", None), cpu=False) if noise_sampler is None else noise_sampler return sample_dpmpp_3m_sde(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, eta=eta, s_noise=s_noise, noise_sampler=noise_sampler) @@ -869,7 +869,7 @@ def sample_dpmpp_3m_sde_gpu(model, x, sigmas, extra_args=None, callback=None, di def sample_dpmpp_2m_sde_gpu(model, x, sigmas, extra_args=None, callback=None, disable=None, eta=1., s_noise=1., noise_sampler=None, solver_type='midpoint'): if len(sigmas) <= 1: return x - + extra_args = {} if extra_args is None else extra_args sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() noise_sampler = BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=extra_args.get("seed", None), cpu=False) if noise_sampler is None else noise_sampler return sample_dpmpp_2m_sde(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, eta=eta, s_noise=s_noise, noise_sampler=noise_sampler, solver_type=solver_type) @@ -878,7 +878,7 @@ def sample_dpmpp_2m_sde_gpu(model, x, sigmas, extra_args=None, callback=None, di def sample_dpmpp_sde_gpu(model, x, sigmas, extra_args=None, callback=None, disable=None, eta=1., s_noise=1., noise_sampler=None, r=1 / 2): if len(sigmas) <= 1: return x - + extra_args = {} if extra_args is None else extra_args sigma_min, sigma_max = sigmas[sigmas > 0].min(), sigmas.max() noise_sampler = BrownianTreeNoiseSampler(x, sigma_min, sigma_max, seed=extra_args.get("seed", None), cpu=False) if noise_sampler is None else noise_sampler return sample_dpmpp_sde(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, eta=eta, s_noise=s_noise, noise_sampler=noise_sampler, r=r) @@ -1354,7 +1354,7 @@ def sample_dpmpp_2m_cfg_pp(model, x, sigmas, extra_args=None, callback=None, dis return x @torch.no_grad() -def res_multistep(model, x, sigmas, extra_args=None, callback=None, disable=None, s_churn=0., s_tmin=0., s_tmax=float('inf'), s_noise=1., noise_sampler=None, cfg_pp=False): +def res_multistep(model, x, sigmas, extra_args=None, callback=None, disable=None, s_noise=1., noise_sampler=None, eta=1., cfg_pp=False): extra_args = {} if extra_args is None else extra_args seed = extra_args.get("seed", None) noise_sampler = default_noise_sampler(x, seed=seed) if noise_sampler is None else noise_sampler @@ -1376,50 +1376,136 @@ def res_multistep(model, x, sigmas, extra_args=None, callback=None, disable=None extra_args["model_options"] = comfy.model_patcher.set_model_options_post_cfg_function(model_options, post_cfg_function, disable_cfg1_optimization=True) for i in trange(len(sigmas) - 1, disable=disable): - if s_churn > 0: - gamma = min(s_churn / (len(sigmas) - 1), 2**0.5 - 1) if s_tmin <= sigmas[i] <= s_tmax else 0.0 - sigma_hat = sigmas[i] * (gamma + 1) - else: - gamma = 0 - sigma_hat = sigmas[i] - - if gamma > 0: - eps = torch.randn_like(x) * s_noise - x = x + eps * (sigma_hat**2 - sigmas[i] ** 2) ** 0.5 - denoised = model(x, sigma_hat * s_in, **extra_args) + denoised = model(x, sigmas[i] * s_in, **extra_args) + sigma_down, sigma_up = get_ancestral_step(sigmas[i], sigmas[i + 1], eta=eta) if callback is not None: - callback({"x": x, "i": i, "sigma": sigmas[i], "sigma_hat": sigma_hat, "denoised": denoised}) - if sigmas[i + 1] == 0 or old_denoised is None: + callback({"x": x, "i": i, "sigma": sigmas[i], "sigma_hat": sigmas[i], "denoised": denoised}) + if sigma_down == 0 or old_denoised is None: # Euler method if cfg_pp: - d = to_d(x, sigma_hat, uncond_denoised) - x = denoised + d * sigmas[i + 1] + d = to_d(x, sigmas[i], uncond_denoised) + x = denoised + d * sigma_down else: - d = to_d(x, sigma_hat, denoised) - dt = sigmas[i + 1] - sigma_hat + d = to_d(x, sigmas[i], denoised) + dt = sigma_down - sigmas[i] x = x + d * dt else: # Second order multistep method in https://arxiv.org/pdf/2308.02157 - t, t_next, t_prev = t_fn(sigmas[i]), t_fn(sigmas[i + 1]), t_fn(sigmas[i - 1]) + t, t_next, t_prev = t_fn(sigmas[i]), t_fn(sigma_down), t_fn(sigmas[i - 1]) h = t_next - t c2 = (t_prev - t) / h phi1_val, phi2_val = phi1_fn(-h), phi2_fn(-h) - b1 = torch.nan_to_num(phi1_val - 1.0 / c2 * phi2_val, nan=0.0) - b2 = torch.nan_to_num(1.0 / c2 * phi2_val, nan=0.0) + b1 = torch.nan_to_num(phi1_val - phi2_val / c2, nan=0.0) + b2 = torch.nan_to_num(phi2_val / c2, nan=0.0) if cfg_pp: x = x + (denoised - uncond_denoised) + x = sigma_fn(h) * x + h * (b1 * uncond_denoised + b2 * old_denoised) + else: + x = sigma_fn(h) * x + h * (b1 * denoised + b2 * old_denoised) - x = (sigma_fn(t_next) / sigma_fn(t)) * x + h * (b1 * denoised + b2 * old_denoised) + # Noise addition + if sigmas[i + 1] > 0: + x = x + noise_sampler(sigmas[i], sigmas[i + 1]) * s_noise * sigma_up - old_denoised = denoised + if cfg_pp: + old_denoised = uncond_denoised + else: + old_denoised = denoised return x @torch.no_grad() -def sample_res_multistep(model, x, sigmas, extra_args=None, callback=None, disable=None, s_churn=0., s_tmin=0., s_tmax=float('inf'), s_noise=1., noise_sampler=None): - return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_churn=s_churn, s_tmin=s_tmin, s_tmax=s_tmax, s_noise=s_noise, noise_sampler=noise_sampler, cfg_pp=False) +def sample_res_multistep(model, x, sigmas, extra_args=None, callback=None, disable=None, s_noise=1., noise_sampler=None): + return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_noise=s_noise, noise_sampler=noise_sampler, eta=0., cfg_pp=False) @torch.no_grad() -def sample_res_multistep_cfg_pp(model, x, sigmas, extra_args=None, callback=None, disable=None, s_churn=0., s_tmin=0., s_tmax=float('inf'), s_noise=1., noise_sampler=None): - return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_churn=s_churn, s_tmin=s_tmin, s_tmax=s_tmax, s_noise=s_noise, noise_sampler=noise_sampler, cfg_pp=True) +def sample_res_multistep_cfg_pp(model, x, sigmas, extra_args=None, callback=None, disable=None, s_noise=1., noise_sampler=None): + return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_noise=s_noise, noise_sampler=noise_sampler, eta=0., cfg_pp=True) + +@torch.no_grad() +def sample_res_multistep_ancestral(model, x, sigmas, extra_args=None, callback=None, disable=None, eta=1., s_noise=1., noise_sampler=None): + return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_noise=s_noise, noise_sampler=noise_sampler, eta=eta, cfg_pp=False) + +@torch.no_grad() +def sample_res_multistep_ancestral_cfg_pp(model, x, sigmas, extra_args=None, callback=None, disable=None, eta=1., s_noise=1., noise_sampler=None): + return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_noise=s_noise, noise_sampler=noise_sampler, eta=eta, cfg_pp=True) + +@torch.no_grad() +def sample_gradient_estimation(model, x, sigmas, extra_args=None, callback=None, disable=None, ge_gamma=2.): + """Gradient-estimation sampler. Paper: https://openreview.net/pdf?id=o2ND9v0CeK""" + extra_args = {} if extra_args is None else extra_args + s_in = x.new_ones([x.shape[0]]) + old_d = None + + for i in trange(len(sigmas) - 1, disable=disable): + denoised = model(x, sigmas[i] * s_in, **extra_args) + d = to_d(x, sigmas[i], denoised) + if callback is not None: + callback({'x': x, 'i': i, 'sigma': sigmas[i], 'sigma_hat': sigmas[i], 'denoised': denoised}) + dt = sigmas[i + 1] - sigmas[i] + if i == 0: + # Euler method + x = x + d * dt + else: + # Gradient estimation + d_bar = ge_gamma * d + (1 - ge_gamma) * old_d + x = x + d_bar * dt + old_d = d + return x + +@torch.no_grad() +def sample_er_sde(model, x, sigmas, extra_args=None, callback=None, disable=None, s_noise=1., noise_sampler=None, noise_scaler=None, max_stage=3): + """ + Extended Reverse-Time SDE solver (VE ER-SDE-Solver-3). Arxiv: https://arxiv.org/abs/2309.06169. + Code reference: https://github.com/QinpengCui/ER-SDE-Solver/blob/main/er_sde_solver.py. + """ + extra_args = {} if extra_args is None else extra_args + seed = extra_args.get("seed", None) + noise_sampler = default_noise_sampler(x, seed=seed) if noise_sampler is None else noise_sampler + s_in = x.new_ones([x.shape[0]]) + + def default_noise_scaler(sigma): + return sigma * ((sigma ** 0.3).exp() + 10.0) + noise_scaler = default_noise_scaler if noise_scaler is None else noise_scaler + num_integration_points = 200.0 + point_indice = torch.arange(0, num_integration_points, dtype=torch.float32, device=x.device) + + old_denoised = None + old_denoised_d = None + + for i in trange(len(sigmas) - 1, disable=disable): + denoised = model(x, sigmas[i] * s_in, **extra_args) + if callback is not None: + callback({'x': x, 'i': i, 'sigma': sigmas[i], 'sigma_hat': sigmas[i], 'denoised': denoised}) + stage_used = min(max_stage, i + 1) + if sigmas[i + 1] == 0: + x = denoised + elif stage_used == 1: + r = noise_scaler(sigmas[i + 1]) / noise_scaler(sigmas[i]) + x = r * x + (1 - r) * denoised + else: + r = noise_scaler(sigmas[i + 1]) / noise_scaler(sigmas[i]) + x = r * x + (1 - r) * denoised + + dt = sigmas[i + 1] - sigmas[i] + sigma_step_size = -dt / num_integration_points + sigma_pos = sigmas[i + 1] + point_indice * sigma_step_size + scaled_pos = noise_scaler(sigma_pos) + + # Stage 2 + s = torch.sum(1 / scaled_pos) * sigma_step_size + denoised_d = (denoised - old_denoised) / (sigmas[i] - sigmas[i - 1]) + x = x + (dt + s * noise_scaler(sigmas[i + 1])) * denoised_d + + if stage_used >= 3: + # Stage 3 + s_u = torch.sum((sigma_pos - sigmas[i]) / scaled_pos) * sigma_step_size + denoised_u = (denoised_d - old_denoised_d) / ((sigmas[i] - sigmas[i - 2]) / 2) + x = x + ((dt ** 2) / 2 + s_u * noise_scaler(sigmas[i + 1])) * denoised_u + old_denoised_d = denoised_d + + if s_noise != 0 and sigmas[i + 1] > 0: + x = x + noise_sampler(sigmas[i], sigmas[i + 1]) * s_noise * (sigmas[i + 1] ** 2 - sigmas[i] ** 2 * r ** 2).sqrt() + old_denoised = denoised + return x diff --git a/comfy/latent_formats.py b/comfy/latent_formats.py index e98982c94..622c1df54 100644 --- a/comfy/latent_formats.py +++ b/comfy/latent_formats.py @@ -407,3 +407,52 @@ class Cosmos1CV8x8x8(LatentFormat): ] latent_rgb_factors_bias = [-0.1223, -0.1889, -0.1976] + +class Wan21(LatentFormat): + latent_channels = 16 + latent_dimensions = 3 + + latent_rgb_factors = [ + [-0.1299, -0.1692, 0.2932], + [ 0.0671, 0.0406, 0.0442], + [ 0.3568, 0.2548, 0.1747], + [ 0.0372, 0.2344, 0.1420], + [ 0.0313, 0.0189, -0.0328], + [ 0.0296, -0.0956, -0.0665], + [-0.3477, -0.4059, -0.2925], + [ 0.0166, 0.1902, 0.1975], + [-0.0412, 0.0267, -0.1364], + [-0.1293, 0.0740, 0.1636], + [ 0.0680, 0.3019, 0.1128], + [ 0.0032, 0.0581, 0.0639], + [-0.1251, 0.0927, 0.1699], + [ 0.0060, -0.0633, 0.0005], + [ 0.3477, 0.2275, 0.2950], + [ 0.1984, 0.0913, 0.1861] + ] + + latent_rgb_factors_bias = [-0.1835, -0.0868, -0.3360] + + def __init__(self): + self.scale_factor = 1.0 + self.latents_mean = torch.tensor([ + -0.7571, -0.7089, -0.9113, 0.1075, -0.1745, 0.9653, -0.1517, 1.5508, + 0.4134, -0.0715, 0.5517, -0.3632, -0.1922, -0.9497, 0.2503, -0.2921 + ]).view(1, self.latent_channels, 1, 1, 1) + self.latents_std = torch.tensor([ + 2.8184, 1.4541, 2.3275, 2.6558, 1.2196, 1.7708, 2.6052, 2.0743, + 3.2687, 2.1526, 2.8652, 1.5579, 1.6382, 1.1253, 2.8251, 1.9160 + ]).view(1, self.latent_channels, 1, 1, 1) + + + self.taesd_decoder_name = None #TODO + + def process_in(self, latent): + latents_mean = self.latents_mean.to(latent.device, latent.dtype) + latents_std = self.latents_std.to(latent.device, latent.dtype) + return (latent - latents_mean) * self.scale_factor / latents_std + + def process_out(self, latent): + latents_mean = self.latents_mean.to(latent.device, latent.dtype) + latents_std = self.latents_std.to(latent.device, latent.dtype) + return latent * latents_std / self.scale_factor + latents_mean diff --git a/comfy/ldm/cascade/stage_a.py b/comfy/ldm/cascade/stage_a.py index ca8867eaf..145e6e69a 100644 --- a/comfy/ldm/cascade/stage_a.py +++ b/comfy/ldm/cascade/stage_a.py @@ -19,6 +19,10 @@ import torch from torch import nn from torch.autograd import Function +import comfy.ops + +ops = comfy.ops.disable_weight_init + class vector_quantize(Function): @staticmethod @@ -121,15 +125,15 @@ class ResBlock(nn.Module): self.norm1 = nn.LayerNorm(c, elementwise_affine=False, eps=1e-6) self.depthwise = nn.Sequential( nn.ReplicationPad2d(1), - nn.Conv2d(c, c, kernel_size=3, groups=c) + ops.Conv2d(c, c, kernel_size=3, groups=c) ) # channelwise self.norm2 = nn.LayerNorm(c, elementwise_affine=False, eps=1e-6) self.channelwise = nn.Sequential( - nn.Linear(c, c_hidden), + ops.Linear(c, c_hidden), nn.GELU(), - nn.Linear(c_hidden, c), + ops.Linear(c_hidden, c), ) self.gammas = nn.Parameter(torch.zeros(6), requires_grad=True) @@ -171,16 +175,16 @@ class StageA(nn.Module): # Encoder blocks self.in_block = nn.Sequential( nn.PixelUnshuffle(2), - nn.Conv2d(3 * 4, c_levels[0], kernel_size=1) + ops.Conv2d(3 * 4, c_levels[0], kernel_size=1) ) down_blocks = [] for i in range(levels): if i > 0: - down_blocks.append(nn.Conv2d(c_levels[i - 1], c_levels[i], kernel_size=4, stride=2, padding=1)) + down_blocks.append(ops.Conv2d(c_levels[i - 1], c_levels[i], kernel_size=4, stride=2, padding=1)) block = ResBlock(c_levels[i], c_levels[i] * 4) down_blocks.append(block) down_blocks.append(nn.Sequential( - nn.Conv2d(c_levels[-1], c_latent, kernel_size=1, bias=False), + ops.Conv2d(c_levels[-1], c_latent, kernel_size=1, bias=False), nn.BatchNorm2d(c_latent), # then normalize them to have mean 0 and std 1 )) self.down_blocks = nn.Sequential(*down_blocks) @@ -191,7 +195,7 @@ class StageA(nn.Module): # Decoder blocks up_blocks = [nn.Sequential( - nn.Conv2d(c_latent, c_levels[-1], kernel_size=1) + ops.Conv2d(c_latent, c_levels[-1], kernel_size=1) )] for i in range(levels): for j in range(bottleneck_blocks if i == 0 else 1): @@ -199,11 +203,11 @@ class StageA(nn.Module): up_blocks.append(block) if i < levels - 1: up_blocks.append( - nn.ConvTranspose2d(c_levels[levels - 1 - i], c_levels[levels - 2 - i], kernel_size=4, stride=2, + ops.ConvTranspose2d(c_levels[levels - 1 - i], c_levels[levels - 2 - i], kernel_size=4, stride=2, padding=1)) self.up_blocks = nn.Sequential(*up_blocks) self.out_block = nn.Sequential( - nn.Conv2d(c_levels[0], 3 * 4, kernel_size=1), + ops.Conv2d(c_levels[0], 3 * 4, kernel_size=1), nn.PixelShuffle(2), ) @@ -232,17 +236,17 @@ class Discriminator(nn.Module): super().__init__() d = max(depth - 3, 3) layers = [ - nn.utils.spectral_norm(nn.Conv2d(c_in, c_hidden // (2 ** d), kernel_size=3, stride=2, padding=1)), + nn.utils.spectral_norm(ops.Conv2d(c_in, c_hidden // (2 ** d), kernel_size=3, stride=2, padding=1)), nn.LeakyReLU(0.2), ] for i in range(depth - 1): c_in = c_hidden // (2 ** max((d - i), 0)) c_out = c_hidden // (2 ** max((d - 1 - i), 0)) - layers.append(nn.utils.spectral_norm(nn.Conv2d(c_in, c_out, kernel_size=3, stride=2, padding=1))) + layers.append(nn.utils.spectral_norm(ops.Conv2d(c_in, c_out, kernel_size=3, stride=2, padding=1))) layers.append(nn.InstanceNorm2d(c_out)) layers.append(nn.LeakyReLU(0.2)) self.encoder = nn.Sequential(*layers) - self.shuffle = nn.Conv2d((c_hidden + c_cond) if c_cond > 0 else c_hidden, 1, kernel_size=1) + self.shuffle = ops.Conv2d((c_hidden + c_cond) if c_cond > 0 else c_hidden, 1, kernel_size=1) self.logits = nn.Sigmoid() def forward(self, x, cond=None): diff --git a/comfy/ldm/cascade/stage_c_coder.py b/comfy/ldm/cascade/stage_c_coder.py index 0cb7c49fc..b467a70a8 100644 --- a/comfy/ldm/cascade/stage_c_coder.py +++ b/comfy/ldm/cascade/stage_c_coder.py @@ -19,6 +19,9 @@ import torch import torchvision from torch import nn +import comfy.ops + +ops = comfy.ops.disable_weight_init # EfficientNet class EfficientNetEncoder(nn.Module): @@ -26,7 +29,7 @@ class EfficientNetEncoder(nn.Module): super().__init__() self.backbone = torchvision.models.efficientnet_v2_s().features.eval() self.mapper = nn.Sequential( - nn.Conv2d(1280, c_latent, kernel_size=1, bias=False), + ops.Conv2d(1280, c_latent, kernel_size=1, bias=False), nn.BatchNorm2d(c_latent, affine=False), # then normalize them to have mean 0 and std 1 ) self.mean = nn.Parameter(torch.tensor([0.485, 0.456, 0.406])) @@ -34,7 +37,7 @@ class EfficientNetEncoder(nn.Module): def forward(self, x): x = x * 0.5 + 0.5 - x = (x - self.mean.view([3,1,1])) / self.std.view([3,1,1]) + x = (x - self.mean.view([3,1,1]).to(device=x.device, dtype=x.dtype)) / self.std.view([3,1,1]).to(device=x.device, dtype=x.dtype) o = self.mapper(self.backbone(x)) return o @@ -44,39 +47,39 @@ class Previewer(nn.Module): def __init__(self, c_in=16, c_hidden=512, c_out=3): super().__init__() self.blocks = nn.Sequential( - nn.Conv2d(c_in, c_hidden, kernel_size=1), # 16 channels to 512 channels + ops.Conv2d(c_in, c_hidden, kernel_size=1), # 16 channels to 512 channels nn.GELU(), nn.BatchNorm2d(c_hidden), - nn.Conv2d(c_hidden, c_hidden, kernel_size=3, padding=1), + ops.Conv2d(c_hidden, c_hidden, kernel_size=3, padding=1), nn.GELU(), nn.BatchNorm2d(c_hidden), - nn.ConvTranspose2d(c_hidden, c_hidden // 2, kernel_size=2, stride=2), # 16 -> 32 + ops.ConvTranspose2d(c_hidden, c_hidden // 2, kernel_size=2, stride=2), # 16 -> 32 nn.GELU(), nn.BatchNorm2d(c_hidden // 2), - nn.Conv2d(c_hidden // 2, c_hidden // 2, kernel_size=3, padding=1), + ops.Conv2d(c_hidden // 2, c_hidden // 2, kernel_size=3, padding=1), nn.GELU(), nn.BatchNorm2d(c_hidden // 2), - nn.ConvTranspose2d(c_hidden // 2, c_hidden // 4, kernel_size=2, stride=2), # 32 -> 64 + ops.ConvTranspose2d(c_hidden // 2, c_hidden // 4, kernel_size=2, stride=2), # 32 -> 64 nn.GELU(), nn.BatchNorm2d(c_hidden // 4), - nn.Conv2d(c_hidden // 4, c_hidden // 4, kernel_size=3, padding=1), + ops.Conv2d(c_hidden // 4, c_hidden // 4, kernel_size=3, padding=1), nn.GELU(), nn.BatchNorm2d(c_hidden // 4), - nn.ConvTranspose2d(c_hidden // 4, c_hidden // 4, kernel_size=2, stride=2), # 64 -> 128 + ops.ConvTranspose2d(c_hidden // 4, c_hidden // 4, kernel_size=2, stride=2), # 64 -> 128 nn.GELU(), nn.BatchNorm2d(c_hidden // 4), - nn.Conv2d(c_hidden // 4, c_hidden // 4, kernel_size=3, padding=1), + ops.Conv2d(c_hidden // 4, c_hidden // 4, kernel_size=3, padding=1), nn.GELU(), nn.BatchNorm2d(c_hidden // 4), - nn.Conv2d(c_hidden // 4, c_out, kernel_size=1), + ops.Conv2d(c_hidden // 4, c_out, kernel_size=1), ) def forward(self, x): diff --git a/comfy/ldm/flux/layers.py b/comfy/ldm/flux/layers.py index 59a62e0df..76af967e6 100644 --- a/comfy/ldm/flux/layers.py +++ b/comfy/ldm/flux/layers.py @@ -105,7 +105,9 @@ class Modulation(nn.Module): self.lin = operations.Linear(dim, self.multiplier * dim, bias=True, dtype=dtype, device=device) def forward(self, vec: Tensor) -> tuple: - out = self.lin(nn.functional.silu(vec))[:, None, :].chunk(self.multiplier, dim=-1) + if vec.ndim == 2: + vec = vec[:, None, :] + out = self.lin(nn.functional.silu(vec)).chunk(self.multiplier, dim=-1) return ( ModulationOut(*out[:3]), @@ -113,6 +115,20 @@ class Modulation(nn.Module): ) +def apply_mod(tensor, m_mult, m_add=None, modulation_dims=None): + if modulation_dims is None: + if m_add is not None: + return tensor * m_mult + m_add + else: + return tensor * m_mult + else: + for d in modulation_dims: + tensor[:, d[0]:d[1]] *= m_mult[:, d[2]] + if m_add is not None: + tensor[:, d[0]:d[1]] += m_add[:, d[2]] + return tensor + + class DoubleStreamBlock(nn.Module): def __init__(self, hidden_size: int, num_heads: int, mlp_ratio: float, qkv_bias: bool = False, flipped_img_txt=False, dtype=None, device=None, operations=None): super().__init__() @@ -143,20 +159,20 @@ class DoubleStreamBlock(nn.Module): ) self.flipped_img_txt = flipped_img_txt - def forward(self, img: Tensor, txt: Tensor, vec: Tensor, pe: Tensor, attn_mask=None): + def forward(self, img: Tensor, txt: Tensor, vec: Tensor, pe: Tensor, attn_mask=None, modulation_dims_img=None, modulation_dims_txt=None): img_mod1, img_mod2 = self.img_mod(vec) txt_mod1, txt_mod2 = self.txt_mod(vec) # prepare image for attention img_modulated = self.img_norm1(img) - img_modulated = (1 + img_mod1.scale) * img_modulated + img_mod1.shift + img_modulated = apply_mod(img_modulated, (1 + img_mod1.scale), img_mod1.shift, modulation_dims_img) img_qkv = self.img_attn.qkv(img_modulated) img_q, img_k, img_v = img_qkv.view(img_qkv.shape[0], img_qkv.shape[1], 3, self.num_heads, -1).permute(2, 0, 3, 1, 4) img_q, img_k = self.img_attn.norm(img_q, img_k, img_v) # prepare txt for attention txt_modulated = self.txt_norm1(txt) - txt_modulated = (1 + txt_mod1.scale) * txt_modulated + txt_mod1.shift + txt_modulated = apply_mod(txt_modulated, (1 + txt_mod1.scale), txt_mod1.shift, modulation_dims_txt) txt_qkv = self.txt_attn.qkv(txt_modulated) txt_q, txt_k, txt_v = txt_qkv.view(txt_qkv.shape[0], txt_qkv.shape[1], 3, self.num_heads, -1).permute(2, 0, 3, 1, 4) txt_q, txt_k = self.txt_attn.norm(txt_q, txt_k, txt_v) @@ -179,12 +195,12 @@ class DoubleStreamBlock(nn.Module): txt_attn, img_attn = attn[:, : txt.shape[1]], attn[:, txt.shape[1]:] # calculate the img bloks - img = img + img_mod1.gate * self.img_attn.proj(img_attn) - img = img + img_mod2.gate * self.img_mlp((1 + img_mod2.scale) * self.img_norm2(img) + img_mod2.shift) + img = img + apply_mod(self.img_attn.proj(img_attn), img_mod1.gate, None, modulation_dims_img) + img = img + apply_mod(self.img_mlp(apply_mod(self.img_norm2(img), (1 + img_mod2.scale), img_mod2.shift, modulation_dims_img)), img_mod2.gate, None, modulation_dims_img) # calculate the txt bloks - txt += txt_mod1.gate * self.txt_attn.proj(txt_attn) - txt += txt_mod2.gate * self.txt_mlp((1 + txt_mod2.scale) * self.txt_norm2(txt) + txt_mod2.shift) + txt += apply_mod(self.txt_attn.proj(txt_attn), txt_mod1.gate, None, modulation_dims_txt) + txt += apply_mod(self.txt_mlp(apply_mod(self.txt_norm2(txt), (1 + txt_mod2.scale), txt_mod2.shift, modulation_dims_txt)), txt_mod2.gate, None, modulation_dims_txt) if txt.dtype == torch.float16: txt = torch.nan_to_num(txt, nan=0.0, posinf=65504, neginf=-65504) @@ -228,9 +244,9 @@ class SingleStreamBlock(nn.Module): self.mlp_act = nn.GELU(approximate="tanh") self.modulation = Modulation(hidden_size, double=False, dtype=dtype, device=device, operations=operations) - def forward(self, x: Tensor, vec: Tensor, pe: Tensor, attn_mask=None) -> Tensor: + def forward(self, x: Tensor, vec: Tensor, pe: Tensor, attn_mask=None, modulation_dims=None) -> Tensor: mod, _ = self.modulation(vec) - qkv, mlp = torch.split(self.linear1((1 + mod.scale) * self.pre_norm(x) + mod.shift), [3 * self.hidden_size, self.mlp_hidden_dim], dim=-1) + qkv, mlp = torch.split(self.linear1(apply_mod(self.pre_norm(x), (1 + mod.scale), mod.shift, modulation_dims)), [3 * self.hidden_size, self.mlp_hidden_dim], dim=-1) q, k, v = qkv.view(qkv.shape[0], qkv.shape[1], 3, self.num_heads, -1).permute(2, 0, 3, 1, 4) q, k = self.norm(q, k, v) @@ -239,7 +255,7 @@ class SingleStreamBlock(nn.Module): attn = attention(q, k, v, pe=pe, mask=attn_mask) # compute activation in mlp stream, cat again and run second linear layer output = self.linear2(torch.cat((attn, self.mlp_act(mlp)), 2)) - x += mod.gate * output + x += apply_mod(output, mod.gate, None, modulation_dims) if x.dtype == torch.float16: x = torch.nan_to_num(x, nan=0.0, posinf=65504, neginf=-65504) return x @@ -252,8 +268,11 @@ class LastLayer(nn.Module): self.linear = operations.Linear(hidden_size, patch_size * patch_size * out_channels, bias=True, dtype=dtype, device=device) self.adaLN_modulation = nn.Sequential(nn.SiLU(), operations.Linear(hidden_size, 2 * hidden_size, bias=True, dtype=dtype, device=device)) - def forward(self, x: Tensor, vec: Tensor) -> Tensor: - shift, scale = self.adaLN_modulation(vec).chunk(2, dim=1) - x = (1 + scale[:, None, :]) * self.norm_final(x) + shift[:, None, :] + def forward(self, x: Tensor, vec: Tensor, modulation_dims=None) -> Tensor: + if vec.ndim == 2: + vec = vec[:, None, :] + + shift, scale = self.adaLN_modulation(vec).chunk(2, dim=-1) + x = apply_mod(self.norm_final(x), (1 + scale), shift, modulation_dims) x = self.linear(x) return x diff --git a/comfy/ldm/flux/math.py b/comfy/ldm/flux/math.py index b5960ffd3..36b67931c 100644 --- a/comfy/ldm/flux/math.py +++ b/comfy/ldm/flux/math.py @@ -22,7 +22,7 @@ def attention(q: Tensor, k: Tensor, v: Tensor, pe: Tensor, mask=None) -> Tensor: def rope(pos: Tensor, dim: int, theta: int) -> Tensor: assert dim % 2 == 0 - if comfy.model_management.is_device_mps(pos.device) or comfy.model_management.is_intel_xpu(): + if comfy.model_management.is_device_mps(pos.device) or comfy.model_management.is_intel_xpu() or comfy.model_management.is_directml_enabled(): device = torch.device("cpu") else: device = pos.device diff --git a/comfy/ldm/flux/model.py b/comfy/ldm/flux/model.py index dead87de8..cc34f7585 100644 --- a/comfy/ldm/flux/model.py +++ b/comfy/ldm/flux/model.py @@ -109,9 +109,8 @@ class Flux(nn.Module): img = self.img_in(img) vec = self.time_in(timestep_embedding(timesteps, 256).to(img.dtype)) if self.params.guidance_embed: - if guidance is None: - raise ValueError("Didn't get guidance strength for guidance distilled model.") - vec = vec + self.guidance_in(timestep_embedding(guidance, 256).to(img.dtype)) + if guidance is not None: + vec = vec + self.guidance_in(timestep_embedding(guidance, 256).to(img.dtype)) vec = vec + self.vector_in(y[:,:self.params.vec_in_dim]) txt = self.txt_in(txt) @@ -186,7 +185,7 @@ class Flux(nn.Module): img = self.final_layer(img, vec) # (N, T, patch_size ** 2 * out_channels) return img - def forward(self, x, timestep, context, y, guidance, control=None, transformer_options={}, **kwargs): + def forward(self, x, timestep, context, y, guidance=None, control=None, transformer_options={}, **kwargs): bs, c, h, w = x.shape patch_size = self.patch_size x = comfy.ldm.common_dit.pad_to_patch_size(x, (patch_size, patch_size)) diff --git a/comfy/ldm/hunyuan_video/model.py b/comfy/ldm/hunyuan_video/model.py index d6d854089..72af3d5bb 100644 --- a/comfy/ldm/hunyuan_video/model.py +++ b/comfy/ldm/hunyuan_video/model.py @@ -227,6 +227,7 @@ class HunyuanVideo(nn.Module): timesteps: Tensor, y: Tensor, guidance: Tensor = None, + guiding_frame_index=None, control=None, transformer_options={}, ) -> Tensor: @@ -237,12 +238,21 @@ class HunyuanVideo(nn.Module): img = self.img_in(img) vec = self.time_in(timestep_embedding(timesteps, 256, time_factor=1.0).to(img.dtype)) - vec = vec + self.vector_in(y[:, :self.params.vec_in_dim]) + if guiding_frame_index is not None: + token_replace_vec = self.time_in(timestep_embedding(guiding_frame_index, 256, time_factor=1.0)) + vec_ = self.vector_in(y[:, :self.params.vec_in_dim]) + vec = torch.cat([(vec_ + token_replace_vec).unsqueeze(1), (vec_ + vec).unsqueeze(1)], dim=1) + frame_tokens = (initial_shape[-1] // self.patch_size[-1]) * (initial_shape[-2] // self.patch_size[-2]) + modulation_dims = [(0, frame_tokens, 0), (frame_tokens, None, 1)] + modulation_dims_txt = [(0, None, 1)] + else: + vec = vec + self.vector_in(y[:, :self.params.vec_in_dim]) + modulation_dims = None + modulation_dims_txt = None if self.params.guidance_embed: - if guidance is None: - raise ValueError("Didn't get guidance strength for guidance distilled model.") - vec = vec + self.guidance_in(timestep_embedding(guidance, 256).to(img.dtype)) + if guidance is not None: + vec = vec + self.guidance_in(timestep_embedding(guidance, 256).to(img.dtype)) if txt_mask is not None and not torch.is_floating_point(txt_mask): txt_mask = (txt_mask - 1).to(img.dtype) * torch.finfo(img.dtype).max @@ -265,14 +275,14 @@ class HunyuanVideo(nn.Module): if ("double_block", i) in blocks_replace: def block_wrap(args): out = {} - out["img"], out["txt"] = block(img=args["img"], txt=args["txt"], vec=args["vec"], pe=args["pe"], attn_mask=args["attention_mask"]) + out["img"], out["txt"] = block(img=args["img"], txt=args["txt"], vec=args["vec"], pe=args["pe"], attn_mask=args["attention_mask"], modulation_dims_img=args["modulation_dims_img"], modulation_dims_txt=args["modulation_dims_txt"]) return out - out = blocks_replace[("double_block", i)]({"img": img, "txt": txt, "vec": vec, "pe": pe, "attention_mask": attn_mask}, {"original_block": block_wrap}) + out = blocks_replace[("double_block", i)]({"img": img, "txt": txt, "vec": vec, "pe": pe, "attention_mask": attn_mask, 'modulation_dims_img': modulation_dims, 'modulation_dims_txt': modulation_dims_txt}, {"original_block": block_wrap}) txt = out["txt"] img = out["img"] else: - img, txt = block(img=img, txt=txt, vec=vec, pe=pe, attn_mask=attn_mask) + img, txt = block(img=img, txt=txt, vec=vec, pe=pe, attn_mask=attn_mask, modulation_dims_img=modulation_dims, modulation_dims_txt=modulation_dims_txt) if control is not None: # Controlnet control_i = control.get("input") @@ -287,13 +297,13 @@ class HunyuanVideo(nn.Module): if ("single_block", i) in blocks_replace: def block_wrap(args): out = {} - out["img"] = block(args["img"], vec=args["vec"], pe=args["pe"], attn_mask=args["attention_mask"]) + out["img"] = block(args["img"], vec=args["vec"], pe=args["pe"], attn_mask=args["attention_mask"], modulation_dims=args["modulation_dims"]) return out - out = blocks_replace[("single_block", i)]({"img": img, "vec": vec, "pe": pe, "attention_mask": attn_mask}, {"original_block": block_wrap}) + out = blocks_replace[("single_block", i)]({"img": img, "vec": vec, "pe": pe, "attention_mask": attn_mask, 'modulation_dims': modulation_dims}, {"original_block": block_wrap}) img = out["img"] else: - img = block(img, vec=vec, pe=pe, attn_mask=attn_mask) + img = block(img, vec=vec, pe=pe, attn_mask=attn_mask, modulation_dims=modulation_dims) if control is not None: # Controlnet control_o = control.get("output") @@ -304,17 +314,17 @@ class HunyuanVideo(nn.Module): img = img[:, : img_len] - img = self.final_layer(img, vec) # (N, T, patch_size ** 2 * out_channels) + img = self.final_layer(img, vec, modulation_dims=modulation_dims) # (N, T, patch_size ** 2 * out_channels) shape = initial_shape[-3:] for i in range(len(shape)): shape[i] = shape[i] // self.patch_size[i] img = img.reshape([img.shape[0]] + shape + [self.out_channels] + self.patch_size) img = img.permute(0, 4, 1, 5, 2, 6, 3, 7) - img = img.reshape(initial_shape) + img = img.reshape(initial_shape[0], self.out_channels, initial_shape[2], initial_shape[3], initial_shape[4]) return img - def forward(self, x, timestep, context, y, guidance, attention_mask=None, control=None, transformer_options={}, **kwargs): + def forward(self, x, timestep, context, y, guidance=None, attention_mask=None, guiding_frame_index=None, control=None, transformer_options={}, **kwargs): bs, c, t, h, w = x.shape patch_size = self.patch_size t_len = ((t + (patch_size[0] // 2)) // patch_size[0]) @@ -326,5 +336,5 @@ class HunyuanVideo(nn.Module): img_ids[:, :, :, 2] = img_ids[:, :, :, 2] + torch.linspace(0, w_len - 1, steps=w_len, device=x.device, dtype=x.dtype).reshape(1, 1, -1) img_ids = repeat(img_ids, "t h w c -> b (t h w) c", b=bs) txt_ids = torch.zeros((bs, context.shape[1], 3), device=x.device, dtype=x.dtype) - out = self.forward_orig(x, img_ids, context, txt_ids, attention_mask, timestep, y, guidance, control, transformer_options) + out = self.forward_orig(x, img_ids, context, txt_ids, attention_mask, timestep, y, guidance, guiding_frame_index, control, transformer_options) return out diff --git a/comfy/ldm/lightricks/model.py b/comfy/ldm/lightricks/model.py index 2a02acd65..6e8e06181 100644 --- a/comfy/ldm/lightricks/model.py +++ b/comfy/ldm/lightricks/model.py @@ -7,7 +7,7 @@ from einops import rearrange import math from typing import Dict, Optional, Tuple -from .symmetric_patchifier import SymmetricPatchifier +from .symmetric_patchifier import SymmetricPatchifier, latent_to_pixel_coords def get_timestep_embedding( @@ -377,12 +377,16 @@ class LTXVModel(torch.nn.Module): positional_embedding_theta=10000.0, positional_embedding_max_pos=[20, 2048, 2048], + causal_temporal_positioning=False, + vae_scale_factors=(8, 32, 32), dtype=None, device=None, operations=None, **kwargs): super().__init__() self.generator = None + self.vae_scale_factors = vae_scale_factors self.dtype = dtype self.out_channels = in_channels self.inner_dim = num_attention_heads * attention_head_dim + self.causal_temporal_positioning = causal_temporal_positioning self.patchify_proj = operations.Linear(in_channels, self.inner_dim, bias=True, dtype=dtype, device=device) @@ -416,42 +420,23 @@ class LTXVModel(torch.nn.Module): self.patchifier = SymmetricPatchifier(1) - def forward(self, x, timestep, context, attention_mask, frame_rate=25, guiding_latent=None, guiding_latent_noise_scale=0, transformer_options={}, **kwargs): + def forward(self, x, timestep, context, attention_mask, frame_rate=25, transformer_options={}, keyframe_idxs=None, **kwargs): patches_replace = transformer_options.get("patches_replace", {}) - indices_grid = self.patchifier.get_grid( - orig_num_frames=x.shape[2], - orig_height=x.shape[3], - orig_width=x.shape[4], - batch_size=x.shape[0], - scale_grid=((1 / frame_rate) * 8, 32, 32), - device=x.device, - ) - - if guiding_latent is not None: - ts = torch.ones([x.shape[0], 1, x.shape[2], x.shape[3], x.shape[4]], device=x.device, dtype=x.dtype) - input_ts = timestep.view([timestep.shape[0]] + [1] * (x.ndim - 1)) - ts *= input_ts - ts[:, :, 0] = guiding_latent_noise_scale * (input_ts[:, :, 0] ** 2) - timestep = self.patchifier.patchify(ts) - input_x = x.clone() - x[:, :, 0] = guiding_latent[:, :, 0] - if guiding_latent_noise_scale > 0: - if self.generator is None: - self.generator = torch.Generator(device=x.device).manual_seed(42) - elif self.generator.device != x.device: - self.generator = torch.Generator(device=x.device).set_state(self.generator.get_state()) - - noise_shape = [guiding_latent.shape[0], guiding_latent.shape[1], 1, guiding_latent.shape[3], guiding_latent.shape[4]] - scale = guiding_latent_noise_scale * (input_ts ** 2) - guiding_noise = scale * torch.randn(size=noise_shape, device=x.device, generator=self.generator) - - x[:, :, 0] = guiding_noise[:, :, 0] + x[:, :, 0] * (1.0 - scale[:, :, 0]) - - orig_shape = list(x.shape) - x = self.patchifier.patchify(x) + x, latent_coords = self.patchifier.patchify(x) + pixel_coords = latent_to_pixel_coords( + latent_coords=latent_coords, + scale_factors=self.vae_scale_factors, + causal_fix=self.causal_temporal_positioning, + ) + + if keyframe_idxs is not None: + pixel_coords[:, :, -keyframe_idxs.shape[2]:] = keyframe_idxs + + fractional_coords = pixel_coords.to(torch.float32) + fractional_coords[:, 0] = fractional_coords[:, 0] * (1.0 / frame_rate) x = self.patchify_proj(x) timestep = timestep * 1000.0 @@ -459,7 +444,7 @@ class LTXVModel(torch.nn.Module): if attention_mask is not None and not torch.is_floating_point(attention_mask): attention_mask = (attention_mask - 1).to(x.dtype).reshape((attention_mask.shape[0], 1, -1, attention_mask.shape[-1])) * torch.finfo(x.dtype).max - pe = precompute_freqs_cis(indices_grid, dim=self.inner_dim, out_dtype=x.dtype) + pe = precompute_freqs_cis(fractional_coords, dim=self.inner_dim, out_dtype=x.dtype) batch_size = x.shape[0] timestep, embedded_timestep = self.adaln_single( @@ -519,8 +504,4 @@ class LTXVModel(torch.nn.Module): out_channels=orig_shape[1] // math.prod(self.patchifier.patch_size), ) - if guiding_latent is not None: - x[:, :, 0] = (input_x[:, :, 0] - guiding_latent[:, :, 0]) / input_ts[:, :, 0] - - # print("res", x) return x diff --git a/comfy/ldm/lightricks/symmetric_patchifier.py b/comfy/ldm/lightricks/symmetric_patchifier.py index c58dfb20b..4b9972b9f 100644 --- a/comfy/ldm/lightricks/symmetric_patchifier.py +++ b/comfy/ldm/lightricks/symmetric_patchifier.py @@ -6,16 +6,29 @@ from einops import rearrange from torch import Tensor -def append_dims(x: torch.Tensor, target_dims: int) -> torch.Tensor: - """Appends dimensions to the end of a tensor until it has target_dims dimensions.""" - dims_to_append = target_dims - x.ndim - if dims_to_append < 0: - raise ValueError( - f"input has {x.ndim} dims but target_dims is {target_dims}, which is less" - ) - elif dims_to_append == 0: - return x - return x[(...,) + (None,) * dims_to_append] +def latent_to_pixel_coords( + latent_coords: Tensor, scale_factors: Tuple[int, int, int], causal_fix: bool = False +) -> Tensor: + """ + Converts latent coordinates to pixel coordinates by scaling them according to the VAE's + configuration. + Args: + latent_coords (Tensor): A tensor of shape [batch_size, 3, num_latents] + containing the latent corner coordinates of each token. + scale_factors (Tuple[int, int, int]): The scale factors of the VAE's latent space. + causal_fix (bool): Whether to take into account the different temporal scale + of the first frame. Default = False for backwards compatibility. + Returns: + Tensor: A tensor of pixel coordinates corresponding to the input latent coordinates. + """ + pixel_coords = ( + latent_coords + * torch.tensor(scale_factors, device=latent_coords.device)[None, :, None] + ) + if causal_fix: + # Fix temporal scale for first frame to 1 due to causality + pixel_coords[:, 0] = (pixel_coords[:, 0] + 1 - scale_factors[0]).clamp(min=0) + return pixel_coords class Patchifier(ABC): @@ -44,29 +57,26 @@ class Patchifier(ABC): def patch_size(self): return self._patch_size - def get_grid( - self, orig_num_frames, orig_height, orig_width, batch_size, scale_grid, device + def get_latent_coords( + self, latent_num_frames, latent_height, latent_width, batch_size, device ): - f = orig_num_frames // self._patch_size[0] - h = orig_height // self._patch_size[1] - w = orig_width // self._patch_size[2] - grid_h = torch.arange(h, dtype=torch.float32, device=device) - grid_w = torch.arange(w, dtype=torch.float32, device=device) - grid_f = torch.arange(f, dtype=torch.float32, device=device) - grid = torch.meshgrid(grid_f, grid_h, grid_w, indexing='ij') - grid = torch.stack(grid, dim=0) - grid = grid.unsqueeze(0).repeat(batch_size, 1, 1, 1, 1) - - if scale_grid is not None: - for i in range(3): - if isinstance(scale_grid[i], Tensor): - scale = append_dims(scale_grid[i], grid.ndim - 1) - else: - scale = scale_grid[i] - grid[:, i, ...] = grid[:, i, ...] * scale * self._patch_size[i] - - grid = rearrange(grid, "b c f h w -> b c (f h w)", b=batch_size) - return grid + """ + Return a tensor of shape [batch_size, 3, num_patches] containing the + top-left corner latent coordinates of each latent patch. + The tensor is repeated for each batch element. + """ + latent_sample_coords = torch.meshgrid( + torch.arange(0, latent_num_frames, self._patch_size[0], device=device), + torch.arange(0, latent_height, self._patch_size[1], device=device), + torch.arange(0, latent_width, self._patch_size[2], device=device), + indexing="ij", + ) + latent_sample_coords = torch.stack(latent_sample_coords, dim=0) + latent_coords = latent_sample_coords.unsqueeze(0).repeat(batch_size, 1, 1, 1, 1) + latent_coords = rearrange( + latent_coords, "b c f h w -> b c (f h w)", b=batch_size + ) + return latent_coords class SymmetricPatchifier(Patchifier): @@ -74,6 +84,8 @@ class SymmetricPatchifier(Patchifier): self, latents: Tensor, ) -> Tuple[Tensor, Tensor]: + b, _, f, h, w = latents.shape + latent_coords = self.get_latent_coords(f, h, w, b, latents.device) latents = rearrange( latents, "b c (f p1) (h p2) (w p3) -> b (f h w) (c p1 p2 p3)", @@ -81,7 +93,7 @@ class SymmetricPatchifier(Patchifier): p2=self._patch_size[1], p3=self._patch_size[2], ) - return latents + return latents, latent_coords def unpatchify( self, diff --git a/comfy/ldm/lightricks/vae/causal_conv3d.py b/comfy/ldm/lightricks/vae/causal_conv3d.py index c572e7e86..70d612e86 100644 --- a/comfy/ldm/lightricks/vae/causal_conv3d.py +++ b/comfy/ldm/lightricks/vae/causal_conv3d.py @@ -15,6 +15,7 @@ class CausalConv3d(nn.Module): stride: Union[int, Tuple[int]] = 1, dilation: int = 1, groups: int = 1, + spatial_padding_mode: str = "zeros", **kwargs, ): super().__init__() @@ -38,7 +39,7 @@ class CausalConv3d(nn.Module): stride=stride, dilation=dilation, padding=padding, - padding_mode="zeros", + padding_mode=spatial_padding_mode, groups=groups, ) diff --git a/comfy/ldm/lightricks/vae/causal_video_autoencoder.py b/comfy/ldm/lightricks/vae/causal_video_autoencoder.py index e0344deec..f91870d71 100644 --- a/comfy/ldm/lightricks/vae/causal_video_autoencoder.py +++ b/comfy/ldm/lightricks/vae/causal_video_autoencoder.py @@ -1,13 +1,15 @@ +from __future__ import annotations import torch from torch import nn from functools import partial import math from einops import rearrange -from typing import Optional, Tuple, Union +from typing import List, Optional, Tuple, Union from .conv_nd_factory import make_conv_nd, make_linear_nd from .pixel_norm import PixelNorm from ..model import PixArtAlphaCombinedTimestepSizeEmbeddings import comfy.ops + ops = comfy.ops.disable_weight_init class Encoder(nn.Module): @@ -32,7 +34,7 @@ class Encoder(nn.Module): norm_layer (`str`, *optional*, defaults to `group_norm`): The normalization layer to use. Can be either `group_norm` or `pixel_norm`. latent_log_var (`str`, *optional*, defaults to `per_channel`): - The number of channels for the log variance. Can be either `per_channel`, `uniform`, or `none`. + The number of channels for the log variance. Can be either `per_channel`, `uniform`, `constant` or `none`. """ def __init__( @@ -40,12 +42,13 @@ class Encoder(nn.Module): dims: Union[int, Tuple[int, int]] = 3, in_channels: int = 3, out_channels: int = 3, - blocks=[("res_x", 1)], + blocks: List[Tuple[str, int | dict]] = [("res_x", 1)], base_channels: int = 128, norm_num_groups: int = 32, patch_size: Union[int, Tuple[int]] = 1, norm_layer: str = "group_norm", # group_norm, pixel_norm latent_log_var: str = "per_channel", + spatial_padding_mode: str = "zeros", ): super().__init__() self.patch_size = patch_size @@ -65,6 +68,7 @@ class Encoder(nn.Module): stride=1, padding=1, causal=True, + spatial_padding_mode=spatial_padding_mode, ) self.down_blocks = nn.ModuleList([]) @@ -82,6 +86,7 @@ class Encoder(nn.Module): resnet_eps=1e-6, resnet_groups=norm_num_groups, norm_layer=norm_layer, + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "res_x_y": output_channel = block_params.get("multiplier", 2) * output_channel @@ -92,6 +97,7 @@ class Encoder(nn.Module): eps=1e-6, groups=norm_num_groups, norm_layer=norm_layer, + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "compress_time": block = make_conv_nd( @@ -101,6 +107,7 @@ class Encoder(nn.Module): kernel_size=3, stride=(2, 1, 1), causal=True, + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "compress_space": block = make_conv_nd( @@ -110,6 +117,7 @@ class Encoder(nn.Module): kernel_size=3, stride=(1, 2, 2), causal=True, + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "compress_all": block = make_conv_nd( @@ -119,6 +127,7 @@ class Encoder(nn.Module): kernel_size=3, stride=(2, 2, 2), causal=True, + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "compress_all_x_y": output_channel = block_params.get("multiplier", 2) * output_channel @@ -129,6 +138,34 @@ class Encoder(nn.Module): kernel_size=3, stride=(2, 2, 2), causal=True, + spatial_padding_mode=spatial_padding_mode, + ) + elif block_name == "compress_all_res": + output_channel = block_params.get("multiplier", 2) * output_channel + block = SpaceToDepthDownsample( + dims=dims, + in_channels=input_channel, + out_channels=output_channel, + stride=(2, 2, 2), + spatial_padding_mode=spatial_padding_mode, + ) + elif block_name == "compress_space_res": + output_channel = block_params.get("multiplier", 2) * output_channel + block = SpaceToDepthDownsample( + dims=dims, + in_channels=input_channel, + out_channels=output_channel, + stride=(1, 2, 2), + spatial_padding_mode=spatial_padding_mode, + ) + elif block_name == "compress_time_res": + output_channel = block_params.get("multiplier", 2) * output_channel + block = SpaceToDepthDownsample( + dims=dims, + in_channels=input_channel, + out_channels=output_channel, + stride=(2, 1, 1), + spatial_padding_mode=spatial_padding_mode, ) else: raise ValueError(f"unknown block: {block_name}") @@ -152,10 +189,18 @@ class Encoder(nn.Module): conv_out_channels *= 2 elif latent_log_var == "uniform": conv_out_channels += 1 + elif latent_log_var == "constant": + conv_out_channels += 1 elif latent_log_var != "none": raise ValueError(f"Invalid latent_log_var: {latent_log_var}") self.conv_out = make_conv_nd( - dims, output_channel, conv_out_channels, 3, padding=1, causal=True + dims, + output_channel, + conv_out_channels, + 3, + padding=1, + causal=True, + spatial_padding_mode=spatial_padding_mode, ) self.gradient_checkpointing = False @@ -197,6 +242,15 @@ class Encoder(nn.Module): sample = torch.cat([sample, repeated_last_channel], dim=1) else: raise ValueError(f"Invalid input shape: {sample.shape}") + elif self.latent_log_var == "constant": + sample = sample[:, :-1, ...] + approx_ln_0 = ( + -30 + ) # this is the minimal clamp value in DiagonalGaussianDistribution objects + sample = torch.cat( + [sample, torch.ones_like(sample, device=sample.device) * approx_ln_0], + dim=1, + ) return sample @@ -231,7 +285,7 @@ class Decoder(nn.Module): dims, in_channels: int = 3, out_channels: int = 3, - blocks=[("res_x", 1)], + blocks: List[Tuple[str, int | dict]] = [("res_x", 1)], base_channels: int = 128, layers_per_block: int = 2, norm_num_groups: int = 32, @@ -239,6 +293,7 @@ class Decoder(nn.Module): norm_layer: str = "group_norm", causal: bool = True, timestep_conditioning: bool = False, + spatial_padding_mode: str = "zeros", ): super().__init__() self.patch_size = patch_size @@ -264,6 +319,7 @@ class Decoder(nn.Module): stride=1, padding=1, causal=True, + spatial_padding_mode=spatial_padding_mode, ) self.up_blocks = nn.ModuleList([]) @@ -283,6 +339,7 @@ class Decoder(nn.Module): norm_layer=norm_layer, inject_noise=block_params.get("inject_noise", False), timestep_conditioning=timestep_conditioning, + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "attn_res_x": block = UNetMidBlock3D( @@ -294,6 +351,7 @@ class Decoder(nn.Module): inject_noise=block_params.get("inject_noise", False), timestep_conditioning=timestep_conditioning, attention_head_dim=block_params["attention_head_dim"], + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "res_x_y": output_channel = output_channel // block_params.get("multiplier", 2) @@ -306,14 +364,21 @@ class Decoder(nn.Module): norm_layer=norm_layer, inject_noise=block_params.get("inject_noise", False), timestep_conditioning=False, + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "compress_time": block = DepthToSpaceUpsample( - dims=dims, in_channels=input_channel, stride=(2, 1, 1) + dims=dims, + in_channels=input_channel, + stride=(2, 1, 1), + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "compress_space": block = DepthToSpaceUpsample( - dims=dims, in_channels=input_channel, stride=(1, 2, 2) + dims=dims, + in_channels=input_channel, + stride=(1, 2, 2), + spatial_padding_mode=spatial_padding_mode, ) elif block_name == "compress_all": output_channel = output_channel // block_params.get("multiplier", 1) @@ -323,6 +388,7 @@ class Decoder(nn.Module): stride=(2, 2, 2), residual=block_params.get("residual", False), out_channels_reduction_factor=block_params.get("multiplier", 1), + spatial_padding_mode=spatial_padding_mode, ) else: raise ValueError(f"unknown layer: {block_name}") @@ -340,7 +406,13 @@ class Decoder(nn.Module): self.conv_act = nn.SiLU() self.conv_out = make_conv_nd( - dims, output_channel, out_channels, 3, padding=1, causal=True + dims, + output_channel, + out_channels, + 3, + padding=1, + causal=True, + spatial_padding_mode=spatial_padding_mode, ) self.gradient_checkpointing = False @@ -433,6 +505,12 @@ class UNetMidBlock3D(nn.Module): resnet_eps (`float`, *optional*, 1e-6 ): The epsilon value for the resnet blocks. resnet_groups (`int`, *optional*, defaults to 32): The number of groups to use in the group normalization layers of the resnet blocks. + norm_layer (`str`, *optional*, defaults to `group_norm`): + The normalization layer to use. Can be either `group_norm` or `pixel_norm`. + inject_noise (`bool`, *optional*, defaults to `False`): + Whether to inject noise into the hidden states. + timestep_conditioning (`bool`, *optional*, defaults to `False`): + Whether to condition the hidden states on the timestep. Returns: `torch.FloatTensor`: The output of the last residual block, which is a tensor of shape `(batch_size, @@ -451,6 +529,7 @@ class UNetMidBlock3D(nn.Module): norm_layer: str = "group_norm", inject_noise: bool = False, timestep_conditioning: bool = False, + spatial_padding_mode: str = "zeros", ): super().__init__() resnet_groups = ( @@ -476,13 +555,17 @@ class UNetMidBlock3D(nn.Module): norm_layer=norm_layer, inject_noise=inject_noise, timestep_conditioning=timestep_conditioning, + spatial_padding_mode=spatial_padding_mode, ) for _ in range(num_layers) ] ) def forward( - self, hidden_states: torch.FloatTensor, causal: bool = True, timestep: Optional[torch.Tensor] = None + self, + hidden_states: torch.FloatTensor, + causal: bool = True, + timestep: Optional[torch.Tensor] = None, ) -> torch.FloatTensor: timestep_embed = None if self.timestep_conditioning: @@ -507,9 +590,62 @@ class UNetMidBlock3D(nn.Module): return hidden_states +class SpaceToDepthDownsample(nn.Module): + def __init__(self, dims, in_channels, out_channels, stride, spatial_padding_mode): + super().__init__() + self.stride = stride + self.group_size = in_channels * math.prod(stride) // out_channels + self.conv = make_conv_nd( + dims=dims, + in_channels=in_channels, + out_channels=out_channels // math.prod(stride), + kernel_size=3, + stride=1, + causal=True, + spatial_padding_mode=spatial_padding_mode, + ) + + def forward(self, x, causal: bool = True): + if self.stride[0] == 2: + x = torch.cat( + [x[:, :, :1, :, :], x], dim=2 + ) # duplicate first frames for padding + + # skip connection + x_in = rearrange( + x, + "b c (d p1) (h p2) (w p3) -> b (c p1 p2 p3) d h w", + p1=self.stride[0], + p2=self.stride[1], + p3=self.stride[2], + ) + x_in = rearrange(x_in, "b (c g) d h w -> b c g d h w", g=self.group_size) + x_in = x_in.mean(dim=2) + + # conv + x = self.conv(x, causal=causal) + x = rearrange( + x, + "b c (d p1) (h p2) (w p3) -> b (c p1 p2 p3) d h w", + p1=self.stride[0], + p2=self.stride[1], + p3=self.stride[2], + ) + + x = x + x_in + + return x + + class DepthToSpaceUpsample(nn.Module): def __init__( - self, dims, in_channels, stride, residual=False, out_channels_reduction_factor=1 + self, + dims, + in_channels, + stride, + residual=False, + out_channels_reduction_factor=1, + spatial_padding_mode="zeros", ): super().__init__() self.stride = stride @@ -523,6 +659,7 @@ class DepthToSpaceUpsample(nn.Module): kernel_size=3, stride=1, causal=True, + spatial_padding_mode=spatial_padding_mode, ) self.residual = residual self.out_channels_reduction_factor = out_channels_reduction_factor @@ -558,7 +695,7 @@ class DepthToSpaceUpsample(nn.Module): class LayerNorm(nn.Module): def __init__(self, dim, eps, elementwise_affine=True) -> None: super().__init__() - self.norm = nn.LayerNorm(dim, eps=eps, elementwise_affine=elementwise_affine) + self.norm = ops.LayerNorm(dim, eps=eps, elementwise_affine=elementwise_affine) def forward(self, x): x = rearrange(x, "b c d h w -> b d h w c") @@ -591,6 +728,7 @@ class ResnetBlock3D(nn.Module): norm_layer: str = "group_norm", inject_noise: bool = False, timestep_conditioning: bool = False, + spatial_padding_mode: str = "zeros", ): super().__init__() self.in_channels = in_channels @@ -617,6 +755,7 @@ class ResnetBlock3D(nn.Module): stride=1, padding=1, causal=True, + spatial_padding_mode=spatial_padding_mode, ) if inject_noise: @@ -641,6 +780,7 @@ class ResnetBlock3D(nn.Module): stride=1, padding=1, causal=True, + spatial_padding_mode=spatial_padding_mode, ) if inject_noise: @@ -801,9 +941,44 @@ class processor(nn.Module): return (x - self.get_buffer("mean-of-means").view(1, -1, 1, 1, 1).to(x)) / self.get_buffer("std-of-means").view(1, -1, 1, 1, 1).to(x) class VideoVAE(nn.Module): - def __init__(self, version=0): + def __init__(self, version=0, config=None): super().__init__() + if config is None: + config = self.guess_config(version) + + self.timestep_conditioning = config.get("timestep_conditioning", False) + double_z = config.get("double_z", True) + latent_log_var = config.get( + "latent_log_var", "per_channel" if double_z else "none" + ) + + self.encoder = Encoder( + dims=config["dims"], + in_channels=config.get("in_channels", 3), + out_channels=config["latent_channels"], + blocks=config.get("encoder_blocks", config.get("encoder_blocks", config.get("blocks"))), + patch_size=config.get("patch_size", 1), + latent_log_var=latent_log_var, + norm_layer=config.get("norm_layer", "group_norm"), + spatial_padding_mode=config.get("spatial_padding_mode", "zeros"), + ) + + self.decoder = Decoder( + dims=config["dims"], + in_channels=config["latent_channels"], + out_channels=config.get("out_channels", 3), + blocks=config.get("decoder_blocks", config.get("decoder_blocks", config.get("blocks"))), + patch_size=config.get("patch_size", 1), + norm_layer=config.get("norm_layer", "group_norm"), + causal=config.get("causal_decoder", False), + timestep_conditioning=self.timestep_conditioning, + spatial_padding_mode=config.get("spatial_padding_mode", "zeros"), + ) + + self.per_channel_statistics = processor() + + def guess_config(self, version): if version == 0: config = { "_class_name": "CausalVideoAutoencoder", @@ -830,7 +1005,7 @@ class VideoVAE(nn.Module): "use_quant_conv": False, "causal_decoder": False, } - else: + elif version == 1: config = { "_class_name": "CausalVideoAutoencoder", "dims": 3, @@ -866,37 +1041,47 @@ class VideoVAE(nn.Module): "causal_decoder": False, "timestep_conditioning": True, } - - double_z = config.get("double_z", True) - latent_log_var = config.get( - "latent_log_var", "per_channel" if double_z else "none" - ) - - self.encoder = Encoder( - dims=config["dims"], - in_channels=config.get("in_channels", 3), - out_channels=config["latent_channels"], - blocks=config.get("encoder_blocks", config.get("encoder_blocks", config.get("blocks"))), - patch_size=config.get("patch_size", 1), - latent_log_var=latent_log_var, - norm_layer=config.get("norm_layer", "group_norm"), - ) - - self.decoder = Decoder( - dims=config["dims"], - in_channels=config["latent_channels"], - out_channels=config.get("out_channels", 3), - blocks=config.get("decoder_blocks", config.get("decoder_blocks", config.get("blocks"))), - patch_size=config.get("patch_size", 1), - norm_layer=config.get("norm_layer", "group_norm"), - causal=config.get("causal_decoder", False), - timestep_conditioning=config.get("timestep_conditioning", False), - ) - - self.timestep_conditioning = config.get("timestep_conditioning", False) - self.per_channel_statistics = processor() + else: + config = { + "_class_name": "CausalVideoAutoencoder", + "dims": 3, + "in_channels": 3, + "out_channels": 3, + "latent_channels": 128, + "encoder_blocks": [ + ["res_x", {"num_layers": 4}], + ["compress_space_res", {"multiplier": 2}], + ["res_x", {"num_layers": 6}], + ["compress_time_res", {"multiplier": 2}], + ["res_x", {"num_layers": 6}], + ["compress_all_res", {"multiplier": 2}], + ["res_x", {"num_layers": 2}], + ["compress_all_res", {"multiplier": 2}], + ["res_x", {"num_layers": 2}] + ], + "decoder_blocks": [ + ["res_x", {"num_layers": 5, "inject_noise": False}], + ["compress_all", {"residual": True, "multiplier": 2}], + ["res_x", {"num_layers": 5, "inject_noise": False}], + ["compress_all", {"residual": True, "multiplier": 2}], + ["res_x", {"num_layers": 5, "inject_noise": False}], + ["compress_all", {"residual": True, "multiplier": 2}], + ["res_x", {"num_layers": 5, "inject_noise": False}] + ], + "scaling_factor": 1.0, + "norm_layer": "pixel_norm", + "patch_size": 4, + "latent_log_var": "uniform", + "use_quant_conv": False, + "causal_decoder": False, + "timestep_conditioning": True + } + return config def encode(self, x): + frames_count = x.shape[2] + if ((frames_count - 1) % 8) != 0: + raise ValueError("Invalid number of frames: Encode input must have 1 + 8 * x frames (e.g., 1, 9, 17, ...). Please check your input.") means, logvar = torch.chunk(self.encoder(x), 2, dim=1) return self.per_channel_statistics.normalize(means) diff --git a/comfy/ldm/lightricks/vae/conv_nd_factory.py b/comfy/ldm/lightricks/vae/conv_nd_factory.py index 52df4ee22..b4026b14f 100644 --- a/comfy/ldm/lightricks/vae/conv_nd_factory.py +++ b/comfy/ldm/lightricks/vae/conv_nd_factory.py @@ -17,7 +17,11 @@ def make_conv_nd( groups=1, bias=True, causal=False, + spatial_padding_mode="zeros", + temporal_padding_mode="zeros", ): + if not (spatial_padding_mode == temporal_padding_mode or causal): + raise NotImplementedError("spatial and temporal padding modes must be equal") if dims == 2: return ops.Conv2d( in_channels=in_channels, @@ -28,6 +32,7 @@ def make_conv_nd( dilation=dilation, groups=groups, bias=bias, + padding_mode=spatial_padding_mode, ) elif dims == 3: if causal: @@ -40,6 +45,7 @@ def make_conv_nd( dilation=dilation, groups=groups, bias=bias, + spatial_padding_mode=spatial_padding_mode, ) return ops.Conv3d( in_channels=in_channels, @@ -50,6 +56,7 @@ def make_conv_nd( dilation=dilation, groups=groups, bias=bias, + padding_mode=spatial_padding_mode, ) elif dims == (2, 1): return DualConv3d( @@ -59,6 +66,7 @@ def make_conv_nd( stride=stride, padding=padding, bias=bias, + padding_mode=spatial_padding_mode, ) else: raise ValueError(f"unsupported dimensions: {dims}") diff --git a/comfy/ldm/lightricks/vae/dual_conv3d.py b/comfy/ldm/lightricks/vae/dual_conv3d.py index 6bd54c0a6..dcf889296 100644 --- a/comfy/ldm/lightricks/vae/dual_conv3d.py +++ b/comfy/ldm/lightricks/vae/dual_conv3d.py @@ -18,11 +18,13 @@ class DualConv3d(nn.Module): dilation: Union[int, Tuple[int, int, int]] = 1, groups=1, bias=True, + padding_mode="zeros", ): super(DualConv3d, self).__init__() self.in_channels = in_channels self.out_channels = out_channels + self.padding_mode = padding_mode # Ensure kernel_size, stride, padding, and dilation are tuples of length 3 if isinstance(kernel_size, int): kernel_size = (kernel_size, kernel_size, kernel_size) @@ -108,6 +110,7 @@ class DualConv3d(nn.Module): self.padding1, self.dilation1, self.groups, + padding_mode=self.padding_mode, ) if skip_time_conv: @@ -122,6 +125,7 @@ class DualConv3d(nn.Module): self.padding2, self.dilation2, self.groups, + padding_mode=self.padding_mode, ) return x @@ -137,7 +141,16 @@ class DualConv3d(nn.Module): stride1 = (self.stride1[1], self.stride1[2]) padding1 = (self.padding1[1], self.padding1[2]) dilation1 = (self.dilation1[1], self.dilation1[2]) - x = F.conv2d(x, weight1, self.bias1, stride1, padding1, dilation1, self.groups) + x = F.conv2d( + x, + weight1, + self.bias1, + stride1, + padding1, + dilation1, + self.groups, + padding_mode=self.padding_mode, + ) _, _, h, w = x.shape @@ -154,7 +167,16 @@ class DualConv3d(nn.Module): stride2 = self.stride2[0] padding2 = self.padding2[0] dilation2 = self.dilation2[0] - x = F.conv1d(x, weight2, self.bias2, stride2, padding2, dilation2, self.groups) + x = F.conv1d( + x, + weight2, + self.bias2, + stride2, + padding2, + dilation2, + self.groups, + padding_mode=self.padding_mode, + ) x = rearrange(x, "(b h w) c d -> b c d h w", b=b, h=h, w=w) return x diff --git a/comfy/ldm/lumina/model.py b/comfy/ldm/lumina/model.py new file mode 100644 index 000000000..ccd5d2c0e --- /dev/null +++ b/comfy/ldm/lumina/model.py @@ -0,0 +1,622 @@ +# Code from: https://github.com/Alpha-VLLM/Lumina-Image-2.0/blob/main/models/model.py +from __future__ import annotations + +from typing import List, Optional, Tuple + +import torch +import torch.nn as nn +import torch.nn.functional as F +import comfy.ldm.common_dit + +from comfy.ldm.modules.diffusionmodules.mmdit import TimestepEmbedder, RMSNorm +from comfy.ldm.modules.attention import optimized_attention_masked +from comfy.ldm.flux.layers import EmbedND + + +def modulate(x, scale): + return x * (1 + scale.unsqueeze(1)) + +############################################################################# +# Core NextDiT Model # +############################################################################# + + +class JointAttention(nn.Module): + """Multi-head attention module.""" + + def __init__( + self, + dim: int, + n_heads: int, + n_kv_heads: Optional[int], + qk_norm: bool, + operation_settings={}, + ): + """ + Initialize the Attention module. + + Args: + dim (int): Number of input dimensions. + n_heads (int): Number of heads. + n_kv_heads (Optional[int]): Number of kv heads, if using GQA. + + """ + super().__init__() + self.n_kv_heads = n_heads if n_kv_heads is None else n_kv_heads + self.n_local_heads = n_heads + self.n_local_kv_heads = self.n_kv_heads + self.n_rep = self.n_local_heads // self.n_local_kv_heads + self.head_dim = dim // n_heads + + self.qkv = operation_settings.get("operations").Linear( + dim, + (n_heads + self.n_kv_heads + self.n_kv_heads) * self.head_dim, + bias=False, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ) + self.out = operation_settings.get("operations").Linear( + n_heads * self.head_dim, + dim, + bias=False, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ) + + if qk_norm: + self.q_norm = RMSNorm(self.head_dim, elementwise_affine=True, **operation_settings) + self.k_norm = RMSNorm(self.head_dim, elementwise_affine=True, **operation_settings) + else: + self.q_norm = self.k_norm = nn.Identity() + + @staticmethod + def apply_rotary_emb( + x_in: torch.Tensor, + freqs_cis: torch.Tensor, + ) -> torch.Tensor: + """ + Apply rotary embeddings to input tensors using the given frequency + tensor. + + This function applies rotary embeddings to the given query 'xq' and + key 'xk' tensors using the provided frequency tensor 'freqs_cis'. The + input tensors are reshaped as complex numbers, and the frequency tensor + is reshaped for broadcasting compatibility. The resulting tensors + contain rotary embeddings and are returned as real tensors. + + Args: + x_in (torch.Tensor): Query or Key tensor to apply rotary embeddings. + freqs_cis (torch.Tensor): Precomputed frequency tensor for complex + exponentials. + + Returns: + Tuple[torch.Tensor, torch.Tensor]: Tuple of modified query tensor + and key tensor with rotary embeddings. + """ + + t_ = x_in.reshape(*x_in.shape[:-1], -1, 1, 2) + t_out = freqs_cis[..., 0] * t_[..., 0] + freqs_cis[..., 1] * t_[..., 1] + return t_out.reshape(*x_in.shape) + + def forward( + self, + x: torch.Tensor, + x_mask: torch.Tensor, + freqs_cis: torch.Tensor, + ) -> torch.Tensor: + """ + + Args: + x: + x_mask: + freqs_cis: + + Returns: + + """ + bsz, seqlen, _ = x.shape + + xq, xk, xv = torch.split( + self.qkv(x), + [ + self.n_local_heads * self.head_dim, + self.n_local_kv_heads * self.head_dim, + self.n_local_kv_heads * self.head_dim, + ], + dim=-1, + ) + xq = xq.view(bsz, seqlen, self.n_local_heads, self.head_dim) + xk = xk.view(bsz, seqlen, self.n_local_kv_heads, self.head_dim) + xv = xv.view(bsz, seqlen, self.n_local_kv_heads, self.head_dim) + + xq = self.q_norm(xq) + xk = self.k_norm(xk) + + xq = JointAttention.apply_rotary_emb(xq, freqs_cis=freqs_cis) + xk = JointAttention.apply_rotary_emb(xk, freqs_cis=freqs_cis) + + n_rep = self.n_local_heads // self.n_local_kv_heads + if n_rep >= 1: + xk = xk.unsqueeze(3).repeat(1, 1, 1, n_rep, 1).flatten(2, 3) + xv = xv.unsqueeze(3).repeat(1, 1, 1, n_rep, 1).flatten(2, 3) + output = optimized_attention_masked(xq.movedim(1, 2), xk.movedim(1, 2), xv.movedim(1, 2), self.n_local_heads, x_mask, skip_reshape=True) + + return self.out(output) + + +class FeedForward(nn.Module): + def __init__( + self, + dim: int, + hidden_dim: int, + multiple_of: int, + ffn_dim_multiplier: Optional[float], + operation_settings={}, + ): + """ + Initialize the FeedForward module. + + Args: + dim (int): Input dimension. + hidden_dim (int): Hidden dimension of the feedforward layer. + multiple_of (int): Value to ensure hidden dimension is a multiple + of this value. + ffn_dim_multiplier (float, optional): Custom multiplier for hidden + dimension. Defaults to None. + + """ + super().__init__() + # custom dim factor multiplier + if ffn_dim_multiplier is not None: + hidden_dim = int(ffn_dim_multiplier * hidden_dim) + hidden_dim = multiple_of * ((hidden_dim + multiple_of - 1) // multiple_of) + + self.w1 = operation_settings.get("operations").Linear( + dim, + hidden_dim, + bias=False, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ) + self.w2 = operation_settings.get("operations").Linear( + hidden_dim, + dim, + bias=False, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ) + self.w3 = operation_settings.get("operations").Linear( + dim, + hidden_dim, + bias=False, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ) + + # @torch.compile + def _forward_silu_gating(self, x1, x3): + return F.silu(x1) * x3 + + def forward(self, x): + return self.w2(self._forward_silu_gating(self.w1(x), self.w3(x))) + + +class JointTransformerBlock(nn.Module): + def __init__( + self, + layer_id: int, + dim: int, + n_heads: int, + n_kv_heads: int, + multiple_of: int, + ffn_dim_multiplier: float, + norm_eps: float, + qk_norm: bool, + modulation=True, + operation_settings={}, + ) -> None: + """ + Initialize a TransformerBlock. + + Args: + layer_id (int): Identifier for the layer. + dim (int): Embedding dimension of the input features. + n_heads (int): Number of attention heads. + n_kv_heads (Optional[int]): Number of attention heads in key and + value features (if using GQA), or set to None for the same as + query. + multiple_of (int): + ffn_dim_multiplier (float): + norm_eps (float): + + """ + super().__init__() + self.dim = dim + self.head_dim = dim // n_heads + self.attention = JointAttention(dim, n_heads, n_kv_heads, qk_norm, operation_settings=operation_settings) + self.feed_forward = FeedForward( + dim=dim, + hidden_dim=4 * dim, + multiple_of=multiple_of, + ffn_dim_multiplier=ffn_dim_multiplier, + operation_settings=operation_settings, + ) + self.layer_id = layer_id + self.attention_norm1 = RMSNorm(dim, eps=norm_eps, elementwise_affine=True, **operation_settings) + self.ffn_norm1 = RMSNorm(dim, eps=norm_eps, elementwise_affine=True, **operation_settings) + + self.attention_norm2 = RMSNorm(dim, eps=norm_eps, elementwise_affine=True, **operation_settings) + self.ffn_norm2 = RMSNorm(dim, eps=norm_eps, elementwise_affine=True, **operation_settings) + + self.modulation = modulation + if modulation: + self.adaLN_modulation = nn.Sequential( + nn.SiLU(), + operation_settings.get("operations").Linear( + min(dim, 1024), + 4 * dim, + bias=True, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ), + ) + + def forward( + self, + x: torch.Tensor, + x_mask: torch.Tensor, + freqs_cis: torch.Tensor, + adaln_input: Optional[torch.Tensor]=None, + ): + """ + Perform a forward pass through the TransformerBlock. + + Args: + x (torch.Tensor): Input tensor. + freqs_cis (torch.Tensor): Precomputed cosine and sine frequencies. + + Returns: + torch.Tensor: Output tensor after applying attention and + feedforward layers. + + """ + if self.modulation: + assert adaln_input is not None + scale_msa, gate_msa, scale_mlp, gate_mlp = self.adaLN_modulation(adaln_input).chunk(4, dim=1) + + x = x + gate_msa.unsqueeze(1).tanh() * self.attention_norm2( + self.attention( + modulate(self.attention_norm1(x), scale_msa), + x_mask, + freqs_cis, + ) + ) + x = x + gate_mlp.unsqueeze(1).tanh() * self.ffn_norm2( + self.feed_forward( + modulate(self.ffn_norm1(x), scale_mlp), + ) + ) + else: + assert adaln_input is None + x = x + self.attention_norm2( + self.attention( + self.attention_norm1(x), + x_mask, + freqs_cis, + ) + ) + x = x + self.ffn_norm2( + self.feed_forward( + self.ffn_norm1(x), + ) + ) + return x + + +class FinalLayer(nn.Module): + """ + The final layer of NextDiT. + """ + + def __init__(self, hidden_size, patch_size, out_channels, operation_settings={}): + super().__init__() + self.norm_final = operation_settings.get("operations").LayerNorm( + hidden_size, + elementwise_affine=False, + eps=1e-6, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ) + self.linear = operation_settings.get("operations").Linear( + hidden_size, + patch_size * patch_size * out_channels, + bias=True, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ) + + self.adaLN_modulation = nn.Sequential( + nn.SiLU(), + operation_settings.get("operations").Linear( + min(hidden_size, 1024), + hidden_size, + bias=True, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ), + ) + + def forward(self, x, c): + scale = self.adaLN_modulation(c) + x = modulate(self.norm_final(x), scale) + x = self.linear(x) + return x + + +class NextDiT(nn.Module): + """ + Diffusion model with a Transformer backbone. + """ + + def __init__( + self, + patch_size: int = 2, + in_channels: int = 4, + dim: int = 4096, + n_layers: int = 32, + n_refiner_layers: int = 2, + n_heads: int = 32, + n_kv_heads: Optional[int] = None, + multiple_of: int = 256, + ffn_dim_multiplier: Optional[float] = None, + norm_eps: float = 1e-5, + qk_norm: bool = False, + cap_feat_dim: int = 5120, + axes_dims: List[int] = (16, 56, 56), + axes_lens: List[int] = (1, 512, 512), + image_model=None, + device=None, + dtype=None, + operations=None, + ) -> None: + super().__init__() + self.dtype = dtype + operation_settings = {"operations": operations, "device": device, "dtype": dtype} + self.in_channels = in_channels + self.out_channels = in_channels + self.patch_size = patch_size + + self.x_embedder = operation_settings.get("operations").Linear( + in_features=patch_size * patch_size * in_channels, + out_features=dim, + bias=True, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ) + + self.noise_refiner = nn.ModuleList( + [ + JointTransformerBlock( + layer_id, + dim, + n_heads, + n_kv_heads, + multiple_of, + ffn_dim_multiplier, + norm_eps, + qk_norm, + modulation=True, + operation_settings=operation_settings, + ) + for layer_id in range(n_refiner_layers) + ] + ) + self.context_refiner = nn.ModuleList( + [ + JointTransformerBlock( + layer_id, + dim, + n_heads, + n_kv_heads, + multiple_of, + ffn_dim_multiplier, + norm_eps, + qk_norm, + modulation=False, + operation_settings=operation_settings, + ) + for layer_id in range(n_refiner_layers) + ] + ) + + self.t_embedder = TimestepEmbedder(min(dim, 1024), **operation_settings) + self.cap_embedder = nn.Sequential( + RMSNorm(cap_feat_dim, eps=norm_eps, elementwise_affine=True, **operation_settings), + operation_settings.get("operations").Linear( + cap_feat_dim, + dim, + bias=True, + device=operation_settings.get("device"), + dtype=operation_settings.get("dtype"), + ), + ) + + self.layers = nn.ModuleList( + [ + JointTransformerBlock( + layer_id, + dim, + n_heads, + n_kv_heads, + multiple_of, + ffn_dim_multiplier, + norm_eps, + qk_norm, + operation_settings=operation_settings, + ) + for layer_id in range(n_layers) + ] + ) + self.norm_final = RMSNorm(dim, eps=norm_eps, elementwise_affine=True, **operation_settings) + self.final_layer = FinalLayer(dim, patch_size, self.out_channels, operation_settings=operation_settings) + + assert (dim // n_heads) == sum(axes_dims) + self.axes_dims = axes_dims + self.axes_lens = axes_lens + self.rope_embedder = EmbedND(dim=dim // n_heads, theta=10000.0, axes_dim=axes_dims) + self.dim = dim + self.n_heads = n_heads + + def unpatchify( + self, x: torch.Tensor, img_size: List[Tuple[int, int]], cap_size: List[int], return_tensor=False + ) -> List[torch.Tensor]: + """ + x: (N, T, patch_size**2 * C) + imgs: (N, H, W, C) + """ + pH = pW = self.patch_size + imgs = [] + for i in range(x.size(0)): + H, W = img_size[i] + begin = cap_size[i] + end = begin + (H // pH) * (W // pW) + imgs.append( + x[i][begin:end] + .view(H // pH, W // pW, pH, pW, self.out_channels) + .permute(4, 0, 2, 1, 3) + .flatten(3, 4) + .flatten(1, 2) + ) + + if return_tensor: + imgs = torch.stack(imgs, dim=0) + return imgs + + def patchify_and_embed( + self, x: List[torch.Tensor] | torch.Tensor, cap_feats: torch.Tensor, cap_mask: torch.Tensor, t: torch.Tensor, num_tokens + ) -> Tuple[torch.Tensor, torch.Tensor, List[Tuple[int, int]], List[int], torch.Tensor]: + bsz = len(x) + pH = pW = self.patch_size + device = x[0].device + dtype = x[0].dtype + + if cap_mask is not None: + l_effective_cap_len = cap_mask.sum(dim=1).tolist() + else: + l_effective_cap_len = [num_tokens] * bsz + + if cap_mask is not None and not torch.is_floating_point(cap_mask): + cap_mask = (cap_mask - 1).to(dtype) * torch.finfo(dtype).max + + img_sizes = [(img.size(1), img.size(2)) for img in x] + l_effective_img_len = [(H // pH) * (W // pW) for (H, W) in img_sizes] + + max_seq_len = max( + (cap_len+img_len for cap_len, img_len in zip(l_effective_cap_len, l_effective_img_len)) + ) + max_cap_len = max(l_effective_cap_len) + max_img_len = max(l_effective_img_len) + + position_ids = torch.zeros(bsz, max_seq_len, 3, dtype=torch.int32, device=device) + + for i in range(bsz): + cap_len = l_effective_cap_len[i] + img_len = l_effective_img_len[i] + H, W = img_sizes[i] + H_tokens, W_tokens = H // pH, W // pW + assert H_tokens * W_tokens == img_len + + position_ids[i, :cap_len, 0] = torch.arange(cap_len, dtype=torch.int32, device=device) + position_ids[i, cap_len:cap_len+img_len, 0] = cap_len + row_ids = torch.arange(H_tokens, dtype=torch.int32, device=device).view(-1, 1).repeat(1, W_tokens).flatten() + col_ids = torch.arange(W_tokens, dtype=torch.int32, device=device).view(1, -1).repeat(H_tokens, 1).flatten() + position_ids[i, cap_len:cap_len+img_len, 1] = row_ids + position_ids[i, cap_len:cap_len+img_len, 2] = col_ids + + freqs_cis = self.rope_embedder(position_ids).movedim(1, 2).to(dtype) + + # build freqs_cis for cap and image individually + cap_freqs_cis_shape = list(freqs_cis.shape) + # cap_freqs_cis_shape[1] = max_cap_len + cap_freqs_cis_shape[1] = cap_feats.shape[1] + cap_freqs_cis = torch.zeros(*cap_freqs_cis_shape, device=device, dtype=freqs_cis.dtype) + + img_freqs_cis_shape = list(freqs_cis.shape) + img_freqs_cis_shape[1] = max_img_len + img_freqs_cis = torch.zeros(*img_freqs_cis_shape, device=device, dtype=freqs_cis.dtype) + + for i in range(bsz): + cap_len = l_effective_cap_len[i] + img_len = l_effective_img_len[i] + cap_freqs_cis[i, :cap_len] = freqs_cis[i, :cap_len] + img_freqs_cis[i, :img_len] = freqs_cis[i, cap_len:cap_len+img_len] + + # refine context + for layer in self.context_refiner: + cap_feats = layer(cap_feats, cap_mask, cap_freqs_cis) + + # refine image + flat_x = [] + for i in range(bsz): + img = x[i] + C, H, W = img.size() + img = img.view(C, H // pH, pH, W // pW, pW).permute(1, 3, 2, 4, 0).flatten(2).flatten(0, 1) + flat_x.append(img) + x = flat_x + padded_img_embed = torch.zeros(bsz, max_img_len, x[0].shape[-1], device=device, dtype=x[0].dtype) + padded_img_mask = torch.zeros(bsz, max_img_len, dtype=dtype, device=device) + for i in range(bsz): + padded_img_embed[i, :l_effective_img_len[i]] = x[i] + padded_img_mask[i, l_effective_img_len[i]:] = -torch.finfo(dtype).max + + padded_img_embed = self.x_embedder(padded_img_embed) + padded_img_mask = padded_img_mask.unsqueeze(1) + for layer in self.noise_refiner: + padded_img_embed = layer(padded_img_embed, padded_img_mask, img_freqs_cis, t) + + if cap_mask is not None: + mask = torch.zeros(bsz, max_seq_len, dtype=dtype, device=device) + mask[:, :max_cap_len] = cap_mask[:, :max_cap_len] + else: + mask = None + + padded_full_embed = torch.zeros(bsz, max_seq_len, self.dim, device=device, dtype=x[0].dtype) + for i in range(bsz): + cap_len = l_effective_cap_len[i] + img_len = l_effective_img_len[i] + + padded_full_embed[i, :cap_len] = cap_feats[i, :cap_len] + padded_full_embed[i, cap_len:cap_len+img_len] = padded_img_embed[i, :img_len] + + return padded_full_embed, mask, img_sizes, l_effective_cap_len, freqs_cis + + # def forward(self, x, t, cap_feats, cap_mask): + def forward(self, x, timesteps, context, num_tokens, attention_mask=None, **kwargs): + t = 1.0 - timesteps + cap_feats = context + cap_mask = attention_mask + bs, c, h, w = x.shape + x = comfy.ldm.common_dit.pad_to_patch_size(x, (self.patch_size, self.patch_size)) + """ + Forward pass of NextDiT. + t: (N,) tensor of diffusion timesteps + y: (N,) tensor of text tokens/features + """ + + t = self.t_embedder(t, dtype=x.dtype) # (N, D) + adaln_input = t + + cap_feats = self.cap_embedder(cap_feats) # (N, L, D) # todo check if able to batchify w.o. redundant compute + + x_is_tensor = isinstance(x, torch.Tensor) + x, mask, img_size, cap_size, freqs_cis = self.patchify_and_embed(x, cap_feats, cap_mask, t, num_tokens) + freqs_cis = freqs_cis.to(x.device) + + for layer in self.layers: + x = layer(x, mask, freqs_cis, adaln_input) + + x = self.final_layer(x, adaln_input) + x = self.unpatchify(x, img_size, cap_size, return_tensor=x_is_tensor)[:,:,:h,:w] + + return -x + diff --git a/comfy/ldm/modules/attention.py b/comfy/ldm/modules/attention.py index 44aec59a6..7908d1313 100644 --- a/comfy/ldm/modules/attention.py +++ b/comfy/ldm/modules/attention.py @@ -1,4 +1,6 @@ import math +import sys + import torch import torch.nn.functional as F from torch import nn, einsum @@ -16,7 +18,18 @@ if model_management.xformers_enabled(): import xformers.ops if model_management.sage_attention_enabled(): - from sageattention import sageattn + try: + from sageattention import sageattn + except ModuleNotFoundError: + logging.error(f"\n\nTo use the `--use-sage-attention` feature, the `sageattention` package must be installed first.\ncommand:\n\t{sys.executable} -m pip install sageattention") + exit(-1) + +if model_management.flash_attention_enabled(): + try: + from flash_attn import flash_attn_func + except ModuleNotFoundError: + logging.error(f"\n\nTo use the `--use-flash-attention` feature, the `flash-attn` package must be installed first.\ncommand:\n\t{sys.executable} -m pip install flash-attn") + exit(-1) from comfy.cli_args import args import comfy.ops @@ -24,38 +37,24 @@ ops = comfy.ops.disable_weight_init FORCE_UPCAST_ATTENTION_DTYPE = model_management.force_upcast_attention_dtype() -def get_attn_precision(attn_precision): +def get_attn_precision(attn_precision, current_dtype): if args.dont_upcast_attention: return None - if FORCE_UPCAST_ATTENTION_DTYPE is not None: - return FORCE_UPCAST_ATTENTION_DTYPE + + if FORCE_UPCAST_ATTENTION_DTYPE is not None and current_dtype in FORCE_UPCAST_ATTENTION_DTYPE: + return FORCE_UPCAST_ATTENTION_DTYPE[current_dtype] return attn_precision def exists(val): return val is not None -def uniq(arr): - return{el: True for el in arr}.keys() - - def default(val, d): if exists(val): return val return d -def max_neg_value(t): - return -torch.finfo(t.dtype).max - - -def init_(tensor): - dim = tensor.shape[-1] - std = 1 / math.sqrt(dim) - tensor.uniform_(-std, std) - return tensor - - # feedforward class GEGLU(nn.Module): def __init__(self, dim_in, dim_out, dtype=None, device=None, operations=ops): @@ -90,7 +89,7 @@ def Normalize(in_channels, dtype=None, device=None): return torch.nn.GroupNorm(num_groups=32, num_channels=in_channels, eps=1e-6, affine=True, dtype=dtype, device=device) def attention_basic(q, k, v, heads, mask=None, attn_precision=None, skip_reshape=False, skip_output_reshape=False): - attn_precision = get_attn_precision(attn_precision) + attn_precision = get_attn_precision(attn_precision, q.dtype) if skip_reshape: b, _, _, dim_head = q.shape @@ -159,7 +158,7 @@ def attention_basic(q, k, v, heads, mask=None, attn_precision=None, skip_reshape def attention_sub_quad(query, key, value, heads, mask=None, attn_precision=None, skip_reshape=False, skip_output_reshape=False): - attn_precision = get_attn_precision(attn_precision) + attn_precision = get_attn_precision(attn_precision, query.dtype) if skip_reshape: b, _, _, dim_head = query.shape @@ -229,7 +228,7 @@ def attention_sub_quad(query, key, value, heads, mask=None, attn_precision=None, return hidden_states def attention_split(q, k, v, heads, mask=None, attn_precision=None, skip_reshape=False, skip_output_reshape=False): - attn_precision = get_attn_precision(attn_precision) + attn_precision = get_attn_precision(attn_precision, q.dtype) if skip_reshape: b, _, _, dim_head = q.shape @@ -504,6 +503,63 @@ def attention_sage(q, k, v, heads, mask=None, attn_precision=None, skip_reshape= return out +try: + @torch.library.custom_op("flash_attention::flash_attn", mutates_args=()) + def flash_attn_wrapper(q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, + dropout_p: float = 0.0, causal: bool = False) -> torch.Tensor: + return flash_attn_func(q, k, v, dropout_p=dropout_p, causal=causal) + + + @flash_attn_wrapper.register_fake + def flash_attn_fake(q, k, v, dropout_p=0.0, causal=False): + # Output shape is the same as q + return q.new_empty(q.shape) +except AttributeError as error: + FLASH_ATTN_ERROR = error + + def flash_attn_wrapper(q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, + dropout_p: float = 0.0, causal: bool = False) -> torch.Tensor: + assert False, f"Could not define flash_attn_wrapper: {FLASH_ATTN_ERROR}" + + +def attention_flash(q, k, v, heads, mask=None, attn_precision=None, skip_reshape=False, skip_output_reshape=False): + if skip_reshape: + b, _, _, dim_head = q.shape + else: + b, _, dim_head = q.shape + dim_head //= heads + q, k, v = map( + lambda t: t.view(b, -1, heads, dim_head).transpose(1, 2), + (q, k, v), + ) + + if mask is not None: + # add a batch dimension if there isn't already one + if mask.ndim == 2: + mask = mask.unsqueeze(0) + # add a heads dimension if there isn't already one + if mask.ndim == 3: + mask = mask.unsqueeze(1) + + try: + assert mask is None + out = flash_attn_wrapper( + q.transpose(1, 2), + k.transpose(1, 2), + v.transpose(1, 2), + dropout_p=0.0, + causal=False, + ).transpose(1, 2) + except Exception as e: + logging.warning(f"Flash Attention failed, using default SDPA: {e}") + out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False) + if not skip_output_reshape: + out = ( + out.transpose(1, 2).reshape(b, -1, heads * dim_head) + ) + return out + + optimized_attention = attention_basic if model_management.sage_attention_enabled(): @@ -512,6 +568,9 @@ if model_management.sage_attention_enabled(): elif model_management.xformers_enabled(): logging.info("Using xformers attention") optimized_attention = attention_xformers +elif model_management.flash_attention_enabled(): + logging.info("Using Flash Attention") + optimized_attention = attention_flash elif model_management.pytorch_attention_enabled(): logging.info("Using pytorch attention") optimized_attention = attention_pytorch diff --git a/comfy/ldm/modules/diffusionmodules/mmdit.py b/comfy/ldm/modules/diffusionmodules/mmdit.py index e70f4431f..eaf3e73a4 100644 --- a/comfy/ldm/modules/diffusionmodules/mmdit.py +++ b/comfy/ldm/modules/diffusionmodules/mmdit.py @@ -321,7 +321,7 @@ class SelfAttention(nn.Module): class RMSNorm(torch.nn.Module): def __init__( - self, dim: int, elementwise_affine: bool = False, eps: float = 1e-6, device=None, dtype=None + self, dim: int, elementwise_affine: bool = False, eps: float = 1e-6, device=None, dtype=None, **kwargs ): """ Initialize the RMSNorm normalization layer. diff --git a/comfy/ldm/modules/diffusionmodules/model.py b/comfy/ldm/modules/diffusionmodules/model.py index 303147a98..8162742cf 100644 --- a/comfy/ldm/modules/diffusionmodules/model.py +++ b/comfy/ldm/modules/diffusionmodules/model.py @@ -297,7 +297,7 @@ def vae_attention(): if model_management.xformers_enabled_vae(): logging.info("Using xformers attention in VAE") return xformers_attention - elif model_management.pytorch_attention_enabled(): + elif model_management.pytorch_attention_enabled_vae(): logging.info("Using pytorch attention in VAE") return pytorch_attention else: @@ -702,9 +702,6 @@ class Decoder(nn.Module): padding=1) def forward(self, z, **kwargs): - #assert z.shape[1:] == self.z_shape[1:] - self.last_z_shape = z.shape - # timestep embedding temb = None diff --git a/comfy/ldm/wan/model.py b/comfy/ldm/wan/model.py new file mode 100644 index 000000000..9b5e5332c --- /dev/null +++ b/comfy/ldm/wan/model.py @@ -0,0 +1,485 @@ +# original version: https://github.com/Wan-Video/Wan2.1/blob/main/wan/modules/model.py +# Copyright 2024-2025 The Alibaba Wan Team Authors. All rights reserved. +import math + +import torch +import torch.nn as nn +from einops import repeat + +from comfy.ldm.modules.attention import optimized_attention +from comfy.ldm.flux.layers import EmbedND +from comfy.ldm.flux.math import apply_rope +from comfy.ldm.modules.diffusionmodules.mmdit import RMSNorm +import comfy.ldm.common_dit +import comfy.model_management + + +def sinusoidal_embedding_1d(dim, position): + # preprocess + assert dim % 2 == 0 + half = dim // 2 + position = position.type(torch.float32) + + # calculation + sinusoid = torch.outer( + position, torch.pow(10000, -torch.arange(half).to(position).div(half))) + x = torch.cat([torch.cos(sinusoid), torch.sin(sinusoid)], dim=1) + return x + + +class WanSelfAttention(nn.Module): + + def __init__(self, + dim, + num_heads, + window_size=(-1, -1), + qk_norm=True, + eps=1e-6, operation_settings={}): + assert dim % num_heads == 0 + super().__init__() + self.dim = dim + self.num_heads = num_heads + self.head_dim = dim // num_heads + self.window_size = window_size + self.qk_norm = qk_norm + self.eps = eps + + # layers + self.q = operation_settings.get("operations").Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + self.k = operation_settings.get("operations").Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + self.v = operation_settings.get("operations").Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + self.o = operation_settings.get("operations").Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + self.norm_q = RMSNorm(dim, eps=eps, elementwise_affine=True, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) if qk_norm else nn.Identity() + self.norm_k = RMSNorm(dim, eps=eps, elementwise_affine=True, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) if qk_norm else nn.Identity() + + def forward(self, x, freqs): + r""" + Args: + x(Tensor): Shape [B, L, num_heads, C / num_heads] + freqs(Tensor): Rope freqs, shape [1024, C / num_heads / 2] + """ + b, s, n, d = *x.shape[:2], self.num_heads, self.head_dim + + # query, key, value function + def qkv_fn(x): + q = self.norm_q(self.q(x)).view(b, s, n, d) + k = self.norm_k(self.k(x)).view(b, s, n, d) + v = self.v(x).view(b, s, n * d) + return q, k, v + + q, k, v = qkv_fn(x) + q, k = apply_rope(q, k, freqs) + + x = optimized_attention( + q.view(b, s, n * d), + k.view(b, s, n * d), + v, + heads=self.num_heads, + ) + + x = self.o(x) + return x + + +class WanT2VCrossAttention(WanSelfAttention): + + def forward(self, x, context): + r""" + Args: + x(Tensor): Shape [B, L1, C] + context(Tensor): Shape [B, L2, C] + """ + # compute query, key, value + q = self.norm_q(self.q(x)) + k = self.norm_k(self.k(context)) + v = self.v(context) + + # compute attention + x = optimized_attention(q, k, v, heads=self.num_heads) + + x = self.o(x) + return x + + +class WanI2VCrossAttention(WanSelfAttention): + + def __init__(self, + dim, + num_heads, + window_size=(-1, -1), + qk_norm=True, + eps=1e-6, operation_settings={}): + super().__init__(dim, num_heads, window_size, qk_norm, eps, operation_settings=operation_settings) + + self.k_img = operation_settings.get("operations").Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + self.v_img = operation_settings.get("operations").Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + # self.alpha = nn.Parameter(torch.zeros((1, ))) + self.norm_k_img = RMSNorm(dim, eps=eps, elementwise_affine=True, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) if qk_norm else nn.Identity() + + def forward(self, x, context): + r""" + Args: + x(Tensor): Shape [B, L1, C] + context(Tensor): Shape [B, L2, C] + """ + context_img = context[:, :257] + context = context[:, 257:] + + # compute query, key, value + q = self.norm_q(self.q(x)) + k = self.norm_k(self.k(context)) + v = self.v(context) + k_img = self.norm_k_img(self.k_img(context_img)) + v_img = self.v_img(context_img) + img_x = optimized_attention(q, k_img, v_img, heads=self.num_heads) + # compute attention + x = optimized_attention(q, k, v, heads=self.num_heads) + + # output + x = x + img_x + x = self.o(x) + return x + + +WAN_CROSSATTENTION_CLASSES = { + 't2v_cross_attn': WanT2VCrossAttention, + 'i2v_cross_attn': WanI2VCrossAttention, +} + + +class WanAttentionBlock(nn.Module): + + def __init__(self, + cross_attn_type, + dim, + ffn_dim, + num_heads, + window_size=(-1, -1), + qk_norm=True, + cross_attn_norm=False, + eps=1e-6, operation_settings={}): + super().__init__() + self.dim = dim + self.ffn_dim = ffn_dim + self.num_heads = num_heads + self.window_size = window_size + self.qk_norm = qk_norm + self.cross_attn_norm = cross_attn_norm + self.eps = eps + + # layers + self.norm1 = operation_settings.get("operations").LayerNorm(dim, eps, elementwise_affine=False, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + self.self_attn = WanSelfAttention(dim, num_heads, window_size, qk_norm, + eps, operation_settings=operation_settings) + self.norm3 = operation_settings.get("operations").LayerNorm( + dim, eps, + elementwise_affine=True, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) if cross_attn_norm else nn.Identity() + self.cross_attn = WAN_CROSSATTENTION_CLASSES[cross_attn_type](dim, + num_heads, + (-1, -1), + qk_norm, + eps, operation_settings=operation_settings) + self.norm2 = operation_settings.get("operations").LayerNorm(dim, eps, elementwise_affine=False, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + self.ffn = nn.Sequential( + operation_settings.get("operations").Linear(dim, ffn_dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")), nn.GELU(approximate='tanh'), + operation_settings.get("operations").Linear(ffn_dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype"))) + + # modulation + self.modulation = nn.Parameter(torch.empty(1, 6, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype"))) + + def forward( + self, + x, + e, + freqs, + context, + ): + r""" + Args: + x(Tensor): Shape [B, L, C] + e(Tensor): Shape [B, 6, C] + freqs(Tensor): Rope freqs, shape [1024, C / num_heads / 2] + """ + # assert e.dtype == torch.float32 + + e = (comfy.model_management.cast_to(self.modulation, dtype=x.dtype, device=x.device) + e).chunk(6, dim=1) + # assert e[0].dtype == torch.float32 + + # self-attention + y = self.self_attn( + self.norm1(x) * (1 + e[1]) + e[0], + freqs) + + x = x + y * e[2] + + # cross-attention & ffn + x = x + self.cross_attn(self.norm3(x), context) + y = self.ffn(self.norm2(x) * (1 + e[4]) + e[3]) + x = x + y * e[5] + return x + + +class Head(nn.Module): + + def __init__(self, dim, out_dim, patch_size, eps=1e-6, operation_settings={}): + super().__init__() + self.dim = dim + self.out_dim = out_dim + self.patch_size = patch_size + self.eps = eps + + # layers + out_dim = math.prod(patch_size) * out_dim + self.norm = operation_settings.get("operations").LayerNorm(dim, eps, elementwise_affine=False, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + self.head = operation_settings.get("operations").Linear(dim, out_dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")) + + # modulation + self.modulation = nn.Parameter(torch.empty(1, 2, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype"))) + + def forward(self, x, e): + r""" + Args: + x(Tensor): Shape [B, L1, C] + e(Tensor): Shape [B, C] + """ + # assert e.dtype == torch.float32 + e = (comfy.model_management.cast_to(self.modulation, dtype=x.dtype, device=x.device) + e.unsqueeze(1)).chunk(2, dim=1) + x = (self.head(self.norm(x) * (1 + e[1]) + e[0])) + return x + + +class MLPProj(torch.nn.Module): + + def __init__(self, in_dim, out_dim, operation_settings={}): + super().__init__() + + self.proj = torch.nn.Sequential( + operation_settings.get("operations").LayerNorm(in_dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")), operation_settings.get("operations").Linear(in_dim, in_dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")), + torch.nn.GELU(), operation_settings.get("operations").Linear(in_dim, out_dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")), + operation_settings.get("operations").LayerNorm(out_dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype"))) + + def forward(self, image_embeds): + clip_extra_context_tokens = self.proj(image_embeds) + return clip_extra_context_tokens + + +class WanModel(torch.nn.Module): + r""" + Wan diffusion backbone supporting both text-to-video and image-to-video. + """ + + def __init__(self, + model_type='t2v', + patch_size=(1, 2, 2), + text_len=512, + in_dim=16, + dim=2048, + ffn_dim=8192, + freq_dim=256, + text_dim=4096, + out_dim=16, + num_heads=16, + num_layers=32, + window_size=(-1, -1), + qk_norm=True, + cross_attn_norm=True, + eps=1e-6, + image_model=None, + device=None, + dtype=None, + operations=None, + ): + r""" + Initialize the diffusion model backbone. + + Args: + model_type (`str`, *optional*, defaults to 't2v'): + Model variant - 't2v' (text-to-video) or 'i2v' (image-to-video) + patch_size (`tuple`, *optional*, defaults to (1, 2, 2)): + 3D patch dimensions for video embedding (t_patch, h_patch, w_patch) + text_len (`int`, *optional*, defaults to 512): + Fixed length for text embeddings + in_dim (`int`, *optional*, defaults to 16): + Input video channels (C_in) + dim (`int`, *optional*, defaults to 2048): + Hidden dimension of the transformer + ffn_dim (`int`, *optional*, defaults to 8192): + Intermediate dimension in feed-forward network + freq_dim (`int`, *optional*, defaults to 256): + Dimension for sinusoidal time embeddings + text_dim (`int`, *optional*, defaults to 4096): + Input dimension for text embeddings + out_dim (`int`, *optional*, defaults to 16): + Output video channels (C_out) + num_heads (`int`, *optional*, defaults to 16): + Number of attention heads + num_layers (`int`, *optional*, defaults to 32): + Number of transformer blocks + window_size (`tuple`, *optional*, defaults to (-1, -1)): + Window size for local attention (-1 indicates global attention) + qk_norm (`bool`, *optional*, defaults to True): + Enable query/key normalization + cross_attn_norm (`bool`, *optional*, defaults to False): + Enable cross-attention normalization + eps (`float`, *optional*, defaults to 1e-6): + Epsilon value for normalization layers + """ + + super().__init__() + self.dtype = dtype + operation_settings = {"operations": operations, "device": device, "dtype": dtype} + + assert model_type in ['t2v', 'i2v'] + self.model_type = model_type + + self.patch_size = patch_size + self.text_len = text_len + self.in_dim = in_dim + self.dim = dim + self.ffn_dim = ffn_dim + self.freq_dim = freq_dim + self.text_dim = text_dim + self.out_dim = out_dim + self.num_heads = num_heads + self.num_layers = num_layers + self.window_size = window_size + self.qk_norm = qk_norm + self.cross_attn_norm = cross_attn_norm + self.eps = eps + + # embeddings + self.patch_embedding = operations.Conv3d( + in_dim, dim, kernel_size=patch_size, stride=patch_size, device=operation_settings.get("device"), dtype=torch.float32) + self.text_embedding = nn.Sequential( + operations.Linear(text_dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")), nn.GELU(approximate='tanh'), + operations.Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype"))) + + self.time_embedding = nn.Sequential( + operations.Linear(freq_dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype")), nn.SiLU(), operations.Linear(dim, dim, device=operation_settings.get("device"), dtype=operation_settings.get("dtype"))) + self.time_projection = nn.Sequential(nn.SiLU(), operations.Linear(dim, dim * 6, device=operation_settings.get("device"), dtype=operation_settings.get("dtype"))) + + # blocks + cross_attn_type = 't2v_cross_attn' if model_type == 't2v' else 'i2v_cross_attn' + self.blocks = nn.ModuleList([ + WanAttentionBlock(cross_attn_type, dim, ffn_dim, num_heads, + window_size, qk_norm, cross_attn_norm, eps, operation_settings=operation_settings) + for _ in range(num_layers) + ]) + + # head + self.head = Head(dim, out_dim, patch_size, eps, operation_settings=operation_settings) + + d = dim // num_heads + self.rope_embedder = EmbedND(dim=d, theta=10000.0, axes_dim=[d - 4 * (d // 6), 2 * (d // 6), 2 * (d // 6)]) + + if model_type == 'i2v': + self.img_emb = MLPProj(1280, dim, operation_settings=operation_settings) + else: + self.img_emb = None + + def forward_orig( + self, + x, + t, + context, + clip_fea=None, + freqs=None, + transformer_options={}, + ): + r""" + Forward pass through the diffusion model + + Args: + x (Tensor): + List of input video tensors with shape [B, C_in, F, H, W] + t (Tensor): + Diffusion timesteps tensor of shape [B] + context (List[Tensor]): + List of text embeddings each with shape [B, L, C] + seq_len (`int`): + Maximum sequence length for positional encoding + clip_fea (Tensor, *optional*): + CLIP image features for image-to-video mode + y (List[Tensor], *optional*): + Conditional video inputs for image-to-video mode, same shape as x + + Returns: + List[Tensor]: + List of denoised video tensors with original input shapes [C_out, F, H / 8, W / 8] + """ + # embeddings + x = self.patch_embedding(x.float()).to(x.dtype) + grid_sizes = x.shape[2:] + x = x.flatten(2).transpose(1, 2) + + # time embeddings + e = self.time_embedding( + sinusoidal_embedding_1d(self.freq_dim, t).to(dtype=x[0].dtype)) + e0 = self.time_projection(e).unflatten(1, (6, self.dim)) + + # context + context = self.text_embedding(context) + + if clip_fea is not None and self.img_emb is not None: + context_clip = self.img_emb(clip_fea) # bs x 257 x dim + context = torch.concat([context_clip, context], dim=1) + + patches_replace = transformer_options.get("patches_replace", {}) + blocks_replace = patches_replace.get("dit", {}) + for i, block in enumerate(self.blocks): + if ("double_block", i) in blocks_replace: + def block_wrap(args): + out = {} + out["img"] = block(args["img"], context=args["txt"], e=args["vec"], freqs=args["pe"]) + return out + out = blocks_replace[("double_block", i)]({"img": x, "txt": context, "vec": e0, "pe": freqs}, {"original_block": block_wrap}) + x = out["img"] + else: + x = block(x, e=e0, freqs=freqs, context=context) + + # head + x = self.head(x, e) + + # unpatchify + x = self.unpatchify(x, grid_sizes) + return x + + def forward(self, x, timestep, context, clip_fea=None, transformer_options={},**kwargs): + bs, c, t, h, w = x.shape + x = comfy.ldm.common_dit.pad_to_patch_size(x, self.patch_size) + patch_size = self.patch_size + t_len = ((t + (patch_size[0] // 2)) // patch_size[0]) + h_len = ((h + (patch_size[1] // 2)) // patch_size[1]) + w_len = ((w + (patch_size[2] // 2)) // patch_size[2]) + img_ids = torch.zeros((t_len, h_len, w_len, 3), device=x.device, dtype=x.dtype) + img_ids[:, :, :, 0] = img_ids[:, :, :, 0] + torch.linspace(0, t_len - 1, steps=t_len, device=x.device, dtype=x.dtype).reshape(-1, 1, 1) + img_ids[:, :, :, 1] = img_ids[:, :, :, 1] + torch.linspace(0, h_len - 1, steps=h_len, device=x.device, dtype=x.dtype).reshape(1, -1, 1) + img_ids[:, :, :, 2] = img_ids[:, :, :, 2] + torch.linspace(0, w_len - 1, steps=w_len, device=x.device, dtype=x.dtype).reshape(1, 1, -1) + img_ids = repeat(img_ids, "t h w c -> b (t h w) c", b=bs) + + freqs = self.rope_embedder(img_ids).movedim(1, 2) + return self.forward_orig(x, timestep, context, clip_fea=clip_fea, freqs=freqs, transformer_options=transformer_options)[:, :, :t, :h, :w] + + def unpatchify(self, x, grid_sizes): + r""" + Reconstruct video tensors from patch embeddings. + + Args: + x (List[Tensor]): + List of patchified features, each with shape [L, C_out * prod(patch_size)] + grid_sizes (Tensor): + Original spatial-temporal grid dimensions before patching, + shape [B, 3] (3 dimensions correspond to F_patches, H_patches, W_patches) + + Returns: + List[Tensor]: + Reconstructed video tensors with shape [L, C_out, F, H / 8, W / 8] + """ + + c = self.out_dim + u = x + b = u.shape[0] + u = u[:, :math.prod(grid_sizes)].view(b, *grid_sizes, *self.patch_size, c) + u = torch.einsum('bfhwpqrc->bcfphqwr', u) + u = u.reshape(b, c, *[i * j for i, j in zip(grid_sizes, self.patch_size)]) + return u diff --git a/comfy/ldm/wan/vae.py b/comfy/ldm/wan/vae.py new file mode 100644 index 000000000..a8ebc5ec6 --- /dev/null +++ b/comfy/ldm/wan/vae.py @@ -0,0 +1,567 @@ +# original version: https://github.com/Wan-Video/Wan2.1/blob/main/wan/modules/vae.py +# Copyright 2024-2025 The Alibaba Wan Team Authors. All rights reserved. + +import torch +import torch.nn as nn +import torch.nn.functional as F +from einops import rearrange +from comfy.ldm.modules.diffusionmodules.model import vae_attention + +import comfy.ops +ops = comfy.ops.disable_weight_init + +CACHE_T = 2 + + +class CausalConv3d(ops.Conv3d): + """ + Causal 3d convolusion. + """ + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self._padding = (self.padding[2], self.padding[2], self.padding[1], + self.padding[1], 2 * self.padding[0], 0) + self.padding = (0, 0, 0) + + def forward(self, x, cache_x=None): + padding = list(self._padding) + if cache_x is not None and self._padding[4] > 0: + cache_x = cache_x.to(x.device) + x = torch.cat([cache_x, x], dim=2) + padding[4] -= cache_x.shape[2] + x = F.pad(x, padding) + + return super().forward(x) + + +class RMS_norm(nn.Module): + + def __init__(self, dim, channel_first=True, images=True, bias=False): + super().__init__() + broadcastable_dims = (1, 1, 1) if not images else (1, 1) + shape = (dim, *broadcastable_dims) if channel_first else (dim,) + + self.channel_first = channel_first + self.scale = dim**0.5 + self.gamma = nn.Parameter(torch.ones(shape)) + self.bias = nn.Parameter(torch.zeros(shape)) if bias else None + + def forward(self, x): + return F.normalize( + x, dim=(1 if self.channel_first else -1)) * self.scale * self.gamma.to(x) + (self.bias.to(x) if self.bias is not None else 0) + + +class Upsample(nn.Upsample): + + def forward(self, x): + """ + Fix bfloat16 support for nearest neighbor interpolation. + """ + return super().forward(x.float()).type_as(x) + + +class Resample(nn.Module): + + def __init__(self, dim, mode): + assert mode in ('none', 'upsample2d', 'upsample3d', 'downsample2d', + 'downsample3d') + super().__init__() + self.dim = dim + self.mode = mode + + # layers + if mode == 'upsample2d': + self.resample = nn.Sequential( + Upsample(scale_factor=(2., 2.), mode='nearest-exact'), + ops.Conv2d(dim, dim // 2, 3, padding=1)) + elif mode == 'upsample3d': + self.resample = nn.Sequential( + Upsample(scale_factor=(2., 2.), mode='nearest-exact'), + ops.Conv2d(dim, dim // 2, 3, padding=1)) + self.time_conv = CausalConv3d( + dim, dim * 2, (3, 1, 1), padding=(1, 0, 0)) + + elif mode == 'downsample2d': + self.resample = nn.Sequential( + nn.ZeroPad2d((0, 1, 0, 1)), + ops.Conv2d(dim, dim, 3, stride=(2, 2))) + elif mode == 'downsample3d': + self.resample = nn.Sequential( + nn.ZeroPad2d((0, 1, 0, 1)), + ops.Conv2d(dim, dim, 3, stride=(2, 2))) + self.time_conv = CausalConv3d( + dim, dim, (3, 1, 1), stride=(2, 1, 1), padding=(0, 0, 0)) + + else: + self.resample = nn.Identity() + + def forward(self, x, feat_cache=None, feat_idx=[0]): + b, c, t, h, w = x.size() + if self.mode == 'upsample3d': + if feat_cache is not None: + idx = feat_idx[0] + if feat_cache[idx] is None: + feat_cache[idx] = 'Rep' + feat_idx[0] += 1 + else: + + cache_x = x[:, :, -CACHE_T:, :, :].clone() + if cache_x.shape[2] < 2 and feat_cache[ + idx] is not None and feat_cache[idx] != 'Rep': + # cache last frame of last two chunk + cache_x = torch.cat([ + feat_cache[idx][:, :, -1, :, :].unsqueeze(2).to( + cache_x.device), cache_x + ], + dim=2) + if cache_x.shape[2] < 2 and feat_cache[ + idx] is not None and feat_cache[idx] == 'Rep': + cache_x = torch.cat([ + torch.zeros_like(cache_x).to(cache_x.device), + cache_x + ], + dim=2) + if feat_cache[idx] == 'Rep': + x = self.time_conv(x) + else: + x = self.time_conv(x, feat_cache[idx]) + feat_cache[idx] = cache_x + feat_idx[0] += 1 + + x = x.reshape(b, 2, c, t, h, w) + x = torch.stack((x[:, 0, :, :, :, :], x[:, 1, :, :, :, :]), + 3) + x = x.reshape(b, c, t * 2, h, w) + t = x.shape[2] + x = rearrange(x, 'b c t h w -> (b t) c h w') + x = self.resample(x) + x = rearrange(x, '(b t) c h w -> b c t h w', t=t) + + if self.mode == 'downsample3d': + if feat_cache is not None: + idx = feat_idx[0] + if feat_cache[idx] is None: + feat_cache[idx] = x.clone() + feat_idx[0] += 1 + else: + + cache_x = x[:, :, -1:, :, :].clone() + # if cache_x.shape[2] < 2 and feat_cache[idx] is not None and feat_cache[idx]!='Rep': + # # cache last frame of last two chunk + # cache_x = torch.cat([feat_cache[idx][:, :, -1, :, :].unsqueeze(2).to(cache_x.device), cache_x], dim=2) + + x = self.time_conv( + torch.cat([feat_cache[idx][:, :, -1:, :, :], x], 2)) + feat_cache[idx] = cache_x + feat_idx[0] += 1 + return x + + def init_weight(self, conv): + conv_weight = conv.weight + nn.init.zeros_(conv_weight) + c1, c2, t, h, w = conv_weight.size() + one_matrix = torch.eye(c1, c2) + init_matrix = one_matrix + nn.init.zeros_(conv_weight) + #conv_weight.data[:,:,-1,1,1] = init_matrix * 0.5 + conv_weight.data[:, :, 1, 0, 0] = init_matrix #* 0.5 + conv.weight.data.copy_(conv_weight) + nn.init.zeros_(conv.bias.data) + + def init_weight2(self, conv): + conv_weight = conv.weight.data + nn.init.zeros_(conv_weight) + c1, c2, t, h, w = conv_weight.size() + init_matrix = torch.eye(c1 // 2, c2) + #init_matrix = repeat(init_matrix, 'o ... -> (o 2) ...').permute(1,0,2).contiguous().reshape(c1,c2) + conv_weight[:c1 // 2, :, -1, 0, 0] = init_matrix + conv_weight[c1 // 2:, :, -1, 0, 0] = init_matrix + conv.weight.data.copy_(conv_weight) + nn.init.zeros_(conv.bias.data) + + +class ResidualBlock(nn.Module): + + def __init__(self, in_dim, out_dim, dropout=0.0): + super().__init__() + self.in_dim = in_dim + self.out_dim = out_dim + + # layers + self.residual = nn.Sequential( + RMS_norm(in_dim, images=False), nn.SiLU(), + CausalConv3d(in_dim, out_dim, 3, padding=1), + RMS_norm(out_dim, images=False), nn.SiLU(), nn.Dropout(dropout), + CausalConv3d(out_dim, out_dim, 3, padding=1)) + self.shortcut = CausalConv3d(in_dim, out_dim, 1) \ + if in_dim != out_dim else nn.Identity() + + def forward(self, x, feat_cache=None, feat_idx=[0]): + h = self.shortcut(x) + for layer in self.residual: + if isinstance(layer, CausalConv3d) and feat_cache is not None: + idx = feat_idx[0] + cache_x = x[:, :, -CACHE_T:, :, :].clone() + if cache_x.shape[2] < 2 and feat_cache[idx] is not None: + # cache last frame of last two chunk + cache_x = torch.cat([ + feat_cache[idx][:, :, -1, :, :].unsqueeze(2).to( + cache_x.device), cache_x + ], + dim=2) + x = layer(x, feat_cache[idx]) + feat_cache[idx] = cache_x + feat_idx[0] += 1 + else: + x = layer(x) + return x + h + + +class AttentionBlock(nn.Module): + """ + Causal self-attention with a single head. + """ + + def __init__(self, dim): + super().__init__() + self.dim = dim + + # layers + self.norm = RMS_norm(dim) + self.to_qkv = ops.Conv2d(dim, dim * 3, 1) + self.proj = ops.Conv2d(dim, dim, 1) + self.optimized_attention = vae_attention() + + def forward(self, x): + identity = x + b, c, t, h, w = x.size() + x = rearrange(x, 'b c t h w -> (b t) c h w') + x = self.norm(x) + # compute query, key, value + + q, k, v = self.to_qkv(x).chunk(3, dim=1) + x = self.optimized_attention(q, k, v) + + # output + x = self.proj(x) + x = rearrange(x, '(b t) c h w-> b c t h w', t=t) + return x + identity + + +class Encoder3d(nn.Module): + + def __init__(self, + dim=128, + z_dim=4, + dim_mult=[1, 2, 4, 4], + num_res_blocks=2, + attn_scales=[], + temperal_downsample=[True, True, False], + dropout=0.0): + super().__init__() + self.dim = dim + self.z_dim = z_dim + self.dim_mult = dim_mult + self.num_res_blocks = num_res_blocks + self.attn_scales = attn_scales + self.temperal_downsample = temperal_downsample + + # dimensions + dims = [dim * u for u in [1] + dim_mult] + scale = 1.0 + + # init block + self.conv1 = CausalConv3d(3, dims[0], 3, padding=1) + + # downsample blocks + downsamples = [] + for i, (in_dim, out_dim) in enumerate(zip(dims[:-1], dims[1:])): + # residual (+attention) blocks + for _ in range(num_res_blocks): + downsamples.append(ResidualBlock(in_dim, out_dim, dropout)) + if scale in attn_scales: + downsamples.append(AttentionBlock(out_dim)) + in_dim = out_dim + + # downsample block + if i != len(dim_mult) - 1: + mode = 'downsample3d' if temperal_downsample[ + i] else 'downsample2d' + downsamples.append(Resample(out_dim, mode=mode)) + scale /= 2.0 + self.downsamples = nn.Sequential(*downsamples) + + # middle blocks + self.middle = nn.Sequential( + ResidualBlock(out_dim, out_dim, dropout), AttentionBlock(out_dim), + ResidualBlock(out_dim, out_dim, dropout)) + + # output blocks + self.head = nn.Sequential( + RMS_norm(out_dim, images=False), nn.SiLU(), + CausalConv3d(out_dim, z_dim, 3, padding=1)) + + def forward(self, x, feat_cache=None, feat_idx=[0]): + if feat_cache is not None: + idx = feat_idx[0] + cache_x = x[:, :, -CACHE_T:, :, :].clone() + if cache_x.shape[2] < 2 and feat_cache[idx] is not None: + # cache last frame of last two chunk + cache_x = torch.cat([ + feat_cache[idx][:, :, -1, :, :].unsqueeze(2).to( + cache_x.device), cache_x + ], + dim=2) + x = self.conv1(x, feat_cache[idx]) + feat_cache[idx] = cache_x + feat_idx[0] += 1 + else: + x = self.conv1(x) + + ## downsamples + for layer in self.downsamples: + if feat_cache is not None: + x = layer(x, feat_cache, feat_idx) + else: + x = layer(x) + + ## middle + for layer in self.middle: + if isinstance(layer, ResidualBlock) and feat_cache is not None: + x = layer(x, feat_cache, feat_idx) + else: + x = layer(x) + + ## head + for layer in self.head: + if isinstance(layer, CausalConv3d) and feat_cache is not None: + idx = feat_idx[0] + cache_x = x[:, :, -CACHE_T:, :, :].clone() + if cache_x.shape[2] < 2 and feat_cache[idx] is not None: + # cache last frame of last two chunk + cache_x = torch.cat([ + feat_cache[idx][:, :, -1, :, :].unsqueeze(2).to( + cache_x.device), cache_x + ], + dim=2) + x = layer(x, feat_cache[idx]) + feat_cache[idx] = cache_x + feat_idx[0] += 1 + else: + x = layer(x) + return x + + +class Decoder3d(nn.Module): + + def __init__(self, + dim=128, + z_dim=4, + dim_mult=[1, 2, 4, 4], + num_res_blocks=2, + attn_scales=[], + temperal_upsample=[False, True, True], + dropout=0.0): + super().__init__() + self.dim = dim + self.z_dim = z_dim + self.dim_mult = dim_mult + self.num_res_blocks = num_res_blocks + self.attn_scales = attn_scales + self.temperal_upsample = temperal_upsample + + # dimensions + dims = [dim * u for u in [dim_mult[-1]] + dim_mult[::-1]] + scale = 1.0 / 2**(len(dim_mult) - 2) + + # init block + self.conv1 = CausalConv3d(z_dim, dims[0], 3, padding=1) + + # middle blocks + self.middle = nn.Sequential( + ResidualBlock(dims[0], dims[0], dropout), AttentionBlock(dims[0]), + ResidualBlock(dims[0], dims[0], dropout)) + + # upsample blocks + upsamples = [] + for i, (in_dim, out_dim) in enumerate(zip(dims[:-1], dims[1:])): + # residual (+attention) blocks + if i == 1 or i == 2 or i == 3: + in_dim = in_dim // 2 + for _ in range(num_res_blocks + 1): + upsamples.append(ResidualBlock(in_dim, out_dim, dropout)) + if scale in attn_scales: + upsamples.append(AttentionBlock(out_dim)) + in_dim = out_dim + + # upsample block + if i != len(dim_mult) - 1: + mode = 'upsample3d' if temperal_upsample[i] else 'upsample2d' + upsamples.append(Resample(out_dim, mode=mode)) + scale *= 2.0 + self.upsamples = nn.Sequential(*upsamples) + + # output blocks + self.head = nn.Sequential( + RMS_norm(out_dim, images=False), nn.SiLU(), + CausalConv3d(out_dim, 3, 3, padding=1)) + + def forward(self, x, feat_cache=None, feat_idx=[0]): + ## conv1 + if feat_cache is not None: + idx = feat_idx[0] + cache_x = x[:, :, -CACHE_T:, :, :].clone() + if cache_x.shape[2] < 2 and feat_cache[idx] is not None: + # cache last frame of last two chunk + cache_x = torch.cat([ + feat_cache[idx][:, :, -1, :, :].unsqueeze(2).to( + cache_x.device), cache_x + ], + dim=2) + x = self.conv1(x, feat_cache[idx]) + feat_cache[idx] = cache_x + feat_idx[0] += 1 + else: + x = self.conv1(x) + + ## middle + for layer in self.middle: + if isinstance(layer, ResidualBlock) and feat_cache is not None: + x = layer(x, feat_cache, feat_idx) + else: + x = layer(x) + + ## upsamples + for layer in self.upsamples: + if feat_cache is not None: + x = layer(x, feat_cache, feat_idx) + else: + x = layer(x) + + ## head + for layer in self.head: + if isinstance(layer, CausalConv3d) and feat_cache is not None: + idx = feat_idx[0] + cache_x = x[:, :, -CACHE_T:, :, :].clone() + if cache_x.shape[2] < 2 and feat_cache[idx] is not None: + # cache last frame of last two chunk + cache_x = torch.cat([ + feat_cache[idx][:, :, -1, :, :].unsqueeze(2).to( + cache_x.device), cache_x + ], + dim=2) + x = layer(x, feat_cache[idx]) + feat_cache[idx] = cache_x + feat_idx[0] += 1 + else: + x = layer(x) + return x + + +def count_conv3d(model): + count = 0 + for m in model.modules(): + if isinstance(m, CausalConv3d): + count += 1 + return count + + +class WanVAE(nn.Module): + + def __init__(self, + dim=128, + z_dim=4, + dim_mult=[1, 2, 4, 4], + num_res_blocks=2, + attn_scales=[], + temperal_downsample=[True, True, False], + dropout=0.0): + super().__init__() + self.dim = dim + self.z_dim = z_dim + self.dim_mult = dim_mult + self.num_res_blocks = num_res_blocks + self.attn_scales = attn_scales + self.temperal_downsample = temperal_downsample + self.temperal_upsample = temperal_downsample[::-1] + + # modules + self.encoder = Encoder3d(dim, z_dim * 2, dim_mult, num_res_blocks, + attn_scales, self.temperal_downsample, dropout) + self.conv1 = CausalConv3d(z_dim * 2, z_dim * 2, 1) + self.conv2 = CausalConv3d(z_dim, z_dim, 1) + self.decoder = Decoder3d(dim, z_dim, dim_mult, num_res_blocks, + attn_scales, self.temperal_upsample, dropout) + + def forward(self, x): + mu, log_var = self.encode(x) + z = self.reparameterize(mu, log_var) + x_recon = self.decode(z) + return x_recon, mu, log_var + + def encode(self, x): + self.clear_cache() + ## cache + t = x.shape[2] + iter_ = 1 + (t - 1) // 4 + ## 对encode输入的x,按时间拆分为1、4、4、4.... + for i in range(iter_): + self._enc_conv_idx = [0] + if i == 0: + out = self.encoder( + x[:, :, :1, :, :], + feat_cache=self._enc_feat_map, + feat_idx=self._enc_conv_idx) + else: + out_ = self.encoder( + x[:, :, 1 + 4 * (i - 1):1 + 4 * i, :, :], + feat_cache=self._enc_feat_map, + feat_idx=self._enc_conv_idx) + out = torch.cat([out, out_], 2) + mu, log_var = self.conv1(out).chunk(2, dim=1) + self.clear_cache() + return mu + + def decode(self, z): + self.clear_cache() + # z: [b,c,t,h,w] + + iter_ = z.shape[2] + x = self.conv2(z) + for i in range(iter_): + self._conv_idx = [0] + if i == 0: + out = self.decoder( + x[:, :, i:i + 1, :, :], + feat_cache=self._feat_map, + feat_idx=self._conv_idx) + else: + out_ = self.decoder( + x[:, :, i:i + 1, :, :], + feat_cache=self._feat_map, + feat_idx=self._conv_idx) + out = torch.cat([out, out_], 2) + self.clear_cache() + return out + + def reparameterize(self, mu, log_var): + std = torch.exp(0.5 * log_var) + eps = torch.randn_like(std) + return eps * std + mu + + def sample(self, imgs, deterministic=False): + mu, log_var = self.encode(imgs) + if deterministic: + return mu + std = torch.exp(0.5 * log_var.clamp(-30.0, 20.0)) + return mu + std * torch.randn_like(std) + + def clear_cache(self): + self._conv_num = count_conv3d(self.decoder) + self._conv_idx = [0] + self._feat_map = [None] * self._conv_num + #cache encode + self._enc_conv_num = count_conv3d(self.encoder) + self._enc_conv_idx = [0] + self._enc_feat_map = [None] * self._enc_conv_num diff --git a/comfy/lora.py b/comfy/lora.py index ec3da6f4c..bc9f3022a 100644 --- a/comfy/lora.py +++ b/comfy/lora.py @@ -307,7 +307,6 @@ def model_lora_keys_unet(model, key_map={}): if k.endswith(".weight"): key_lora = k[len("diffusion_model."):-len(".weight")].replace(".", "_") key_map["lora_unet_{}".format(key_lora)] = k - key_map["lora_prior_unet_{}".format(key_lora)] = k #cascade lora: TODO put lora key prefix in the model config key_map["{}".format(k[:-len(".weight")])] = k #generic lora format without any weird key names else: key_map["{}".format(k)] = k #generic lora format for not .weight without any weird key names @@ -327,6 +326,13 @@ def model_lora_keys_unet(model, key_map={}): diffusers_lora_key = diffusers_lora_key[:-2] key_map[diffusers_lora_key] = unet_key + if isinstance(model, comfy.model_base.StableCascade_C): + for k in sdk: + if k.startswith("diffusion_model."): + if k.endswith(".weight"): + key_lora = k[len("diffusion_model."):-len(".weight")].replace(".", "_") + key_map["lora_prior_unet_{}".format(key_lora)] = k + if isinstance(model, comfy.model_base.SD3): #Diffusers lora SD3 diffusers_keys = comfy.utils.mmdit_to_diffusers(model.model_config.unet_config, output_prefix="diffusion_model.") for k in diffusers_keys: diff --git a/comfy/model_base.py b/comfy/model_base.py index 7625b7126..976702b60 100644 --- a/comfy/model_base.py +++ b/comfy/model_base.py @@ -34,6 +34,8 @@ import comfy.ldm.flux.model import comfy.ldm.lightricks.model import comfy.ldm.hunyuan_video.model import comfy.ldm.cosmos.model +import comfy.ldm.lumina.model +import comfy.ldm.wan.model import comfy.model_management import comfy.patcher_extension @@ -106,7 +108,7 @@ class BaseModel(torch.nn.Module): if not unet_config.get("disable_unet_model_creation", False): if model_config.custom_operations is None: - fp8 = model_config.optimizations.get("fp8", model_config.scaled_fp8 is not None) + fp8 = model_config.optimizations.get("fp8", False) operations = comfy.ops.pick_operations(unet_config.get("dtype", None), self.manual_cast_dtype, fp8_optimizations=fp8, scaled_fp8=model_config.scaled_fp8) else: operations = model_config.custom_operations @@ -148,7 +150,9 @@ class BaseModel(torch.nn.Module): xc = xc.to(dtype) t = self.model_sampling.timestep(t).float() - context = context.to(dtype) + if context is not None: + context = context.to(dtype) + extra_conds = {} for o in kwargs: extra = kwargs[o] @@ -157,15 +161,16 @@ class BaseModel(torch.nn.Module): extra = extra.to(dtype) extra_conds[o] = extra + t = self.process_timestep(t, x=x, **extra_conds) model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float() return self.model_sampling.calculate_denoised(sigma, model_output, x) + def process_timestep(self, timestep, **kwargs): + return timestep + def get_dtype(self): return self.diffusion_model.dtype - def is_adm(self): - return self.adm_channels > 0 - def encode_adm(self, **kwargs): return None @@ -184,6 +189,11 @@ class BaseModel(torch.nn.Module): if concat_latent_image.shape[1:] != noise.shape[1:]: concat_latent_image = utils.common_upscale(concat_latent_image, noise.shape[-1], noise.shape[-2], "bilinear", "center") + if noise.ndim == 5: + if concat_latent_image.shape[-3] < noise.shape[-3]: + concat_latent_image = torch.nn.functional.pad(concat_latent_image, (0, 0, 0, 0, 0, noise.shape[-3] - concat_latent_image.shape[-3]), "constant", 0) + else: + concat_latent_image = concat_latent_image[:, :, :noise.shape[-3]] concat_latent_image = utils.resize_to_batch_size(concat_latent_image, noise.shape[0]) @@ -212,6 +222,11 @@ class BaseModel(torch.nn.Module): cond_concat.append(self.blank_inpaint_image_like(noise)) elif ck == "mask_inverted": cond_concat.append(torch.zeros_like(noise)[:, :1]) + if ck == "concat_image": + if concat_latent_image is not None: + cond_concat.append(concat_latent_image.to(device)) + else: + cond_concat.append(torch.zeros_like(noise)) data = torch.cat(cond_concat, dim=1) return data return None @@ -549,6 +564,10 @@ class SD_X4Upscaler(BaseModel): out['c_concat'] = comfy.conds.CONDNoiseShape(image) out['y'] = comfy.conds.CONDRegular(noise_level) + + cross_attn = kwargs.get("cross_attn", None) + if cross_attn is not None: + out['c_crossattn'] = comfy.conds.CONDCrossAttn(cross_attn) return out class IP2P: @@ -806,7 +825,10 @@ class Flux(BaseModel): (h_tok, w_tok) = (math.ceil(shape[2] / self.diffusion_model.patch_size), math.ceil(shape[3] / self.diffusion_model.patch_size)) attention_mask = utils.upscale_dit_mask(attention_mask, mask_ref_size, (h_tok, w_tok)) out['attention_mask'] = comfy.conds.CONDRegular(attention_mask) - out['guidance'] = comfy.conds.CONDRegular(torch.FloatTensor([kwargs.get("guidance", 3.5)])) + + guidance = kwargs.get("guidance", 3.5) + if guidance is not None: + out['guidance'] = comfy.conds.CONDRegular(torch.FloatTensor([guidance])) return out class GenmoMochi(BaseModel): @@ -837,17 +859,26 @@ class LTXV(BaseModel): if cross_attn is not None: out['c_crossattn'] = comfy.conds.CONDRegular(cross_attn) - guiding_latent = kwargs.get("guiding_latent", None) - if guiding_latent is not None: - out['guiding_latent'] = comfy.conds.CONDRegular(guiding_latent) - - guiding_latent_noise_scale = kwargs.get("guiding_latent_noise_scale", None) - if guiding_latent_noise_scale is not None: - out["guiding_latent_noise_scale"] = comfy.conds.CONDConstant(guiding_latent_noise_scale) - out['frame_rate'] = comfy.conds.CONDConstant(kwargs.get("frame_rate", 25)) + + denoise_mask = kwargs.get("concat_mask", kwargs.get("denoise_mask", None)) + if denoise_mask is not None: + out["denoise_mask"] = comfy.conds.CONDRegular(denoise_mask) + + keyframe_idxs = kwargs.get("keyframe_idxs", None) + if keyframe_idxs is not None: + out['keyframe_idxs'] = comfy.conds.CONDRegular(keyframe_idxs) + return out + def process_timestep(self, timestep, x, denoise_mask=None, **kwargs): + if denoise_mask is None: + return timestep + return self.diffusion_model.patchifier.patchify(((denoise_mask) * timestep.view([timestep.shape[0]] + [1] * (denoise_mask.ndim - 1)))[:, :1])[0] + + def scale_latent_inpaint(self, sigma, noise, latent_image, **kwargs): + return latent_image + class HunyuanVideo(BaseModel): def __init__(self, model_config, model_type=ModelType.FLOW, device=None): super().__init__(model_config, model_type, device=device, unet_model=comfy.ldm.hunyuan_video.model.HunyuanVideo) @@ -863,9 +894,36 @@ class HunyuanVideo(BaseModel): cross_attn = kwargs.get("cross_attn", None) if cross_attn is not None: out['c_crossattn'] = comfy.conds.CONDRegular(cross_attn) - out['guidance'] = comfy.conds.CONDRegular(torch.FloatTensor([kwargs.get("guidance", 6.0)])) + + guidance = kwargs.get("guidance", 6.0) + if guidance is not None: + out['guidance'] = comfy.conds.CONDRegular(torch.FloatTensor([guidance])) + + guiding_frame_index = kwargs.get("guiding_frame_index", None) + if guiding_frame_index is not None: + out['guiding_frame_index'] = comfy.conds.CONDRegular(torch.FloatTensor([guiding_frame_index])) + return out + def scale_latent_inpaint(self, latent_image, **kwargs): + return latent_image + +class HunyuanVideoI2V(HunyuanVideo): + def __init__(self, model_config, model_type=ModelType.FLOW, device=None): + super().__init__(model_config, model_type, device=device) + self.concat_keys = ("concat_image", "mask_inverted") + + def scale_latent_inpaint(self, latent_image, **kwargs): + return super().scale_latent_inpaint(latent_image=latent_image, **kwargs) + +class HunyuanVideoSkyreelsI2V(HunyuanVideo): + def __init__(self, model_config, model_type=ModelType.FLOW, device=None): + super().__init__(model_config, model_type, device=device) + self.concat_keys = ("concat_image",) + + def scale_latent_inpaint(self, latent_image, **kwargs): + return super().scale_latent_inpaint(latent_image=latent_image, **kwargs) + class CosmosVideo(BaseModel): def __init__(self, model_config, model_type=ModelType.EDM, image_to_video=False, device=None): super().__init__(model_config, model_type, device=device, unet_model=comfy.ldm.cosmos.model.GeneralDIT) @@ -892,3 +950,66 @@ class CosmosVideo(BaseModel): latent_image = latent_image + noise latent_image = self.model_sampling.calculate_input(torch.tensor([sigma_noise_augmentation], device=latent_image.device, dtype=latent_image.dtype), latent_image) return latent_image * ((sigma ** 2 + self.model_sampling.sigma_data ** 2) ** 0.5) + +class Lumina2(BaseModel): + def __init__(self, model_config, model_type=ModelType.FLOW, device=None): + super().__init__(model_config, model_type, device=device, unet_model=comfy.ldm.lumina.model.NextDiT) + + def extra_conds(self, **kwargs): + out = super().extra_conds(**kwargs) + attention_mask = kwargs.get("attention_mask", None) + if attention_mask is not None: + if torch.numel(attention_mask) != attention_mask.sum(): + out['attention_mask'] = comfy.conds.CONDRegular(attention_mask) + out['num_tokens'] = comfy.conds.CONDConstant(max(1, torch.sum(attention_mask).item())) + cross_attn = kwargs.get("cross_attn", None) + if cross_attn is not None: + out['c_crossattn'] = comfy.conds.CONDRegular(cross_attn) + return out + +class WAN21(BaseModel): + def __init__(self, model_config, model_type=ModelType.FLOW, image_to_video=False, device=None): + super().__init__(model_config, model_type, device=device, unet_model=comfy.ldm.wan.model.WanModel) + self.image_to_video = image_to_video + + def concat_cond(self, **kwargs): + noise = kwargs.get("noise", None) + if self.diffusion_model.patch_embedding.weight.shape[1] == noise.shape[1]: + return None + + image = kwargs.get("concat_latent_image", None) + device = kwargs["device"] + + if image is None: + image = torch.zeros_like(noise) + + image = utils.common_upscale(image.to(device), noise.shape[-1], noise.shape[-2], "bilinear", "center") + image = self.process_latent_in(image) + image = utils.resize_to_batch_size(image, noise.shape[0]) + + if not self.image_to_video: + return image + + mask = kwargs.get("concat_mask", kwargs.get("denoise_mask", None)) + if mask is None: + mask = torch.zeros_like(noise)[:, :4] + else: + mask = 1.0 - torch.mean(mask, dim=1, keepdim=True) + mask = utils.common_upscale(mask.to(device), noise.shape[-1], noise.shape[-2], "bilinear", "center") + if mask.shape[-3] < noise.shape[-3]: + mask = torch.nn.functional.pad(mask, (0, 0, 0, 0, 0, noise.shape[-3] - mask.shape[-3]), mode='constant', value=0) + mask = mask.repeat(1, 4, 1, 1, 1) + mask = utils.resize_to_batch_size(mask, noise.shape[0]) + + return torch.cat((mask, image), dim=1) + + def extra_conds(self, **kwargs): + out = super().extra_conds(**kwargs) + cross_attn = kwargs.get("cross_attn", None) + if cross_attn is not None: + out['c_crossattn'] = comfy.conds.CONDRegular(cross_attn) + + clip_vision_output = kwargs.get("clip_vision_output", None) + if clip_vision_output is not None: + out['clip_fea'] = comfy.conds.CONDRegular(clip_vision_output.penultimate_hidden_states) + return out diff --git a/comfy/model_detection.py b/comfy/model_detection.py index ba96ebe85..403da5855 100644 --- a/comfy/model_detection.py +++ b/comfy/model_detection.py @@ -1,3 +1,4 @@ +import json import comfy.supported_models import comfy.supported_models_base import comfy.utils @@ -33,7 +34,7 @@ def calculate_transformer_depth(prefix, state_dict_keys, state_dict): return last_transformer_depth, context_dim, use_linear_in_transformer, time_stack, time_stack_cross return None -def detect_unet_config(state_dict, key_prefix): +def detect_unet_config(state_dict, key_prefix, metadata=None): state_dict_keys = list(state_dict.keys()) if '{}joint_blocks.0.context_block.attn.qkv.weight'.format(key_prefix) in state_dict_keys: #mmdit model @@ -136,7 +137,7 @@ def detect_unet_config(state_dict, key_prefix): if '{}txt_in.individual_token_refiner.blocks.0.norm1.weight'.format(key_prefix) in state_dict_keys: #Hunyuan Video dit_config = {} dit_config["image_model"] = "hunyuan_video" - dit_config["in_channels"] = 16 + dit_config["in_channels"] = state_dict['{}img_in.proj.weight'.format(key_prefix)].shape[1] #SkyReels img2video has 32 input channels dit_config["patch_size"] = [1, 2, 2] dit_config["out_channels"] = 16 dit_config["vec_in_dim"] = 768 @@ -210,6 +211,8 @@ def detect_unet_config(state_dict, key_prefix): if '{}adaln_single.emb.timestep_embedder.linear_1.bias'.format(key_prefix) in state_dict_keys: #Lightricks ltxv dit_config = {} dit_config["image_model"] = "ltxv" + if metadata is not None and "config" in metadata: + dit_config.update(json.loads(metadata["config"]).get("transformer", {})) return dit_config if '{}t_block.1.weight'.format(key_prefix) in state_dict_keys: # PixArt @@ -239,7 +242,7 @@ def detect_unet_config(state_dict, key_prefix): dit_config["micro_condition"] = False return dit_config - if '{}blocks.block0.blocks.0.block.attn.to_q.0.weight'.format(key_prefix) in state_dict_keys: + if '{}blocks.block0.blocks.0.block.attn.to_q.0.weight'.format(key_prefix) in state_dict_keys: # Cosmos dit_config = {} dit_config["image_model"] = "cosmos" dit_config["max_img_h"] = 240 @@ -284,6 +287,42 @@ def detect_unet_config(state_dict, key_prefix): dit_config["extra_per_block_abs_pos_emb_type"] = "learnable" return dit_config + if '{}cap_embedder.1.weight'.format(key_prefix) in state_dict_keys: # Lumina 2 + dit_config = {} + dit_config["image_model"] = "lumina2" + dit_config["patch_size"] = 2 + dit_config["in_channels"] = 16 + dit_config["dim"] = 2304 + dit_config["cap_feat_dim"] = 2304 + dit_config["n_layers"] = 26 + dit_config["n_heads"] = 24 + dit_config["n_kv_heads"] = 8 + dit_config["qk_norm"] = True + dit_config["axes_dims"] = [32, 32, 32] + dit_config["axes_lens"] = [300, 512, 512] + return dit_config + + if '{}head.modulation'.format(key_prefix) in state_dict_keys: # Wan 2.1 + dit_config = {} + dit_config["image_model"] = "wan2.1" + dim = state_dict['{}head.modulation'.format(key_prefix)].shape[-1] + dit_config["dim"] = dim + dit_config["num_heads"] = dim // 128 + dit_config["ffn_dim"] = state_dict['{}blocks.0.ffn.0.weight'.format(key_prefix)].shape[0] + dit_config["num_layers"] = count_blocks(state_dict_keys, '{}blocks.'.format(key_prefix) + '{}.') + dit_config["patch_size"] = (1, 2, 2) + dit_config["freq_dim"] = 256 + dit_config["window_size"] = (-1, -1) + dit_config["qk_norm"] = True + dit_config["cross_attn_norm"] = True + dit_config["eps"] = 1e-6 + dit_config["in_dim"] = state_dict['{}patch_embedding.weight'.format(key_prefix)].shape[1] + if '{}img_emb.proj.0.bias'.format(key_prefix) in state_dict_keys: + dit_config["model_type"] = "i2v" + else: + dit_config["model_type"] = "t2v" + return dit_config + if '{}input_blocks.0.0.weight'.format(key_prefix) not in state_dict_keys: return None @@ -418,8 +457,8 @@ def model_config_from_unet_config(unet_config, state_dict=None): logging.error("no match {}".format(unet_config)) return None -def model_config_from_unet(state_dict, unet_key_prefix, use_base_if_no_match=False): - unet_config = detect_unet_config(state_dict, unet_key_prefix) +def model_config_from_unet(state_dict, unet_key_prefix, use_base_if_no_match=False, metadata=None): + unet_config = detect_unet_config(state_dict, unet_key_prefix, metadata=metadata) if unet_config is None: return None model_config = model_config_from_unet_config(unet_config, state_dict) @@ -432,6 +471,10 @@ def model_config_from_unet(state_dict, unet_key_prefix, use_base_if_no_match=Fal model_config.scaled_fp8 = scaled_fp8_weight.dtype if model_config.scaled_fp8 == torch.float32: model_config.scaled_fp8 = torch.float8_e4m3fn + if scaled_fp8_weight.nelement() == 2: + model_config.optimizations["fp8"] = False + else: + model_config.optimizations["fp8"] = True return model_config diff --git a/comfy/model_management.py b/comfy/model_management.py index f6dfc18b0..2a9b022be 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -19,7 +19,7 @@ import psutil import logging from enum import Enum -from comfy.cli_args import args +from comfy.cli_args import args, PerformanceFeature import torch import sys import platform @@ -50,7 +50,9 @@ xpu_available = False torch_version = "" try: torch_version = torch.version.__version__ - xpu_available = (int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) <= 4)) and torch.xpu.is_available() + temp = torch_version.split(".") + torch_version_numeric = (int(temp[0]), int(temp[1])) + xpu_available = (torch_version_numeric[0] < 2 or (torch_version_numeric[0] == 2 and torch_version_numeric[1] <= 4)) and torch.xpu.is_available() except: pass @@ -93,6 +95,13 @@ try: except: npu_available = False +try: + import torch_mlu # noqa: F401 + _ = torch.mlu.device_count() + mlu_available = torch.mlu.is_available() +except: + mlu_available = False + if args.cpu: cpu_state = CPUState.CPU @@ -110,6 +119,12 @@ def is_ascend_npu(): return True return False +def is_mlu(): + global mlu_available + if mlu_available: + return True + return False + def get_torch_device(): global directml_enabled global cpu_state @@ -125,6 +140,8 @@ def get_torch_device(): return torch.device("xpu", torch.xpu.current_device()) elif is_ascend_npu(): return torch.device("npu", torch.npu.current_device()) + elif is_mlu(): + return torch.device("mlu", torch.mlu.current_device()) else: return torch.device(torch.cuda.current_device()) @@ -151,6 +168,12 @@ def get_total_memory(dev=None, torch_total_too=False): _, mem_total_npu = torch.npu.mem_get_info(dev) mem_total_torch = mem_reserved mem_total = mem_total_npu + elif is_mlu(): + stats = torch.mlu.memory_stats(dev) + mem_reserved = stats['reserved_bytes.all.current'] + _, mem_total_mlu = torch.mlu.mem_get_info(dev) + mem_total_torch = mem_reserved + mem_total = mem_total_mlu else: stats = torch.cuda.memory_stats(dev) mem_reserved = stats['reserved_bytes.all.current'] @@ -163,12 +186,21 @@ def get_total_memory(dev=None, torch_total_too=False): else: return mem_total +def mac_version(): + try: + return tuple(int(n) for n in platform.mac_ver()[0].split(".")) + except: + return None + total_vram = get_total_memory(get_torch_device()) / (1024 * 1024) total_ram = psutil.virtual_memory().total / (1024 * 1024) logging.info("Total VRAM {:0.0f} MB, total RAM {:0.0f} MB".format(total_vram, total_ram)) try: logging.info("pytorch version: {}".format(torch_version)) + mac_ver = mac_version() + if mac_ver is not None: + logging.info("Mac Version {}".format(mac_ver)) except: pass @@ -218,7 +250,7 @@ def is_amd(): MIN_WEIGHT_MEMORY_RATIO = 0.4 if is_nvidia(): - MIN_WEIGHT_MEMORY_RATIO = 0.2 + MIN_WEIGHT_MEMORY_RATIO = 0.0 ENABLE_PYTORCH_ATTENTION = False if args.use_pytorch_cross_attention: @@ -227,22 +259,45 @@ if args.use_pytorch_cross_attention: try: if is_nvidia(): - if int(torch_version[0]) >= 2: + if torch_version_numeric[0] >= 2: if ENABLE_PYTORCH_ATTENTION == False and args.use_split_cross_attention == False and args.use_quad_cross_attention == False: ENABLE_PYTORCH_ATTENTION = True - if is_intel_xpu() or is_ascend_npu(): + if is_intel_xpu() or is_ascend_npu() or is_mlu(): if args.use_split_cross_attention == False and args.use_quad_cross_attention == False: ENABLE_PYTORCH_ATTENTION = True except: pass + +try: + if is_amd(): + arch = torch.cuda.get_device_properties(get_torch_device()).gcnArchName + logging.info("AMD arch: {}".format(arch)) + if args.use_split_cross_attention == False and args.use_quad_cross_attention == False: + if torch_version_numeric[0] >= 2 and torch_version_numeric[1] >= 7: # works on 2.6 but doesn't actually seem to improve much + if any((a in arch) for a in ["gfx1100", "gfx1101"]): # TODO: more arches + ENABLE_PYTORCH_ATTENTION = True +except: + pass + + if ENABLE_PYTORCH_ATTENTION: torch.backends.cuda.enable_math_sdp(True) torch.backends.cuda.enable_flash_sdp(True) torch.backends.cuda.enable_mem_efficient_sdp(True) + +PRIORITIZE_FP16 = False # TODO: remove and replace with something that shows exactly which dtype is faster than the other try: - if int(torch_version[0]) == 2 and int(torch_version[2]) >= 5: + if is_nvidia() and PerformanceFeature.Fp16Accumulation in args.fast: + torch.backends.cuda.matmul.allow_fp16_accumulation = True + PRIORITIZE_FP16 = True # TODO: limit to cards where it actually boosts performance + logging.info("Enabled fp16 accumulation.") +except: + pass + +try: + if torch_version_numeric[0] == 2 and torch_version_numeric[1] >= 5: torch.backends.cuda.allow_fp16_bf16_reduction_math_sdp(True) except: logging.warning("Warning, could not set allow_fp16_bf16_reduction_math_sdp") @@ -256,15 +311,10 @@ elif args.highvram or args.gpu_only: vram_state = VRAMState.HIGH_VRAM FORCE_FP32 = False -FORCE_FP16 = False if args.force_fp32: logging.info("Forcing FP32, if this improves things please report it.") FORCE_FP32 = True -if args.force_fp16: - logging.info("Forcing FP16.") - FORCE_FP16 = True - if lowvram_available: if set_vram_to in (VRAMState.LOW_VRAM, VRAMState.NO_VRAM): vram_state = set_vram_to @@ -297,6 +347,8 @@ def get_torch_device_name(device): return "{} {}".format(device, torch.xpu.get_device_name(device)) elif is_ascend_npu(): return "{} {}".format(device, torch.npu.get_device_name(device)) + elif is_mlu(): + return "{} {}".format(device, torch.mlu.get_device_name(device)) else: return "CUDA {}: {}".format(device, torch.cuda.get_device_name(device)) @@ -535,14 +587,11 @@ def load_models_gpu(models, memory_required=0, force_patch_weights=False, minimu vram_set_state = vram_state lowvram_model_memory = 0 if lowvram_available and (vram_set_state == VRAMState.LOW_VRAM or vram_set_state == VRAMState.NORMAL_VRAM) and not force_full_load: - model_size = loaded_model.model_memory_required(torch_dev) loaded_memory = loaded_model.model_loaded_memory() current_free_mem = get_free_memory(torch_dev) + loaded_memory - lowvram_model_memory = max(64 * 1024 * 1024, (current_free_mem - minimum_memory_required), min(current_free_mem * MIN_WEIGHT_MEMORY_RATIO, current_free_mem - minimum_inference_memory())) + lowvram_model_memory = max(128 * 1024 * 1024, (current_free_mem - minimum_memory_required), min(current_free_mem * MIN_WEIGHT_MEMORY_RATIO, current_free_mem - minimum_inference_memory())) lowvram_model_memory = max(0.1, lowvram_model_memory - loaded_memory) - if model_size <= lowvram_model_memory: #only switch to lowvram if really necessary - lowvram_model_memory = 0 if vram_set_state == VRAMState.NO_VRAM: lowvram_model_memory = 0.1 @@ -635,7 +684,7 @@ def unet_inital_load_device(parameters, dtype): def maximum_vram_for_weights(device=None): return (get_total_memory(device) * 0.88 - minimum_inference_memory()) -def unet_dtype(device=None, model_params=0, supported_dtypes=[torch.float16, torch.bfloat16, torch.float32]): +def unet_dtype(device=None, model_params=0, supported_dtypes=[torch.float16, torch.bfloat16, torch.float32], weight_dtype=None): if model_params < 0: model_params = 1000000000000000000000 if args.fp32_unet: @@ -653,10 +702,8 @@ def unet_dtype(device=None, model_params=0, supported_dtypes=[torch.float16, tor fp8_dtype = None try: - for dtype in [torch.float8_e4m3fn, torch.float8_e5m2]: - if dtype in supported_dtypes: - fp8_dtype = dtype - break + if weight_dtype in [torch.float8_e4m3fn, torch.float8_e5m2]: + fp8_dtype = weight_dtype except: pass @@ -668,6 +715,10 @@ def unet_dtype(device=None, model_params=0, supported_dtypes=[torch.float16, tor if model_params * 2 > free_model_memory: return fp8_dtype + if PRIORITIZE_FP16 or weight_dtype == torch.float16: + if torch.float16 in supported_dtypes and should_use_fp16(device=device, model_params=model_params): + return torch.float16 + for dt in supported_dtypes: if dt == torch.float16 and should_use_fp16(device=device, model_params=model_params): if torch.float16 in supported_dtypes: @@ -700,6 +751,9 @@ def unet_manual_cast(weight_dtype, inference_device, supported_dtypes=[torch.flo return None fp16_supported = should_use_fp16(inference_device, prioritize_performance=True) + if PRIORITIZE_FP16 and fp16_supported and torch.float16 in supported_dtypes: + return torch.float16 + for dt in supported_dtypes: if dt == torch.float16 and fp16_supported: return torch.float16 @@ -876,6 +930,9 @@ def cast_to_device(tensor, device, dtype, copy=False): def sage_attention_enabled(): return args.use_sage_attention +def flash_attention_enabled(): + return args.use_flash_attention + def xformers_enabled(): global directml_enabled global cpu_state @@ -885,6 +942,8 @@ def xformers_enabled(): return False if is_ascend_npu(): return False + if is_mlu(): + return False if directml_enabled: return False return XFORMERS_IS_AVAILABLE @@ -901,6 +960,11 @@ def pytorch_attention_enabled(): global ENABLE_PYTORCH_ATTENTION return ENABLE_PYTORCH_ATTENTION +def pytorch_attention_enabled_vae(): + if is_amd(): + return False # enabling pytorch attention on AMD currently causes crash when doing high res + return pytorch_attention_enabled() + def pytorch_attention_flash_attention(): global ENABLE_PYTORCH_ATTENTION if ENABLE_PYTORCH_ATTENTION: @@ -911,23 +975,21 @@ def pytorch_attention_flash_attention(): return True if is_ascend_npu(): return True + if is_mlu(): + return True + if is_amd(): + return True #if you have pytorch attention enabled on AMD it probably supports at least mem efficient attention return False -def mac_version(): - try: - return tuple(int(n) for n in platform.mac_ver()[0].split(".")) - except: - return None - def force_upcast_attention_dtype(): upcast = args.force_upcast_attention macos_version = mac_version() - if macos_version is not None and ((14, 5) <= macos_version <= (15, 2)): # black image bug on recent versions of macOS + if macos_version is not None and ((14, 5) <= macos_version < (16,)): # black image bug on recent versions of macOS upcast = True if upcast: - return torch.float32 + return {torch.float16: torch.float32} else: return None @@ -957,6 +1019,13 @@ def get_free_memory(dev=None, torch_free_too=False): mem_free_npu, _ = torch.npu.mem_get_info(dev) mem_free_torch = mem_reserved - mem_active mem_free_total = mem_free_npu + mem_free_torch + elif is_mlu(): + stats = torch.mlu.memory_stats(dev) + mem_active = stats['active_bytes.all.current'] + mem_reserved = stats['reserved_bytes.all.current'] + mem_free_mlu, _ = torch.mlu.mem_get_info(dev) + mem_free_torch = mem_reserved - mem_active + mem_free_total = mem_free_mlu + mem_free_torch else: stats = torch.cuda.memory_stats(dev) mem_active = stats['active_bytes.all.current'] @@ -993,21 +1062,26 @@ def is_device_mps(device): def is_device_cuda(device): return is_device_type(device, 'cuda') -def should_use_fp16(device=None, model_params=0, prioritize_performance=True, manual_cast=False): +def is_directml_enabled(): global directml_enabled + if directml_enabled: + return True + return False + +def should_use_fp16(device=None, model_params=0, prioritize_performance=True, manual_cast=False): if device is not None: if is_device_cpu(device): return False - if FORCE_FP16: + if args.force_fp16: return True if FORCE_FP32: return False - if directml_enabled: - return False + if is_directml_enabled(): + return True if (device is not None and is_device_mps(device)) or mps_mode(): return True @@ -1021,6 +1095,9 @@ def should_use_fp16(device=None, model_params=0, prioritize_performance=True, ma if is_ascend_npu(): return True + if is_mlu(): + return True + if torch.version.hip: return True @@ -1078,13 +1155,28 @@ def should_use_bf16(device=None, model_params=0, prioritize_performance=True, ma if is_intel_xpu(): return True + if is_ascend_npu(): + return True + + if is_amd(): + arch = torch.cuda.get_device_properties(device).gcnArchName + if any((a in arch) for a in ["gfx1030", "gfx1031", "gfx1010", "gfx1011", "gfx1012", "gfx906", "gfx900", "gfx803"]): # RDNA2 and older don't support bf16 + if manual_cast: + return True + return False + props = torch.cuda.get_device_properties(device) + + if is_mlu(): + if props.major > 3: + return True + if props.major >= 8: return True bf16_works = torch.cuda.is_bf16_supported() - if bf16_works or manual_cast: + if bf16_works and manual_cast: free_model_memory = maximum_vram_for_weights(device) if (not prioritize_performance) or model_params * 4 > free_model_memory: return True @@ -1103,11 +1195,11 @@ def supports_fp8_compute(device=None): if props.minor < 9: return False - if int(torch_version[0]) < 2 or (int(torch_version[0]) == 2 and int(torch_version[2]) < 3): + if torch_version_numeric[0] < 2 or (torch_version_numeric[0] == 2 and torch_version_numeric[1] < 3): return False if WINDOWS: - if (int(torch_version[0]) == 2 and int(torch_version[2]) < 4): + if (torch_version_numeric[0] == 2 and torch_version_numeric[1] < 4): return False return True diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py index 0501f7b38..e291158ce 100644 --- a/comfy/model_patcher.py +++ b/comfy/model_patcher.py @@ -96,8 +96,28 @@ def wipe_lowvram_weight(m): if hasattr(m, "prev_comfy_cast_weights"): m.comfy_cast_weights = m.prev_comfy_cast_weights del m.prev_comfy_cast_weights - m.weight_function = None - m.bias_function = None + + if hasattr(m, "weight_function"): + m.weight_function = [] + + if hasattr(m, "bias_function"): + m.bias_function = [] + +def move_weight_functions(m, device): + if device is None: + return 0 + + memory = 0 + if hasattr(m, "weight_function"): + for f in m.weight_function: + if hasattr(f, "move_to"): + memory += f.move_to(device=device) + + if hasattr(m, "bias_function"): + for f in m.bias_function: + if hasattr(f, "move_to"): + memory += f.move_to(device=device) + return memory class LowVramPatch: def __init__(self, key, patches): @@ -192,11 +212,13 @@ class ModelPatcher: self.backup = {} self.object_patches = {} self.object_patches_backup = {} + self.weight_wrapper_patches = {} self.model_options = {"transformer_options":{}} self.model_size() self.load_device = load_device self.offload_device = offload_device self.weight_inplace_update = weight_inplace_update + self.force_cast_weights = False self.patches_uuid = uuid.uuid4() self.parent = None @@ -250,11 +272,14 @@ class ModelPatcher: n.patches_uuid = self.patches_uuid n.object_patches = self.object_patches.copy() + n.weight_wrapper_patches = self.weight_wrapper_patches.copy() n.model_options = copy.deepcopy(self.model_options) n.backup = self.backup n.object_patches_backup = self.object_patches_backup n.parent = self + n.force_cast_weights = self.force_cast_weights + # attachments n.attachments = {} for k in self.attachments: @@ -402,6 +427,16 @@ class ModelPatcher: def add_object_patch(self, name, obj): self.object_patches[name] = obj + def set_model_compute_dtype(self, dtype): + self.add_object_patch("manual_cast_dtype", dtype) + if dtype is not None: + self.force_cast_weights = True + self.patches_uuid = uuid.uuid4() #TODO: optimize by preventing a full model reload for this + + def add_weight_wrapper(self, name, function): + self.weight_wrapper_patches[name] = self.weight_wrapper_patches.get(name, []) + [function] + self.patches_uuid = uuid.uuid4() + def get_model_object(self, name: str) -> torch.nn.Module: """Retrieves a nested attribute from an object using dot notation considering object patches. @@ -566,6 +601,9 @@ class ModelPatcher: lowvram_weight = False + weight_key = "{}.weight".format(n) + bias_key = "{}.bias".format(n) + if not full_load and hasattr(m, "comfy_cast_weights"): if mem_counter + module_mem >= lowvram_model_memory: lowvram_weight = True @@ -573,34 +611,46 @@ class ModelPatcher: if hasattr(m, "prev_comfy_cast_weights"): #Already lowvramed continue - weight_key = "{}.weight".format(n) - bias_key = "{}.bias".format(n) - + cast_weight = self.force_cast_weights if lowvram_weight: + if hasattr(m, "comfy_cast_weights"): + m.weight_function = [] + m.bias_function = [] + if weight_key in self.patches: if force_patch_weights: self.patch_weight_to_device(weight_key) else: - m.weight_function = LowVramPatch(weight_key, self.patches) + m.weight_function = [LowVramPatch(weight_key, self.patches)] patch_counter += 1 if bias_key in self.patches: if force_patch_weights: self.patch_weight_to_device(bias_key) else: - m.bias_function = LowVramPatch(bias_key, self.patches) + m.bias_function = [LowVramPatch(bias_key, self.patches)] patch_counter += 1 - m.prev_comfy_cast_weights = m.comfy_cast_weights - m.comfy_cast_weights = True + cast_weight = True else: if hasattr(m, "comfy_cast_weights"): - if m.comfy_cast_weights: - wipe_lowvram_weight(m) + wipe_lowvram_weight(m) if full_load or mem_counter + module_mem < lowvram_model_memory: mem_counter += module_mem load_completely.append((module_mem, n, m, params)) + if cast_weight and hasattr(m, "comfy_cast_weights"): + m.prev_comfy_cast_weights = m.comfy_cast_weights + m.comfy_cast_weights = True + + if weight_key in self.weight_wrapper_patches: + m.weight_function.extend(self.weight_wrapper_patches[weight_key]) + + if bias_key in self.weight_wrapper_patches: + m.bias_function.extend(self.weight_wrapper_patches[bias_key]) + + mem_counter += move_weight_functions(m, device_to) + load_completely.sort(reverse=True) for x in load_completely: n = x[1] @@ -662,6 +712,7 @@ class ModelPatcher: self.unpatch_hooks() if self.model.model_lowvram: for m in self.model.modules(): + move_weight_functions(m, device_to) wipe_lowvram_weight(m) self.model.model_lowvram = False @@ -728,15 +779,19 @@ class ModelPatcher: weight_key = "{}.weight".format(n) bias_key = "{}.bias".format(n) if move_weight: + cast_weight = self.force_cast_weights m.to(device_to) + module_mem += move_weight_functions(m, device_to) if lowvram_possible: if weight_key in self.patches: - m.weight_function = LowVramPatch(weight_key, self.patches) + m.weight_function.append(LowVramPatch(weight_key, self.patches)) patch_counter += 1 if bias_key in self.patches: - m.bias_function = LowVramPatch(bias_key, self.patches) + m.bias_function.append(LowVramPatch(bias_key, self.patches)) patch_counter += 1 + cast_weight = True + if cast_weight: m.prev_comfy_cast_weights = m.comfy_cast_weights m.comfy_cast_weights = True m.comfy_patched_weights = False @@ -1034,7 +1089,6 @@ class ModelPatcher: def patch_hooks(self, hooks: comfy.hooks.HookGroup): with self.use_ejected(): - self.unpatch_hooks() if hooks is not None: model_sd_keys = list(self.model_state_dict().keys()) memory_counter = None @@ -1045,12 +1099,16 @@ class ModelPatcher: # if have cached weights for hooks, use it cached_weights = self.cached_hook_patches.get(hooks, None) if cached_weights is not None: + model_sd_keys_set = set(model_sd_keys) for key in cached_weights: if key not in model_sd_keys: logging.warning(f"Cached hook could not patch. Key does not exist in model: {key}") continue self.patch_cached_hook_weights(cached_weights=cached_weights, key=key, memory_counter=memory_counter) + model_sd_keys_set.remove(key) + self.unpatch_hooks(model_sd_keys_set) else: + self.unpatch_hooks() relevant_patches = self.get_combined_hook_patches(hooks=hooks) original_weights = None if len(relevant_patches) > 0: @@ -1061,6 +1119,8 @@ class ModelPatcher: continue self.patch_hook_weight_to_device(hooks=hooks, combined_patches=relevant_patches, key=key, original_weights=original_weights, memory_counter=memory_counter) + else: + self.unpatch_hooks() self.current_hooks = hooks def patch_cached_hook_weights(self, cached_weights: dict, key: str, memory_counter: MemoryCounter): @@ -1117,17 +1177,23 @@ class ModelPatcher: del out_weight del weight - def unpatch_hooks(self) -> None: + def unpatch_hooks(self, whitelist_keys_set: set[str]=None) -> None: with self.use_ejected(): if len(self.hook_backup) == 0: self.current_hooks = None return keys = list(self.hook_backup.keys()) - for k in keys: - comfy.utils.copy_to_param(self.model, k, self.hook_backup[k][0].to(device=self.hook_backup[k][1])) + if whitelist_keys_set: + for k in keys: + if k in whitelist_keys_set: + comfy.utils.copy_to_param(self.model, k, self.hook_backup[k][0].to(device=self.hook_backup[k][1])) + self.hook_backup.pop(k) + else: + for k in keys: + comfy.utils.copy_to_param(self.model, k, self.hook_backup[k][0].to(device=self.hook_backup[k][1])) - self.hook_backup.clear() - self.current_hooks = None + self.hook_backup.clear() + self.current_hooks = None def clean_hooks(self): self.unpatch_hooks() diff --git a/comfy/model_sampling.py b/comfy/model_sampling.py index 4370516b9..ff27b09a8 100644 --- a/comfy/model_sampling.py +++ b/comfy/model_sampling.py @@ -31,6 +31,7 @@ class EPS: return model_input - model_output * sigma def noise_scaling(self, sigma, noise, latent_image, max_denoise=False): + sigma = sigma.view(sigma.shape[:1] + (1,) * (noise.ndim - 1)) if max_denoise: noise = noise * torch.sqrt(1.0 + sigma ** 2.0) else: @@ -61,9 +62,11 @@ class CONST: return model_input - model_output * sigma def noise_scaling(self, sigma, noise, latent_image, max_denoise=False): + sigma = sigma.view(sigma.shape[:1] + (1,) * (noise.ndim - 1)) return sigma * noise + (1.0 - sigma) * latent_image def inverse_noise_scaling(self, sigma, latent): + sigma = sigma.view(sigma.shape[:1] + (1,) * (latent.ndim - 1)) return latent / (1.0 - sigma) class ModelSamplingDiscrete(torch.nn.Module): diff --git a/comfy/ops.py b/comfy/ops.py index 06be6b48b..ced461011 100644 --- a/comfy/ops.py +++ b/comfy/ops.py @@ -17,8 +17,9 @@ """ import torch +import logging import comfy.model_management -from comfy.cli_args import args +from comfy.cli_args import args, PerformanceFeature import comfy.float cast_to = comfy.model_management.cast_to #TODO: remove once no more references @@ -38,21 +39,23 @@ def cast_bias_weight(s, input=None, dtype=None, device=None, bias_dtype=None): bias = None non_blocking = comfy.model_management.device_supports_non_blocking(device) if s.bias is not None: - has_function = s.bias_function is not None + has_function = len(s.bias_function) > 0 bias = comfy.model_management.cast_to(s.bias, bias_dtype, device, non_blocking=non_blocking, copy=has_function) if has_function: - bias = s.bias_function(bias) + for f in s.bias_function: + bias = f(bias) - has_function = s.weight_function is not None + has_function = len(s.weight_function) > 0 weight = comfy.model_management.cast_to(s.weight, dtype, device, non_blocking=non_blocking, copy=has_function) if has_function: - weight = s.weight_function(weight) + for f in s.weight_function: + weight = f(weight) return weight, bias class CastWeightBiasOp: comfy_cast_weights = False - weight_function = None - bias_function = None + weight_function = [] + bias_function = [] class disable_weight_init: class Linear(torch.nn.Linear, CastWeightBiasOp): @@ -64,7 +67,7 @@ class disable_weight_init: return torch.nn.functional.linear(input, weight, bias) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: return super().forward(*args, **kwargs) @@ -78,7 +81,7 @@ class disable_weight_init: return self._conv_forward(input, weight, bias) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: return super().forward(*args, **kwargs) @@ -92,7 +95,7 @@ class disable_weight_init: return self._conv_forward(input, weight, bias) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: return super().forward(*args, **kwargs) @@ -106,7 +109,7 @@ class disable_weight_init: return self._conv_forward(input, weight, bias) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: return super().forward(*args, **kwargs) @@ -120,12 +123,11 @@ class disable_weight_init: return torch.nn.functional.group_norm(input, self.num_groups, weight, bias, self.eps) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: return super().forward(*args, **kwargs) - class LayerNorm(torch.nn.LayerNorm, CastWeightBiasOp): def reset_parameters(self): return None @@ -139,7 +141,7 @@ class disable_weight_init: return torch.nn.functional.layer_norm(input, self.normalized_shape, weight, bias, self.eps) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: return super().forward(*args, **kwargs) @@ -160,7 +162,7 @@ class disable_weight_init: output_padding, self.groups, self.dilation) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: return super().forward(*args, **kwargs) @@ -181,7 +183,7 @@ class disable_weight_init: output_padding, self.groups, self.dilation) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: return super().forward(*args, **kwargs) @@ -199,7 +201,7 @@ class disable_weight_init: return torch.nn.functional.embedding(input, weight, self.padding_idx, self.max_norm, self.norm_type, self.scale_grad_by_freq, self.sparse).to(dtype=output_dtype) def forward(self, *args, **kwargs): - if self.comfy_cast_weights: + if self.comfy_cast_weights or len(self.weight_function) > 0 or len(self.bias_function) > 0: return self.forward_comfy_cast_weights(*args, **kwargs) else: if "out_dtype" in kwargs: @@ -307,6 +309,7 @@ class fp8_ops(manual_cast): return torch.nn.functional.linear(input, weight, bias) def scaled_fp8_ops(fp8_matrix_mult=False, scale_input=False, override_dtype=None): + logging.info("Using scaled fp8: fp8 matrix mult: {}, scale input: {}".format(fp8_matrix_mult, scale_input)) class scaled_fp8_op(manual_cast): class Linear(manual_cast.Linear): def __init__(self, *args, **kwargs): @@ -357,9 +360,13 @@ def scaled_fp8_ops(fp8_matrix_mult=False, scale_input=False, override_dtype=None def pick_operations(weight_dtype, compute_dtype, load_device=None, disable_fast_fp8=False, fp8_optimizations=False, scaled_fp8=None): fp8_compute = comfy.model_management.supports_fp8_compute(load_device) if scaled_fp8 is not None: - return scaled_fp8_ops(fp8_matrix_mult=fp8_compute, scale_input=True, override_dtype=scaled_fp8) + return scaled_fp8_ops(fp8_matrix_mult=fp8_compute and fp8_optimizations, scale_input=fp8_optimizations, override_dtype=scaled_fp8) - if fp8_compute and (fp8_optimizations or args.fast) and not disable_fast_fp8: + if ( + fp8_compute and + (fp8_optimizations or PerformanceFeature.Fp8MatrixMultiplication in args.fast) and + not disable_fast_fp8 + ): return fp8_ops if compute_dtype is None or weight_dtype == compute_dtype: diff --git a/comfy/sampler_helpers.py b/comfy/sampler_helpers.py index b70e5e636..92ec7ca7a 100644 --- a/comfy/sampler_helpers.py +++ b/comfy/sampler_helpers.py @@ -58,7 +58,6 @@ def convert_cond(cond): temp = c[1].copy() model_conds = temp.get("model_conds", {}) if c[0] is not None: - model_conds["c_crossattn"] = comfy.conds.CONDCrossAttn(c[0]) #TODO: remove temp["cross_attn"] = c[0] temp["model_conds"] = model_conds temp["uuid"] = uuid.uuid4() diff --git a/comfy/samplers.py b/comfy/samplers.py index 2ecf8160c..47c5f68d8 100644 --- a/comfy/samplers.py +++ b/comfy/samplers.py @@ -19,6 +19,12 @@ import comfy.hooks import scipy.stats import numpy + +def add_area_dims(area, num_dims): + while (len(area) // 2) < num_dims: + area = [2147483648] + area[:len(area) // 2] + [0] + area[len(area) // 2:] + return area + def get_area_and_mult(conds, x_in, timestep_in): dims = tuple(x_in.shape[2:]) area = None @@ -34,6 +40,10 @@ def get_area_and_mult(conds, x_in, timestep_in): return None if 'area' in conds: area = list(conds['area']) + area = add_area_dims(area, len(dims)) + if (len(area) // 2) > len(dims): + area = area[:len(dims)] + area[len(area) // 2:(len(area) // 2) + len(dims)] + if 'strength' in conds: strength = conds['strength'] @@ -50,7 +60,7 @@ def get_area_and_mult(conds, x_in, timestep_in): if "mask_strength" in conds: mask_strength = conds["mask_strength"] mask = conds['mask'] - assert(mask.shape[1:] == x_in.shape[2:]) + assert (mask.shape[1:] == x_in.shape[2:]) mask = mask[:input_x.shape[0]] if area is not None: @@ -64,16 +74,17 @@ def get_area_and_mult(conds, x_in, timestep_in): mult = mask * strength if 'mask' not in conds and area is not None: - rr = 8 + fuzz = 8 for i in range(len(dims)): + rr = min(fuzz, mult.shape[2 + i] // 4) if area[len(dims) + i] != 0: for t in range(rr): m = mult.narrow(i + 2, t, 1) - m *= ((1.0/rr) * (t + 1)) + m *= ((1.0 / rr) * (t + 1)) if (area[i] + area[len(dims) + i]) < x_in.shape[i + 2]: for t in range(rr): m = mult.narrow(i + 2, area[i] - 1 - t, 1) - m *= ((1.0/rr) * (t + 1)) + m *= ((1.0 / rr) * (t + 1)) conditioning = {} model_conds = conds["model_conds"] @@ -548,25 +559,37 @@ def resolve_areas_and_cond_masks(conditions, h, w, device): logging.warning("WARNING: The comfy.samplers.resolve_areas_and_cond_masks function is deprecated please use the resolve_areas_and_cond_masks_multidim one instead.") return resolve_areas_and_cond_masks_multidim(conditions, [h, w], device) -def create_cond_with_same_area_if_none(conds, c): #TODO: handle dim != 2 +def create_cond_with_same_area_if_none(conds, c): if 'area' not in c: return + def area_inside(a, area_cmp): + a = add_area_dims(a, len(area_cmp) // 2) + area_cmp = add_area_dims(area_cmp, len(a) // 2) + + a_l = len(a) // 2 + area_cmp_l = len(area_cmp) // 2 + for i in range(min(a_l, area_cmp_l)): + if a[a_l + i] < area_cmp[area_cmp_l + i]: + return False + for i in range(min(a_l, area_cmp_l)): + if (a[i] + a[a_l + i]) > (area_cmp[i] + area_cmp[area_cmp_l + i]): + return False + return True + c_area = c['area'] smallest = None for x in conds: if 'area' in x: a = x['area'] - if c_area[2] >= a[2] and c_area[3] >= a[3]: - if a[0] + a[2] >= c_area[0] + c_area[2]: - if a[1] + a[3] >= c_area[1] + c_area[3]: - if smallest is None: - smallest = x - elif 'area' not in smallest: - smallest = x - else: - if smallest['area'][0] * smallest['area'][1] > a[0] * a[1]: - smallest = x + if area_inside(c_area, a): + if smallest is None: + smallest = x + elif 'area' not in smallest: + smallest = x + else: + if math.prod(smallest['area'][:len(smallest['area']) // 2]) > math.prod(a[:len(a) // 2]): + smallest = x else: if smallest is None: smallest = x @@ -686,7 +709,8 @@ class Sampler: KSAMPLER_NAMES = ["euler", "euler_cfg_pp", "euler_ancestral", "euler_ancestral_cfg_pp", "heun", "heunpp2","dpm_2", "dpm_2_ancestral", "lms", "dpm_fast", "dpm_adaptive", "dpmpp_2s_ancestral", "dpmpp_2s_ancestral_cfg_pp", "dpmpp_sde", "dpmpp_sde_gpu", "dpmpp_2m", "dpmpp_2m_cfg_pp", "dpmpp_2m_sde", "dpmpp_2m_sde_gpu", "dpmpp_3m_sde", "dpmpp_3m_sde_gpu", "ddpm", "lcm", - "ipndm", "ipndm_v", "deis", "res_multistep", "res_multistep_cfg_pp", "sa_solver", "sa_solver_pece"] + "ipndm", "ipndm_v", "deis", "res_multistep", "res_multistep_cfg_pp", "res_multistep_ancestral", "res_multistep_ancestral_cfg_pp", + "gradient_estimation", "er_sde", "sa_solver", "sa_solver_pece"] class KSAMPLER(Sampler): def __init__(self, sampler_function, extra_options={}, inpaint_options={}): diff --git a/comfy/sd.py b/comfy/sd.py index d7e89f726..3d72a04d6 100644 --- a/comfy/sd.py +++ b/comfy/sd.py @@ -1,4 +1,5 @@ from __future__ import annotations +import json import torch from enum import Enum import logging @@ -12,6 +13,7 @@ from .ldm.audio.autoencoder import AudioOobleckVAE import comfy.ldm.genmo.vae.model import comfy.ldm.lightricks.vae.causal_video_autoencoder import comfy.ldm.cosmos.vae +import comfy.ldm.wan.vae import yaml import math @@ -36,6 +38,8 @@ import comfy.text_encoders.genmo import comfy.text_encoders.lt import comfy.text_encoders.hunyuan_video import comfy.text_encoders.cosmos +import comfy.text_encoders.lumina2 +import comfy.text_encoders.wan import comfy.model_patcher import comfy.lora @@ -131,8 +135,8 @@ class CLIP: def clip_layer(self, layer_idx): self.layer_idx = layer_idx - def tokenize(self, text, return_word_ids=False): - return self.tokenizer.tokenize_with_weights(text, return_word_ids) + def tokenize(self, text, return_word_ids=False, **kwargs): + return self.tokenizer.tokenize_with_weights(text, return_word_ids, **kwargs) def add_hooks_to_dict(self, pooled_dict: dict[str]): if self.apply_hooks_to_conds: @@ -246,7 +250,7 @@ class CLIP: return self.patcher.get_key_patches() class VAE: - def __init__(self, sd=None, device=None, config=None, dtype=None): + def __init__(self, sd=None, device=None, config=None, dtype=None, metadata=None): if 'decoder.up_blocks.0.resnets.0.norm1.weight' in sd.keys(): #diffusers format sd = diffusers_convert.convert_vae_state_dict(sd) @@ -354,7 +358,12 @@ class VAE: version = 0 elif tensor_conv1.shape[0] == 1024: version = 1 - self.first_stage_model = comfy.ldm.lightricks.vae.causal_video_autoencoder.VideoVAE(version=version) + if "encoder.down_blocks.1.conv.conv.bias" in sd: + version = 2 + vae_config = None + if metadata is not None and "config" in metadata: + vae_config = json.loads(metadata["config"]).get("vae", None) + self.first_stage_model = comfy.ldm.lightricks.vae.causal_video_autoencoder.VideoVAE(version=version, config=vae_config) self.latent_channels = 128 self.latent_dim = 3 self.memory_used_decode = lambda shape, dtype: (900 * shape[2] * shape[3] * shape[4] * (8 * 8 * 8)) * model_management.dtype_size(dtype) @@ -391,6 +400,18 @@ class VAE: self.memory_used_decode = lambda shape, dtype: (50 * shape[2] * shape[3] * shape[4] * (8 * 8 * 8)) * model_management.dtype_size(dtype) self.memory_used_encode = lambda shape, dtype: (50 * (round((shape[2] + 7) / 8) * 8) * shape[3] * shape[4]) * model_management.dtype_size(dtype) self.working_dtypes = [torch.bfloat16, torch.float32] + elif "decoder.middle.0.residual.0.gamma" in sd: + self.upscale_ratio = (lambda a: max(0, a * 4 - 3), 8, 8) + self.upscale_index_formula = (4, 8, 8) + self.downscale_ratio = (lambda a: max(0, math.floor((a + 3) / 4)), 8, 8) + self.downscale_index_formula = (4, 8, 8) + self.latent_dim = 3 + self.latent_channels = 16 + ddconfig = {"dim": 96, "z_dim": self.latent_channels, "dim_mult": [1, 2, 4, 4], "num_res_blocks": 2, "attn_scales": [], "temperal_downsample": [False, True, True], "dropout": 0.0} + self.first_stage_model = comfy.ldm.wan.vae.WanVAE(**ddconfig) + self.working_dtypes = [torch.bfloat16, torch.float16, torch.float32] + self.memory_used_encode = lambda shape, dtype: 6000 * shape[3] * shape[4] * model_management.dtype_size(dtype) + self.memory_used_decode = lambda shape, dtype: 7000 * shape[3] * shape[4] * (8 * 8) * model_management.dtype_size(dtype) else: logging.warning("WARNING: No VAE weights detected, VAE not initalized.") self.first_stage_model = None @@ -419,6 +440,10 @@ class VAE: self.patcher = comfy.model_patcher.ModelPatcher(self.first_stage_model, load_device=self.device, offload_device=offload_device) logging.info("VAE load device: {}, offload device: {}, dtype: {}".format(self.device, offload_device, self.vae_dtype)) + def throw_exception_if_invalid(self): + if self.first_stage_model is None: + raise RuntimeError("ERROR: VAE is invalid: None\n\nIf the VAE is from a checkpoint loader node your checkpoint does not contain a valid VAE.") + def vae_encode_crop_pixels(self, pixels): downscale_ratio = self.spacial_compression_encode() @@ -474,6 +499,7 @@ class VAE: return comfy.utils.tiled_scale_multidim(samples, encode_fn, tile=(tile_t, tile_x, tile_y), overlap=overlap, upscale_amount=self.downscale_ratio, out_channels=self.latent_channels, downscale=True, index_formulas=self.downscale_index_formula, output_device=self.output_device) def decode(self, samples_in): + self.throw_exception_if_invalid() pixel_samples = None try: memory_used = self.memory_used_decode(samples_in.shape, self.vae_dtype) @@ -504,6 +530,7 @@ class VAE: return pixel_samples def decode_tiled(self, samples, tile_x=None, tile_y=None, overlap=None, tile_t=None, overlap_t=None): + self.throw_exception_if_invalid() memory_used = self.memory_used_decode(samples.shape, self.vae_dtype) #TODO: calculate mem required for tile model_management.load_models_gpu([self.patcher], memory_required=memory_used) dims = samples.ndim - 2 @@ -532,6 +559,7 @@ class VAE: return output.movedim(1, -1) def encode(self, pixel_samples): + self.throw_exception_if_invalid() pixel_samples = self.vae_encode_crop_pixels(pixel_samples) pixel_samples = pixel_samples.movedim(-1, 1) if self.latent_dim == 3 and pixel_samples.ndim < 5: @@ -564,6 +592,7 @@ class VAE: return samples def encode_tiled(self, pixel_samples, tile_x=None, tile_y=None, overlap=None, tile_t=None, overlap_t=None): + self.throw_exception_if_invalid() pixel_samples = self.vae_encode_crop_pixels(pixel_samples) dims = self.latent_dim pixel_samples = pixel_samples.movedim(-1, 1) @@ -657,6 +686,8 @@ class CLIPType(Enum): HUNYUAN_VIDEO = 9 PIXART = 10 COSMOS = 11 + LUMINA2 = 12 + WAN = 13 def load_clip(ckpt_paths, embedding_directory=None, clip_type=CLIPType.STABLE_DIFFUSION, model_options={}): @@ -675,6 +706,7 @@ class TEModel(Enum): T5_BASE = 6 LLAMA3_8 = 7 T5_XXL_OLD = 8 + GEMMA_2_2B = 9 def detect_te_model(sd): if "text_model.encoder.layers.30.mlp.fc1.weight" in sd: @@ -693,6 +725,8 @@ def detect_te_model(sd): return TEModel.T5_XXL_OLD if "encoder.block.0.layer.0.SelfAttention.k.weight" in sd: return TEModel.T5_BASE + if 'model.layers.0.post_feedforward_layernorm.weight' in sd: + return TEModel.GEMMA_2_2B if "model.layers.0.post_attention_layernorm.weight" in sd: return TEModel.LLAMA3_8 return None @@ -730,6 +764,7 @@ def load_text_encoder_state_dicts(state_dicts=[], embedding_directory=None, clip if "text_projection" in clip_data[i]: clip_data[i]["text_projection.weight"] = clip_data[i]["text_projection"].transpose(0, 1) #old models saved with the CLIPSave node + tokenizer_data = {} clip_target = EmptyClass() clip_target.params = {} if len(clip_data) == 1: @@ -757,6 +792,10 @@ def load_text_encoder_state_dicts(state_dicts=[], embedding_directory=None, clip elif clip_type == CLIPType.PIXART: clip_target.clip = comfy.text_encoders.pixart_t5.pixart_te(**t5xxl_detect(clip_data)) clip_target.tokenizer = comfy.text_encoders.pixart_t5.PixArtTokenizer + elif clip_type == CLIPType.WAN: + clip_target.clip = comfy.text_encoders.wan.te(**t5xxl_detect(clip_data)) + clip_target.tokenizer = comfy.text_encoders.wan.WanT5Tokenizer + tokenizer_data["spiece_model"] = clip_data[0].get("spiece_model", None) else: #CLIPType.MOCHI clip_target.clip = comfy.text_encoders.genmo.mochi_te(**t5xxl_detect(clip_data)) clip_target.tokenizer = comfy.text_encoders.genmo.MochiT5Tokenizer @@ -769,6 +808,10 @@ def load_text_encoder_state_dicts(state_dicts=[], embedding_directory=None, clip elif te_model == TEModel.T5_BASE: clip_target.clip = comfy.text_encoders.sa_t5.SAT5Model clip_target.tokenizer = comfy.text_encoders.sa_t5.SAT5Tokenizer + elif te_model == TEModel.GEMMA_2_2B: + clip_target.clip = comfy.text_encoders.lumina2.te(**llama_detect(clip_data)) + clip_target.tokenizer = comfy.text_encoders.lumina2.LuminaTokenizer + tokenizer_data["spiece_model"] = clip_data[0].get("spiece_model", None) else: if clip_type == CLIPType.SD3: clip_target.clip = comfy.text_encoders.sd3_clip.sd3_clip(clip_l=True, clip_g=False, t5=False) @@ -798,7 +841,6 @@ def load_text_encoder_state_dicts(state_dicts=[], embedding_directory=None, clip clip_target.tokenizer = comfy.text_encoders.sd3_clip.SD3Tokenizer parameters = 0 - tokenizer_data = {} for c in clip_data: parameters += comfy.utils.calculate_parameters(c) tokenizer_data, model_options = comfy.text_encoders.long_clipl.model_options_long_clip(c, tokenizer_data, model_options) @@ -845,13 +887,13 @@ def load_checkpoint(config_path=None, ckpt_path=None, output_vae=True, output_cl return (model, clip, vae) def load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, output_clipvision=False, embedding_directory=None, output_model=True, model_options={}, te_model_options={}): - sd = comfy.utils.load_torch_file(ckpt_path) - out = load_state_dict_guess_config(sd, output_vae, output_clip, output_clipvision, embedding_directory, output_model, model_options, te_model_options=te_model_options) + sd, metadata = comfy.utils.load_torch_file(ckpt_path, return_metadata=True) + out = load_state_dict_guess_config(sd, output_vae, output_clip, output_clipvision, embedding_directory, output_model, model_options, te_model_options=te_model_options, metadata=metadata) if out is None: raise RuntimeError("ERROR: Could not detect model type of: {}".format(ckpt_path)) return out -def load_state_dict_guess_config(sd, output_vae=True, output_clip=True, output_clipvision=False, embedding_directory=None, output_model=True, model_options={}, te_model_options={}): +def load_state_dict_guess_config(sd, output_vae=True, output_clip=True, output_clipvision=False, embedding_directory=None, output_model=True, model_options={}, te_model_options={}, metadata=None): clip = None clipvision = None vae = None @@ -863,19 +905,24 @@ def load_state_dict_guess_config(sd, output_vae=True, output_clip=True, output_c weight_dtype = comfy.utils.weight_dtype(sd, diffusion_model_prefix) load_device = model_management.get_torch_device() - model_config = model_detection.model_config_from_unet(sd, diffusion_model_prefix) + model_config = model_detection.model_config_from_unet(sd, diffusion_model_prefix, metadata=metadata) if model_config is None: - return None + logging.warning("Warning, This is not a checkpoint file, trying to load it as a diffusion model only.") + diffusion_model = load_diffusion_model_state_dict(sd, model_options={}) + if diffusion_model is None: + return None + return (diffusion_model, None, VAE(sd={}), None) # The VAE object is there to throw an exception if it's actually used' + unet_weight_dtype = list(model_config.supported_inference_dtypes) - if weight_dtype is not None and model_config.scaled_fp8 is None: - unet_weight_dtype.append(weight_dtype) + if model_config.scaled_fp8 is not None: + weight_dtype = None model_config.custom_operations = model_options.get("custom_operations", None) unet_dtype = model_options.get("dtype", model_options.get("weight_dtype", None)) if unet_dtype is None: - unet_dtype = model_management.unet_dtype(model_params=parameters, supported_dtypes=unet_weight_dtype) + unet_dtype = model_management.unet_dtype(model_params=parameters, supported_dtypes=unet_weight_dtype, weight_dtype=weight_dtype) manual_cast_dtype = model_management.unet_manual_cast(unet_dtype, load_device, model_config.supported_inference_dtypes) model_config.set_inference_dtype(unet_dtype, manual_cast_dtype) @@ -892,7 +939,7 @@ def load_state_dict_guess_config(sd, output_vae=True, output_clip=True, output_c if output_vae: vae_sd = comfy.utils.state_dict_prefix_replace(sd, {k: "" for k in model_config.vae_key_prefix}, filter_keys=True) vae_sd = model_config.process_vae_state_dict(vae_sd) - vae = VAE(sd=vae_sd) + vae = VAE(sd=vae_sd, metadata=metadata) if output_clip: clip_target = model_config.clip_target(state_dict=sd) @@ -966,11 +1013,11 @@ def load_diffusion_model_state_dict(sd, model_options={}): #load unet in diffuse offload_device = model_management.unet_offload_device() unet_weight_dtype = list(model_config.supported_inference_dtypes) - if weight_dtype is not None and model_config.scaled_fp8 is None: - unet_weight_dtype.append(weight_dtype) + if model_config.scaled_fp8 is not None: + weight_dtype = None if dtype is None: - unet_dtype = model_management.unet_dtype(model_params=parameters, supported_dtypes=unet_weight_dtype) + unet_dtype = model_management.unet_dtype(model_params=parameters, supported_dtypes=unet_weight_dtype, weight_dtype=weight_dtype) else: unet_dtype = dtype diff --git a/comfy/sd1_clip.py b/comfy/sd1_clip.py index 85518afd9..be21ec18d 100644 --- a/comfy/sd1_clip.py +++ b/comfy/sd1_clip.py @@ -158,71 +158,93 @@ class SDClipModel(torch.nn.Module, ClipTokenWeightEncoder): self.layer_idx = self.options_default[1] self.return_projected_pooled = self.options_default[2] - def set_up_textual_embeddings(self, tokens, current_embeds): - out_tokens = [] - next_new_token = token_dict_size = current_embeds.weight.shape[0] - embedding_weights = [] + def process_tokens(self, tokens, device): + end_token = self.special_tokens.get("end", None) + if end_token is None: + cmp_token = self.special_tokens.get("pad", -1) + else: + cmp_token = end_token + + embeds_out = [] + attention_masks = [] + num_tokens = [] for x in tokens: + attention_mask = [] tokens_temp = [] + other_embeds = [] + eos = False + index = 0 for y in x: if isinstance(y, numbers.Integral): - tokens_temp += [int(y)] - else: - if y.shape[0] == current_embeds.weight.shape[1]: - embedding_weights += [y] - tokens_temp += [next_new_token] - next_new_token += 1 + if eos: + attention_mask.append(0) else: - logging.warning("WARNING: shape mismatch when trying to apply embedding, embedding will be ignored {} != {}".format(y.shape[0], current_embeds.weight.shape[1])) - while len(tokens_temp) < len(x): - tokens_temp += [self.special_tokens["pad"]] - out_tokens += [tokens_temp] + attention_mask.append(1) + token = int(y) + tokens_temp += [token] + if not eos and token == cmp_token: + if end_token is None: + attention_mask[-1] = 0 + eos = True + else: + other_embeds.append((index, y)) + index += 1 - n = token_dict_size - if len(embedding_weights) > 0: - new_embedding = self.operations.Embedding(next_new_token + 1, current_embeds.weight.shape[1], device=current_embeds.weight.device, dtype=current_embeds.weight.dtype) - new_embedding.weight[:token_dict_size] = current_embeds.weight - for x in embedding_weights: - new_embedding.weight[n] = x - n += 1 - self.transformer.set_input_embeddings(new_embedding) + tokens_embed = torch.tensor([tokens_temp], device=device, dtype=torch.long) + tokens_embed = self.transformer.get_input_embeddings()(tokens_embed, out_dtype=torch.float32) + index = 0 + pad_extra = 0 + for o in other_embeds: + emb = o[1] + if torch.is_tensor(emb): + emb = {"type": "embedding", "data": emb} - processed_tokens = [] - for x in out_tokens: - processed_tokens += [list(map(lambda a: n if a == -1 else a, x))] #The EOS token should always be the largest one + emb_type = emb.get("type", None) + if emb_type == "embedding": + emb = emb.get("data", None) + else: + if hasattr(self.transformer, "preprocess_embed"): + emb = self.transformer.preprocess_embed(emb, device=device) + else: + emb = None - return processed_tokens + if emb is None: + index += -1 + continue + + ind = index + o[0] + emb = emb.view(1, -1, emb.shape[-1]).to(device=device, dtype=torch.float32) + emb_shape = emb.shape[1] + if emb.shape[-1] == tokens_embed.shape[-1]: + tokens_embed = torch.cat([tokens_embed[:, :ind], emb, tokens_embed[:, ind:]], dim=1) + attention_mask = attention_mask[:ind] + [1] * emb_shape + attention_mask[ind:] + index += emb_shape - 1 + else: + index += -1 + pad_extra += emb_shape + logging.warning("WARNING: shape mismatch when trying to apply embedding, embedding will be ignored {} != {}".format(emb.shape[-1], tokens_embed.shape[-1])) + + if pad_extra > 0: + padd_embed = self.transformer.get_input_embeddings()(torch.tensor([[self.special_tokens["pad"]] * pad_extra], device=device, dtype=torch.long), out_dtype=torch.float32) + tokens_embed = torch.cat([tokens_embed, padd_embed], dim=1) + attention_mask = attention_mask + [0] * pad_extra + + embeds_out.append(tokens_embed) + attention_masks.append(attention_mask) + num_tokens.append(sum(attention_mask)) + + return torch.cat(embeds_out), torch.tensor(attention_masks, device=device, dtype=torch.long), num_tokens def forward(self, tokens): - backup_embeds = self.transformer.get_input_embeddings() - device = backup_embeds.weight.device - tokens = self.set_up_textual_embeddings(tokens, backup_embeds) - tokens = torch.LongTensor(tokens).to(device) - - attention_mask = None - if self.enable_attention_masks or self.zero_out_masked or self.return_attention_masks: - attention_mask = torch.zeros_like(tokens) - end_token = self.special_tokens.get("end", None) - if end_token is None: - cmp_token = self.special_tokens.get("pad", -1) - else: - cmp_token = end_token - - for x in range(attention_mask.shape[0]): - for y in range(attention_mask.shape[1]): - attention_mask[x, y] = 1 - if tokens[x, y] == cmp_token: - if end_token is None: - attention_mask[x, y] = 0 - break + device = self.transformer.get_input_embeddings().weight.device + embeds, attention_mask, num_tokens = self.process_tokens(tokens, device) attention_mask_model = None if self.enable_attention_masks: attention_mask_model = attention_mask - outputs = self.transformer(tokens, attention_mask_model, intermediate_output=self.layer_idx, final_layer_norm_intermediate=self.layer_norm_hidden_state, dtype=torch.float32) - self.transformer.set_input_embeddings(backup_embeds) + outputs = self.transformer(None, attention_mask_model, embeds=embeds, num_tokens=num_tokens, intermediate_output=self.layer_idx, final_layer_norm_intermediate=self.layer_norm_hidden_state, dtype=torch.float32) if self.layer == "last": z = outputs[0].float() @@ -421,10 +443,10 @@ def load_embed(embedding_name, embedding_directory, embedding_size, embed_key=No return embed_out class SDTokenizer: - def __init__(self, tokenizer_path=None, max_length=77, pad_with_end=True, embedding_directory=None, embedding_size=768, embedding_key='clip_l', tokenizer_class=CLIPTokenizer, has_start_token=True, has_end_token=True, pad_to_max_length=True, min_length=None, pad_token=None, end_token=None, tokenizer_data={}): + def __init__(self, tokenizer_path=None, max_length=77, pad_with_end=True, embedding_directory=None, embedding_size=768, embedding_key='clip_l', tokenizer_class=CLIPTokenizer, has_start_token=True, has_end_token=True, pad_to_max_length=True, min_length=None, pad_token=None, end_token=None, tokenizer_data={}, tokenizer_args={}): if tokenizer_path is None: tokenizer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "sd1_tokenizer") - self.tokenizer = tokenizer_class.from_pretrained(tokenizer_path) + self.tokenizer = tokenizer_class.from_pretrained(tokenizer_path, **tokenizer_args) self.max_length = max_length self.min_length = min_length self.end_token = None @@ -482,7 +504,7 @@ class SDTokenizer: return (embed, leftover) - def tokenize_with_weights(self, text:str, return_word_ids=False): + def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs): ''' Takes a prompt and converts it to a list of (token, weight, word id) elements. Tokens can both be integer tokens and pre computed CLIP tensors. @@ -585,13 +607,18 @@ class SDTokenizer: return {} class SD1Tokenizer: - def __init__(self, embedding_directory=None, tokenizer_data={}, clip_name="l", tokenizer=SDTokenizer): - self.clip_name = clip_name - self.clip = "clip_{}".format(self.clip_name) + def __init__(self, embedding_directory=None, tokenizer_data={}, clip_name="l", tokenizer=SDTokenizer, name=None): + if name is not None: + self.clip_name = name + self.clip = "{}".format(self.clip_name) + else: + self.clip_name = clip_name + self.clip = "clip_{}".format(self.clip_name) + tokenizer = tokenizer_data.get("{}_tokenizer_class".format(self.clip), tokenizer) setattr(self, self.clip, tokenizer(embedding_directory=embedding_directory, tokenizer_data=tokenizer_data)) - def tokenize_with_weights(self, text:str, return_word_ids=False): + def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs): out = {} out[self.clip_name] = getattr(self, self.clip).tokenize_with_weights(text, return_word_ids) return out @@ -600,7 +627,7 @@ class SD1Tokenizer: return getattr(self, self.clip).untokenize(token_weight_pair) def state_dict(self): - return {} + return getattr(self, self.clip).state_dict() class SD1CheckpointClipModel(SDClipModel): def __init__(self, device="cpu", dtype=None, model_options={}): diff --git a/comfy/sdxl_clip.py b/comfy/sdxl_clip.py index 4d0a4e8e7..5b7c8a412 100644 --- a/comfy/sdxl_clip.py +++ b/comfy/sdxl_clip.py @@ -26,7 +26,7 @@ class SDXLTokenizer: self.clip_l = clip_l_tokenizer_class(embedding_directory=embedding_directory) self.clip_g = SDXLClipGTokenizer(embedding_directory=embedding_directory) - def tokenize_with_weights(self, text:str, return_word_ids=False): + def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs): out = {} out["g"] = self.clip_g.tokenize_with_weights(text, return_word_ids) out["l"] = self.clip_l.tokenize_with_weights(text, return_word_ids) diff --git a/comfy/supported_models.py b/comfy/supported_models.py index ff0bea418..b4d7bfe20 100644 --- a/comfy/supported_models.py +++ b/comfy/supported_models.py @@ -15,6 +15,8 @@ import comfy.text_encoders.genmo import comfy.text_encoders.lt import comfy.text_encoders.hunyuan_video import comfy.text_encoders.cosmos +import comfy.text_encoders.lumina2 +import comfy.text_encoders.wan from . import supported_models_base from . import latent_formats @@ -760,7 +762,7 @@ class LTXV(supported_models_base.BASE): unet_extra_config = {} latent_format = latent_formats.LTXV - memory_usage_factor = 2.7 + memory_usage_factor = 5.5 # TODO: img2vid is about 2x vs txt2vid supported_inference_dtypes = [torch.bfloat16, torch.float32] @@ -824,6 +826,26 @@ class HunyuanVideo(supported_models_base.BASE): hunyuan_detect = comfy.text_encoders.hunyuan_video.llama_detect(state_dict, "{}llama.transformer.".format(pref)) return supported_models_base.ClipTarget(comfy.text_encoders.hunyuan_video.HunyuanVideoTokenizer, comfy.text_encoders.hunyuan_video.hunyuan_video_clip(**hunyuan_detect)) +class HunyuanVideoI2V(HunyuanVideo): + unet_config = { + "image_model": "hunyuan_video", + "in_channels": 33, + } + + def get_model(self, state_dict, prefix="", device=None): + out = model_base.HunyuanVideoI2V(self, device=device) + return out + +class HunyuanVideoSkyreelsI2V(HunyuanVideo): + unet_config = { + "image_model": "hunyuan_video", + "in_channels": 32, + } + + def get_model(self, state_dict, prefix="", device=None): + out = model_base.HunyuanVideoSkyreelsI2V(self, device=device) + return out + class CosmosT2V(supported_models_base.BASE): unet_config = { "image_model": "cosmos", @@ -865,6 +887,78 @@ class CosmosI2V(CosmosT2V): out = model_base.CosmosVideo(self, image_to_video=True, device=device) return out -models = [Stable_Zero123, SD15_instructpix2pix, SD15, SD20, SD21UnclipL, SD21UnclipH, SDXL_instructpix2pix, SDXLRefiner, SDXL, SSD1B, KOALA_700M, KOALA_1B, Segmind_Vega, SD_X4Upscaler, Stable_Cascade_C, Stable_Cascade_B, SV3D_u, SV3D_p, SD3, StableAudio, AuraFlow, PixArtAlpha, PixArtSigma, HunyuanDiT, HunyuanDiT1, FluxInpaint, Flux, FluxSchnell, GenmoMochi, LTXV, HunyuanVideo, CosmosT2V, CosmosI2V] +class Lumina2(supported_models_base.BASE): + unet_config = { + "image_model": "lumina2", + } + + sampling_settings = { + "multiplier": 1.0, + "shift": 6.0, + } + + memory_usage_factor = 1.2 + + unet_extra_config = {} + latent_format = latent_formats.Flux + + supported_inference_dtypes = [torch.bfloat16, torch.float32] + + vae_key_prefix = ["vae."] + text_encoder_key_prefix = ["text_encoders."] + + def get_model(self, state_dict, prefix="", device=None): + out = model_base.Lumina2(self, device=device) + return out + + def clip_target(self, state_dict={}): + pref = self.text_encoder_key_prefix[0] + hunyuan_detect = comfy.text_encoders.hunyuan_video.llama_detect(state_dict, "{}gemma2_2b.transformer.".format(pref)) + return supported_models_base.ClipTarget(comfy.text_encoders.lumina2.LuminaTokenizer, comfy.text_encoders.lumina2.te(**hunyuan_detect)) + +class WAN21_T2V(supported_models_base.BASE): + unet_config = { + "image_model": "wan2.1", + "model_type": "t2v", + } + + sampling_settings = { + "shift": 8.0, + } + + unet_extra_config = {} + latent_format = latent_formats.Wan21 + + memory_usage_factor = 1.0 + + supported_inference_dtypes = [torch.float16, torch.bfloat16, torch.float32] + + vae_key_prefix = ["vae."] + text_encoder_key_prefix = ["text_encoders."] + + def __init__(self, unet_config): + super().__init__(unet_config) + self.memory_usage_factor = self.unet_config.get("dim", 2000) / 2000 + + def get_model(self, state_dict, prefix="", device=None): + out = model_base.WAN21(self, device=device) + return out + + def clip_target(self, state_dict={}): + pref = self.text_encoder_key_prefix[0] + t5_detect = comfy.text_encoders.sd3_clip.t5_xxl_detect(state_dict, "{}umt5xxl.transformer.".format(pref)) + return supported_models_base.ClipTarget(comfy.text_encoders.wan.WanT5Tokenizer, comfy.text_encoders.wan.te(**t5_detect)) + +class WAN21_I2V(WAN21_T2V): + unet_config = { + "image_model": "wan2.1", + "model_type": "i2v", + } + + def get_model(self, state_dict, prefix="", device=None): + out = model_base.WAN21(self, image_to_video=True, device=device) + return out + +models = [Stable_Zero123, SD15_instructpix2pix, SD15, SD20, SD21UnclipL, SD21UnclipH, SDXL_instructpix2pix, SDXLRefiner, SDXL, SSD1B, KOALA_700M, KOALA_1B, Segmind_Vega, SD_X4Upscaler, Stable_Cascade_C, Stable_Cascade_B, SV3D_u, SV3D_p, SD3, StableAudio, AuraFlow, PixArtAlpha, PixArtSigma, HunyuanDiT, HunyuanDiT1, FluxInpaint, Flux, FluxSchnell, GenmoMochi, LTXV, HunyuanVideoSkyreelsI2V, HunyuanVideoI2V, HunyuanVideo, CosmosT2V, CosmosI2V, Lumina2, WAN21_T2V, WAN21_I2V] models += [SVD_img2vid] diff --git a/comfy/text_encoders/bert.py b/comfy/text_encoders/bert.py index fc9bac1d2..551b03162 100644 --- a/comfy/text_encoders/bert.py +++ b/comfy/text_encoders/bert.py @@ -93,8 +93,11 @@ class BertEmbeddings(torch.nn.Module): self.LayerNorm = operations.LayerNorm(embed_dim, eps=layer_norm_eps, dtype=dtype, device=device) - def forward(self, input_tokens, token_type_ids=None, dtype=None): - x = self.word_embeddings(input_tokens, out_dtype=dtype) + def forward(self, input_tokens, embeds=None, token_type_ids=None, dtype=None): + if embeds is not None: + x = embeds + else: + x = self.word_embeddings(input_tokens, out_dtype=dtype) x += comfy.ops.cast_to_input(self.position_embeddings.weight[:x.shape[1]], x) if token_type_ids is not None: x += self.token_type_embeddings(token_type_ids, out_dtype=x.dtype) @@ -113,12 +116,12 @@ class BertModel_(torch.nn.Module): self.embeddings = BertEmbeddings(config_dict["vocab_size"], config_dict["max_position_embeddings"], config_dict["type_vocab_size"], config_dict["pad_token_id"], embed_dim, layer_norm_eps, dtype, device, operations) self.encoder = BertEncoder(config_dict["num_hidden_layers"], embed_dim, config_dict["intermediate_size"], config_dict["num_attention_heads"], layer_norm_eps, dtype, device, operations) - def forward(self, input_tokens, attention_mask=None, intermediate_output=None, final_layer_norm_intermediate=True, dtype=None): - x = self.embeddings(input_tokens, dtype=dtype) + def forward(self, input_tokens, attention_mask=None, embeds=None, num_tokens=None, intermediate_output=None, final_layer_norm_intermediate=True, dtype=None): + x = self.embeddings(input_tokens, embeds=embeds, dtype=dtype) mask = None if attention_mask is not None: mask = 1.0 - attention_mask.to(x.dtype).reshape((attention_mask.shape[0], 1, -1, attention_mask.shape[-1])).expand(attention_mask.shape[0], 1, attention_mask.shape[-1], attention_mask.shape[-1]) - mask = mask.masked_fill(mask.to(torch.bool), float("-inf")) + mask = mask.masked_fill(mask.to(torch.bool), -torch.finfo(x.dtype).max) x, i = self.encoder(x, mask, intermediate_output) return x, i diff --git a/comfy/text_encoders/flux.py b/comfy/text_encoders/flux.py index b945b1aaa..a12995ec0 100644 --- a/comfy/text_encoders/flux.py +++ b/comfy/text_encoders/flux.py @@ -18,7 +18,7 @@ class FluxTokenizer: self.clip_l = clip_l_tokenizer_class(embedding_directory=embedding_directory) self.t5xxl = T5XXLTokenizer(embedding_directory=embedding_directory) - def tokenize_with_weights(self, text:str, return_word_ids=False): + def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs): out = {} out["l"] = self.clip_l.tokenize_with_weights(text, return_word_ids) out["t5xxl"] = self.t5xxl.tokenize_with_weights(text, return_word_ids) diff --git a/comfy/text_encoders/hunyuan_video.py b/comfy/text_encoders/hunyuan_video.py index 7149d6878..dbb259e54 100644 --- a/comfy/text_encoders/hunyuan_video.py +++ b/comfy/text_encoders/hunyuan_video.py @@ -4,6 +4,7 @@ import comfy.text_encoders.llama from transformers import LlamaTokenizerFast import torch import os +import numbers def llama_detect(state_dict, prefix=""): @@ -22,7 +23,7 @@ def llama_detect(state_dict, prefix=""): class LLAMA3Tokenizer(sd1_clip.SDTokenizer): def __init__(self, embedding_directory=None, tokenizer_data={}, min_length=256): tokenizer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "llama_tokenizer") - super().__init__(tokenizer_path, embedding_directory=embedding_directory, pad_with_end=False, embedding_size=4096, embedding_key='llama', tokenizer_class=LlamaTokenizerFast, has_start_token=True, has_end_token=False, pad_to_max_length=False, max_length=99999999, pad_token=128258, end_token=128009, min_length=min_length) + super().__init__(tokenizer_path, embedding_directory=embedding_directory, pad_with_end=False, embedding_size=4096, embedding_key='llama', tokenizer_class=LlamaTokenizerFast, has_start_token=True, has_end_token=False, pad_to_max_length=False, max_length=99999999, pad_token=128258, min_length=min_length) class LLAMAModel(sd1_clip.SDClipModel): def __init__(self, device="cpu", layer="hidden", layer_idx=-3, dtype=None, attention_mask=True, model_options={}): @@ -38,15 +39,26 @@ class HunyuanVideoTokenizer: def __init__(self, embedding_directory=None, tokenizer_data={}): clip_l_tokenizer_class = tokenizer_data.get("clip_l_tokenizer_class", sd1_clip.SDTokenizer) self.clip_l = clip_l_tokenizer_class(embedding_directory=embedding_directory) - self.llama_template = """<|start_header_id|>system<|end_header_id|>\n\nDescribe the video by detailing the following aspects: 1. The main content and theme of the video.2. The color, shape, size, texture, quantity, text, and spatial relationships of the objects.3. Actions, events, behaviors temporal relationships, physical movement changes of the objects.4. background environment, light, style and atmosphere.5. camera angles, movements, and transitions used in the video:<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n""" # 95 tokens + self.llama_template = """<|start_header_id|>system<|end_header_id|>\n\nDescribe the video by detailing the following aspects: 1. The main content and theme of the video.2. The color, shape, size, texture, quantity, text, and spatial relationships of the objects.3. Actions, events, behaviors temporal relationships, physical movement changes of the objects.4. background environment, light, style and atmosphere.5. camera angles, movements, and transitions used in the video:<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n{}<|eot_id|>""" # 95 tokens self.llama = LLAMA3Tokenizer(embedding_directory=embedding_directory, min_length=1) - def tokenize_with_weights(self, text:str, return_word_ids=False): + def tokenize_with_weights(self, text, return_word_ids=False, llama_template=None, image_embeds=None, image_interleave=1, **kwargs): out = {} out["l"] = self.clip_l.tokenize_with_weights(text, return_word_ids) - llama_text = "{}{}".format(self.llama_template, text) - out["llama"] = self.llama.tokenize_with_weights(llama_text, return_word_ids) + if llama_template is None: + llama_text = self.llama_template.format(text) + else: + llama_text = llama_template.format(text) + llama_text_tokens = self.llama.tokenize_with_weights(llama_text, return_word_ids) + embed_count = 0 + for r in llama_text_tokens: + for i in range(len(r)): + if r[i][0] == 128257: + if image_embeds is not None and embed_count < image_embeds.shape[0]: + r[i] = ({"type": "embedding", "data": image_embeds[embed_count], "original_type": "image", "image_interleave": image_interleave},) + r[i][1:] + embed_count += 1 + out["llama"] = llama_text_tokens return out def untokenize(self, token_weight_pair): @@ -80,20 +92,51 @@ class HunyuanVideoClipModel(torch.nn.Module): llama_out, llama_pooled, llama_extra_out = self.llama.encode_token_weights(token_weight_pairs_llama) template_end = 0 - for i, v in enumerate(token_weight_pairs_llama[0]): - if v[0] == 128007: # <|end_header_id|> - template_end = i + extra_template_end = 0 + extra_sizes = 0 + user_end = 9999999999999 + images = [] + + tok_pairs = token_weight_pairs_llama[0] + for i, v in enumerate(tok_pairs): + elem = v[0] + if not torch.is_tensor(elem): + if isinstance(elem, numbers.Integral): + if elem == 128006: + if tok_pairs[i + 1][0] == 882: + if tok_pairs[i + 2][0] == 128007: + template_end = i + 2 + user_end = -1 + if elem == 128009 and user_end == -1: + user_end = i + 1 + else: + if elem.get("original_type") == "image": + elem_size = elem.get("data").shape[0] + if template_end > 0: + if user_end == -1: + extra_template_end += elem_size - 1 + else: + image_start = i + extra_sizes + image_end = i + elem_size + extra_sizes + images.append((image_start, image_end, elem.get("image_interleave", 1))) + extra_sizes += elem_size - 1 if llama_out.shape[1] > (template_end + 2): - if token_weight_pairs_llama[0][template_end + 1][0] == 271: + if tok_pairs[template_end + 1][0] == 271: template_end += 2 - llama_out = llama_out[:, template_end:] - llama_extra_out["attention_mask"] = llama_extra_out["attention_mask"][:, template_end:] + llama_output = llama_out[:, template_end + extra_sizes:user_end + extra_sizes + extra_template_end] + llama_extra_out["attention_mask"] = llama_extra_out["attention_mask"][:, template_end + extra_sizes:user_end + extra_sizes + extra_template_end] if llama_extra_out["attention_mask"].sum() == torch.numel(llama_extra_out["attention_mask"]): llama_extra_out.pop("attention_mask") # attention mask is useless if no masked elements + if len(images) > 0: + out = [] + for i in images: + out.append(llama_out[:, i[0]: i[1]: i[2]]) + llama_output = torch.cat(out + [llama_output], dim=1) + l_out, l_pooled = self.clip_l.encode_token_weights(token_weight_pairs_l) - return llama_out, l_pooled, llama_extra_out + return llama_output, l_pooled, llama_extra_out def load_sd(self, sd): if "text_model.encoder.layers.1.mlp.fc1.weight" in sd: diff --git a/comfy/text_encoders/hydit.py b/comfy/text_encoders/hydit.py index 7cb790f45..7da3e9fc5 100644 --- a/comfy/text_encoders/hydit.py +++ b/comfy/text_encoders/hydit.py @@ -37,7 +37,7 @@ class HyditTokenizer: self.hydit_clip = HyditBertTokenizer(embedding_directory=embedding_directory) self.mt5xl = MT5XLTokenizer(tokenizer_data={"spiece_model": mt5_tokenizer_data}, embedding_directory=embedding_directory) - def tokenize_with_weights(self, text:str, return_word_ids=False): + def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs): out = {} out["hydit_clip"] = self.hydit_clip.tokenize_with_weights(text, return_word_ids) out["mt5xl"] = self.mt5xl.tokenize_with_weights(text, return_word_ids) diff --git a/comfy/text_encoders/llama.py b/comfy/text_encoders/llama.py index ad4b4623e..58710b2bf 100644 --- a/comfy/text_encoders/llama.py +++ b/comfy/text_encoders/llama.py @@ -1,6 +1,5 @@ import torch import torch.nn as nn -import torch.nn.functional as F from dataclasses import dataclass from typing import Optional, Any @@ -21,15 +20,41 @@ class Llama2Config: max_position_embeddings: int = 8192 rms_norm_eps: float = 1e-5 rope_theta: float = 500000.0 + transformer_type: str = "llama" + head_dim = 128 + rms_norm_add = False + mlp_activation = "silu" + +@dataclass +class Gemma2_2B_Config: + vocab_size: int = 256000 + hidden_size: int = 2304 + intermediate_size: int = 9216 + num_hidden_layers: int = 26 + num_attention_heads: int = 8 + num_key_value_heads: int = 4 + max_position_embeddings: int = 8192 + rms_norm_eps: float = 1e-6 + rope_theta: float = 10000.0 + transformer_type: str = "gemma2" + head_dim = 256 + rms_norm_add = True + mlp_activation = "gelu_pytorch_tanh" class RMSNorm(nn.Module): - def __init__(self, dim: int, eps: float = 1e-5, device=None, dtype=None): + def __init__(self, dim: int, eps: float = 1e-5, add=False, device=None, dtype=None): super().__init__() self.eps = eps self.weight = nn.Parameter(torch.empty(dim, device=device, dtype=dtype)) + self.add = add def forward(self, x: torch.Tensor): - return comfy.ldm.common_dit.rms_norm(x, self.weight, self.eps) + w = self.weight + if self.add: + w = w + 1.0 + + return comfy.ldm.common_dit.rms_norm(x, w, self.eps) + def rotate_half(x): @@ -68,13 +93,15 @@ class Attention(nn.Module): self.num_heads = config.num_attention_heads self.num_kv_heads = config.num_key_value_heads self.hidden_size = config.hidden_size - self.head_dim = self.hidden_size // self.num_heads + + self.head_dim = config.head_dim + self.inner_size = self.num_heads * self.head_dim ops = ops or nn - self.q_proj = ops.Linear(config.hidden_size, config.hidden_size, bias=False, device=device, dtype=dtype) + self.q_proj = ops.Linear(config.hidden_size, self.inner_size, bias=False, device=device, dtype=dtype) self.k_proj = ops.Linear(config.hidden_size, self.num_kv_heads * self.head_dim, bias=False, device=device, dtype=dtype) self.v_proj = ops.Linear(config.hidden_size, self.num_kv_heads * self.head_dim, bias=False, device=device, dtype=dtype) - self.o_proj = ops.Linear(config.hidden_size, config.hidden_size, bias=False, device=device, dtype=dtype) + self.o_proj = ops.Linear(self.inner_size, config.hidden_size, bias=False, device=device, dtype=dtype) def forward( self, @@ -84,7 +111,6 @@ class Attention(nn.Module): optimized_attention=None, ): batch_size, seq_length, _ = hidden_states.shape - xq = self.q_proj(hidden_states) xk = self.k_proj(hidden_states) xv = self.v_proj(hidden_states) @@ -108,9 +134,13 @@ class MLP(nn.Module): self.gate_proj = ops.Linear(config.hidden_size, config.intermediate_size, bias=False, device=device, dtype=dtype) self.up_proj = ops.Linear(config.hidden_size, config.intermediate_size, bias=False, device=device, dtype=dtype) self.down_proj = ops.Linear(config.intermediate_size, config.hidden_size, bias=False, device=device, dtype=dtype) + if config.mlp_activation == "silu": + self.activation = torch.nn.functional.silu + elif config.mlp_activation == "gelu_pytorch_tanh": + self.activation = lambda a: torch.nn.functional.gelu(a, approximate="tanh") def forward(self, x): - return self.down_proj(F.silu(self.gate_proj(x)) * self.up_proj(x)) + return self.down_proj(self.activation(self.gate_proj(x)) * self.up_proj(x)) class TransformerBlock(nn.Module): def __init__(self, config: Llama2Config, device=None, dtype=None, ops: Any = None): @@ -146,6 +176,45 @@ class TransformerBlock(nn.Module): return x +class TransformerBlockGemma2(nn.Module): + def __init__(self, config: Llama2Config, device=None, dtype=None, ops: Any = None): + super().__init__() + self.self_attn = Attention(config, device=device, dtype=dtype, ops=ops) + self.mlp = MLP(config, device=device, dtype=dtype, ops=ops) + self.input_layernorm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps, add=config.rms_norm_add, device=device, dtype=dtype) + self.post_attention_layernorm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps, add=config.rms_norm_add, device=device, dtype=dtype) + self.pre_feedforward_layernorm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps, add=config.rms_norm_add, device=device, dtype=dtype) + self.post_feedforward_layernorm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps, add=config.rms_norm_add, device=device, dtype=dtype) + + def forward( + self, + x: torch.Tensor, + attention_mask: Optional[torch.Tensor] = None, + freqs_cis: Optional[torch.Tensor] = None, + optimized_attention=None, + ): + # Self Attention + residual = x + x = self.input_layernorm(x) + x = self.self_attn( + hidden_states=x, + attention_mask=attention_mask, + freqs_cis=freqs_cis, + optimized_attention=optimized_attention, + ) + + x = self.post_attention_layernorm(x) + x = residual + x + + # MLP + residual = x + x = self.pre_feedforward_layernorm(x) + x = self.mlp(x) + x = self.post_feedforward_layernorm(x) + x = residual + x + + return x + class Llama2_(nn.Module): def __init__(self, config, device=None, dtype=None, ops=None): super().__init__() @@ -158,17 +227,30 @@ class Llama2_(nn.Module): device=device, dtype=dtype ) + if self.config.transformer_type == "gemma2": + transformer = TransformerBlockGemma2 + self.normalize_in = True + else: + transformer = TransformerBlock + self.normalize_in = False + self.layers = nn.ModuleList([ - TransformerBlock(config, device=device, dtype=dtype, ops=ops) + transformer(config, device=device, dtype=dtype, ops=ops) for _ in range(config.num_hidden_layers) ]) - self.norm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps, device=device, dtype=dtype) + self.norm = RMSNorm(config.hidden_size, eps=config.rms_norm_eps, add=config.rms_norm_add, device=device, dtype=dtype) # self.lm_head = ops.Linear(config.hidden_size, config.vocab_size, bias=False, device=device, dtype=dtype) - def forward(self, x, attention_mask=None, intermediate_output=None, final_layer_norm_intermediate=True, dtype=None): - x = self.embed_tokens(x, out_dtype=dtype) + def forward(self, x, attention_mask=None, embeds=None, num_tokens=None, intermediate_output=None, final_layer_norm_intermediate=True, dtype=None): + if embeds is not None: + x = embeds + else: + x = self.embed_tokens(x, out_dtype=dtype) - freqs_cis = precompute_freqs_cis(self.config.hidden_size // self.config.num_attention_heads, + if self.normalize_in: + x *= self.config.hidden_size ** 0.5 + + freqs_cis = precompute_freqs_cis(self.config.head_dim, x.shape[1], self.config.rope_theta, device=x.device) @@ -206,16 +288,7 @@ class Llama2_(nn.Module): return x, intermediate - -class Llama2(torch.nn.Module): - def __init__(self, config_dict, dtype, device, operations): - super().__init__() - config = Llama2Config(**config_dict) - self.num_layers = config.num_hidden_layers - - self.model = Llama2_(config, device=device, dtype=dtype, ops=operations) - self.dtype = dtype - +class BaseLlama: def get_input_embeddings(self): return self.model.embed_tokens @@ -224,3 +297,23 @@ class Llama2(torch.nn.Module): def forward(self, input_ids, *args, **kwargs): return self.model(input_ids, *args, **kwargs) + + +class Llama2(BaseLlama, torch.nn.Module): + def __init__(self, config_dict, dtype, device, operations): + super().__init__() + config = Llama2Config(**config_dict) + self.num_layers = config.num_hidden_layers + + self.model = Llama2_(config, device=device, dtype=dtype, ops=operations) + self.dtype = dtype + + +class Gemma2_2B(BaseLlama, torch.nn.Module): + def __init__(self, config_dict, dtype, device, operations): + super().__init__() + config = Gemma2_2B_Config(**config_dict) + self.num_layers = config.num_hidden_layers + + self.model = Llama2_(config, device=device, dtype=dtype, ops=operations) + self.dtype = dtype diff --git a/comfy/text_encoders/lumina2.py b/comfy/text_encoders/lumina2.py new file mode 100644 index 000000000..a7b1d702b --- /dev/null +++ b/comfy/text_encoders/lumina2.py @@ -0,0 +1,39 @@ +from comfy import sd1_clip +from .spiece_tokenizer import SPieceTokenizer +import comfy.text_encoders.llama + + +class Gemma2BTokenizer(sd1_clip.SDTokenizer): + def __init__(self, embedding_directory=None, tokenizer_data={}): + tokenizer = tokenizer_data.get("spiece_model", None) + super().__init__(tokenizer, pad_with_end=False, embedding_size=2304, embedding_key='gemma2_2b', tokenizer_class=SPieceTokenizer, has_end_token=False, pad_to_max_length=False, max_length=99999999, min_length=1, tokenizer_args={"add_bos": True, "add_eos": False}) + + def state_dict(self): + return {"spiece_model": self.tokenizer.serialize_model()} + + +class LuminaTokenizer(sd1_clip.SD1Tokenizer): + def __init__(self, embedding_directory=None, tokenizer_data={}): + super().__init__(embedding_directory=embedding_directory, tokenizer_data=tokenizer_data, name="gemma2_2b", tokenizer=Gemma2BTokenizer) + + +class Gemma2_2BModel(sd1_clip.SDClipModel): + def __init__(self, device="cpu", layer="hidden", layer_idx=-2, dtype=None, attention_mask=True, model_options={}): + super().__init__(device=device, layer=layer, layer_idx=layer_idx, textmodel_json_config={}, dtype=dtype, special_tokens={"start": 2, "pad": 0}, layer_norm_hidden_state=False, model_class=comfy.text_encoders.llama.Gemma2_2B, enable_attention_masks=attention_mask, return_attention_masks=attention_mask, model_options=model_options) + + +class LuminaModel(sd1_clip.SD1ClipModel): + def __init__(self, device="cpu", dtype=None, model_options={}): + super().__init__(device=device, dtype=dtype, name="gemma2_2b", clip_model=Gemma2_2BModel, model_options=model_options) + + +def te(dtype_llama=None, llama_scaled_fp8=None): + class LuminaTEModel_(LuminaModel): + def __init__(self, device="cpu", dtype=None, model_options={}): + if llama_scaled_fp8 is not None and "scaled_fp8" not in model_options: + model_options = model_options.copy() + model_options["scaled_fp8"] = llama_scaled_fp8 + if dtype_llama is not None: + dtype = dtype_llama + super().__init__(device=device, dtype=dtype, model_options=model_options) + return LuminaTEModel_ diff --git a/comfy/text_encoders/sd3_clip.py b/comfy/text_encoders/sd3_clip.py index 00d7e31ad..3ad2ed93a 100644 --- a/comfy/text_encoders/sd3_clip.py +++ b/comfy/text_encoders/sd3_clip.py @@ -43,7 +43,7 @@ class SD3Tokenizer: self.clip_g = sdxl_clip.SDXLClipGTokenizer(embedding_directory=embedding_directory) self.t5xxl = T5XXLTokenizer(embedding_directory=embedding_directory) - def tokenize_with_weights(self, text:str, return_word_ids=False): + def tokenize_with_weights(self, text:str, return_word_ids=False, **kwargs): out = {} out["g"] = self.clip_g.tokenize_with_weights(text, return_word_ids) out["l"] = self.clip_l.tokenize_with_weights(text, return_word_ids) diff --git a/comfy/text_encoders/spiece_tokenizer.py b/comfy/text_encoders/spiece_tokenizer.py index cbaa99ba5..21df4f863 100644 --- a/comfy/text_encoders/spiece_tokenizer.py +++ b/comfy/text_encoders/spiece_tokenizer.py @@ -1,21 +1,21 @@ import torch class SPieceTokenizer: - add_eos = True - @staticmethod - def from_pretrained(path): - return SPieceTokenizer(path) + def from_pretrained(path, **kwargs): + return SPieceTokenizer(path, **kwargs) - def __init__(self, tokenizer_path): + def __init__(self, tokenizer_path, add_bos=False, add_eos=True): + self.add_bos = add_bos + self.add_eos = add_eos import sentencepiece if torch.is_tensor(tokenizer_path): tokenizer_path = tokenizer_path.numpy().tobytes() if isinstance(tokenizer_path, bytes): - self.tokenizer = sentencepiece.SentencePieceProcessor(model_proto=tokenizer_path, add_eos=self.add_eos) + self.tokenizer = sentencepiece.SentencePieceProcessor(model_proto=tokenizer_path, add_bos=self.add_bos, add_eos=self.add_eos) else: - self.tokenizer = sentencepiece.SentencePieceProcessor(model_file=tokenizer_path, add_eos=self.add_eos) + self.tokenizer = sentencepiece.SentencePieceProcessor(model_file=tokenizer_path, add_bos=self.add_bos, add_eos=self.add_eos) def get_vocab(self): out = {} diff --git a/comfy/text_encoders/t5.py b/comfy/text_encoders/t5.py index 7405528e2..49f0ba4fe 100644 --- a/comfy/text_encoders/t5.py +++ b/comfy/text_encoders/t5.py @@ -203,7 +203,7 @@ class T5Stack(torch.nn.Module): mask = None if attention_mask is not None: mask = 1.0 - attention_mask.to(x.dtype).reshape((attention_mask.shape[0], 1, -1, attention_mask.shape[-1])).expand(attention_mask.shape[0], 1, attention_mask.shape[-1], attention_mask.shape[-1]) - mask = mask.masked_fill(mask.to(torch.bool), float("-inf")) + mask = mask.masked_fill(mask.to(torch.bool), -torch.finfo(x.dtype).max) intermediate = None optimized_attention = optimized_attention_for_device(x.device, mask=attention_mask is not None, small_input=True) @@ -239,8 +239,11 @@ class T5(torch.nn.Module): def set_input_embeddings(self, embeddings): self.shared = embeddings - def forward(self, input_ids, *args, **kwargs): - x = self.shared(input_ids, out_dtype=kwargs.get("dtype", torch.float32)) + def forward(self, input_ids, attention_mask, embeds=None, num_tokens=None, **kwargs): + if input_ids is None: + x = embeds + else: + x = self.shared(input_ids, out_dtype=kwargs.get("dtype", torch.float32)) if self.dtype not in [torch.float32, torch.float16, torch.bfloat16]: x = torch.nan_to_num(x) #Fix for fp8 T5 base - return self.encoder(x, *args, **kwargs) + return self.encoder(x, attention_mask=attention_mask, **kwargs) diff --git a/comfy/text_encoders/umt5_config_xxl.json b/comfy/text_encoders/umt5_config_xxl.json new file mode 100644 index 000000000..dfcb4b54b --- /dev/null +++ b/comfy/text_encoders/umt5_config_xxl.json @@ -0,0 +1,22 @@ +{ + "d_ff": 10240, + "d_kv": 64, + "d_model": 4096, + "decoder_start_token_id": 0, + "dropout_rate": 0.1, + "eos_token_id": 1, + "dense_act_fn": "gelu_pytorch_tanh", + "initializer_factor": 1.0, + "is_encoder_decoder": true, + "is_gated_act": true, + "layer_norm_epsilon": 1e-06, + "model_type": "umt5", + "num_decoder_layers": 24, + "num_heads": 64, + "num_layers": 24, + "output_past": true, + "pad_token_id": 0, + "relative_attention_num_buckets": 32, + "tie_word_embeddings": false, + "vocab_size": 256384 +} diff --git a/comfy/text_encoders/wan.py b/comfy/text_encoders/wan.py new file mode 100644 index 000000000..971ac8fa8 --- /dev/null +++ b/comfy/text_encoders/wan.py @@ -0,0 +1,37 @@ +from comfy import sd1_clip +from .spiece_tokenizer import SPieceTokenizer +import comfy.text_encoders.t5 +import os + +class UMT5XXlModel(sd1_clip.SDClipModel): + def __init__(self, device="cpu", layer="last", layer_idx=None, dtype=None, model_options={}): + textmodel_json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "umt5_config_xxl.json") + super().__init__(device=device, layer=layer, layer_idx=layer_idx, textmodel_json_config=textmodel_json_config, dtype=dtype, special_tokens={"end": 1, "pad": 0}, model_class=comfy.text_encoders.t5.T5, enable_attention_masks=True, zero_out_masked=True, model_options=model_options) + +class UMT5XXlTokenizer(sd1_clip.SDTokenizer): + def __init__(self, embedding_directory=None, tokenizer_data={}): + tokenizer = tokenizer_data.get("spiece_model", None) + super().__init__(tokenizer, pad_with_end=False, embedding_size=4096, embedding_key='umt5xxl', tokenizer_class=SPieceTokenizer, has_start_token=False, pad_to_max_length=False, max_length=99999999, min_length=512, pad_token=0) + + def state_dict(self): + return {"spiece_model": self.tokenizer.serialize_model()} + + +class WanT5Tokenizer(sd1_clip.SD1Tokenizer): + def __init__(self, embedding_directory=None, tokenizer_data={}): + super().__init__(embedding_directory=embedding_directory, tokenizer_data=tokenizer_data, clip_name="umt5xxl", tokenizer=UMT5XXlTokenizer) + +class WanT5Model(sd1_clip.SD1ClipModel): + def __init__(self, device="cpu", dtype=None, model_options={}, **kwargs): + super().__init__(device=device, dtype=dtype, model_options=model_options, name="umt5xxl", clip_model=UMT5XXlModel, **kwargs) + +def te(dtype_t5=None, t5xxl_scaled_fp8=None): + class WanTEModel(WanT5Model): + def __init__(self, device="cpu", dtype=None, model_options={}): + if t5xxl_scaled_fp8 is not None and "scaled_fp8" not in model_options: + model_options = model_options.copy() + model_options["scaled_fp8"] = t5xxl_scaled_fp8 + if dtype_t5 is not None: + dtype = dtype_t5 + super().__init__(device=device, dtype=dtype, model_options=model_options) + return WanTEModel diff --git a/comfy/utils.py b/comfy/utils.py index b35062824..a826e41bf 100644 --- a/comfy/utils.py +++ b/comfy/utils.py @@ -46,11 +46,26 @@ if hasattr(torch.serialization, "add_safe_globals"): # TODO: this was added in else: logging.info("Warning, you are using an old pytorch version and some ckpt/pt files might be loaded unsafely. Upgrading to 2.4 or above is recommended.") -def load_torch_file(ckpt, safe_load=False, device=None): +def load_torch_file(ckpt, safe_load=False, device=None, return_metadata=False): if device is None: device = torch.device("cpu") + metadata = None if ckpt.lower().endswith(".safetensors") or ckpt.lower().endswith(".sft"): - sd = safetensors.torch.load_file(ckpt, device=device.type) + try: + with safetensors.safe_open(ckpt, framework="pt", device=device.type) as f: + sd = {} + for k in f.keys(): + sd[k] = f.get_tensor(k) + if return_metadata: + metadata = f.metadata() + except Exception as e: + if len(e.args) > 0: + message = e.args[0] + if "HeaderTooLarge" in message: + raise ValueError("{}\n\nFile path: {}\n\nThe safetensors file is corrupt or invalid. Make sure this is actually a safetensors file and not a ckpt or pt or other filetype.".format(message, ckpt)) + if "MetadataIncompleteBuffer" in message: + raise ValueError("{}\n\nFile path: {}\n\nThe safetensors file is corrupt/incomplete. Check the file size and make sure you have copied/downloaded it correctly.".format(message, ckpt)) + raise e else: if safe_load or ALWAYS_SAFE_LOAD: pl_sd = torch.load(ckpt, map_location=device, weights_only=True) @@ -68,7 +83,7 @@ def load_torch_file(ckpt, safe_load=False, device=None): sd = pl_sd else: sd = pl_sd - return sd + return (sd, metadata) if return_metadata else sd def save_torch_file(sd, ckpt, metadata=None): if metadata is not None: diff --git a/comfy_extras/nodes_audio.py b/comfy_extras/nodes_audio.py index 3cb918e09..136ad6159 100644 --- a/comfy_extras/nodes_audio.py +++ b/comfy_extras/nodes_audio.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import torchaudio import torch import comfy.model_management @@ -10,6 +12,7 @@ import random import hashlib import node_helpers from comfy.cli_args import args +from comfy.comfy_types import FileLocator class EmptyLatentAudio: def __init__(self): @@ -164,7 +167,7 @@ class SaveAudio: def save_audio(self, audio, filename_prefix="ComfyUI", prompt=None, extra_pnginfo=None): filename_prefix += self.prefix_append full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir) - results = list() + results: list[FileLocator] = [] metadata = {} if not args.disable_metadata: diff --git a/comfy_extras/nodes_custom_sampler.py b/comfy_extras/nodes_custom_sampler.py index 1399625f7..213fd2677 100644 --- a/comfy_extras/nodes_custom_sampler.py +++ b/comfy_extras/nodes_custom_sampler.py @@ -485,7 +485,7 @@ class SamplerCustom: return {"required": {"model": ("MODEL",), "add_noise": ("BOOLEAN", {"default": True}), - "noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}), + "noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True}), "cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}), "positive": ("CONDITIONING", ), "negative": ("CONDITIONING", ), @@ -636,10 +636,16 @@ class DisableNoise: class RandomNoise(DisableNoise): @classmethod def INPUT_TYPES(s): - return {"required":{ - "noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}), - } - } + return { + "required": { + "noise_seed": ("INT", { + "default": 0, + "min": 0, + "max": 0xffffffffffffffff, + "control_after_generate": True, + }), + } + } def get_noise(self, noise_seed): return (Noise_RandomNoise(noise_seed),) diff --git a/comfy_extras/nodes_flux.py b/comfy_extras/nodes_flux.py index 2ae23f735..ad6c15f37 100644 --- a/comfy_extras/nodes_flux.py +++ b/comfy_extras/nodes_flux.py @@ -38,7 +38,26 @@ class FluxGuidance: return (c, ) +class FluxDisableGuidance: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "conditioning": ("CONDITIONING", ), + }} + + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "append" + + CATEGORY = "advanced/conditioning/flux" + DESCRIPTION = "This node completely disables the guidance embed on Flux and Flux like models" + + def append(self, conditioning): + c = node_helpers.conditioning_set_values(conditioning, {"guidance": None}) + return (c, ) + + NODE_CLASS_MAPPINGS = { "CLIPTextEncodeFlux": CLIPTextEncodeFlux, "FluxGuidance": FluxGuidance, + "FluxDisableGuidance": FluxDisableGuidance, } diff --git a/comfy_extras/nodes_hunyuan.py b/comfy_extras/nodes_hunyuan.py index d6408269f..504010ad0 100644 --- a/comfy_extras/nodes_hunyuan.py +++ b/comfy_extras/nodes_hunyuan.py @@ -1,4 +1,5 @@ import nodes +import node_helpers import torch import comfy.model_management @@ -38,7 +39,83 @@ class EmptyHunyuanLatentVideo: latent = torch.zeros([batch_size, 16, ((length - 1) // 4) + 1, height // 8, width // 8], device=comfy.model_management.intermediate_device()) return ({"samples":latent}, ) +PROMPT_TEMPLATE_ENCODE_VIDEO_I2V = ( + "<|start_header_id|>system<|end_header_id|>\n\n\nDescribe the video by detailing the following aspects according to the reference image: " + "1. The main content and theme of the video." + "2. The color, shape, size, texture, quantity, text, and spatial relationships of the objects." + "3. Actions, events, behaviors temporal relationships, physical movement changes of the objects." + "4. background environment, light, style and atmosphere." + "5. camera angles, movements, and transitions used in the video:<|eot_id|>\n\n" + "<|start_header_id|>user<|end_header_id|>\n\n{}<|eot_id|>" + "<|start_header_id|>assistant<|end_header_id|>\n\n" +) + +class TextEncodeHunyuanVideo_ImageToVideo: + @classmethod + def INPUT_TYPES(s): + return {"required": { + "clip": ("CLIP", ), + "clip_vision_output": ("CLIP_VISION_OUTPUT", ), + "prompt": ("STRING", {"multiline": True, "dynamicPrompts": True}), + "image_interleave": ("INT", {"default": 2, "min": 1, "max": 512, "tooltip": "How much the image influences things vs the text prompt. Higher number means more influence from the text prompt."}), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "encode" + + CATEGORY = "advanced/conditioning" + + def encode(self, clip, clip_vision_output, prompt, image_interleave): + tokens = clip.tokenize(prompt, llama_template=PROMPT_TEMPLATE_ENCODE_VIDEO_I2V, image_embeds=clip_vision_output.mm_projected, image_interleave=image_interleave) + return (clip.encode_from_tokens_scheduled(tokens), ) + +class HunyuanImageToVideo: + @classmethod + def INPUT_TYPES(s): + return {"required": {"positive": ("CONDITIONING", ), + "vae": ("VAE", ), + "width": ("INT", {"default": 848, "min": 16, "max": nodes.MAX_RESOLUTION, "step": 16}), + "height": ("INT", {"default": 480, "min": 16, "max": nodes.MAX_RESOLUTION, "step": 16}), + "length": ("INT", {"default": 53, "min": 1, "max": nodes.MAX_RESOLUTION, "step": 4}), + "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096}), + "guidance_type": (["v1 (concat)", "v2 (replace)"], ) + }, + "optional": {"start_image": ("IMAGE", ), + }} + + RETURN_TYPES = ("CONDITIONING", "LATENT") + RETURN_NAMES = ("positive", "latent") + FUNCTION = "encode" + + CATEGORY = "conditioning/video_models" + + def encode(self, positive, vae, width, height, length, batch_size, guidance_type, start_image=None): + latent = torch.zeros([batch_size, 16, ((length - 1) // 4) + 1, height // 8, width // 8], device=comfy.model_management.intermediate_device()) + out_latent = {} + + if start_image is not None: + start_image = comfy.utils.common_upscale(start_image[:length, :, :, :3].movedim(-1, 1), width, height, "bilinear", "center").movedim(1, -1) + + concat_latent_image = vae.encode(start_image) + mask = torch.ones((1, 1, latent.shape[2], concat_latent_image.shape[-2], concat_latent_image.shape[-1]), device=start_image.device, dtype=start_image.dtype) + mask[:, :, :((start_image.shape[0] - 1) // 4) + 1] = 0.0 + + if guidance_type == "v1 (concat)": + cond = {"concat_latent_image": concat_latent_image, "concat_mask": mask} + else: + cond = {'guiding_frame_index': 0} + latent[:, :, :concat_latent_image.shape[2]] = concat_latent_image + out_latent["noise_mask"] = mask + + positive = node_helpers.conditioning_set_values(positive, cond) + + out_latent["samples"] = latent + return (positive, out_latent) + + + NODE_CLASS_MAPPINGS = { "CLIPTextEncodeHunyuanDiT": CLIPTextEncodeHunyuanDiT, + "TextEncodeHunyuanVideo_ImageToVideo": TextEncodeHunyuanVideo_ImageToVideo, "EmptyHunyuanLatentVideo": EmptyHunyuanLatentVideo, + "HunyuanImageToVideo": HunyuanImageToVideo, } diff --git a/comfy_extras/nodes_images.py b/comfy_extras/nodes_images.py index af37666b2..e11a4583a 100644 --- a/comfy_extras/nodes_images.py +++ b/comfy_extras/nodes_images.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import nodes import folder_paths from comfy.cli_args import args @@ -9,6 +11,8 @@ import numpy as np import json import os +from comfy.comfy_types import FileLocator + MAX_RESOLUTION = nodes.MAX_RESOLUTION class ImageCrop: @@ -99,7 +103,7 @@ class SaveAnimatedWEBP: method = self.methods.get(method) filename_prefix += self.prefix_append full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0]) - results = list() + results: list[FileLocator] = [] pil_images = [] for image in images: i = 255. * image.cpu().numpy() diff --git a/comfy_extras/nodes_latent.py b/comfy_extras/nodes_latent.py index af2736818..f33ed1bee 100644 --- a/comfy_extras/nodes_latent.py +++ b/comfy_extras/nodes_latent.py @@ -2,10 +2,14 @@ import comfy.utils import comfy_extras.nodes_post_processing import torch -def reshape_latent_to(target_shape, latent): + +def reshape_latent_to(target_shape, latent, repeat_batch=True): if latent.shape[1:] != target_shape[1:]: - latent = comfy.utils.common_upscale(latent, target_shape[3], target_shape[2], "bilinear", "center") - return comfy.utils.repeat_to_batch_size(latent, target_shape[0]) + latent = comfy.utils.common_upscale(latent, target_shape[-1], target_shape[-2], "bilinear", "center") + if repeat_batch: + return comfy.utils.repeat_to_batch_size(latent, target_shape[0]) + else: + return latent class LatentAdd: @@ -116,8 +120,7 @@ class LatentBatch: s1 = samples1["samples"] s2 = samples2["samples"] - if s1.shape[1:] != s2.shape[1:]: - s2 = comfy.utils.common_upscale(s2, s1.shape[3], s1.shape[2], "bilinear", "center") + s2 = reshape_latent_to(s1.shape, s2, repeat_batch=False) s = torch.cat((s1, s2), dim=0) samples_out["samples"] = s samples_out["batch_index"] = samples1.get("batch_index", [x for x in range(0, s1.shape[0])]) + samples2.get("batch_index", [x for x in range(0, s2.shape[0])]) diff --git a/comfy_extras/nodes_load_3d.py b/comfy_extras/nodes_load_3d.py index 3560ab78a..8b43cf218 100644 --- a/comfy_extras/nodes_load_3d.py +++ b/comfy_extras/nodes_load_3d.py @@ -19,14 +19,6 @@ class Load3D(): "image": ("LOAD_3D", {}), "width": ("INT", {"default": 1024, "min": 1, "max": 4096, "step": 1}), "height": ("INT", {"default": 1024, "min": 1, "max": 4096, "step": 1}), - "show_grid": ([True, False],), - "camera_type": (["perspective", "orthographic"],), - "view": (["front", "right", "top", "isometric"],), - "material": (["original", "normal", "wireframe", "depth"],), - "bg_color": ("STRING", {"default": "#000000", "multiline": False}), - "light_intensity": ("INT", {"default": 10, "min": 1, "max": 20, "step": 1}), - "up_direction": (["original", "-x", "+x", "-y", "+y", "-z", "+z"],), - "fov": ("INT", {"default": 75, "min": 10, "max": 150, "step": 1}), }} RETURN_TYPES = ("IMAGE", "MASK", "STRING") @@ -38,22 +30,14 @@ class Load3D(): CATEGORY = "3d" def process(self, model_file, image, **kwargs): - if isinstance(image, dict): - image_path = folder_paths.get_annotated_filepath(image['image']) - mask_path = folder_paths.get_annotated_filepath(image['mask']) + image_path = folder_paths.get_annotated_filepath(image['image']) + mask_path = folder_paths.get_annotated_filepath(image['mask']) - load_image_node = nodes.LoadImage() - output_image, ignore_mask = load_image_node.load_image(image=image_path) - ignore_image, output_mask = load_image_node.load_image(image=mask_path) + load_image_node = nodes.LoadImage() + output_image, ignore_mask = load_image_node.load_image(image=image_path) + ignore_image, output_mask = load_image_node.load_image(image=mask_path) - return output_image, output_mask, model_file, - else: - # to avoid the format is not dict which will happen the FE code is not compatibility to core, - # we need to this to double-check, it can be removed after merged FE into the core - image_path = folder_paths.get_annotated_filepath(image) - load_image_node = nodes.LoadImage() - output_image, output_mask = load_image_node.load_image(image=image_path) - return output_image, output_mask, model_file, + return output_image, output_mask, model_file, class Load3DAnimation(): @classmethod @@ -69,15 +53,6 @@ class Load3DAnimation(): "image": ("LOAD_3D_ANIMATION", {}), "width": ("INT", {"default": 1024, "min": 1, "max": 4096, "step": 1}), "height": ("INT", {"default": 1024, "min": 1, "max": 4096, "step": 1}), - "show_grid": ([True, False],), - "camera_type": (["perspective", "orthographic"],), - "view": (["front", "right", "top", "isometric"],), - "material": (["original", "normal", "wireframe", "depth"],), - "bg_color": ("STRING", {"default": "#000000", "multiline": False}), - "light_intensity": ("INT", {"default": 10, "min": 1, "max": 20, "step": 1}), - "up_direction": (["original", "-x", "+x", "-y", "+y", "-z", "+z"],), - "animation_speed": (["0.1", "0.5", "1", "1.5", "2"], {"default": "1"}), - "fov": ("INT", {"default": 75, "min": 10, "max": 150, "step": 1}), }} RETURN_TYPES = ("IMAGE", "MASK", "STRING") @@ -89,34 +64,38 @@ class Load3DAnimation(): CATEGORY = "3d" def process(self, model_file, image, **kwargs): - if isinstance(image, dict): - image_path = folder_paths.get_annotated_filepath(image['image']) - mask_path = folder_paths.get_annotated_filepath(image['mask']) + image_path = folder_paths.get_annotated_filepath(image['image']) + mask_path = folder_paths.get_annotated_filepath(image['mask']) - load_image_node = nodes.LoadImage() - output_image, ignore_mask = load_image_node.load_image(image=image_path) - ignore_image, output_mask = load_image_node.load_image(image=mask_path) + load_image_node = nodes.LoadImage() + output_image, ignore_mask = load_image_node.load_image(image=image_path) + ignore_image, output_mask = load_image_node.load_image(image=mask_path) - return output_image, output_mask, model_file, - else: - image_path = folder_paths.get_annotated_filepath(image) - load_image_node = nodes.LoadImage() - output_image, output_mask = load_image_node.load_image(image=image_path) - return output_image, output_mask, model_file, + return output_image, output_mask, model_file, class Preview3D(): @classmethod def INPUT_TYPES(s): return {"required": { "model_file": ("STRING", {"default": "", "multiline": False}), - "show_grid": ([True, False],), - "camera_type": (["perspective", "orthographic"],), - "view": (["front", "right", "top", "isometric"],), - "material": (["original", "normal", "wireframe", "depth"],), - "bg_color": ("STRING", {"default": "#000000", "multiline": False}), - "light_intensity": ("INT", {"default": 10, "min": 1, "max": 20, "step": 1}), - "up_direction": (["original", "-x", "+x", "-y", "+y", "-z", "+z"],), - "fov": ("INT", {"default": 75, "min": 10, "max": 150, "step": 1}), + }} + + OUTPUT_NODE = True + RETURN_TYPES = () + + CATEGORY = "3d" + + FUNCTION = "process" + EXPERIMENTAL = True + + def process(self, model_file, **kwargs): + return {"ui": {"model_file": [model_file]}, "result": ()} + +class Preview3DAnimation(): + @classmethod + def INPUT_TYPES(s): + return {"required": { + "model_file": ("STRING", {"default": "", "multiline": False}), }} OUTPUT_NODE = True @@ -133,11 +112,13 @@ class Preview3D(): NODE_CLASS_MAPPINGS = { "Load3D": Load3D, "Load3DAnimation": Load3DAnimation, - "Preview3D": Preview3D + "Preview3D": Preview3D, + "Preview3DAnimation": Preview3DAnimation } NODE_DISPLAY_NAME_MAPPINGS = { "Load3D": "Load 3D", "Load3DAnimation": "Load 3D - Animation", - "Preview3D": "Preview 3D" + "Preview3D": "Preview 3D", + "Preview3DAnimation": "Preview 3D - Animation" } diff --git a/comfy_extras/nodes_lt.py b/comfy_extras/nodes_lt.py index dec912416..fdc6c7c13 100644 --- a/comfy_extras/nodes_lt.py +++ b/comfy_extras/nodes_lt.py @@ -1,9 +1,14 @@ +import io import nodes import node_helpers import torch import comfy.model_management import comfy.model_sampling +import comfy.utils import math +import numpy as np +import av +from comfy.ldm.lightricks.symmetric_patchifier import SymmetricPatchifier, latent_to_pixel_coords class EmptyLTXVLatentVideo: @classmethod @@ -33,7 +38,6 @@ class LTXVImgToVideo: "height": ("INT", {"default": 512, "min": 64, "max": nodes.MAX_RESOLUTION, "step": 32}), "length": ("INT", {"default": 97, "min": 9, "max": nodes.MAX_RESOLUTION, "step": 8}), "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096}), - "image_noise_scale": ("FLOAT", {"default": 0.15, "min": 0, "max": 1.0, "step": 0.01, "tooltip": "Amount of noise to apply on conditioning image latent."}) }} RETURN_TYPES = ("CONDITIONING", "CONDITIONING", "LATENT") @@ -42,16 +46,219 @@ class LTXVImgToVideo: CATEGORY = "conditioning/video_models" FUNCTION = "generate" - def generate(self, positive, negative, image, vae, width, height, length, batch_size, image_noise_scale): + def generate(self, positive, negative, image, vae, width, height, length, batch_size): pixels = comfy.utils.common_upscale(image.movedim(-1, 1), width, height, "bilinear", "center").movedim(1, -1) encode_pixels = pixels[:, :, :, :3] t = vae.encode(encode_pixels) - positive = node_helpers.conditioning_set_values(positive, {"guiding_latent": t, "guiding_latent_noise_scale": image_noise_scale}) - negative = node_helpers.conditioning_set_values(negative, {"guiding_latent": t, "guiding_latent_noise_scale": image_noise_scale}) latent = torch.zeros([batch_size, 128, ((length - 1) // 8) + 1, height // 32, width // 32], device=comfy.model_management.intermediate_device()) latent[:, :, :t.shape[2]] = t - return (positive, negative, {"samples": latent}, ) + + conditioning_latent_frames_mask = torch.ones( + (batch_size, 1, latent.shape[2], 1, 1), + dtype=torch.float32, + device=latent.device, + ) + conditioning_latent_frames_mask[:, :, :t.shape[2]] = 0 + + return (positive, negative, {"samples": latent, "noise_mask": conditioning_latent_frames_mask}, ) + + +def conditioning_get_any_value(conditioning, key, default=None): + for t in conditioning: + if key in t[1]: + return t[1][key] + return default + + +def get_noise_mask(latent): + noise_mask = latent.get("noise_mask", None) + latent_image = latent["samples"] + if noise_mask is None: + batch_size, _, latent_length, _, _ = latent_image.shape + noise_mask = torch.ones( + (batch_size, 1, latent_length, 1, 1), + dtype=torch.float32, + device=latent_image.device, + ) + else: + noise_mask = noise_mask.clone() + return noise_mask + +def get_keyframe_idxs(cond): + keyframe_idxs = conditioning_get_any_value(cond, "keyframe_idxs", None) + if keyframe_idxs is None: + return None, 0 + num_keyframes = torch.unique(keyframe_idxs[:, 0]).shape[0] + return keyframe_idxs, num_keyframes + +class LTXVAddGuide: + @classmethod + def INPUT_TYPES(s): + return {"required": {"positive": ("CONDITIONING", ), + "negative": ("CONDITIONING", ), + "vae": ("VAE",), + "latent": ("LATENT",), + "image": ("IMAGE", {"tooltip": "Image or video to condition the latent video on. Must be 8*n + 1 frames." + "If the video is not 8*n + 1 frames, it will be cropped to the nearest 8*n + 1 frames."}), + "frame_idx": ("INT", {"default": 0, "min": -9999, "max": 9999, + "tooltip": "Frame index to start the conditioning at. For single-frame images or " + "videos with 1-8 frames, any frame_idx value is acceptable. For videos with 9+ " + "frames, frame_idx must be divisible by 8, otherwise it will be rounded down to " + "the nearest multiple of 8. Negative values are counted from the end of the video."}), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}), + } + } + + RETURN_TYPES = ("CONDITIONING", "CONDITIONING", "LATENT") + RETURN_NAMES = ("positive", "negative", "latent") + + CATEGORY = "conditioning/video_models" + FUNCTION = "generate" + + def __init__(self): + self._num_prefix_frames = 2 + self._patchifier = SymmetricPatchifier(1) + + def encode(self, vae, latent_width, latent_height, images, scale_factors): + time_scale_factor, width_scale_factor, height_scale_factor = scale_factors + images = images[:(images.shape[0] - 1) // time_scale_factor * time_scale_factor + 1] + pixels = comfy.utils.common_upscale(images.movedim(-1, 1), latent_width * width_scale_factor, latent_height * height_scale_factor, "bilinear", crop="disabled").movedim(1, -1) + encode_pixels = pixels[:, :, :, :3] + t = vae.encode(encode_pixels) + return encode_pixels, t + + def get_latent_index(self, cond, latent_length, guide_length, frame_idx, scale_factors): + time_scale_factor, _, _ = scale_factors + _, num_keyframes = get_keyframe_idxs(cond) + latent_count = latent_length - num_keyframes + frame_idx = frame_idx if frame_idx >= 0 else max((latent_count - 1) * time_scale_factor + 1 + frame_idx, 0) + if guide_length > 1: + frame_idx = frame_idx // time_scale_factor * time_scale_factor # frame index must be divisible by 8 + + latent_idx = (frame_idx + time_scale_factor - 1) // time_scale_factor + + return frame_idx, latent_idx + + def add_keyframe_index(self, cond, frame_idx, guiding_latent, scale_factors): + keyframe_idxs, _ = get_keyframe_idxs(cond) + _, latent_coords = self._patchifier.patchify(guiding_latent) + pixel_coords = latent_to_pixel_coords(latent_coords, scale_factors, True) + pixel_coords[:, 0] += frame_idx + if keyframe_idxs is None: + keyframe_idxs = pixel_coords + else: + keyframe_idxs = torch.cat([keyframe_idxs, pixel_coords], dim=2) + return node_helpers.conditioning_set_values(cond, {"keyframe_idxs": keyframe_idxs}) + + def append_keyframe(self, positive, negative, frame_idx, latent_image, noise_mask, guiding_latent, strength, scale_factors): + positive = self.add_keyframe_index(positive, frame_idx, guiding_latent, scale_factors) + negative = self.add_keyframe_index(negative, frame_idx, guiding_latent, scale_factors) + + mask = torch.full( + (noise_mask.shape[0], 1, guiding_latent.shape[2], 1, 1), + 1.0 - strength, + dtype=noise_mask.dtype, + device=noise_mask.device, + ) + + latent_image = torch.cat([latent_image, guiding_latent], dim=2) + noise_mask = torch.cat([noise_mask, mask], dim=2) + return positive, negative, latent_image, noise_mask + + def replace_latent_frames(self, latent_image, noise_mask, guiding_latent, latent_idx, strength): + cond_length = guiding_latent.shape[2] + assert latent_image.shape[2] >= latent_idx + cond_length, "Conditioning frames exceed the length of the latent sequence." + + mask = torch.full( + (noise_mask.shape[0], 1, cond_length, 1, 1), + 1.0 - strength, + dtype=noise_mask.dtype, + device=noise_mask.device, + ) + + latent_image = latent_image.clone() + noise_mask = noise_mask.clone() + + latent_image[:, :, latent_idx : latent_idx + cond_length] = guiding_latent + noise_mask[:, :, latent_idx : latent_idx + cond_length] = mask + + return latent_image, noise_mask + + def generate(self, positive, negative, vae, latent, image, frame_idx, strength): + scale_factors = vae.downscale_index_formula + latent_image = latent["samples"] + noise_mask = get_noise_mask(latent) + + _, _, latent_length, latent_height, latent_width = latent_image.shape + image, t = self.encode(vae, latent_width, latent_height, image, scale_factors) + + frame_idx, latent_idx = self.get_latent_index(positive, latent_length, len(image), frame_idx, scale_factors) + assert latent_idx + t.shape[2] <= latent_length, "Conditioning frames exceed the length of the latent sequence." + + num_prefix_frames = min(self._num_prefix_frames, t.shape[2]) + + positive, negative, latent_image, noise_mask = self.append_keyframe( + positive, + negative, + frame_idx, + latent_image, + noise_mask, + t[:, :, :num_prefix_frames], + strength, + scale_factors, + ) + + latent_idx += num_prefix_frames + + t = t[:, :, num_prefix_frames:] + if t.shape[2] == 0: + return (positive, negative, {"samples": latent_image, "noise_mask": noise_mask},) + + latent_image, noise_mask = self.replace_latent_frames( + latent_image, + noise_mask, + t, + latent_idx, + strength, + ) + + return (positive, negative, {"samples": latent_image, "noise_mask": noise_mask},) + + +class LTXVCropGuides: + @classmethod + def INPUT_TYPES(s): + return {"required": {"positive": ("CONDITIONING", ), + "negative": ("CONDITIONING", ), + "latent": ("LATENT",), + } + } + + RETURN_TYPES = ("CONDITIONING", "CONDITIONING", "LATENT") + RETURN_NAMES = ("positive", "negative", "latent") + + CATEGORY = "conditioning/video_models" + FUNCTION = "crop" + + def __init__(self): + self._patchifier = SymmetricPatchifier(1) + + def crop(self, positive, negative, latent): + latent_image = latent["samples"].clone() + noise_mask = get_noise_mask(latent) + + _, num_keyframes = get_keyframe_idxs(positive) + if num_keyframes == 0: + return (positive, negative, {"samples": latent_image, "noise_mask": noise_mask},) + + latent_image = latent_image[:, :, :-num_keyframes] + noise_mask = noise_mask[:, :, :-num_keyframes] + + positive = node_helpers.conditioning_set_values(positive, {"keyframe_idxs": None}) + negative = node_helpers.conditioning_set_values(negative, {"keyframe_idxs": None}) + + return (positive, negative, {"samples": latent_image, "noise_mask": noise_mask},) class LTXVConditioning: @@ -174,6 +381,77 @@ class LTXVScheduler: return (sigmas,) +def encode_single_frame(output_file, image_array: np.ndarray, crf): + container = av.open(output_file, "w", format="mp4") + try: + stream = container.add_stream( + "h264", rate=1, options={"crf": str(crf), "preset": "veryfast"} + ) + stream.height = image_array.shape[0] + stream.width = image_array.shape[1] + av_frame = av.VideoFrame.from_ndarray(image_array, format="rgb24").reformat( + format="yuv420p" + ) + container.mux(stream.encode(av_frame)) + container.mux(stream.encode()) + finally: + container.close() + + +def decode_single_frame(video_file): + container = av.open(video_file) + try: + stream = next(s for s in container.streams if s.type == "video") + frame = next(container.decode(stream)) + finally: + container.close() + return frame.to_ndarray(format="rgb24") + + +def preprocess(image: torch.Tensor, crf=29): + if crf == 0: + return image + + image_array = (image[:(image.shape[0] // 2) * 2, :(image.shape[1] // 2) * 2] * 255.0).byte().cpu().numpy() + with io.BytesIO() as output_file: + encode_single_frame(output_file, image_array, crf) + video_bytes = output_file.getvalue() + with io.BytesIO(video_bytes) as video_file: + image_array = decode_single_frame(video_file) + tensor = torch.tensor(image_array, dtype=image.dtype, device=image.device) / 255.0 + return tensor + + +class LTXVPreprocess: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("IMAGE",), + "img_compression": ( + "INT", + { + "default": 35, + "min": 0, + "max": 100, + "tooltip": "Amount of compression to apply on image.", + }, + ), + } + } + + FUNCTION = "preprocess" + RETURN_TYPES = ("IMAGE",) + RETURN_NAMES = ("output_image",) + CATEGORY = "image" + + def preprocess(self, image, img_compression): + if img_compression > 0: + output_images = [] + for i in range(image.shape[0]): + output_images.append(preprocess(image[i], img_compression)) + return (torch.stack(output_images),) + NODE_CLASS_MAPPINGS = { "EmptyLTXVLatentVideo": EmptyLTXVLatentVideo, @@ -181,4 +459,7 @@ NODE_CLASS_MAPPINGS = { "ModelSamplingLTXV": ModelSamplingLTXV, "LTXVConditioning": LTXVConditioning, "LTXVScheduler": LTXVScheduler, + "LTXVAddGuide": LTXVAddGuide, + "LTXVPreprocess": LTXVPreprocess, + "LTXVCropGuides": LTXVCropGuides, } diff --git a/comfy_extras/nodes_lumina2.py b/comfy_extras/nodes_lumina2.py new file mode 100644 index 000000000..275189785 --- /dev/null +++ b/comfy_extras/nodes_lumina2.py @@ -0,0 +1,104 @@ +from comfy.comfy_types import IO, ComfyNodeABC, InputTypeDict +import torch + + +class RenormCFG: + @classmethod + def INPUT_TYPES(s): + return {"required": { "model": ("MODEL",), + "cfg_trunc": ("FLOAT", {"default": 100, "min": 0.0, "max": 100.0, "step": 0.01}), + "renorm_cfg": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 100.0, "step": 0.01}), + }} + RETURN_TYPES = ("MODEL",) + FUNCTION = "patch" + + CATEGORY = "advanced/model" + + def patch(self, model, cfg_trunc, renorm_cfg): + def renorm_cfg_func(args): + cond_denoised = args["cond_denoised"] + uncond_denoised = args["uncond_denoised"] + cond_scale = args["cond_scale"] + timestep = args["timestep"] + x_orig = args["input"] + in_channels = model.model.diffusion_model.in_channels + + if timestep[0] < cfg_trunc: + cond_eps, uncond_eps = cond_denoised[:, :in_channels], uncond_denoised[:, :in_channels] + cond_rest, _ = cond_denoised[:, in_channels:], uncond_denoised[:, in_channels:] + half_eps = uncond_eps + cond_scale * (cond_eps - uncond_eps) + half_rest = cond_rest + + if float(renorm_cfg) > 0.0: + ori_pos_norm = torch.linalg.vector_norm(cond_eps + , dim=tuple(range(1, len(cond_eps.shape))), keepdim=True + ) + max_new_norm = ori_pos_norm * float(renorm_cfg) + new_pos_norm = torch.linalg.vector_norm( + half_eps, dim=tuple(range(1, len(half_eps.shape))), keepdim=True + ) + if new_pos_norm >= max_new_norm: + half_eps = half_eps * (max_new_norm / new_pos_norm) + else: + cond_eps, uncond_eps = cond_denoised[:, :in_channels], uncond_denoised[:, :in_channels] + cond_rest, _ = cond_denoised[:, in_channels:], uncond_denoised[:, in_channels:] + half_eps = cond_eps + half_rest = cond_rest + + cfg_result = torch.cat([half_eps, half_rest], dim=1) + + # cfg_result = uncond_denoised + (cond_denoised - uncond_denoised) * cond_scale + + return x_orig - cfg_result + + m = model.clone() + m.set_model_sampler_cfg_function(renorm_cfg_func) + return (m, ) + + +class CLIPTextEncodeLumina2(ComfyNodeABC): + SYSTEM_PROMPT = { + "superior": "You are an assistant designed to generate superior images with the superior "\ + "degree of image-text alignment based on textual prompts or user prompts.", + "alignment": "You are an assistant designed to generate high-quality images with the "\ + "highest degree of image-text alignment based on textual prompts." + } + SYSTEM_PROMPT_TIP = "Lumina2 provide two types of system prompts:" \ + "Superior: You are an assistant designed to generate superior images with the superior "\ + "degree of image-text alignment based on textual prompts or user prompts. "\ + "Alignment: You are an assistant designed to generate high-quality images with the highest "\ + "degree of image-text alignment based on textual prompts." + @classmethod + def INPUT_TYPES(s) -> InputTypeDict: + return { + "required": { + "system_prompt": (list(CLIPTextEncodeLumina2.SYSTEM_PROMPT.keys()), {"tooltip": CLIPTextEncodeLumina2.SYSTEM_PROMPT_TIP}), + "user_prompt": (IO.STRING, {"multiline": True, "dynamicPrompts": True, "tooltip": "The text to be encoded."}), + "clip": (IO.CLIP, {"tooltip": "The CLIP model used for encoding the text."}) + } + } + RETURN_TYPES = (IO.CONDITIONING,) + OUTPUT_TOOLTIPS = ("A conditioning containing the embedded text used to guide the diffusion model.",) + FUNCTION = "encode" + + CATEGORY = "conditioning" + DESCRIPTION = "Encodes a system prompt and a user prompt using a CLIP model into an embedding that can be used to guide the diffusion model towards generating specific images." + + def encode(self, clip, user_prompt, system_prompt): + if clip is None: + raise RuntimeError("ERROR: clip input is invalid: None\n\nIf the clip is from a checkpoint loader node your checkpoint does not contain a valid clip or text encoder model.") + system_prompt = CLIPTextEncodeLumina2.SYSTEM_PROMPT[system_prompt] + prompt = f'{system_prompt} {user_prompt}' + tokens = clip.tokenize(prompt) + return (clip.encode_from_tokens_scheduled(tokens), ) + + +NODE_CLASS_MAPPINGS = { + "CLIPTextEncodeLumina2": CLIPTextEncodeLumina2, + "RenormCFG": RenormCFG +} + + +NODE_DISPLAY_NAME_MAPPINGS = { + "CLIPTextEncodeLumina2": "CLIP Text Encode for Lumina2", +} diff --git a/comfy_extras/nodes_model_advanced.py b/comfy_extras/nodes_model_advanced.py index 33f3face1..ceac5654b 100644 --- a/comfy_extras/nodes_model_advanced.py +++ b/comfy_extras/nodes_model_advanced.py @@ -3,6 +3,8 @@ import comfy.model_sampling import comfy.latent_formats import nodes import torch +import node_helpers + class LCM(comfy.model_sampling.EPS): def calculate_denoised(self, sigma, model_output, model_input): @@ -294,6 +296,24 @@ class RescaleCFG: m.set_model_sampler_cfg_function(rescale_cfg) return (m, ) +class ModelComputeDtype: + @classmethod + def INPUT_TYPES(s): + return {"required": { "model": ("MODEL",), + "dtype": (["default", "fp32", "fp16", "bf16"],), + }} + + RETURN_TYPES = ("MODEL",) + FUNCTION = "patch" + + CATEGORY = "advanced/debug/model" + + def patch(self, model, dtype): + m = model.clone() + m.set_model_compute_dtype(node_helpers.string_to_torch_dtype(dtype)) + return (m, ) + + NODE_CLASS_MAPPINGS = { "ModelSamplingDiscrete": ModelSamplingDiscrete, "ModelSamplingContinuousEDM": ModelSamplingContinuousEDM, @@ -303,4 +323,5 @@ NODE_CLASS_MAPPINGS = { "ModelSamplingAuraFlow": ModelSamplingAuraFlow, "ModelSamplingFlux": ModelSamplingFlux, "RescaleCFG": RescaleCFG, + "ModelComputeDtype": ModelComputeDtype, } diff --git a/comfy_extras/nodes_model_merging_model_specific.py b/comfy_extras/nodes_model_merging_model_specific.py index 7cd8f98b2..3e37f70d4 100644 --- a/comfy_extras/nodes_model_merging_model_specific.py +++ b/comfy_extras/nodes_model_merging_model_specific.py @@ -196,6 +196,54 @@ class ModelMergeLTXV(comfy_extras.nodes_model_merging.ModelMergeBlocks): return {"required": arg_dict} +class ModelMergeCosmos7B(comfy_extras.nodes_model_merging.ModelMergeBlocks): + CATEGORY = "advanced/model_merging/model_specific" + + @classmethod + def INPUT_TYPES(s): + arg_dict = { "model1": ("MODEL",), + "model2": ("MODEL",)} + + argument = ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}) + + arg_dict["pos_embedder."] = argument + arg_dict["extra_pos_embedder."] = argument + arg_dict["x_embedder."] = argument + arg_dict["t_embedder."] = argument + arg_dict["affline_norm."] = argument + + + for i in range(28): + arg_dict["blocks.block{}.".format(i)] = argument + + arg_dict["final_layer."] = argument + + return {"required": arg_dict} + +class ModelMergeCosmos14B(comfy_extras.nodes_model_merging.ModelMergeBlocks): + CATEGORY = "advanced/model_merging/model_specific" + + @classmethod + def INPUT_TYPES(s): + arg_dict = { "model1": ("MODEL",), + "model2": ("MODEL",)} + + argument = ("FLOAT", {"default": 1.0, "min": 0.0, "max": 1.0, "step": 0.01}) + + arg_dict["pos_embedder."] = argument + arg_dict["extra_pos_embedder."] = argument + arg_dict["x_embedder."] = argument + arg_dict["t_embedder."] = argument + arg_dict["affline_norm."] = argument + + + for i in range(36): + arg_dict["blocks.block{}.".format(i)] = argument + + arg_dict["final_layer."] = argument + + return {"required": arg_dict} + NODE_CLASS_MAPPINGS = { "ModelMergeSD1": ModelMergeSD1, "ModelMergeSD2": ModelMergeSD1, #SD1 and SD2 have the same blocks @@ -206,4 +254,6 @@ NODE_CLASS_MAPPINGS = { "ModelMergeSD35_Large": ModelMergeSD35_Large, "ModelMergeMochiPreview": ModelMergeMochiPreview, "ModelMergeLTXV": ModelMergeLTXV, + "ModelMergeCosmos7B": ModelMergeCosmos7B, + "ModelMergeCosmos14B": ModelMergeCosmos14B, } diff --git a/comfy_extras/nodes_video.py b/comfy_extras/nodes_video.py new file mode 100644 index 000000000..97ca513d8 --- /dev/null +++ b/comfy_extras/nodes_video.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +import os +import av +import torch +import folder_paths +import json +from fractions import Fraction +from comfy.comfy_types import FileLocator + + +class SaveWEBM: + def __init__(self): + self.output_dir = folder_paths.get_output_directory() + self.type = "output" + self.prefix_append = "" + + @classmethod + def INPUT_TYPES(s): + return {"required": + {"images": ("IMAGE", ), + "filename_prefix": ("STRING", {"default": "ComfyUI"}), + "codec": (["vp9", "av1"],), + "fps": ("FLOAT", {"default": 24.0, "min": 0.01, "max": 1000.0, "step": 0.01}), + "crf": ("FLOAT", {"default": 32.0, "min": 0, "max": 63.0, "step": 1, "tooltip": "Higher crf means lower quality with a smaller file size, lower crf means higher quality higher filesize."}), + }, + "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"}, + } + + RETURN_TYPES = () + FUNCTION = "save_images" + + OUTPUT_NODE = True + + CATEGORY = "image/video" + + EXPERIMENTAL = True + + def save_images(self, images, codec, fps, filename_prefix, crf, prompt=None, extra_pnginfo=None): + filename_prefix += self.prefix_append + full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0]) + + file = f"{filename}_{counter:05}_.webm" + container = av.open(os.path.join(full_output_folder, file), mode="w") + + if prompt is not None: + container.metadata["prompt"] = json.dumps(prompt) + + if extra_pnginfo is not None: + for x in extra_pnginfo: + container.metadata[x] = json.dumps(extra_pnginfo[x]) + + codec_map = {"vp9": "libvpx-vp9", "av1": "libaom-av1"} + stream = container.add_stream(codec_map[codec], rate=Fraction(round(fps * 1000), 1000)) + stream.width = images.shape[-2] + stream.height = images.shape[-3] + stream.pix_fmt = "yuv420p" + stream.bit_rate = 0 + stream.options = {'crf': str(crf)} + + for frame in images: + frame = av.VideoFrame.from_ndarray(torch.clamp(frame[..., :3] * 255, min=0, max=255).to(device=torch.device("cpu"), dtype=torch.uint8).numpy(), format="rgb24") + for packet in stream.encode(frame): + container.mux(packet) + container.mux(stream.encode()) + container.close() + + results: list[FileLocator] = [{ + "filename": file, + "subfolder": subfolder, + "type": self.type + }] + + return {"ui": {"images": results, "animated": (True,)}} # TODO: frontend side + + +NODE_CLASS_MAPPINGS = { + "SaveWEBM": SaveWEBM, +} diff --git a/comfy_extras/nodes_video_model.py b/comfy_extras/nodes_video_model.py index e7a7ec181..0f760aa26 100644 --- a/comfy_extras/nodes_video_model.py +++ b/comfy_extras/nodes_video_model.py @@ -4,6 +4,7 @@ import comfy.utils import comfy.sd import folder_paths import comfy_extras.nodes_model_merging +import node_helpers class ImageOnlyCheckpointLoader: @@ -121,12 +122,38 @@ class ImageOnlyCheckpointSave(comfy_extras.nodes_model_merging.CheckpointSave): comfy_extras.nodes_model_merging.save_checkpoint(model, clip_vision=clip_vision, vae=vae, filename_prefix=filename_prefix, output_dir=self.output_dir, prompt=prompt, extra_pnginfo=extra_pnginfo) return {} + +class ConditioningSetAreaPercentageVideo: + @classmethod + def INPUT_TYPES(s): + return {"required": {"conditioning": ("CONDITIONING", ), + "width": ("FLOAT", {"default": 1.0, "min": 0, "max": 1.0, "step": 0.01}), + "height": ("FLOAT", {"default": 1.0, "min": 0, "max": 1.0, "step": 0.01}), + "temporal": ("FLOAT", {"default": 1.0, "min": 0, "max": 1.0, "step": 0.01}), + "x": ("FLOAT", {"default": 0, "min": 0, "max": 1.0, "step": 0.01}), + "y": ("FLOAT", {"default": 0, "min": 0, "max": 1.0, "step": 0.01}), + "z": ("FLOAT", {"default": 0, "min": 0, "max": 1.0, "step": 0.01}), + "strength": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), + }} + RETURN_TYPES = ("CONDITIONING",) + FUNCTION = "append" + + CATEGORY = "conditioning" + + def append(self, conditioning, width, height, temporal, x, y, z, strength): + c = node_helpers.conditioning_set_values(conditioning, {"area": ("percentage", temporal, height, width, z, y, x), + "strength": strength, + "set_area_to_bounds": False}) + return (c, ) + + NODE_CLASS_MAPPINGS = { "ImageOnlyCheckpointLoader": ImageOnlyCheckpointLoader, "SVD_img2vid_Conditioning": SVD_img2vid_Conditioning, "VideoLinearCFGGuidance": VideoLinearCFGGuidance, "VideoTriangleCFGGuidance": VideoTriangleCFGGuidance, "ImageOnlyCheckpointSave": ImageOnlyCheckpointSave, + "ConditioningSetAreaPercentageVideo": ConditioningSetAreaPercentageVideo, } NODE_DISPLAY_NAME_MAPPINGS = { diff --git a/comfy_extras/nodes_wan.py b/comfy_extras/nodes_wan.py new file mode 100644 index 000000000..dc30eb546 --- /dev/null +++ b/comfy_extras/nodes_wan.py @@ -0,0 +1,54 @@ +import nodes +import node_helpers +import torch +import comfy.model_management +import comfy.utils + + +class WanImageToVideo: + @classmethod + def INPUT_TYPES(s): + return {"required": {"positive": ("CONDITIONING", ), + "negative": ("CONDITIONING", ), + "vae": ("VAE", ), + "width": ("INT", {"default": 832, "min": 16, "max": nodes.MAX_RESOLUTION, "step": 16}), + "height": ("INT", {"default": 480, "min": 16, "max": nodes.MAX_RESOLUTION, "step": 16}), + "length": ("INT", {"default": 81, "min": 1, "max": nodes.MAX_RESOLUTION, "step": 4}), + "batch_size": ("INT", {"default": 1, "min": 1, "max": 4096}), + }, + "optional": {"clip_vision_output": ("CLIP_VISION_OUTPUT", ), + "start_image": ("IMAGE", ), + }} + + RETURN_TYPES = ("CONDITIONING", "CONDITIONING", "LATENT") + RETURN_NAMES = ("positive", "negative", "latent") + FUNCTION = "encode" + + CATEGORY = "conditioning/video_models" + + def encode(self, positive, negative, vae, width, height, length, batch_size, start_image=None, clip_vision_output=None): + latent = torch.zeros([batch_size, 16, ((length - 1) // 4) + 1, height // 8, width // 8], device=comfy.model_management.intermediate_device()) + if start_image is not None: + start_image = comfy.utils.common_upscale(start_image[:length].movedim(-1, 1), width, height, "bilinear", "center").movedim(1, -1) + image = torch.ones((length, height, width, start_image.shape[-1]), device=start_image.device, dtype=start_image.dtype) * 0.5 + image[:start_image.shape[0]] = start_image + + concat_latent_image = vae.encode(image[:, :, :, :3]) + mask = torch.ones((1, 1, latent.shape[2], concat_latent_image.shape[-2], concat_latent_image.shape[-1]), device=start_image.device, dtype=start_image.dtype) + mask[:, :, :((start_image.shape[0] - 1) // 4) + 1] = 0.0 + + positive = node_helpers.conditioning_set_values(positive, {"concat_latent_image": concat_latent_image, "concat_mask": mask}) + negative = node_helpers.conditioning_set_values(negative, {"concat_latent_image": concat_latent_image, "concat_mask": mask}) + + if clip_vision_output is not None: + positive = node_helpers.conditioning_set_values(positive, {"clip_vision_output": clip_vision_output}) + negative = node_helpers.conditioning_set_values(negative, {"clip_vision_output": clip_vision_output}) + + out_latent = {} + out_latent["samples"] = latent + return (positive, negative, out_latent) + + +NODE_CLASS_MAPPINGS = { + "WanImageToVideo": WanImageToVideo, +} diff --git a/comfyui_version.py b/comfyui_version.py index 411243f6c..b5e6fbead 100644 --- a/comfyui_version.py +++ b/comfyui_version.py @@ -1,3 +1,3 @@ # This file is automatically generated by the build process when version is # updated in pyproject.toml. -__version__ = "0.3.12" +__version__ = "0.3.26" diff --git a/execution.py b/execution.py index 2c979205b..fcb4f6f40 100644 --- a/execution.py +++ b/execution.py @@ -634,6 +634,13 @@ def validate_inputs(prompt, item, validated): continue else: try: + # Unwraps values wrapped in __value__ key. This is used to pass + # list widget value to execution, as by default list value is + # reserved to represent the connection between nodes. + if isinstance(val, dict) and "__value__" in val: + val = val["__value__"] + inputs[x] = val + if type_input == "INT": val = int(val) inputs[x] = val diff --git a/folder_paths.py b/folder_paths.py index 3542d2edf..72c70f594 100644 --- a/folder_paths.py +++ b/folder_paths.py @@ -7,11 +7,18 @@ import logging from typing import Literal from collections.abc import Collection -supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.bin', '.pth', '.safetensors', '.pkl', '.sft'} +from comfy.cli_args import args + +supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.pt2', '.bin', '.pth', '.safetensors', '.pkl', '.sft'} folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {} -base_path = os.path.dirname(os.path.realpath(__file__)) +# --base-directory - Resets all default paths configured in folder_paths with a new base path +if args.base_directory: + base_path = os.path.abspath(args.base_directory) +else: + base_path = os.path.dirname(os.path.realpath(__file__)) + models_dir = os.path.join(base_path, "models") folder_names_and_paths["checkpoints"] = ([os.path.join(models_dir, "checkpoints")], supported_pt_extensions) folder_names_and_paths["configs"] = ([os.path.join(models_dir, "configs")], [".yaml"]) @@ -39,10 +46,10 @@ folder_names_and_paths["photomaker"] = ([os.path.join(models_dir, "photomaker")] folder_names_and_paths["classifiers"] = ([os.path.join(models_dir, "classifiers")], {""}) -output_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "output") -temp_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "temp") -input_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "input") -user_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "user") +output_directory = os.path.join(base_path, "output") +temp_directory = os.path.join(base_path, "temp") +input_directory = os.path.join(base_path, "input") +user_directory = os.path.join(base_path, "user") filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {} diff --git a/latent_preview.py b/latent_preview.py index 07f9cc68e..95d3cb733 100644 --- a/latent_preview.py +++ b/latent_preview.py @@ -12,7 +12,10 @@ MAX_PREVIEW_RESOLUTION = args.preview_size def preview_to_image(latent_image): latents_ubyte = (((latent_image + 1.0) / 2.0).clamp(0, 1) # change scale from -1..1 to 0..1 .mul(0xFF) # to 0..255 - ).to(device="cpu", dtype=torch.uint8, non_blocking=comfy.model_management.device_supports_non_blocking(latent_image.device)) + ) + if comfy.model_management.directml_enabled: + latents_ubyte = latents_ubyte.to(dtype=torch.uint8) + latents_ubyte = latents_ubyte.to(device="cpu", dtype=torch.uint8, non_blocking=comfy.model_management.device_supports_non_blocking(latent_image.device)) return Image.fromarray(latents_ubyte.numpy()) diff --git a/main.py b/main.py index c5c9f4e09..1b100fa8a 100644 --- a/main.py +++ b/main.py @@ -138,6 +138,9 @@ import server from server import BinaryEventTypes import nodes import comfy.model_management +import comfyui_version +import app.logger + def cuda_malloc_warning(): device = comfy.model_management.get_torch_device() @@ -292,9 +295,13 @@ def start_comfyui(asyncio_loop=None): if __name__ == "__main__": # Running directly, just start ComfyUI. + logging.info("ComfyUI version: {}".format(comfyui_version.__version__)) + event_loop, _, start_all_func = start_comfyui() try: - event_loop.run_until_complete(start_all_func()) + x = start_all_func() + app.logger.print_startup_warnings() + event_loop.run_until_complete(x) except KeyboardInterrupt: logging.info("\nStopped server") diff --git a/node_helpers.py b/node_helpers.py index 4b38bfff8..48da3b099 100644 --- a/node_helpers.py +++ b/node_helpers.py @@ -1,4 +1,5 @@ import hashlib +import torch from comfy.cli_args import args @@ -35,3 +36,11 @@ def hasher(): "sha512": hashlib.sha512 } return hashfuncs[args.default_hashing_function] + +def string_to_torch_dtype(string): + if string == "fp32": + return torch.float32 + if string == "fp16": + return torch.float16 + if string == "bf16": + return torch.bfloat16 diff --git a/nodes.py b/nodes.py index cfd7dd8a4..71d1b8dd7 100644 --- a/nodes.py +++ b/nodes.py @@ -25,7 +25,7 @@ import comfy.sample import comfy.sd import comfy.utils import comfy.controlnet -from comfy.comfy_types import IO, ComfyNodeABC, InputTypeDict +from comfy.comfy_types import IO, ComfyNodeABC, InputTypeDict, FileLocator import comfy.clip_vision @@ -63,6 +63,8 @@ class CLIPTextEncode(ComfyNodeABC): DESCRIPTION = "Encodes a text prompt using a CLIP model into an embedding that can be used to guide the diffusion model towards generating specific images." def encode(self, clip, text): + if clip is None: + raise RuntimeError("ERROR: clip input is invalid: None\n\nIf the clip is from a checkpoint loader node your checkpoint does not contain a valid clip or text encoder model.") tokens = clip.tokenize(text) return (clip.encode_from_tokens_scheduled(tokens), ) @@ -477,7 +479,7 @@ class SaveLatent: file = f"{filename}_{counter:05}_.latent" - results = list() + results: list[FileLocator] = [] results.append({ "filename": file, "subfolder": subfolder, @@ -487,7 +489,7 @@ class SaveLatent: file = os.path.join(full_output_folder, file) output = {} - output["latent_tensor"] = samples["samples"] + output["latent_tensor"] = samples["samples"].contiguous() output["latent_format_version_0"] = torch.tensor([]) comfy.utils.save_torch_file(output, file, metadata=metadata) @@ -768,6 +770,7 @@ class VAELoader: vae_path = folder_paths.get_full_path_or_raise("vae", vae_name) sd = comfy.utils.load_torch_file(vae_path) vae = comfy.sd.VAE(sd=sd) + vae.throw_exception_if_invalid() return (vae,) class ControlNetLoader: @@ -912,7 +915,7 @@ class CLIPLoader: @classmethod def INPUT_TYPES(s): return {"required": { "clip_name": (folder_paths.get_filename_list("text_encoders"), ), - "type": (["stable_diffusion", "stable_cascade", "sd3", "stable_audio", "mochi", "ltxv", "pixart", "cosmos"], ), + "type": (["stable_diffusion", "stable_cascade", "sd3", "stable_audio", "mochi", "ltxv", "pixart", "cosmos", "lumina2", "wan"], ), }, "optional": { "device": (["default", "cpu"], {"advanced": True}), @@ -922,7 +925,7 @@ class CLIPLoader: CATEGORY = "advanced/loaders" - DESCRIPTION = "[Recipes]\n\nstable_diffusion: clip-l\nstable_cascade: clip-g\nsd3: t5 / clip-g / clip-l\nstable_audio: t5\nmochi: t5\ncosmos: old t5 xxl" + DESCRIPTION = "[Recipes]\n\nstable_diffusion: clip-l\nstable_cascade: clip-g\nsd3: t5 xxl/ clip-g / clip-l\nstable_audio: t5 base\nmochi: t5 xxl\ncosmos: old t5 xxl\nlumina2: gemma 2 2B\nwan: umt5 xxl" def load_clip(self, clip_name, type="stable_diffusion", device="default"): if type == "stable_cascade": @@ -937,6 +940,12 @@ class CLIPLoader: clip_type = comfy.sd.CLIPType.LTXV elif type == "pixart": clip_type = comfy.sd.CLIPType.PIXART + elif type == "cosmos": + clip_type = comfy.sd.CLIPType.COSMOS + elif type == "lumina2": + clip_type = comfy.sd.CLIPType.LUMINA2 + elif type == "wan": + clip_type = comfy.sd.CLIPType.WAN else: clip_type = comfy.sd.CLIPType.STABLE_DIFFUSION @@ -1058,10 +1067,11 @@ class StyleModelApply: for t in conditioning: (txt, keys) = t keys = keys.copy() - if strength_type == "attn_bias" and strength != 1.0: + # even if the strength is 1.0 (i.e, no change), if there's already a mask, we have to add to it + if "attention_mask" in keys or (strength_type == "attn_bias" and strength != 1.0): # math.log raises an error if the argument is zero # torch.log returns -inf, which is what we want - attn_bias = torch.log(torch.Tensor([strength])) + attn_bias = torch.log(torch.Tensor([strength if strength_type == "attn_bias" else 1.0])) # get the size of the mask image mask_ref_size = keys.get("attention_mask_img_shape", (1, 1)) n_ref = mask_ref_size[0] * mask_ref_size[1] @@ -1510,7 +1520,7 @@ class KSampler: return { "required": { "model": ("MODEL", {"tooltip": "The model used for denoising the input latent."}), - "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "tooltip": "The random seed used for creating the noise."}), + "seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True, "tooltip": "The random seed used for creating the noise."}), "steps": ("INT", {"default": 20, "min": 1, "max": 10000, "tooltip": "The number of steps used in the denoising process."}), "cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01, "tooltip": "The Classifier-Free Guidance scale balances creativity and adherence to the prompt. Higher values result in images more closely matching the prompt however too high values will negatively impact quality."}), "sampler_name": (comfy.samplers.KSampler.SAMPLERS, {"tooltip": "The algorithm used when sampling, this can affect the quality, speed, and style of the generated output."}), @@ -1538,7 +1548,7 @@ class KSamplerAdvanced: return {"required": {"model": ("MODEL",), "add_noise": (["enable", "disable"], ), - "noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}), + "noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True}), "steps": ("INT", {"default": 20, "min": 1, "max": 10000}), "cfg": ("FLOAT", {"default": 8.0, "min": 0.0, "max": 100.0, "step":0.1, "round": 0.01}), "sampler_name": (comfy.samplers.KSampler.SAMPLERS, ), @@ -1756,6 +1766,29 @@ class LoadImageMask: return True + +class LoadImageOutput(LoadImage): + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "image": ("COMBO", { + "image_upload": True, + "image_folder": "output", + "remote": { + "route": "/internal/files/output", + "refresh_button": True, + "control_after_refresh": "first", + }, + }), + } + } + + DESCRIPTION = "Load an image from the output folder. When the refresh button is clicked, the node will update the image list and automatically select the first image, allowing for easy iteration." + EXPERIMENTAL = True + FUNCTION = "load_image" + + class ImageScale: upscale_methods = ["nearest-exact", "bilinear", "area", "bicubic", "lanczos"] crop_methods = ["disabled", "center"] @@ -1942,6 +1975,7 @@ NODE_CLASS_MAPPINGS = { "PreviewImage": PreviewImage, "LoadImage": LoadImage, "LoadImageMask": LoadImageMask, + "LoadImageOutput": LoadImageOutput, "ImageScale": ImageScale, "ImageScaleBy": ImageScaleBy, "ImageInvert": ImageInvert, @@ -2042,6 +2076,7 @@ NODE_DISPLAY_NAME_MAPPINGS = { "PreviewImage": "Preview Image", "LoadImage": "Load Image", "LoadImageMask": "Load Image (as Mask)", + "LoadImageOutput": "Load Image (from Outputs)", "ImageScale": "Upscale Image", "ImageScaleBy": "Upscale Image By", "ImageUpscaleWithModel": "Upscale Image (using Model)", @@ -2226,6 +2261,9 @@ def init_builtin_extra_nodes(): "nodes_hooks.py", "nodes_load_3d.py", "nodes_cosmos.py", + "nodes_video.py", + "nodes_lumina2.py", + "nodes_wan.py", ] import_failed = [] diff --git a/pyproject.toml b/pyproject.toml index 0198d1b08..f13fed8dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ComfyUI" -version = "0.3.12" +version = "0.3.26" readme = "README.md" license = { file = "LICENSE" } requires-python = ">=3.9" diff --git a/requirements.txt b/requirements.txt index 3bc945a1b..70689bc99 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +comfyui-frontend-package==1.12.14 torch torchsde torchvision @@ -8,7 +9,8 @@ transformers>=4.28.1 tokenizers>=0.13.3 sentencepiece safetensors>=0.4.2 -aiohttp +aiohttp>=3.11.8 +yarl>=1.18.0 pyyaml Pillow scipy @@ -19,3 +21,4 @@ psutil kornia>=0.7.1 spandrel soundfile +av diff --git a/server.py b/server.py index 88c163fc7..76a99167d 100644 --- a/server.py +++ b/server.py @@ -52,6 +52,20 @@ async def cache_control(request: web.Request, handler): response.headers.setdefault('Cache-Control', 'no-cache') return response + +@web.middleware +async def compress_body(request: web.Request, handler): + accept_encoding = request.headers.get("Accept-Encoding", "") + response: web.Response = await handler(request) + if not isinstance(response, web.Response): + return response + if response.content_type not in ["application/json", "text/plain"]: + return response + if response.body and "gzip" in accept_encoding: + response.enable_compression() + return response + + def create_cors_middleware(allowed_origin: str): @web.middleware async def cors_middleware(request: web.Request, handler): @@ -136,7 +150,8 @@ class PromptServer(): PromptServer.instance = self mimetypes.init() - mimetypes.types_map['.js'] = 'application/javascript; charset=utf-8' + mimetypes.add_type('application/javascript; charset=utf-8', '.js') + mimetypes.add_type('image/webp', '.webp') self.user_manager = UserManager() self.model_file_manager = ModelFileManager() @@ -150,6 +165,9 @@ class PromptServer(): self.number = 0 middlewares = [cache_control] + if args.enable_compress_response_body: + middlewares.append(compress_body) + if args.enable_cors_header: middlewares.append(create_cors_middleware(args.enable_cors_header)) else: diff --git a/tests-unit/app_test/custom_node_manager_test.py b/tests-unit/app_test/custom_node_manager_test.py index 89598de84..b61e25e54 100644 --- a/tests-unit/app_test/custom_node_manager_test.py +++ b/tests-unit/app_test/custom_node_manager_test.py @@ -2,39 +2,146 @@ import pytest from aiohttp import web from unittest.mock import patch from app.custom_node_manager import CustomNodeManager +import json pytestmark = ( pytest.mark.asyncio ) # This applies the asyncio mark to all test functions in the module + @pytest.fixture def custom_node_manager(): return CustomNodeManager() + @pytest.fixture def app(custom_node_manager): app = web.Application() routes = web.RouteTableDef() - custom_node_manager.add_routes(routes, app, [("ComfyUI-TestExtension1", "ComfyUI-TestExtension1")]) + custom_node_manager.add_routes( + routes, app, [("ComfyUI-TestExtension1", "ComfyUI-TestExtension1")] + ) app.add_routes(routes) return app + async def test_get_workflow_templates(aiohttp_client, app, tmp_path): client = await aiohttp_client(app) # Setup temporary custom nodes file structure with 1 workflow file custom_nodes_dir = tmp_path / "custom_nodes" - example_workflows_dir = custom_nodes_dir / "ComfyUI-TestExtension1" / "example_workflows" + example_workflows_dir = ( + custom_nodes_dir / "ComfyUI-TestExtension1" / "example_workflows" + ) example_workflows_dir.mkdir(parents=True) template_file = example_workflows_dir / "workflow1.json" - template_file.write_text('') + template_file.write_text("") - with patch('folder_paths.folder_names_and_paths', { - 'custom_nodes': ([str(custom_nodes_dir)], None) - }): - response = await client.get('/workflow_templates') + with patch( + "folder_paths.folder_names_and_paths", + {"custom_nodes": ([str(custom_nodes_dir)], None)}, + ): + response = await client.get("/workflow_templates") assert response.status == 200 workflows_dict = await response.json() assert isinstance(workflows_dict, dict) assert "ComfyUI-TestExtension1" in workflows_dict assert isinstance(workflows_dict["ComfyUI-TestExtension1"], list) assert workflows_dict["ComfyUI-TestExtension1"][0] == "workflow1" + + +async def test_build_translations_empty_when_no_locales(custom_node_manager, tmp_path): + custom_nodes_dir = tmp_path / "custom_nodes" + custom_nodes_dir.mkdir(parents=True) + + with patch("folder_paths.get_folder_paths", return_value=[str(custom_nodes_dir)]): + translations = custom_node_manager.build_translations() + assert translations == {} + + +async def test_build_translations_loads_all_files(custom_node_manager, tmp_path): + # Setup test directory structure + custom_nodes_dir = tmp_path / "custom_nodes" / "test-extension" + locales_dir = custom_nodes_dir / "locales" / "en" + locales_dir.mkdir(parents=True) + + # Create test translation files + main_content = {"title": "Test Extension"} + (locales_dir / "main.json").write_text(json.dumps(main_content)) + + node_defs = {"node1": "Node 1"} + (locales_dir / "nodeDefs.json").write_text(json.dumps(node_defs)) + + commands = {"cmd1": "Command 1"} + (locales_dir / "commands.json").write_text(json.dumps(commands)) + + settings = {"setting1": "Setting 1"} + (locales_dir / "settings.json").write_text(json.dumps(settings)) + + with patch( + "folder_paths.get_folder_paths", return_value=[tmp_path / "custom_nodes"] + ): + translations = custom_node_manager.build_translations() + + assert translations == { + "en": { + "title": "Test Extension", + "nodeDefs": {"node1": "Node 1"}, + "commands": {"cmd1": "Command 1"}, + "settings": {"setting1": "Setting 1"}, + } + } + + +async def test_build_translations_handles_invalid_json(custom_node_manager, tmp_path): + # Setup test directory structure + custom_nodes_dir = tmp_path / "custom_nodes" / "test-extension" + locales_dir = custom_nodes_dir / "locales" / "en" + locales_dir.mkdir(parents=True) + + # Create valid main.json + main_content = {"title": "Test Extension"} + (locales_dir / "main.json").write_text(json.dumps(main_content)) + + # Create invalid JSON file + (locales_dir / "nodeDefs.json").write_text("invalid json{") + + with patch( + "folder_paths.get_folder_paths", return_value=[tmp_path / "custom_nodes"] + ): + translations = custom_node_manager.build_translations() + + assert translations == { + "en": { + "title": "Test Extension", + } + } + + +async def test_build_translations_merges_multiple_extensions( + custom_node_manager, tmp_path +): + # Setup test directory structure for two extensions + custom_nodes_dir = tmp_path / "custom_nodes" + ext1_dir = custom_nodes_dir / "extension1" / "locales" / "en" + ext2_dir = custom_nodes_dir / "extension2" / "locales" / "en" + ext1_dir.mkdir(parents=True) + ext2_dir.mkdir(parents=True) + + # Create translation files for extension 1 + ext1_main = {"title": "Extension 1", "shared": "Original"} + (ext1_dir / "main.json").write_text(json.dumps(ext1_main)) + + # Create translation files for extension 2 + ext2_main = {"description": "Extension 2", "shared": "Override"} + (ext2_dir / "main.json").write_text(json.dumps(ext2_main)) + + with patch("folder_paths.get_folder_paths", return_value=[str(custom_nodes_dir)]): + translations = custom_node_manager.build_translations() + + assert translations == { + "en": { + "title": "Extension 1", + "description": "Extension 2", + "shared": "Override", # Second extension should override first + } + } diff --git a/tests-unit/app_test/frontend_manager_test.py b/tests-unit/app_test/frontend_manager_test.py index a8df52484..ce67df6c6 100644 --- a/tests-unit/app_test/frontend_manager_test.py +++ b/tests-unit/app_test/frontend_manager_test.py @@ -70,7 +70,7 @@ def test_get_release_invalid_version(mock_provider): def test_init_frontend_default(): version_string = DEFAULT_VERSION_STRING frontend_path = FrontendManager.init_frontend(version_string) - assert frontend_path == FrontendManager.DEFAULT_FRONTEND_PATH + assert frontend_path == FrontendManager.default_frontend_path() def test_init_frontend_invalid_version(): @@ -84,24 +84,29 @@ def test_init_frontend_invalid_provider(): with pytest.raises(HTTPError): FrontendManager.init_frontend_unsafe(version_string) + @pytest.fixture def mock_os_functions(): - with patch('app.frontend_management.os.makedirs') as mock_makedirs, \ - patch('app.frontend_management.os.listdir') as mock_listdir, \ - patch('app.frontend_management.os.rmdir') as mock_rmdir: + with ( + patch("app.frontend_management.os.makedirs") as mock_makedirs, + patch("app.frontend_management.os.listdir") as mock_listdir, + patch("app.frontend_management.os.rmdir") as mock_rmdir, + ): mock_listdir.return_value = [] # Simulate empty directory yield mock_makedirs, mock_listdir, mock_rmdir + @pytest.fixture def mock_download(): - with patch('app.frontend_management.download_release_asset_zip') as mock: + with patch("app.frontend_management.download_release_asset_zip") as mock: mock.side_effect = Exception("Download failed") # Simulate download failure yield mock + def test_finally_block(mock_os_functions, mock_download, mock_provider): # Arrange mock_makedirs, mock_listdir, mock_rmdir = mock_os_functions - version_string = 'test-owner/test-repo@1.0.0' + version_string = "test-owner/test-repo@1.0.0" # Act & Assert with pytest.raises(Exception): @@ -128,3 +133,42 @@ def test_parse_version_string_invalid(): version_string = "invalid" with pytest.raises(argparse.ArgumentTypeError): FrontendManager.parse_version_string(version_string) + + +def test_init_frontend_default_with_mocks(): + # Arrange + version_string = DEFAULT_VERSION_STRING + + # Act + with ( + patch("app.frontend_management.check_frontend_version") as mock_check, + patch.object( + FrontendManager, "default_frontend_path", return_value="/mocked/path" + ), + ): + frontend_path = FrontendManager.init_frontend(version_string) + + # Assert + assert frontend_path == "/mocked/path" + mock_check.assert_called_once() + + +def test_init_frontend_fallback_on_error(): + # Arrange + version_string = "test-owner/test-repo@1.0.0" + + # Act + with ( + patch.object( + FrontendManager, "init_frontend_unsafe", side_effect=Exception("Test error") + ), + patch("app.frontend_management.check_frontend_version") as mock_check, + patch.object( + FrontendManager, "default_frontend_path", return_value="/default/path" + ), + ): + frontend_path = FrontendManager.init_frontend(version_string) + + # Assert + assert frontend_path == "/default/path" + mock_check.assert_called_once() diff --git a/tests-unit/comfy_test/folder_path_test.py b/tests-unit/comfy_test/folder_path_test.py index f8173cdcc..775e15c36 100644 --- a/tests-unit/comfy_test/folder_path_test.py +++ b/tests-unit/comfy_test/folder_path_test.py @@ -1,19 +1,23 @@ ### 🗻 This file is created through the spirit of Mount Fuji at its peak # TODO(yoland): clean up this after I get back down +import sys import pytest import os import tempfile from unittest.mock import patch +from importlib import reload import folder_paths +import comfy.cli_args +from comfy.options import enable_args_parsing +enable_args_parsing() + @pytest.fixture() def clear_folder_paths(): - # Clear the global dictionary before each test to ensure isolation - original = folder_paths.folder_names_and_paths.copy() - folder_paths.folder_names_and_paths.clear() + # Reload the module after each test to ensure isolation yield - folder_paths.folder_names_and_paths = original + reload(folder_paths) @pytest.fixture def temp_dir(): @@ -21,7 +25,21 @@ def temp_dir(): yield tmpdirname -def test_get_directory_by_type(): +@pytest.fixture +def set_base_dir(): + def _set_base_dir(base_dir): + # Mock CLI args + with patch.object(sys, 'argv', ["main.py", "--base-directory", base_dir]): + reload(comfy.cli_args) + reload(folder_paths) + yield _set_base_dir + # Reload the modules after each test to ensure isolation + with patch.object(sys, 'argv', ["main.py"]): + reload(comfy.cli_args) + reload(folder_paths) + + +def test_get_directory_by_type(clear_folder_paths): test_dir = "/test/dir" folder_paths.set_output_directory(test_dir) assert folder_paths.get_directory_by_type("output") == test_dir @@ -96,3 +114,49 @@ def test_get_save_image_path(temp_dir): assert counter == 1 assert subfolder == "" assert filename_prefix == "test" + + +def test_base_path_changes(set_base_dir): + test_dir = os.path.abspath("/test/dir") + set_base_dir(test_dir) + + assert folder_paths.base_path == test_dir + assert folder_paths.models_dir == os.path.join(test_dir, "models") + assert folder_paths.input_directory == os.path.join(test_dir, "input") + assert folder_paths.output_directory == os.path.join(test_dir, "output") + assert folder_paths.temp_directory == os.path.join(test_dir, "temp") + assert folder_paths.user_directory == os.path.join(test_dir, "user") + + assert os.path.join(test_dir, "custom_nodes") in folder_paths.get_folder_paths("custom_nodes") + + for name in ["checkpoints", "loras", "vae", "configs", "embeddings", "controlnet", "classifiers"]: + assert folder_paths.get_folder_paths(name)[0] == os.path.join(test_dir, "models", name) + + +def test_base_path_change_clears_old(set_base_dir): + test_dir = os.path.abspath("/test/dir") + set_base_dir(test_dir) + + assert len(folder_paths.get_folder_paths("custom_nodes")) == 1 + + single_model_paths = [ + "checkpoints", + "loras", + "vae", + "configs", + "clip_vision", + "style_models", + "diffusers", + "vae_approx", + "gligen", + "upscale_models", + "embeddings", + "hypernetworks", + "photomaker", + "classifiers", + ] + for name in single_model_paths: + assert len(folder_paths.get_folder_paths(name)) == 1 + + for name in ["controlnet", "diffusion_models", "text_encoders"]: + assert len(folder_paths.get_folder_paths(name)) == 2 diff --git a/tests-unit/server/routes/internal_routes_test.py b/tests-unit/server/routes/internal_routes_test.py deleted file mode 100644 index 68c846652..000000000 --- a/tests-unit/server/routes/internal_routes_test.py +++ /dev/null @@ -1,115 +0,0 @@ -import pytest -from aiohttp import web -from unittest.mock import MagicMock, patch -from api_server.routes.internal.internal_routes import InternalRoutes -from api_server.services.file_service import FileService -from folder_paths import models_dir, user_directory, output_directory - - -@pytest.fixture -def internal_routes(): - return InternalRoutes(None) - -@pytest.fixture -def aiohttp_client_factory(aiohttp_client, internal_routes): - async def _get_client(): - app = internal_routes.get_app() - return await aiohttp_client(app) - return _get_client - -@pytest.mark.asyncio -async def test_list_files_valid_directory(aiohttp_client_factory, internal_routes): - mock_file_list = [ - {"name": "file1.txt", "path": "file1.txt", "type": "file", "size": 100}, - {"name": "dir1", "path": "dir1", "type": "directory"} - ] - internal_routes.file_service.list_files = MagicMock(return_value=mock_file_list) - client = await aiohttp_client_factory() - resp = await client.get('/files?directory=models') - assert resp.status == 200 - data = await resp.json() - assert 'files' in data - assert len(data['files']) == 2 - assert data['files'] == mock_file_list - - # Check other valid directories - resp = await client.get('/files?directory=user') - assert resp.status == 200 - resp = await client.get('/files?directory=output') - assert resp.status == 200 - -@pytest.mark.asyncio -async def test_list_files_invalid_directory(aiohttp_client_factory, internal_routes): - internal_routes.file_service.list_files = MagicMock(side_effect=ValueError("Invalid directory key")) - client = await aiohttp_client_factory() - resp = await client.get('/files?directory=invalid') - assert resp.status == 400 - data = await resp.json() - assert 'error' in data - assert data['error'] == "Invalid directory key" - -@pytest.mark.asyncio -async def test_list_files_exception(aiohttp_client_factory, internal_routes): - internal_routes.file_service.list_files = MagicMock(side_effect=Exception("Unexpected error")) - client = await aiohttp_client_factory() - resp = await client.get('/files?directory=models') - assert resp.status == 500 - data = await resp.json() - assert 'error' in data - assert data['error'] == "Unexpected error" - -@pytest.mark.asyncio -async def test_list_files_no_directory_param(aiohttp_client_factory, internal_routes): - mock_file_list = [] - internal_routes.file_service.list_files = MagicMock(return_value=mock_file_list) - client = await aiohttp_client_factory() - resp = await client.get('/files') - assert resp.status == 200 - data = await resp.json() - assert 'files' in data - assert len(data['files']) == 0 - -def test_setup_routes(internal_routes): - internal_routes.setup_routes() - routes = internal_routes.routes - assert any(route.method == 'GET' and str(route.path) == '/files' for route in routes) - -def test_get_app(internal_routes): - app = internal_routes.get_app() - assert isinstance(app, web.Application) - assert internal_routes._app is not None - -def test_get_app_reuse(internal_routes): - app1 = internal_routes.get_app() - app2 = internal_routes.get_app() - assert app1 is app2 - -@pytest.mark.asyncio -async def test_routes_added_to_app(aiohttp_client_factory, internal_routes): - client = await aiohttp_client_factory() - try: - resp = await client.get('/files') - print(f"Response received: status {resp.status}") # noqa: T201 - except Exception as e: - print(f"Exception occurred during GET request: {e}") # noqa: T201 - raise - - assert resp.status != 404, "Route /files does not exist" - -@pytest.mark.asyncio -async def test_file_service_initialization(): - with patch('api_server.routes.internal.internal_routes.FileService') as MockFileService: - # Create a mock instance - mock_file_service_instance = MagicMock(spec=FileService) - MockFileService.return_value = mock_file_service_instance - internal_routes = InternalRoutes(None) - - # Check if FileService was initialized with the correct parameters - MockFileService.assert_called_once_with({ - "models": models_dir, - "user": user_directory, - "output": output_directory - }) - - # Verify that the file_service attribute of InternalRoutes is set - assert internal_routes.file_service == mock_file_service_instance diff --git a/tests-unit/server/services/file_service_test.py b/tests-unit/server/services/file_service_test.py deleted file mode 100644 index 09c3efc9f..000000000 --- a/tests-unit/server/services/file_service_test.py +++ /dev/null @@ -1,54 +0,0 @@ -import pytest -from unittest.mock import MagicMock -from api_server.services.file_service import FileService - -@pytest.fixture -def mock_file_system_ops(): - return MagicMock() - -@pytest.fixture -def file_service(mock_file_system_ops): - allowed_directories = { - "models": "/path/to/models", - "user": "/path/to/user", - "output": "/path/to/output" - } - return FileService(allowed_directories, file_system_ops=mock_file_system_ops) - -def test_list_files_valid_directory(file_service, mock_file_system_ops): - mock_file_system_ops.walk_directory.return_value = [ - {"name": "file1.txt", "path": "file1.txt", "type": "file", "size": 100}, - {"name": "dir1", "path": "dir1", "type": "directory"} - ] - - result = file_service.list_files("models") - - assert len(result) == 2 - assert result[0]["name"] == "file1.txt" - assert result[1]["name"] == "dir1" - mock_file_system_ops.walk_directory.assert_called_once_with("/path/to/models") - -def test_list_files_invalid_directory(file_service): - # Does not support walking directories outside of the allowed directories - with pytest.raises(ValueError, match="Invalid directory key"): - file_service.list_files("invalid_key") - -def test_list_files_empty_directory(file_service, mock_file_system_ops): - mock_file_system_ops.walk_directory.return_value = [] - - result = file_service.list_files("models") - - assert len(result) == 0 - mock_file_system_ops.walk_directory.assert_called_once_with("/path/to/models") - -@pytest.mark.parametrize("directory_key", ["models", "user", "output"]) -def test_list_files_all_allowed_directories(file_service, mock_file_system_ops, directory_key): - mock_file_system_ops.walk_directory.return_value = [ - {"name": f"file_{directory_key}.txt", "path": f"file_{directory_key}.txt", "type": "file", "size": 100} - ] - - result = file_service.list_files(directory_key) - - assert len(result) == 1 - assert result[0]["name"] == f"file_{directory_key}.txt" - mock_file_system_ops.walk_directory.assert_called_once_with(f"/path/to/{directory_key}") diff --git a/tests-unit/utils/extra_config_test.py b/tests-unit/utils/extra_config_test.py index b23f5bd08..eae1aa3d3 100644 --- a/tests-unit/utils/extra_config_test.py +++ b/tests-unit/utils/extra_config_test.py @@ -114,7 +114,7 @@ def test_load_extra_model_paths_expands_userpath( mock_yaml_safe_load.assert_called_once() # Check if open was called with the correct file path - mock_file.assert_called_once_with(dummy_yaml_file_name, 'r') + mock_file.assert_called_once_with(dummy_yaml_file_name, 'r', encoding='utf-8') @patch('builtins.open', new_callable=mock_open) @@ -145,7 +145,7 @@ def test_load_extra_model_paths_expands_appdata( else: expected_base_path = '/Users/TestUser/AppData/Roaming/ComfyUI' expected_calls = [ - ('checkpoints', os.path.join(expected_base_path, 'models/checkpoints'), False), + ('checkpoints', os.path.normpath(os.path.join(expected_base_path, 'models/checkpoints')), False), ] assert mock_add_model_folder_path.call_count == len(expected_calls) @@ -197,8 +197,8 @@ def test_load_extra_path_config_relative_base_path( load_extra_path_config(dummy_yaml_name) - expected_checkpoints = os.path.abspath(os.path.join(str(tmp_path), sub_folder, "checkpoints")) - expected_some_value = os.path.abspath(os.path.join(str(tmp_path), sub_folder, "some_value")) + expected_checkpoints = os.path.abspath(os.path.join(str(tmp_path), "my_rel_base", "checkpoints")) + expected_some_value = os.path.abspath(os.path.join(str(tmp_path), "my_rel_base", "some_value")) actual_paths = folder_paths.folder_names_and_paths["checkpoints"][0] assert len(actual_paths) == 1, "Should have one path added for 'checkpoints'." diff --git a/tests-unit/utils/json_util_test.py b/tests-unit/utils/json_util_test.py new file mode 100644 index 000000000..d3089d8d1 --- /dev/null +++ b/tests-unit/utils/json_util_test.py @@ -0,0 +1,71 @@ +from utils.json_util import merge_json_recursive + + +def test_merge_simple_dicts(): + base = {"a": 1, "b": 2} + update = {"b": 3, "c": 4} + expected = {"a": 1, "b": 3, "c": 4} + assert merge_json_recursive(base, update) == expected + + +def test_merge_nested_dicts(): + base = {"a": {"x": 1, "y": 2}, "b": 3} + update = {"a": {"y": 4, "z": 5}} + expected = {"a": {"x": 1, "y": 4, "z": 5}, "b": 3} + assert merge_json_recursive(base, update) == expected + + +def test_merge_lists(): + base = {"a": [1, 2], "b": 3} + update = {"a": [3, 4]} + expected = {"a": [1, 2, 3, 4], "b": 3} + assert merge_json_recursive(base, update) == expected + + +def test_merge_nested_lists(): + base = {"a": {"x": [1, 2]}} + update = {"a": {"x": [3, 4]}} + expected = {"a": {"x": [1, 2, 3, 4]}} + assert merge_json_recursive(base, update) == expected + + +def test_merge_mixed_types(): + base = {"a": [1, 2], "b": {"x": 1}} + update = {"a": [3], "b": {"y": 2}} + expected = {"a": [1, 2, 3], "b": {"x": 1, "y": 2}} + assert merge_json_recursive(base, update) == expected + + +def test_merge_overwrite_non_dict(): + base = {"a": 1} + update = {"a": {"x": 2}} + expected = {"a": {"x": 2}} + assert merge_json_recursive(base, update) == expected + + +def test_merge_empty_dicts(): + base = {} + update = {"a": 1} + expected = {"a": 1} + assert merge_json_recursive(base, update) == expected + + +def test_merge_none_values(): + base = {"a": None} + update = {"a": {"x": 1}} + expected = {"a": {"x": 1}} + assert merge_json_recursive(base, update) == expected + + +def test_merge_different_types(): + base = {"a": [1, 2]} + update = {"a": "string"} + expected = {"a": "string"} + assert merge_json_recursive(base, update) == expected + + +def test_merge_complex_nested(): + base = {"a": [1, 2], "b": {"x": [3, 4], "y": {"p": 1}}} + update = {"a": [5], "b": {"x": [6], "y": {"q": 2}}} + expected = {"a": [1, 2, 5], "b": {"x": [3, 4, 6], "y": {"p": 1, "q": 2}}} + assert merge_json_recursive(base, update) == expected diff --git a/utils/extra_config.py b/utils/extra_config.py index d7b592855..a0fcda9e8 100644 --- a/utils/extra_config.py +++ b/utils/extra_config.py @@ -4,7 +4,7 @@ import folder_paths import logging def load_extra_path_config(yaml_path): - with open(yaml_path, 'r') as stream: + with open(yaml_path, 'r', encoding='utf-8') as stream: config = yaml.safe_load(stream) yaml_dir = os.path.dirname(os.path.abspath(yaml_path)) for c in config: @@ -29,5 +29,6 @@ def load_extra_path_config(yaml_path): full_path = os.path.join(base_path, full_path) elif not os.path.isabs(full_path): full_path = os.path.abspath(os.path.join(yaml_dir, y)) - logging.info("Adding extra search path {} {}".format(x, full_path)) - folder_paths.add_model_folder_path(x, full_path, is_default) + normalized_path = os.path.normpath(full_path) + logging.info("Adding extra search path {} {}".format(x, normalized_path)) + folder_paths.add_model_folder_path(x, normalized_path, is_default) diff --git a/utils/json_util.py b/utils/json_util.py new file mode 100644 index 000000000..da45af4f7 --- /dev/null +++ b/utils/json_util.py @@ -0,0 +1,26 @@ +def merge_json_recursive(base, update): + """Recursively merge two JSON-like objects. + - Dictionaries are merged recursively + - Lists are concatenated + - Other types are overwritten by the update value + + Args: + base: Base JSON-like object + update: Update JSON-like object to merge into base + + Returns: + Merged JSON-like object + """ + if not isinstance(base, dict) or not isinstance(update, dict): + if isinstance(base, list) and isinstance(update, list): + return base + update + return update + + merged = base.copy() + for key, value in update.items(): + if key in merged: + merged[key] = merge_json_recursive(merged[key], value) + else: + merged[key] = value + + return merged diff --git a/web/assets/BaseViewTemplate-BhQMaVFP.js b/web/assets/BaseViewTemplate-BhQMaVFP.js deleted file mode 100644 index af2f3028c..000000000 --- a/web/assets/BaseViewTemplate-BhQMaVFP.js +++ /dev/null @@ -1,54 +0,0 @@ -import { d as defineComponent, ad as ref, t as onMounted, bT as isElectron, bV as electronAPI, af as nextTick, o as openBlock, f as createElementBlock, i as withDirectives, v as vShow, m as createBaseVNode, M as renderSlot, V as normalizeClass } from "./index-QvfM__ze.js"; -const _hoisted_1 = { class: "flex-grow w-full flex items-center justify-center overflow-auto" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "BaseViewTemplate", - props: { - dark: { type: Boolean, default: false } - }, - setup(__props) { - const props = __props; - const darkTheme = { - color: "rgba(0, 0, 0, 0)", - symbolColor: "#d4d4d4" - }; - const lightTheme = { - color: "rgba(0, 0, 0, 0)", - symbolColor: "#171717" - }; - const topMenuRef = ref(null); - const isNativeWindow = ref(false); - onMounted(async () => { - if (isElectron()) { - const windowStyle = await electronAPI().Config.getWindowStyle(); - isNativeWindow.value = windowStyle === "custom"; - await nextTick(); - electronAPI().changeTheme({ - ...props.dark ? darkTheme : lightTheme, - height: topMenuRef.value.getBoundingClientRect().height - }); - } - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", { - class: normalizeClass(["font-sans w-screen h-screen flex flex-col pointer-events-auto", [ - props.dark ? "text-neutral-300 bg-neutral-900 dark-theme" : "text-neutral-900 bg-neutral-300" - ]]) - }, [ - withDirectives(createBaseVNode("div", { - ref_key: "topMenuRef", - ref: topMenuRef, - class: "app-drag w-full h-[var(--comfy-topbar-height)]" - }, null, 512), [ - [vShow, isNativeWindow.value] - ]), - createBaseVNode("div", _hoisted_1, [ - renderSlot(_ctx.$slots, "default") - ]) - ], 2); - }; - } -}); -export { - _sfc_main as _ -}; -//# sourceMappingURL=BaseViewTemplate-BhQMaVFP.js.map diff --git a/web/assets/CREDIT.txt b/web/assets/CREDIT.txt deleted file mode 100644 index b3a9bc906..000000000 --- a/web/assets/CREDIT.txt +++ /dev/null @@ -1 +0,0 @@ -Thanks to OpenArt (https://openart.ai) for providing the sorted-custom-node-map data, captured in September 2024. \ No newline at end of file diff --git a/web/assets/DesktopStartView-le6AjGZr.js b/web/assets/DesktopStartView-le6AjGZr.js deleted file mode 100644 index 41a212f3a..000000000 --- a/web/assets/DesktopStartView-le6AjGZr.js +++ /dev/null @@ -1,22 +0,0 @@ -import { d as defineComponent, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, k as createVNode, j as unref, ch as script } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _hoisted_1 = { class: "max-w-screen-sm w-screen p-8" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "DesktopStartView", - setup(__props) { - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$1, { dark: "" }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - createVNode(unref(script), { mode: "indeterminate" }) - ]) - ]), - _: 1 - }); - }; - } -}); -export { - _sfc_main as default -}; -//# sourceMappingURL=DesktopStartView-le6AjGZr.js.map diff --git a/web/assets/DownloadGitView-rPK_vYgU.js b/web/assets/DownloadGitView-rPK_vYgU.js deleted file mode 100644 index c286da355..000000000 --- a/web/assets/DownloadGitView-rPK_vYgU.js +++ /dev/null @@ -1,58 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, j as unref, l as script, c2 as useRouter } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _hoisted_1 = { class: "max-w-screen-sm flex flex-col gap-8 p-8 bg-[url('/assets/images/Git-Logo-White.svg')] bg-no-repeat bg-right-top bg-origin-padding" }; -const _hoisted_2 = { class: "mt-24 text-4xl font-bold text-red-500" }; -const _hoisted_3 = { class: "space-y-4" }; -const _hoisted_4 = { class: "text-xl" }; -const _hoisted_5 = { class: "text-xl" }; -const _hoisted_6 = { class: "text-m" }; -const _hoisted_7 = { class: "flex gap-4 flex-row-reverse" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "DownloadGitView", - setup(__props) { - const openGitDownloads = /* @__PURE__ */ __name(() => { - window.open("https://git-scm.com/downloads/", "_blank"); - }, "openGitDownloads"); - const skipGit = /* @__PURE__ */ __name(() => { - console.warn("pushing"); - const router = useRouter(); - router.push("install"); - }, "skipGit"); - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$1, null, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - createBaseVNode("h1", _hoisted_2, toDisplayString(_ctx.$t("downloadGit.title")), 1), - createBaseVNode("div", _hoisted_3, [ - createBaseVNode("p", _hoisted_4, toDisplayString(_ctx.$t("downloadGit.message")), 1), - createBaseVNode("p", _hoisted_5, toDisplayString(_ctx.$t("downloadGit.instructions")), 1), - createBaseVNode("p", _hoisted_6, toDisplayString(_ctx.$t("downloadGit.warning")), 1) - ]), - createBaseVNode("div", _hoisted_7, [ - createVNode(unref(script), { - label: _ctx.$t("downloadGit.gitWebsite"), - icon: "pi pi-external-link", - "icon-pos": "right", - onClick: openGitDownloads, - severity: "primary" - }, null, 8, ["label"]), - createVNode(unref(script), { - label: _ctx.$t("downloadGit.skip"), - icon: "pi pi-exclamation-triangle", - onClick: skipGit, - severity: "secondary" - }, null, 8, ["label"]) - ]) - ]) - ]), - _: 1 - }); - }; - } -}); -export { - _sfc_main as default -}; -//# sourceMappingURL=DownloadGitView-rPK_vYgU.js.map diff --git a/web/assets/ExtensionPanel-3jWrm6Zi.js b/web/assets/ExtensionPanel-3jWrm6Zi.js deleted file mode 100644 index 3c580dd1b..000000000 --- a/web/assets/ExtensionPanel-3jWrm6Zi.js +++ /dev/null @@ -1,182 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, ad as ref, cu as FilterMatchMode, cz as useExtensionStore, a as useSettingStore, t as onMounted, c as computed, o as openBlock, J as createBlock, P as withCtx, k as createVNode, cv as SearchBox, j as unref, c6 as script, m as createBaseVNode, f as createElementBlock, I as renderList, Z as toDisplayString, aG as createTextVNode, H as Fragment, l as script$1, L as createCommentVNode, aK as script$3, b8 as script$4, cc as script$5, cw as _sfc_main$1 } from "./index-QvfM__ze.js"; -import { s as script$2, a as script$6 } from "./index-DpF-ptbJ.js"; -import "./index-Q1cQr26V.js"; -const _hoisted_1 = { class: "flex justify-end" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "ExtensionPanel", - setup(__props) { - const filters = ref({ - global: { value: "", matchMode: FilterMatchMode.CONTAINS } - }); - const extensionStore = useExtensionStore(); - const settingStore = useSettingStore(); - const editingEnabledExtensions = ref({}); - onMounted(() => { - extensionStore.extensions.forEach((ext) => { - editingEnabledExtensions.value[ext.name] = extensionStore.isExtensionEnabled(ext.name); - }); - }); - const changedExtensions = computed(() => { - return extensionStore.extensions.filter( - (ext) => editingEnabledExtensions.value[ext.name] !== extensionStore.isExtensionEnabled(ext.name) - ); - }); - const hasChanges = computed(() => { - return changedExtensions.value.length > 0; - }); - const updateExtensionStatus = /* @__PURE__ */ __name(() => { - const editingDisabledExtensionNames = Object.entries( - editingEnabledExtensions.value - ).filter(([_, enabled]) => !enabled).map(([name]) => name); - settingStore.set("Comfy.Extension.Disabled", [ - ...extensionStore.inactiveDisabledExtensionNames, - ...editingDisabledExtensionNames - ]); - }, "updateExtensionStatus"); - const enableAllExtensions = /* @__PURE__ */ __name(() => { - extensionStore.extensions.forEach((ext) => { - if (extensionStore.isExtensionReadOnly(ext.name)) return; - editingEnabledExtensions.value[ext.name] = true; - }); - updateExtensionStatus(); - }, "enableAllExtensions"); - const disableAllExtensions = /* @__PURE__ */ __name(() => { - extensionStore.extensions.forEach((ext) => { - if (extensionStore.isExtensionReadOnly(ext.name)) return; - editingEnabledExtensions.value[ext.name] = false; - }); - updateExtensionStatus(); - }, "disableAllExtensions"); - const disableThirdPartyExtensions = /* @__PURE__ */ __name(() => { - extensionStore.extensions.forEach((ext) => { - if (extensionStore.isCoreExtension(ext.name)) return; - editingEnabledExtensions.value[ext.name] = false; - }); - updateExtensionStatus(); - }, "disableThirdPartyExtensions"); - const applyChanges = /* @__PURE__ */ __name(() => { - window.location.reload(); - }, "applyChanges"); - const menu = ref(); - const contextMenuItems = [ - { - label: "Enable All", - icon: "pi pi-check", - command: enableAllExtensions - }, - { - label: "Disable All", - icon: "pi pi-times", - command: disableAllExtensions - }, - { - label: "Disable 3rd Party", - icon: "pi pi-times", - command: disableThirdPartyExtensions, - disabled: !extensionStore.hasThirdPartyExtensions - } - ]; - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$1, { - value: "Extension", - class: "extension-panel" - }, { - header: withCtx(() => [ - createVNode(SearchBox, { - modelValue: filters.value["global"].value, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filters.value["global"].value = $event), - placeholder: _ctx.$t("g.searchExtensions") + "..." - }, null, 8, ["modelValue", "placeholder"]), - hasChanges.value ? (openBlock(), createBlock(unref(script), { - key: 0, - severity: "info", - "pt:text": "w-full", - class: "max-h-96 overflow-y-auto" - }, { - default: withCtx(() => [ - createBaseVNode("ul", null, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(changedExtensions.value, (ext) => { - return openBlock(), createElementBlock("li", { - key: ext.name - }, [ - createBaseVNode("span", null, toDisplayString(unref(extensionStore).isExtensionEnabled(ext.name) ? "[-]" : "[+]"), 1), - createTextVNode(" " + toDisplayString(ext.name), 1) - ]); - }), 128)) - ]), - createBaseVNode("div", _hoisted_1, [ - createVNode(unref(script$1), { - label: _ctx.$t("g.reloadToApplyChanges"), - onClick: applyChanges, - outlined: "", - severity: "danger" - }, null, 8, ["label"]) - ]) - ]), - _: 1 - })) : createCommentVNode("", true) - ]), - default: withCtx(() => [ - createVNode(unref(script$6), { - value: unref(extensionStore).extensions, - stripedRows: "", - size: "small", - filters: filters.value - }, { - default: withCtx(() => [ - createVNode(unref(script$2), { - header: _ctx.$t("g.extensionName"), - sortable: "", - field: "name" - }, { - body: withCtx((slotProps) => [ - createTextVNode(toDisplayString(slotProps.data.name) + " ", 1), - unref(extensionStore).isCoreExtension(slotProps.data.name) ? (openBlock(), createBlock(unref(script$3), { - key: 0, - value: "Core" - })) : createCommentVNode("", true) - ]), - _: 1 - }, 8, ["header"]), - createVNode(unref(script$2), { pt: { - headerCell: "flex items-center justify-end", - bodyCell: "flex items-center justify-end" - } }, { - header: withCtx(() => [ - createVNode(unref(script$1), { - icon: "pi pi-ellipsis-h", - text: "", - severity: "secondary", - onClick: _cache[1] || (_cache[1] = ($event) => menu.value.show($event)) - }), - createVNode(unref(script$4), { - ref_key: "menu", - ref: menu, - model: contextMenuItems - }, null, 512) - ]), - body: withCtx((slotProps) => [ - createVNode(unref(script$5), { - disabled: unref(extensionStore).isExtensionReadOnly(slotProps.data.name), - modelValue: editingEnabledExtensions.value[slotProps.data.name], - "onUpdate:modelValue": /* @__PURE__ */ __name(($event) => editingEnabledExtensions.value[slotProps.data.name] = $event, "onUpdate:modelValue"), - onChange: updateExtensionStatus - }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue"]) - ]), - _: 1 - }) - ]), - _: 1 - }, 8, ["value", "filters"]) - ]), - _: 1 - }); - }; - } -}); -export { - _sfc_main as default -}; -//# sourceMappingURL=ExtensionPanel-3jWrm6Zi.js.map diff --git a/web/assets/GraphView-CDDCHVO0.js b/web/assets/GraphView-CDDCHVO0.js deleted file mode 100644 index 34b0cd731..000000000 --- a/web/assets/GraphView-CDDCHVO0.js +++ /dev/null @@ -1,10063 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, u as useExecutionStore, c as computed, a as useSettingStore, b as useWorkflowStore, e as useTitle, o as openBlock, f as createElementBlock, g as useWorkspaceStore, w as watchEffect, h as app, r as resolveDirective, i as withDirectives, v as vShow, j as unref, k as createVNode, s as showNativeMenu, l as script$d, m as createBaseVNode, n as normalizeStyle, p as pushScopeId, q as popScopeId, _ as _export_sfc, t as onMounted, x as onBeforeUnmount, B as BaseStyle, y as script$e, z as getWidth, A as getHeight, C as getOuterWidth, D as getOuterHeight, E as getVNodeProp, F as isArray, G as mergeProps, H as Fragment, I as renderList, J as createBlock, K as resolveDynamicComponent, L as createCommentVNode, M as renderSlot, N as useSidebarTabStore, O as useBottomPanelStore, P as withCtx, Q as getAttribute, R as findSingle, S as focus, T as equals, U as Ripple, V as normalizeClass, W as getOffset, X as script$f, Y as script$g, Z as toDisplayString, $ as script$h, a0 as markRaw, a1 as defineStore, a2 as shallowRef, a3 as useI18n, a4 as useCommandStore, a5 as LiteGraph, a6 as useColorPaletteStore, a7 as watch, a8 as useNodeDefStore, a9 as BadgePosition, aa as LGraphBadge, ab as _, ac as NodeBadgeMode, ad as ref, ae as useEventListener, af as nextTick, ag as st, ah as normalizeI18nKey, ai as LGraphGroup, aj as LGraphNode, ak as EditableText, al as isNotEmpty, am as UniqueComponentId, an as ZIndex, ao as resolveFieldData, ap as OverlayEventBus, aq as isEmpty, ar as addStyle, as as relativePosition, at as absolutePosition, au as ConnectedOverlayScrollHandler, av as isTouchDevice, aw as findLastIndex, ax as script$i, ay as script$j, az as script$k, aA as script$l, aB as script$m, aC as script$n, aD as resolveComponent, aE as Transition, aF as createSlots, aG as createTextVNode, aH as useNodeFrequencyStore, aI as useNodeBookmarkStore, aJ as highlightQuery, aK as script$o, aL as formatNumberWithSuffix, aM as NodeSourceType, aN as NodePreview, aO as NodeSearchFilter, aP as script$p, aQ as SearchFilterChip, aR as useLitegraphService, aS as storeToRefs, aT as isRef, aU as toRaw, aV as LinkReleaseTriggerAction, aW as script$q, aX as useUserStore, aY as useDialogStore, aZ as SettingDialogHeader, a_ as SettingDialogContent, a$ as useKeybindingStore, b0 as Teleport, b1 as usePragmaticDraggable, b2 as usePragmaticDroppable, b3 as withModifiers, b4 as useWorkflowService, b5 as useWorkflowBookmarkStore, b6 as script$r, b7 as script$s, b8 as script$t, b9 as LinkMarkerShape, ba as useModelToNodeStore, bb as getStorageValue, bc as CanvasPointer, bd as IS_CONTROL_WIDGET, be as updateControlWidgetLabel, bf as useColorPaletteService, bg as setStorageValue, bh as api, bi as LGraph, bj as LLink, bk as DragAndScale, bl as LGraphCanvas, bm as ContextMenu, bn as ChangeTracker, bo as ComfyNodeDefImpl, bp as ComfyModelDef, bq as script$u, br as script$v, bs as script$w, bt as script$x, bu as script$y, bv as normalizeProps, bw as ToastEventBus, bx as setAttribute, by as TransitionGroup, bz as useToast, bA as useToastStore, bB as resolve, bC as nestedPosition, bD as script$z, bE as isPrintableCharacter, bF as useQueueSettingsStore, bG as script$A, bH as useQueuePendingTaskCountStore, bI as useLocalStorage, bJ as useDraggable, bK as watchDebounced, bL as inject, bM as useElementBounding, bN as script$B, bO as lodashExports, bP as useEventBus, bQ as script$C, bR as guardReactiveProps, bS as useMenuItemStore, bT as isElectron, bU as provide, bV as electronAPI, bW as useDialogService, bX as LGraphEventMode, bY as useQueueStore, bZ as DEFAULT_DARK_COLOR_PALETTE, b_ as DEFAULT_LIGHT_COLOR_PALETTE, b$ as i18n, c0 as useErrorHandling, c1 as useModelStore } from "./index-QvfM__ze.js"; -import { s as script$D } from "./index-Q1cQr26V.js"; -import { u as useKeybindingService } from "./keybindingService-Cak1En5n.js"; -import { u as useServerConfigStore } from "./serverConfigStore-DCme3xlV.js"; -const DEFAULT_TITLE = "ComfyUI"; -const TITLE_SUFFIX = " - ComfyUI"; -const _sfc_main$u = /* @__PURE__ */ defineComponent({ - __name: "BrowserTabTitle", - setup(__props) { - const executionStore = useExecutionStore(); - const executionText = computed( - () => executionStore.isIdle ? "" : `[${executionStore.executionProgress}%]` - ); - const settingStore = useSettingStore(); - const betaMenuEnabled = computed( - () => settingStore.get("Comfy.UseNewMenu") !== "Disabled" - ); - const workflowStore = useWorkflowStore(); - const isUnsavedText = computed( - () => workflowStore.activeWorkflow?.isModified || !workflowStore.activeWorkflow?.isPersisted ? " *" : "" - ); - const workflowNameText = computed(() => { - const workflowName = workflowStore.activeWorkflow?.filename; - return workflowName ? isUnsavedText.value + workflowName + TITLE_SUFFIX : DEFAULT_TITLE; - }); - const nodeExecutionTitle = computed( - () => executionStore.executingNode && executionStore.executingNodeProgress ? `${executionText.value}[${executionStore.executingNodeProgress}%] ${executionStore.executingNode.type}` : "" - ); - const workflowTitle = computed( - () => executionText.value + (betaMenuEnabled.value ? workflowNameText.value : DEFAULT_TITLE) - ); - const title = computed(() => nodeExecutionTitle.value || workflowTitle.value); - useTitle(title); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div"); - }; - } -}); -const _withScopeId$9 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-7ed57d1a"), n = n(), popScopeId(), n), "_withScopeId$9"); -const _hoisted_1$q = { class: "window-actions-spacer" }; -const _sfc_main$t = /* @__PURE__ */ defineComponent({ - __name: "MenuHamburger", - setup(__props) { - const workspaceState = useWorkspaceStore(); - const settingStore = useSettingStore(); - const exitFocusMode = /* @__PURE__ */ __name(() => { - workspaceState.focusMode = false; - }, "exitFocusMode"); - watchEffect(() => { - if (settingStore.get("Comfy.UseNewMenu") !== "Disabled") { - return; - } - if (workspaceState.focusMode) { - app.ui.menuContainer.style.display = "none"; - } else { - app.ui.menuContainer.style.display = "block"; - } - }); - const menuSetting = computed(() => settingStore.get("Comfy.UseNewMenu")); - const positionCSS = computed( - () => ( - // 'Bottom' menuSetting shows the hamburger button in the bottom right corner - // 'Disabled', 'Top' menuSetting shows the hamburger button in the top right corner - menuSetting.value === "Bottom" ? { bottom: "0px", right: "0px" } : { top: "0px", right: "0px" } - ) - ); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return withDirectives((openBlock(), createElementBlock("div", { - class: "comfy-menu-hamburger no-drag", - style: normalizeStyle(positionCSS.value) - }, [ - withDirectives(createVNode(unref(script$d), { - icon: "pi pi-bars", - severity: "secondary", - text: "", - size: "large", - "aria-label": _ctx.$t("menu.showMenu"), - "aria-live": "assertive", - onClick: exitFocusMode, - onContextmenu: unref(showNativeMenu) - }, null, 8, ["aria-label", "onContextmenu"]), [ - [_directive_tooltip, { value: _ctx.$t("menu.showMenu"), showDelay: 300 }] - ]), - withDirectives(createBaseVNode("div", _hoisted_1$q, null, 512), [ - [vShow, menuSetting.value !== "Bottom"] - ]) - ], 4)), [ - [vShow, unref(workspaceState).focusMode] - ]); - }; - } -}); -const MenuHamburger = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-7ed57d1a"]]); -const _sfc_main$s = /* @__PURE__ */ defineComponent({ - __name: "UnloadWindowConfirmDialog", - setup(__props) { - const settingStore = useSettingStore(); - const workflowStore = useWorkflowStore(); - const handleBeforeUnload = /* @__PURE__ */ __name((event) => { - if (settingStore.get("Comfy.Window.UnloadConfirmation") && workflowStore.modifiedWorkflows.length > 0) { - event.preventDefault(); - return true; - } - return void 0; - }, "handleBeforeUnload"); - onMounted(() => { - window.addEventListener("beforeunload", handleBeforeUnload); - }); - onBeforeUnmount(() => { - window.removeEventListener("beforeunload", handleBeforeUnload); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div"); - }; - } -}); -var theme$7 = /* @__PURE__ */ __name(function theme(_ref) { - var dt = _ref.dt; - return "\n.p-splitter {\n display: flex;\n flex-wrap: nowrap;\n border: 1px solid ".concat(dt("splitter.border.color"), ";\n background: ").concat(dt("splitter.background"), ";\n border-radius: ").concat(dt("border.radius.md"), ";\n color: ").concat(dt("splitter.color"), ";\n}\n\n.p-splitter-vertical {\n flex-direction: column;\n}\n\n.p-splitter-gutter {\n flex-grow: 0;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n background: ").concat(dt("splitter.gutter.background"), ";\n}\n\n.p-splitter-gutter-handle {\n border-radius: ").concat(dt("splitter.handle.border.radius"), ";\n background: ").concat(dt("splitter.handle.background"), ";\n transition: outline-color ").concat(dt("splitter.transition.duration"), ", box-shadow ").concat(dt("splitter.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-splitter-gutter-handle:focus-visible {\n box-shadow: ").concat(dt("splitter.handle.focus.ring.shadow"), ";\n outline: ").concat(dt("splitter.handle.focus.ring.width"), " ").concat(dt("splitter.handle.focus.ring.style"), " ").concat(dt("splitter.handle.focus.ring.color"), ";\n outline-offset: ").concat(dt("splitter.handle.focus.ring.offset"), ";\n}\n\n.p-splitter-horizontal.p-splitter-resizing {\n cursor: col-resize;\n user-select: none;\n}\n\n.p-splitter-vertical.p-splitter-resizing {\n cursor: row-resize;\n user-select: none;\n}\n\n.p-splitter-horizontal > .p-splitter-gutter > .p-splitter-gutter-handle {\n height: ").concat(dt("splitter.handle.size"), ";\n width: 100%;\n}\n\n.p-splitter-vertical > .p-splitter-gutter > .p-splitter-gutter-handle {\n width: ").concat(dt("splitter.handle.size"), ";\n height: 100%;\n}\n\n.p-splitter-horizontal > .p-splitter-gutter {\n cursor: col-resize;\n}\n\n.p-splitter-vertical > .p-splitter-gutter {\n cursor: row-resize;\n}\n\n.p-splitterpanel {\n flex-grow: 1;\n overflow: hidden;\n}\n\n.p-splitterpanel-nested {\n display: flex;\n}\n\n.p-splitterpanel .p-splitter {\n flex-grow: 1;\n border: 0 none;\n}\n"); -}, "theme"); -var classes$a = { - root: /* @__PURE__ */ __name(function root(_ref2) { - var props = _ref2.props; - return ["p-splitter p-component", "p-splitter-" + props.layout]; - }, "root"), - gutter: "p-splitter-gutter", - gutterHandle: "p-splitter-gutter-handle" -}; -var inlineStyles$4 = { - root: /* @__PURE__ */ __name(function root2(_ref3) { - var props = _ref3.props; - return [{ - display: "flex", - "flex-wrap": "nowrap" - }, props.layout === "vertical" ? { - "flex-direction": "column" - } : ""]; - }, "root") -}; -var SplitterStyle = BaseStyle.extend({ - name: "splitter", - theme: theme$7, - classes: classes$a, - inlineStyles: inlineStyles$4 -}); -var script$1$a = { - name: "BaseSplitter", - "extends": script$e, - props: { - layout: { - type: String, - "default": "horizontal" - }, - gutterSize: { - type: Number, - "default": 4 - }, - stateKey: { - type: String, - "default": null - }, - stateStorage: { - type: String, - "default": "session" - }, - step: { - type: Number, - "default": 5 - } - }, - style: SplitterStyle, - provide: /* @__PURE__ */ __name(function provide2() { - return { - $pcSplitter: this, - $parentInstance: this - }; - }, "provide") -}; -function _toConsumableArray$2(r) { - return _arrayWithoutHoles$2(r) || _iterableToArray$2(r) || _unsupportedIterableToArray$2(r) || _nonIterableSpread$2(); -} -__name(_toConsumableArray$2, "_toConsumableArray$2"); -function _nonIterableSpread$2() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -__name(_nonIterableSpread$2, "_nonIterableSpread$2"); -function _unsupportedIterableToArray$2(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray$2(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; - } -} -__name(_unsupportedIterableToArray$2, "_unsupportedIterableToArray$2"); -function _iterableToArray$2(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -__name(_iterableToArray$2, "_iterableToArray$2"); -function _arrayWithoutHoles$2(r) { - if (Array.isArray(r)) return _arrayLikeToArray$2(r); -} -__name(_arrayWithoutHoles$2, "_arrayWithoutHoles$2"); -function _arrayLikeToArray$2(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -__name(_arrayLikeToArray$2, "_arrayLikeToArray$2"); -var script$c = { - name: "Splitter", - "extends": script$1$a, - inheritAttrs: false, - emits: ["resizestart", "resizeend", "resize"], - dragging: false, - mouseMoveListener: null, - mouseUpListener: null, - touchMoveListener: null, - touchEndListener: null, - size: null, - gutterElement: null, - startPos: null, - prevPanelElement: null, - nextPanelElement: null, - nextPanelSize: null, - prevPanelSize: null, - panelSizes: null, - prevPanelIndex: null, - timer: null, - data: /* @__PURE__ */ __name(function data() { - return { - prevSize: null - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted() { - var _this = this; - if (this.panels && this.panels.length) { - var initialized = false; - if (this.isStateful()) { - initialized = this.restoreState(); - } - if (!initialized) { - var children = _toConsumableArray$2(this.$el.children).filter(function(child) { - return child.getAttribute("data-pc-name") === "splitterpanel"; - }); - var _panelSizes = []; - this.panels.map(function(panel, i) { - var panelInitialSize = panel.props && panel.props.size ? panel.props.size : null; - var panelSize = panelInitialSize || 100 / _this.panels.length; - _panelSizes[i] = panelSize; - children[i].style.flexBasis = "calc(" + panelSize + "% - " + (_this.panels.length - 1) * _this.gutterSize + "px)"; - }); - this.panelSizes = _panelSizes; - this.prevSize = parseFloat(_panelSizes[0]).toFixed(4); - } - } - }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount() { - this.clear(); - this.unbindMouseListeners(); - }, "beforeUnmount"), - methods: { - isSplitterPanel: /* @__PURE__ */ __name(function isSplitterPanel(child) { - return child.type.name === "SplitterPanel"; - }, "isSplitterPanel"), - onResizeStart: /* @__PURE__ */ __name(function onResizeStart(event, index, isKeyDown) { - this.gutterElement = event.currentTarget || event.target.parentElement; - this.size = this.horizontal ? getWidth(this.$el) : getHeight(this.$el); - if (!isKeyDown) { - this.dragging = true; - this.startPos = this.layout === "horizontal" ? event.pageX || event.changedTouches[0].pageX : event.pageY || event.changedTouches[0].pageY; - } - this.prevPanelElement = this.gutterElement.previousElementSibling; - this.nextPanelElement = this.gutterElement.nextElementSibling; - if (isKeyDown) { - this.prevPanelSize = this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true); - this.nextPanelSize = this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true); - } else { - this.prevPanelSize = 100 * (this.horizontal ? getOuterWidth(this.prevPanelElement, true) : getOuterHeight(this.prevPanelElement, true)) / this.size; - this.nextPanelSize = 100 * (this.horizontal ? getOuterWidth(this.nextPanelElement, true) : getOuterHeight(this.nextPanelElement, true)) / this.size; - } - this.prevPanelIndex = index; - this.$emit("resizestart", { - originalEvent: event, - sizes: this.panelSizes - }); - this.$refs.gutter[index].setAttribute("data-p-gutter-resizing", true); - this.$el.setAttribute("data-p-resizing", true); - }, "onResizeStart"), - onResize: /* @__PURE__ */ __name(function onResize(event, step, isKeyDown) { - var newPos, newPrevPanelSize, newNextPanelSize; - if (isKeyDown) { - if (this.horizontal) { - newPrevPanelSize = 100 * (this.prevPanelSize + step) / this.size; - newNextPanelSize = 100 * (this.nextPanelSize - step) / this.size; - } else { - newPrevPanelSize = 100 * (this.prevPanelSize - step) / this.size; - newNextPanelSize = 100 * (this.nextPanelSize + step) / this.size; - } - } else { - if (this.horizontal) newPos = event.pageX * 100 / this.size - this.startPos * 100 / this.size; - else newPos = event.pageY * 100 / this.size - this.startPos * 100 / this.size; - newPrevPanelSize = this.prevPanelSize + newPos; - newNextPanelSize = this.nextPanelSize - newPos; - } - if (this.validateResize(newPrevPanelSize, newNextPanelSize)) { - this.prevPanelElement.style.flexBasis = "calc(" + newPrevPanelSize + "% - " + (this.panels.length - 1) * this.gutterSize + "px)"; - this.nextPanelElement.style.flexBasis = "calc(" + newNextPanelSize + "% - " + (this.panels.length - 1) * this.gutterSize + "px)"; - this.panelSizes[this.prevPanelIndex] = newPrevPanelSize; - this.panelSizes[this.prevPanelIndex + 1] = newNextPanelSize; - this.prevSize = parseFloat(newPrevPanelSize).toFixed(4); - } - this.$emit("resize", { - originalEvent: event, - sizes: this.panelSizes - }); - }, "onResize"), - onResizeEnd: /* @__PURE__ */ __name(function onResizeEnd(event) { - if (this.isStateful()) { - this.saveState(); - } - this.$emit("resizeend", { - originalEvent: event, - sizes: this.panelSizes - }); - this.$refs.gutter.forEach(function(gutter) { - return gutter.setAttribute("data-p-gutter-resizing", false); - }); - this.$el.setAttribute("data-p-resizing", false); - this.clear(); - }, "onResizeEnd"), - repeat: /* @__PURE__ */ __name(function repeat(event, index, step) { - this.onResizeStart(event, index, true); - this.onResize(event, step, true); - }, "repeat"), - setTimer: /* @__PURE__ */ __name(function setTimer(event, index, step) { - var _this2 = this; - if (!this.timer) { - this.timer = setInterval(function() { - _this2.repeat(event, index, step); - }, 40); - } - }, "setTimer"), - clearTimer: /* @__PURE__ */ __name(function clearTimer() { - if (this.timer) { - clearInterval(this.timer); - this.timer = null; - } - }, "clearTimer"), - onGutterKeyUp: /* @__PURE__ */ __name(function onGutterKeyUp() { - this.clearTimer(); - this.onResizeEnd(); - }, "onGutterKeyUp"), - onGutterKeyDown: /* @__PURE__ */ __name(function onGutterKeyDown(event, index) { - switch (event.code) { - case "ArrowLeft": { - if (this.layout === "horizontal") { - this.setTimer(event, index, this.step * -1); - } - event.preventDefault(); - break; - } - case "ArrowRight": { - if (this.layout === "horizontal") { - this.setTimer(event, index, this.step); - } - event.preventDefault(); - break; - } - case "ArrowDown": { - if (this.layout === "vertical") { - this.setTimer(event, index, this.step * -1); - } - event.preventDefault(); - break; - } - case "ArrowUp": { - if (this.layout === "vertical") { - this.setTimer(event, index, this.step); - } - event.preventDefault(); - break; - } - } - }, "onGutterKeyDown"), - onGutterMouseDown: /* @__PURE__ */ __name(function onGutterMouseDown(event, index) { - this.onResizeStart(event, index); - this.bindMouseListeners(); - }, "onGutterMouseDown"), - onGutterTouchStart: /* @__PURE__ */ __name(function onGutterTouchStart(event, index) { - this.onResizeStart(event, index); - this.bindTouchListeners(); - event.preventDefault(); - }, "onGutterTouchStart"), - onGutterTouchMove: /* @__PURE__ */ __name(function onGutterTouchMove(event) { - this.onResize(event); - event.preventDefault(); - }, "onGutterTouchMove"), - onGutterTouchEnd: /* @__PURE__ */ __name(function onGutterTouchEnd(event) { - this.onResizeEnd(event); - this.unbindTouchListeners(); - event.preventDefault(); - }, "onGutterTouchEnd"), - bindMouseListeners: /* @__PURE__ */ __name(function bindMouseListeners() { - var _this3 = this; - if (!this.mouseMoveListener) { - this.mouseMoveListener = function(event) { - return _this3.onResize(event); - }; - document.addEventListener("mousemove", this.mouseMoveListener); - } - if (!this.mouseUpListener) { - this.mouseUpListener = function(event) { - _this3.onResizeEnd(event); - _this3.unbindMouseListeners(); - }; - document.addEventListener("mouseup", this.mouseUpListener); - } - }, "bindMouseListeners"), - bindTouchListeners: /* @__PURE__ */ __name(function bindTouchListeners() { - var _this4 = this; - if (!this.touchMoveListener) { - this.touchMoveListener = function(event) { - return _this4.onResize(event.changedTouches[0]); - }; - document.addEventListener("touchmove", this.touchMoveListener); - } - if (!this.touchEndListener) { - this.touchEndListener = function(event) { - _this4.resizeEnd(event); - _this4.unbindTouchListeners(); - }; - document.addEventListener("touchend", this.touchEndListener); - } - }, "bindTouchListeners"), - validateResize: /* @__PURE__ */ __name(function validateResize(newPrevPanelSize, newNextPanelSize) { - if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false; - if (newNextPanelSize > 100 || newNextPanelSize < 0) return false; - var prevPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex], "minSize"); - if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) { - return false; - } - var newPanelMinSize = getVNodeProp(this.panels[this.prevPanelIndex + 1], "minSize"); - if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) { - return false; - } - return true; - }, "validateResize"), - unbindMouseListeners: /* @__PURE__ */ __name(function unbindMouseListeners() { - if (this.mouseMoveListener) { - document.removeEventListener("mousemove", this.mouseMoveListener); - this.mouseMoveListener = null; - } - if (this.mouseUpListener) { - document.removeEventListener("mouseup", this.mouseUpListener); - this.mouseUpListener = null; - } - }, "unbindMouseListeners"), - unbindTouchListeners: /* @__PURE__ */ __name(function unbindTouchListeners() { - if (this.touchMoveListener) { - document.removeEventListener("touchmove", this.touchMoveListener); - this.touchMoveListener = null; - } - if (this.touchEndListener) { - document.removeEventListener("touchend", this.touchEndListener); - this.touchEndListener = null; - } - }, "unbindTouchListeners"), - clear: /* @__PURE__ */ __name(function clear() { - this.dragging = false; - this.size = null; - this.startPos = null; - this.prevPanelElement = null; - this.nextPanelElement = null; - this.prevPanelSize = null; - this.nextPanelSize = null; - this.gutterElement = null; - this.prevPanelIndex = null; - }, "clear"), - isStateful: /* @__PURE__ */ __name(function isStateful() { - return this.stateKey != null; - }, "isStateful"), - getStorage: /* @__PURE__ */ __name(function getStorage() { - switch (this.stateStorage) { - case "local": - return window.localStorage; - case "session": - return window.sessionStorage; - default: - throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are "local" and "session".'); - } - }, "getStorage"), - saveState: /* @__PURE__ */ __name(function saveState() { - if (isArray(this.panelSizes)) { - this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes)); - } - }, "saveState"), - restoreState: /* @__PURE__ */ __name(function restoreState() { - var _this5 = this; - var storage = this.getStorage(); - var stateString = storage.getItem(this.stateKey); - if (stateString) { - this.panelSizes = JSON.parse(stateString); - var children = _toConsumableArray$2(this.$el.children).filter(function(child) { - return child.getAttribute("data-pc-name") === "splitterpanel"; - }); - children.forEach(function(child, i) { - child.style.flexBasis = "calc(" + _this5.panelSizes[i] + "% - " + (_this5.panels.length - 1) * _this5.gutterSize + "px)"; - }); - return true; - } - return false; - }, "restoreState") - }, - computed: { - panels: /* @__PURE__ */ __name(function panels() { - var _this6 = this; - var panels2 = []; - this.$slots["default"]().forEach(function(child) { - if (_this6.isSplitterPanel(child)) { - panels2.push(child); - } else if (child.children instanceof Array) { - child.children.forEach(function(nestedChild) { - if (_this6.isSplitterPanel(nestedChild)) { - panels2.push(nestedChild); - } - }); - } - }); - return panels2; - }, "panels"), - gutterStyle: /* @__PURE__ */ __name(function gutterStyle() { - if (this.horizontal) return { - width: this.gutterSize + "px" - }; - else return { - height: this.gutterSize + "px" - }; - }, "gutterStyle"), - horizontal: /* @__PURE__ */ __name(function horizontal() { - return this.layout === "horizontal"; - }, "horizontal"), - getPTOptions: /* @__PURE__ */ __name(function getPTOptions() { - var _this$$parentInstance; - return { - context: { - nested: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.nestedState - } - }; - }, "getPTOptions") - } -}; -var _hoisted_1$p = ["onMousedown", "onTouchstart", "onTouchmove", "onTouchend"]; -var _hoisted_2$j = ["aria-orientation", "aria-valuenow", "onKeydown"]; -function render$j(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root"), - style: _ctx.sx("root"), - "data-p-resizing": false - }, _ctx.ptmi("root", $options.getPTOptions)), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.panels, function(panel, i) { - return openBlock(), createElementBlock(Fragment, { - key: i - }, [(openBlock(), createBlock(resolveDynamicComponent(panel), { - tabindex: "-1" - })), i !== $options.panels.length - 1 ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - ref_for: true, - ref: "gutter", - "class": _ctx.cx("gutter"), - role: "separator", - tabindex: "-1", - onMousedown: /* @__PURE__ */ __name(function onMousedown($event) { - return $options.onGutterMouseDown($event, i); - }, "onMousedown"), - onTouchstart: /* @__PURE__ */ __name(function onTouchstart($event) { - return $options.onGutterTouchStart($event, i); - }, "onTouchstart"), - onTouchmove: /* @__PURE__ */ __name(function onTouchmove($event) { - return $options.onGutterTouchMove($event, i); - }, "onTouchmove"), - onTouchend: /* @__PURE__ */ __name(function onTouchend($event) { - return $options.onGutterTouchEnd($event, i); - }, "onTouchend"), - "data-p-gutter-resizing": false - }, _ctx.ptm("gutter")), [createBaseVNode("div", mergeProps({ - "class": _ctx.cx("gutterHandle"), - tabindex: "0", - style: [$options.gutterStyle], - "aria-orientation": _ctx.layout, - "aria-valuenow": $data.prevSize, - onKeyup: _cache[0] || (_cache[0] = function() { - return $options.onGutterKeyUp && $options.onGutterKeyUp.apply($options, arguments); - }), - onKeydown: /* @__PURE__ */ __name(function onKeydown2($event) { - return $options.onGutterKeyDown($event, i); - }, "onKeydown"), - ref_for: true - }, _ctx.ptm("gutterHandle")), null, 16, _hoisted_2$j)], 16, _hoisted_1$p)) : createCommentVNode("", true)], 64); - }), 128))], 16); -} -__name(render$j, "render$j"); -script$c.render = render$j; -var classes$9 = { - root: /* @__PURE__ */ __name(function root3(_ref) { - var instance = _ref.instance; - return ["p-splitterpanel", { - "p-splitterpanel-nested": instance.isNested - }]; - }, "root") -}; -var SplitterPanelStyle = BaseStyle.extend({ - name: "splitterpanel", - classes: classes$9 -}); -var script$1$9 = { - name: "BaseSplitterPanel", - "extends": script$e, - props: { - size: { - type: Number, - "default": null - }, - minSize: { - type: Number, - "default": null - } - }, - style: SplitterPanelStyle, - provide: /* @__PURE__ */ __name(function provide3() { - return { - $pcSplitterPanel: this, - $parentInstance: this - }; - }, "provide") -}; -var script$b = { - name: "SplitterPanel", - "extends": script$1$9, - inheritAttrs: false, - data: /* @__PURE__ */ __name(function data2() { - return { - nestedState: null - }; - }, "data"), - computed: { - isNested: /* @__PURE__ */ __name(function isNested() { - var _this = this; - return this.$slots["default"]().some(function(child) { - _this.nestedState = child.type.name === "Splitter" ? true : null; - return _this.nestedState; - }); - }, "isNested"), - getPTOptions: /* @__PURE__ */ __name(function getPTOptions2() { - return { - context: { - nested: this.isNested - } - }; - }, "getPTOptions") - } -}; -function render$i(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - ref: "container", - "class": _ctx.cx("root") - }, _ctx.ptmi("root", $options.getPTOptions)), [renderSlot(_ctx.$slots, "default")], 16); -} -__name(render$i, "render$i"); -script$b.render = render$i; -const _sfc_main$r = /* @__PURE__ */ defineComponent({ - __name: "LiteGraphCanvasSplitterOverlay", - setup(__props) { - const settingStore = useSettingStore(); - const sidebarLocation = computed( - () => settingStore.get("Comfy.Sidebar.Location") - ); - const sidebarPanelVisible = computed( - () => useSidebarTabStore().activeSidebarTab !== null - ); - const bottomPanelVisible = computed( - () => useBottomPanelStore().bottomPanelVisible - ); - const activeSidebarTabId = computed( - () => useSidebarTabStore().activeSidebarTabId - ); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$c), { - class: "splitter-overlay-root splitter-overlay", - "pt:gutter": sidebarPanelVisible.value ? "" : "hidden", - key: activeSidebarTabId.value, - stateKey: activeSidebarTabId.value, - stateStorage: "local" - }, { - default: withCtx(() => [ - sidebarLocation.value === "left" ? withDirectives((openBlock(), createBlock(unref(script$b), { - key: 0, - class: "side-bar-panel", - minSize: 10, - size: 20 - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "side-bar-panel", {}, void 0, true) - ]), - _: 3 - }, 512)), [ - [vShow, sidebarPanelVisible.value] - ]) : createCommentVNode("", true), - createVNode(unref(script$b), { size: 100 }, { - default: withCtx(() => [ - createVNode(unref(script$c), { - class: "splitter-overlay max-w-full", - layout: "vertical", - "pt:gutter": bottomPanelVisible.value ? "" : "hidden", - stateKey: "bottom-panel-splitter", - stateStorage: "local" - }, { - default: withCtx(() => [ - createVNode(unref(script$b), { class: "graph-canvas-panel relative" }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "graph-canvas-panel", {}, void 0, true) - ]), - _: 3 - }), - withDirectives(createVNode(unref(script$b), { class: "bottom-panel" }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "bottom-panel", {}, void 0, true) - ]), - _: 3 - }, 512), [ - [vShow, bottomPanelVisible.value] - ]) - ]), - _: 3 - }, 8, ["pt:gutter"]) - ]), - _: 3 - }), - sidebarLocation.value === "right" ? withDirectives((openBlock(), createBlock(unref(script$b), { - key: 1, - class: "side-bar-panel", - minSize: 10, - size: 20 - }, { - default: withCtx(() => [ - renderSlot(_ctx.$slots, "side-bar-panel", {}, void 0, true) - ]), - _: 3 - }, 512)), [ - [vShow, sidebarPanelVisible.value] - ]) : createCommentVNode("", true) - ]), - _: 3 - }, 8, ["pt:gutter", "stateKey"]); - }; - } -}); -const LiteGraphCanvasSplitterOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-e50caa15"]]); -var classes$8 = { - root: /* @__PURE__ */ __name(function root4(_ref) { - var instance = _ref.instance, props = _ref.props; - return ["p-tab", { - "p-tab-active": instance.active, - "p-disabled": props.disabled - }]; - }, "root") -}; -var TabStyle = BaseStyle.extend({ - name: "tab", - classes: classes$8 -}); -var script$1$8 = { - name: "BaseTab", - "extends": script$e, - props: { - value: { - type: [String, Number], - "default": void 0 - }, - disabled: { - type: Boolean, - "default": false - }, - as: { - type: [String, Object], - "default": "BUTTON" - }, - asChild: { - type: Boolean, - "default": false - } - }, - style: TabStyle, - provide: /* @__PURE__ */ __name(function provide4() { - return { - $pcTab: this, - $parentInstance: this - }; - }, "provide") -}; -var script$a = { - name: "Tab", - "extends": script$1$8, - inheritAttrs: false, - inject: ["$pcTabs", "$pcTabList"], - methods: { - onFocus: /* @__PURE__ */ __name(function onFocus() { - this.$pcTabs.selectOnFocus && this.changeActiveValue(); - }, "onFocus"), - onClick: /* @__PURE__ */ __name(function onClick() { - this.changeActiveValue(); - }, "onClick"), - onKeydown: /* @__PURE__ */ __name(function onKeydown(event) { - switch (event.code) { - case "ArrowRight": - this.onArrowRightKey(event); - break; - case "ArrowLeft": - this.onArrowLeftKey(event); - break; - case "Home": - this.onHomeKey(event); - break; - case "End": - this.onEndKey(event); - break; - case "PageDown": - this.onPageDownKey(event); - break; - case "PageUp": - this.onPageUpKey(event); - break; - case "Enter": - case "NumpadEnter": - case "Space": - this.onEnterKey(event); - break; - } - }, "onKeydown"), - onArrowRightKey: /* @__PURE__ */ __name(function onArrowRightKey(event) { - var nextTab = this.findNextTab(event.currentTarget); - nextTab ? this.changeFocusedTab(event, nextTab) : this.onHomeKey(event); - event.preventDefault(); - }, "onArrowRightKey"), - onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey(event) { - var prevTab = this.findPrevTab(event.currentTarget); - prevTab ? this.changeFocusedTab(event, prevTab) : this.onEndKey(event); - event.preventDefault(); - }, "onArrowLeftKey"), - onHomeKey: /* @__PURE__ */ __name(function onHomeKey(event) { - var firstTab = this.findFirstTab(); - this.changeFocusedTab(event, firstTab); - event.preventDefault(); - }, "onHomeKey"), - onEndKey: /* @__PURE__ */ __name(function onEndKey(event) { - var lastTab = this.findLastTab(); - this.changeFocusedTab(event, lastTab); - event.preventDefault(); - }, "onEndKey"), - onPageDownKey: /* @__PURE__ */ __name(function onPageDownKey(event) { - this.scrollInView(this.findLastTab()); - event.preventDefault(); - }, "onPageDownKey"), - onPageUpKey: /* @__PURE__ */ __name(function onPageUpKey(event) { - this.scrollInView(this.findFirstTab()); - event.preventDefault(); - }, "onPageUpKey"), - onEnterKey: /* @__PURE__ */ __name(function onEnterKey(event) { - this.changeActiveValue(); - event.preventDefault(); - }, "onEnterKey"), - findNextTab: /* @__PURE__ */ __name(function findNextTab(tabElement) { - var selfCheck = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; - var element = selfCheck ? tabElement : tabElement.nextElementSibling; - return element ? getAttribute(element, "data-p-disabled") || getAttribute(element, "data-pc-section") === "inkbar" ? this.findNextTab(element) : findSingle(element, '[data-pc-name="tab"]') : null; - }, "findNextTab"), - findPrevTab: /* @__PURE__ */ __name(function findPrevTab(tabElement) { - var selfCheck = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; - var element = selfCheck ? tabElement : tabElement.previousElementSibling; - return element ? getAttribute(element, "data-p-disabled") || getAttribute(element, "data-pc-section") === "inkbar" ? this.findPrevTab(element) : findSingle(element, '[data-pc-name="tab"]') : null; - }, "findPrevTab"), - findFirstTab: /* @__PURE__ */ __name(function findFirstTab() { - return this.findNextTab(this.$pcTabList.$refs.content.firstElementChild, true); - }, "findFirstTab"), - findLastTab: /* @__PURE__ */ __name(function findLastTab() { - return this.findPrevTab(this.$pcTabList.$refs.content.lastElementChild, true); - }, "findLastTab"), - changeActiveValue: /* @__PURE__ */ __name(function changeActiveValue() { - this.$pcTabs.updateValue(this.value); - }, "changeActiveValue"), - changeFocusedTab: /* @__PURE__ */ __name(function changeFocusedTab(event, element) { - focus(element); - this.scrollInView(element); - }, "changeFocusedTab"), - scrollInView: /* @__PURE__ */ __name(function scrollInView(element) { - var _element$scrollIntoVi; - element === null || element === void 0 || (_element$scrollIntoVi = element.scrollIntoView) === null || _element$scrollIntoVi === void 0 || _element$scrollIntoVi.call(element, { - block: "nearest" - }); - }, "scrollInView") - }, - computed: { - active: /* @__PURE__ */ __name(function active() { - var _this$$pcTabs; - return equals((_this$$pcTabs = this.$pcTabs) === null || _this$$pcTabs === void 0 ? void 0 : _this$$pcTabs.d_value, this.value); - }, "active"), - id: /* @__PURE__ */ __name(function id() { - var _this$$pcTabs2; - return "".concat((_this$$pcTabs2 = this.$pcTabs) === null || _this$$pcTabs2 === void 0 ? void 0 : _this$$pcTabs2.id, "_tab_").concat(this.value); - }, "id"), - ariaControls: /* @__PURE__ */ __name(function ariaControls() { - var _this$$pcTabs3; - return "".concat((_this$$pcTabs3 = this.$pcTabs) === null || _this$$pcTabs3 === void 0 ? void 0 : _this$$pcTabs3.id, "_tabpanel_").concat(this.value); - }, "ariaControls"), - attrs: /* @__PURE__ */ __name(function attrs() { - return mergeProps(this.asAttrs, this.a11yAttrs, this.ptmi("root", this.ptParams)); - }, "attrs"), - asAttrs: /* @__PURE__ */ __name(function asAttrs() { - return this.as === "BUTTON" ? { - type: "button", - disabled: this.disabled - } : void 0; - }, "asAttrs"), - a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs() { - return { - id: this.id, - tabindex: this.active ? this.$pcTabs.tabindex : -1, - role: "tab", - "aria-selected": this.active, - "aria-controls": this.ariaControls, - "data-pc-name": "tab", - "data-p-disabled": this.disabled, - "data-p-active": this.active, - onFocus: this.onFocus, - onKeydown: this.onKeydown - }; - }, "a11yAttrs"), - ptParams: /* @__PURE__ */ __name(function ptParams() { - return { - context: { - active: this.active - } - }; - }, "ptParams") - }, - directives: { - ripple: Ripple - } -}; -function render$h(_ctx, _cache, $props, $setup, $data, $options) { - var _directive_ripple = resolveDirective("ripple"); - return !_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ - key: 0, - "class": _ctx.cx("root"), - onClick: $options.onClick - }, $options.attrs), { - "default": withCtx(function() { - return [renderSlot(_ctx.$slots, "default")]; - }), - _: 3 - }, 16, ["class", "onClick"])), [[_directive_ripple]]) : renderSlot(_ctx.$slots, "default", { - key: 1, - "class": normalizeClass(_ctx.cx("root")), - active: $options.active, - a11yAttrs: $options.a11yAttrs, - onClick: $options.onClick - }); -} -__name(render$h, "render$h"); -script$a.render = render$h; -var classes$7 = { - root: "p-tablist", - content: /* @__PURE__ */ __name(function content(_ref) { - var instance = _ref.instance; - return ["p-tablist-content", { - "p-tablist-viewport": instance.$pcTabs.scrollable - }]; - }, "content"), - tabList: "p-tablist-tab-list", - activeBar: "p-tablist-active-bar", - prevButton: "p-tablist-prev-button p-tablist-nav-button", - nextButton: "p-tablist-next-button p-tablist-nav-button" -}; -var TabListStyle = BaseStyle.extend({ - name: "tablist", - classes: classes$7 -}); -var script$1$7 = { - name: "BaseTabList", - "extends": script$e, - props: {}, - style: TabListStyle, - provide: /* @__PURE__ */ __name(function provide5() { - return { - $pcTabList: this, - $parentInstance: this - }; - }, "provide") -}; -var script$9 = { - name: "TabList", - "extends": script$1$7, - inheritAttrs: false, - inject: ["$pcTabs"], - data: /* @__PURE__ */ __name(function data3() { - return { - isPrevButtonEnabled: false, - isNextButtonEnabled: true - }; - }, "data"), - resizeObserver: void 0, - watch: { - showNavigators: /* @__PURE__ */ __name(function showNavigators(newValue) { - newValue ? this.bindResizeObserver() : this.unbindResizeObserver(); - }, "showNavigators"), - activeValue: { - flush: "post", - handler: /* @__PURE__ */ __name(function handler() { - this.updateInkBar(); - }, "handler") - } - }, - mounted: /* @__PURE__ */ __name(function mounted2() { - var _this = this; - this.$nextTick(function() { - _this.updateInkBar(); - }); - if (this.showNavigators) { - this.updateButtonState(); - this.bindResizeObserver(); - } - }, "mounted"), - updated: /* @__PURE__ */ __name(function updated() { - this.showNavigators && this.updateButtonState(); - }, "updated"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount2() { - this.unbindResizeObserver(); - }, "beforeUnmount"), - methods: { - onScroll: /* @__PURE__ */ __name(function onScroll(event) { - this.showNavigators && this.updateButtonState(); - event.preventDefault(); - }, "onScroll"), - onPrevButtonClick: /* @__PURE__ */ __name(function onPrevButtonClick() { - var content2 = this.$refs.content; - var width = getWidth(content2); - var pos = content2.scrollLeft - width; - content2.scrollLeft = pos <= 0 ? 0 : pos; - }, "onPrevButtonClick"), - onNextButtonClick: /* @__PURE__ */ __name(function onNextButtonClick() { - var content2 = this.$refs.content; - var width = getWidth(content2) - this.getVisibleButtonWidths(); - var pos = content2.scrollLeft + width; - var lastPos = content2.scrollWidth - width; - content2.scrollLeft = pos >= lastPos ? lastPos : pos; - }, "onNextButtonClick"), - bindResizeObserver: /* @__PURE__ */ __name(function bindResizeObserver() { - var _this2 = this; - this.resizeObserver = new ResizeObserver(function() { - return _this2.updateButtonState(); - }); - this.resizeObserver.observe(this.$refs.list); - }, "bindResizeObserver"), - unbindResizeObserver: /* @__PURE__ */ __name(function unbindResizeObserver() { - var _this$resizeObserver; - (_this$resizeObserver = this.resizeObserver) === null || _this$resizeObserver === void 0 || _this$resizeObserver.unobserve(this.$refs.list); - this.resizeObserver = void 0; - }, "unbindResizeObserver"), - updateInkBar: /* @__PURE__ */ __name(function updateInkBar() { - var _this$$refs = this.$refs, content2 = _this$$refs.content, inkbar = _this$$refs.inkbar, tabs = _this$$refs.tabs; - var activeTab = findSingle(content2, '[data-pc-name="tab"][data-p-active="true"]'); - if (this.$pcTabs.isVertical()) { - inkbar.style.height = getOuterHeight(activeTab) + "px"; - inkbar.style.top = getOffset(activeTab).top - getOffset(tabs).top + "px"; - } else { - inkbar.style.width = getOuterWidth(activeTab) + "px"; - inkbar.style.left = getOffset(activeTab).left - getOffset(tabs).left + "px"; - } - }, "updateInkBar"), - updateButtonState: /* @__PURE__ */ __name(function updateButtonState() { - var _this$$refs2 = this.$refs, list = _this$$refs2.list, content2 = _this$$refs2.content; - var scrollLeft = content2.scrollLeft, scrollTop = content2.scrollTop, scrollWidth = content2.scrollWidth, scrollHeight = content2.scrollHeight, offsetWidth = content2.offsetWidth, offsetHeight = content2.offsetHeight; - var _ref = [getWidth(content2), getHeight(content2)], width = _ref[0], height = _ref[1]; - if (this.$pcTabs.isVertical()) { - this.isPrevButtonEnabled = scrollTop !== 0; - this.isNextButtonEnabled = list.offsetHeight >= offsetHeight && parseInt(scrollTop) !== scrollHeight - height; - } else { - this.isPrevButtonEnabled = scrollLeft !== 0; - this.isNextButtonEnabled = list.offsetWidth >= offsetWidth && parseInt(scrollLeft) !== scrollWidth - width; - } - }, "updateButtonState"), - getVisibleButtonWidths: /* @__PURE__ */ __name(function getVisibleButtonWidths() { - var _this$$refs3 = this.$refs, prevBtn = _this$$refs3.prevBtn, nextBtn = _this$$refs3.nextBtn; - return [prevBtn, nextBtn].reduce(function(acc, el) { - return el ? acc + getWidth(el) : acc; - }, 0); - }, "getVisibleButtonWidths") - }, - computed: { - templates: /* @__PURE__ */ __name(function templates() { - return this.$pcTabs.$slots; - }, "templates"), - activeValue: /* @__PURE__ */ __name(function activeValue() { - return this.$pcTabs.d_value; - }, "activeValue"), - showNavigators: /* @__PURE__ */ __name(function showNavigators2() { - return this.$pcTabs.scrollable && this.$pcTabs.showNavigators; - }, "showNavigators"), - prevButtonAriaLabel: /* @__PURE__ */ __name(function prevButtonAriaLabel() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.previous : void 0; - }, "prevButtonAriaLabel"), - nextButtonAriaLabel: /* @__PURE__ */ __name(function nextButtonAriaLabel() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.next : void 0; - }, "nextButtonAriaLabel") - }, - components: { - ChevronLeftIcon: script$f, - ChevronRightIcon: script$g - }, - directives: { - ripple: Ripple - } -}; -var _hoisted_1$o = ["aria-label", "tabindex"]; -var _hoisted_2$i = ["aria-orientation"]; -var _hoisted_3$h = ["aria-label", "tabindex"]; -function render$g(_ctx, _cache, $props, $setup, $data, $options) { - var _directive_ripple = resolveDirective("ripple"); - return openBlock(), createElementBlock("div", mergeProps({ - ref: "list", - "class": _ctx.cx("root") - }, _ctx.ptmi("root")), [$options.showNavigators && $data.isPrevButtonEnabled ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ - key: 0, - ref: "prevButton", - "class": _ctx.cx("prevButton"), - "aria-label": $options.prevButtonAriaLabel, - tabindex: $options.$pcTabs.tabindex, - onClick: _cache[0] || (_cache[0] = function() { - return $options.onPrevButtonClick && $options.onPrevButtonClick.apply($options, arguments); - }) - }, _ctx.ptm("prevButton"), { - "data-pc-group-section": "navigator" - }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.previcon || "ChevronLeftIcon"), mergeProps({ - "aria-hidden": "true" - }, _ctx.ptm("prevIcon")), null, 16))], 16, _hoisted_1$o)), [[_directive_ripple]]) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - ref: "content", - "class": _ctx.cx("content"), - onScroll: _cache[1] || (_cache[1] = function() { - return $options.onScroll && $options.onScroll.apply($options, arguments); - }) - }, _ctx.ptm("content")), [createBaseVNode("div", mergeProps({ - ref: "tabs", - "class": _ctx.cx("tabList"), - role: "tablist", - "aria-orientation": $options.$pcTabs.orientation || "horizontal" - }, _ctx.ptm("tabList")), [renderSlot(_ctx.$slots, "default"), createBaseVNode("span", mergeProps({ - ref: "inkbar", - "class": _ctx.cx("activeBar"), - role: "presentation", - "aria-hidden": "true" - }, _ctx.ptm("activeBar")), null, 16)], 16, _hoisted_2$i)], 16), $options.showNavigators && $data.isNextButtonEnabled ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ - key: 1, - ref: "nextButton", - "class": _ctx.cx("nextButton"), - "aria-label": $options.nextButtonAriaLabel, - tabindex: $options.$pcTabs.tabindex, - onClick: _cache[2] || (_cache[2] = function() { - return $options.onNextButtonClick && $options.onNextButtonClick.apply($options, arguments); - }) - }, _ctx.ptm("nextButton"), { - "data-pc-group-section": "navigator" - }), [(openBlock(), createBlock(resolveDynamicComponent($options.templates.nexticon || "ChevronRightIcon"), mergeProps({ - "aria-hidden": "true" - }, _ctx.ptm("nextIcon")), null, 16))], 16, _hoisted_3$h)), [[_directive_ripple]]) : createCommentVNode("", true)], 16); -} -__name(render$g, "render$g"); -script$9.render = render$g; -const _sfc_main$q = /* @__PURE__ */ defineComponent({ - __name: "ExtensionSlot", - props: { - extension: {} - }, - setup(__props) { - const props = __props; - const mountCustomExtension = /* @__PURE__ */ __name((extension, el) => { - extension.render(el); - }, "mountCustomExtension"); - onBeforeUnmount(() => { - if (props.extension.type === "custom" && props.extension.destroy) { - props.extension.destroy(); - } - }); - return (_ctx, _cache) => { - return _ctx.extension.type === "vue" ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.extension.component), { key: 0 })) : (openBlock(), createElementBlock("div", { - key: 1, - ref: /* @__PURE__ */ __name((el) => { - if (el) - mountCustomExtension( - props.extension, - el - ); - }, "ref") - }, null, 512)); - }; - } -}); -const _hoisted_1$n = { class: "flex flex-col h-full" }; -const _hoisted_2$h = { class: "w-full flex justify-between" }; -const _hoisted_3$g = { class: "tabs-container" }; -const _hoisted_4$6 = { class: "font-bold" }; -const _hoisted_5$4 = { class: "flex-grow h-0" }; -const _sfc_main$p = /* @__PURE__ */ defineComponent({ - __name: "BottomPanel", - setup(__props) { - const bottomPanelStore = useBottomPanelStore(); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$n, [ - createVNode(unref(script$h), { - value: unref(bottomPanelStore).activeBottomPanelTabId, - "onUpdate:value": _cache[1] || (_cache[1] = ($event) => unref(bottomPanelStore).activeBottomPanelTabId = $event) - }, { - default: withCtx(() => [ - createVNode(unref(script$9), { "pt:tabList": "border-none" }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_2$h, [ - createBaseVNode("div", _hoisted_3$g, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(unref(bottomPanelStore).bottomPanelTabs, (tab) => { - return openBlock(), createBlock(unref(script$a), { - key: tab.id, - value: tab.id, - class: "p-3 border-none" - }, { - default: withCtx(() => [ - createBaseVNode("span", _hoisted_4$6, toDisplayString(tab.title.toUpperCase()), 1) - ]), - _: 2 - }, 1032, ["value"]); - }), 128)) - ]), - createVNode(unref(script$d), { - class: "justify-self-end", - icon: "pi pi-times", - severity: "secondary", - size: "small", - text: "", - onClick: _cache[0] || (_cache[0] = ($event) => unref(bottomPanelStore).bottomPanelVisible = false) - }) - ]) - ]), - _: 1 - }) - ]), - _: 1 - }, 8, ["value"]), - createBaseVNode("div", _hoisted_5$4, [ - unref(bottomPanelStore).bottomPanelVisible && unref(bottomPanelStore).activeBottomPanelTab ? (openBlock(), createBlock(_sfc_main$q, { - key: 0, - extension: unref(bottomPanelStore).activeBottomPanelTab - }, null, 8, ["extension"])) : createCommentVNode("", true) - ]) - ]); - }; - } -}); -const _hoisted_1$m = { - viewBox: "0 0 1024 1024", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$g = /* @__PURE__ */ createBaseVNode("path", { - fill: "currentColor", - d: "M921.088 103.232L584.832 889.024L465.52 544.512L121.328 440.48zM1004.46.769c-6.096 0-13.52 1.728-22.096 5.36L27.708 411.2c-34.383 14.592-36.56 42.704-4.847 62.464l395.296 123.584l129.36 403.264c9.28 15.184 20.496 22.72 31.263 22.72c11.936 0 23.296-9.152 31.04-27.248l408.272-953.728C1029.148 16.368 1022.86.769 1004.46.769" -}, null, -1); -const _hoisted_3$f = [ - _hoisted_2$g -]; -function render$f(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$m, [..._hoisted_3$f]); -} -__name(render$f, "render$f"); -const __unplugin_components_1$2 = markRaw({ name: "simple-line-icons-cursor", render: render$f }); -const _hoisted_1$l = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$f = /* @__PURE__ */ createBaseVNode("path", { - fill: "currentColor", - d: "M10.05 23q-.75 0-1.4-.337T7.575 21.7L1.2 12.375l.6-.575q.475-.475 1.125-.55t1.175.3L7 13.575V4q0-.425.288-.712T8 3t.713.288T9 4v13.425l-3.7-2.6l3.925 5.725q.125.2.35.325t.475.125H17q.825 0 1.413-.587T19 19V5q0-.425.288-.712T20 4t.713.288T21 5v14q0 1.65-1.175 2.825T17 23zM11 12V2q0-.425.288-.712T12 1t.713.288T13 2v10zm4 0V3q0-.425.288-.712T16 2t.713.288T17 3v9zm-2.85 4.5" -}, null, -1); -const _hoisted_3$e = [ - _hoisted_2$f -]; -function render$e(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$l, [..._hoisted_3$e]); -} -__name(render$e, "render$e"); -const __unplugin_components_0$2 = markRaw({ name: "material-symbols-pan-tool-outline", render: render$e }); -var theme$6 = /* @__PURE__ */ __name(function theme2(_ref) { - _ref.dt; - return "\n.p-buttongroup .p-button {\n margin: 0;\n}\n\n.p-buttongroup .p-button:not(:last-child),\n.p-buttongroup .p-button:not(:last-child):hover {\n border-right: 0 none;\n}\n\n.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {\n border-radius: 0;\n}\n\n.p-buttongroup .p-button:first-of-type:not(:only-of-type) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-buttongroup .p-button:last-of-type:not(:only-of-type) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-buttongroup .p-button:focus {\n position: relative;\n z-index: 1;\n}\n"; -}, "theme"); -var classes$6 = { - root: "p-buttongroup p-component" -}; -var ButtonGroupStyle = BaseStyle.extend({ - name: "buttongroup", - theme: theme$6, - classes: classes$6 -}); -var script$1$6 = { - name: "BaseButtonGroup", - "extends": script$e, - style: ButtonGroupStyle, - provide: /* @__PURE__ */ __name(function provide6() { - return { - $pcButtonGroup: this, - $parentInstance: this - }; - }, "provide") -}; -var script$8 = { - name: "ButtonGroup", - "extends": script$1$6, - inheritAttrs: false -}; -function render$d(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("span", mergeProps({ - "class": _ctx.cx("root"), - role: "group" - }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); -} -__name(render$d, "render$d"); -script$8.render = render$d; -const useTitleEditorStore = defineStore("titleEditor", () => { - const titleEditorTarget = shallowRef(null); - return { - titleEditorTarget - }; -}); -const useCanvasStore = defineStore("canvas", () => { - const canvas = shallowRef(null); - return { - canvas - }; -}); -const _sfc_main$o = /* @__PURE__ */ defineComponent({ - __name: "GraphCanvasMenu", - setup(__props) { - const { t } = useI18n(); - const commandStore = useCommandStore(); - const canvasStore = useCanvasStore(); - const settingStore = useSettingStore(); - const linkHidden = computed( - () => settingStore.get("Comfy.LinkRenderMode") === LiteGraph.HIDDEN_LINK - ); - let interval = null; - const repeat2 = /* @__PURE__ */ __name((command) => { - if (interval) return; - const cmd = /* @__PURE__ */ __name(() => commandStore.execute(command), "cmd"); - cmd(); - interval = window.setInterval(cmd, 100); - }, "repeat"); - const stopRepeat = /* @__PURE__ */ __name(() => { - if (interval) { - clearInterval(interval); - interval = null; - } - }, "stopRepeat"); - return (_ctx, _cache) => { - const _component_i_material_symbols58pan_tool_outline = __unplugin_components_0$2; - const _component_i_simple_line_icons58cursor = __unplugin_components_1$2; - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createBlock(unref(script$8), { class: "p-buttongroup-vertical absolute bottom-[10px] right-[10px] z-[1000] pointer-events-auto" }, { - default: withCtx(() => [ - withDirectives(createVNode(unref(script$d), { - severity: "secondary", - icon: "pi pi-plus", - "aria-label": _ctx.$t("graphCanvasMenu.zoomIn"), - onMousedown: _cache[0] || (_cache[0] = ($event) => repeat2("Comfy.Canvas.ZoomIn")), - onMouseup: stopRepeat - }, null, 8, ["aria-label"]), [ - [ - _directive_tooltip, - unref(t)("graphCanvasMenu.zoomIn"), - void 0, - { left: true } - ] - ]), - withDirectives(createVNode(unref(script$d), { - severity: "secondary", - icon: "pi pi-minus", - "aria-label": _ctx.$t("graphCanvasMenu.zoomOut"), - onMousedown: _cache[1] || (_cache[1] = ($event) => repeat2("Comfy.Canvas.ZoomOut")), - onMouseup: stopRepeat - }, null, 8, ["aria-label"]), [ - [ - _directive_tooltip, - unref(t)("graphCanvasMenu.zoomOut"), - void 0, - { left: true } - ] - ]), - withDirectives(createVNode(unref(script$d), { - severity: "secondary", - icon: "pi pi-expand", - "aria-label": _ctx.$t("graphCanvasMenu.fitView"), - onClick: _cache[2] || (_cache[2] = () => unref(commandStore).execute("Comfy.Canvas.FitView")) - }, null, 8, ["aria-label"]), [ - [ - _directive_tooltip, - unref(t)("graphCanvasMenu.fitView"), - void 0, - { left: true } - ] - ]), - withDirectives((openBlock(), createBlock(unref(script$d), { - severity: "secondary", - "aria-label": unref(t)( - "graphCanvasMenu." + (unref(canvasStore).canvas?.read_only ? "panMode" : "selectMode") - ), - onClick: _cache[3] || (_cache[3] = () => unref(commandStore).execute("Comfy.Canvas.ToggleLock")) - }, { - icon: withCtx(() => [ - unref(canvasStore).canvas?.read_only ? (openBlock(), createBlock(_component_i_material_symbols58pan_tool_outline, { key: 0 })) : (openBlock(), createBlock(_component_i_simple_line_icons58cursor, { key: 1 })) - ]), - _: 1 - }, 8, ["aria-label"])), [ - [ - _directive_tooltip, - unref(t)( - "graphCanvasMenu." + (unref(canvasStore).canvas?.read_only ? "panMode" : "selectMode") - ) + " (Space)", - void 0, - { left: true } - ] - ]), - withDirectives(createVNode(unref(script$d), { - severity: "secondary", - icon: linkHidden.value ? "pi pi-eye-slash" : "pi pi-eye", - "aria-label": _ctx.$t("graphCanvasMenu.toggleLinkVisibility"), - onClick: _cache[4] || (_cache[4] = () => unref(commandStore).execute("Comfy.Canvas.ToggleLinkVisibility")), - "data-testid": "toggle-link-visibility-button" - }, null, 8, ["icon", "aria-label"]), [ - [ - _directive_tooltip, - unref(t)("graphCanvasMenu.toggleLinkVisibility"), - void 0, - { left: true } - ] - ]) - ]), - _: 1 - }); - }; - } -}); -const GraphCanvasMenu = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-cb8f9a1a"]]); -const _sfc_main$n = /* @__PURE__ */ defineComponent({ - __name: "NodeBadge", - setup(__props) { - const settingStore = useSettingStore(); - const colorPaletteStore = useColorPaletteStore(); - const nodeSourceBadgeMode = computed( - () => settingStore.get("Comfy.NodeBadge.NodeSourceBadgeMode") - ); - const nodeIdBadgeMode = computed( - () => settingStore.get("Comfy.NodeBadge.NodeIdBadgeMode") - ); - const nodeLifeCycleBadgeMode = computed( - () => settingStore.get("Comfy.NodeBadge.NodeLifeCycleBadgeMode") - ); - watch([nodeSourceBadgeMode, nodeIdBadgeMode, nodeLifeCycleBadgeMode], () => { - app.graph?.setDirtyCanvas(true, true); - }); - const nodeDefStore = useNodeDefStore(); - function badgeTextVisible(nodeDef, badgeMode) { - return !(badgeMode === NodeBadgeMode.None || nodeDef?.isCoreNode && badgeMode === NodeBadgeMode.HideBuiltIn); - } - __name(badgeTextVisible, "badgeTextVisible"); - onMounted(() => { - app.registerExtension({ - name: "Comfy.NodeBadge", - nodeCreated(node) { - node.badgePosition = BadgePosition.TopRight; - const badge = computed(() => { - const nodeDef = nodeDefStore.fromLGraphNode(node); - return new LGraphBadge({ - text: _.truncate( - [ - badgeTextVisible(nodeDef, nodeIdBadgeMode.value) ? `#${node.id}` : "", - badgeTextVisible(nodeDef, nodeLifeCycleBadgeMode.value) ? nodeDef?.nodeLifeCycleBadgeText ?? "" : "", - badgeTextVisible(nodeDef, nodeSourceBadgeMode.value) ? nodeDef?.nodeSource?.badgeText ?? "" : "" - ].filter((s) => s.length > 0).join(" "), - { - length: 31 - } - ), - fgColor: colorPaletteStore.completedActivePalette.colors.litegraph_base.BADGE_FG_COLOR, - bgColor: colorPaletteStore.completedActivePalette.colors.litegraph_base.BADGE_BG_COLOR - }); - }); - node.badges.push(() => badge.value); - } - }); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div"); - }; - } -}); -const _sfc_main$m = /* @__PURE__ */ defineComponent({ - __name: "NodeTooltip", - setup(__props) { - let idleTimeout; - const nodeDefStore = useNodeDefStore(); - const tooltipRef = ref(); - const tooltipText = ref(""); - const left = ref(); - const top = ref(); - const hideTooltip = /* @__PURE__ */ __name(() => tooltipText.value = null, "hideTooltip"); - const showTooltip = /* @__PURE__ */ __name(async (tooltip) => { - if (!tooltip) return; - left.value = app.canvas.mouse[0] + "px"; - top.value = app.canvas.mouse[1] + "px"; - tooltipText.value = tooltip; - await nextTick(); - const rect = tooltipRef.value.getBoundingClientRect(); - if (rect.right > window.innerWidth) { - left.value = app.canvas.mouse[0] - rect.width + "px"; - } - if (rect.top < 0) { - top.value = app.canvas.mouse[1] + rect.height + "px"; - } - }, "showTooltip"); - const onIdle = /* @__PURE__ */ __name(() => { - const { canvas } = app; - const node = canvas.node_over; - if (!node) return; - const ctor = node.constructor; - const nodeDef = nodeDefStore.nodeDefsByName[node.type]; - if (ctor.title_mode !== LiteGraph.NO_TITLE && canvas.graph_mouse[1] < node.pos[1]) { - return showTooltip(nodeDef.description); - } - if (node.flags?.collapsed) return; - const inputSlot = canvas.isOverNodeInput( - node, - canvas.graph_mouse[0], - canvas.graph_mouse[1], - [0, 0] - ); - if (inputSlot !== -1) { - const inputName = node.inputs[inputSlot].name; - const translatedTooltip = st( - `nodeDefs.${normalizeI18nKey(node.type)}.inputs.${normalizeI18nKey(inputName)}.tooltip`, - nodeDef.inputs.getInput(inputName)?.tooltip - ); - return showTooltip(translatedTooltip); - } - const outputSlot = canvas.isOverNodeOutput( - node, - canvas.graph_mouse[0], - canvas.graph_mouse[1], - [0, 0] - ); - if (outputSlot !== -1) { - const translatedTooltip = st( - `nodeDefs.${normalizeI18nKey(node.type)}.outputs.${outputSlot}.tooltip`, - nodeDef.outputs.all?.[outputSlot]?.tooltip - ); - return showTooltip(translatedTooltip); - } - const widget = app.canvas.getWidgetAtCursor(); - if (widget && !widget.element) { - const translatedTooltip = st( - `nodeDefs.${normalizeI18nKey(node.type)}.inputs.${normalizeI18nKey(widget.name)}.tooltip`, - nodeDef.inputs.getInput(widget.name)?.tooltip - ); - return showTooltip(widget.tooltip ?? translatedTooltip); - } - }, "onIdle"); - const onMouseMove = /* @__PURE__ */ __name((e) => { - hideTooltip(); - clearTimeout(idleTimeout); - if (e.target.nodeName !== "CANVAS") return; - idleTimeout = window.setTimeout(onIdle, 500); - }, "onMouseMove"); - useEventListener(window, "mousemove", onMouseMove); - useEventListener(window, "click", hideTooltip); - return (_ctx, _cache) => { - return tooltipText.value ? (openBlock(), createElementBlock("div", { - key: 0, - ref_key: "tooltipRef", - ref: tooltipRef, - class: "node-tooltip", - style: normalizeStyle({ left: left.value, top: top.value }) - }, toDisplayString(tooltipText.value), 5)) : createCommentVNode("", true); - }; - } -}); -const NodeTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-46859edf"]]); -const _sfc_main$l = /* @__PURE__ */ defineComponent({ - __name: "TitleEditor", - setup(__props) { - const settingStore = useSettingStore(); - const showInput = ref(false); - const editedTitle = ref(""); - const inputStyle = ref({ - position: "fixed", - left: "0px", - top: "0px", - width: "200px", - height: "20px", - fontSize: "12px" - }); - const titleEditorStore = useTitleEditorStore(); - const canvasStore = useCanvasStore(); - const previousCanvasDraggable = ref(true); - const onEdit = /* @__PURE__ */ __name((newValue) => { - if (titleEditorStore.titleEditorTarget && newValue.trim() !== "") { - titleEditorStore.titleEditorTarget.title = newValue.trim(); - app.graph.setDirtyCanvas(true, true); - } - showInput.value = false; - titleEditorStore.titleEditorTarget = null; - canvasStore.canvas.allow_dragcanvas = previousCanvasDraggable.value; - }, "onEdit"); - watch( - () => titleEditorStore.titleEditorTarget, - (target) => { - if (target === null) { - return; - } - editedTitle.value = target.title; - showInput.value = true; - previousCanvasDraggable.value = canvasStore.canvas.allow_dragcanvas; - canvasStore.canvas.allow_dragcanvas = false; - if (target instanceof LGraphGroup) { - const group = target; - const [x, y] = group.pos; - const [w, h] = group.size; - const [left, top] = app.canvasPosToClientPos([x, y]); - inputStyle.value.left = `${left}px`; - inputStyle.value.top = `${top}px`; - const width = w * app.canvas.ds.scale; - const height = group.titleHeight * app.canvas.ds.scale; - inputStyle.value.width = `${width}px`; - inputStyle.value.height = `${height}px`; - const fontSize = group.font_size * app.canvas.ds.scale; - inputStyle.value.fontSize = `${fontSize}px`; - } else if (target instanceof LGraphNode) { - const node = target; - const [x, y] = node.getBounding(); - const canvasWidth = node.width; - const canvasHeight = LiteGraph.NODE_TITLE_HEIGHT; - const [left, top] = app.canvasPosToClientPos([x, y]); - inputStyle.value.left = `${left}px`; - inputStyle.value.top = `${top}px`; - const width = canvasWidth * app.canvas.ds.scale; - const height = canvasHeight * app.canvas.ds.scale; - inputStyle.value.width = `${width}px`; - inputStyle.value.height = `${height}px`; - const fontSize = 12 * app.canvas.ds.scale; - inputStyle.value.fontSize = `${fontSize}px`; - } - } - ); - const canvasEventHandler = /* @__PURE__ */ __name((event) => { - if (event.detail.subType === "group-double-click") { - if (!settingStore.get("Comfy.Group.DoubleClickTitleToEdit")) { - return; - } - const group = event.detail.group; - const [x, y] = group.pos; - const e = event.detail.originalEvent; - const relativeY = e.canvasY - y; - if (relativeY <= group.titleHeight) { - titleEditorStore.titleEditorTarget = group; - } - } else if (event.detail.subType === "node-double-click") { - if (!settingStore.get("Comfy.Node.DoubleClickTitleToEdit")) { - return; - } - const node = event.detail.node; - const [x, y] = node.pos; - const e = event.detail.originalEvent; - const relativeY = e.canvasY - y; - if (relativeY <= 0) { - titleEditorStore.titleEditorTarget = node; - } - } - }, "canvasEventHandler"); - useEventListener(document, "litegraph:canvas", canvasEventHandler); - return (_ctx, _cache) => { - return showInput.value ? (openBlock(), createElementBlock("div", { - key: 0, - class: "group-title-editor node-title-editor", - style: normalizeStyle(inputStyle.value) - }, [ - createVNode(EditableText, { - isEditing: showInput.value, - modelValue: editedTitle.value, - onEdit - }, null, 8, ["isEditing", "modelValue"]) - ], 4)) : createCommentVNode("", true); - }; - } -}); -const TitleEditor = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-12d3fd12"]]); -const useSearchBoxStore = defineStore("searchBox", () => { - const visible = ref(false); - function toggleVisible() { - visible.value = !visible.value; - } - __name(toggleVisible, "toggleVisible"); - return { - visible, - toggleVisible - }; -}); -class ConnectingLinkImpl { - static { - __name(this, "ConnectingLinkImpl"); - } - constructor(node, slot, input, output, pos, afterRerouteId) { - this.node = node; - this.slot = slot; - this.input = input; - this.output = output; - this.pos = pos; - this.afterRerouteId = afterRerouteId; - } - static createFromPlainObject(obj) { - return new ConnectingLinkImpl( - obj.node, - obj.slot, - obj.input, - obj.output, - obj.pos, - obj.afterRerouteId - ); - } - get type() { - const result = this.input ? this.input.type : this.output?.type ?? null; - return result === -1 ? null : result; - } - /** - * Which slot type is release and need to be reconnected. - * - 'output' means we need a new node's outputs slot to connect with this link - */ - get releaseSlotType() { - return this.output ? "input" : "output"; - } - connectTo(newNode) { - const newNodeSlots = this.releaseSlotType === "output" ? newNode.outputs : newNode.inputs; - if (!newNodeSlots) return; - const newNodeSlot = newNodeSlots.findIndex( - (slot) => LiteGraph.isValidConnection(slot.type, this.type) - ); - if (newNodeSlot === -1) { - console.warn( - `Could not find slot with type ${this.type} on node ${newNode.title}. This should never happen` - ); - return; - } - if (this.releaseSlotType === "input") { - this.node.connect(this.slot, newNode, newNodeSlot, this.afterRerouteId); - } else { - newNode.connect(newNodeSlot, this.node, this.slot, this.afterRerouteId); - } - } -} -var theme$5 = /* @__PURE__ */ __name(function theme3(_ref) { - var dt = _ref.dt; - return "\n.p-autocomplete {\n display: inline-flex;\n}\n\n.p-autocomplete-loader {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n right: ".concat(dt("autocomplete.padding.x"), ";\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {\n right: calc(").concat(dt("autocomplete.dropdown.width"), " + ").concat(dt("autocomplete.padding.x"), ");\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,\n.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.p-autocomplete-dropdown {\n cursor: pointer;\n display: inline-flex;\n cursor: pointer;\n user-select: none;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("autocomplete.dropdown.width"), ";\n border-top-right-radius: ").concat(dt("autocomplete.dropdown.border.radius"), ";\n border-bottom-right-radius: ").concat(dt("autocomplete.dropdown.border.radius"), ";\n background: ").concat(dt("autocomplete.dropdown.background"), ";\n border: 1px solid ").concat(dt("autocomplete.dropdown.border.color"), ";\n border-left: 0 none;\n color: ").concat(dt("autocomplete.dropdown.color"), ";\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ", outline-color ").concat(dt("autocomplete.transition.duration"), ", box-shadow ").concat(dt("autocomplete.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-autocomplete-dropdown:not(:disabled):hover {\n background: ").concat(dt("autocomplete.dropdown.hover.background"), ";\n border-color: ").concat(dt("autocomplete.dropdown.hover.border.color"), ";\n color: ").concat(dt("autocomplete.dropdown.hover.color"), ";\n}\n\n.p-autocomplete-dropdown:not(:disabled):active {\n background: ").concat(dt("autocomplete.dropdown.active.background"), ";\n border-color: ").concat(dt("autocomplete.dropdown.active.border.color"), ";\n color: ").concat(dt("autocomplete.dropdown.active.color"), ";\n}\n\n.p-autocomplete-dropdown:focus-visible {\n box-shadow: ").concat(dt("autocomplete.dropdown.focus.ring.shadow"), ";\n outline: ").concat(dt("autocomplete.dropdown.focus.ring.width"), " ").concat(dt("autocomplete.dropdown.focus.ring.style"), " ").concat(dt("autocomplete.dropdown.focus.ring.color"), ";\n outline-offset: ").concat(dt("autocomplete.dropdown.focus.ring.offset"), ";\n}\n\n.p-autocomplete .p-autocomplete-overlay {\n min-width: 100%;\n}\n\n.p-autocomplete-overlay {\n position: absolute;\n overflow: auto;\n top: 0;\n left: 0;\n background: ").concat(dt("autocomplete.overlay.background"), ";\n color: ").concat(dt("autocomplete.overlay.color"), ";\n border: 1px solid ").concat(dt("autocomplete.overlay.border.color"), ";\n border-radius: ").concat(dt("autocomplete.overlay.border.radius"), ";\n box-shadow: ").concat(dt("autocomplete.overlay.shadow"), ";\n}\n\n.p-autocomplete-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("autocomplete.list.gap"), ";\n padding: ").concat(dt("autocomplete.list.padding"), ";\n}\n\n.p-autocomplete-option {\n cursor: pointer;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n display: flex;\n align-items: center;\n padding: ").concat(dt("autocomplete.option.padding"), ";\n border: 0 none;\n color: ").concat(dt("autocomplete.option.color"), ";\n background: transparent;\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ";\n border-radius: ").concat(dt("autocomplete.option.border.radius"), ";\n}\n\n.p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {\n background: ").concat(dt("autocomplete.option.focus.background"), ";\n color: ").concat(dt("autocomplete.option.focus.color"), ";\n}\n\n.p-autocomplete-option-selected {\n background: ").concat(dt("autocomplete.option.selected.background"), ";\n color: ").concat(dt("autocomplete.option.selected.color"), ";\n}\n\n.p-autocomplete-option-selected.p-focus {\n background: ").concat(dt("autocomplete.option.selected.focus.background"), ";\n color: ").concat(dt("autocomplete.option.selected.focus.color"), ";\n}\n\n.p-autocomplete-option-group {\n margin: 0;\n padding: ").concat(dt("autocomplete.option.group.padding"), ";\n color: ").concat(dt("autocomplete.option.group.color"), ";\n background: ").concat(dt("autocomplete.option.group.background"), ";\n font-weight: ").concat(dt("autocomplete.option.group.font.weight"), ";\n}\n\n.p-autocomplete-input-multiple {\n margin: 0;\n list-style-type: none;\n cursor: text;\n overflow: hidden;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n padding: calc(").concat(dt("autocomplete.padding.y"), " / 2) ").concat(dt("autocomplete.padding.x"), ";\n gap: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n color: ").concat(dt("autocomplete.color"), ";\n background: ").concat(dt("autocomplete.background"), ";\n border: 1px solid ").concat(dt("autocomplete.border.color"), ";\n border-radius: ").concat(dt("autocomplete.border.radius"), ";\n width: 100%;\n transition: background ").concat(dt("autocomplete.transition.duration"), ", color ").concat(dt("autocomplete.transition.duration"), ", border-color ").concat(dt("autocomplete.transition.duration"), ", outline-color ").concat(dt("autocomplete.transition.duration"), ", box-shadow ").concat(dt("autocomplete.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("autocomplete.shadow"), ";\n}\n\n.p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.hover.border.color"), ";\n}\n\n.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.focus.border.color"), ";\n box-shadow: ").concat(dt("autocomplete.focus.ring.shadow"), ";\n outline: ").concat(dt("autocomplete.focus.ring.width"), " ").concat(dt("autocomplete.focus.ring.style"), " ").concat(dt("autocomplete.focus.ring.color"), ";\n outline-offset: ").concat(dt("autocomplete.focus.ring.offset"), ";\n}\n\n.p-autocomplete.p-invalid .p-autocomplete-input-multiple {\n border-color: ").concat(dt("autocomplete.invalid.border.color"), ";\n}\n\n.p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.background"), ";\n}\n\n.p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple {\n background: ").concat(dt("autocomplete.filled.focus.background"), ";\n}\n\n.p-autocomplete.p-disabled .p-autocomplete-input-multiple {\n opacity: 1;\n background: ").concat(dt("autocomplete.disabled.background"), ";\n color: ").concat(dt("autocomplete.disabled.color"), ";\n}\n\n.p-autocomplete-chip.p-chip {\n padding-top: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-bottom: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n border-radius: ").concat(dt("autocomplete.chip.border.radius"), ";\n}\n\n.p-autocomplete-input-multiple:has(.p-autocomplete-chip) {\n padding-left: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-right: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n}\n\n.p-autocomplete-chip-item.p-focus .p-autocomplete-chip {\n background: ").concat(dt("inputchips.chip.focus.background"), ";\n color: ").concat(dt("inputchips.chip.focus.color"), ";\n}\n\n.p-autocomplete-input-chip {\n flex: 1 1 auto;\n display: inline-flex;\n padding-top: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n padding-bottom: calc(").concat(dt("autocomplete.padding.y"), " / 2);\n}\n\n.p-autocomplete-input-chip input {\n border: 0 none;\n outline: 0 none;\n background: transparent;\n margin: 0;\n padding: 0;\n box-shadow: none;\n border-radius: 0;\n width: 100%;\n font-family: inherit;\n font-feature-settings: inherit;\n font-size: 1rem;\n color: inherit;\n}\n\n.p-autocomplete-input-chip input::placeholder {\n color: ").concat(dt("autocomplete.placeholder.color"), ";\n}\n\n.p-autocomplete-empty-message {\n padding: ").concat(dt("autocomplete.empty.message.padding"), ";\n}\n\n.p-autocomplete-fluid {\n display: flex;\n}\n\n.p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input {\n width: 1%;\n}\n"); -}, "theme"); -var inlineStyles$3 = { - root: { - position: "relative" - } -}; -var classes$5 = { - root: /* @__PURE__ */ __name(function root5(_ref2) { - var instance = _ref2.instance, props = _ref2.props; - return ["p-autocomplete p-component p-inputwrapper", { - "p-disabled": props.disabled, - "p-invalid": props.invalid, - "p-focus": instance.focused, - "p-inputwrapper-filled": props.modelValue || isNotEmpty(instance.inputValue), - "p-inputwrapper-focus": instance.focused, - "p-autocomplete-open": instance.overlayVisible, - "p-autocomplete-fluid": instance.hasFluid - }]; - }, "root"), - pcInput: "p-autocomplete-input", - inputMultiple: /* @__PURE__ */ __name(function inputMultiple(_ref3) { - var props = _ref3.props, instance = _ref3.instance; - return ["p-autocomplete-input-multiple", { - "p-variant-filled": props.variant ? props.variant === "filled" : instance.$primevue.config.inputStyle === "filled" || instance.$primevue.config.inputVariant === "filled" - }]; - }, "inputMultiple"), - chipItem: /* @__PURE__ */ __name(function chipItem(_ref4) { - var instance = _ref4.instance, i = _ref4.i; - return ["p-autocomplete-chip-item", { - "p-focus": instance.focusedMultipleOptionIndex === i - }]; - }, "chipItem"), - pcChip: "p-autocomplete-chip", - chipIcon: "p-autocomplete-chip-icon", - inputChip: "p-autocomplete-input-chip", - loader: "p-autocomplete-loader", - dropdown: "p-autocomplete-dropdown", - overlay: "p-autocomplete-overlay p-component", - list: "p-autocomplete-list", - optionGroup: "p-autocomplete-option-group", - option: /* @__PURE__ */ __name(function option(_ref5) { - var instance = _ref5.instance, _option = _ref5.option, i = _ref5.i, getItemOptions = _ref5.getItemOptions; - return ["p-autocomplete-option", { - "p-autocomplete-option-selected": instance.isSelected(_option), - "p-focus": instance.focusedOptionIndex === instance.getOptionIndex(i, getItemOptions), - "p-disabled": instance.isOptionDisabled(_option) - }]; - }, "option"), - emptyMessage: "p-autocomplete-empty-message" -}; -var AutoCompleteStyle = BaseStyle.extend({ - name: "autocomplete", - theme: theme$5, - classes: classes$5, - inlineStyles: inlineStyles$3 -}); -var script$1$5 = { - name: "BaseAutoComplete", - "extends": script$e, - props: { - modelValue: null, - suggestions: { - type: Array, - "default": null - }, - optionLabel: null, - optionDisabled: null, - optionGroupLabel: null, - optionGroupChildren: null, - scrollHeight: { - type: String, - "default": "14rem" - }, - dropdown: { - type: Boolean, - "default": false - }, - dropdownMode: { - type: String, - "default": "blank" - }, - multiple: { - type: Boolean, - "default": false - }, - loading: { - type: Boolean, - "default": false - }, - variant: { - type: String, - "default": null - }, - invalid: { - type: Boolean, - "default": false - }, - disabled: { - type: Boolean, - "default": false - }, - placeholder: { - type: String, - "default": null - }, - dataKey: { - type: String, - "default": null - }, - minLength: { - type: Number, - "default": 1 - }, - delay: { - type: Number, - "default": 300 - }, - appendTo: { - type: [String, Object], - "default": "body" - }, - forceSelection: { - type: Boolean, - "default": false - }, - completeOnFocus: { - type: Boolean, - "default": false - }, - inputId: { - type: String, - "default": null - }, - inputStyle: { - type: Object, - "default": null - }, - inputClass: { - type: [String, Object], - "default": null - }, - panelStyle: { - type: Object, - "default": null - }, - panelClass: { - type: [String, Object], - "default": null - }, - overlayStyle: { - type: Object, - "default": null - }, - overlayClass: { - type: [String, Object], - "default": null - }, - dropdownIcon: { - type: String, - "default": null - }, - dropdownClass: { - type: [String, Object], - "default": null - }, - loader: { - type: String, - "default": null - }, - loadingIcon: { - type: String, - "default": null - }, - removeTokenIcon: { - type: String, - "default": null - }, - chipIcon: { - type: String, - "default": null - }, - virtualScrollerOptions: { - type: Object, - "default": null - }, - autoOptionFocus: { - type: Boolean, - "default": false - }, - selectOnFocus: { - type: Boolean, - "default": false - }, - focusOnHover: { - type: Boolean, - "default": true - }, - searchLocale: { - type: String, - "default": void 0 - }, - searchMessage: { - type: String, - "default": null - }, - selectionMessage: { - type: String, - "default": null - }, - emptySelectionMessage: { - type: String, - "default": null - }, - emptySearchMessage: { - type: String, - "default": null - }, - tabindex: { - type: Number, - "default": 0 - }, - typeahead: { - type: Boolean, - "default": true - }, - ariaLabel: { - type: String, - "default": null - }, - ariaLabelledby: { - type: String, - "default": null - }, - fluid: { - type: Boolean, - "default": null - } - }, - style: AutoCompleteStyle, - provide: /* @__PURE__ */ __name(function provide7() { - return { - $pcAutoComplete: this, - $parentInstance: this - }; - }, "provide") -}; -function _typeof$1$1(o) { - "@babel/helpers - typeof"; - return _typeof$1$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$1$1(o); -} -__name(_typeof$1$1, "_typeof$1$1"); -function _toConsumableArray$1(r) { - return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1(); -} -__name(_toConsumableArray$1, "_toConsumableArray$1"); -function _nonIterableSpread$1() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -__name(_nonIterableSpread$1, "_nonIterableSpread$1"); -function _unsupportedIterableToArray$1(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray$1(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; - } -} -__name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray$1"); -function _iterableToArray$1(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -__name(_iterableToArray$1, "_iterableToArray$1"); -function _arrayWithoutHoles$1(r) { - if (Array.isArray(r)) return _arrayLikeToArray$1(r); -} -__name(_arrayWithoutHoles$1, "_arrayWithoutHoles$1"); -function _arrayLikeToArray$1(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -__name(_arrayLikeToArray$1, "_arrayLikeToArray$1"); -var script$7 = { - name: "AutoComplete", - "extends": script$1$5, - inheritAttrs: false, - emits: ["update:modelValue", "change", "focus", "blur", "item-select", "item-unselect", "option-select", "option-unselect", "dropdown-click", "clear", "complete", "before-show", "before-hide", "show", "hide"], - inject: { - $pcFluid: { - "default": null - } - }, - outsideClickListener: null, - resizeListener: null, - scrollHandler: null, - overlay: null, - virtualScroller: null, - searchTimeout: null, - dirty: false, - data: /* @__PURE__ */ __name(function data4() { - return { - id: this.$attrs.id, - clicked: false, - focused: false, - focusedOptionIndex: -1, - focusedMultipleOptionIndex: -1, - overlayVisible: false, - searching: false - }; - }, "data"), - watch: { - "$attrs.id": /* @__PURE__ */ __name(function $attrsId(newValue) { - this.id = newValue || UniqueComponentId(); - }, "$attrsId"), - suggestions: /* @__PURE__ */ __name(function suggestions() { - if (this.searching) { - this.show(); - this.focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1; - this.searching = false; - } - this.autoUpdateModel(); - }, "suggestions") - }, - mounted: /* @__PURE__ */ __name(function mounted3() { - this.id = this.id || UniqueComponentId(); - this.autoUpdateModel(); - }, "mounted"), - updated: /* @__PURE__ */ __name(function updated2() { - if (this.overlayVisible) { - this.alignOverlay(); - } - }, "updated"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount3() { - this.unbindOutsideClickListener(); - this.unbindResizeListener(); - if (this.scrollHandler) { - this.scrollHandler.destroy(); - this.scrollHandler = null; - } - if (this.overlay) { - ZIndex.clear(this.overlay); - this.overlay = null; - } - }, "beforeUnmount"), - methods: { - getOptionIndex: /* @__PURE__ */ __name(function getOptionIndex(index, fn) { - return this.virtualScrollerDisabled ? index : fn && fn(index)["index"]; - }, "getOptionIndex"), - getOptionLabel: /* @__PURE__ */ __name(function getOptionLabel(option2) { - return this.optionLabel ? resolveFieldData(option2, this.optionLabel) : option2; - }, "getOptionLabel"), - getOptionValue: /* @__PURE__ */ __name(function getOptionValue(option2) { - return option2; - }, "getOptionValue"), - getOptionRenderKey: /* @__PURE__ */ __name(function getOptionRenderKey(option2, index) { - return (this.dataKey ? resolveFieldData(option2, this.dataKey) : this.getOptionLabel(option2)) + "_" + index; - }, "getOptionRenderKey"), - getPTOptions: /* @__PURE__ */ __name(function getPTOptions3(option2, itemOptions, index, key) { - return this.ptm(key, { - context: { - selected: this.isSelected(option2), - focused: this.focusedOptionIndex === this.getOptionIndex(index, itemOptions), - disabled: this.isOptionDisabled(option2) - } - }); - }, "getPTOptions"), - isOptionDisabled: /* @__PURE__ */ __name(function isOptionDisabled(option2) { - return this.optionDisabled ? resolveFieldData(option2, this.optionDisabled) : false; - }, "isOptionDisabled"), - isOptionGroup: /* @__PURE__ */ __name(function isOptionGroup(option2) { - return this.optionGroupLabel && option2.optionGroup && option2.group; - }, "isOptionGroup"), - getOptionGroupLabel: /* @__PURE__ */ __name(function getOptionGroupLabel(optionGroup) { - return resolveFieldData(optionGroup, this.optionGroupLabel); - }, "getOptionGroupLabel"), - getOptionGroupChildren: /* @__PURE__ */ __name(function getOptionGroupChildren(optionGroup) { - return resolveFieldData(optionGroup, this.optionGroupChildren); - }, "getOptionGroupChildren"), - getAriaPosInset: /* @__PURE__ */ __name(function getAriaPosInset(index) { - var _this = this; - return (this.optionGroupLabel ? index - this.visibleOptions.slice(0, index).filter(function(option2) { - return _this.isOptionGroup(option2); - }).length : index) + 1; - }, "getAriaPosInset"), - show: /* @__PURE__ */ __name(function show(isFocus) { - this.$emit("before-show"); - this.dirty = true; - this.overlayVisible = true; - this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1; - isFocus && focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el); - }, "show"), - hide: /* @__PURE__ */ __name(function hide(isFocus) { - var _this2 = this; - var _hide = /* @__PURE__ */ __name(function _hide2() { - _this2.$emit("before-hide"); - _this2.dirty = isFocus; - _this2.overlayVisible = false; - _this2.clicked = false; - _this2.focusedOptionIndex = -1; - isFocus && focus(_this2.multiple ? _this2.$refs.focusInput : _this2.$refs.focusInput.$el); - }, "_hide"); - setTimeout(function() { - _hide(); - }, 0); - }, "hide"), - onFocus: /* @__PURE__ */ __name(function onFocus2(event) { - if (this.disabled) { - return; - } - if (!this.dirty && this.completeOnFocus) { - this.search(event, event.target.value, "focus"); - } - this.dirty = true; - this.focused = true; - if (this.overlayVisible) { - this.focusedOptionIndex = this.focusedOptionIndex !== -1 ? this.focusedOptionIndex : this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1; - this.scrollInView(this.focusedOptionIndex); - } - this.$emit("focus", event); - }, "onFocus"), - onBlur: /* @__PURE__ */ __name(function onBlur(event) { - this.dirty = false; - this.focused = false; - this.focusedOptionIndex = -1; - this.$emit("blur", event); - }, "onBlur"), - onKeyDown: /* @__PURE__ */ __name(function onKeyDown(event) { - if (this.disabled) { - event.preventDefault(); - return; - } - switch (event.code) { - case "ArrowDown": - this.onArrowDownKey(event); - break; - case "ArrowUp": - this.onArrowUpKey(event); - break; - case "ArrowLeft": - this.onArrowLeftKey(event); - break; - case "ArrowRight": - this.onArrowRightKey(event); - break; - case "Home": - this.onHomeKey(event); - break; - case "End": - this.onEndKey(event); - break; - case "PageDown": - this.onPageDownKey(event); - break; - case "PageUp": - this.onPageUpKey(event); - break; - case "Enter": - case "NumpadEnter": - this.onEnterKey(event); - break; - case "Escape": - this.onEscapeKey(event); - break; - case "Tab": - this.onTabKey(event); - break; - case "Backspace": - this.onBackspaceKey(event); - break; - } - this.clicked = false; - }, "onKeyDown"), - onInput: /* @__PURE__ */ __name(function onInput(event) { - var _this3 = this; - if (this.typeahead) { - if (this.searchTimeout) { - clearTimeout(this.searchTimeout); - } - var query = event.target.value; - if (!this.multiple) { - this.updateModel(event, query); - } - if (query.length === 0) { - this.hide(); - this.$emit("clear"); - } else { - if (query.length >= this.minLength) { - this.focusedOptionIndex = -1; - this.searchTimeout = setTimeout(function() { - _this3.search(event, query, "input"); - }, this.delay); - } else { - this.hide(); - } - } - } - }, "onInput"), - onChange: /* @__PURE__ */ __name(function onChange(event) { - var _this4 = this; - if (this.forceSelection) { - var valid = false; - if (this.visibleOptions && !this.multiple) { - var value = this.multiple ? this.$refs.focusInput.value : this.$refs.focusInput.$el.value; - var matchedValue = this.visibleOptions.find(function(option2) { - return _this4.isOptionMatched(option2, value || ""); - }); - if (matchedValue !== void 0) { - valid = true; - !this.isSelected(matchedValue) && this.onOptionSelect(event, matchedValue); - } - } - if (!valid) { - if (this.multiple) this.$refs.focusInput.value = ""; - else this.$refs.focusInput.$el.value = ""; - this.$emit("clear"); - !this.multiple && this.updateModel(event, null); - } - } - }, "onChange"), - onMultipleContainerFocus: /* @__PURE__ */ __name(function onMultipleContainerFocus() { - if (this.disabled) { - return; - } - this.focused = true; - }, "onMultipleContainerFocus"), - onMultipleContainerBlur: /* @__PURE__ */ __name(function onMultipleContainerBlur() { - this.focusedMultipleOptionIndex = -1; - this.focused = false; - }, "onMultipleContainerBlur"), - onMultipleContainerKeyDown: /* @__PURE__ */ __name(function onMultipleContainerKeyDown(event) { - if (this.disabled) { - event.preventDefault(); - return; - } - switch (event.code) { - case "ArrowLeft": - this.onArrowLeftKeyOnMultiple(event); - break; - case "ArrowRight": - this.onArrowRightKeyOnMultiple(event); - break; - case "Backspace": - this.onBackspaceKeyOnMultiple(event); - break; - } - }, "onMultipleContainerKeyDown"), - onContainerClick: /* @__PURE__ */ __name(function onContainerClick(event) { - this.clicked = true; - if (this.disabled || this.searching || this.loading || this.isInputClicked(event) || this.isDropdownClicked(event)) { - return; - } - if (!this.overlay || !this.overlay.contains(event.target)) { - focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el); - } - }, "onContainerClick"), - onDropdownClick: /* @__PURE__ */ __name(function onDropdownClick(event) { - var query = void 0; - if (this.overlayVisible) { - this.hide(true); - } else { - var target = this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el; - focus(target); - query = target.value; - if (this.dropdownMode === "blank") this.search(event, "", "dropdown"); - else if (this.dropdownMode === "current") this.search(event, query, "dropdown"); - } - this.$emit("dropdown-click", { - originalEvent: event, - query - }); - }, "onDropdownClick"), - onOptionSelect: /* @__PURE__ */ __name(function onOptionSelect(event, option2) { - var isHide = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true; - var value = this.getOptionValue(option2); - if (this.multiple) { - this.$refs.focusInput.value = ""; - if (!this.isSelected(option2)) { - this.updateModel(event, [].concat(_toConsumableArray$1(this.modelValue || []), [value])); - } - } else { - this.updateModel(event, value); - } - this.$emit("item-select", { - originalEvent: event, - value: option2 - }); - this.$emit("option-select", { - originalEvent: event, - value: option2 - }); - isHide && this.hide(true); - }, "onOptionSelect"), - onOptionMouseMove: /* @__PURE__ */ __name(function onOptionMouseMove(event, index) { - if (this.focusOnHover) { - this.changeFocusedOptionIndex(event, index); - } - }, "onOptionMouseMove"), - onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick(event) { - OverlayEventBus.emit("overlay-click", { - originalEvent: event, - target: this.$el - }); - }, "onOverlayClick"), - onOverlayKeyDown: /* @__PURE__ */ __name(function onOverlayKeyDown(event) { - switch (event.code) { - case "Escape": - this.onEscapeKey(event); - break; - } - }, "onOverlayKeyDown"), - onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey(event) { - if (!this.overlayVisible) { - return; - } - var optionIndex = this.focusedOptionIndex !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex(); - this.changeFocusedOptionIndex(event, optionIndex); - event.preventDefault(); - }, "onArrowDownKey"), - onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey(event) { - if (!this.overlayVisible) { - return; - } - if (event.altKey) { - if (this.focusedOptionIndex !== -1) { - this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]); - } - this.overlayVisible && this.hide(); - event.preventDefault(); - } else { - var optionIndex = this.focusedOptionIndex !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex) : this.clicked ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex(); - this.changeFocusedOptionIndex(event, optionIndex); - event.preventDefault(); - } - }, "onArrowUpKey"), - onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey2(event) { - var target = event.currentTarget; - this.focusedOptionIndex = -1; - if (this.multiple) { - if (isEmpty(target.value) && this.hasSelectedOption) { - focus(this.$refs.multiContainer); - this.focusedMultipleOptionIndex = this.modelValue.length; - } else { - event.stopPropagation(); - } - } - }, "onArrowLeftKey"), - onArrowRightKey: /* @__PURE__ */ __name(function onArrowRightKey2(event) { - this.focusedOptionIndex = -1; - this.multiple && event.stopPropagation(); - }, "onArrowRightKey"), - onHomeKey: /* @__PURE__ */ __name(function onHomeKey2(event) { - var currentTarget = event.currentTarget; - var len = currentTarget.value.length; - currentTarget.setSelectionRange(0, event.shiftKey ? len : 0); - this.focusedOptionIndex = -1; - event.preventDefault(); - }, "onHomeKey"), - onEndKey: /* @__PURE__ */ __name(function onEndKey2(event) { - var currentTarget = event.currentTarget; - var len = currentTarget.value.length; - currentTarget.setSelectionRange(event.shiftKey ? 0 : len, len); - this.focusedOptionIndex = -1; - event.preventDefault(); - }, "onEndKey"), - onPageUpKey: /* @__PURE__ */ __name(function onPageUpKey2(event) { - this.scrollInView(0); - event.preventDefault(); - }, "onPageUpKey"), - onPageDownKey: /* @__PURE__ */ __name(function onPageDownKey2(event) { - this.scrollInView(this.visibleOptions.length - 1); - event.preventDefault(); - }, "onPageDownKey"), - onEnterKey: /* @__PURE__ */ __name(function onEnterKey2(event) { - if (!this.typeahead) { - if (this.multiple) { - this.updateModel(event, [].concat(_toConsumableArray$1(this.modelValue || []), [event.target.value])); - this.$refs.focusInput.value = ""; - } - } else { - if (!this.overlayVisible) { - this.focusedOptionIndex = -1; - this.onArrowDownKey(event); - } else { - if (this.focusedOptionIndex !== -1) { - this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]); - } - this.hide(); - } - } - }, "onEnterKey"), - onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey(event) { - this.overlayVisible && this.hide(true); - event.preventDefault(); - }, "onEscapeKey"), - onTabKey: /* @__PURE__ */ __name(function onTabKey(event) { - if (this.focusedOptionIndex !== -1) { - this.onOptionSelect(event, this.visibleOptions[this.focusedOptionIndex]); - } - this.overlayVisible && this.hide(); - }, "onTabKey"), - onBackspaceKey: /* @__PURE__ */ __name(function onBackspaceKey(event) { - if (this.multiple) { - if (isNotEmpty(this.modelValue) && !this.$refs.focusInput.value) { - var removedValue = this.modelValue[this.modelValue.length - 1]; - var newValue = this.modelValue.slice(0, -1); - this.$emit("update:modelValue", newValue); - this.$emit("item-unselect", { - originalEvent: event, - value: removedValue - }); - this.$emit("option-unselect", { - originalEvent: event, - value: removedValue - }); - } - event.stopPropagation(); - } - }, "onBackspaceKey"), - onArrowLeftKeyOnMultiple: /* @__PURE__ */ __name(function onArrowLeftKeyOnMultiple() { - this.focusedMultipleOptionIndex = this.focusedMultipleOptionIndex < 1 ? 0 : this.focusedMultipleOptionIndex - 1; - }, "onArrowLeftKeyOnMultiple"), - onArrowRightKeyOnMultiple: /* @__PURE__ */ __name(function onArrowRightKeyOnMultiple() { - this.focusedMultipleOptionIndex++; - if (this.focusedMultipleOptionIndex > this.modelValue.length - 1) { - this.focusedMultipleOptionIndex = -1; - focus(this.$refs.focusInput); - } - }, "onArrowRightKeyOnMultiple"), - onBackspaceKeyOnMultiple: /* @__PURE__ */ __name(function onBackspaceKeyOnMultiple(event) { - if (this.focusedMultipleOptionIndex !== -1) { - this.removeOption(event, this.focusedMultipleOptionIndex); - } - }, "onBackspaceKeyOnMultiple"), - onOverlayEnter: /* @__PURE__ */ __name(function onOverlayEnter(el) { - ZIndex.set("overlay", el, this.$primevue.config.zIndex.overlay); - addStyle(el, { - position: "absolute", - top: "0", - left: "0" - }); - this.alignOverlay(); - }, "onOverlayEnter"), - onOverlayAfterEnter: /* @__PURE__ */ __name(function onOverlayAfterEnter() { - this.bindOutsideClickListener(); - this.bindScrollListener(); - this.bindResizeListener(); - this.$emit("show"); - }, "onOverlayAfterEnter"), - onOverlayLeave: /* @__PURE__ */ __name(function onOverlayLeave() { - this.unbindOutsideClickListener(); - this.unbindScrollListener(); - this.unbindResizeListener(); - this.$emit("hide"); - this.overlay = null; - }, "onOverlayLeave"), - onOverlayAfterLeave: /* @__PURE__ */ __name(function onOverlayAfterLeave(el) { - ZIndex.clear(el); - }, "onOverlayAfterLeave"), - alignOverlay: /* @__PURE__ */ __name(function alignOverlay() { - var target = this.multiple ? this.$refs.multiContainer : this.$refs.focusInput.$el; - if (this.appendTo === "self") { - relativePosition(this.overlay, target); - } else { - this.overlay.style.minWidth = getOuterWidth(target) + "px"; - absolutePosition(this.overlay, target); - } - }, "alignOverlay"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener() { - var _this5 = this; - if (!this.outsideClickListener) { - this.outsideClickListener = function(event) { - if (_this5.overlayVisible && _this5.overlay && _this5.isOutsideClicked(event)) { - _this5.hide(); - } - }; - document.addEventListener("click", this.outsideClickListener); - } - }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener() { - if (this.outsideClickListener) { - document.removeEventListener("click", this.outsideClickListener); - this.outsideClickListener = null; - } - }, "unbindOutsideClickListener"), - bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener() { - var _this6 = this; - if (!this.scrollHandler) { - this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.container, function() { - if (_this6.overlayVisible) { - _this6.hide(); - } - }); - } - this.scrollHandler.bindScrollListener(); - }, "bindScrollListener"), - unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener() { - if (this.scrollHandler) { - this.scrollHandler.unbindScrollListener(); - } - }, "unbindScrollListener"), - bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener() { - var _this7 = this; - if (!this.resizeListener) { - this.resizeListener = function() { - if (_this7.overlayVisible && !isTouchDevice()) { - _this7.hide(); - } - }; - window.addEventListener("resize", this.resizeListener); - } - }, "bindResizeListener"), - unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener() { - if (this.resizeListener) { - window.removeEventListener("resize", this.resizeListener); - this.resizeListener = null; - } - }, "unbindResizeListener"), - isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked(event) { - return !this.overlay.contains(event.target) && !this.isInputClicked(event) && !this.isDropdownClicked(event); - }, "isOutsideClicked"), - isInputClicked: /* @__PURE__ */ __name(function isInputClicked(event) { - if (this.multiple) return event.target === this.$refs.multiContainer || this.$refs.multiContainer.contains(event.target); - else return event.target === this.$refs.focusInput.$el; - }, "isInputClicked"), - isDropdownClicked: /* @__PURE__ */ __name(function isDropdownClicked(event) { - return this.$refs.dropdownButton ? event.target === this.$refs.dropdownButton || this.$refs.dropdownButton.contains(event.target) : false; - }, "isDropdownClicked"), - isOptionMatched: /* @__PURE__ */ __name(function isOptionMatched(option2, value) { - var _this$getOptionLabel; - return this.isValidOption(option2) && ((_this$getOptionLabel = this.getOptionLabel(option2)) === null || _this$getOptionLabel === void 0 ? void 0 : _this$getOptionLabel.toLocaleLowerCase(this.searchLocale)) === value.toLocaleLowerCase(this.searchLocale); - }, "isOptionMatched"), - isValidOption: /* @__PURE__ */ __name(function isValidOption(option2) { - return isNotEmpty(option2) && !(this.isOptionDisabled(option2) || this.isOptionGroup(option2)); - }, "isValidOption"), - isValidSelectedOption: /* @__PURE__ */ __name(function isValidSelectedOption(option2) { - return this.isValidOption(option2) && this.isSelected(option2); - }, "isValidSelectedOption"), - isEquals: /* @__PURE__ */ __name(function isEquals(value1, value2) { - return equals(value1, value2, this.equalityKey); - }, "isEquals"), - isSelected: /* @__PURE__ */ __name(function isSelected(option2) { - var _this8 = this; - var optionValue = this.getOptionValue(option2); - return this.multiple ? (this.modelValue || []).some(function(value) { - return _this8.isEquals(value, optionValue); - }) : this.isEquals(this.modelValue, this.getOptionValue(option2)); - }, "isSelected"), - findFirstOptionIndex: /* @__PURE__ */ __name(function findFirstOptionIndex() { - var _this9 = this; - return this.visibleOptions.findIndex(function(option2) { - return _this9.isValidOption(option2); - }); - }, "findFirstOptionIndex"), - findLastOptionIndex: /* @__PURE__ */ __name(function findLastOptionIndex() { - var _this10 = this; - return findLastIndex(this.visibleOptions, function(option2) { - return _this10.isValidOption(option2); - }); - }, "findLastOptionIndex"), - findNextOptionIndex: /* @__PURE__ */ __name(function findNextOptionIndex(index) { - var _this11 = this; - var matchedOptionIndex = index < this.visibleOptions.length - 1 ? this.visibleOptions.slice(index + 1).findIndex(function(option2) { - return _this11.isValidOption(option2); - }) : -1; - return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index; - }, "findNextOptionIndex"), - findPrevOptionIndex: /* @__PURE__ */ __name(function findPrevOptionIndex(index) { - var _this12 = this; - var matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions.slice(0, index), function(option2) { - return _this12.isValidOption(option2); - }) : -1; - return matchedOptionIndex > -1 ? matchedOptionIndex : index; - }, "findPrevOptionIndex"), - findSelectedOptionIndex: /* @__PURE__ */ __name(function findSelectedOptionIndex() { - var _this13 = this; - return this.hasSelectedOption ? this.visibleOptions.findIndex(function(option2) { - return _this13.isValidSelectedOption(option2); - }) : -1; - }, "findSelectedOptionIndex"), - findFirstFocusedOptionIndex: /* @__PURE__ */ __name(function findFirstFocusedOptionIndex() { - var selectedIndex = this.findSelectedOptionIndex(); - return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex; - }, "findFirstFocusedOptionIndex"), - findLastFocusedOptionIndex: /* @__PURE__ */ __name(function findLastFocusedOptionIndex() { - var selectedIndex = this.findSelectedOptionIndex(); - return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex; - }, "findLastFocusedOptionIndex"), - search: /* @__PURE__ */ __name(function search(event, query, source) { - if (query === void 0 || query === null) { - return; - } - if (source === "input" && query.trim().length === 0) { - return; - } - this.searching = true; - this.$emit("complete", { - originalEvent: event, - query - }); - }, "search"), - removeOption: /* @__PURE__ */ __name(function removeOption(event, index) { - var _this14 = this; - var removedOption = this.modelValue[index]; - var value = this.modelValue.filter(function(_2, i) { - return i !== index; - }).map(function(option2) { - return _this14.getOptionValue(option2); - }); - this.updateModel(event, value); - this.$emit("item-unselect", { - originalEvent: event, - value: removedOption - }); - this.$emit("option-unselect", { - originalEvent: event, - value: removedOption - }); - this.dirty = true; - focus(this.multiple ? this.$refs.focusInput : this.$refs.focusInput.$el); - }, "removeOption"), - changeFocusedOptionIndex: /* @__PURE__ */ __name(function changeFocusedOptionIndex(event, index) { - if (this.focusedOptionIndex !== index) { - this.focusedOptionIndex = index; - this.scrollInView(); - if (this.selectOnFocus) { - this.onOptionSelect(event, this.visibleOptions[index], false); - } - } - }, "changeFocusedOptionIndex"), - scrollInView: /* @__PURE__ */ __name(function scrollInView2() { - var _this15 = this; - var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1; - this.$nextTick(function() { - var id2 = index !== -1 ? "".concat(_this15.id, "_").concat(index) : _this15.focusedOptionId; - var element = findSingle(_this15.list, 'li[id="'.concat(id2, '"]')); - if (element) { - element.scrollIntoView && element.scrollIntoView({ - block: "nearest", - inline: "start" - }); - } else if (!_this15.virtualScrollerDisabled) { - _this15.virtualScroller && _this15.virtualScroller.scrollToIndex(index !== -1 ? index : _this15.focusedOptionIndex); - } - }); - }, "scrollInView"), - autoUpdateModel: /* @__PURE__ */ __name(function autoUpdateModel() { - if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption) { - this.focusedOptionIndex = this.findFirstFocusedOptionIndex(); - this.onOptionSelect(null, this.visibleOptions[this.focusedOptionIndex], false); - } - }, "autoUpdateModel"), - updateModel: /* @__PURE__ */ __name(function updateModel(event, value) { - this.$emit("update:modelValue", value); - this.$emit("change", { - originalEvent: event, - value - }); - }, "updateModel"), - flatOptions: /* @__PURE__ */ __name(function flatOptions(options) { - var _this16 = this; - return (options || []).reduce(function(result, option2, index) { - result.push({ - optionGroup: option2, - group: true, - index - }); - var optionGroupChildren = _this16.getOptionGroupChildren(option2); - optionGroupChildren && optionGroupChildren.forEach(function(o) { - return result.push(o); - }); - return result; - }, []); - }, "flatOptions"), - overlayRef: /* @__PURE__ */ __name(function overlayRef(el) { - this.overlay = el; - }, "overlayRef"), - listRef: /* @__PURE__ */ __name(function listRef(el, contentRef) { - this.list = el; - contentRef && contentRef(el); - }, "listRef"), - virtualScrollerRef: /* @__PURE__ */ __name(function virtualScrollerRef(el) { - this.virtualScroller = el; - }, "virtualScrollerRef") - }, - computed: { - visibleOptions: /* @__PURE__ */ __name(function visibleOptions() { - return this.optionGroupLabel ? this.flatOptions(this.suggestions) : this.suggestions || []; - }, "visibleOptions"), - inputValue: /* @__PURE__ */ __name(function inputValue() { - if (isNotEmpty(this.modelValue)) { - if (_typeof$1$1(this.modelValue) === "object") { - var label = this.getOptionLabel(this.modelValue); - return label != null ? label : this.modelValue; - } else { - return this.modelValue; - } - } else { - return ""; - } - }, "inputValue"), - hasSelectedOption: /* @__PURE__ */ __name(function hasSelectedOption() { - return isNotEmpty(this.modelValue); - }, "hasSelectedOption"), - equalityKey: /* @__PURE__ */ __name(function equalityKey() { - return this.dataKey; - }, "equalityKey"), - searchResultMessageText: /* @__PURE__ */ __name(function searchResultMessageText() { - return isNotEmpty(this.visibleOptions) && this.overlayVisible ? this.searchMessageText.replaceAll("{0}", this.visibleOptions.length) : this.emptySearchMessageText; - }, "searchResultMessageText"), - searchMessageText: /* @__PURE__ */ __name(function searchMessageText() { - return this.searchMessage || this.$primevue.config.locale.searchMessage || ""; - }, "searchMessageText"), - emptySearchMessageText: /* @__PURE__ */ __name(function emptySearchMessageText() { - return this.emptySearchMessage || this.$primevue.config.locale.emptySearchMessage || ""; - }, "emptySearchMessageText"), - selectionMessageText: /* @__PURE__ */ __name(function selectionMessageText() { - return this.selectionMessage || this.$primevue.config.locale.selectionMessage || ""; - }, "selectionMessageText"), - emptySelectionMessageText: /* @__PURE__ */ __name(function emptySelectionMessageText() { - return this.emptySelectionMessage || this.$primevue.config.locale.emptySelectionMessage || ""; - }, "emptySelectionMessageText"), - selectedMessageText: /* @__PURE__ */ __name(function selectedMessageText() { - return this.hasSelectedOption ? this.selectionMessageText.replaceAll("{0}", this.multiple ? this.modelValue.length : "1") : this.emptySelectionMessageText; - }, "selectedMessageText"), - listAriaLabel: /* @__PURE__ */ __name(function listAriaLabel() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.listLabel : void 0; - }, "listAriaLabel"), - focusedOptionId: /* @__PURE__ */ __name(function focusedOptionId() { - return this.focusedOptionIndex !== -1 ? "".concat(this.id, "_").concat(this.focusedOptionIndex) : null; - }, "focusedOptionId"), - focusedMultipleOptionId: /* @__PURE__ */ __name(function focusedMultipleOptionId() { - return this.focusedMultipleOptionIndex !== -1 ? "".concat(this.id, "_multiple_option_").concat(this.focusedMultipleOptionIndex) : null; - }, "focusedMultipleOptionId"), - ariaSetSize: /* @__PURE__ */ __name(function ariaSetSize() { - var _this17 = this; - return this.visibleOptions.filter(function(option2) { - return !_this17.isOptionGroup(option2); - }).length; - }, "ariaSetSize"), - virtualScrollerDisabled: /* @__PURE__ */ __name(function virtualScrollerDisabled() { - return !this.virtualScrollerOptions; - }, "virtualScrollerDisabled"), - panelId: /* @__PURE__ */ __name(function panelId() { - return this.id + "_panel"; - }, "panelId"), - hasFluid: /* @__PURE__ */ __name(function hasFluid() { - return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid; - }, "hasFluid") - }, - components: { - InputText: script$i, - VirtualScroller: script$j, - Portal: script$k, - ChevronDownIcon: script$l, - SpinnerIcon: script$m, - Chip: script$n - }, - directives: { - ripple: Ripple - } -}; -function _typeof$4(o) { - "@babel/helpers - typeof"; - return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$4(o); -} -__name(_typeof$4, "_typeof$4"); -function ownKeys$3(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$3, "ownKeys$3"); -function _objectSpread$3(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$3(Object(t), true).forEach(function(r2) { - _defineProperty$4(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$3, "_objectSpread$3"); -function _defineProperty$4(e, r, t) { - return (r = _toPropertyKey$4(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$4, "_defineProperty$4"); -function _toPropertyKey$4(t) { - var i = _toPrimitive$4(t, "string"); - return "symbol" == _typeof$4(i) ? i : i + ""; -} -__name(_toPropertyKey$4, "_toPropertyKey$4"); -function _toPrimitive$4(t, r) { - if ("object" != _typeof$4(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$4(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$4, "_toPrimitive$4"); -var _hoisted_1$k = ["aria-activedescendant"]; -var _hoisted_2$e = ["id", "aria-label", "aria-setsize", "aria-posinset"]; -var _hoisted_3$d = ["id", "placeholder", "tabindex", "disabled", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "aria-invalid"]; -var _hoisted_4$5 = ["disabled", "aria-expanded", "aria-controls"]; -var _hoisted_5$3 = ["id"]; -var _hoisted_6$2 = ["id", "aria-label"]; -var _hoisted_7$1 = ["id"]; -var _hoisted_8$1 = ["id", "aria-label", "aria-selected", "aria-disabled", "aria-setsize", "aria-posinset", "onClick", "onMousemove", "data-p-selected", "data-p-focus", "data-p-disabled"]; -function render$c(_ctx, _cache, $props, $setup, $data, $options) { - var _component_InputText = resolveComponent("InputText"); - var _component_Chip = resolveComponent("Chip"); - var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); - var _component_VirtualScroller = resolveComponent("VirtualScroller"); - var _component_Portal = resolveComponent("Portal"); - var _directive_ripple = resolveDirective("ripple"); - return openBlock(), createElementBlock("div", mergeProps({ - ref: "container", - "class": _ctx.cx("root"), - style: _ctx.sx("root"), - onClick: _cache[11] || (_cache[11] = function() { - return $options.onContainerClick && $options.onContainerClick.apply($options, arguments); - }) - }, _ctx.ptmi("root")), [!_ctx.multiple ? (openBlock(), createBlock(_component_InputText, { - key: 0, - ref: "focusInput", - id: _ctx.inputId, - type: "text", - "class": normalizeClass([_ctx.cx("pcInput"), _ctx.inputClass]), - style: normalizeStyle(_ctx.inputStyle), - value: $options.inputValue, - placeholder: _ctx.placeholder, - tabindex: !_ctx.disabled ? _ctx.tabindex : -1, - fluid: $options.hasFluid, - disabled: _ctx.disabled, - invalid: _ctx.invalid, - variant: _ctx.variant, - autocomplete: "off", - role: "combobox", - "aria-label": _ctx.ariaLabel, - "aria-labelledby": _ctx.ariaLabelledby, - "aria-haspopup": "listbox", - "aria-autocomplete": "list", - "aria-expanded": $data.overlayVisible, - "aria-controls": $options.panelId, - "aria-activedescendant": $data.focused ? $options.focusedOptionId : void 0, - onFocus: $options.onFocus, - onBlur: $options.onBlur, - onKeydown: $options.onKeyDown, - onInput: $options.onInput, - onChange: $options.onChange, - unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcInput") - }, null, 8, ["id", "class", "style", "value", "placeholder", "tabindex", "fluid", "disabled", "invalid", "variant", "aria-label", "aria-labelledby", "aria-expanded", "aria-controls", "aria-activedescendant", "onFocus", "onBlur", "onKeydown", "onInput", "onChange", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.multiple ? (openBlock(), createElementBlock("ul", mergeProps({ - key: 1, - ref: "multiContainer", - "class": _ctx.cx("inputMultiple"), - tabindex: "-1", - role: "listbox", - "aria-orientation": "horizontal", - "aria-activedescendant": $data.focused ? $options.focusedMultipleOptionId : void 0, - onFocus: _cache[5] || (_cache[5] = function() { - return $options.onMultipleContainerFocus && $options.onMultipleContainerFocus.apply($options, arguments); - }), - onBlur: _cache[6] || (_cache[6] = function() { - return $options.onMultipleContainerBlur && $options.onMultipleContainerBlur.apply($options, arguments); - }), - onKeydown: _cache[7] || (_cache[7] = function() { - return $options.onMultipleContainerKeyDown && $options.onMultipleContainerKeyDown.apply($options, arguments); - }) - }, _ctx.ptm("inputMultiple")), [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue, function(option2, i) { - return openBlock(), createElementBlock("li", mergeProps({ - key: "".concat(i, "_").concat($options.getOptionLabel(option2)), - id: $data.id + "_multiple_option_" + i, - "class": _ctx.cx("chipItem", { - i - }), - role: "option", - "aria-label": $options.getOptionLabel(option2), - "aria-selected": true, - "aria-setsize": _ctx.modelValue.length, - "aria-posinset": i + 1, - ref_for: true - }, _ctx.ptm("chipItem")), [renderSlot(_ctx.$slots, "chip", mergeProps({ - "class": _ctx.cx("pcChip"), - value: option2, - index: i, - removeCallback: /* @__PURE__ */ __name(function removeCallback(event) { - return $options.removeOption(event, i); - }, "removeCallback"), - ref_for: true - }, _ctx.ptm("pcChip")), function() { - return [createVNode(_component_Chip, { - "class": normalizeClass(_ctx.cx("pcChip")), - label: $options.getOptionLabel(option2), - removeIcon: _ctx.chipIcon || _ctx.removeTokenIcon, - removable: "", - unstyled: _ctx.unstyled, - onRemove: /* @__PURE__ */ __name(function onRemove2($event) { - return $options.removeOption($event, i); - }, "onRemove"), - pt: _ctx.ptm("pcChip") - }, { - removeicon: withCtx(function() { - return [renderSlot(_ctx.$slots, _ctx.$slots.chipicon ? "chipicon" : "removetokenicon", { - "class": normalizeClass(_ctx.cx("chipIcon")), - index: i, - removeCallback: /* @__PURE__ */ __name(function removeCallback(event) { - return $options.removeOption(event, i); - }, "removeCallback") - })]; - }), - _: 2 - }, 1032, ["class", "label", "removeIcon", "unstyled", "onRemove", "pt"])]; - })], 16, _hoisted_2$e); - }), 128)), createBaseVNode("li", mergeProps({ - "class": _ctx.cx("inputChip"), - role: "option" - }, _ctx.ptm("inputChip")), [createBaseVNode("input", mergeProps({ - ref: "focusInput", - id: _ctx.inputId, - type: "text", - style: _ctx.inputStyle, - "class": _ctx.inputClass, - placeholder: _ctx.placeholder, - tabindex: !_ctx.disabled ? _ctx.tabindex : -1, - disabled: _ctx.disabled, - autocomplete: "off", - role: "combobox", - "aria-label": _ctx.ariaLabel, - "aria-labelledby": _ctx.ariaLabelledby, - "aria-haspopup": "listbox", - "aria-autocomplete": "list", - "aria-expanded": $data.overlayVisible, - "aria-controls": $data.id + "_list", - "aria-activedescendant": $data.focused ? $options.focusedOptionId : void 0, - "aria-invalid": _ctx.invalid || void 0, - onFocus: _cache[0] || (_cache[0] = function() { - return $options.onFocus && $options.onFocus.apply($options, arguments); - }), - onBlur: _cache[1] || (_cache[1] = function() { - return $options.onBlur && $options.onBlur.apply($options, arguments); - }), - onKeydown: _cache[2] || (_cache[2] = function() { - return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); - }), - onInput: _cache[3] || (_cache[3] = function() { - return $options.onInput && $options.onInput.apply($options, arguments); - }), - onChange: _cache[4] || (_cache[4] = function() { - return $options.onChange && $options.onChange.apply($options, arguments); - }) - }, _ctx.ptm("input")), null, 16, _hoisted_3$d)], 16)], 16, _hoisted_1$k)) : createCommentVNode("", true), $data.searching || _ctx.loading ? renderSlot(_ctx.$slots, _ctx.$slots.loader ? "loader" : "loadingicon", { - key: 2, - "class": normalizeClass(_ctx.cx("loader")) - }, function() { - return [_ctx.loader || _ctx.loadingIcon ? (openBlock(), createElementBlock("i", mergeProps({ - key: 0, - "class": ["pi-spin", _ctx.cx("loader"), _ctx.loader, _ctx.loadingIcon], - "aria-hidden": "true" - }, _ctx.ptm("loader")), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({ - key: 1, - "class": _ctx.cx("loader"), - spin: "", - "aria-hidden": "true" - }, _ctx.ptm("loader")), null, 16, ["class"]))]; - }) : createCommentVNode("", true), renderSlot(_ctx.$slots, _ctx.$slots.dropdown ? "dropdown" : "dropdownbutton", { - toggleCallback: /* @__PURE__ */ __name(function toggleCallback(event) { - return $options.onDropdownClick(event); - }, "toggleCallback") - }, function() { - return [_ctx.dropdown ? (openBlock(), createElementBlock("button", mergeProps({ - key: 0, - ref: "dropdownButton", - type: "button", - "class": [_ctx.cx("dropdown"), _ctx.dropdownClass], - disabled: _ctx.disabled, - "aria-haspopup": "listbox", - "aria-expanded": $data.overlayVisible, - "aria-controls": $options.panelId, - onClick: _cache[8] || (_cache[8] = function() { - return $options.onDropdownClick && $options.onDropdownClick.apply($options, arguments); - }) - }, _ctx.ptm("dropdown")), [renderSlot(_ctx.$slots, "dropdownicon", { - "class": normalizeClass(_ctx.dropdownIcon) - }, function() { - return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.dropdownIcon ? "span" : "ChevronDownIcon"), mergeProps({ - "class": _ctx.dropdownIcon - }, _ctx.ptm("dropdownIcon")), null, 16, ["class"]))]; - })], 16, _hoisted_4$5)) : createCommentVNode("", true)]; - }), createBaseVNode("span", mergeProps({ - role: "status", - "aria-live": "polite", - "class": "p-hidden-accessible" - }, _ctx.ptm("hiddenSearchResult"), { - "data-p-hidden-accessible": true - }), toDisplayString($options.searchResultMessageText), 17), createVNode(_component_Portal, { - appendTo: _ctx.appendTo - }, { - "default": withCtx(function() { - return [createVNode(Transition, mergeProps({ - name: "p-connected-overlay", - onEnter: $options.onOverlayEnter, - onAfterEnter: $options.onOverlayAfterEnter, - onLeave: $options.onOverlayLeave, - onAfterLeave: $options.onOverlayAfterLeave - }, _ctx.ptm("transition")), { - "default": withCtx(function() { - return [$data.overlayVisible ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - ref: $options.overlayRef, - id: $options.panelId, - "class": [_ctx.cx("overlay"), _ctx.panelClass, _ctx.overlayClass], - style: _objectSpread$3(_objectSpread$3(_objectSpread$3({}, _ctx.panelStyle), _ctx.overlayStyle), {}, { - "max-height": $options.virtualScrollerDisabled ? _ctx.scrollHeight : "" - }), - onClick: _cache[9] || (_cache[9] = function() { - return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); - }), - onKeydown: _cache[10] || (_cache[10] = function() { - return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments); - }) - }, _ctx.ptm("overlay")), [renderSlot(_ctx.$slots, "header", { - value: _ctx.modelValue, - suggestions: $options.visibleOptions - }), createVNode(_component_VirtualScroller, mergeProps({ - ref: $options.virtualScrollerRef - }, _ctx.virtualScrollerOptions, { - style: { - height: _ctx.scrollHeight - }, - items: $options.visibleOptions, - tabindex: -1, - disabled: $options.virtualScrollerDisabled, - pt: _ctx.ptm("virtualScroller") - }), createSlots({ - content: withCtx(function(_ref) { - var styleClass = _ref.styleClass, contentRef = _ref.contentRef, items = _ref.items, getItemOptions = _ref.getItemOptions, contentStyle = _ref.contentStyle, itemSize = _ref.itemSize; - return [createBaseVNode("ul", mergeProps({ - ref: /* @__PURE__ */ __name(function ref2(el) { - return $options.listRef(el, contentRef); - }, "ref"), - id: $data.id + "_list", - "class": [_ctx.cx("list"), styleClass], - style: contentStyle, - role: "listbox", - "aria-label": $options.listAriaLabel - }, _ctx.ptm("list")), [(openBlock(true), createElementBlock(Fragment, null, renderList(items, function(option2, i) { - return openBlock(), createElementBlock(Fragment, { - key: $options.getOptionRenderKey(option2, $options.getOptionIndex(i, getItemOptions)) - }, [$options.isOptionGroup(option2) ? (openBlock(), createElementBlock("li", mergeProps({ - key: 0, - id: $data.id + "_" + $options.getOptionIndex(i, getItemOptions), - style: { - height: itemSize ? itemSize + "px" : void 0 - }, - "class": _ctx.cx("optionGroup"), - role: "option", - ref_for: true - }, _ctx.ptm("optionGroup")), [renderSlot(_ctx.$slots, "optiongroup", { - option: option2.optionGroup, - index: $options.getOptionIndex(i, getItemOptions) - }, function() { - return [createTextVNode(toDisplayString($options.getOptionGroupLabel(option2.optionGroup)), 1)]; - })], 16, _hoisted_7$1)) : withDirectives((openBlock(), createElementBlock("li", mergeProps({ - key: 1, - id: $data.id + "_" + $options.getOptionIndex(i, getItemOptions), - style: { - height: itemSize ? itemSize + "px" : void 0 - }, - "class": _ctx.cx("option", { - option: option2, - i, - getItemOptions - }), - role: "option", - "aria-label": $options.getOptionLabel(option2), - "aria-selected": $options.isSelected(option2), - "aria-disabled": $options.isOptionDisabled(option2), - "aria-setsize": $options.ariaSetSize, - "aria-posinset": $options.getAriaPosInset($options.getOptionIndex(i, getItemOptions)), - onClick: /* @__PURE__ */ __name(function onClick2($event) { - return $options.onOptionSelect($event, option2); - }, "onClick"), - onMousemove: /* @__PURE__ */ __name(function onMousemove($event) { - return $options.onOptionMouseMove($event, $options.getOptionIndex(i, getItemOptions)); - }, "onMousemove"), - "data-p-selected": $options.isSelected(option2), - "data-p-focus": $data.focusedOptionIndex === $options.getOptionIndex(i, getItemOptions), - "data-p-disabled": $options.isOptionDisabled(option2), - ref_for: true - }, $options.getPTOptions(option2, getItemOptions, i, "option")), [renderSlot(_ctx.$slots, "option", { - option: option2, - index: $options.getOptionIndex(i, getItemOptions) - }, function() { - return [createTextVNode(toDisplayString($options.getOptionLabel(option2)), 1)]; - })], 16, _hoisted_8$1)), [[_directive_ripple]])], 64); - }), 128)), !items || items && items.length === 0 ? (openBlock(), createElementBlock("li", mergeProps({ - key: 0, - "class": _ctx.cx("emptyMessage"), - role: "option" - }, _ctx.ptm("emptyMessage")), [renderSlot(_ctx.$slots, "empty", {}, function() { - return [createTextVNode(toDisplayString($options.searchResultMessageText), 1)]; - })], 16)) : createCommentVNode("", true)], 16, _hoisted_6$2)]; - }), - _: 2 - }, [_ctx.$slots.loader ? { - name: "loader", - fn: withCtx(function(_ref2) { - var options = _ref2.options; - return [renderSlot(_ctx.$slots, "loader", { - options - })]; - }), - key: "0" - } : void 0]), 1040, ["style", "items", "disabled", "pt"]), renderSlot(_ctx.$slots, "footer", { - value: _ctx.modelValue, - suggestions: $options.visibleOptions - }), createBaseVNode("span", mergeProps({ - role: "status", - "aria-live": "polite", - "class": "p-hidden-accessible" - }, _ctx.ptm("hiddenSelectedMessage"), { - "data-p-hidden-accessible": true - }), toDisplayString($options.selectedMessageText), 17)], 16, _hoisted_5$3)) : createCommentVNode("", true)]; - }), - _: 3 - }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])]; - }), - _: 3 - }, 8, ["appendTo"])], 16); -} -__name(render$c, "render$c"); -script$7.render = render$c; -const _sfc_main$k = { - name: "AutoCompletePlus", - extends: script$7, - emits: ["focused-option-changed"], - mounted() { - if (typeof script$7.mounted === "function") { - script$7.mounted.call(this); - } - this.$watch( - () => this.focusedOptionIndex, - (newVal, oldVal) => { - this.$emit("focused-option-changed", newVal); - } - ); - } -}; -const _withScopeId$8 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-fd0a74bd"), n = n(), popScopeId(), n), "_withScopeId$8"); -const _hoisted_1$j = { class: "option-container flex justify-between items-center px-2 py-0 cursor-pointer overflow-hidden w-full" }; -const _hoisted_2$d = { class: "option-display-name font-semibold flex flex-col" }; -const _hoisted_3$c = { key: 0 }; -const _hoisted_4$4 = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-bookmark-fill text-sm mr-1" }, null, -1)); -const _hoisted_5$2 = [ - _hoisted_4$4 -]; -const _hoisted_6$1 = ["innerHTML"]; -const _hoisted_7 = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createBaseVNode("span", null, " ", -1)); -const _hoisted_8 = ["innerHTML"]; -const _hoisted_9 = { - key: 0, - class: "option-category font-light text-sm text-muted overflow-hidden text-ellipsis whitespace-nowrap" -}; -const _hoisted_10 = { class: "option-badges" }; -const _sfc_main$j = /* @__PURE__ */ defineComponent({ - __name: "NodeSearchItem", - props: { - nodeDef: {}, - currentQuery: {} - }, - setup(__props) { - const settingStore = useSettingStore(); - const showCategory = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowCategory") - ); - const showIdName = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowIdName") - ); - const showNodeFrequency = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl.ShowNodeFrequency") - ); - const nodeFrequencyStore = useNodeFrequencyStore(); - const nodeFrequency = computed( - () => nodeFrequencyStore.getNodeFrequency(props.nodeDef) - ); - const nodeBookmarkStore = useNodeBookmarkStore(); - const isBookmarked = computed( - () => nodeBookmarkStore.isBookmarked(props.nodeDef) - ); - const props = __props; - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$j, [ - createBaseVNode("div", _hoisted_2$d, [ - createBaseVNode("div", null, [ - isBookmarked.value ? (openBlock(), createElementBlock("span", _hoisted_3$c, _hoisted_5$2)) : createCommentVNode("", true), - createBaseVNode("span", { - innerHTML: unref(highlightQuery)(_ctx.nodeDef.display_name, _ctx.currentQuery) - }, null, 8, _hoisted_6$1), - _hoisted_7, - showIdName.value ? (openBlock(), createBlock(unref(script$o), { - key: 1, - severity: "secondary" - }, { - default: withCtx(() => [ - createBaseVNode("span", { - innerHTML: unref(highlightQuery)(_ctx.nodeDef.name, _ctx.currentQuery) - }, null, 8, _hoisted_8) - ]), - _: 1 - })) : createCommentVNode("", true) - ]), - showCategory.value ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(_ctx.nodeDef.category.replaceAll("/", " > ")), 1)) : createCommentVNode("", true) - ]), - createBaseVNode("div", _hoisted_10, [ - _ctx.nodeDef.experimental ? (openBlock(), createBlock(unref(script$o), { - key: 0, - value: _ctx.$t("g.experimental"), - severity: "primary" - }, null, 8, ["value"])) : createCommentVNode("", true), - _ctx.nodeDef.deprecated ? (openBlock(), createBlock(unref(script$o), { - key: 1, - value: _ctx.$t("g.deprecated"), - severity: "danger" - }, null, 8, ["value"])) : createCommentVNode("", true), - showNodeFrequency.value && nodeFrequency.value > 0 ? (openBlock(), createBlock(unref(script$o), { - key: 2, - value: unref(formatNumberWithSuffix)(nodeFrequency.value, { roundToInt: true }), - severity: "secondary" - }, null, 8, ["value"])) : createCommentVNode("", true), - _ctx.nodeDef.nodeSource.type !== unref(NodeSourceType).Unknown ? (openBlock(), createBlock(unref(script$n), { - key: 3, - class: "text-sm font-light" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.nodeDef.nodeSource.displayText), 1) - ]), - _: 1 - })) : createCommentVNode("", true) - ]) - ]); - }; - } -}); -const NodeSearchItem = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-fd0a74bd"]]); -const _hoisted_1$i = { class: "comfy-vue-node-search-container flex justify-center items-center w-full min-w-96 pointer-events-auto" }; -const _hoisted_2$c = { - key: 0, - class: "comfy-vue-node-preview-container absolute left-[-350px] top-[50px]" -}; -const _hoisted_3$b = /* @__PURE__ */ createBaseVNode("h3", null, "Add node filter condition", -1); -const _hoisted_4$3 = { class: "_dialog-body" }; -const _sfc_main$i = /* @__PURE__ */ defineComponent({ - __name: "NodeSearchBox", - props: { - filters: {}, - searchLimit: { default: 64 } - }, - emits: ["addFilter", "removeFilter", "addNode"], - setup(__props, { emit: __emit }) { - const settingStore = useSettingStore(); - const { t } = useI18n(); - const enableNodePreview = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl.NodePreview") - ); - const props = __props; - const nodeSearchFilterVisible = ref(false); - const inputId = `comfy-vue-node-search-box-input-${Math.random()}`; - const suggestions2 = ref([]); - const hoveredSuggestion = ref(null); - const currentQuery = ref(""); - const placeholder = computed(() => { - return props.filters.length === 0 ? t("g.searchNodes") + "..." : ""; - }); - const nodeDefStore = useNodeDefStore(); - const nodeFrequencyStore = useNodeFrequencyStore(); - const search2 = /* @__PURE__ */ __name((query) => { - const queryIsEmpty = query === "" && props.filters.length === 0; - currentQuery.value = query; - suggestions2.value = queryIsEmpty ? nodeFrequencyStore.topNodeDefs : [ - ...nodeDefStore.nodeSearchService.searchNode(query, props.filters, { - limit: props.searchLimit - }) - ]; - }, "search"); - const emit = __emit; - let inputElement = null; - const reFocusInput = /* @__PURE__ */ __name(() => { - inputElement ??= document.getElementById(inputId); - if (inputElement) { - inputElement.blur(); - nextTick(() => inputElement?.focus()); - } - }, "reFocusInput"); - onMounted(reFocusInput); - const onAddFilter = /* @__PURE__ */ __name((filterAndValue) => { - nodeSearchFilterVisible.value = false; - emit("addFilter", filterAndValue); - }, "onAddFilter"); - const onRemoveFilter = /* @__PURE__ */ __name((event, filterAndValue) => { - event.stopPropagation(); - event.preventDefault(); - emit("removeFilter", filterAndValue); - reFocusInput(); - }, "onRemoveFilter"); - const setHoverSuggestion = /* @__PURE__ */ __name((index) => { - if (index === -1) { - hoveredSuggestion.value = null; - return; - } - const value = suggestions2.value[index]; - hoveredSuggestion.value = value; - }, "setHoverSuggestion"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$i, [ - enableNodePreview.value ? (openBlock(), createElementBlock("div", _hoisted_2$c, [ - hoveredSuggestion.value ? (openBlock(), createBlock(NodePreview, { - nodeDef: hoveredSuggestion.value, - key: hoveredSuggestion.value?.name || "" - }, null, 8, ["nodeDef"])) : createCommentVNode("", true) - ])) : createCommentVNode("", true), - createVNode(unref(script$d), { - icon: "pi pi-filter", - severity: "secondary", - class: "filter-button z-10", - onClick: _cache[0] || (_cache[0] = ($event) => nodeSearchFilterVisible.value = true) - }), - createVNode(unref(script$p), { - visible: nodeSearchFilterVisible.value, - "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => nodeSearchFilterVisible.value = $event), - class: "min-w-96", - "dismissable-mask": "", - modal: "", - onHide: reFocusInput - }, { - header: withCtx(() => [ - _hoisted_3$b - ]), - default: withCtx(() => [ - createBaseVNode("div", _hoisted_4$3, [ - createVNode(NodeSearchFilter, { onAddFilter }) - ]) - ]), - _: 1 - }, 8, ["visible"]), - createVNode(_sfc_main$k, { - "model-value": props.filters, - class: "comfy-vue-node-search-box z-10 flex-grow", - scrollHeight: "40vh", - placeholder: placeholder.value, - "input-id": inputId, - "append-to": "self", - suggestions: suggestions2.value, - "min-length": 0, - delay: 100, - loading: !unref(nodeFrequencyStore).isLoaded, - onComplete: _cache[2] || (_cache[2] = ($event) => search2($event.query)), - onOptionSelect: _cache[3] || (_cache[3] = ($event) => emit("addNode", $event.value)), - onFocusedOptionChanged: _cache[4] || (_cache[4] = ($event) => setHoverSuggestion($event)), - "complete-on-focus": "", - "auto-option-focus": "", - "force-selection": "", - multiple: "", - optionLabel: "display_name" - }, { - option: withCtx(({ option: option2 }) => [ - createVNode(NodeSearchItem, { - nodeDef: option2, - currentQuery: currentQuery.value - }, null, 8, ["nodeDef", "currentQuery"]) - ]), - chip: withCtx(({ value }) => [ - (openBlock(), createBlock(SearchFilterChip, { - key: `${value[0].id}-${value[1]}`, - onRemove: /* @__PURE__ */ __name(($event) => onRemoveFilter($event, value), "onRemove"), - text: value[1], - badge: value[0].invokeSequence.toUpperCase(), - "badge-class": value[0].invokeSequence + "-badge" - }, null, 8, ["onRemove", "text", "badge", "badge-class"])) - ]), - _: 1 - }, 8, ["model-value", "placeholder", "suggestions", "loading"]) - ]); - }; - } -}); -const _sfc_main$h = /* @__PURE__ */ defineComponent({ - __name: "NodeSearchBoxPopover", - setup(__props) { - const settingStore = useSettingStore(); - const litegraphService = useLitegraphService(); - const { visible } = storeToRefs(useSearchBoxStore()); - const dismissable = ref(true); - const triggerEvent = ref(null); - const getNewNodeLocation = /* @__PURE__ */ __name(() => { - if (!triggerEvent.value) { - return litegraphService.getCanvasCenter(); - } - const originalEvent = triggerEvent.value.detail.originalEvent; - return [originalEvent.canvasX, originalEvent.canvasY]; - }, "getNewNodeLocation"); - const nodeFilters = ref([]); - const addFilter = /* @__PURE__ */ __name((filter) => { - nodeFilters.value.push(filter); - }, "addFilter"); - const removeFilter = /* @__PURE__ */ __name((filter) => { - nodeFilters.value = nodeFilters.value.filter( - (f) => toRaw(f) !== toRaw(filter) - ); - }, "removeFilter"); - const clearFilters = /* @__PURE__ */ __name(() => { - nodeFilters.value = []; - }, "clearFilters"); - const closeDialog = /* @__PURE__ */ __name(() => { - visible.value = false; - }, "closeDialog"); - const addNode = /* @__PURE__ */ __name((nodeDef) => { - const node = litegraphService.addNodeOnGraph(nodeDef, { - pos: getNewNodeLocation() - }); - const eventDetail = triggerEvent.value?.detail; - if (eventDetail && eventDetail.subType === "empty-release") { - eventDetail.linkReleaseContext.links.forEach((link) => { - ConnectingLinkImpl.createFromPlainObject(link).connectTo(node); - }); - } - window.setTimeout(() => { - closeDialog(); - }, 100); - }, "addNode"); - const newSearchBoxEnabled = computed( - () => settingStore.get("Comfy.NodeSearchBoxImpl") === "default" - ); - const showSearchBox = /* @__PURE__ */ __name((e) => { - const detail = e.detail; - if (newSearchBoxEnabled.value) { - if (detail.originalEvent?.pointerType === "touch") { - setTimeout(() => { - showNewSearchBox(e); - }, 128); - } else { - showNewSearchBox(e); - } - } else { - canvasStore.canvas.showSearchBox(detail.originalEvent); - } - }, "showSearchBox"); - const nodeDefStore = useNodeDefStore(); - const showNewSearchBox = /* @__PURE__ */ __name((e) => { - if (e.detail.subType === "empty-release") { - const links = e.detail.linkReleaseContext.links; - if (links.length === 0) { - console.warn("Empty release with no links! This should never happen"); - return; - } - const firstLink = ConnectingLinkImpl.createFromPlainObject(links[0]); - const filter = nodeDefStore.nodeSearchService.getFilterById( - firstLink.releaseSlotType - ); - const dataType = firstLink.type.toString(); - addFilter([filter, dataType]); - } - visible.value = true; - triggerEvent.value = e; - dismissable.value = false; - setTimeout(() => { - dismissable.value = true; - }, 300); - }, "showNewSearchBox"); - const showContextMenu = /* @__PURE__ */ __name((e) => { - if (e.detail.subType !== "empty-release") { - return; - } - const links = e.detail.linkReleaseContext.links; - if (links.length === 0) { - console.warn("Empty release with no links! This should never happen"); - return; - } - const firstLink = ConnectingLinkImpl.createFromPlainObject(links[0]); - const mouseEvent = e.detail.originalEvent; - const commonOptions = { - e: mouseEvent, - allow_searchbox: true, - showSearchBox: /* @__PURE__ */ __name(() => showSearchBox(e), "showSearchBox") - }; - const connectionOptions = firstLink.output ? { - nodeFrom: firstLink.node, - slotFrom: firstLink.output, - afterRerouteId: firstLink.afterRerouteId - } : { - nodeTo: firstLink.node, - slotTo: firstLink.input, - afterRerouteId: firstLink.afterRerouteId - }; - canvasStore.canvas.showConnectionMenu({ - ...connectionOptions, - ...commonOptions - }); - }, "showContextMenu"); - const canvasStore = useCanvasStore(); - watchEffect(() => { - if (canvasStore.canvas) { - LiteGraph.release_link_on_empty_shows_menu = false; - canvasStore.canvas.allow_searchbox = false; - } - }); - const canvasEventHandler = /* @__PURE__ */ __name((e) => { - if (e.detail.subType === "empty-double-click") { - showSearchBox(e); - } else if (e.detail.subType === "empty-release") { - handleCanvasEmptyRelease(e); - } else if (e.detail.subType === "group-double-click") { - const group = e.detail.group; - const [x, y] = group.pos; - const relativeY = e.detail.originalEvent.canvasY - y; - if (relativeY > group.titleHeight) { - showSearchBox(e); - } - } - }, "canvasEventHandler"); - const linkReleaseAction = computed(() => { - return settingStore.get("Comfy.LinkRelease.Action"); - }); - const linkReleaseActionShift = computed(() => { - return settingStore.get("Comfy.LinkRelease.ActionShift"); - }); - const handleCanvasEmptyRelease = /* @__PURE__ */ __name((e) => { - const detail = e.detail; - const shiftPressed = detail.originalEvent.shiftKey; - const action = shiftPressed ? linkReleaseActionShift.value : linkReleaseAction.value; - switch (action) { - case LinkReleaseTriggerAction.SEARCH_BOX: - showSearchBox(e); - break; - case LinkReleaseTriggerAction.CONTEXT_MENU: - showContextMenu(e); - break; - case LinkReleaseTriggerAction.NO_ACTION: - default: - break; - } - }, "handleCanvasEmptyRelease"); - useEventListener(document, "litegraph:canvas", canvasEventHandler); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", null, [ - createVNode(unref(script$p), { - visible: unref(visible), - "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => isRef(visible) ? visible.value = $event : null), - modal: "", - "dismissable-mask": dismissable.value, - onHide: clearFilters, - pt: { - root: { - class: "invisible-dialog-root", - role: "search" - }, - mask: { class: "node-search-box-dialog-mask" }, - transition: { - enterFromClass: "opacity-0 scale-75", - // 100ms is the duration of the transition in the dialog component - enterActiveClass: "transition-all duration-100 ease-out", - leaveActiveClass: "transition-all duration-100 ease-in", - leaveToClass: "opacity-0 scale-75" - } - } - }, { - container: withCtx(() => [ - createVNode(_sfc_main$i, { - filters: nodeFilters.value, - onAddFilter: addFilter, - onRemoveFilter: removeFilter, - onAddNode: addNode - }, null, 8, ["filters"]) - ]), - _: 1 - }, 8, ["visible", "dismissable-mask"]) - ]); - }; - } -}); -var theme$4 = /* @__PURE__ */ __name(function theme4(_ref) { - var dt = _ref.dt; - return "\n.p-overlaybadge {\n position: relative;\n}\n\n.p-overlaybadge .p-badge {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n transform-origin: 100% 0;\n margin: 0;\n outline-width: ".concat(dt("overlaybadge.outline.width"), ";\n outline-style: solid;\n outline-color: ").concat(dt("overlaybadge.outline.color"), ";\n}\n"); -}, "theme"); -var classes$4 = { - root: "p-overlaybadge" -}; -var OverlayBadgeStyle = BaseStyle.extend({ - name: "overlaybadge", - theme: theme$4, - classes: classes$4 -}); -var script$1$4 = { - name: "OverlayBadge", - "extends": script$q, - style: OverlayBadgeStyle, - provide: /* @__PURE__ */ __name(function provide8() { - return { - $pcOverlayBadge: this, - $parentInstance: this - }; - }, "provide") -}; -var script$6 = { - name: "OverlayBadge", - "extends": script$1$4, - inheritAttrs: false, - components: { - Badge: script$q - } -}; -function render$b(_ctx, _cache, $props, $setup, $data, $options) { - var _component_Badge = resolveComponent("Badge"); - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root") - }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default"), createVNode(_component_Badge, mergeProps(_ctx.$props, { - pt: _ctx.ptm("pcBadge") - }), null, 16, ["pt"])], 16); -} -__name(render$b, "render$b"); -script$6.render = render$b; -const _sfc_main$g = /* @__PURE__ */ defineComponent({ - __name: "SidebarIcon", - props: { - icon: String, - selected: Boolean, - tooltip: { - type: String, - default: "" - }, - class: { - type: String, - default: "" - }, - iconBadge: { - type: [String, Function], - default: "" - } - }, - emits: ["click"], - setup(__props, { emit: __emit }) { - const props = __props; - const emit = __emit; - const overlayValue = computed( - () => typeof props.iconBadge === "function" ? props.iconBadge() || "" : props.iconBadge - ); - const shouldShowBadge = computed(() => !!overlayValue.value); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return withDirectives((openBlock(), createBlock(unref(script$d), { - class: normalizeClass(props.class), - text: "", - pt: { - root: { - class: `side-bar-button ${props.selected ? "p-button-primary side-bar-button-selected" : "p-button-secondary"}`, - "aria-label": props.tooltip - } - }, - onClick: _cache[0] || (_cache[0] = ($event) => emit("click", $event)) - }, { - icon: withCtx(() => [ - shouldShowBadge.value ? (openBlock(), createBlock(unref(script$6), { - key: 0, - value: overlayValue.value - }, { - default: withCtx(() => [ - createBaseVNode("i", { - class: normalizeClass(props.icon + " side-bar-button-icon") - }, null, 2) - ]), - _: 1 - }, 8, ["value"])) : (openBlock(), createElementBlock("i", { - key: 1, - class: normalizeClass(props.icon + " side-bar-button-icon") - }, null, 2)) - ]), - _: 1 - }, 8, ["class", "pt"])), [ - [_directive_tooltip, { value: props.tooltip, showDelay: 300, hideDelay: 300 }] - ]); - }; - } -}); -const SidebarIcon = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-6ab4daa6"]]); -const _sfc_main$f = /* @__PURE__ */ defineComponent({ - __name: "SidebarLogoutIcon", - setup(__props) { - const { t } = useI18n(); - const userStore = useUserStore(); - const tooltip = computed( - () => `${t("sideToolbar.logout")} (${userStore.currentUser?.username})` - ); - const logout = /* @__PURE__ */ __name(() => { - userStore.logout(); - window.location.reload(); - }, "logout"); - return (_ctx, _cache) => { - return openBlock(), createBlock(SidebarIcon, { - icon: "pi pi-sign-out", - tooltip: tooltip.value, - onClick: logout - }, null, 8, ["tooltip"]); - }; - } -}); -const _sfc_main$e = /* @__PURE__ */ defineComponent({ - __name: "SidebarSettingsToggleIcon", - setup(__props) { - const dialogStore = useDialogStore(); - const showSetting = /* @__PURE__ */ __name(() => { - dialogStore.showDialog({ - key: "global-settings", - headerComponent: SettingDialogHeader, - component: SettingDialogContent - }); - }, "showSetting"); - return (_ctx, _cache) => { - return openBlock(), createBlock(SidebarIcon, { - icon: "pi pi-cog", - class: "comfy-settings-btn", - onClick: showSetting, - tooltip: _ctx.$t("g.settings") - }, null, 8, ["tooltip"]); - }; - } -}); -const _sfc_main$d = /* @__PURE__ */ defineComponent({ - __name: "SidebarThemeToggleIcon", - setup(__props) { - const colorPaletteStore = useColorPaletteStore(); - const icon = computed( - () => colorPaletteStore.completedActivePalette.light_theme ? "pi pi-sun" : "pi pi-moon" - ); - const commandStore = useCommandStore(); - const toggleTheme = /* @__PURE__ */ __name(() => { - commandStore.execute("Comfy.ToggleTheme"); - }, "toggleTheme"); - return (_ctx, _cache) => { - return openBlock(), createBlock(SidebarIcon, { - icon: icon.value, - onClick: toggleTheme, - tooltip: _ctx.$t("sideToolbar.themeToggle"), - class: "comfy-vue-theme-toggle" - }, null, 8, ["icon", "tooltip"]); - }; - } -}); -const _withScopeId$7 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-33cac83a"), n = n(), popScopeId(), n), "_withScopeId$7"); -const _hoisted_1$h = { class: "side-tool-bar-end" }; -const _hoisted_2$b = { - key: 0, - class: "sidebar-content-container h-full overflow-y-auto overflow-x-hidden" -}; -const _sfc_main$c = /* @__PURE__ */ defineComponent({ - __name: "SideToolbar", - setup(__props) { - const workspaceStore = useWorkspaceStore(); - const settingStore = useSettingStore(); - const userStore = useUserStore(); - const teleportTarget = computed( - () => settingStore.get("Comfy.Sidebar.Location") === "left" ? ".comfyui-body-left" : ".comfyui-body-right" - ); - const isSmall = computed( - () => settingStore.get("Comfy.Sidebar.Size") === "small" - ); - const tabs = computed(() => workspaceStore.getSidebarTabs()); - const selectedTab = computed(() => workspaceStore.sidebarTab.activeSidebarTab); - const onTabClick = /* @__PURE__ */ __name((item3) => { - workspaceStore.sidebarTab.toggleSidebarTab(item3.id); - }, "onTabClick"); - const keybindingStore = useKeybindingStore(); - const getTabTooltipSuffix = /* @__PURE__ */ __name((tab) => { - const keybinding = keybindingStore.getKeybindingByCommandId( - `Workspace.ToggleSidebarTab.${tab.id}` - ); - return keybinding ? ` (${keybinding.combo.toString()})` : ""; - }, "getTabTooltipSuffix"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock(Fragment, null, [ - (openBlock(), createBlock(Teleport, { to: teleportTarget.value }, [ - createBaseVNode("nav", { - class: normalizeClass(["side-tool-bar-container", { "small-sidebar": isSmall.value }]) - }, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab) => { - return openBlock(), createBlock(SidebarIcon, { - key: tab.id, - icon: tab.icon, - iconBadge: tab.iconBadge, - tooltip: tab.tooltip + getTabTooltipSuffix(tab), - selected: tab.id === selectedTab.value?.id, - class: normalizeClass(tab.id + "-tab-button"), - onClick: /* @__PURE__ */ __name(($event) => onTabClick(tab), "onClick") - }, null, 8, ["icon", "iconBadge", "tooltip", "selected", "class", "onClick"]); - }), 128)), - createBaseVNode("div", _hoisted_1$h, [ - unref(userStore).isMultiUserServer ? (openBlock(), createBlock(_sfc_main$f, { key: 0 })) : createCommentVNode("", true), - createVNode(_sfc_main$d), - createVNode(_sfc_main$e) - ]) - ], 2) - ], 8, ["to"])), - selectedTab.value ? (openBlock(), createElementBlock("div", _hoisted_2$b, [ - createVNode(_sfc_main$q, { extension: selectedTab.value }, null, 8, ["extension"]) - ])) : createCommentVNode("", true) - ], 64); - }; - } -}); -const SideToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-33cac83a"]]); -const _withScopeId$6 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-8d011a31"), n = n(), popScopeId(), n), "_withScopeId$6"); -const _hoisted_1$g = { class: "workflow-label text-sm max-w-[150px] truncate inline-block" }; -const _hoisted_2$a = { class: "relative" }; -const _hoisted_3$a = { - key: 0, - class: "status-indicator" -}; -const _sfc_main$b = /* @__PURE__ */ defineComponent({ - __name: "WorkflowTab", - props: { - class: {}, - workflowOption: {} - }, - setup(__props) { - const props = __props; - const workspaceStore = useWorkspaceStore(); - const workflowStore = useWorkflowStore(); - const workflowTabRef = ref(null); - const closeWorkflows = /* @__PURE__ */ __name(async (options) => { - for (const opt of options) { - if (!await useWorkflowService().closeWorkflow(opt.workflow, { - warnIfUnsaved: !workspaceStore.shiftDown - })) { - break; - } - } - }, "closeWorkflows"); - const onCloseWorkflow = /* @__PURE__ */ __name((option2) => { - closeWorkflows([option2]); - }, "onCloseWorkflow"); - const tabGetter = /* @__PURE__ */ __name(() => workflowTabRef.value, "tabGetter"); - usePragmaticDraggable(tabGetter, { - getInitialData: /* @__PURE__ */ __name(() => { - return { - workflowKey: props.workflowOption.workflow.key - }; - }, "getInitialData") - }); - usePragmaticDroppable(tabGetter, { - getData: /* @__PURE__ */ __name(() => { - return { - workflowKey: props.workflowOption.workflow.key - }; - }, "getData"), - onDrop: /* @__PURE__ */ __name((e) => { - const fromIndex = workflowStore.openWorkflows.findIndex( - (wf) => wf.key === e.source.data.workflowKey - ); - const toIndex = workflowStore.openWorkflows.findIndex( - (wf) => wf.key === e.location.current.dropTargets[0]?.data.workflowKey - ); - if (fromIndex !== toIndex) { - workflowStore.reorderWorkflows(fromIndex, toIndex); - } - }, "onDrop") - }); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", mergeProps({ - class: "flex p-2 gap-2 workflow-tab", - ref_key: "workflowTabRef", - ref: workflowTabRef - }, _ctx.$attrs), [ - withDirectives((openBlock(), createElementBlock("span", _hoisted_1$g, [ - createTextVNode(toDisplayString(_ctx.workflowOption.workflow.filename), 1) - ])), [ - [ - _directive_tooltip, - _ctx.workflowOption.workflow.key, - void 0, - { bottom: true } - ] - ]), - createBaseVNode("div", _hoisted_2$a, [ - !unref(workspaceStore).shiftDown && (_ctx.workflowOption.workflow.isModified || !_ctx.workflowOption.workflow.isPersisted) ? (openBlock(), createElementBlock("span", _hoisted_3$a, "•")) : createCommentVNode("", true), - createVNode(unref(script$d), { - class: "close-button p-0 w-auto", - icon: "pi pi-times", - text: "", - severity: "secondary", - size: "small", - onClick: _cache[0] || (_cache[0] = withModifiers(($event) => onCloseWorkflow(_ctx.workflowOption), ["stop"])) - }) - ]) - ], 16); - }; - } -}); -const WorkflowTab = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-8d011a31"]]); -const _withScopeId$5 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-54fadc45"), n = n(), popScopeId(), n), "_withScopeId$5"); -const _hoisted_1$f = { class: "workflow-tabs-container flex flex-row max-w-full h-full" }; -const _sfc_main$a = /* @__PURE__ */ defineComponent({ - __name: "WorkflowTabs", - props: { - class: {} - }, - setup(__props) { - const props = __props; - const { t } = useI18n(); - const workspaceStore = useWorkspaceStore(); - const workflowStore = useWorkflowStore(); - const workflowService = useWorkflowService(); - const workflowBookmarkStore = useWorkflowBookmarkStore(); - const rightClickedTab = ref(null); - const menu = ref(); - const workflowToOption = /* @__PURE__ */ __name((workflow) => ({ - value: workflow.path, - workflow - }), "workflowToOption"); - const options = computed( - () => workflowStore.openWorkflows.map(workflowToOption) - ); - const selectedWorkflow = computed( - () => workflowStore.activeWorkflow ? workflowToOption(workflowStore.activeWorkflow) : null - ); - const onWorkflowChange = /* @__PURE__ */ __name((option2) => { - if (!option2) { - return; - } - if (selectedWorkflow.value?.value === option2.value) { - return; - } - workflowService.openWorkflow(option2.workflow); - }, "onWorkflowChange"); - const closeWorkflows = /* @__PURE__ */ __name(async (options2) => { - for (const opt of options2) { - if (!await workflowService.closeWorkflow(opt.workflow, { - warnIfUnsaved: !workspaceStore.shiftDown - })) { - break; - } - } - }, "closeWorkflows"); - const onCloseWorkflow = /* @__PURE__ */ __name((option2) => { - closeWorkflows([option2]); - }, "onCloseWorkflow"); - const showContextMenu = /* @__PURE__ */ __name((event, option2) => { - rightClickedTab.value = option2; - menu.value.show(event); - }, "showContextMenu"); - const contextMenuItems = computed(() => { - const tab = rightClickedTab.value; - if (!tab) return []; - const index = options.value.findIndex((v) => v.workflow === tab.workflow); - return [ - { - label: t("tabMenu.duplicateTab"), - command: /* @__PURE__ */ __name(() => { - workflowService.duplicateWorkflow(tab.workflow); - }, "command") - }, - { - separator: true - }, - { - label: t("tabMenu.closeTab"), - command: /* @__PURE__ */ __name(() => onCloseWorkflow(tab), "command") - }, - { - label: t("tabMenu.closeTabsToLeft"), - command: /* @__PURE__ */ __name(() => closeWorkflows(options.value.slice(0, index)), "command"), - disabled: index <= 0 - }, - { - label: t("tabMenu.closeTabsToRight"), - command: /* @__PURE__ */ __name(() => closeWorkflows(options.value.slice(index + 1)), "command"), - disabled: index === options.value.length - 1 - }, - { - label: t("tabMenu.closeOtherTabs"), - command: /* @__PURE__ */ __name(() => closeWorkflows([ - ...options.value.slice(index + 1), - ...options.value.slice(0, index) - ]), "command"), - disabled: options.value.length <= 1 - }, - { - label: workflowBookmarkStore.isBookmarked(tab.workflow.path) ? t("tabMenu.removeFromBookmarks") : t("tabMenu.addToBookmarks"), - command: /* @__PURE__ */ __name(() => workflowBookmarkStore.toggleBookmarked(tab.workflow.path), "command"), - disabled: tab.workflow.isTemporary - } - ]; - }); - const commandStore = useCommandStore(); - const handleWheel = /* @__PURE__ */ __name((event) => { - const scrollElement = event.currentTarget; - const scrollAmount = event.deltaX || event.deltaY; - scrollElement.scroll({ - left: scrollElement.scrollLeft + scrollAmount - }); - }, "handleWheel"); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", _hoisted_1$f, [ - createVNode(unref(script$s), { - class: "overflow-hidden no-drag", - "pt:content": { - class: "p-0 w-full", - onwheel: handleWheel - }, - "pt:barX": "h-1" - }, { - default: withCtx(() => [ - createVNode(unref(script$r), { - class: normalizeClass(["workflow-tabs bg-transparent", props.class]), - modelValue: selectedWorkflow.value, - "onUpdate:modelValue": onWorkflowChange, - options: options.value, - optionLabel: "label", - dataKey: "value" - }, { - option: withCtx(({ option: option2 }) => [ - createVNode(WorkflowTab, { - onContextmenu: /* @__PURE__ */ __name(($event) => showContextMenu($event, option2), "onContextmenu"), - onMouseup: withModifiers(($event) => onCloseWorkflow(option2), ["middle"]), - "workflow-option": option2 - }, null, 8, ["onContextmenu", "onMouseup", "workflow-option"]) - ]), - _: 1 - }, 8, ["class", "modelValue", "options"]) - ]), - _: 1 - }, 8, ["pt:content"]), - withDirectives(createVNode(unref(script$d), { - class: "new-blank-workflow-button flex-shrink-0 no-drag", - icon: "pi pi-plus", - text: "", - severity: "secondary", - "aria-label": _ctx.$t("sideToolbar.newBlankWorkflow"), - onClick: _cache[0] || (_cache[0] = () => unref(commandStore).execute("Comfy.NewBlankWorkflow")) - }, null, 8, ["aria-label"]), [ - [_directive_tooltip, { value: _ctx.$t("sideToolbar.newBlankWorkflow"), showDelay: 300 }] - ]), - createVNode(unref(script$t), { - ref_key: "menu", - ref: menu, - model: contextMenuItems.value - }, null, 8, ["model"]) - ]); - }; - } -}); -const WorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-54fadc45"]]); -const _withScopeId$4 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-38831d8e"), n = n(), popScopeId(), n), "_withScopeId$4"); -const _hoisted_1$e = { class: "absolute top-0 left-0 w-auto max-w-full pointer-events-auto" }; -const _sfc_main$9 = /* @__PURE__ */ defineComponent({ - __name: "SecondRowWorkflowTabs", - setup(__props) { - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$e, [ - createVNode(WorkflowTabs) - ]); - }; - } -}); -const SecondRowWorkflowTabs = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-38831d8e"]]); -const CORE_SETTINGS = [ - { - id: "Comfy.Validation.Workflows", - name: "Validate workflows", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.NodeSearchBoxImpl", - category: ["Comfy", "Node Search Box", "Implementation"], - experimental: true, - name: "Node search box implementation", - type: "combo", - options: ["default", "litegraph (legacy)"], - defaultValue: "default" - }, - { - id: "Comfy.LinkRelease.Action", - category: ["LiteGraph", "LinkRelease", "Action"], - name: "Action on link release (No modifier)", - type: "combo", - options: Object.values(LinkReleaseTriggerAction), - defaultValue: LinkReleaseTriggerAction.CONTEXT_MENU - }, - { - id: "Comfy.LinkRelease.ActionShift", - category: ["LiteGraph", "LinkRelease", "ActionShift"], - name: "Action on link release (Shift)", - type: "combo", - options: Object.values(LinkReleaseTriggerAction), - defaultValue: LinkReleaseTriggerAction.SEARCH_BOX - }, - { - id: "Comfy.NodeSearchBoxImpl.NodePreview", - category: ["Comfy", "Node Search Box", "NodePreview"], - name: "Node preview", - tooltip: "Only applies to the default implementation", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.NodeSearchBoxImpl.ShowCategory", - category: ["Comfy", "Node Search Box", "ShowCategory"], - name: "Show node category in search results", - tooltip: "Only applies to the default implementation", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.NodeSearchBoxImpl.ShowIdName", - category: ["Comfy", "Node Search Box", "ShowIdName"], - name: "Show node id name in search results", - tooltip: "Only applies to the default implementation", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.NodeSearchBoxImpl.ShowNodeFrequency", - category: ["Comfy", "Node Search Box", "ShowNodeFrequency"], - name: "Show node frequency in search results", - tooltip: "Only applies to the default implementation", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.Sidebar.Location", - category: ["Appearance", "Sidebar", "Location"], - name: "Sidebar location", - type: "combo", - options: ["left", "right"], - defaultValue: "left" - }, - { - id: "Comfy.Sidebar.Size", - category: ["Appearance", "Sidebar", "Size"], - name: "Sidebar size", - type: "combo", - options: ["normal", "small"], - // Default to small if the window is less than 1536px(2xl) wide. - defaultValue: /* @__PURE__ */ __name(() => window.innerWidth < 1536 ? "small" : "normal", "defaultValue") - }, - { - id: "Comfy.TextareaWidget.FontSize", - category: ["Appearance", "Node Widget", "TextareaWidget", "FontSize"], - name: "Textarea widget font size", - type: "slider", - defaultValue: 10, - attrs: { - min: 8, - max: 24 - } - }, - { - id: "Comfy.TextareaWidget.Spellcheck", - category: ["Comfy", "Node Widget", "TextareaWidget", "Spellcheck"], - name: "Textarea widget spellcheck", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.Workflow.SortNodeIdOnSave", - name: "Sort node IDs when saving workflow", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.Graph.CanvasInfo", - category: ["LiteGraph", "Canvas", "CanvasInfo"], - name: "Show canvas info on bottom left corner (fps, etc.)", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Node.ShowDeprecated", - name: "Show deprecated nodes in search", - tooltip: "Deprecated nodes are hidden by default in the UI, but remain functional in existing workflows that use them.", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.Node.ShowExperimental", - name: "Show experimental nodes in search", - tooltip: "Experimental nodes are marked as such in the UI and may be subject to significant changes or removal in future versions. Use with caution in production workflows", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Node.Opacity", - category: ["Appearance", "Node", "Opacity"], - name: "Node opacity", - type: "slider", - defaultValue: 1, - attrs: { - min: 0.01, - max: 1, - step: 0.01 - } - }, - { - id: "Comfy.Workflow.ShowMissingNodesWarning", - name: "Show missing nodes warning", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Workflow.ShowMissingModelsWarning", - name: "Show missing models warning", - type: "boolean", - defaultValue: false, - experimental: true - }, - { - id: "Comfy.Graph.ZoomSpeed", - category: ["LiteGraph", "Canvas", "ZoomSpeed"], - name: "Canvas zoom speed", - type: "slider", - defaultValue: 1.1, - attrs: { - min: 1.01, - max: 2.5, - step: 0.01 - } - }, - // Bookmarks are stored in the settings store. - // Bookmarks are in format of category/display_name. e.g. "conditioning/CLIPTextEncode" - { - id: "Comfy.NodeLibrary.Bookmarks", - name: "Node library bookmarks with display name (deprecated)", - type: "hidden", - defaultValue: [], - deprecated: true - }, - { - id: "Comfy.NodeLibrary.Bookmarks.V2", - name: "Node library bookmarks v2 with unique name", - type: "hidden", - defaultValue: [] - }, - // Stores mapping from bookmark folder name to its customization. - { - id: "Comfy.NodeLibrary.BookmarksCustomization", - name: "Node library bookmarks customization", - type: "hidden", - defaultValue: {} - }, - // Hidden setting used by the queue for how to fit images - { - id: "Comfy.Queue.ImageFit", - name: "Queue image fit", - type: "hidden", - defaultValue: "cover" - }, - { - id: "Comfy.GroupSelectedNodes.Padding", - category: ["LiteGraph", "Group", "Padding"], - name: "Group selected nodes padding", - type: "slider", - defaultValue: 10, - attrs: { - min: 0, - max: 100 - } - }, - { - id: "Comfy.Node.DoubleClickTitleToEdit", - category: ["LiteGraph", "Node", "DoubleClickTitleToEdit"], - name: "Double click node title to edit", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Group.DoubleClickTitleToEdit", - category: ["LiteGraph", "Group", "DoubleClickTitleToEdit"], - name: "Double click group title to edit", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Window.UnloadConfirmation", - name: "Show confirmation when closing window", - type: "boolean", - defaultValue: true, - versionModified: "1.7.12" - }, - { - id: "Comfy.TreeExplorer.ItemPadding", - category: ["Appearance", "Tree Explorer", "ItemPadding"], - name: "Tree explorer item padding", - type: "slider", - defaultValue: 2, - attrs: { - min: 0, - max: 8, - step: 1 - } - }, - { - id: "Comfy.ModelLibrary.AutoLoadAll", - name: "Automatically load all model folders", - tooltip: "If true, all folders will load as soon as you open the model library (this may cause delays while it loads). If false, root level model folders will only load once you click on them.", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.ModelLibrary.NameFormat", - name: "What name to display in the model library tree view", - tooltip: 'Select "filename" to render a simplified view of the raw filename (without directory or ".safetensors" extension) in the model list. Select "title" to display the configurable model metadata title.', - type: "combo", - options: ["filename", "title"], - defaultValue: "title" - }, - { - id: "Comfy.Locale", - name: "Language", - type: "combo", - options: [ - { value: "en", text: "English" }, - { value: "zh", text: "中文" }, - { value: "ru", text: "Русский" }, - { value: "ja", text: "日本語" }, - { value: "ko", text: "한국어" }, - { value: "fr", text: "Français" } - ], - defaultValue: /* @__PURE__ */ __name(() => navigator.language.split("-")[0] || "en", "defaultValue") - }, - { - id: "Comfy.NodeBadge.NodeSourceBadgeMode", - category: ["LiteGraph", "Node", "NodeSourceBadgeMode"], - name: "Node source badge mode", - type: "combo", - options: Object.values(NodeBadgeMode), - defaultValue: NodeBadgeMode.HideBuiltIn - }, - { - id: "Comfy.NodeBadge.NodeIdBadgeMode", - category: ["LiteGraph", "Node", "NodeIdBadgeMode"], - name: "Node ID badge mode", - type: "combo", - options: [NodeBadgeMode.None, NodeBadgeMode.ShowAll], - defaultValue: NodeBadgeMode.ShowAll - }, - { - id: "Comfy.NodeBadge.NodeLifeCycleBadgeMode", - category: ["LiteGraph", "Node", "NodeLifeCycleBadgeMode"], - name: "Node life cycle badge mode", - type: "combo", - options: [NodeBadgeMode.None, NodeBadgeMode.ShowAll], - defaultValue: NodeBadgeMode.ShowAll - }, - { - id: "Comfy.ConfirmClear", - category: ["Comfy", "Workflow", "ConfirmClear"], - name: "Require confirmation when clearing workflow", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.PromptFilename", - category: ["Comfy", "Workflow", "PromptFilename"], - name: "Prompt for filename when saving workflow", - type: "boolean", - defaultValue: true - }, - /** - * file format for preview - * - * format;quality - * - * ex) - * webp;50 -> webp, quality 50 - * jpeg;80 -> rgb, jpeg, quality 80 - * - * @type {string} - */ - { - id: "Comfy.PreviewFormat", - category: ["LiteGraph", "Node Widget", "PreviewFormat"], - name: "Preview image format", - tooltip: "When displaying a preview in the image widget, convert it to a lightweight image, e.g. webp, jpeg, webp;50, etc.", - type: "text", - defaultValue: "" - }, - { - id: "Comfy.DisableSliders", - category: ["LiteGraph", "Node Widget", "DisableSliders"], - name: "Disable node widget sliders", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.DisableFloatRounding", - category: ["LiteGraph", "Node Widget", "DisableFloatRounding"], - name: "Disable default float widget rounding.", - tooltip: "(requires page reload) Cannot disable round when round is set by the node in the backend.", - type: "boolean", - defaultValue: false - }, - { - id: "Comfy.FloatRoundingPrecision", - category: ["LiteGraph", "Node Widget", "FloatRoundingPrecision"], - name: "Float widget rounding decimal places [0 = auto].", - tooltip: "(requires page reload)", - type: "slider", - attrs: { - min: 0, - max: 6, - step: 1 - }, - defaultValue: 0 - }, - { - id: "Comfy.EnableTooltips", - category: ["LiteGraph", "Node", "EnableTooltips"], - name: "Enable Tooltips", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.DevMode", - name: "Enable dev mode options (API save, etc.)", - type: "boolean", - defaultValue: false, - onChange: /* @__PURE__ */ __name((value) => { - const element = document.getElementById("comfy-dev-save-api-button"); - if (element) { - element.style.display = value ? "flex" : "none"; - } - }, "onChange") - }, - { - id: "Comfy.UseNewMenu", - category: ["Comfy", "Menu", "UseNewMenu"], - defaultValue: "Top", - name: "Use new menu", - type: "combo", - options: ["Disabled", "Top", "Bottom"], - migrateDeprecatedValue: /* @__PURE__ */ __name((value) => { - if (value === "Floating") { - return "Top"; - } - return value; - }, "migrateDeprecatedValue") - }, - { - id: "Comfy.Workflow.WorkflowTabsPosition", - name: "Opened workflows position", - type: "combo", - options: ["Sidebar", "Topbar", "Topbar (2nd-row)"], - // Default to topbar (2nd-row) if the window is less than 1536px(2xl) wide. - defaultValue: /* @__PURE__ */ __name(() => window.innerWidth < 1536 ? "Topbar (2nd-row)" : "Topbar", "defaultValue") - }, - { - id: "Comfy.Graph.CanvasMenu", - category: ["LiteGraph", "Canvas", "CanvasMenu"], - name: "Show graph canvas menu", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.QueueButton.BatchCountLimit", - name: "Batch count limit", - tooltip: "The maximum number of tasks added to the queue at one button click", - type: "number", - defaultValue: 100, - versionAdded: "1.3.5" - }, - { - id: "Comfy.Keybinding.UnsetBindings", - name: "Keybindings unset by the user", - type: "hidden", - defaultValue: [], - versionAdded: "1.3.7", - versionModified: "1.7.3", - migrateDeprecatedValue: /* @__PURE__ */ __name((value) => { - return value.map((keybinding) => { - if (keybinding["targetSelector"] === "#graph-canvas") { - keybinding["targetElementId"] = "graph-canvas"; - } - return keybinding; - }); - }, "migrateDeprecatedValue") - }, - { - id: "Comfy.Keybinding.NewBindings", - name: "Keybindings set by the user", - type: "hidden", - defaultValue: [], - versionAdded: "1.3.7" - }, - { - id: "Comfy.Extension.Disabled", - name: "Disabled extension names", - type: "hidden", - defaultValue: [], - versionAdded: "1.3.11" - }, - { - id: "Comfy.Validation.NodeDefs", - name: "Validate node definitions (slow)", - type: "boolean", - tooltip: "Recommended for node developers. This will validate all node definitions on startup.", - defaultValue: false, - versionAdded: "1.3.14" - }, - { - id: "Comfy.LinkRenderMode", - category: ["LiteGraph", "Graph", "LinkRenderMode"], - name: "Link Render Mode", - defaultValue: 2, - type: "combo", - options: [ - { value: LiteGraph.STRAIGHT_LINK, text: "Straight" }, - { value: LiteGraph.LINEAR_LINK, text: "Linear" }, - { value: LiteGraph.SPLINE_LINK, text: "Spline" }, - { value: LiteGraph.HIDDEN_LINK, text: "Hidden" } - ] - }, - { - id: "Comfy.Node.AutoSnapLinkToSlot", - category: ["LiteGraph", "Node", "AutoSnapLinkToSlot"], - name: "Auto snap link to node slot", - tooltip: "When dragging a link over a node, the link automatically snap to a viable input slot on the node", - type: "boolean", - defaultValue: true, - versionAdded: "1.3.29" - }, - { - id: "Comfy.Node.SnapHighlightsNode", - category: ["LiteGraph", "Node", "SnapHighlightsNode"], - name: "Snap highlights node", - tooltip: "When dragging a link over a node with viable input slot, highlight the node", - type: "boolean", - defaultValue: true, - versionAdded: "1.3.29" - }, - { - id: "Comfy.Node.BypassAllLinksOnDelete", - category: ["LiteGraph", "Node", "BypassAllLinksOnDelete"], - name: "Keep all links when deleting nodes", - tooltip: "When deleting a node, attempt to reconnect all of its input and output links (bypassing the deleted node)", - type: "boolean", - defaultValue: true, - versionAdded: "1.3.40" - }, - { - id: "Comfy.Node.MiddleClickRerouteNode", - category: ["LiteGraph", "Node", "MiddleClickRerouteNode"], - name: "Middle-click creates a new Reroute node", - type: "boolean", - defaultValue: true, - versionAdded: "1.3.42" - }, - { - id: "Comfy.RerouteBeta", - category: ["LiteGraph", "RerouteBeta"], - name: "Opt-in to the reroute beta test", - tooltip: "Enables the new native reroutes.\n\nReroutes can be added by holding alt and dragging from a link line, or on the link menu.\n\nDisabling this option is non-destructive - reroutes are hidden.", - experimental: true, - type: "boolean", - defaultValue: false, - versionAdded: "1.3.42" - }, - { - id: "Comfy.Graph.LinkMarkers", - category: ["LiteGraph", "Link", "LinkMarkers"], - name: "Link midpoint markers", - defaultValue: LinkMarkerShape.Circle, - type: "combo", - options: [ - { value: LinkMarkerShape.None, text: "None" }, - { value: LinkMarkerShape.Circle, text: "Circle" }, - { value: LinkMarkerShape.Arrow, text: "Arrow" } - ], - versionAdded: "1.3.42" - }, - { - id: "Comfy.DOMClippingEnabled", - category: ["LiteGraph", "Node", "DOMClippingEnabled"], - name: "Enable DOM element clipping (enabling may reduce performance)", - type: "boolean", - defaultValue: true - }, - { - id: "Comfy.Graph.CtrlShiftZoom", - category: ["LiteGraph", "Canvas", "CtrlShiftZoom"], - name: "Enable fast-zoom shortcut (Ctrl + Shift + Drag)", - type: "boolean", - defaultValue: true, - versionAdded: "1.4.0" - }, - { - id: "Comfy.Pointer.ClickDrift", - category: ["LiteGraph", "Pointer", "ClickDrift"], - name: "Pointer click drift (maximum distance)", - tooltip: "If the pointer moves more than this distance while holding a button down, it is considered dragging (rather than clicking).\n\nHelps prevent objects from being unintentionally nudged if the pointer is moved whilst clicking.", - experimental: true, - type: "slider", - attrs: { - min: 0, - max: 20, - step: 1 - }, - defaultValue: 6, - versionAdded: "1.4.3" - }, - { - id: "Comfy.Pointer.ClickBufferTime", - category: ["LiteGraph", "Pointer", "ClickBufferTime"], - name: "Pointer click drift delay", - tooltip: "After pressing a pointer button down, this is the maximum time (in milliseconds) that pointer movement can be ignored for.\n\nHelps prevent objects from being unintentionally nudged if the pointer is moved whilst clicking.", - experimental: true, - type: "slider", - attrs: { - min: 0, - max: 1e3, - step: 25 - }, - defaultValue: 150, - versionAdded: "1.4.3" - }, - { - id: "Comfy.Pointer.DoubleClickTime", - category: ["LiteGraph", "Pointer", "DoubleClickTime"], - name: "Double click interval (maximum)", - tooltip: "The maximum time in milliseconds between the two clicks of a double-click. Increasing this value may assist if double-clicks are sometimes not registered.", - type: "slider", - attrs: { - min: 100, - max: 1e3, - step: 50 - }, - defaultValue: 300, - versionAdded: "1.4.3" - }, - { - id: "Comfy.SnapToGrid.GridSize", - category: ["LiteGraph", "Canvas", "GridSize"], - name: "Snap to grid size", - type: "slider", - attrs: { - min: 1, - max: 500 - }, - tooltip: "When dragging and resizing nodes while holding shift they will be aligned to the grid, this controls the size of that grid.", - defaultValue: LiteGraph.CANVAS_GRID_SIZE - }, - // Keep the 'pysssss.SnapToGrid' setting id so we don't need to migrate setting values. - // Using a new setting id can cause existing users to lose their existing settings. - { - id: "pysssss.SnapToGrid", - category: ["LiteGraph", "Canvas", "AlwaysSnapToGrid"], - name: "Always snap to grid", - type: "boolean", - defaultValue: false, - versionAdded: "1.3.13" - }, - { - id: "Comfy.Server.ServerConfigValues", - name: "Server config values for frontend display", - tooltip: "Server config values used for frontend display only", - type: "hidden", - // Mapping from server config id to value. - defaultValue: {}, - versionAdded: "1.4.8" - }, - { - id: "Comfy.Server.LaunchArgs", - name: "Server launch arguments", - tooltip: "These are the actual arguments that are passed to the server when it is launched.", - type: "hidden", - defaultValue: {}, - versionAdded: "1.4.8" - }, - { - id: "Comfy.Queue.MaxHistoryItems", - name: "Queue history size", - tooltip: "The maximum number of tasks that show in the queue history.", - type: "slider", - attrs: { - min: 16, - max: 256, - step: 16 - }, - defaultValue: 64, - versionAdded: "1.4.12" - }, - { - id: "LiteGraph.Canvas.MaximumFps", - name: "Maxium FPS", - tooltip: "The maximum frames per second that the canvas is allowed to render. Caps GPU usage at the cost of smoothness. If 0, the screen refresh rate is used. Default: 0", - type: "slider", - attrs: { - min: 0, - max: 120 - }, - defaultValue: 0, - versionAdded: "1.5.1" - }, - { - id: "Comfy.EnableWorkflowViewRestore", - category: ["Comfy", "Workflow", "EnableWorkflowViewRestore"], - name: "Save and restore canvas position and zoom level in workflows", - type: "boolean", - defaultValue: true, - versionModified: "1.5.4" - }, - { - id: "Comfy.Workflow.ConfirmDelete", - name: "Show confirmation when deleting workflows", - type: "boolean", - defaultValue: true, - versionAdded: "1.5.6" - }, - { - id: "Comfy.ColorPalette", - name: "The active color palette id", - type: "hidden", - defaultValue: "dark", - versionModified: "1.6.7", - migrateDeprecatedValue(value) { - return value.startsWith("custom_") ? value.replace("custom_", "") : value; - } - }, - { - id: "Comfy.CustomColorPalettes", - name: "Custom color palettes", - type: "hidden", - defaultValue: {}, - versionModified: "1.6.7" - }, - { - id: "Comfy.WidgetControlMode", - category: ["Comfy", "Node Widget", "WidgetControlMode"], - name: "Widget control mode", - tooltip: "Controls when widget values are updated (randomize/increment/decrement), either before the prompt is queued or after.", - type: "combo", - defaultValue: "after", - options: ["before", "after"], - versionModified: "1.6.10" - } -]; -const _sfc_main$8 = /* @__PURE__ */ defineComponent({ - __name: "GraphCanvas", - emits: ["ready"], - setup(__props, { emit: __emit }) { - const emit = __emit; - const canvasRef = ref(null); - const litegraphService = useLitegraphService(); - const settingStore = useSettingStore(); - const nodeDefStore = useNodeDefStore(); - const workspaceStore = useWorkspaceStore(); - const canvasStore = useCanvasStore(); - const modelToNodeStore = useModelToNodeStore(); - const betaMenuEnabled = computed( - () => settingStore.get("Comfy.UseNewMenu") !== "Disabled" - ); - const workflowTabsPosition = computed( - () => settingStore.get("Comfy.Workflow.WorkflowTabsPosition") - ); - const canvasMenuEnabled = computed( - () => settingStore.get("Comfy.Graph.CanvasMenu") - ); - const tooltipEnabled = computed(() => settingStore.get("Comfy.EnableTooltips")); - const storedWorkflows = JSON.parse( - getStorageValue("Comfy.OpenWorkflowsPaths") || "[]" - ); - const storedActiveIndex = JSON.parse( - getStorageValue("Comfy.ActiveWorkflowIndex") || "-1" - ); - const openWorkflows = computed(() => workspaceStore?.workflow?.openWorkflows); - const activeWorkflow = computed(() => workspaceStore?.workflow?.activeWorkflow); - const restoreState2 = computed(() => { - if (!openWorkflows.value || !activeWorkflow.value) { - return { paths: [], activeIndex: -1 }; - } - const paths = openWorkflows.value.filter((workflow) => workflow?.isPersisted && !workflow.isModified).map((workflow) => workflow.path); - const activeIndex = openWorkflows.value.findIndex( - (workflow) => workflow.path === activeWorkflow.value?.path - ); - return { paths, activeIndex }; - }); - watchEffect(() => { - const canvasInfoEnabled = settingStore.get("Comfy.Graph.CanvasInfo"); - if (canvasStore.canvas) { - canvasStore.canvas.show_info = canvasInfoEnabled; - } - }); - watchEffect(() => { - const zoomSpeed = settingStore.get("Comfy.Graph.ZoomSpeed"); - if (canvasStore.canvas) { - canvasStore.canvas.zoom_speed = zoomSpeed; - } - }); - watchEffect(() => { - LiteGraph.snaps_for_comfy = settingStore.get("Comfy.Node.AutoSnapLinkToSlot"); - }); - watchEffect(() => { - LiteGraph.snap_highlights_node = settingStore.get( - "Comfy.Node.SnapHighlightsNode" - ); - }); - watchEffect(() => { - LGraphNode.keepAllLinksOnBypass = settingStore.get( - "Comfy.Node.BypassAllLinksOnDelete" - ); - }); - watchEffect(() => { - LiteGraph.middle_click_slot_add_default_node = settingStore.get( - "Comfy.Node.MiddleClickRerouteNode" - ); - }); - watchEffect(() => { - nodeDefStore.showDeprecated = settingStore.get("Comfy.Node.ShowDeprecated"); - }); - watchEffect(() => { - nodeDefStore.showExperimental = settingStore.get( - "Comfy.Node.ShowExperimental" - ); - }); - watchEffect(() => { - const spellcheckEnabled = settingStore.get("Comfy.TextareaWidget.Spellcheck"); - const textareas = document.querySelectorAll("textarea.comfy-multiline-input"); - textareas.forEach((textarea) => { - textarea.spellcheck = spellcheckEnabled; - textarea.focus(); - textarea.blur(); - }); - }); - watchEffect(() => { - const linkRenderMode = settingStore.get("Comfy.LinkRenderMode"); - if (canvasStore.canvas) { - canvasStore.canvas.links_render_mode = linkRenderMode; - canvasStore.canvas.setDirty( - /* fg */ - false, - /* bg */ - true - ); - } - }); - watchEffect(() => { - const linkMarkerShape = settingStore.get("Comfy.Graph.LinkMarkers"); - const { canvas } = canvasStore; - if (canvas) { - canvas.linkMarkerShape = linkMarkerShape; - canvas.setDirty(false, true); - } - }); - watchEffect(() => { - const reroutesEnabled = settingStore.get("Comfy.RerouteBeta"); - const { canvas } = canvasStore; - if (canvas) { - canvas.reroutesEnabled = reroutesEnabled; - canvas.setDirty(false, true); - } - }); - watchEffect(() => { - const maximumFps = settingStore.get("LiteGraph.Canvas.MaximumFps"); - const { canvas } = canvasStore; - if (canvas) canvas.maximumFps = maximumFps; - }); - watchEffect(() => { - CanvasPointer.doubleClickTime = settingStore.get( - "Comfy.Pointer.DoubleClickTime" - ); - }); - watchEffect(() => { - CanvasPointer.bufferTime = settingStore.get("Comfy.Pointer.ClickBufferTime"); - }); - watchEffect(() => { - CanvasPointer.maxClickDrift = settingStore.get("Comfy.Pointer.ClickDrift"); - }); - watchEffect(() => { - LiteGraph.CANVAS_GRID_SIZE = settingStore.get("Comfy.SnapToGrid.GridSize"); - }); - watchEffect(() => { - LiteGraph.alwaysSnapToGrid = settingStore.get("pysssss.SnapToGrid"); - }); - watch( - () => settingStore.get("Comfy.WidgetControlMode"), - () => { - if (!canvasStore.canvas) return; - for (const n of app.graph.nodes) { - if (!n.widgets) continue; - for (const w of n.widgets) { - if (w[IS_CONTROL_WIDGET]) { - updateControlWidgetLabel(w); - if (w.linkedWidgets) { - for (const l of w.linkedWidgets) { - updateControlWidgetLabel(l); - } - } - } - } - } - app.graph.setDirtyCanvas(true); - } - ); - const colorPaletteService = useColorPaletteService(); - const colorPaletteStore = useColorPaletteStore(); - watch( - [() => canvasStore.canvas, () => settingStore.get("Comfy.ColorPalette")], - ([canvas, currentPaletteId]) => { - if (!canvas) return; - colorPaletteService.loadColorPalette(currentPaletteId); - } - ); - watch( - () => colorPaletteStore.activePaletteId, - (newValue) => { - settingStore.set("Comfy.ColorPalette", newValue); - } - ); - const workflowStore = useWorkflowStore(); - const persistCurrentWorkflow = /* @__PURE__ */ __name(() => { - const workflow = JSON.stringify(app.serializeGraph()); - localStorage.setItem("workflow", workflow); - if (api.clientId) { - sessionStorage.setItem(`workflow:${api.clientId}`, workflow); - } - }, "persistCurrentWorkflow"); - watchEffect(() => { - if (workflowStore.activeWorkflow) { - const workflow = workflowStore.activeWorkflow; - setStorageValue("Comfy.PreviousWorkflow", workflow.key); - persistCurrentWorkflow(); - } - }); - api.addEventListener("graphChanged", persistCurrentWorkflow); - usePragmaticDroppable(() => canvasRef.value, { - onDrop: /* @__PURE__ */ __name((event) => { - const loc = event.location.current.input; - const dndData = event.source.data; - if (dndData.type === "tree-explorer-node") { - const node = dndData.data; - if (node.data instanceof ComfyNodeDefImpl) { - const nodeDef = node.data; - const pos = app.clientPosToCanvasPos([ - loc.clientX - 20, - loc.clientY - ]); - litegraphService.addNodeOnGraph(nodeDef, { pos }); - } else if (node.data instanceof ComfyModelDef) { - const model = node.data; - const pos = app.clientPosToCanvasPos([loc.clientX, loc.clientY]); - const nodeAtPos = app.graph.getNodeOnPos(pos[0], pos[1]); - let targetProvider = null; - let targetGraphNode = null; - if (nodeAtPos) { - const providers = modelToNodeStore.getAllNodeProviders( - model.directory - ); - for (const provider of providers) { - if (provider.nodeDef.name === nodeAtPos.comfyClass) { - targetGraphNode = nodeAtPos; - targetProvider = provider; - } - } - } - if (!targetGraphNode) { - const provider = modelToNodeStore.getNodeProvider(model.directory); - if (provider) { - targetGraphNode = litegraphService.addNodeOnGraph( - provider.nodeDef, - { - pos - } - ); - targetProvider = provider; - } - } - if (targetGraphNode) { - const widget = targetGraphNode.widgets.find( - (widget2) => widget2.name === targetProvider.key - ); - if (widget) { - widget.value = model.file_name; - } - } - } - } - }, "onDrop") - }); - const comfyAppReady = ref(false); - onMounted(async () => { - window["LiteGraph"] = LiteGraph; - window["LGraph"] = LGraph; - window["LLink"] = LLink; - window["LGraphNode"] = LGraphNode; - window["LGraphGroup"] = LGraphGroup; - window["DragAndScale"] = DragAndScale; - window["LGraphCanvas"] = LGraphCanvas; - window["ContextMenu"] = ContextMenu; - window["LGraphBadge"] = LGraphBadge; - app.vueAppReady = true; - workspaceStore.spinner = true; - ChangeTracker.init(app); - await settingStore.loadSettingValues(); - CORE_SETTINGS.forEach((setting) => { - settingStore.addSetting(setting); - }); - await app.setup(canvasRef.value); - canvasStore.canvas = app.canvas; - canvasStore.canvas.render_canvas_border = false; - workspaceStore.spinner = false; - window["app"] = app; - window["graph"] = app.graph; - comfyAppReady.value = true; - colorPaletteStore.customPalettes = settingStore.get( - "Comfy.CustomColorPalettes" - ); - const isRestorable = storedWorkflows?.length > 0 && storedActiveIndex >= 0; - if (isRestorable) - workflowStore.openWorkflowsInBackground({ - left: storedWorkflows.slice(0, storedActiveIndex), - right: storedWorkflows.slice(storedActiveIndex) - }); - watch(restoreState2, ({ paths, activeIndex }) => { - setStorageValue("Comfy.OpenWorkflowsPaths", JSON.stringify(paths)); - setStorageValue("Comfy.ActiveWorkflowIndex", JSON.stringify(activeIndex)); - }); - watch( - () => settingStore.get("Comfy.Locale"), - async () => { - await useCommandStore().execute("Comfy.RefreshNodeDefinitions"); - useWorkflowService().reloadCurrentWorkflow(); - } - ); - emit("ready"); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock(Fragment, null, [ - (openBlock(), createBlock(Teleport, { to: ".graph-canvas-container" }, [ - comfyAppReady.value && betaMenuEnabled.value && !unref(workspaceStore).focusMode ? (openBlock(), createBlock(LiteGraphCanvasSplitterOverlay, { key: 0 }, { - "side-bar-panel": withCtx(() => [ - createVNode(SideToolbar) - ]), - "bottom-panel": withCtx(() => [ - createVNode(_sfc_main$p) - ]), - "graph-canvas-panel": withCtx(() => [ - workflowTabsPosition.value === "Topbar (2nd-row)" ? (openBlock(), createBlock(SecondRowWorkflowTabs, { key: 0 })) : createCommentVNode("", true), - canvasMenuEnabled.value ? (openBlock(), createBlock(GraphCanvasMenu, { key: 1 })) : createCommentVNode("", true) - ]), - _: 1 - })) : createCommentVNode("", true), - createVNode(TitleEditor), - !betaMenuEnabled.value && canvasMenuEnabled.value ? (openBlock(), createBlock(GraphCanvasMenu, { key: 1 })) : createCommentVNode("", true), - createBaseVNode("canvas", { - ref_key: "canvasRef", - ref: canvasRef, - id: "graph-canvas", - tabindex: "1" - }, null, 512) - ])), - createVNode(_sfc_main$h), - tooltipEnabled.value ? (openBlock(), createBlock(NodeTooltip, { key: 0 })) : createCommentVNode("", true), - createVNode(_sfc_main$n) - ], 64); - }; - } -}); -function _typeof$3(o) { - "@babel/helpers - typeof"; - return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$3(o); -} -__name(_typeof$3, "_typeof$3"); -function _defineProperty$3(e, r, t) { - return (r = _toPropertyKey$3(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$3, "_defineProperty$3"); -function _toPropertyKey$3(t) { - var i = _toPrimitive$3(t, "string"); - return "symbol" == _typeof$3(i) ? i : i + ""; -} -__name(_toPropertyKey$3, "_toPropertyKey$3"); -function _toPrimitive$3(t, r) { - if ("object" != _typeof$3(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$3(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$3, "_toPrimitive$3"); -var theme$3 = /* @__PURE__ */ __name(function theme5(_ref) { - var dt = _ref.dt; - return "\n.p-toast {\n width: ".concat(dt("toast.width"), ";\n white-space: pre-line;\n word-break: break-word;\n}\n\n.p-toast-message {\n margin: 0 0 1rem 0;\n}\n\n.p-toast-message-icon {\n flex-shrink: 0;\n font-size: ").concat(dt("toast.icon.size"), ";\n width: ").concat(dt("toast.icon.size"), ";\n height: ").concat(dt("toast.icon.size"), ";\n}\n\n.p-toast-message-content {\n display: flex;\n align-items: flex-start;\n padding: ").concat(dt("toast.content.padding"), ";\n gap: ").concat(dt("toast.content.gap"), ";\n}\n\n.p-toast-message-text {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("toast.text.gap"), ";\n}\n\n.p-toast-summary {\n font-weight: ").concat(dt("toast.summary.font.weight"), ";\n font-size: ").concat(dt("toast.summary.font.size"), ";\n}\n\n.p-toast-detail {\n font-weight: ").concat(dt("toast.detail.font.weight"), ";\n font-size: ").concat(dt("toast.detail.font.size"), ";\n}\n\n.p-toast-close-button {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n cursor: pointer;\n background: transparent;\n transition: background ").concat(dt("toast.transition.duration"), ", color ").concat(dt("toast.transition.duration"), ", outline-color ").concat(dt("toast.transition.duration"), ", box-shadow ").concat(dt("toast.transition.duration"), ";\n outline-color: transparent;\n color: inherit;\n width: ").concat(dt("toast.close.button.width"), ";\n height: ").concat(dt("toast.close.button.height"), ";\n border-radius: ").concat(dt("toast.close.button.border.radius"), ";\n margin: -25% 0 0 0;\n right: -25%;\n padding: 0;\n border: none;\n user-select: none;\n}\n\n.p-toast-message-info,\n.p-toast-message-success,\n.p-toast-message-warn,\n.p-toast-message-error,\n.p-toast-message-secondary,\n.p-toast-message-contrast {\n border-width: ").concat(dt("toast.border.width"), ";\n border-style: solid;\n backdrop-filter: blur(").concat(dt("toast.blur"), ");\n border-radius: ").concat(dt("toast.border.radius"), ";\n}\n\n.p-toast-close-icon {\n font-size: ").concat(dt("toast.close.icon.size"), ";\n width: ").concat(dt("toast.close.icon.size"), ";\n height: ").concat(dt("toast.close.icon.size"), ";\n}\n\n.p-toast-close-button:focus-visible {\n outline-width: ").concat(dt("focus.ring.width"), ";\n outline-style: ").concat(dt("focus.ring.style"), ";\n outline-offset: ").concat(dt("focus.ring.offset"), ";\n}\n\n.p-toast-message-info {\n background: ").concat(dt("toast.info.background"), ";\n border-color: ").concat(dt("toast.info.border.color"), ";\n color: ").concat(dt("toast.info.color"), ";\n box-shadow: ").concat(dt("toast.info.shadow"), ";\n}\n\n.p-toast-message-info .p-toast-detail {\n color: ").concat(dt("toast.info.detail.color"), ";\n}\n\n.p-toast-message-info .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.info.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.info.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-info .p-toast-close-button:hover {\n background: ").concat(dt("toast.info.close.button.hover.background"), ";\n}\n\n.p-toast-message-success {\n background: ").concat(dt("toast.success.background"), ";\n border-color: ").concat(dt("toast.success.border.color"), ";\n color: ").concat(dt("toast.success.color"), ";\n box-shadow: ").concat(dt("toast.success.shadow"), ";\n}\n\n.p-toast-message-success .p-toast-detail {\n color: ").concat(dt("toast.success.detail.color"), ";\n}\n\n.p-toast-message-success .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.success.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.success.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-success .p-toast-close-button:hover {\n background: ").concat(dt("toast.success.close.button.hover.background"), ";\n}\n\n.p-toast-message-warn {\n background: ").concat(dt("toast.warn.background"), ";\n border-color: ").concat(dt("toast.warn.border.color"), ";\n color: ").concat(dt("toast.warn.color"), ";\n box-shadow: ").concat(dt("toast.warn.shadow"), ";\n}\n\n.p-toast-message-warn .p-toast-detail {\n color: ").concat(dt("toast.warn.detail.color"), ";\n}\n\n.p-toast-message-warn .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.warn.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.warn.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-warn .p-toast-close-button:hover {\n background: ").concat(dt("toast.warn.close.button.hover.background"), ";\n}\n\n.p-toast-message-error {\n background: ").concat(dt("toast.error.background"), ";\n border-color: ").concat(dt("toast.error.border.color"), ";\n color: ").concat(dt("toast.error.color"), ";\n box-shadow: ").concat(dt("toast.error.shadow"), ";\n}\n\n.p-toast-message-error .p-toast-detail {\n color: ").concat(dt("toast.error.detail.color"), ";\n}\n\n.p-toast-message-error .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.error.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.error.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-error .p-toast-close-button:hover {\n background: ").concat(dt("toast.error.close.button.hover.background"), ";\n}\n\n.p-toast-message-secondary {\n background: ").concat(dt("toast.secondary.background"), ";\n border-color: ").concat(dt("toast.secondary.border.color"), ";\n color: ").concat(dt("toast.secondary.color"), ";\n box-shadow: ").concat(dt("toast.secondary.shadow"), ";\n}\n\n.p-toast-message-secondary .p-toast-detail {\n color: ").concat(dt("toast.secondary.detail.color"), ";\n}\n\n.p-toast-message-secondary .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.secondary.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.secondary.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-secondary .p-toast-close-button:hover {\n background: ").concat(dt("toast.secondary.close.button.hover.background"), ";\n}\n\n.p-toast-message-contrast {\n background: ").concat(dt("toast.contrast.background"), ";\n border-color: ").concat(dt("toast.contrast.border.color"), ";\n color: ").concat(dt("toast.contrast.color"), ";\n box-shadow: ").concat(dt("toast.contrast.shadow"), ";\n}\n\n.p-toast-message-contrast .p-toast-detail {\n color: ").concat(dt("toast.contrast.detail.color"), ";\n}\n\n.p-toast-message-contrast .p-toast-close-button:focus-visible {\n outline-color: ").concat(dt("toast.contrast.close.button.focus.ring.color"), ";\n box-shadow: ").concat(dt("toast.contrast.close.button.focus.ring.shadow"), ";\n}\n\n.p-toast-message-contrast .p-toast-close-button:hover {\n background: ").concat(dt("toast.contrast.close.button.hover.background"), ";\n}\n\n.p-toast-top-center {\n transform: translateX(-50%);\n}\n\n.p-toast-bottom-center {\n transform: translateX(-50%);\n}\n\n.p-toast-center {\n min-width: 20vw;\n transform: translate(-50%, -50%);\n}\n\n.p-toast-message-enter-from {\n opacity: 0;\n transform: translateY(50%);\n}\n\n.p-toast-message-leave-from {\n max-height: 1000px;\n}\n\n.p-toast .p-toast-message.p-toast-message-leave-to {\n max-height: 0;\n opacity: 0;\n margin-bottom: 0;\n overflow: hidden;\n}\n\n.p-toast-message-enter-active {\n transition: transform 0.3s, opacity 0.3s;\n}\n\n.p-toast-message-leave-active {\n transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;\n}\n"); -}, "theme"); -var inlineStyles$2 = { - root: /* @__PURE__ */ __name(function root6(_ref2) { - var position = _ref2.position; - return { - position: "fixed", - top: position === "top-right" || position === "top-left" || position === "top-center" ? "20px" : position === "center" ? "50%" : null, - right: (position === "top-right" || position === "bottom-right") && "20px", - bottom: (position === "bottom-left" || position === "bottom-right" || position === "bottom-center") && "20px", - left: position === "top-left" || position === "bottom-left" ? "20px" : position === "center" || position === "top-center" || position === "bottom-center" ? "50%" : null - }; - }, "root") -}; -var classes$3 = { - root: /* @__PURE__ */ __name(function root7(_ref3) { - var props = _ref3.props; - return ["p-toast p-component p-toast-" + props.position]; - }, "root"), - message: /* @__PURE__ */ __name(function message(_ref4) { - var props = _ref4.props; - return ["p-toast-message", { - "p-toast-message-info": props.message.severity === "info" || props.message.severity === void 0, - "p-toast-message-warn": props.message.severity === "warn", - "p-toast-message-error": props.message.severity === "error", - "p-toast-message-success": props.message.severity === "success", - "p-toast-message-secondary": props.message.severity === "secondary", - "p-toast-message-contrast": props.message.severity === "contrast" - }]; - }, "message"), - messageContent: "p-toast-message-content", - messageIcon: /* @__PURE__ */ __name(function messageIcon(_ref5) { - var props = _ref5.props; - return ["p-toast-message-icon", _defineProperty$3(_defineProperty$3(_defineProperty$3(_defineProperty$3({}, props.infoIcon, props.message.severity === "info"), props.warnIcon, props.message.severity === "warn"), props.errorIcon, props.message.severity === "error"), props.successIcon, props.message.severity === "success")]; - }, "messageIcon"), - messageText: "p-toast-message-text", - summary: "p-toast-summary", - detail: "p-toast-detail", - closeButton: "p-toast-close-button", - closeIcon: "p-toast-close-icon" -}; -var ToastStyle = BaseStyle.extend({ - name: "toast", - theme: theme$3, - classes: classes$3, - inlineStyles: inlineStyles$2 -}); -var script$2$2 = { - name: "BaseToast", - "extends": script$e, - props: { - group: { - type: String, - "default": null - }, - position: { - type: String, - "default": "top-right" - }, - autoZIndex: { - type: Boolean, - "default": true - }, - baseZIndex: { - type: Number, - "default": 0 - }, - breakpoints: { - type: Object, - "default": null - }, - closeIcon: { - type: String, - "default": void 0 - }, - infoIcon: { - type: String, - "default": void 0 - }, - warnIcon: { - type: String, - "default": void 0 - }, - errorIcon: { - type: String, - "default": void 0 - }, - successIcon: { - type: String, - "default": void 0 - }, - closeButtonProps: { - type: null, - "default": null - } - }, - style: ToastStyle, - provide: /* @__PURE__ */ __name(function provide9() { - return { - $pcToast: this, - $parentInstance: this - }; - }, "provide") -}; -var script$1$3 = { - name: "ToastMessage", - hostName: "Toast", - "extends": script$e, - emits: ["close"], - closeTimeout: null, - props: { - message: { - type: null, - "default": null - }, - templates: { - type: Object, - "default": null - }, - closeIcon: { - type: String, - "default": null - }, - infoIcon: { - type: String, - "default": null - }, - warnIcon: { - type: String, - "default": null - }, - errorIcon: { - type: String, - "default": null - }, - successIcon: { - type: String, - "default": null - }, - closeButtonProps: { - type: null, - "default": null - } - }, - mounted: /* @__PURE__ */ __name(function mounted4() { - var _this = this; - if (this.message.life) { - this.closeTimeout = setTimeout(function() { - _this.close({ - message: _this.message, - type: "life-end" - }); - }, this.message.life); - } - }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount4() { - this.clearCloseTimeout(); - }, "beforeUnmount"), - methods: { - close: /* @__PURE__ */ __name(function close(params) { - this.$emit("close", params); - }, "close"), - onCloseClick: /* @__PURE__ */ __name(function onCloseClick() { - this.clearCloseTimeout(); - this.close({ - message: this.message, - type: "close" - }); - }, "onCloseClick"), - clearCloseTimeout: /* @__PURE__ */ __name(function clearCloseTimeout() { - if (this.closeTimeout) { - clearTimeout(this.closeTimeout); - this.closeTimeout = null; - } - }, "clearCloseTimeout") - }, - computed: { - iconComponent: /* @__PURE__ */ __name(function iconComponent() { - return { - info: !this.infoIcon && script$u, - success: !this.successIcon && script$v, - warn: !this.warnIcon && script$w, - error: !this.errorIcon && script$x - }[this.message.severity]; - }, "iconComponent"), - closeAriaLabel: /* @__PURE__ */ __name(function closeAriaLabel() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.close : void 0; - }, "closeAriaLabel") - }, - components: { - TimesIcon: script$y, - InfoCircleIcon: script$u, - CheckIcon: script$v, - ExclamationTriangleIcon: script$w, - TimesCircleIcon: script$x - }, - directives: { - ripple: Ripple - } -}; -function _typeof$1(o) { - "@babel/helpers - typeof"; - return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$1(o); -} -__name(_typeof$1, "_typeof$1"); -function ownKeys$1(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$1, "ownKeys$1"); -function _objectSpread$1(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$1(Object(t), true).forEach(function(r2) { - _defineProperty$1(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$1, "_objectSpread$1"); -function _defineProperty$1(e, r, t) { - return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$1, "_defineProperty$1"); -function _toPropertyKey$1(t) { - var i = _toPrimitive$1(t, "string"); - return "symbol" == _typeof$1(i) ? i : i + ""; -} -__name(_toPropertyKey$1, "_toPropertyKey$1"); -function _toPrimitive$1(t, r) { - if ("object" != _typeof$1(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$1(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$1, "_toPrimitive$1"); -var _hoisted_1$d = ["aria-label"]; -function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { - var _directive_ripple = resolveDirective("ripple"); - return openBlock(), createElementBlock("div", mergeProps({ - "class": [_ctx.cx("message"), $props.message.styleClass], - role: "alert", - "aria-live": "assertive", - "aria-atomic": "true" - }, _ctx.ptm("message")), [$props.templates.container ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.container), { - key: 0, - message: $props.message, - closeCallback: $options.onCloseClick - }, null, 8, ["message", "closeCallback"])) : (openBlock(), createElementBlock("div", mergeProps({ - key: 1, - "class": [_ctx.cx("messageContent"), $props.message.contentStyleClass] - }, _ctx.ptm("messageContent")), [!$props.templates.message ? (openBlock(), createElementBlock(Fragment, { - key: 0 - }, [(openBlock(), createBlock(resolveDynamicComponent($props.templates.messageicon ? $props.templates.messageicon : $props.templates.icon ? $props.templates.icon : $options.iconComponent && $options.iconComponent.name ? $options.iconComponent : "span"), mergeProps({ - "class": _ctx.cx("messageIcon") - }, _ctx.ptm("messageIcon")), null, 16, ["class"])), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("messageText") - }, _ctx.ptm("messageText")), [createBaseVNode("span", mergeProps({ - "class": _ctx.cx("summary") - }, _ctx.ptm("summary")), toDisplayString($props.message.summary), 17), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("detail") - }, _ctx.ptm("detail")), toDisplayString($props.message.detail), 17)], 16)], 64)) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.message), { - key: 1, - message: $props.message - }, null, 8, ["message"])), $props.message.closable !== false ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ - key: 2 - }, _ctx.ptm("buttonContainer"))), [withDirectives((openBlock(), createElementBlock("button", mergeProps({ - "class": _ctx.cx("closeButton"), - type: "button", - "aria-label": $options.closeAriaLabel, - onClick: _cache[0] || (_cache[0] = function() { - return $options.onCloseClick && $options.onCloseClick.apply($options, arguments); - }), - autofocus: "" - }, _objectSpread$1(_objectSpread$1({}, $props.closeButtonProps), _ctx.ptm("closeButton"))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates.closeicon || "TimesIcon"), mergeProps({ - "class": [_ctx.cx("closeIcon"), $props.closeIcon] - }, _ctx.ptm("closeIcon")), null, 16, ["class"]))], 16, _hoisted_1$d)), [[_directive_ripple]])], 16)) : createCommentVNode("", true)], 16))], 16); -} -__name(render$1$2, "render$1$2"); -script$1$3.render = render$1$2; -function _toConsumableArray(r) { - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); -} -__name(_toConsumableArray, "_toConsumableArray"); -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -__name(_nonIterableSpread, "_nonIterableSpread"); -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; - } -} -__name(_unsupportedIterableToArray, "_unsupportedIterableToArray"); -function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -__name(_iterableToArray, "_iterableToArray"); -function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return _arrayLikeToArray(r); -} -__name(_arrayWithoutHoles, "_arrayWithoutHoles"); -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -__name(_arrayLikeToArray, "_arrayLikeToArray"); -var messageIdx = 0; -var script$5 = { - name: "Toast", - "extends": script$2$2, - inheritAttrs: false, - emits: ["close", "life-end"], - data: /* @__PURE__ */ __name(function data5() { - return { - messages: [] - }; - }, "data"), - styleElement: null, - mounted: /* @__PURE__ */ __name(function mounted5() { - ToastEventBus.on("add", this.onAdd); - ToastEventBus.on("remove", this.onRemove); - ToastEventBus.on("remove-group", this.onRemoveGroup); - ToastEventBus.on("remove-all-groups", this.onRemoveAllGroups); - if (this.breakpoints) { - this.createStyle(); - } - }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount5() { - this.destroyStyle(); - if (this.$refs.container && this.autoZIndex) { - ZIndex.clear(this.$refs.container); - } - ToastEventBus.off("add", this.onAdd); - ToastEventBus.off("remove", this.onRemove); - ToastEventBus.off("remove-group", this.onRemoveGroup); - ToastEventBus.off("remove-all-groups", this.onRemoveAllGroups); - }, "beforeUnmount"), - methods: { - add: /* @__PURE__ */ __name(function add(message2) { - if (message2.id == null) { - message2.id = messageIdx++; - } - this.messages = [].concat(_toConsumableArray(this.messages), [message2]); - }, "add"), - remove: /* @__PURE__ */ __name(function remove(params) { - var index = this.messages.findIndex(function(m) { - return m.id === params.message.id; - }); - if (index !== -1) { - this.messages.splice(index, 1); - this.$emit(params.type, { - message: params.message - }); - } - }, "remove"), - onAdd: /* @__PURE__ */ __name(function onAdd(message2) { - if (this.group == message2.group) { - this.add(message2); - } - }, "onAdd"), - onRemove: /* @__PURE__ */ __name(function onRemove(message2) { - this.remove({ - message: message2, - type: "close" - }); - }, "onRemove"), - onRemoveGroup: /* @__PURE__ */ __name(function onRemoveGroup(group) { - if (this.group === group) { - this.messages = []; - } - }, "onRemoveGroup"), - onRemoveAllGroups: /* @__PURE__ */ __name(function onRemoveAllGroups() { - this.messages = []; - }, "onRemoveAllGroups"), - onEnter: /* @__PURE__ */ __name(function onEnter() { - this.$refs.container.setAttribute(this.attributeSelector, ""); - if (this.autoZIndex) { - ZIndex.set("modal", this.$refs.container, this.baseZIndex || this.$primevue.config.zIndex.modal); - } - }, "onEnter"), - onLeave: /* @__PURE__ */ __name(function onLeave() { - var _this = this; - if (this.$refs.container && this.autoZIndex && isEmpty(this.messages)) { - setTimeout(function() { - ZIndex.clear(_this.$refs.container); - }, 200); - } - }, "onLeave"), - createStyle: /* @__PURE__ */ __name(function createStyle() { - if (!this.styleElement && !this.isUnstyled) { - var _this$$primevue; - this.styleElement = document.createElement("style"); - this.styleElement.type = "text/css"; - setAttribute(this.styleElement, "nonce", (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce); - document.head.appendChild(this.styleElement); - var innerHTML = ""; - for (var breakpoint in this.breakpoints) { - var breakpointStyle = ""; - for (var styleProp in this.breakpoints[breakpoint]) { - breakpointStyle += styleProp + ":" + this.breakpoints[breakpoint][styleProp] + "!important;"; - } - innerHTML += "\n @media screen and (max-width: ".concat(breakpoint, ") {\n .p-toast[").concat(this.attributeSelector, "] {\n ").concat(breakpointStyle, "\n }\n }\n "); - } - this.styleElement.innerHTML = innerHTML; - } - }, "createStyle"), - destroyStyle: /* @__PURE__ */ __name(function destroyStyle() { - if (this.styleElement) { - document.head.removeChild(this.styleElement); - this.styleElement = null; - } - }, "destroyStyle") - }, - computed: { - attributeSelector: /* @__PURE__ */ __name(function attributeSelector() { - return UniqueComponentId(); - }, "attributeSelector") - }, - components: { - ToastMessage: script$1$3, - Portal: script$k - } -}; -function _typeof$2(o) { - "@babel/helpers - typeof"; - return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$2(o); -} -__name(_typeof$2, "_typeof$2"); -function ownKeys$2(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$2, "ownKeys$2"); -function _objectSpread$2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$2(Object(t), true).forEach(function(r2) { - _defineProperty$2(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$2, "_objectSpread$2"); -function _defineProperty$2(e, r, t) { - return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$2, "_defineProperty$2"); -function _toPropertyKey$2(t) { - var i = _toPrimitive$2(t, "string"); - return "symbol" == _typeof$2(i) ? i : i + ""; -} -__name(_toPropertyKey$2, "_toPropertyKey$2"); -function _toPrimitive$2(t, r) { - if ("object" != _typeof$2(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$2(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$2, "_toPrimitive$2"); -function render$a(_ctx, _cache, $props, $setup, $data, $options) { - var _component_ToastMessage = resolveComponent("ToastMessage"); - var _component_Portal = resolveComponent("Portal"); - return openBlock(), createBlock(_component_Portal, null, { - "default": withCtx(function() { - return [createBaseVNode("div", mergeProps({ - ref: "container", - "class": _ctx.cx("root"), - style: _ctx.sx("root", true, { - position: _ctx.position - }) - }, _ctx.ptmi("root")), [createVNode(TransitionGroup, mergeProps({ - name: "p-toast-message", - tag: "div", - onEnter: $options.onEnter, - onLeave: $options.onLeave - }, _objectSpread$2({}, _ctx.ptm("transition"))), { - "default": withCtx(function() { - return [(openBlock(true), createElementBlock(Fragment, null, renderList($data.messages, function(msg) { - return openBlock(), createBlock(_component_ToastMessage, { - key: msg.id, - message: msg, - templates: _ctx.$slots, - closeIcon: _ctx.closeIcon, - infoIcon: _ctx.infoIcon, - warnIcon: _ctx.warnIcon, - errorIcon: _ctx.errorIcon, - successIcon: _ctx.successIcon, - closeButtonProps: _ctx.closeButtonProps, - unstyled: _ctx.unstyled, - onClose: _cache[0] || (_cache[0] = function($event) { - return $options.remove($event); - }), - pt: _ctx.pt - }, null, 8, ["message", "templates", "closeIcon", "infoIcon", "warnIcon", "errorIcon", "successIcon", "closeButtonProps", "unstyled", "pt"]); - }), 128))]; - }), - _: 1 - }, 16, ["onEnter", "onLeave"])], 16)]; - }), - _: 1 - }); -} -__name(render$a, "render$a"); -script$5.render = render$a; -const _sfc_main$7 = /* @__PURE__ */ defineComponent({ - __name: "GlobalToast", - setup(__props) { - const toast = useToast(); - const toastStore = useToastStore(); - const settingStore = useSettingStore(); - watch( - () => toastStore.messagesToAdd, - (newMessages) => { - if (newMessages.length === 0) { - return; - } - newMessages.forEach((message2) => { - toast.add(message2); - }); - toastStore.messagesToAdd = []; - }, - { deep: true } - ); - watch( - () => toastStore.messagesToRemove, - (messagesToRemove) => { - if (messagesToRemove.length === 0) { - return; - } - messagesToRemove.forEach((message2) => { - toast.remove(message2); - }); - toastStore.messagesToRemove = []; - }, - { deep: true } - ); - watch( - () => toastStore.removeAllRequested, - (requested) => { - if (requested) { - toast.removeAllGroups(); - toastStore.removeAllRequested = false; - } - } - ); - function updateToastPosition() { - const styleElement = document.getElementById("dynamic-toast-style") || createStyleElement(); - const rect = document.querySelector(".graph-canvas-container").getBoundingClientRect(); - styleElement.textContent = ` - .p-toast.p-component.p-toast-top-right { - top: ${rect.top + 20}px !important; - right: ${window.innerWidth - (rect.left + rect.width) + 20}px !important; - } - `; - } - __name(updateToastPosition, "updateToastPosition"); - function createStyleElement() { - const style = document.createElement("style"); - style.id = "dynamic-toast-style"; - document.head.appendChild(style); - return style; - } - __name(createStyleElement, "createStyleElement"); - watch( - () => settingStore.get("Comfy.UseNewMenu"), - () => nextTick(updateToastPosition), - { immediate: true } - ); - watch( - () => settingStore.get("Comfy.Sidebar.Location"), - () => nextTick(updateToastPosition), - { immediate: true } - ); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$5)); - }; - } -}); -const _hoisted_1$c = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$9 = /* @__PURE__ */ createBaseVNode("path", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2", - d: "M6 4v16m4-16l10 8l-10 8z" -}, null, -1); -const _hoisted_3$9 = [ - _hoisted_2$9 -]; -function render$9(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$c, [..._hoisted_3$9]); -} -__name(render$9, "render$9"); -const __unplugin_components_3 = markRaw({ name: "lucide-step-forward", render: render$9 }); -const _hoisted_1$b = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$8 = /* @__PURE__ */ createBaseVNode("path", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2", - d: "m13 19l9-7l-9-7zM2 19l9-7l-9-7z" -}, null, -1); -const _hoisted_3$8 = [ - _hoisted_2$8 -]; -function render$8(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$b, [..._hoisted_3$8]); -} -__name(render$8, "render$8"); -const __unplugin_components_2 = markRaw({ name: "lucide-fast-forward", render: render$8 }); -const _hoisted_1$a = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$7 = /* @__PURE__ */ createBaseVNode("path", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2", - d: "m6 3l14 9l-14 9z" -}, null, -1); -const _hoisted_3$7 = [ - _hoisted_2$7 -]; -function render$7(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$a, [..._hoisted_3$7]); -} -__name(render$7, "render$7"); -const __unplugin_components_1$1 = markRaw({ name: "lucide-play", render: render$7 }); -const _hoisted_1$9 = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$6 = /* @__PURE__ */ createBaseVNode("g", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2" -}, [ - /* @__PURE__ */ createBaseVNode("path", { d: "M16 12H3m13 6H3m7-12H3m18 12V8a2 2 0 0 0-2-2h-5" }), - /* @__PURE__ */ createBaseVNode("path", { d: "m16 8l-2-2l2-2" }) -], -1); -const _hoisted_3$6 = [ - _hoisted_2$6 -]; -function render$6(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$9, [..._hoisted_3$6]); -} -__name(render$6, "render$6"); -const __unplugin_components_0$1 = markRaw({ name: "lucide-list-start", render: render$6 }); -var theme$2 = /* @__PURE__ */ __name(function theme6(_ref) { - var dt = _ref.dt; - return "\n.p-tieredmenu {\n background: ".concat(dt("tieredmenu.background"), ";\n color: ").concat(dt("tieredmenu.color"), ";\n border: 1px solid ").concat(dt("tieredmenu.border.color"), ";\n border-radius: ").concat(dt("tieredmenu.border.radius"), ";\n min-width: 12.5rem;\n}\n\n.p-tieredmenu-root-list,\n.p-tieredmenu-submenu {\n margin: 0;\n padding: ").concat(dt("tieredmenu.list.padding"), ";\n list-style: none;\n outline: 0 none;\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("tieredmenu.list.gap"), ";\n}\n\n.p-tieredmenu-submenu {\n position: absolute;\n min-width: 100%;\n z-index: 1;\n background: ").concat(dt("tieredmenu.background"), ";\n color: ").concat(dt("tieredmenu.color"), ";\n border: 1px solid ").concat(dt("tieredmenu.border.color"), ";\n border-radius: ").concat(dt("tieredmenu.border.radius"), ";\n box-shadow: ").concat(dt("tieredmenu.shadow"), ";\n}\n\n.p-tieredmenu-item {\n position: relative;\n}\n\n.p-tieredmenu-item-content {\n transition: background ").concat(dt("tieredmenu.transition.duration"), ", color ").concat(dt("tieredmenu.transition.duration"), ";\n border-radius: ").concat(dt("tieredmenu.item.border.radius"), ";\n color: ").concat(dt("tieredmenu.item.color"), ";\n}\n\n.p-tieredmenu-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("tieredmenu.item.padding"), ";\n gap: ").concat(dt("tieredmenu.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-tieredmenu-item-label {\n line-height: 1;\n}\n\n.p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.color"), ";\n}\n\n.p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.color"), ";\n margin-left: auto;\n font-size: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n width: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n height: ").concat(dt("tieredmenu.submenu.icon.size"), ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content {\n color: ").concat(dt("tieredmenu.item.focus.color"), ";\n background: ").concat(dt("tieredmenu.item.focus.background"), ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover {\n color: ").concat(dt("tieredmenu.item.focus.color"), ";\n background: ").concat(dt("tieredmenu.item.focus.background"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.focus.color"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content {\n color: ").concat(dt("tieredmenu.item.active.color"), ";\n background: ").concat(dt("tieredmenu.item.active.background"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon {\n color: ").concat(dt("tieredmenu.item.icon.active.color"), ";\n}\n\n.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {\n color: ").concat(dt("tieredmenu.submenu.icon.active.color"), ";\n}\n\n.p-tieredmenu-separator {\n border-top: 1px solid ").concat(dt("tieredmenu.separator.border.color"), ";\n}\n\n.p-tieredmenu-overlay {\n box-shadow: ").concat(dt("tieredmenu.shadow"), ";\n}\n\n.p-tieredmenu-enter-from,\n.p-tieredmenu-leave-active {\n opacity: 0;\n}\n\n.p-tieredmenu-enter-active {\n transition: opacity 250ms;\n}\n"); -}, "theme"); -var inlineStyles$1 = { - submenu: /* @__PURE__ */ __name(function submenu(_ref2) { - var instance = _ref2.instance, processedItem = _ref2.processedItem; - return { - display: instance.isItemActive(processedItem) ? "flex" : "none" - }; - }, "submenu") -}; -var classes$2 = { - root: /* @__PURE__ */ __name(function root8(_ref3) { - _ref3.instance; - var props = _ref3.props; - return ["p-tieredmenu p-component", { - "p-tieredmenu-overlay": props.popup - }]; - }, "root"), - start: "p-tieredmenu-start", - rootList: "p-tieredmenu-root-list", - item: /* @__PURE__ */ __name(function item(_ref4) { - var instance = _ref4.instance, processedItem = _ref4.processedItem; - return ["p-tieredmenu-item", { - "p-tieredmenu-item-active": instance.isItemActive(processedItem), - "p-focus": instance.isItemFocused(processedItem), - "p-disabled": instance.isItemDisabled(processedItem) - }]; - }, "item"), - itemContent: "p-tieredmenu-item-content", - itemLink: "p-tieredmenu-item-link", - itemIcon: "p-tieredmenu-item-icon", - itemLabel: "p-tieredmenu-item-label", - submenuIcon: "p-tieredmenu-submenu-icon", - submenu: "p-tieredmenu-submenu", - separator: "p-tieredmenu-separator", - end: "p-tieredmenu-end" -}; -var TieredMenuStyle = BaseStyle.extend({ - name: "tieredmenu", - theme: theme$2, - classes: classes$2, - inlineStyles: inlineStyles$1 -}); -var script$2$1 = { - name: "BaseTieredMenu", - "extends": script$e, - props: { - popup: { - type: Boolean, - "default": false - }, - model: { - type: Array, - "default": null - }, - appendTo: { - type: [String, Object], - "default": "body" - }, - autoZIndex: { - type: Boolean, - "default": true - }, - baseZIndex: { - type: Number, - "default": 0 - }, - disabled: { - type: Boolean, - "default": false - }, - tabindex: { - type: Number, - "default": 0 - }, - ariaLabelledby: { - type: String, - "default": null - }, - ariaLabel: { - type: String, - "default": null - } - }, - style: TieredMenuStyle, - provide: /* @__PURE__ */ __name(function provide10() { - return { - $pcTieredMenu: this, - $parentInstance: this - }; - }, "provide") -}; -var script$1$2 = { - name: "TieredMenuSub", - hostName: "TieredMenu", - "extends": script$e, - emits: ["item-click", "item-mouseenter", "item-mousemove"], - container: null, - props: { - menuId: { - type: String, - "default": null - }, - focusedItemId: { - type: String, - "default": null - }, - items: { - type: Array, - "default": null - }, - visible: { - type: Boolean, - "default": false - }, - level: { - type: Number, - "default": 0 - }, - templates: { - type: Object, - "default": null - }, - activeItemPath: { - type: Object, - "default": null - }, - tabindex: { - type: Number, - "default": 0 - } - }, - methods: { - getItemId: /* @__PURE__ */ __name(function getItemId(processedItem) { - return "".concat(this.menuId, "_").concat(processedItem.key); - }, "getItemId"), - getItemKey: /* @__PURE__ */ __name(function getItemKey(processedItem) { - return this.getItemId(processedItem); - }, "getItemKey"), - getItemProp: /* @__PURE__ */ __name(function getItemProp(processedItem, name, params) { - return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : void 0; - }, "getItemProp"), - getItemLabel: /* @__PURE__ */ __name(function getItemLabel(processedItem) { - return this.getItemProp(processedItem, "label"); - }, "getItemLabel"), - getItemLabelId: /* @__PURE__ */ __name(function getItemLabelId(processedItem) { - return "".concat(this.menuId, "_").concat(processedItem.key, "_label"); - }, "getItemLabelId"), - getPTOptions: /* @__PURE__ */ __name(function getPTOptions4(processedItem, index, key) { - return this.ptm(key, { - context: { - item: processedItem.item, - index, - active: this.isItemActive(processedItem), - focused: this.isItemFocused(processedItem), - disabled: this.isItemDisabled(processedItem) - } - }); - }, "getPTOptions"), - isItemActive: /* @__PURE__ */ __name(function isItemActive(processedItem) { - return this.activeItemPath.some(function(path) { - return path.key === processedItem.key; - }); - }, "isItemActive"), - isItemVisible: /* @__PURE__ */ __name(function isItemVisible(processedItem) { - return this.getItemProp(processedItem, "visible") !== false; - }, "isItemVisible"), - isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled(processedItem) { - return this.getItemProp(processedItem, "disabled"); - }, "isItemDisabled"), - isItemFocused: /* @__PURE__ */ __name(function isItemFocused(processedItem) { - return this.focusedItemId === this.getItemId(processedItem); - }, "isItemFocused"), - isItemGroup: /* @__PURE__ */ __name(function isItemGroup(processedItem) { - return isNotEmpty(processedItem.items); - }, "isItemGroup"), - onEnter: /* @__PURE__ */ __name(function onEnter2() { - nestedPosition(this.container, this.level); - }, "onEnter"), - onItemClick: /* @__PURE__ */ __name(function onItemClick(event, processedItem) { - this.getItemProp(processedItem, "command", { - originalEvent: event, - item: processedItem.item - }); - this.$emit("item-click", { - originalEvent: event, - processedItem, - isFocus: true - }); - }, "onItemClick"), - onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter(event, processedItem) { - this.$emit("item-mouseenter", { - originalEvent: event, - processedItem - }); - }, "onItemMouseEnter"), - onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove(event, processedItem) { - this.$emit("item-mousemove", { - originalEvent: event, - processedItem - }); - }, "onItemMouseMove"), - getAriaSetSize: /* @__PURE__ */ __name(function getAriaSetSize() { - var _this = this; - return this.items.filter(function(processedItem) { - return _this.isItemVisible(processedItem) && !_this.getItemProp(processedItem, "separator"); - }).length; - }, "getAriaSetSize"), - getAriaPosInset: /* @__PURE__ */ __name(function getAriaPosInset2(index) { - var _this2 = this; - return index - this.items.slice(0, index).filter(function(processedItem) { - return _this2.isItemVisible(processedItem) && _this2.getItemProp(processedItem, "separator"); - }).length + 1; - }, "getAriaPosInset"), - getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps(processedItem, index) { - return { - action: mergeProps({ - "class": this.cx("itemLink"), - tabindex: -1, - "aria-hidden": true - }, this.getPTOptions(processedItem, index, "itemLink")), - icon: mergeProps({ - "class": [this.cx("itemIcon"), this.getItemProp(processedItem, "icon")] - }, this.getPTOptions(processedItem, index, "itemIcon")), - label: mergeProps({ - "class": this.cx("itemLabel") - }, this.getPTOptions(processedItem, index, "itemLabel")), - submenuicon: mergeProps({ - "class": this.cx("submenuIcon") - }, this.getPTOptions(processedItem, index, "submenuIcon")) - }; - }, "getMenuItemProps"), - containerRef: /* @__PURE__ */ __name(function containerRef(el) { - this.container = el; - }, "containerRef") - }, - components: { - AngleRightIcon: script$z - }, - directives: { - ripple: Ripple - } -}; -var _hoisted_1$1$2 = ["tabindex"]; -var _hoisted_2$5 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset", "data-p-active", "data-p-focused", "data-p-disabled"]; -var _hoisted_3$5 = ["onClick", "onMouseenter", "onMousemove"]; -var _hoisted_4$2 = ["href", "target"]; -var _hoisted_5$1 = ["id"]; -var _hoisted_6 = ["id"]; -function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { - var _component_AngleRightIcon = resolveComponent("AngleRightIcon"); - var _component_TieredMenuSub = resolveComponent("TieredMenuSub", true); - var _directive_ripple = resolveDirective("ripple"); - return openBlock(), createBlock(Transition, mergeProps({ - name: "p-tieredmenu", - onEnter: $options.onEnter - }, _ctx.ptm("menu.transition")), { - "default": withCtx(function() { - return [($props.level === 0 ? true : $props.visible) ? (openBlock(), createElementBlock("ul", mergeProps({ - key: 0, - ref: $options.containerRef, - "class": $props.level === 0 ? _ctx.cx("rootList") : _ctx.cx("submenu"), - tabindex: $props.tabindex - }, $props.level === 0 ? _ctx.ptm("rootList") : _ctx.ptm("submenu")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function(processedItem, index) { - return openBlock(), createElementBlock(Fragment, { - key: $options.getItemKey(processedItem) - }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ - key: 0, - id: $options.getItemId(processedItem), - style: $options.getItemProp(processedItem, "style"), - "class": [_ctx.cx("item", { - processedItem - }), $options.getItemProp(processedItem, "class")], - role: "menuitem", - "aria-label": $options.getItemLabel(processedItem), - "aria-disabled": $options.isItemDisabled(processedItem) || void 0, - "aria-expanded": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : void 0, - "aria-haspopup": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, "to") ? "menu" : void 0, - "aria-level": $props.level + 1, - "aria-setsize": $options.getAriaSetSize(), - "aria-posinset": $options.getAriaPosInset(index), - ref_for: true - }, $options.getPTOptions(processedItem, index, "item"), { - "data-p-active": $options.isItemActive(processedItem), - "data-p-focused": $options.isItemFocused(processedItem), - "data-p-disabled": $options.isItemDisabled(processedItem) - }), [createBaseVNode("div", mergeProps({ - "class": _ctx.cx("itemContent"), - onClick: /* @__PURE__ */ __name(function onClick2($event) { - return $options.onItemClick($event, processedItem); - }, "onClick"), - onMouseenter: /* @__PURE__ */ __name(function onMouseenter($event) { - return $options.onItemMouseEnter($event, processedItem); - }, "onMouseenter"), - onMousemove: /* @__PURE__ */ __name(function onMousemove($event) { - return $options.onItemMouseMove($event, processedItem); - }, "onMousemove"), - ref_for: true - }, $options.getPTOptions(processedItem, index, "itemContent")), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock("a", mergeProps({ - key: 0, - href: $options.getItemProp(processedItem, "url"), - "class": _ctx.cx("itemLink"), - target: $options.getItemProp(processedItem, "target"), - tabindex: "-1", - ref_for: true - }, $options.getPTOptions(processedItem, index, "itemLink")), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), { - key: 0, - item: processedItem.item, - "class": normalizeClass(_ctx.cx("itemIcon")) - }, null, 8, ["item", "class"])) : $options.getItemProp(processedItem, "icon") ? (openBlock(), createElementBlock("span", mergeProps({ - key: 1, - "class": [_ctx.cx("itemIcon"), $options.getItemProp(processedItem, "icon")], - ref_for: true - }, $options.getPTOptions(processedItem, index, "itemIcon")), null, 16)) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ - id: $options.getItemLabelId(processedItem), - "class": _ctx.cx("itemLabel"), - ref_for: true - }, $options.getPTOptions(processedItem, index, "itemLabel")), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_5$1), $options.getItemProp(processedItem, "items") ? (openBlock(), createElementBlock(Fragment, { - key: 2 - }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), mergeProps({ - key: 0, - "class": _ctx.cx("submenuIcon"), - active: $options.isItemActive(processedItem), - ref_for: true - }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class", "active"])) : (openBlock(), createBlock(_component_AngleRightIcon, mergeProps({ - key: 1, - "class": _ctx.cx("submenuIcon"), - ref_for: true - }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_4$2)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { - key: 1, - item: processedItem.item, - hasSubmenu: $options.getItemProp(processedItem, "items"), - label: $options.getItemLabel(processedItem), - props: $options.getMenuItemProps(processedItem, index) - }, null, 8, ["item", "hasSubmenu", "label", "props"]))], 16, _hoisted_3$5), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_TieredMenuSub, { - key: 0, - id: $options.getItemId(processedItem) + "_list", - style: normalizeStyle(_ctx.sx("submenu", true, { - processedItem - })), - "aria-labelledby": $options.getItemLabelId(processedItem), - role: "menu", - menuId: $props.menuId, - focusedItemId: $props.focusedItemId, - items: processedItem.items, - templates: $props.templates, - activeItemPath: $props.activeItemPath, - level: $props.level + 1, - visible: $options.isItemActive(processedItem) && $options.isItemGroup(processedItem), - pt: _ctx.pt, - unstyled: _ctx.unstyled, - onItemClick: _cache[0] || (_cache[0] = function($event) { - return _ctx.$emit("item-click", $event); - }), - onItemMouseenter: _cache[1] || (_cache[1] = function($event) { - return _ctx.$emit("item-mouseenter", $event); - }), - onItemMousemove: _cache[2] || (_cache[2] = function($event) { - return _ctx.$emit("item-mousemove", $event); - }) - }, null, 8, ["id", "style", "aria-labelledby", "menuId", "focusedItemId", "items", "templates", "activeItemPath", "level", "visible", "pt", "unstyled"])) : createCommentVNode("", true)], 16, _hoisted_2$5)) : createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ - key: 1, - id: $options.getItemId(processedItem), - style: $options.getItemProp(processedItem, "style"), - "class": [_ctx.cx("separator"), $options.getItemProp(processedItem, "class")], - role: "separator", - ref_for: true - }, _ctx.ptm("separator")), null, 16, _hoisted_6)) : createCommentVNode("", true)], 64); - }), 128))], 16, _hoisted_1$1$2)) : createCommentVNode("", true)]; - }), - _: 1 - }, 16, ["onEnter"]); -} -__name(render$1$1, "render$1$1"); -script$1$2.render = render$1$1; -var script$4 = { - name: "TieredMenu", - "extends": script$2$1, - inheritAttrs: false, - emits: ["focus", "blur", "before-show", "before-hide", "hide", "show"], - outsideClickListener: null, - scrollHandler: null, - resizeListener: null, - target: null, - container: null, - menubar: null, - searchTimeout: null, - searchValue: null, - data: /* @__PURE__ */ __name(function data6() { - return { - id: this.$attrs.id, - focused: false, - focusedItemInfo: { - index: -1, - level: 0, - parentKey: "" - }, - activeItemPath: [], - visible: !this.popup, - submenuVisible: false, - dirty: false - }; - }, "data"), - watch: { - "$attrs.id": /* @__PURE__ */ __name(function $attrsId2(newValue) { - this.id = newValue || UniqueComponentId(); - }, "$attrsId"), - activeItemPath: /* @__PURE__ */ __name(function activeItemPath(newPath) { - if (!this.popup) { - if (isNotEmpty(newPath)) { - this.bindOutsideClickListener(); - this.bindResizeListener(); - } else { - this.unbindOutsideClickListener(); - this.unbindResizeListener(); - } - } - }, "activeItemPath") - }, - mounted: /* @__PURE__ */ __name(function mounted6() { - this.id = this.id || UniqueComponentId(); - }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount6() { - this.unbindOutsideClickListener(); - this.unbindResizeListener(); - if (this.scrollHandler) { - this.scrollHandler.destroy(); - this.scrollHandler = null; - } - if (this.container && this.autoZIndex) { - ZIndex.clear(this.container); - } - this.target = null; - this.container = null; - }, "beforeUnmount"), - methods: { - getItemProp: /* @__PURE__ */ __name(function getItemProp2(item3, name) { - return item3 ? resolve(item3[name]) : void 0; - }, "getItemProp"), - getItemLabel: /* @__PURE__ */ __name(function getItemLabel2(item3) { - return this.getItemProp(item3, "label"); - }, "getItemLabel"), - isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled2(item3) { - return this.getItemProp(item3, "disabled"); - }, "isItemDisabled"), - isItemVisible: /* @__PURE__ */ __name(function isItemVisible2(item3) { - return this.getItemProp(item3, "visible") !== false; - }, "isItemVisible"), - isItemGroup: /* @__PURE__ */ __name(function isItemGroup2(item3) { - return isNotEmpty(this.getItemProp(item3, "items")); - }, "isItemGroup"), - isItemSeparator: /* @__PURE__ */ __name(function isItemSeparator(item3) { - return this.getItemProp(item3, "separator"); - }, "isItemSeparator"), - getProccessedItemLabel: /* @__PURE__ */ __name(function getProccessedItemLabel(processedItem) { - return processedItem ? this.getItemLabel(processedItem.item) : void 0; - }, "getProccessedItemLabel"), - isProccessedItemGroup: /* @__PURE__ */ __name(function isProccessedItemGroup(processedItem) { - return processedItem && isNotEmpty(processedItem.items); - }, "isProccessedItemGroup"), - toggle: /* @__PURE__ */ __name(function toggle(event) { - this.visible ? this.hide(event, true) : this.show(event); - }, "toggle"), - show: /* @__PURE__ */ __name(function show2(event, isFocus) { - if (this.popup) { - this.$emit("before-show"); - this.visible = true; - this.target = this.target || event.currentTarget; - this.relatedTarget = event.relatedTarget || null; - } - isFocus && focus(this.menubar); - }, "show"), - hide: /* @__PURE__ */ __name(function hide2(event, isFocus) { - if (this.popup) { - this.$emit("before-hide"); - this.visible = false; - } - this.activeItemPath = []; - this.focusedItemInfo = { - index: -1, - level: 0, - parentKey: "" - }; - isFocus && focus(this.relatedTarget || this.target || this.menubar); - this.dirty = false; - }, "hide"), - onFocus: /* @__PURE__ */ __name(function onFocus3(event) { - this.focused = true; - if (!this.popup) { - this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : { - index: this.findFirstFocusedItemIndex(), - level: 0, - parentKey: "" - }; - } - this.$emit("focus", event); - }, "onFocus"), - onBlur: /* @__PURE__ */ __name(function onBlur2(event) { - this.focused = false; - this.focusedItemInfo = { - index: -1, - level: 0, - parentKey: "" - }; - this.searchValue = ""; - this.dirty = false; - this.$emit("blur", event); - }, "onBlur"), - onKeyDown: /* @__PURE__ */ __name(function onKeyDown2(event) { - if (this.disabled) { - event.preventDefault(); - return; - } - var metaKey = event.metaKey || event.ctrlKey; - switch (event.code) { - case "ArrowDown": - this.onArrowDownKey(event); - break; - case "ArrowUp": - this.onArrowUpKey(event); - break; - case "ArrowLeft": - this.onArrowLeftKey(event); - break; - case "ArrowRight": - this.onArrowRightKey(event); - break; - case "Home": - this.onHomeKey(event); - break; - case "End": - this.onEndKey(event); - break; - case "Space": - this.onSpaceKey(event); - break; - case "Enter": - case "NumpadEnter": - this.onEnterKey(event); - break; - case "Escape": - this.onEscapeKey(event); - break; - case "Tab": - this.onTabKey(event); - break; - case "PageDown": - case "PageUp": - case "Backspace": - case "ShiftLeft": - case "ShiftRight": - break; - default: - if (!metaKey && isPrintableCharacter(event.key)) { - this.searchItems(event, event.key); - } - break; - } - }, "onKeyDown"), - onItemChange: /* @__PURE__ */ __name(function onItemChange(event) { - var processedItem = event.processedItem, isFocus = event.isFocus; - if (isEmpty(processedItem)) return; - var index = processedItem.index, key = processedItem.key, level = processedItem.level, parentKey = processedItem.parentKey, items = processedItem.items; - var grouped = isNotEmpty(items); - var activeItemPath3 = this.activeItemPath.filter(function(p) { - return p.parentKey !== parentKey && p.parentKey !== key; - }); - if (grouped) { - activeItemPath3.push(processedItem); - this.submenuVisible = true; - } - this.focusedItemInfo = { - index, - level, - parentKey - }; - this.activeItemPath = activeItemPath3; - grouped && (this.dirty = true); - isFocus && focus(this.menubar); - }, "onItemChange"), - onOverlayClick: /* @__PURE__ */ __name(function onOverlayClick2(event) { - OverlayEventBus.emit("overlay-click", { - originalEvent: event, - target: this.target - }); - }, "onOverlayClick"), - onItemClick: /* @__PURE__ */ __name(function onItemClick2(event) { - var originalEvent = event.originalEvent, processedItem = event.processedItem; - var grouped = this.isProccessedItemGroup(processedItem); - var root11 = isEmpty(processedItem.parent); - var selected = this.isSelected(processedItem); - if (selected) { - var index = processedItem.index, key = processedItem.key, level = processedItem.level, parentKey = processedItem.parentKey; - this.activeItemPath = this.activeItemPath.filter(function(p) { - return key !== p.key && key.startsWith(p.key); - }); - this.focusedItemInfo = { - index, - level, - parentKey - }; - this.dirty = !root11; - focus(this.menubar); - } else { - if (grouped) { - this.onItemChange(event); - } else { - var rootProcessedItem = root11 ? processedItem : this.activeItemPath.find(function(p) { - return p.parentKey === ""; - }); - this.hide(originalEvent); - this.changeFocusedItemIndex(originalEvent, rootProcessedItem ? rootProcessedItem.index : -1); - focus(this.menubar); - } - } - }, "onItemClick"), - onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter2(event) { - if (this.dirty) { - this.onItemChange(event); - } - }, "onItemMouseEnter"), - onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove2(event) { - if (this.focused) { - this.changeFocusedItemIndex(event, event.processedItem.index); - } - }, "onItemMouseMove"), - onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey2(event) { - var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex(); - this.changeFocusedItemIndex(event, itemIndex); - event.preventDefault(); - }, "onArrowDownKey"), - onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey2(event) { - if (event.altKey) { - if (this.focusedItemInfo.index !== -1) { - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var grouped = this.isProccessedItemGroup(processedItem); - !grouped && this.onItemChange({ - originalEvent: event, - processedItem - }); - } - this.popup && this.hide(event, true); - event.preventDefault(); - } else { - var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex(); - this.changeFocusedItemIndex(event, itemIndex); - event.preventDefault(); - } - }, "onArrowUpKey"), - onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey3(event) { - var _this = this; - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var parentItem = this.activeItemPath.find(function(p) { - return p.key === processedItem.parentKey; - }); - var root11 = isEmpty(processedItem.parent); - if (!root11) { - this.focusedItemInfo = { - index: -1, - parentKey: parentItem ? parentItem.parentKey : "" - }; - this.searchValue = ""; - this.onArrowDownKey(event); - } - this.activeItemPath = this.activeItemPath.filter(function(p) { - return p.parentKey !== _this.focusedItemInfo.parentKey; - }); - event.preventDefault(); - }, "onArrowLeftKey"), - onArrowRightKey: /* @__PURE__ */ __name(function onArrowRightKey3(event) { - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var grouped = this.isProccessedItemGroup(processedItem); - if (grouped) { - this.onItemChange({ - originalEvent: event, - processedItem - }); - this.focusedItemInfo = { - index: -1, - parentKey: processedItem.key - }; - this.searchValue = ""; - this.onArrowDownKey(event); - } - event.preventDefault(); - }, "onArrowRightKey"), - onHomeKey: /* @__PURE__ */ __name(function onHomeKey3(event) { - this.changeFocusedItemIndex(event, this.findFirstItemIndex()); - event.preventDefault(); - }, "onHomeKey"), - onEndKey: /* @__PURE__ */ __name(function onEndKey3(event) { - this.changeFocusedItemIndex(event, this.findLastItemIndex()); - event.preventDefault(); - }, "onEndKey"), - onEnterKey: /* @__PURE__ */ __name(function onEnterKey3(event) { - if (this.focusedItemInfo.index !== -1) { - var element = findSingle(this.menubar, 'li[id="'.concat("".concat(this.focusedItemId), '"]')); - var anchorElement = element && findSingle(element, '[data-pc-section="itemlink"]'); - anchorElement ? anchorElement.click() : element && element.click(); - if (!this.popup) { - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var grouped = this.isProccessedItemGroup(processedItem); - !grouped && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex()); - } - } - event.preventDefault(); - }, "onEnterKey"), - onSpaceKey: /* @__PURE__ */ __name(function onSpaceKey(event) { - this.onEnterKey(event); - }, "onSpaceKey"), - onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey2(event) { - if (this.popup || this.focusedItemInfo.level !== 0) { - var _focusedItemInfo = this.focusedItemInfo; - this.hide(event, false); - this.focusedItemInfo = { - index: Number(_focusedItemInfo.parentKey.split("_")[0]), - level: 0, - parentKey: "" - }; - this.popup && focus(this.target); - } - event.preventDefault(); - }, "onEscapeKey"), - onTabKey: /* @__PURE__ */ __name(function onTabKey2(event) { - if (this.focusedItemInfo.index !== -1) { - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var grouped = this.isProccessedItemGroup(processedItem); - !grouped && this.onItemChange({ - originalEvent: event, - processedItem - }); - } - this.hide(); - }, "onTabKey"), - onEnter: /* @__PURE__ */ __name(function onEnter3(el) { - if (this.autoZIndex) { - ZIndex.set("menu", el, this.baseZIndex + this.$primevue.config.zIndex.menu); - } - addStyle(el, { - position: "absolute", - top: "0", - left: "0" - }); - this.alignOverlay(); - focus(this.menubar); - this.scrollInView(); - }, "onEnter"), - onAfterEnter: /* @__PURE__ */ __name(function onAfterEnter() { - this.bindOutsideClickListener(); - this.bindScrollListener(); - this.bindResizeListener(); - this.$emit("show"); - }, "onAfterEnter"), - onLeave: /* @__PURE__ */ __name(function onLeave2() { - this.unbindOutsideClickListener(); - this.unbindScrollListener(); - this.unbindResizeListener(); - this.$emit("hide"); - this.container = null; - this.dirty = false; - }, "onLeave"), - onAfterLeave: /* @__PURE__ */ __name(function onAfterLeave(el) { - if (this.autoZIndex) { - ZIndex.clear(el); - } - }, "onAfterLeave"), - alignOverlay: /* @__PURE__ */ __name(function alignOverlay2() { - absolutePosition(this.container, this.target); - var targetWidth = getOuterWidth(this.target); - if (targetWidth > getOuterWidth(this.container)) { - this.container.style.minWidth = getOuterWidth(this.target) + "px"; - } - }, "alignOverlay"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener2() { - var _this2 = this; - if (!this.outsideClickListener) { - this.outsideClickListener = function(event) { - var isOutsideContainer = _this2.container && !_this2.container.contains(event.target); - var isOutsideTarget = _this2.popup ? !(_this2.target && (_this2.target === event.target || _this2.target.contains(event.target))) : true; - if (isOutsideContainer && isOutsideTarget) { - _this2.hide(); - } - }; - document.addEventListener("click", this.outsideClickListener); - } - }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener2() { - if (this.outsideClickListener) { - document.removeEventListener("click", this.outsideClickListener); - this.outsideClickListener = null; - } - }, "unbindOutsideClickListener"), - bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener2() { - var _this3 = this; - if (!this.scrollHandler) { - this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, function(event) { - _this3.hide(event, true); - }); - } - this.scrollHandler.bindScrollListener(); - }, "bindScrollListener"), - unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener2() { - if (this.scrollHandler) { - this.scrollHandler.unbindScrollListener(); - } - }, "unbindScrollListener"), - bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener2() { - var _this4 = this; - if (!this.resizeListener) { - this.resizeListener = function(event) { - if (!isTouchDevice()) { - _this4.hide(event, true); - } - }; - window.addEventListener("resize", this.resizeListener); - } - }, "bindResizeListener"), - unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener2() { - if (this.resizeListener) { - window.removeEventListener("resize", this.resizeListener); - this.resizeListener = null; - } - }, "unbindResizeListener"), - isItemMatched: /* @__PURE__ */ __name(function isItemMatched(processedItem) { - var _this$getProccessedIt; - return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())); - }, "isItemMatched"), - isValidItem: /* @__PURE__ */ __name(function isValidItem(processedItem) { - return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item) && this.isItemVisible(processedItem.item); - }, "isValidItem"), - isValidSelectedItem: /* @__PURE__ */ __name(function isValidSelectedItem(processedItem) { - return this.isValidItem(processedItem) && this.isSelected(processedItem); - }, "isValidSelectedItem"), - isSelected: /* @__PURE__ */ __name(function isSelected2(processedItem) { - return this.activeItemPath.some(function(p) { - return p.key === processedItem.key; - }); - }, "isSelected"), - findFirstItemIndex: /* @__PURE__ */ __name(function findFirstItemIndex() { - var _this5 = this; - return this.visibleItems.findIndex(function(processedItem) { - return _this5.isValidItem(processedItem); - }); - }, "findFirstItemIndex"), - findLastItemIndex: /* @__PURE__ */ __name(function findLastItemIndex() { - var _this6 = this; - return findLastIndex(this.visibleItems, function(processedItem) { - return _this6.isValidItem(processedItem); - }); - }, "findLastItemIndex"), - findNextItemIndex: /* @__PURE__ */ __name(function findNextItemIndex(index) { - var _this7 = this; - var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function(processedItem) { - return _this7.isValidItem(processedItem); - }) : -1; - return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index; - }, "findNextItemIndex"), - findPrevItemIndex: /* @__PURE__ */ __name(function findPrevItemIndex(index) { - var _this8 = this; - var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function(processedItem) { - return _this8.isValidItem(processedItem); - }) : -1; - return matchedItemIndex > -1 ? matchedItemIndex : index; - }, "findPrevItemIndex"), - findSelectedItemIndex: /* @__PURE__ */ __name(function findSelectedItemIndex() { - var _this9 = this; - return this.visibleItems.findIndex(function(processedItem) { - return _this9.isValidSelectedItem(processedItem); - }); - }, "findSelectedItemIndex"), - findFirstFocusedItemIndex: /* @__PURE__ */ __name(function findFirstFocusedItemIndex() { - var selectedIndex = this.findSelectedItemIndex(); - return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex; - }, "findFirstFocusedItemIndex"), - findLastFocusedItemIndex: /* @__PURE__ */ __name(function findLastFocusedItemIndex() { - var selectedIndex = this.findSelectedItemIndex(); - return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex; - }, "findLastFocusedItemIndex"), - searchItems: /* @__PURE__ */ __name(function searchItems(event, _char) { - var _this10 = this; - this.searchValue = (this.searchValue || "") + _char; - var itemIndex = -1; - var matched = false; - if (this.focusedItemInfo.index !== -1) { - itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(processedItem) { - return _this10.isItemMatched(processedItem); - }); - itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function(processedItem) { - return _this10.isItemMatched(processedItem); - }) : itemIndex + this.focusedItemInfo.index; - } else { - itemIndex = this.visibleItems.findIndex(function(processedItem) { - return _this10.isItemMatched(processedItem); - }); - } - if (itemIndex !== -1) { - matched = true; - } - if (itemIndex === -1 && this.focusedItemInfo.index === -1) { - itemIndex = this.findFirstFocusedItemIndex(); - } - if (itemIndex !== -1) { - this.changeFocusedItemIndex(event, itemIndex); - } - if (this.searchTimeout) { - clearTimeout(this.searchTimeout); - } - this.searchTimeout = setTimeout(function() { - _this10.searchValue = ""; - _this10.searchTimeout = null; - }, 500); - return matched; - }, "searchItems"), - changeFocusedItemIndex: /* @__PURE__ */ __name(function changeFocusedItemIndex(event, index) { - if (this.focusedItemInfo.index !== index) { - this.focusedItemInfo.index = index; - this.scrollInView(); - } - }, "changeFocusedItemIndex"), - scrollInView: /* @__PURE__ */ __name(function scrollInView3() { - var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1; - var id2 = index !== -1 ? "".concat(this.id, "_").concat(index) : this.focusedItemId; - var element = findSingle(this.menubar, 'li[id="'.concat(id2, '"]')); - if (element) { - element.scrollIntoView && element.scrollIntoView({ - block: "nearest", - inline: "start" - }); - } - }, "scrollInView"), - createProcessedItems: /* @__PURE__ */ __name(function createProcessedItems(items) { - var _this11 = this; - var level = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - var parent = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var parentKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ""; - var processedItems3 = []; - items && items.forEach(function(item3, index) { - var key = (parentKey !== "" ? parentKey + "_" : "") + index; - var newItem = { - item: item3, - index, - level, - key, - parent, - parentKey - }; - newItem["items"] = _this11.createProcessedItems(item3.items, level + 1, newItem, key); - processedItems3.push(newItem); - }); - return processedItems3; - }, "createProcessedItems"), - containerRef: /* @__PURE__ */ __name(function containerRef2(el) { - this.container = el; - }, "containerRef"), - menubarRef: /* @__PURE__ */ __name(function menubarRef(el) { - this.menubar = el ? el.$el : void 0; - }, "menubarRef") - }, - computed: { - processedItems: /* @__PURE__ */ __name(function processedItems() { - return this.createProcessedItems(this.model || []); - }, "processedItems"), - visibleItems: /* @__PURE__ */ __name(function visibleItems() { - var _this12 = this; - var processedItem = this.activeItemPath.find(function(p) { - return p.key === _this12.focusedItemInfo.parentKey; - }); - return processedItem ? processedItem.items : this.processedItems; - }, "visibleItems"), - focusedItemId: /* @__PURE__ */ __name(function focusedItemId() { - return this.focusedItemInfo.index !== -1 ? "".concat(this.id).concat(isNotEmpty(this.focusedItemInfo.parentKey) ? "_" + this.focusedItemInfo.parentKey : "", "_").concat(this.focusedItemInfo.index) : null; - }, "focusedItemId") - }, - components: { - TieredMenuSub: script$1$2, - Portal: script$k - } -}; -var _hoisted_1$8 = ["id"]; -function render$5(_ctx, _cache, $props, $setup, $data, $options) { - var _component_TieredMenuSub = resolveComponent("TieredMenuSub"); - var _component_Portal = resolveComponent("Portal"); - return openBlock(), createBlock(_component_Portal, { - appendTo: _ctx.appendTo, - disabled: !_ctx.popup - }, { - "default": withCtx(function() { - return [createVNode(Transition, mergeProps({ - name: "p-connected-overlay", - onEnter: $options.onEnter, - onAfterEnter: $options.onAfterEnter, - onLeave: $options.onLeave, - onAfterLeave: $options.onAfterLeave - }, _ctx.ptm("transition")), { - "default": withCtx(function() { - return [$data.visible ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - ref: $options.containerRef, - id: $data.id, - "class": _ctx.cx("root"), - onClick: _cache[0] || (_cache[0] = function() { - return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments); - }) - }, _ctx.ptmi("root")), [_ctx.$slots.start ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - "class": _ctx.cx("start") - }, _ctx.ptm("start")), [renderSlot(_ctx.$slots, "start")], 16)) : createCommentVNode("", true), createVNode(_component_TieredMenuSub, { - ref: $options.menubarRef, - id: $data.id + "_list", - tabindex: !_ctx.disabled ? _ctx.tabindex : -1, - role: "menubar", - "aria-label": _ctx.ariaLabel, - "aria-labelledby": _ctx.ariaLabelledby, - "aria-disabled": _ctx.disabled || void 0, - "aria-orientation": "vertical", - "aria-activedescendant": $data.focused ? $options.focusedItemId : void 0, - menuId: $data.id, - focusedItemId: $data.focused ? $options.focusedItemId : void 0, - items: $options.processedItems, - templates: _ctx.$slots, - activeItemPath: $data.activeItemPath, - level: 0, - visible: $data.submenuVisible, - pt: _ctx.pt, - unstyled: _ctx.unstyled, - onFocus: $options.onFocus, - onBlur: $options.onBlur, - onKeydown: $options.onKeyDown, - onItemClick: $options.onItemClick, - onItemMouseenter: $options.onItemMouseEnter, - onItemMousemove: $options.onItemMouseMove - }, null, 8, ["id", "tabindex", "aria-label", "aria-labelledby", "aria-disabled", "aria-activedescendant", "menuId", "focusedItemId", "items", "templates", "activeItemPath", "visible", "pt", "unstyled", "onFocus", "onBlur", "onKeydown", "onItemClick", "onItemMouseenter", "onItemMousemove"]), _ctx.$slots.end ? (openBlock(), createElementBlock("div", mergeProps({ - key: 1, - "class": _ctx.cx("end") - }, _ctx.ptm("end")), [renderSlot(_ctx.$slots, "end")], 16)) : createCommentVNode("", true)], 16, _hoisted_1$8)) : createCommentVNode("", true)]; - }), - _: 3 - }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])]; - }), - _: 3 - }, 8, ["appendTo", "disabled"]); -} -__name(render$5, "render$5"); -script$4.render = render$5; -var theme$1 = /* @__PURE__ */ __name(function theme7(_ref) { - var dt = _ref.dt; - return "\n.p-splitbutton {\n display: inline-flex;\n position: relative;\n border-radius: ".concat(dt("splitbutton.border.radius"), ";\n}\n\n.p-splitbutton-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0 none;\n}\n\n.p-splitbutton-button:focus-visible,\n.p-splitbutton-dropdown:focus-visible {\n z-index: 1;\n}\n\n.p-splitbutton-button:not(:disabled):hover,\n.p-splitbutton-button:not(:disabled):active {\n border-right: 0 none;\n}\n\n.p-splitbutton-dropdown {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.p-splitbutton .p-menu {\n min-width: 100%;\n}\n\n.p-splitbutton-fluid {\n display: flex;\n}\n\n.p-splitbutton-rounded .p-splitbutton-dropdown {\n border-top-right-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n border-bottom-right-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n}\n\n.p-splitbutton-rounded .p-splitbutton-button {\n border-top-left-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n border-bottom-left-radius: ").concat(dt("splitbutton.rounded.border.radius"), ";\n}\n\n.p-splitbutton-raised {\n box-shadow: ").concat(dt("splitbutton.raised.shadow"), ";\n}\n"); -}, "theme"); -var classes$1 = { - root: /* @__PURE__ */ __name(function root9(_ref2) { - var instance = _ref2.instance, props = _ref2.props; - return ["p-splitbutton p-component", { - "p-splitbutton-raised": props.raised, - "p-splitbutton-rounded": props.rounded, - "p-splitbutton-fluid": instance.hasFluid - }]; - }, "root"), - pcButton: "p-splitbutton-button", - pcDropdown: "p-splitbutton-dropdown" -}; -var SplitButtonStyle = BaseStyle.extend({ - name: "splitbutton", - theme: theme$1, - classes: classes$1 -}); -var script$1$1 = { - name: "BaseSplitButton", - "extends": script$e, - props: { - label: { - type: String, - "default": null - }, - icon: { - type: String, - "default": null - }, - model: { - type: Array, - "default": null - }, - autoZIndex: { - type: Boolean, - "default": true - }, - baseZIndex: { - type: Number, - "default": 0 - }, - appendTo: { - type: [String, Object], - "default": "body" - }, - disabled: { - type: Boolean, - "default": false - }, - fluid: { - type: Boolean, - "default": null - }, - "class": { - type: null, - "default": null - }, - style: { - type: null, - "default": null - }, - buttonProps: { - type: null, - "default": null - }, - menuButtonProps: { - type: null, - "default": null - }, - menuButtonIcon: { - type: String, - "default": void 0 - }, - dropdownIcon: { - type: String, - "default": void 0 - }, - severity: { - type: String, - "default": null - }, - raised: { - type: Boolean, - "default": false - }, - rounded: { - type: Boolean, - "default": false - }, - text: { - type: Boolean, - "default": false - }, - outlined: { - type: Boolean, - "default": false - }, - size: { - type: String, - "default": null - }, - plain: { - type: Boolean, - "default": false - } - }, - style: SplitButtonStyle, - provide: /* @__PURE__ */ __name(function provide11() { - return { - $pcSplitButton: this, - $parentInstance: this - }; - }, "provide") -}; -var script$3 = { - name: "SplitButton", - "extends": script$1$1, - inheritAttrs: false, - emits: ["click"], - inject: { - $pcFluid: { - "default": null - } - }, - data: /* @__PURE__ */ __name(function data7() { - return { - id: this.$attrs.id, - isExpanded: false - }; - }, "data"), - watch: { - "$attrs.id": /* @__PURE__ */ __name(function $attrsId3(newValue) { - this.id = newValue || UniqueComponentId(); - }, "$attrsId") - }, - mounted: /* @__PURE__ */ __name(function mounted7() { - var _this = this; - this.id = this.id || UniqueComponentId(); - this.$watch("$refs.menu.visible", function(newValue) { - _this.isExpanded = newValue; - }); - }, "mounted"), - methods: { - onDropdownButtonClick: /* @__PURE__ */ __name(function onDropdownButtonClick(event) { - if (event) { - event.preventDefault(); - } - this.$refs.menu.toggle({ - currentTarget: this.$el, - relatedTarget: this.$refs.button.$el - }); - this.isExpanded = this.$refs.menu.visible; - }, "onDropdownButtonClick"), - onDropdownKeydown: /* @__PURE__ */ __name(function onDropdownKeydown(event) { - if (event.code === "ArrowDown" || event.code === "ArrowUp") { - this.onDropdownButtonClick(); - event.preventDefault(); - } - }, "onDropdownKeydown"), - onDefaultButtonClick: /* @__PURE__ */ __name(function onDefaultButtonClick(event) { - if (this.isExpanded) { - this.$refs.menu.hide(event); - } - this.$emit("click", event); - }, "onDefaultButtonClick") - }, - computed: { - containerClass: /* @__PURE__ */ __name(function containerClass() { - return [this.cx("root"), this["class"]]; - }, "containerClass"), - hasFluid: /* @__PURE__ */ __name(function hasFluid2() { - return isEmpty(this.fluid) ? !!this.$pcFluid : this.fluid; - }, "hasFluid") - }, - components: { - PVSButton: script$d, - PVSMenu: script$4, - ChevronDownIcon: script$l - } -}; -var _hoisted_1$7 = ["data-p-severity"]; -function render$4(_ctx, _cache, $props, $setup, $data, $options) { - var _component_PVSButton = resolveComponent("PVSButton"); - var _component_PVSMenu = resolveComponent("PVSMenu"); - return openBlock(), createElementBlock("div", mergeProps({ - "class": $options.containerClass, - style: _ctx.style - }, _ctx.ptmi("root"), { - "data-p-severity": _ctx.severity - }), [createVNode(_component_PVSButton, mergeProps({ - type: "button", - "class": _ctx.cx("pcButton"), - label: _ctx.label, - disabled: _ctx.disabled, - severity: _ctx.severity, - text: _ctx.text, - icon: _ctx.icon, - outlined: _ctx.outlined, - size: _ctx.size, - fluid: _ctx.fluid, - "aria-label": _ctx.label, - onClick: $options.onDefaultButtonClick - }, _ctx.buttonProps, { - pt: _ctx.ptm("pcButton"), - unstyled: _ctx.unstyled - }), createSlots({ - "default": withCtx(function() { - return [renderSlot(_ctx.$slots, "default")]; - }), - _: 2 - }, [_ctx.$slots.icon ? { - name: "icon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "icon", { - "class": normalizeClass(slotProps["class"]) - }, function() { - return [createBaseVNode("span", mergeProps({ - "class": [_ctx.icon, slotProps["class"]] - }, _ctx.ptm("pcButton")["icon"], { - "data-pc-section": "buttonicon" - }), null, 16)]; - })]; - }), - key: "0" - } : void 0]), 1040, ["class", "label", "disabled", "severity", "text", "icon", "outlined", "size", "fluid", "aria-label", "onClick", "pt", "unstyled"]), createVNode(_component_PVSButton, mergeProps({ - ref: "button", - type: "button", - "class": _ctx.cx("pcDropdown"), - disabled: _ctx.disabled, - "aria-haspopup": "true", - "aria-expanded": $data.isExpanded, - "aria-controls": $data.id + "_overlay", - onClick: $options.onDropdownButtonClick, - onKeydown: $options.onDropdownKeydown, - severity: _ctx.severity, - text: _ctx.text, - outlined: _ctx.outlined, - size: _ctx.size, - unstyled: _ctx.unstyled - }, _ctx.menuButtonProps, { - pt: _ctx.ptm("pcDropdown") - }), { - icon: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, _ctx.$slots.dropdownicon ? "dropdownicon" : "menubuttonicon", { - "class": normalizeClass(slotProps["class"]) - }, function() { - return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.menuButtonIcon || _ctx.dropdownIcon ? "span" : "ChevronDownIcon"), mergeProps({ - "class": [_ctx.dropdownIcon || _ctx.menuButtonIcon, slotProps["class"]] - }, _ctx.ptm("pcDropdown")["icon"], { - "data-pc-section": "menubuttonicon" - }), null, 16, ["class"]))]; - })]; - }), - _: 3 - }, 16, ["class", "disabled", "aria-expanded", "aria-controls", "onClick", "onKeydown", "severity", "text", "outlined", "size", "unstyled", "pt"]), createVNode(_component_PVSMenu, { - ref: "menu", - id: $data.id + "_overlay", - model: _ctx.model, - popup: true, - autoZIndex: _ctx.autoZIndex, - baseZIndex: _ctx.baseZIndex, - appendTo: _ctx.appendTo, - unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcMenu") - }, createSlots({ - _: 2 - }, [_ctx.$slots.menuitemicon ? { - name: "itemicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "menuitemicon", { - item: slotProps.item, - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "0" - } : void 0, _ctx.$slots.item ? { - name: "item", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "item", { - item: slotProps.item, - hasSubmenu: slotProps.hasSubmenu, - label: slotProps.label, - props: slotProps.props - })]; - }), - key: "1" - } : void 0]), 1032, ["id", "model", "autoZIndex", "baseZIndex", "appendTo", "unstyled", "pt"])], 16, _hoisted_1$7); -} -__name(render$4, "render$4"); -script$3.render = render$4; -const _withScopeId$3 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-26957f1f"), n = n(), popScopeId(), n), "_withScopeId$3"); -const _hoisted_1$6 = ["aria-label"]; -const minQueueCount = 1; -const _sfc_main$6 = /* @__PURE__ */ defineComponent({ - __name: "BatchCountEdit", - props: { - class: { default: "" } - }, - setup(__props) { - const props = __props; - const queueSettingsStore = useQueueSettingsStore(); - const { batchCount } = storeToRefs(queueSettingsStore); - const settingStore = useSettingStore(); - const maxQueueCount = computed( - () => settingStore.get("Comfy.QueueButton.BatchCountLimit") - ); - const handleClick = /* @__PURE__ */ __name((increment) => { - let newCount; - if (increment) { - const originalCount = batchCount.value - 1; - newCount = Math.min(originalCount * 2, maxQueueCount.value); - } else { - const originalCount = batchCount.value + 1; - newCount = Math.floor(originalCount / 2); - } - batchCount.value = newCount; - }, "handleClick"); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return withDirectives((openBlock(), createElementBlock("div", { - class: normalizeClass(["batch-count", props.class]), - "aria-label": _ctx.$t("menu.batchCount") - }, [ - createVNode(unref(script$A), { - class: "w-14", - modelValue: unref(batchCount), - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(batchCount) ? batchCount.value = $event : null), - min: minQueueCount, - max: maxQueueCount.value, - fluid: "", - showButtons: "", - pt: { - incrementButton: { - class: "w-6", - onmousedown: /* @__PURE__ */ __name(() => { - handleClick(true); - }, "onmousedown") - }, - decrementButton: { - class: "w-6", - onmousedown: /* @__PURE__ */ __name(() => { - handleClick(false); - }, "onmousedown") - } - } - }, null, 8, ["modelValue", "max", "pt"]) - ], 10, _hoisted_1$6)), [ - [ - _directive_tooltip, - _ctx.$t("menu.batchCount"), - void 0, - { bottom: true } - ] - ]); - }; - } -}); -const BatchCountEdit = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-26957f1f"]]); -const _withScopeId$2 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-e9044686"), n = n(), popScopeId(), n), "_withScopeId$2"); -const _hoisted_1$5 = { class: "queue-button-group flex" }; -const _sfc_main$5 = /* @__PURE__ */ defineComponent({ - __name: "ComfyQueueButton", - setup(__props) { - const workspaceStore = useWorkspaceStore(); - const queueCountStore = storeToRefs(useQueuePendingTaskCountStore()); - const { mode: queueMode } = storeToRefs(useQueueSettingsStore()); - const { t } = useI18n(); - const queueModeMenuItemLookup = computed(() => ({ - disabled: { - key: "disabled", - label: t("menu.queue"), - tooltip: t("menu.disabledTooltip"), - command: /* @__PURE__ */ __name(() => { - queueMode.value = "disabled"; - }, "command") - }, - instant: { - key: "instant", - label: `${t("menu.queue")} (${t("menu.instant")})`, - tooltip: t("menu.instantTooltip"), - command: /* @__PURE__ */ __name(() => { - queueMode.value = "instant"; - }, "command") - }, - change: { - key: "change", - label: `${t("menu.queue")} (${t("menu.onChange")})`, - tooltip: t("menu.onChangeTooltip"), - command: /* @__PURE__ */ __name(() => { - queueMode.value = "change"; - }, "command") - } - })); - const activeQueueModeMenuItem = computed( - () => queueModeMenuItemLookup.value[queueMode.value] - ); - const queueModeMenuItems = computed( - () => Object.values(queueModeMenuItemLookup.value) - ); - const executingPrompt = computed(() => !!queueCountStore.count.value); - const hasPendingTasks = computed(() => queueCountStore.count.value > 1); - const commandStore = useCommandStore(); - const queuePrompt = /* @__PURE__ */ __name((e) => { - const commandId = e.shiftKey ? "Comfy.QueuePromptFront" : "Comfy.QueuePrompt"; - commandStore.execute(commandId); - }, "queuePrompt"); - return (_ctx, _cache) => { - const _component_i_lucide58list_start = __unplugin_components_0$1; - const _component_i_lucide58play = __unplugin_components_1$1; - const _component_i_lucide58fast_forward = __unplugin_components_2; - const _component_i_lucide58step_forward = __unplugin_components_3; - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", _hoisted_1$5, [ - withDirectives((openBlock(), createBlock(unref(script$3), { - class: "comfyui-queue-button", - label: activeQueueModeMenuItem.value.label, - severity: "primary", - size: "small", - onClick: queuePrompt, - model: queueModeMenuItems.value, - "data-testid": "queue-button" - }, { - icon: withCtx(() => [ - unref(workspaceStore).shiftDown ? (openBlock(), createBlock(_component_i_lucide58list_start, { key: 0 })) : unref(queueMode) === "disabled" ? (openBlock(), createBlock(_component_i_lucide58play, { key: 1 })) : unref(queueMode) === "instant" ? (openBlock(), createBlock(_component_i_lucide58fast_forward, { key: 2 })) : unref(queueMode) === "change" ? (openBlock(), createBlock(_component_i_lucide58step_forward, { key: 3 })) : createCommentVNode("", true) - ]), - item: withCtx(({ item: item3 }) => [ - withDirectives(createVNode(unref(script$d), { - label: item3.label, - icon: item3.icon, - severity: item3.key === unref(queueMode) ? "primary" : "secondary", - size: "small", - text: "" - }, null, 8, ["label", "icon", "severity"]), [ - [_directive_tooltip, item3.tooltip] - ]) - ]), - _: 1 - }, 8, ["label", "model"])), [ - [ - _directive_tooltip, - unref(workspaceStore).shiftDown ? _ctx.$t("menu.queueWorkflowFront") : _ctx.$t("menu.queueWorkflow"), - void 0, - { bottom: true } - ] - ]), - createVNode(BatchCountEdit), - createVNode(unref(script$8), { class: "execution-actions flex flex-nowrap" }, { - default: withCtx(() => [ - withDirectives(createVNode(unref(script$d), { - icon: "pi pi-times", - severity: executingPrompt.value ? "danger" : "secondary", - disabled: !executingPrompt.value, - text: "", - "aria-label": _ctx.$t("menu.interrupt"), - onClick: _cache[0] || (_cache[0] = () => unref(commandStore).execute("Comfy.Interrupt")) - }, null, 8, ["severity", "disabled", "aria-label"]), [ - [ - _directive_tooltip, - _ctx.$t("menu.interrupt"), - void 0, - { bottom: true } - ] - ]), - withDirectives(createVNode(unref(script$d), { - icon: "pi pi-stop", - severity: hasPendingTasks.value ? "danger" : "secondary", - disabled: !hasPendingTasks.value, - text: "", - "aria-label": _ctx.$t("sideToolbar.queueTab.clearPendingTasks"), - onClick: _cache[1] || (_cache[1] = () => unref(commandStore).execute("Comfy.ClearPendingTasks")) - }, null, 8, ["severity", "disabled", "aria-label"]), [ - [ - _directive_tooltip, - _ctx.$t("sideToolbar.queueTab.clearPendingTasks"), - void 0, - { bottom: true } - ] - ]) - ]), - _: 1 - }) - ]); - }; - } -}); -const ComfyQueueButton = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-e9044686"]]); -const overlapThreshold = 20; -const _sfc_main$4 = /* @__PURE__ */ defineComponent({ - __name: "ComfyActionbar", - setup(__props) { - const settingsStore = useSettingStore(); - const visible = computed( - () => settingsStore.get("Comfy.UseNewMenu") !== "Disabled" - ); - const panelRef = ref(null); - const dragHandleRef = ref(null); - const isDocked = useLocalStorage("Comfy.MenuPosition.Docked", false); - const storedPosition = useLocalStorage("Comfy.MenuPosition.Floating", { - x: 0, - y: 0 - }); - const { - x, - y, - style, - isDragging - } = useDraggable(panelRef, { - initialValue: { x: 0, y: 0 }, - handle: dragHandleRef, - containerElement: document.body - }); - watchDebounced( - [x, y], - ([newX, newY]) => { - storedPosition.value = { x: newX, y: newY }; - }, - { debounce: 300 } - ); - const setInitialPosition = /* @__PURE__ */ __name(() => { - if (x.value !== 0 || y.value !== 0) { - return; - } - if (storedPosition.value.x !== 0 || storedPosition.value.y !== 0) { - x.value = storedPosition.value.x; - y.value = storedPosition.value.y; - captureLastDragState(); - return; - } - if (panelRef.value) { - const screenWidth = window.innerWidth; - const screenHeight = window.innerHeight; - const menuWidth = panelRef.value.offsetWidth; - const menuHeight = panelRef.value.offsetHeight; - if (menuWidth === 0 || menuHeight === 0) { - return; - } - x.value = (screenWidth - menuWidth) / 2; - y.value = screenHeight - menuHeight - 10; - captureLastDragState(); - } - }, "setInitialPosition"); - onMounted(setInitialPosition); - watch(visible, (newVisible) => { - if (newVisible) { - nextTick(setInitialPosition); - } - }); - const lastDragState = ref({ - x: x.value, - y: y.value, - windowWidth: window.innerWidth, - windowHeight: window.innerHeight - }); - const captureLastDragState = /* @__PURE__ */ __name(() => { - lastDragState.value = { - x: x.value, - y: y.value, - windowWidth: window.innerWidth, - windowHeight: window.innerHeight - }; - }, "captureLastDragState"); - watch( - isDragging, - (newIsDragging) => { - if (!newIsDragging) { - captureLastDragState(); - } - }, - { immediate: true } - ); - const adjustMenuPosition = /* @__PURE__ */ __name(() => { - if (panelRef.value) { - const screenWidth = window.innerWidth; - const screenHeight = window.innerHeight; - const menuWidth = panelRef.value.offsetWidth; - const menuHeight = panelRef.value.offsetHeight; - const distanceLeft = lastDragState.value.x; - const distanceRight = lastDragState.value.windowWidth - (lastDragState.value.x + menuWidth); - const distanceTop = lastDragState.value.y; - const distanceBottom = lastDragState.value.windowHeight - (lastDragState.value.y + menuHeight); - const distances = [ - { edge: "left", distance: distanceLeft }, - { edge: "right", distance: distanceRight }, - { edge: "top", distance: distanceTop }, - { edge: "bottom", distance: distanceBottom } - ]; - const closestEdge = distances.reduce( - (min, curr) => curr.distance < min.distance ? curr : min - ); - const verticalRatio = lastDragState.value.y / lastDragState.value.windowHeight; - const horizontalRatio = lastDragState.value.x / lastDragState.value.windowWidth; - if (closestEdge.edge === "left") { - x.value = closestEdge.distance; - y.value = verticalRatio * screenHeight; - } else if (closestEdge.edge === "right") { - x.value = screenWidth - menuWidth - closestEdge.distance; - y.value = verticalRatio * screenHeight; - } else if (closestEdge.edge === "top") { - x.value = horizontalRatio * screenWidth; - y.value = closestEdge.distance; - } else { - x.value = horizontalRatio * screenWidth; - y.value = screenHeight - menuHeight - closestEdge.distance; - } - x.value = lodashExports.clamp(x.value, 0, screenWidth - menuWidth); - y.value = lodashExports.clamp(y.value, 0, screenHeight - menuHeight); - } - }, "adjustMenuPosition"); - useEventListener(window, "resize", adjustMenuPosition); - const topMenuRef = inject("topMenuRef"); - const topMenuBounds = useElementBounding(topMenuRef); - const isOverlappingWithTopMenu = computed(() => { - if (!panelRef.value) { - return false; - } - const { height } = panelRef.value.getBoundingClientRect(); - const actionbarBottom = y.value + height; - const topMenuBottom = topMenuBounds.bottom.value; - const overlapPixels = Math.min(actionbarBottom, topMenuBottom) - Math.max(y.value, topMenuBounds.top.value); - return overlapPixels > overlapThreshold; - }); - watch(isDragging, (newIsDragging) => { - if (!newIsDragging) { - isDocked.value = isOverlappingWithTopMenu.value; - } else { - isDocked.value = false; - } - }); - const eventBus = useEventBus("topMenu"); - watch([isDragging, isOverlappingWithTopMenu], ([dragging, overlapping]) => { - eventBus.emit("updateHighlight", { - isDragging: dragging, - isOverlapping: overlapping - }); - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script$B), { - class: normalizeClass(["actionbar w-fit", { "is-dragging": unref(isDragging), "is-docked": unref(isDocked) }]), - style: normalizeStyle(unref(style)) - }, { - default: withCtx(() => [ - createBaseVNode("div", { - class: "actionbar-content flex items-center", - ref_key: "panelRef", - ref: panelRef - }, [ - createBaseVNode("span", { - class: "drag-handle cursor-move mr-2 p-0!", - ref_key: "dragHandleRef", - ref: dragHandleRef - }, null, 512), - createVNode(ComfyQueueButton) - ], 512) - ]), - _: 1 - }, 8, ["style", "class"]); - }; - } -}); -const Actionbar = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-915e5456"]]); -const _hoisted_1$4 = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$4 = /* @__PURE__ */ createBaseVNode("path", { - fill: "currentColor", - d: "M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-5v3h14v-3zm0-2h14V5H5zm0 2v3z" -}, null, -1); -const _hoisted_3$4 = [ - _hoisted_2$4 -]; -function render$3(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._hoisted_3$4]); -} -__name(render$3, "render$3"); -const __unplugin_components_1 = markRaw({ name: "material-symbols-dock-to-bottom-outline", render: render$3 }); -const _hoisted_1$3 = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$3 = /* @__PURE__ */ createBaseVNode("path", { - fill: "currentColor", - d: "M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-7h14V5H5z" -}, null, -1); -const _hoisted_3$3 = [ - _hoisted_2$3 -]; -function render$2(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$3, [..._hoisted_3$3]); -} -__name(render$2, "render$2"); -const __unplugin_components_0 = markRaw({ name: "material-symbols-dock-to-bottom", render: render$2 }); -const _sfc_main$3 = /* @__PURE__ */ defineComponent({ - __name: "BottomPanelToggleButton", - setup(__props) { - const bottomPanelStore = useBottomPanelStore(); - return (_ctx, _cache) => { - const _component_i_material_symbols58dock_to_bottom = __unplugin_components_0; - const _component_i_material_symbols58dock_to_bottom_outline = __unplugin_components_1; - const _directive_tooltip = resolveDirective("tooltip"); - return withDirectives((openBlock(), createBlock(unref(script$d), { - severity: "secondary", - text: "", - "aria-label": _ctx.$t("menu.toggleBottomPanel"), - onClick: unref(bottomPanelStore).toggleBottomPanel - }, { - icon: withCtx(() => [ - unref(bottomPanelStore).bottomPanelVisible ? (openBlock(), createBlock(_component_i_material_symbols58dock_to_bottom, { key: 0 })) : (openBlock(), createBlock(_component_i_material_symbols58dock_to_bottom_outline, { key: 1 })) - ]), - _: 1 - }, 8, ["aria-label", "onClick"])), [ - [vShow, unref(bottomPanelStore).bottomPanelTabs.length > 0], - [_directive_tooltip, { value: _ctx.$t("menu.toggleBottomPanel"), showDelay: 300 }] - ]); - }; - } -}); -var theme8 = /* @__PURE__ */ __name(function theme9(_ref) { - var dt = _ref.dt; - return "\n.p-menubar {\n display: flex;\n align-items: center;\n background: ".concat(dt("menubar.background"), ";\n border: 1px solid ").concat(dt("menubar.border.color"), ";\n border-radius: ").concat(dt("menubar.border.radius"), ";\n color: ").concat(dt("menubar.color"), ";\n padding: ").concat(dt("menubar.padding"), ";\n gap: ").concat(dt("menubar.gap"), ";\n}\n\n.p-menubar-start,\n.p-megamenu-end {\n display: flex;\n align-items: center;\n}\n\n.p-menubar-root-list,\n.p-menubar-submenu {\n display: flex;\n margin: 0;\n padding: 0;\n list-style: none;\n outline: 0 none;\n}\n\n.p-menubar-root-list {\n align-items: center;\n flex-wrap: wrap;\n gap: ").concat(dt("menubar.gap"), ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\n border-radius: ").concat(dt("menubar.base.item.border.radius"), ";\n}\n\n.p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: ").concat(dt("menubar.base.item.padding"), ";\n}\n\n.p-menubar-item-content {\n transition: background ").concat(dt("menubar.transition.duration"), ", color ").concat(dt("menubar.transition.duration"), ";\n border-radius: ").concat(dt("menubar.item.border.radius"), ";\n color: ").concat(dt("menubar.item.color"), ";\n}\n\n.p-menubar-item-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n color: inherit;\n padding: ").concat(dt("menubar.item.padding"), ";\n gap: ").concat(dt("menubar.item.gap"), ";\n user-select: none;\n outline: 0 none;\n}\n\n.p-menubar-item-label {\n line-height: 1;\n}\n\n.p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.color"), ";\n}\n\n.p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.color"), ";\n margin-left: auto;\n font-size: ").concat(dt("menubar.submenu.icon.size"), ";\n width: ").concat(dt("menubar.submenu.icon.size"), ";\n height: ").concat(dt("menubar.submenu.icon.size"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content {\n color: ").concat(dt("menubar.item.focus.color"), ";\n background: ").concat(dt("menubar.item.focus.background"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.focus.color"), ";\n}\n\n.p-menubar-item.p-focus > .p-menubar-item-content .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.focus.color"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover {\n color: ").concat(dt("menubar.item.focus.color"), ";\n background: ").concat(dt("menubar.item.focus.background"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.focus.color"), ";\n}\n\n.p-menubar-item:not(.p-disabled) > .p-menubar-item-content:hover .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.focus.color"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content {\n color: ").concat(dt("menubar.item.active.color"), ";\n background: ").concat(dt("menubar.item.active.background"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-item-icon {\n color: ").concat(dt("menubar.item.icon.active.color"), ";\n}\n\n.p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n color: ").concat(dt("menubar.submenu.icon.active.color"), ";\n}\n\n.p-menubar-submenu {\n display: none;\n position: absolute;\n min-width: 12.5rem;\n z-index: 1;\n background: ").concat(dt("menubar.submenu.background"), ";\n border: 1px solid ").concat(dt("menubar.submenu.border.color"), ";\n border-radius: ").concat(dt("menubar.border.radius"), ";\n box-shadow: ").concat(dt("menubar.submenu.shadow"), ";\n color: ").concat(dt("menubar.submenu.color"), ";\n flex-direction: column;\n padding: ").concat(dt("menubar.submenu.padding"), ";\n gap: ").concat(dt("menubar.submenu.gap"), ";\n}\n\n.p-menubar-submenu .p-menubar-separator {\n border-top: 1px solid ").concat(dt("menubar.separator.border.color"), ";\n}\n\n.p-menubar-submenu .p-menubar-item {\n position: relative;\n}\n\n .p-menubar-submenu > .p-menubar-item-active > .p-menubar-submenu {\n display: block;\n left: 100%;\n top: 0;\n}\n\n.p-menubar-end {\n margin-left: auto;\n align-self: center;\n}\n\n.p-menubar-button {\n display: none;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n width: ").concat(dt("menubar.mobile.button.size"), ";\n height: ").concat(dt("menubar.mobile.button.size"), ";\n position: relative;\n color: ").concat(dt("menubar.mobile.button.color"), ";\n border: 0 none;\n background: transparent;\n border-radius: ").concat(dt("menubar.mobile.button.border.radius"), ";\n transition: background ").concat(dt("menubar.transition.duration"), ", color ").concat(dt("menubar.transition.duration"), ", outline-color ").concat(dt("menubar.transition.duration"), ";\n outline-color: transparent;\n}\n\n.p-menubar-button:hover {\n color: ").concat(dt("menubar.mobile.button.hover.color"), ";\n background: ").concat(dt("menubar.mobile.button.hover.background"), ";\n}\n\n.p-menubar-button:focus-visible {\n box-shadow: ").concat(dt("menubar.mobile.button.focus.ring.shadow"), ";\n outline: ").concat(dt("menubar.mobile.button.focus.ring.width"), " ").concat(dt("menubar.mobile.button.focus.ring.style"), " ").concat(dt("menubar.mobile.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("menubar.mobile.button.focus.ring.offset"), ";\n}\n\n.p-menubar-mobile {\n position: relative;\n}\n\n.p-menubar-mobile .p-menubar-button {\n display: flex;\n}\n\n.p-menubar-mobile .p-menubar-root-list {\n position: absolute;\n display: none;\n width: 100%;\n padding: ").concat(dt("menubar.submenu.padding"), ";\n background: ").concat(dt("menubar.submenu.background"), ";\n border: 1px solid ").concat(dt("menubar.submenu.border.color"), ";\n box-shadow: ").concat(dt("menubar.submenu.shadow"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content {\n border-radius: ").concat(dt("menubar.item.border.radius"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content > .p-menubar-item-link {\n padding: ").concat(dt("menubar.item.padding"), ";\n}\n\n.p-menubar-mobile-active .p-menubar-root-list {\n display: flex;\n flex-direction: column;\n top: 100%;\n left: 0;\n z-index: 1;\n}\n\n.p-menubar-mobile .p-menubar-root-list .p-menubar-item {\n width: 100%;\n position: static;\n}\n\n.p-menubar-mobile .p-menubar-root-list .p-menubar-separator {\n border-top: 1px solid ").concat(dt("menubar.separator.border.color"), ";\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item > .p-menubar-item-content .p-menubar-submenu-icon {\n margin-left: auto;\n transition: transform 0.2s;\n}\n\n.p-menubar-mobile .p-menubar-root-list > .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n transform: rotate(-180deg);\n}\n\n.p-menubar-mobile .p-menubar-submenu .p-menubar-submenu-icon {\n transition: transform 0.2s;\n transform: rotate(90deg);\n}\n\n.p-menubar-mobile .p-menubar-item-active > .p-menubar-item-content .p-menubar-submenu-icon {\n transform: rotate(-90deg);\n}\n\n.p-menubar-mobile .p-menubar-submenu {\n width: 100%;\n position: static;\n box-shadow: none;\n border: 0 none;\n padding-left: ").concat(dt("menubar.submenu.mobile.indent"), ";\n}\n"); -}, "theme"); -var inlineStyles = { - submenu: /* @__PURE__ */ __name(function submenu2(_ref2) { - var instance = _ref2.instance, processedItem = _ref2.processedItem; - return { - display: instance.isItemActive(processedItem) ? "flex" : "none" - }; - }, "submenu") -}; -var classes = { - root: /* @__PURE__ */ __name(function root10(_ref3) { - var instance = _ref3.instance; - return ["p-menubar p-component", { - "p-menubar-mobile": instance.queryMatches, - "p-menubar-mobile-active": instance.mobileActive - }]; - }, "root"), - start: "p-menubar-start", - button: "p-menubar-button", - rootList: "p-menubar-root-list", - item: /* @__PURE__ */ __name(function item2(_ref4) { - var instance = _ref4.instance, processedItem = _ref4.processedItem; - return ["p-menubar-item", { - "p-menubar-item-active": instance.isItemActive(processedItem), - "p-focus": instance.isItemFocused(processedItem), - "p-disabled": instance.isItemDisabled(processedItem) - }]; - }, "item"), - itemContent: "p-menubar-item-content", - itemLink: "p-menubar-item-link", - itemIcon: "p-menubar-item-icon", - itemLabel: "p-menubar-item-label", - submenuIcon: "p-menubar-submenu-icon", - submenu: "p-menubar-submenu", - separator: "p-menubar-separator", - end: "p-menubar-end" -}; -var MenubarStyle = BaseStyle.extend({ - name: "menubar", - theme: theme8, - classes, - inlineStyles -}); -var script$2 = { - name: "BaseMenubar", - "extends": script$e, - props: { - model: { - type: Array, - "default": null - }, - buttonProps: { - type: null, - "default": null - }, - breakpoint: { - type: String, - "default": "960px" - }, - ariaLabelledby: { - type: String, - "default": null - }, - ariaLabel: { - type: String, - "default": null - } - }, - style: MenubarStyle, - provide: /* @__PURE__ */ __name(function provide12() { - return { - $pcMenubar: this, - $parentInstance: this - }; - }, "provide") -}; -var script$1 = { - name: "MenubarSub", - hostName: "Menubar", - "extends": script$e, - emits: ["item-mouseenter", "item-click", "item-mousemove"], - props: { - items: { - type: Array, - "default": null - }, - root: { - type: Boolean, - "default": false - }, - popup: { - type: Boolean, - "default": false - }, - mobileActive: { - type: Boolean, - "default": false - }, - templates: { - type: Object, - "default": null - }, - level: { - type: Number, - "default": 0 - }, - menuId: { - type: String, - "default": null - }, - focusedItemId: { - type: String, - "default": null - }, - activeItemPath: { - type: Object, - "default": null - } - }, - list: null, - methods: { - getItemId: /* @__PURE__ */ __name(function getItemId2(processedItem) { - return "".concat(this.menuId, "_").concat(processedItem.key); - }, "getItemId"), - getItemKey: /* @__PURE__ */ __name(function getItemKey2(processedItem) { - return this.getItemId(processedItem); - }, "getItemKey"), - getItemProp: /* @__PURE__ */ __name(function getItemProp3(processedItem, name, params) { - return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : void 0; - }, "getItemProp"), - getItemLabel: /* @__PURE__ */ __name(function getItemLabel3(processedItem) { - return this.getItemProp(processedItem, "label"); - }, "getItemLabel"), - getItemLabelId: /* @__PURE__ */ __name(function getItemLabelId2(processedItem) { - return "".concat(this.menuId, "_").concat(processedItem.key, "_label"); - }, "getItemLabelId"), - getPTOptions: /* @__PURE__ */ __name(function getPTOptions5(processedItem, index, key) { - return this.ptm(key, { - context: { - item: processedItem.item, - index, - active: this.isItemActive(processedItem), - focused: this.isItemFocused(processedItem), - disabled: this.isItemDisabled(processedItem), - level: this.level - } - }); - }, "getPTOptions"), - isItemActive: /* @__PURE__ */ __name(function isItemActive2(processedItem) { - return this.activeItemPath.some(function(path) { - return path.key === processedItem.key; - }); - }, "isItemActive"), - isItemVisible: /* @__PURE__ */ __name(function isItemVisible3(processedItem) { - return this.getItemProp(processedItem, "visible") !== false; - }, "isItemVisible"), - isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled3(processedItem) { - return this.getItemProp(processedItem, "disabled"); - }, "isItemDisabled"), - isItemFocused: /* @__PURE__ */ __name(function isItemFocused2(processedItem) { - return this.focusedItemId === this.getItemId(processedItem); - }, "isItemFocused"), - isItemGroup: /* @__PURE__ */ __name(function isItemGroup3(processedItem) { - return isNotEmpty(processedItem.items); - }, "isItemGroup"), - onItemClick: /* @__PURE__ */ __name(function onItemClick3(event, processedItem) { - this.getItemProp(processedItem, "command", { - originalEvent: event, - item: processedItem.item - }); - this.$emit("item-click", { - originalEvent: event, - processedItem, - isFocus: true - }); - }, "onItemClick"), - onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter3(event, processedItem) { - this.$emit("item-mouseenter", { - originalEvent: event, - processedItem - }); - }, "onItemMouseEnter"), - onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove3(event, processedItem) { - this.$emit("item-mousemove", { - originalEvent: event, - processedItem - }); - }, "onItemMouseMove"), - getAriaPosInset: /* @__PURE__ */ __name(function getAriaPosInset3(index) { - return index - this.calculateAriaSetSize.slice(0, index).length + 1; - }, "getAriaPosInset"), - getMenuItemProps: /* @__PURE__ */ __name(function getMenuItemProps2(processedItem, index) { - return { - action: mergeProps({ - "class": this.cx("itemLink"), - tabindex: -1, - "aria-hidden": true - }, this.getPTOptions(processedItem, index, "itemLink")), - icon: mergeProps({ - "class": [this.cx("itemIcon"), this.getItemProp(processedItem, "icon")] - }, this.getPTOptions(processedItem, index, "itemIcon")), - label: mergeProps({ - "class": this.cx("itemLabel") - }, this.getPTOptions(processedItem, index, "itemLabel")), - submenuicon: mergeProps({ - "class": this.cx("submenuIcon") - }, this.getPTOptions(processedItem, index, "submenuIcon")) - }; - }, "getMenuItemProps") - }, - computed: { - calculateAriaSetSize: /* @__PURE__ */ __name(function calculateAriaSetSize() { - var _this = this; - return this.items.filter(function(processedItem) { - return _this.isItemVisible(processedItem) && _this.getItemProp(processedItem, "separator"); - }); - }, "calculateAriaSetSize"), - getAriaSetSize: /* @__PURE__ */ __name(function getAriaSetSize2() { - var _this2 = this; - return this.items.filter(function(processedItem) { - return _this2.isItemVisible(processedItem) && !_this2.getItemProp(processedItem, "separator"); - }).length; - }, "getAriaSetSize") - }, - components: { - AngleRightIcon: script$z, - AngleDownIcon: script$C - }, - directives: { - ripple: Ripple - } -}; -var _hoisted_1$1$1 = ["id", "aria-label", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-level", "aria-setsize", "aria-posinset", "data-p-active", "data-p-focused", "data-p-disabled"]; -var _hoisted_2$2 = ["onClick", "onMouseenter", "onMousemove"]; -var _hoisted_3$2 = ["href", "target"]; -var _hoisted_4$1 = ["id"]; -var _hoisted_5 = ["id"]; -function render$1(_ctx, _cache, $props, $setup, $data, $options) { - var _component_MenubarSub = resolveComponent("MenubarSub", true); - var _directive_ripple = resolveDirective("ripple"); - return openBlock(), createElementBlock("ul", mergeProps({ - "class": $props.level === 0 ? _ctx.cx("rootList") : _ctx.cx("submenu") - }, $props.level === 0 ? _ctx.ptm("rootList") : _ctx.ptm("submenu")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.items, function(processedItem, index) { - return openBlock(), createElementBlock(Fragment, { - key: $options.getItemKey(processedItem) - }, [$options.isItemVisible(processedItem) && !$options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ - key: 0, - id: $options.getItemId(processedItem), - style: $options.getItemProp(processedItem, "style"), - "class": [_ctx.cx("item", { - processedItem - }), $options.getItemProp(processedItem, "class")], - role: "menuitem", - "aria-label": $options.getItemLabel(processedItem), - "aria-disabled": $options.isItemDisabled(processedItem) || void 0, - "aria-expanded": $options.isItemGroup(processedItem) ? $options.isItemActive(processedItem) : void 0, - "aria-haspopup": $options.isItemGroup(processedItem) && !$options.getItemProp(processedItem, "to") ? "menu" : void 0, - "aria-level": $props.level + 1, - "aria-setsize": $options.getAriaSetSize, - "aria-posinset": $options.getAriaPosInset(index), - ref_for: true - }, $options.getPTOptions(processedItem, index, "item"), { - "data-p-active": $options.isItemActive(processedItem), - "data-p-focused": $options.isItemFocused(processedItem), - "data-p-disabled": $options.isItemDisabled(processedItem) - }), [createBaseVNode("div", mergeProps({ - "class": _ctx.cx("itemContent"), - onClick: /* @__PURE__ */ __name(function onClick2($event) { - return $options.onItemClick($event, processedItem); - }, "onClick"), - onMouseenter: /* @__PURE__ */ __name(function onMouseenter($event) { - return $options.onItemMouseEnter($event, processedItem); - }, "onMouseenter"), - onMousemove: /* @__PURE__ */ __name(function onMousemove($event) { - return $options.onItemMouseMove($event, processedItem); - }, "onMousemove"), - ref_for: true - }, $options.getPTOptions(processedItem, index, "itemContent")), [!$props.templates.item ? withDirectives((openBlock(), createElementBlock("a", mergeProps({ - key: 0, - href: $options.getItemProp(processedItem, "url"), - "class": _ctx.cx("itemLink"), - target: $options.getItemProp(processedItem, "target"), - tabindex: "-1", - ref_for: true - }, $options.getPTOptions(processedItem, index, "itemLink")), [$props.templates.itemicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.itemicon), { - key: 0, - item: processedItem.item, - "class": normalizeClass(_ctx.cx("itemIcon")) - }, null, 8, ["item", "class"])) : $options.getItemProp(processedItem, "icon") ? (openBlock(), createElementBlock("span", mergeProps({ - key: 1, - "class": [_ctx.cx("itemIcon"), $options.getItemProp(processedItem, "icon")], - ref_for: true - }, $options.getPTOptions(processedItem, index, "itemIcon")), null, 16)) : createCommentVNode("", true), createBaseVNode("span", mergeProps({ - id: $options.getItemLabelId(processedItem), - "class": _ctx.cx("itemLabel"), - ref_for: true - }, $options.getPTOptions(processedItem, index, "itemLabel")), toDisplayString($options.getItemLabel(processedItem)), 17, _hoisted_4$1), $options.getItemProp(processedItem, "items") ? (openBlock(), createElementBlock(Fragment, { - key: 2 - }, [$props.templates.submenuicon ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.submenuicon), { - key: 0, - root: $props.root, - active: $options.isItemActive(processedItem), - "class": normalizeClass(_ctx.cx("submenuIcon")) - }, null, 8, ["root", "active", "class"])) : (openBlock(), createBlock(resolveDynamicComponent($props.root ? "AngleDownIcon" : "AngleRightIcon"), mergeProps({ - key: 1, - "class": _ctx.cx("submenuIcon"), - ref_for: true - }, $options.getPTOptions(processedItem, index, "submenuIcon")), null, 16, ["class"]))], 64)) : createCommentVNode("", true)], 16, _hoisted_3$2)), [[_directive_ripple]]) : (openBlock(), createBlock(resolveDynamicComponent($props.templates.item), { - key: 1, - item: processedItem.item, - root: $props.root, - hasSubmenu: $options.getItemProp(processedItem, "items"), - label: $options.getItemLabel(processedItem), - props: $options.getMenuItemProps(processedItem, index) - }, null, 8, ["item", "root", "hasSubmenu", "label", "props"]))], 16, _hoisted_2$2), $options.isItemVisible(processedItem) && $options.isItemGroup(processedItem) ? (openBlock(), createBlock(_component_MenubarSub, { - key: 0, - id: $options.getItemId(processedItem) + "_list", - menuId: $props.menuId, - role: "menu", - style: normalizeStyle(_ctx.sx("submenu", true, { - processedItem - })), - focusedItemId: $props.focusedItemId, - items: processedItem.items, - mobileActive: $props.mobileActive, - activeItemPath: $props.activeItemPath, - templates: $props.templates, - level: $props.level + 1, - "aria-labelledby": $options.getItemLabelId(processedItem), - pt: _ctx.pt, - unstyled: _ctx.unstyled, - onItemClick: _cache[0] || (_cache[0] = function($event) { - return _ctx.$emit("item-click", $event); - }), - onItemMouseenter: _cache[1] || (_cache[1] = function($event) { - return _ctx.$emit("item-mouseenter", $event); - }), - onItemMousemove: _cache[2] || (_cache[2] = function($event) { - return _ctx.$emit("item-mousemove", $event); - }) - }, null, 8, ["id", "menuId", "style", "focusedItemId", "items", "mobileActive", "activeItemPath", "templates", "level", "aria-labelledby", "pt", "unstyled"])) : createCommentVNode("", true)], 16, _hoisted_1$1$1)) : createCommentVNode("", true), $options.isItemVisible(processedItem) && $options.getItemProp(processedItem, "separator") ? (openBlock(), createElementBlock("li", mergeProps({ - key: 1, - id: $options.getItemId(processedItem), - "class": [_ctx.cx("separator"), $options.getItemProp(processedItem, "class")], - style: $options.getItemProp(processedItem, "style"), - role: "separator", - ref_for: true - }, _ctx.ptm("separator")), null, 16, _hoisted_5)) : createCommentVNode("", true)], 64); - }), 128))], 16); -} -__name(render$1, "render$1"); -script$1.render = render$1; -var script = { - name: "Menubar", - "extends": script$2, - inheritAttrs: false, - emits: ["focus", "blur"], - matchMediaListener: null, - data: /* @__PURE__ */ __name(function data8() { - return { - id: this.$attrs.id, - mobileActive: false, - focused: false, - focusedItemInfo: { - index: -1, - level: 0, - parentKey: "" - }, - activeItemPath: [], - dirty: false, - query: null, - queryMatches: false - }; - }, "data"), - watch: { - "$attrs.id": /* @__PURE__ */ __name(function $attrsId4(newValue) { - this.id = newValue || UniqueComponentId(); - }, "$attrsId"), - activeItemPath: /* @__PURE__ */ __name(function activeItemPath2(newPath) { - if (isNotEmpty(newPath)) { - this.bindOutsideClickListener(); - this.bindResizeListener(); - } else { - this.unbindOutsideClickListener(); - this.unbindResizeListener(); - } - }, "activeItemPath") - }, - outsideClickListener: null, - container: null, - menubar: null, - mounted: /* @__PURE__ */ __name(function mounted8() { - this.id = this.id || UniqueComponentId(); - this.bindMatchMediaListener(); - }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount7() { - this.mobileActive = false; - this.unbindOutsideClickListener(); - this.unbindResizeListener(); - this.unbindMatchMediaListener(); - if (this.container) { - ZIndex.clear(this.container); - } - this.container = null; - }, "beforeUnmount"), - methods: { - getItemProp: /* @__PURE__ */ __name(function getItemProp4(item3, name) { - return item3 ? resolve(item3[name]) : void 0; - }, "getItemProp"), - getItemLabel: /* @__PURE__ */ __name(function getItemLabel4(item3) { - return this.getItemProp(item3, "label"); - }, "getItemLabel"), - isItemDisabled: /* @__PURE__ */ __name(function isItemDisabled4(item3) { - return this.getItemProp(item3, "disabled"); - }, "isItemDisabled"), - isItemVisible: /* @__PURE__ */ __name(function isItemVisible4(item3) { - return this.getItemProp(item3, "visible") !== false; - }, "isItemVisible"), - isItemGroup: /* @__PURE__ */ __name(function isItemGroup4(item3) { - return isNotEmpty(this.getItemProp(item3, "items")); - }, "isItemGroup"), - isItemSeparator: /* @__PURE__ */ __name(function isItemSeparator2(item3) { - return this.getItemProp(item3, "separator"); - }, "isItemSeparator"), - getProccessedItemLabel: /* @__PURE__ */ __name(function getProccessedItemLabel2(processedItem) { - return processedItem ? this.getItemLabel(processedItem.item) : void 0; - }, "getProccessedItemLabel"), - isProccessedItemGroup: /* @__PURE__ */ __name(function isProccessedItemGroup2(processedItem) { - return processedItem && isNotEmpty(processedItem.items); - }, "isProccessedItemGroup"), - toggle: /* @__PURE__ */ __name(function toggle2(event) { - var _this = this; - if (this.mobileActive) { - this.mobileActive = false; - ZIndex.clear(this.menubar); - this.hide(); - } else { - this.mobileActive = true; - ZIndex.set("menu", this.menubar, this.$primevue.config.zIndex.menu); - setTimeout(function() { - _this.show(); - }, 1); - } - this.bindOutsideClickListener(); - event.preventDefault(); - }, "toggle"), - show: /* @__PURE__ */ __name(function show3() { - focus(this.menubar); - }, "show"), - hide: /* @__PURE__ */ __name(function hide3(event, isFocus) { - var _this2 = this; - if (this.mobileActive) { - this.mobileActive = false; - setTimeout(function() { - focus(_this2.$refs.menubutton); - }, 0); - } - this.activeItemPath = []; - this.focusedItemInfo = { - index: -1, - level: 0, - parentKey: "" - }; - isFocus && focus(this.menubar); - this.dirty = false; - }, "hide"), - onFocus: /* @__PURE__ */ __name(function onFocus4(event) { - this.focused = true; - this.focusedItemInfo = this.focusedItemInfo.index !== -1 ? this.focusedItemInfo : { - index: this.findFirstFocusedItemIndex(), - level: 0, - parentKey: "" - }; - this.$emit("focus", event); - }, "onFocus"), - onBlur: /* @__PURE__ */ __name(function onBlur3(event) { - this.focused = false; - this.focusedItemInfo = { - index: -1, - level: 0, - parentKey: "" - }; - this.searchValue = ""; - this.dirty = false; - this.$emit("blur", event); - }, "onBlur"), - onKeyDown: /* @__PURE__ */ __name(function onKeyDown3(event) { - var metaKey = event.metaKey || event.ctrlKey; - switch (event.code) { - case "ArrowDown": - this.onArrowDownKey(event); - break; - case "ArrowUp": - this.onArrowUpKey(event); - break; - case "ArrowLeft": - this.onArrowLeftKey(event); - break; - case "ArrowRight": - this.onArrowRightKey(event); - break; - case "Home": - this.onHomeKey(event); - break; - case "End": - this.onEndKey(event); - break; - case "Space": - this.onSpaceKey(event); - break; - case "Enter": - case "NumpadEnter": - this.onEnterKey(event); - break; - case "Escape": - this.onEscapeKey(event); - break; - case "Tab": - this.onTabKey(event); - break; - case "PageDown": - case "PageUp": - case "Backspace": - case "ShiftLeft": - case "ShiftRight": - break; - default: - if (!metaKey && isPrintableCharacter(event.key)) { - this.searchItems(event, event.key); - } - break; - } - }, "onKeyDown"), - onItemChange: /* @__PURE__ */ __name(function onItemChange2(event) { - var processedItem = event.processedItem, isFocus = event.isFocus; - if (isEmpty(processedItem)) return; - var index = processedItem.index, key = processedItem.key, level = processedItem.level, parentKey = processedItem.parentKey, items = processedItem.items; - var grouped = isNotEmpty(items); - var activeItemPath3 = this.activeItemPath.filter(function(p) { - return p.parentKey !== parentKey && p.parentKey !== key; - }); - grouped && activeItemPath3.push(processedItem); - this.focusedItemInfo = { - index, - level, - parentKey - }; - this.activeItemPath = activeItemPath3; - grouped && (this.dirty = true); - isFocus && focus(this.menubar); - }, "onItemChange"), - onItemClick: /* @__PURE__ */ __name(function onItemClick4(event) { - var originalEvent = event.originalEvent, processedItem = event.processedItem; - var grouped = this.isProccessedItemGroup(processedItem); - var root11 = isEmpty(processedItem.parent); - var selected = this.isSelected(processedItem); - if (selected) { - var index = processedItem.index, key = processedItem.key, level = processedItem.level, parentKey = processedItem.parentKey; - this.activeItemPath = this.activeItemPath.filter(function(p) { - return key !== p.key && key.startsWith(p.key); - }); - this.focusedItemInfo = { - index, - level, - parentKey - }; - this.dirty = !root11; - focus(this.menubar); - } else { - if (grouped) { - this.onItemChange(event); - } else { - var rootProcessedItem = root11 ? processedItem : this.activeItemPath.find(function(p) { - return p.parentKey === ""; - }); - this.hide(originalEvent); - this.changeFocusedItemIndex(originalEvent, rootProcessedItem ? rootProcessedItem.index : -1); - this.mobileActive = false; - focus(this.menubar); - } - } - }, "onItemClick"), - onItemMouseEnter: /* @__PURE__ */ __name(function onItemMouseEnter4(event) { - if (this.dirty) { - this.onItemChange(event); - } - }, "onItemMouseEnter"), - onItemMouseMove: /* @__PURE__ */ __name(function onItemMouseMove4(event) { - if (this.focused) { - this.changeFocusedItemIndex(event, event.processedItem.index); - } - }, "onItemMouseMove"), - menuButtonClick: /* @__PURE__ */ __name(function menuButtonClick(event) { - this.toggle(event); - }, "menuButtonClick"), - menuButtonKeydown: /* @__PURE__ */ __name(function menuButtonKeydown(event) { - (event.code === "Enter" || event.code === "NumpadEnter" || event.code === "Space") && this.menuButtonClick(event); - }, "menuButtonKeydown"), - onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey3(event) { - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var root11 = processedItem ? isEmpty(processedItem.parent) : null; - if (root11) { - var grouped = this.isProccessedItemGroup(processedItem); - if (grouped) { - this.onItemChange({ - originalEvent: event, - processedItem - }); - this.focusedItemInfo = { - index: -1, - parentKey: processedItem.key - }; - this.onArrowRightKey(event); - } - } else { - var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex(); - this.changeFocusedItemIndex(event, itemIndex); - } - event.preventDefault(); - }, "onArrowDownKey"), - onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey3(event) { - var _this3 = this; - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var root11 = isEmpty(processedItem.parent); - if (root11) { - var grouped = this.isProccessedItemGroup(processedItem); - if (grouped) { - this.onItemChange({ - originalEvent: event, - processedItem - }); - this.focusedItemInfo = { - index: -1, - parentKey: processedItem.key - }; - var itemIndex = this.findLastItemIndex(); - this.changeFocusedItemIndex(event, itemIndex); - } - } else { - var parentItem = this.activeItemPath.find(function(p) { - return p.key === processedItem.parentKey; - }); - if (this.focusedItemInfo.index === 0) { - this.focusedItemInfo = { - index: -1, - parentKey: parentItem ? parentItem.parentKey : "" - }; - this.searchValue = ""; - this.onArrowLeftKey(event); - this.activeItemPath = this.activeItemPath.filter(function(p) { - return p.parentKey !== _this3.focusedItemInfo.parentKey; - }); - } else { - var _itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex(); - this.changeFocusedItemIndex(event, _itemIndex); - } - } - event.preventDefault(); - }, "onArrowUpKey"), - onArrowLeftKey: /* @__PURE__ */ __name(function onArrowLeftKey4(event) { - var _this4 = this; - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var parentItem = processedItem ? this.activeItemPath.find(function(p) { - return p.key === processedItem.parentKey; - }) : null; - if (parentItem) { - this.onItemChange({ - originalEvent: event, - processedItem: parentItem - }); - this.activeItemPath = this.activeItemPath.filter(function(p) { - return p.parentKey !== _this4.focusedItemInfo.parentKey; - }); - event.preventDefault(); - } else { - var itemIndex = this.focusedItemInfo.index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo.index) : this.findLastFocusedItemIndex(); - this.changeFocusedItemIndex(event, itemIndex); - event.preventDefault(); - } - }, "onArrowLeftKey"), - onArrowRightKey: /* @__PURE__ */ __name(function onArrowRightKey4(event) { - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var parentItem = processedItem ? this.activeItemPath.find(function(p) { - return p.key === processedItem.parentKey; - }) : null; - if (parentItem) { - var grouped = this.isProccessedItemGroup(processedItem); - if (grouped) { - this.onItemChange({ - originalEvent: event, - processedItem - }); - this.focusedItemInfo = { - index: -1, - parentKey: processedItem.key - }; - this.onArrowDownKey(event); - } - } else { - var itemIndex = this.focusedItemInfo.index !== -1 ? this.findNextItemIndex(this.focusedItemInfo.index) : this.findFirstFocusedItemIndex(); - this.changeFocusedItemIndex(event, itemIndex); - event.preventDefault(); - } - }, "onArrowRightKey"), - onHomeKey: /* @__PURE__ */ __name(function onHomeKey4(event) { - this.changeFocusedItemIndex(event, this.findFirstItemIndex()); - event.preventDefault(); - }, "onHomeKey"), - onEndKey: /* @__PURE__ */ __name(function onEndKey4(event) { - this.changeFocusedItemIndex(event, this.findLastItemIndex()); - event.preventDefault(); - }, "onEndKey"), - onEnterKey: /* @__PURE__ */ __name(function onEnterKey4(event) { - if (this.focusedItemInfo.index !== -1) { - var element = findSingle(this.menubar, 'li[id="'.concat("".concat(this.focusedItemId), '"]')); - var anchorElement = element && findSingle(element, 'a[data-pc-section="itemlink"]'); - anchorElement ? anchorElement.click() : element && element.click(); - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var grouped = this.isProccessedItemGroup(processedItem); - !grouped && (this.focusedItemInfo.index = this.findFirstFocusedItemIndex()); - } - event.preventDefault(); - }, "onEnterKey"), - onSpaceKey: /* @__PURE__ */ __name(function onSpaceKey2(event) { - this.onEnterKey(event); - }, "onSpaceKey"), - onEscapeKey: /* @__PURE__ */ __name(function onEscapeKey3(event) { - if (this.focusedItemInfo.level !== 0) { - var _focusedItemInfo = this.focusedItemInfo; - this.hide(event, false); - this.focusedItemInfo = { - index: Number(_focusedItemInfo.parentKey.split("_")[0]), - level: 0, - parentKey: "" - }; - } - event.preventDefault(); - }, "onEscapeKey"), - onTabKey: /* @__PURE__ */ __name(function onTabKey3(event) { - if (this.focusedItemInfo.index !== -1) { - var processedItem = this.visibleItems[this.focusedItemInfo.index]; - var grouped = this.isProccessedItemGroup(processedItem); - !grouped && this.onItemChange({ - originalEvent: event, - processedItem - }); - } - this.hide(); - }, "onTabKey"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener3() { - var _this5 = this; - if (!this.outsideClickListener) { - this.outsideClickListener = function(event) { - var isOutsideContainer = _this5.container && !_this5.container.contains(event.target); - var isOutsideTarget = !(_this5.target && (_this5.target === event.target || _this5.target.contains(event.target))); - if (isOutsideContainer && isOutsideTarget) { - _this5.hide(); - } - }; - document.addEventListener("click", this.outsideClickListener); - } - }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener3() { - if (this.outsideClickListener) { - document.removeEventListener("click", this.outsideClickListener); - this.outsideClickListener = null; - } - }, "unbindOutsideClickListener"), - bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener3() { - var _this6 = this; - if (!this.resizeListener) { - this.resizeListener = function(event) { - if (!isTouchDevice()) { - _this6.hide(event, true); - } - _this6.mobileActive = false; - }; - window.addEventListener("resize", this.resizeListener); - } - }, "bindResizeListener"), - unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener3() { - if (this.resizeListener) { - window.removeEventListener("resize", this.resizeListener); - this.resizeListener = null; - } - }, "unbindResizeListener"), - bindMatchMediaListener: /* @__PURE__ */ __name(function bindMatchMediaListener() { - var _this7 = this; - if (!this.matchMediaListener) { - var query = matchMedia("(max-width: ".concat(this.breakpoint, ")")); - this.query = query; - this.queryMatches = query.matches; - this.matchMediaListener = function() { - _this7.queryMatches = query.matches; - _this7.mobileActive = false; - }; - this.query.addEventListener("change", this.matchMediaListener); - } - }, "bindMatchMediaListener"), - unbindMatchMediaListener: /* @__PURE__ */ __name(function unbindMatchMediaListener() { - if (this.matchMediaListener) { - this.query.removeEventListener("change", this.matchMediaListener); - this.matchMediaListener = null; - } - }, "unbindMatchMediaListener"), - isItemMatched: /* @__PURE__ */ __name(function isItemMatched2(processedItem) { - var _this$getProccessedIt; - return this.isValidItem(processedItem) && ((_this$getProccessedIt = this.getProccessedItemLabel(processedItem)) === null || _this$getProccessedIt === void 0 ? void 0 : _this$getProccessedIt.toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())); - }, "isItemMatched"), - isValidItem: /* @__PURE__ */ __name(function isValidItem2(processedItem) { - return !!processedItem && !this.isItemDisabled(processedItem.item) && !this.isItemSeparator(processedItem.item) && this.isItemVisible(processedItem.item); - }, "isValidItem"), - isValidSelectedItem: /* @__PURE__ */ __name(function isValidSelectedItem2(processedItem) { - return this.isValidItem(processedItem) && this.isSelected(processedItem); - }, "isValidSelectedItem"), - isSelected: /* @__PURE__ */ __name(function isSelected3(processedItem) { - return this.activeItemPath.some(function(p) { - return p.key === processedItem.key; - }); - }, "isSelected"), - findFirstItemIndex: /* @__PURE__ */ __name(function findFirstItemIndex2() { - var _this8 = this; - return this.visibleItems.findIndex(function(processedItem) { - return _this8.isValidItem(processedItem); - }); - }, "findFirstItemIndex"), - findLastItemIndex: /* @__PURE__ */ __name(function findLastItemIndex2() { - var _this9 = this; - return findLastIndex(this.visibleItems, function(processedItem) { - return _this9.isValidItem(processedItem); - }); - }, "findLastItemIndex"), - findNextItemIndex: /* @__PURE__ */ __name(function findNextItemIndex2(index) { - var _this10 = this; - var matchedItemIndex = index < this.visibleItems.length - 1 ? this.visibleItems.slice(index + 1).findIndex(function(processedItem) { - return _this10.isValidItem(processedItem); - }) : -1; - return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index; - }, "findNextItemIndex"), - findPrevItemIndex: /* @__PURE__ */ __name(function findPrevItemIndex2(index) { - var _this11 = this; - var matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), function(processedItem) { - return _this11.isValidItem(processedItem); - }) : -1; - return matchedItemIndex > -1 ? matchedItemIndex : index; - }, "findPrevItemIndex"), - findSelectedItemIndex: /* @__PURE__ */ __name(function findSelectedItemIndex2() { - var _this12 = this; - return this.visibleItems.findIndex(function(processedItem) { - return _this12.isValidSelectedItem(processedItem); - }); - }, "findSelectedItemIndex"), - findFirstFocusedItemIndex: /* @__PURE__ */ __name(function findFirstFocusedItemIndex2() { - var selectedIndex = this.findSelectedItemIndex(); - return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex; - }, "findFirstFocusedItemIndex"), - findLastFocusedItemIndex: /* @__PURE__ */ __name(function findLastFocusedItemIndex2() { - var selectedIndex = this.findSelectedItemIndex(); - return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex; - }, "findLastFocusedItemIndex"), - searchItems: /* @__PURE__ */ __name(function searchItems2(event, _char) { - var _this13 = this; - this.searchValue = (this.searchValue || "") + _char; - var itemIndex = -1; - var matched = false; - if (this.focusedItemInfo.index !== -1) { - itemIndex = this.visibleItems.slice(this.focusedItemInfo.index).findIndex(function(processedItem) { - return _this13.isItemMatched(processedItem); - }); - itemIndex = itemIndex === -1 ? this.visibleItems.slice(0, this.focusedItemInfo.index).findIndex(function(processedItem) { - return _this13.isItemMatched(processedItem); - }) : itemIndex + this.focusedItemInfo.index; - } else { - itemIndex = this.visibleItems.findIndex(function(processedItem) { - return _this13.isItemMatched(processedItem); - }); - } - if (itemIndex !== -1) { - matched = true; - } - if (itemIndex === -1 && this.focusedItemInfo.index === -1) { - itemIndex = this.findFirstFocusedItemIndex(); - } - if (itemIndex !== -1) { - this.changeFocusedItemIndex(event, itemIndex); - } - if (this.searchTimeout) { - clearTimeout(this.searchTimeout); - } - this.searchTimeout = setTimeout(function() { - _this13.searchValue = ""; - _this13.searchTimeout = null; - }, 500); - return matched; - }, "searchItems"), - changeFocusedItemIndex: /* @__PURE__ */ __name(function changeFocusedItemIndex2(event, index) { - if (this.focusedItemInfo.index !== index) { - this.focusedItemInfo.index = index; - this.scrollInView(); - } - }, "changeFocusedItemIndex"), - scrollInView: /* @__PURE__ */ __name(function scrollInView4() { - var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1; - var id2 = index !== -1 ? "".concat(this.id, "_").concat(index) : this.focusedItemId; - var element = findSingle(this.menubar, 'li[id="'.concat(id2, '"]')); - if (element) { - element.scrollIntoView && element.scrollIntoView({ - block: "nearest", - inline: "start" - }); - } - }, "scrollInView"), - createProcessedItems: /* @__PURE__ */ __name(function createProcessedItems2(items) { - var _this14 = this; - var level = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; - var parent = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var parentKey = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ""; - var processedItems3 = []; - items && items.forEach(function(item3, index) { - var key = (parentKey !== "" ? parentKey + "_" : "") + index; - var newItem = { - item: item3, - index, - level, - key, - parent, - parentKey - }; - newItem["items"] = _this14.createProcessedItems(item3.items, level + 1, newItem, key); - processedItems3.push(newItem); - }); - return processedItems3; - }, "createProcessedItems"), - containerRef: /* @__PURE__ */ __name(function containerRef3(el) { - this.container = el; - }, "containerRef"), - menubarRef: /* @__PURE__ */ __name(function menubarRef2(el) { - this.menubar = el ? el.$el : void 0; - }, "menubarRef") - }, - computed: { - processedItems: /* @__PURE__ */ __name(function processedItems2() { - return this.createProcessedItems(this.model || []); - }, "processedItems"), - visibleItems: /* @__PURE__ */ __name(function visibleItems2() { - var _this15 = this; - var processedItem = this.activeItemPath.find(function(p) { - return p.key === _this15.focusedItemInfo.parentKey; - }); - return processedItem ? processedItem.items : this.processedItems; - }, "visibleItems"), - focusedItemId: /* @__PURE__ */ __name(function focusedItemId2() { - return this.focusedItemInfo.index !== -1 ? "".concat(this.id).concat(isNotEmpty(this.focusedItemInfo.parentKey) ? "_" + this.focusedItemInfo.parentKey : "", "_").concat(this.focusedItemInfo.index) : null; - }, "focusedItemId") - }, - components: { - MenubarSub: script$1, - BarsIcon: script$D - } -}; -function _typeof(o) { - "@babel/helpers - typeof"; - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof(o); -} -__name(_typeof, "_typeof"); -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys, "ownKeys"); -function _objectSpread(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), true).forEach(function(r2) { - _defineProperty(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread, "_objectSpread"); -function _defineProperty(e, r, t) { - return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty, "_defineProperty"); -function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} -__name(_toPropertyKey, "_toPropertyKey"); -function _toPrimitive(t, r) { - if ("object" != _typeof(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive, "_toPrimitive"); -var _hoisted_1$2 = ["aria-haspopup", "aria-expanded", "aria-controls", "aria-label"]; -function render(_ctx, _cache, $props, $setup, $data, $options) { - var _component_BarsIcon = resolveComponent("BarsIcon"); - var _component_MenubarSub = resolveComponent("MenubarSub"); - return openBlock(), createElementBlock("div", mergeProps({ - ref: $options.containerRef, - "class": _ctx.cx("root") - }, _ctx.ptmi("root")), [_ctx.$slots.start ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - "class": _ctx.cx("start") - }, _ctx.ptm("start")), [renderSlot(_ctx.$slots, "start")], 16)) : createCommentVNode("", true), renderSlot(_ctx.$slots, _ctx.$slots.button ? "button" : "menubutton", { - id: $data.id, - "class": normalizeClass(_ctx.cx("button")), - toggleCallback: /* @__PURE__ */ __name(function toggleCallback(event) { - return $options.menuButtonClick(event); - }, "toggleCallback") - }, function() { - var _ctx$$primevue$config; - return [_ctx.model && _ctx.model.length > 0 ? (openBlock(), createElementBlock("a", mergeProps({ - key: 0, - ref: "menubutton", - role: "button", - tabindex: "0", - "class": _ctx.cx("button"), - "aria-haspopup": _ctx.model.length && _ctx.model.length > 0 ? true : false, - "aria-expanded": $data.mobileActive, - "aria-controls": $data.id, - "aria-label": (_ctx$$primevue$config = _ctx.$primevue.config.locale.aria) === null || _ctx$$primevue$config === void 0 ? void 0 : _ctx$$primevue$config.navigation, - onClick: _cache[0] || (_cache[0] = function($event) { - return $options.menuButtonClick($event); - }), - onKeydown: _cache[1] || (_cache[1] = function($event) { - return $options.menuButtonKeydown($event); - }) - }, _objectSpread(_objectSpread({}, _ctx.buttonProps), _ctx.ptm("button"))), [renderSlot(_ctx.$slots, _ctx.$slots.buttonicon ? "buttonicon" : "menubuttonicon", {}, function() { - return [createVNode(_component_BarsIcon, normalizeProps(guardReactiveProps(_ctx.ptm("buttonicon"))), null, 16)]; - })], 16, _hoisted_1$2)) : createCommentVNode("", true)]; - }), createVNode(_component_MenubarSub, { - ref: $options.menubarRef, - id: $data.id + "_list", - role: "menubar", - items: $options.processedItems, - templates: _ctx.$slots, - root: true, - mobileActive: $data.mobileActive, - tabindex: "0", - "aria-activedescendant": $data.focused ? $options.focusedItemId : void 0, - menuId: $data.id, - focusedItemId: $data.focused ? $options.focusedItemId : void 0, - activeItemPath: $data.activeItemPath, - level: 0, - "aria-labelledby": _ctx.ariaLabelledby, - "aria-label": _ctx.ariaLabel, - pt: _ctx.pt, - unstyled: _ctx.unstyled, - onFocus: $options.onFocus, - onBlur: $options.onBlur, - onKeydown: $options.onKeyDown, - onItemClick: $options.onItemClick, - onItemMouseenter: $options.onItemMouseEnter, - onItemMousemove: $options.onItemMouseMove - }, null, 8, ["id", "items", "templates", "mobileActive", "aria-activedescendant", "menuId", "focusedItemId", "activeItemPath", "aria-labelledby", "aria-label", "pt", "unstyled", "onFocus", "onBlur", "onKeydown", "onItemClick", "onItemMouseenter", "onItemMousemove"]), _ctx.$slots.end ? (openBlock(), createElementBlock("div", mergeProps({ - key: 1, - "class": _ctx.cx("end") - }, _ctx.ptm("end")), [renderSlot(_ctx.$slots, "end")], 16)) : createCommentVNode("", true)], 16); -} -__name(render, "render"); -script.render = render; -const _withScopeId$1 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-56df69d2"), n = n(), popScopeId(), n), "_withScopeId$1"); -const _hoisted_1$1 = ["href"]; -const _hoisted_2$1 = { class: "p-menubar-item-label" }; -const _hoisted_3$1 = { - key: 1, - class: "ml-auto border border-surface rounded text-muted text-xs text-nowrap p-1 keybinding-tag" -}; -const _sfc_main$2 = /* @__PURE__ */ defineComponent({ - __name: "CommandMenubar", - setup(__props) { - const settingStore = useSettingStore(); - const dropdownDirection = computed( - () => settingStore.get("Comfy.UseNewMenu") === "Top" ? "down" : "up" - ); - const menuItemsStore = useMenuItemStore(); - const { t } = useI18n(); - const translateMenuItem = /* @__PURE__ */ __name((item3) => { - const label = typeof item3.label === "function" ? item3.label() : item3.label; - const translatedLabel = label ? t(`menuLabels.${normalizeI18nKey(label)}`, label) : void 0; - return { - ...item3, - label: translatedLabel, - items: item3.items?.map(translateMenuItem) - }; - }, "translateMenuItem"); - const translatedItems = computed( - () => menuItemsStore.menuItems.map(translateMenuItem) - ); - return (_ctx, _cache) => { - return openBlock(), createBlock(unref(script), { - model: translatedItems.value, - class: "top-menubar border-none p-0 bg-transparent", - pt: { - rootList: "gap-0 flex-nowrap w-auto", - submenu: `dropdown-direction-${dropdownDirection.value}`, - item: "relative" - } - }, { - item: withCtx(({ item: item3, props }) => [ - createBaseVNode("a", mergeProps({ class: "p-menubar-item-link" }, props.action, { - href: item3.url, - target: "_blank" - }), [ - item3.icon ? (openBlock(), createElementBlock("span", { - key: 0, - class: normalizeClass(["p-menubar-item-icon", item3.icon]) - }, null, 2)) : createCommentVNode("", true), - createBaseVNode("span", _hoisted_2$1, toDisplayString(item3.label), 1), - item3?.comfyCommand?.keybinding ? (openBlock(), createElementBlock("span", _hoisted_3$1, toDisplayString(item3.comfyCommand.keybinding.combo.toString()), 1)) : createCommentVNode("", true) - ], 16, _hoisted_1$1) - ]), - _: 1 - }, 8, ["model", "pt"]); - }; - } -}); -const CommandMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-56df69d2"]]); -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-6e35440f"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("h1", { class: "comfyui-logo mx-2 app-drag" }, "ComfyUI", -1)); -const _hoisted_2 = { class: "flex-grow min-w-0 app-drag h-full" }; -const _hoisted_3 = { class: "window-actions-spacer flex-shrink-0" }; -const _hoisted_4 = { class: "fixed top-0 left-0 app-drag w-full h-[var(--comfy-topbar-height)]" }; -const _sfc_main$1 = /* @__PURE__ */ defineComponent({ - __name: "TopMenubar", - setup(__props) { - const workspaceState = useWorkspaceStore(); - const settingStore = useSettingStore(); - const workflowTabsPosition = computed( - () => settingStore.get("Comfy.Workflow.WorkflowTabsPosition") - ); - const menuSetting = computed(() => settingStore.get("Comfy.UseNewMenu")); - const betaMenuEnabled = computed(() => menuSetting.value !== "Disabled"); - const teleportTarget = computed( - () => settingStore.get("Comfy.UseNewMenu") === "Top" ? ".comfyui-body-top" : ".comfyui-body-bottom" - ); - const isNativeWindow = computed( - () => isElectron() && settingStore.get("Comfy-Desktop.WindowStyle") === "custom" - ); - const showTopMenu = computed( - () => betaMenuEnabled.value && !workspaceState.focusMode - ); - const menuRight = ref(null); - onMounted(() => { - if (menuRight.value) { - menuRight.value.appendChild(app.menu.element); - } - }); - const topMenuRef = ref(null); - provide("topMenuRef", topMenuRef); - const eventBus = useEventBus("topMenu"); - const isDropZone = ref(false); - const isDroppable = ref(false); - eventBus.on((event, payload) => { - if (event === "updateHighlight") { - isDropZone.value = payload.isDragging; - isDroppable.value = payload.isOverlapping && payload.isDragging; - } - }); - onMounted(() => { - if (isElectron()) { - electronAPI().changeTheme({ - height: topMenuRef.value.getBoundingClientRect().height - }); - } - }); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock(Fragment, null, [ - (openBlock(), createBlock(Teleport, { to: teleportTarget.value }, [ - withDirectives(createBaseVNode("div", { - ref_key: "topMenuRef", - ref: topMenuRef, - class: normalizeClass(["comfyui-menu flex items-center", { dropzone: isDropZone.value, "dropzone-active": isDroppable.value }]) - }, [ - _hoisted_1, - createVNode(CommandMenubar), - createBaseVNode("div", _hoisted_2, [ - workflowTabsPosition.value === "Topbar" ? (openBlock(), createBlock(WorkflowTabs, { key: 0 })) : createCommentVNode("", true) - ]), - createBaseVNode("div", { - class: "comfyui-menu-right", - ref_key: "menuRight", - ref: menuRight - }, null, 512), - createVNode(Actionbar), - createVNode(_sfc_main$3, { class: "flex-shrink-0" }), - withDirectives(createVNode(unref(script$d), { - class: "flex-shrink-0", - icon: "pi pi-bars", - severity: "secondary", - text: "", - "aria-label": _ctx.$t("menu.hideMenu"), - onClick: _cache[0] || (_cache[0] = ($event) => unref(workspaceState).focusMode = true), - onContextmenu: unref(showNativeMenu) - }, null, 8, ["aria-label", "onContextmenu"]), [ - [_directive_tooltip, { value: _ctx.$t("menu.hideMenu"), showDelay: 300 }] - ]), - withDirectives(createBaseVNode("div", _hoisted_3, null, 512), [ - [vShow, menuSetting.value !== "Bottom"] - ]) - ], 2), [ - [vShow, showTopMenu.value] - ]) - ], 8, ["to"])), - withDirectives(createBaseVNode("div", _hoisted_4, null, 512), [ - [vShow, isNativeWindow.value && !showTopMenu.value] - ]) - ], 64); - }; - } -}); -const TopMenubar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6e35440f"]]); -var LatentPreviewMethod = /* @__PURE__ */ ((LatentPreviewMethod2) => { - LatentPreviewMethod2["NoPreviews"] = "none"; - LatentPreviewMethod2["Auto"] = "auto"; - LatentPreviewMethod2["Latent2RGB"] = "latent2rgb"; - LatentPreviewMethod2["TAESD"] = "taesd"; - return LatentPreviewMethod2; -})(LatentPreviewMethod || {}); -var LogLevel = /* @__PURE__ */ ((LogLevel2) => { - LogLevel2["DEBUG"] = "DEBUG"; - LogLevel2["INFO"] = "INFO"; - LogLevel2["WARNING"] = "WARNING"; - LogLevel2["ERROR"] = "ERROR"; - LogLevel2["CRITICAL"] = "CRITICAL"; - return LogLevel2; -})(LogLevel || {}); -var HashFunction = /* @__PURE__ */ ((HashFunction2) => { - HashFunction2["MD5"] = "md5"; - HashFunction2["SHA1"] = "sha1"; - HashFunction2["SHA256"] = "sha256"; - HashFunction2["SHA512"] = "sha512"; - return HashFunction2; -})(HashFunction || {}); -var AutoLaunch = /* @__PURE__ */ ((AutoLaunch2) => { - AutoLaunch2["Auto"] = "auto"; - AutoLaunch2["Disable"] = "disable"; - AutoLaunch2["Enable"] = "enable"; - return AutoLaunch2; -})(AutoLaunch || {}); -var CudaMalloc = /* @__PURE__ */ ((CudaMalloc2) => { - CudaMalloc2["Auto"] = "auto"; - CudaMalloc2["Disable"] = "disable"; - CudaMalloc2["Enable"] = "enable"; - return CudaMalloc2; -})(CudaMalloc || {}); -var FloatingPointPrecision = /* @__PURE__ */ ((FloatingPointPrecision2) => { - FloatingPointPrecision2["AUTO"] = "auto"; - FloatingPointPrecision2["FP64"] = "fp64"; - FloatingPointPrecision2["FP32"] = "fp32"; - FloatingPointPrecision2["FP16"] = "fp16"; - FloatingPointPrecision2["BF16"] = "bf16"; - FloatingPointPrecision2["FP8E4M3FN"] = "fp8_e4m3fn"; - FloatingPointPrecision2["FP8E5M2"] = "fp8_e5m2"; - return FloatingPointPrecision2; -})(FloatingPointPrecision || {}); -var CrossAttentionMethod = /* @__PURE__ */ ((CrossAttentionMethod2) => { - CrossAttentionMethod2["Auto"] = "auto"; - CrossAttentionMethod2["Split"] = "split"; - CrossAttentionMethod2["Quad"] = "quad"; - CrossAttentionMethod2["Pytorch"] = "pytorch"; - return CrossAttentionMethod2; -})(CrossAttentionMethod || {}); -var VramManagement = /* @__PURE__ */ ((VramManagement2) => { - VramManagement2["Auto"] = "auto"; - VramManagement2["GPUOnly"] = "gpu-only"; - VramManagement2["HighVram"] = "highvram"; - VramManagement2["NormalVram"] = "normalvram"; - VramManagement2["LowVram"] = "lowvram"; - VramManagement2["NoVram"] = "novram"; - VramManagement2["CPU"] = "cpu"; - return VramManagement2; -})(VramManagement || {}); -const WEB_ONLY_CONFIG_ITEMS = [ - // Launch behavior - { - id: "auto-launch", - name: "Automatically opens in the browser on startup", - category: ["Launch"], - type: "combo", - options: Object.values(AutoLaunch), - defaultValue: AutoLaunch.Auto, - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case AutoLaunch.Auto: - return {}; - case AutoLaunch.Enable: - return { - ["auto-launch"]: true - }; - case AutoLaunch.Disable: - return { - ["disable-auto-launch"]: true - }; - } - }, "getValue") - } -]; -const SERVER_CONFIG_ITEMS = [ - // Network settings - { - id: "listen", - name: "Host: The IP address to listen on", - category: ["Network"], - type: "text", - defaultValue: "127.0.0.1" - }, - { - id: "port", - name: "Port: The port to listen on", - category: ["Network"], - type: "number", - // The default launch port for desktop app is 8000 instead of 8188. - defaultValue: 8e3 - }, - { - id: "tls-keyfile", - name: "TLS Key File: Path to TLS key file for HTTPS", - category: ["Network"], - type: "text", - defaultValue: "" - }, - { - id: "tls-certfile", - name: "TLS Certificate File: Path to TLS certificate file for HTTPS", - category: ["Network"], - type: "text", - defaultValue: "" - }, - { - id: "enable-cors-header", - name: 'Enable CORS header: Use "*" for all origins or specify domain', - category: ["Network"], - type: "text", - defaultValue: "" - }, - { - id: "max-upload-size", - name: "Maximum upload size (MB)", - category: ["Network"], - type: "number", - defaultValue: 100 - }, - // CUDA settings - { - id: "cuda-device", - name: "CUDA device index to use", - category: ["CUDA"], - type: "number", - defaultValue: null - }, - { - id: "cuda-malloc", - name: "Use CUDA malloc for memory allocation", - category: ["CUDA"], - type: "combo", - options: Object.values(CudaMalloc), - defaultValue: CudaMalloc.Auto, - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case CudaMalloc.Auto: - return {}; - case CudaMalloc.Enable: - return { - ["cuda-malloc"]: true - }; - case CudaMalloc.Disable: - return { - ["disable-cuda-malloc"]: true - }; - } - }, "getValue") - }, - // Precision settings - { - id: "global-precision", - name: "Global floating point precision", - category: ["Inference"], - type: "combo", - options: [ - FloatingPointPrecision.AUTO, - FloatingPointPrecision.FP32, - FloatingPointPrecision.FP16 - ], - defaultValue: FloatingPointPrecision.AUTO, - tooltip: "Global floating point precision", - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case FloatingPointPrecision.AUTO: - return {}; - case FloatingPointPrecision.FP32: - return { - ["force-fp32"]: true - }; - case FloatingPointPrecision.FP16: - return { - ["force-fp16"]: true - }; - default: - return {}; - } - }, "getValue") - }, - // UNET precision - { - id: "unet-precision", - name: "UNET precision", - category: ["Inference"], - type: "combo", - options: [ - FloatingPointPrecision.AUTO, - FloatingPointPrecision.FP64, - FloatingPointPrecision.FP32, - FloatingPointPrecision.FP16, - FloatingPointPrecision.BF16, - FloatingPointPrecision.FP8E4M3FN, - FloatingPointPrecision.FP8E5M2 - ], - defaultValue: FloatingPointPrecision.AUTO, - tooltip: "UNET precision", - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case FloatingPointPrecision.AUTO: - return {}; - default: - return { - [`${value.toLowerCase()}-unet`]: true - }; - } - }, "getValue") - }, - // VAE settings - { - id: "vae-precision", - name: "VAE precision", - category: ["Inference"], - type: "combo", - options: [ - FloatingPointPrecision.AUTO, - FloatingPointPrecision.FP16, - FloatingPointPrecision.FP32, - FloatingPointPrecision.BF16 - ], - defaultValue: FloatingPointPrecision.AUTO, - tooltip: "VAE precision", - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case FloatingPointPrecision.AUTO: - return {}; - default: - return { - [`${value.toLowerCase()}-vae`]: true - }; - } - }, "getValue") - }, - { - id: "cpu-vae", - name: "Run VAE on CPU", - category: ["Inference"], - type: "boolean", - defaultValue: false - }, - // Text Encoder settings - { - id: "text-encoder-precision", - name: "Text Encoder precision", - category: ["Inference"], - type: "combo", - options: [ - FloatingPointPrecision.AUTO, - FloatingPointPrecision.FP8E4M3FN, - FloatingPointPrecision.FP8E5M2, - FloatingPointPrecision.FP16, - FloatingPointPrecision.FP32 - ], - defaultValue: FloatingPointPrecision.AUTO, - tooltip: "Text Encoder precision", - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case FloatingPointPrecision.AUTO: - return {}; - default: - return { - [`${value.toLowerCase()}-text-enc`]: true - }; - } - }, "getValue") - }, - // Memory and performance settings - { - id: "force-channels-last", - name: "Force channels-last memory format", - category: ["Memory"], - type: "boolean", - defaultValue: false - }, - { - id: "directml", - name: "DirectML device index", - category: ["Memory"], - type: "number", - defaultValue: null - }, - { - id: "disable-ipex-optimize", - name: "Disable IPEX optimization", - category: ["Memory"], - type: "boolean", - defaultValue: false - }, - // Preview settings - { - id: "preview-method", - name: "Method used for latent previews", - category: ["Preview"], - type: "combo", - options: Object.values(LatentPreviewMethod), - defaultValue: LatentPreviewMethod.NoPreviews - }, - { - id: "preview-size", - name: "Size of preview images", - category: ["Preview"], - type: "slider", - defaultValue: 512, - attrs: { - min: 128, - max: 2048, - step: 128 - } - }, - // Cache settings - { - id: "cache-classic", - name: "Use classic cache system", - category: ["Cache"], - type: "boolean", - defaultValue: false - }, - { - id: "cache-lru", - name: "Use LRU caching with a maximum of N node results cached.", - category: ["Cache"], - type: "number", - defaultValue: null, - tooltip: "May use more RAM/VRAM." - }, - // Attention settings - { - id: "cross-attention-method", - name: "Cross attention method", - category: ["Attention"], - type: "combo", - options: Object.values(CrossAttentionMethod), - defaultValue: CrossAttentionMethod.Auto, - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case CrossAttentionMethod.Auto: - return {}; - default: - return { - [`use-${value.toLowerCase()}-cross-attention`]: true - }; - } - }, "getValue") - }, - { - id: "disable-xformers", - name: "Disable xFormers optimization", - type: "boolean", - defaultValue: false - }, - { - id: "force-upcast-attention", - name: "Force attention upcast", - category: ["Attention"], - type: "boolean", - defaultValue: false - }, - { - id: "dont-upcast-attention", - name: "Prevent attention upcast", - category: ["Attention"], - type: "boolean", - defaultValue: false - }, - // VRAM management - { - id: "vram-management", - name: "VRAM management mode", - category: ["Memory"], - type: "combo", - options: Object.values(VramManagement), - defaultValue: VramManagement.Auto, - getValue: /* @__PURE__ */ __name((value) => { - switch (value) { - case VramManagement.Auto: - return {}; - default: - return { - [value]: true - }; - } - }, "getValue") - }, - { - id: "reserve-vram", - name: "Reserved VRAM (GB)", - category: ["Memory"], - type: "number", - defaultValue: null, - tooltip: "Set the amount of vram in GB you want to reserve for use by your OS/other software. By default some amount is reverved depending on your OS." - }, - // Misc settings - { - id: "default-hashing-function", - name: "Default hashing function for model files", - type: "combo", - options: Object.values(HashFunction), - defaultValue: HashFunction.SHA256 - }, - { - id: "disable-smart-memory", - name: "Disable smart memory management", - tooltip: "Force ComfyUI to aggressively offload to regular ram instead of keeping models in vram when it can.", - category: ["Memory"], - type: "boolean", - defaultValue: false - }, - { - id: "deterministic", - name: "Make pytorch use slower deterministic algorithms when it can.", - type: "boolean", - defaultValue: false, - tooltip: "Note that this might not make images deterministic in all cases." - }, - { - id: "fast", - name: "Enable some untested and potentially quality deteriorating optimizations.", - type: "boolean", - defaultValue: false - }, - { - id: "dont-print-server", - name: "Don't print server output to console.", - type: "boolean", - defaultValue: false - }, - { - id: "disable-metadata", - name: "Disable saving prompt metadata in files.", - type: "boolean", - defaultValue: false - }, - { - id: "disable-all-custom-nodes", - name: "Disable loading all custom nodes.", - type: "boolean", - defaultValue: false - }, - { - id: "log-level", - name: "Logging verbosity level", - type: "combo", - options: Object.values(LogLevel), - defaultValue: LogLevel.INFO, - getValue: /* @__PURE__ */ __name((value) => { - return { - verbose: value - }; - }, "getValue") - }, - // Directories - { - id: "input-directory", - name: "Input directory", - category: ["Directories"], - type: "text", - defaultValue: "" - }, - { - id: "output-directory", - name: "Output directory", - category: ["Directories"], - type: "text", - defaultValue: "" - } -]; -function useCoreCommands() { - const workflowService = useWorkflowService(); - const workflowStore = useWorkflowStore(); - const dialogService = useDialogService(); - const colorPaletteStore = useColorPaletteStore(); - const getTracker = /* @__PURE__ */ __name(() => workflowStore.activeWorkflow?.changeTracker, "getTracker"); - const getSelectedNodes = /* @__PURE__ */ __name(() => { - const selectedNodes = app.canvas.selected_nodes; - const result = []; - if (selectedNodes) { - for (const i in selectedNodes) { - const node = selectedNodes[i]; - result.push(node); - } - } - return result; - }, "getSelectedNodes"); - const toggleSelectedNodesMode = /* @__PURE__ */ __name((mode) => { - getSelectedNodes().forEach((node) => { - if (node.mode === mode) { - node.mode = LGraphEventMode.ALWAYS; - } else { - node.mode = mode; - } - }); - }, "toggleSelectedNodesMode"); - return [ - { - id: "Comfy.NewBlankWorkflow", - icon: "pi pi-plus", - label: "New Blank Workflow", - menubarLabel: "New", - function: /* @__PURE__ */ __name(() => workflowService.loadBlankWorkflow(), "function") - }, - { - id: "Comfy.OpenWorkflow", - icon: "pi pi-folder-open", - label: "Open Workflow", - menubarLabel: "Open", - function: /* @__PURE__ */ __name(() => { - app.ui.loadFile(); - }, "function") - }, - { - id: "Comfy.LoadDefaultWorkflow", - icon: "pi pi-code", - label: "Load Default Workflow", - function: /* @__PURE__ */ __name(() => workflowService.loadDefaultWorkflow(), "function") - }, - { - id: "Comfy.SaveWorkflow", - icon: "pi pi-save", - label: "Save Workflow", - menubarLabel: "Save", - function: /* @__PURE__ */ __name(async () => { - const workflow = useWorkflowStore().activeWorkflow; - if (!workflow) return; - await workflowService.saveWorkflow(workflow); - }, "function") - }, - { - id: "Comfy.SaveWorkflowAs", - icon: "pi pi-save", - label: "Save Workflow As", - menubarLabel: "Save As", - function: /* @__PURE__ */ __name(async () => { - const workflow = useWorkflowStore().activeWorkflow; - if (!workflow) return; - await workflowService.saveWorkflowAs(workflow); - }, "function") - }, - { - id: "Comfy.ExportWorkflow", - icon: "pi pi-download", - label: "Export Workflow", - menubarLabel: "Export", - function: /* @__PURE__ */ __name(() => { - workflowService.exportWorkflow("workflow", "workflow"); - }, "function") - }, - { - id: "Comfy.ExportWorkflowAPI", - icon: "pi pi-download", - label: "Export Workflow (API Format)", - menubarLabel: "Export (API)", - function: /* @__PURE__ */ __name(() => { - workflowService.exportWorkflow("workflow_api", "output"); - }, "function") - }, - { - id: "Comfy.Undo", - icon: "pi pi-undo", - label: "Undo", - function: /* @__PURE__ */ __name(async () => { - await getTracker()?.undo?.(); - }, "function") - }, - { - id: "Comfy.Redo", - icon: "pi pi-refresh", - label: "Redo", - function: /* @__PURE__ */ __name(async () => { - await getTracker()?.redo?.(); - }, "function") - }, - { - id: "Comfy.ClearWorkflow", - icon: "pi pi-trash", - label: "Clear Workflow", - function: /* @__PURE__ */ __name(() => { - const settingStore = useSettingStore(); - if (!settingStore.get("Comfy.ComfirmClear") || confirm("Clear workflow?")) { - app.clean(); - app.graph.clear(); - api.dispatchCustomEvent("graphCleared"); - } - }, "function") - }, - { - id: "Comfy.Canvas.ResetView", - icon: "pi pi-expand", - label: "Reset View", - function: /* @__PURE__ */ __name(() => { - app.resetView(); - }, "function") - }, - { - id: "Comfy.OpenClipspace", - icon: "pi pi-clipboard", - label: "Clipspace", - function: /* @__PURE__ */ __name(() => { - app.openClipspace(); - }, "function") - }, - { - id: "Comfy.RefreshNodeDefinitions", - icon: "pi pi-refresh", - label: "Refresh Node Definitions", - function: /* @__PURE__ */ __name(async () => { - await app.refreshComboInNodes(); - }, "function") - }, - { - id: "Comfy.Interrupt", - icon: "pi pi-stop", - label: "Interrupt", - function: /* @__PURE__ */ __name(async () => { - await api.interrupt(); - useToastStore().add({ - severity: "info", - summary: "Interrupted", - detail: "Execution has been interrupted", - life: 1e3 - }); - }, "function") - }, - { - id: "Comfy.ClearPendingTasks", - icon: "pi pi-stop", - label: "Clear Pending Tasks", - function: /* @__PURE__ */ __name(async () => { - await useQueueStore().clear(["queue"]); - useToastStore().add({ - severity: "info", - summary: "Confirmed", - detail: "Pending tasks deleted", - life: 3e3 - }); - }, "function") - }, - { - id: "Comfy.BrowseTemplates", - icon: "pi pi-folder-open", - label: "Browse Templates", - function: /* @__PURE__ */ __name(() => { - dialogService.showTemplateWorkflowsDialog(); - }, "function") - }, - { - id: "Comfy.Canvas.ZoomIn", - icon: "pi pi-plus", - label: "Zoom In", - function: /* @__PURE__ */ __name(() => { - const ds = app.canvas.ds; - ds.changeScale( - ds.scale * 1.1, - ds.element ? [ds.element.width / 2, ds.element.height / 2] : void 0 - ); - app.canvas.setDirty(true, true); - }, "function") - }, - { - id: "Comfy.Canvas.ZoomOut", - icon: "pi pi-minus", - label: "Zoom Out", - function: /* @__PURE__ */ __name(() => { - const ds = app.canvas.ds; - ds.changeScale( - ds.scale / 1.1, - ds.element ? [ds.element.width / 2, ds.element.height / 2] : void 0 - ); - app.canvas.setDirty(true, true); - }, "function") - }, - { - id: "Comfy.Canvas.FitView", - icon: "pi pi-expand", - label: "Fit view to selected nodes", - function: /* @__PURE__ */ __name(() => { - if (app.canvas.empty) { - useToastStore().add({ - severity: "error", - summary: "Empty canvas", - life: 3e3 - }); - return; - } - app.canvas.fitViewToSelectionAnimated(); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleLock", - icon: "pi pi-lock", - label: "Canvas Toggle Lock", - function: /* @__PURE__ */ __name(() => { - app.canvas["read_only"] = !app.canvas["read_only"]; - }, "function") - }, - { - id: "Comfy.Canvas.ToggleLinkVisibility", - icon: "pi pi-eye", - label: "Canvas Toggle Link Visibility", - versionAdded: "1.3.6", - function: (() => { - const settingStore = useSettingStore(); - let lastLinksRenderMode = LiteGraph.SPLINE_LINK; - return () => { - const currentMode = settingStore.get("Comfy.LinkRenderMode"); - if (currentMode === LiteGraph.HIDDEN_LINK) { - settingStore.set("Comfy.LinkRenderMode", lastLinksRenderMode); - } else { - lastLinksRenderMode = currentMode; - settingStore.set("Comfy.LinkRenderMode", LiteGraph.HIDDEN_LINK); - } - }; - })() - }, - { - id: "Comfy.QueuePrompt", - icon: "pi pi-play", - label: "Queue Prompt", - versionAdded: "1.3.7", - function: /* @__PURE__ */ __name(() => { - const batchCount = useQueueSettingsStore().batchCount; - app.queuePrompt(0, batchCount); - }, "function") - }, - { - id: "Comfy.QueuePromptFront", - icon: "pi pi-play", - label: "Queue Prompt (Front)", - versionAdded: "1.3.7", - function: /* @__PURE__ */ __name(() => { - const batchCount = useQueueSettingsStore().batchCount; - app.queuePrompt(-1, batchCount); - }, "function") - }, - { - id: "Comfy.ShowSettingsDialog", - icon: "pi pi-cog", - label: "Show Settings Dialog", - versionAdded: "1.3.7", - function: /* @__PURE__ */ __name(() => { - dialogService.showSettingsDialog(); - }, "function") - }, - { - id: "Comfy.Graph.GroupSelectedNodes", - icon: "pi pi-sitemap", - label: "Group Selected Nodes", - versionAdded: "1.3.7", - function: /* @__PURE__ */ __name(() => { - const { canvas } = app; - if (!canvas.selectedItems?.size) { - useToastStore().add({ - severity: "error", - summary: "Nothing to group", - detail: "Please select the nodes (or other groups) to create a group for", - life: 3e3 - }); - return; - } - const group = new LGraphGroup(); - const padding = useSettingStore().get( - "Comfy.GroupSelectedNodes.Padding" - ); - group.resizeTo(canvas.selectedItems, padding); - canvas.graph.add(group); - useTitleEditorStore().titleEditorTarget = group; - }, "function") - }, - { - id: "Workspace.NextOpenedWorkflow", - icon: "pi pi-step-forward", - label: "Next Opened Workflow", - versionAdded: "1.3.9", - function: /* @__PURE__ */ __name(() => { - workflowService.loadNextOpenedWorkflow(); - }, "function") - }, - { - id: "Workspace.PreviousOpenedWorkflow", - icon: "pi pi-step-backward", - label: "Previous Opened Workflow", - versionAdded: "1.3.9", - function: /* @__PURE__ */ __name(() => { - workflowService.loadPreviousOpenedWorkflow(); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelectedNodes.Mute", - icon: "pi pi-volume-off", - label: "Mute/Unmute Selected Nodes", - versionAdded: "1.3.11", - function: /* @__PURE__ */ __name(() => { - toggleSelectedNodesMode(LGraphEventMode.NEVER); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelectedNodes.Bypass", - icon: "pi pi-shield", - label: "Bypass/Unbypass Selected Nodes", - versionAdded: "1.3.11", - function: /* @__PURE__ */ __name(() => { - toggleSelectedNodesMode(LGraphEventMode.BYPASS); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelectedNodes.Pin", - icon: "pi pi-pin", - label: "Pin/Unpin Selected Nodes", - versionAdded: "1.3.11", - function: /* @__PURE__ */ __name(() => { - getSelectedNodes().forEach((node) => { - node.pin(!node.pinned); - }); - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelected.Pin", - icon: "pi pi-pin", - label: "Pin/Unpin Selected Items", - versionAdded: "1.3.33", - function: /* @__PURE__ */ __name(() => { - for (const item3 of app.canvas.selectedItems) { - if (item3 instanceof LGraphNode || item3 instanceof LGraphGroup) { - item3.pin(!item3.pinned); - } - } - }, "function") - }, - { - id: "Comfy.Canvas.ToggleSelectedNodes.Collapse", - icon: "pi pi-minus", - label: "Collapse/Expand Selected Nodes", - versionAdded: "1.3.11", - function: /* @__PURE__ */ __name(() => { - getSelectedNodes().forEach((node) => { - node.collapse(); - }); - }, "function") - }, - { - id: "Comfy.ToggleTheme", - icon: "pi pi-moon", - label: "Toggle Theme (Dark/Light)", - versionAdded: "1.3.12", - function: (() => { - let previousDarkTheme = DEFAULT_DARK_COLOR_PALETTE.id; - let previousLightTheme = DEFAULT_LIGHT_COLOR_PALETTE.id; - return () => { - const settingStore = useSettingStore(); - const theme10 = colorPaletteStore.completedActivePalette; - if (theme10.light_theme) { - previousLightTheme = theme10.id; - settingStore.set("Comfy.ColorPalette", previousDarkTheme); - } else { - previousDarkTheme = theme10.id; - settingStore.set("Comfy.ColorPalette", previousLightTheme); - } - }; - })() - }, - { - id: "Workspace.ToggleBottomPanel", - icon: "pi pi-list", - label: "Toggle Bottom Panel", - versionAdded: "1.3.22", - function: /* @__PURE__ */ __name(() => { - useBottomPanelStore().toggleBottomPanel(); - }, "function") - }, - { - id: "Workspace.ToggleFocusMode", - icon: "pi pi-eye", - label: "Toggle Focus Mode", - versionAdded: "1.3.27", - function: /* @__PURE__ */ __name(() => { - useWorkspaceStore().toggleFocusMode(); - }, "function") - }, - { - id: "Comfy.Graph.FitGroupToContents", - icon: "pi pi-expand", - label: "Fit Group To Contents", - versionAdded: "1.4.9", - function: /* @__PURE__ */ __name(() => { - for (const group of app.canvas.selectedItems) { - if (group instanceof LGraphGroup) { - group.recomputeInsideNodes(); - const padding = useSettingStore().get( - "Comfy.GroupSelectedNodes.Padding" - ); - group.resizeTo(group.children, padding); - app.graph.change(); - } - } - }, "function") - }, - { - id: "Comfy.Help.OpenComfyUIIssues", - icon: "pi pi-github", - label: "Open ComfyUI Issues", - menubarLabel: "ComfyUI Issues", - versionAdded: "1.5.5", - function: /* @__PURE__ */ __name(() => { - window.open( - "https://github.com/comfyanonymous/ComfyUI/issues", - "_blank" - ); - }, "function") - }, - { - id: "Comfy.Help.OpenComfyUIDocs", - icon: "pi pi-info-circle", - label: "Open ComfyUI Docs", - menubarLabel: "ComfyUI Docs", - versionAdded: "1.5.5", - function: /* @__PURE__ */ __name(() => { - window.open("https://docs.comfy.org/", "_blank"); - }, "function") - }, - { - id: "Comfy.Help.OpenComfyOrgDiscord", - icon: "pi pi-discord", - label: "Open Comfy-Org Discord", - menubarLabel: "Comfy-Org Discord", - versionAdded: "1.5.5", - function: /* @__PURE__ */ __name(() => { - window.open("https://www.comfy.org/discord", "_blank"); - }, "function") - }, - { - id: "Workspace.SearchBox.Toggle", - icon: "pi pi-search", - label: "Toggle Search Box", - versionAdded: "1.5.7", - function: /* @__PURE__ */ __name(() => { - useSearchBoxStore().toggleVisible(); - }, "function") - }, - { - id: "Comfy.Help.AboutComfyUI", - icon: "pi pi-info-circle", - label: "Open About ComfyUI", - menubarLabel: "About ComfyUI", - versionAdded: "1.6.4", - function: /* @__PURE__ */ __name(() => { - dialogService.showSettingsDialog("about"); - }, "function") - }, - { - id: "Comfy.DuplicateWorkflow", - icon: "pi pi-clone", - label: "Duplicate Current Workflow", - versionAdded: "1.6.15", - function: /* @__PURE__ */ __name(() => { - workflowService.duplicateWorkflow(workflowStore.activeWorkflow); - }, "function") - }, - { - id: "Workspace.CloseWorkflow", - icon: "pi pi-times", - label: "Close Current Workflow", - versionAdded: "1.7.3", - function: /* @__PURE__ */ __name(() => { - if (workflowStore.activeWorkflow) - workflowService.closeWorkflow(workflowStore.activeWorkflow); - }, "function") - } - ]; -} -__name(useCoreCommands, "useCoreCommands"); -function setupAutoQueueHandler() { - const queueCountStore = useQueuePendingTaskCountStore(); - const queueSettingsStore = useQueueSettingsStore(); - let graphHasChanged = false; - let internalCount = 0; - api.addEventListener("graphChanged", () => { - if (queueSettingsStore.mode === "change") { - if (internalCount) { - graphHasChanged = true; - } else { - graphHasChanged = false; - app.queuePrompt(0, queueSettingsStore.batchCount); - internalCount++; - } - } - }); - queueCountStore.$subscribe( - () => { - internalCount = queueCountStore.count; - if (!internalCount && !app.lastExecutionError) { - if (queueSettingsStore.mode === "instant" || queueSettingsStore.mode === "change" && graphHasChanged) { - graphHasChanged = false; - app.queuePrompt(0, queueSettingsStore.batchCount); - } - } - }, - { detached: true } - ); -} -__name(setupAutoQueueHandler, "setupAutoQueueHandler"); -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "GraphView", - setup(__props) { - setupAutoQueueHandler(); - const { t } = useI18n(); - const toast = useToast(); - const settingStore = useSettingStore(); - const executionStore = useExecutionStore(); - const colorPaletteStore = useColorPaletteStore(); - const queueStore = useQueueStore(); - watch( - () => colorPaletteStore.completedActivePalette, - (newTheme) => { - const DARK_THEME_CLASS = "dark-theme"; - if (newTheme.light_theme) { - document.body.classList.remove(DARK_THEME_CLASS); - } else { - document.body.classList.add(DARK_THEME_CLASS); - } - if (isElectron()) { - electronAPI().changeTheme({ - color: "rgba(0, 0, 0, 0)", - symbolColor: newTheme.colors.comfy_base["input-text"] - }); - } - }, - { immediate: true } - ); - if (isElectron()) { - watch( - () => queueStore.tasks, - (newTasks, oldTasks) => { - const oldRunningTaskIds = new Set( - oldTasks.filter((task) => task.isRunning).map((task) => task.promptId) - ); - newTasks.filter( - (task) => oldRunningTaskIds.has(task.promptId) && task.isHistory - ).forEach((task) => { - electronAPI().Events.incrementUserProperty( - `execution:${task.displayStatus.toLowerCase()}`, - 1 - ); - }); - }, - { deep: true } - ); - } - watchEffect(() => { - const fontSize = settingStore.get("Comfy.TextareaWidget.FontSize"); - document.documentElement.style.setProperty( - "--comfy-textarea-font-size", - `${fontSize}px` - ); - }); - watchEffect(() => { - const padding = settingStore.get("Comfy.TreeExplorer.ItemPadding"); - document.documentElement.style.setProperty( - "--comfy-tree-explorer-item-padding", - `${padding}px` - ); - }); - watchEffect(() => { - const locale = settingStore.get("Comfy.Locale"); - if (locale) { - i18n.global.locale.value = locale; - } - }); - watchEffect(() => { - const useNewMenu = settingStore.get("Comfy.UseNewMenu"); - if (useNewMenu === "Disabled") { - app.ui.menuContainer.style.setProperty("display", "block"); - app.ui.restoreMenuPosition(); - } else { - app.ui.menuContainer.style.setProperty("display", "none"); - } - }); - watchEffect(() => { - queueStore.maxHistoryItems = settingStore.get("Comfy.Queue.MaxHistoryItems"); - }); - const init = /* @__PURE__ */ __name(() => { - const coreCommands = useCoreCommands(); - useCommandStore().registerCommands(coreCommands); - useMenuItemStore().registerCoreMenuCommands(); - useKeybindingService().registerCoreKeybindings(); - useSidebarTabStore().registerCoreSidebarTabs(); - useBottomPanelStore().registerCoreBottomPanelTabs(); - app.extensionManager = useWorkspaceStore(); - }, "init"); - const queuePendingTaskCountStore = useQueuePendingTaskCountStore(); - const onStatus = /* @__PURE__ */ __name(async (e) => { - queuePendingTaskCountStore.update(e); - await queueStore.update(); - }, "onStatus"); - const reconnectingMessage = { - severity: "error", - summary: t("g.reconnecting") - }; - const onReconnecting = /* @__PURE__ */ __name(() => { - toast.remove(reconnectingMessage); - toast.add(reconnectingMessage); - }, "onReconnecting"); - const onReconnected = /* @__PURE__ */ __name(() => { - toast.remove(reconnectingMessage); - toast.add({ - severity: "success", - summary: t("g.reconnected"), - life: 2e3 - }); - }, "onReconnected"); - onMounted(() => { - api.addEventListener("status", onStatus); - api.addEventListener("reconnecting", onReconnecting); - api.addEventListener("reconnected", onReconnected); - executionStore.bindExecutionEvents(); - try { - init(); - } catch (e) { - console.error("Failed to init ComfyUI frontend", e); - } - }); - onBeforeUnmount(() => { - api.removeEventListener("status", onStatus); - api.removeEventListener("reconnecting", onReconnecting); - api.removeEventListener("reconnected", onReconnected); - executionStore.unbindExecutionEvents(); - }); - useEventListener(window, "keydown", useKeybindingService().keybindHandler); - const { wrapWithErrorHandling, wrapWithErrorHandlingAsync } = useErrorHandling(); - const onGraphReady = /* @__PURE__ */ __name(() => { - requestIdleCallback( - () => { - wrapWithErrorHandling(useKeybindingService().registerUserKeybindings)(); - wrapWithErrorHandling(useServerConfigStore().loadServerConfig)( - SERVER_CONFIG_ITEMS, - settingStore.get("Comfy.Server.ServerConfigValues") - ); - wrapWithErrorHandlingAsync(useModelStore().loadModelFolders)(); - wrapWithErrorHandlingAsync(useNodeFrequencyStore().loadNodeFrequencies)(); - useNodeDefStore().nodeSearchService.endsWithFilterStartSequence(""); - }, - { timeout: 1e3 } - ); - }, "onGraphReady"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock(Fragment, null, [ - createVNode(TopMenubar), - createVNode(_sfc_main$8, { onReady: onGraphReady }), - createVNode(_sfc_main$7), - createVNode(_sfc_main$s), - createVNode(_sfc_main$u), - createVNode(MenuHamburger) - ], 64); - }; - } -}); -export { - _sfc_main as default -}; -//# sourceMappingURL=GraphView-CDDCHVO0.js.map diff --git a/web/assets/GraphView-CqZ3opAX.css b/web/assets/GraphView-CqZ3opAX.css deleted file mode 100644 index f735c8386..000000000 --- a/web/assets/GraphView-CqZ3opAX.css +++ /dev/null @@ -1,306 +0,0 @@ - -.comfy-menu-hamburger[data-v-7ed57d1a] { - pointer-events: auto; - position: fixed; - z-index: 9999; - display: flex; - flex-direction: row -} - -[data-v-e50caa15] .p-splitter-gutter { - pointer-events: auto; -} -[data-v-e50caa15] .p-splitter-gutter:hover,[data-v-e50caa15] .p-splitter-gutter[data-p-gutter-resizing='true'] { - transition: background-color 0.2s ease 300ms; - background-color: var(--p-primary-color); -} -.side-bar-panel[data-v-e50caa15] { - background-color: var(--bg-color); - pointer-events: auto; -} -.bottom-panel[data-v-e50caa15] { - background-color: var(--bg-color); - pointer-events: auto; -} -.splitter-overlay[data-v-e50caa15] { - pointer-events: none; - border-style: none; - background-color: transparent; -} -.splitter-overlay-root[data-v-e50caa15] { - position: absolute; - top: 0px; - left: 0px; - height: 100%; - width: 100%; - - /* Set it the same as the ComfyUI menu */ - /* Note: Lite-graph DOM widgets have the same z-index as the node id, so - 999 should be sufficient to make sure splitter overlays on node's DOM - widgets */ - z-index: 999; -} - -.p-buttongroup-vertical[data-v-cb8f9a1a] { - display: flex; - flex-direction: column; - border-radius: var(--p-button-border-radius); - overflow: hidden; - border: 1px solid var(--p-panel-border-color); -} -.p-buttongroup-vertical .p-button[data-v-cb8f9a1a] { - margin: 0; - border-radius: 0; -} - -.node-tooltip[data-v-46859edf] { - background: var(--comfy-input-bg); - border-radius: 5px; - box-shadow: 0 0 5px rgba(0, 0, 0, 0.4); - color: var(--input-text); - font-family: sans-serif; - left: 0; - max-width: 30vw; - padding: 4px 8px; - position: absolute; - top: 0; - transform: translate(5px, calc(-100% - 5px)); - white-space: pre-wrap; - z-index: 99999; -} - -.group-title-editor.node-title-editor[data-v-12d3fd12] { - z-index: 9999; - padding: 0.25rem; -} -[data-v-12d3fd12] .editable-text { - width: 100%; - height: 100%; -} -[data-v-12d3fd12] .editable-text input { - width: 100%; - height: 100%; - /* Override the default font size */ - font-size: inherit; -} - -[data-v-fd0a74bd] .highlight { - background-color: var(--p-primary-color); - color: var(--p-primary-contrast-color); - font-weight: bold; - border-radius: 0.25rem; - padding: 0rem 0.125rem; - margin: -0.125rem 0.125rem; -} - -.invisible-dialog-root { - width: 60%; - min-width: 24rem; - max-width: 48rem; - border: 0 !important; - background-color: transparent !important; - margin-top: 25vh; - margin-left: 400px; -} -@media all and (max-width: 768px) { -.invisible-dialog-root { - margin-left: 0px; -} -} -.node-search-box-dialog-mask { - align-items: flex-start !important; -} - -.side-bar-button-icon { - font-size: var(--sidebar-icon-size) !important; -} -.side-bar-button-selected .side-bar-button-icon { - font-size: var(--sidebar-icon-size) !important; - font-weight: bold; -} - -.side-bar-button[data-v-6ab4daa6] { - width: var(--sidebar-width); - height: var(--sidebar-width); - border-radius: 0; -} -.comfyui-body-left .side-bar-button.side-bar-button-selected[data-v-6ab4daa6], -.comfyui-body-left .side-bar-button.side-bar-button-selected[data-v-6ab4daa6]:hover { - border-left: 4px solid var(--p-button-text-primary-color); -} -.comfyui-body-right .side-bar-button.side-bar-button-selected[data-v-6ab4daa6], -.comfyui-body-right .side-bar-button.side-bar-button-selected[data-v-6ab4daa6]:hover { - border-right: 4px solid var(--p-button-text-primary-color); -} - -.side-tool-bar-container[data-v-33cac83a] { - display: flex; - flex-direction: column; - align-items: center; - - pointer-events: auto; - - width: var(--sidebar-width); - height: 100%; - - background-color: var(--comfy-menu-secondary-bg); - color: var(--fg-color); - box-shadow: var(--bar-shadow); - - --sidebar-width: 4rem; - --sidebar-icon-size: 1.5rem; -} -.side-tool-bar-container.small-sidebar[data-v-33cac83a] { - --sidebar-width: 2.5rem; - --sidebar-icon-size: 1rem; -} -.side-tool-bar-end[data-v-33cac83a] { - align-self: flex-end; - margin-top: auto; -} - -.status-indicator[data-v-8d011a31] { - position: absolute; - font-weight: 700; - font-size: 1.5rem; - top: 50%; - left: 50%; - transform: translate(-50%, -50%) -} - -[data-v-54fadc45] .p-togglebutton { - position: relative; - flex-shrink: 0; - border-radius: 0px; - border-width: 0px; - border-right-width: 1px; - border-style: solid; - background-color: transparent; - padding: 0px; - border-right-color: var(--border-color) -} -[data-v-54fadc45] .p-togglebutton::before { - display: none -} -[data-v-54fadc45] .p-togglebutton:first-child { - border-left-width: 1px; - border-style: solid; - border-left-color: var(--border-color) -} -[data-v-54fadc45] .p-togglebutton:not(:first-child) { - border-left-width: 0px -} -[data-v-54fadc45] .p-togglebutton.p-togglebutton-checked { - height: 100%; - border-bottom-width: 1px; - border-style: solid; - border-bottom-color: var(--p-button-text-primary-color) -} -[data-v-54fadc45] .p-togglebutton:not(.p-togglebutton-checked) { - opacity: 0.75 -} -[data-v-54fadc45] .p-togglebutton-checked .close-button,[data-v-54fadc45] .p-togglebutton:hover .close-button { - visibility: visible -} -[data-v-54fadc45] .p-togglebutton:hover .status-indicator { - display: none -} -[data-v-54fadc45] .p-togglebutton .close-button { - visibility: hidden -} -[data-v-54fadc45] .p-scrollpanel-content { - height: 100% -} - -/* Scrollbar half opacity to avoid blocking the active tab bottom border */ -[data-v-54fadc45] .p-scrollpanel:hover .p-scrollpanel-bar,[data-v-54fadc45] .p-scrollpanel:active .p-scrollpanel-bar { - opacity: 0.5 -} -[data-v-54fadc45] .p-selectbutton { - height: 100%; - border-radius: 0px -} - -[data-v-38831d8e] .workflow-tabs { - background-color: var(--comfy-menu-bg); -} - -[data-v-26957f1f] .p-inputtext { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -.comfyui-queue-button[data-v-e9044686] .p-splitbutton-dropdown { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.actionbar[data-v-915e5456] { - pointer-events: all; - position: fixed; - z-index: 1000; -} -.actionbar.is-docked[data-v-915e5456] { - position: static; - border-style: none; - background-color: transparent; - padding: 0px; -} -.actionbar.is-dragging[data-v-915e5456] { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; -} -[data-v-915e5456] .p-panel-content { - padding: 0.25rem; -} -.is-docked[data-v-915e5456] .p-panel-content { - padding: 0px; -} -[data-v-915e5456] .p-panel-header { - display: none; -} - -.top-menubar[data-v-56df69d2] .p-menubar-item-link svg { - display: none; -} -[data-v-56df69d2] .p-menubar-submenu.dropdown-direction-up { - top: auto; - bottom: 100%; - flex-direction: column-reverse; -} -.keybinding-tag[data-v-56df69d2] { - background: var(--p-content-hover-background); - border-color: var(--p-content-border-color); - border-style: solid; -} - -.comfyui-menu[data-v-6e35440f] { - width: 100vw; - height: var(--comfy-topbar-height); - background: var(--comfy-menu-bg); - color: var(--fg-color); - box-shadow: var(--bar-shadow); - font-family: Arial, Helvetica, sans-serif; - font-size: 0.8em; - box-sizing: border-box; - z-index: 1000; - order: 0; - grid-column: 1/-1; -} -.comfyui-menu.dropzone[data-v-6e35440f] { - background: var(--p-highlight-background); -} -.comfyui-menu.dropzone-active[data-v-6e35440f] { - background: var(--p-highlight-background-focus); -} -[data-v-6e35440f] .p-menubar-item-label { - line-height: revert; -} -.comfyui-logo[data-v-6e35440f] { - font-size: 1.2em; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - cursor: default; -} diff --git a/web/assets/InstallView-By3hC1fC.js b/web/assets/InstallView-By3hC1fC.js deleted file mode 100644 index 4262b2646..000000000 --- a/web/assets/InstallView-By3hC1fC.js +++ /dev/null @@ -1,1319 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value2) => __defProp(target, "name", { value: value2, configurable: true }); -import { B as BaseStyle, y as script$6, o as openBlock, f as createElementBlock, G as mergeProps, c9 as findIndexInList, ca as find, aD as resolveComponent, J as createBlock, K as resolveDynamicComponent, P as withCtx, m as createBaseVNode, Z as toDisplayString, M as renderSlot, L as createCommentVNode, V as normalizeClass, R as findSingle, H as Fragment, aE as Transition, i as withDirectives, v as vShow, am as UniqueComponentId, d as defineComponent, ad as ref, cb as useModel, k as createVNode, j as unref, cc as script$7, c4 as script$8, b3 as withModifiers, aP as script$9, a3 as useI18n, c as computed, aK as script$a, aG as createTextVNode, p as pushScopeId, q as popScopeId, bV as electronAPI, _ as _export_sfc, t as onMounted, r as resolveDirective, ax as script$b, cd as script$c, ce as script$d, l as script$e, c6 as script$f, cf as MigrationItems, w as watchEffect, I as renderList, cg as script$g, c2 as useRouter, aU as toRaw } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$5 } from "./BaseViewTemplate-BhQMaVFP.js"; -var classes$4 = { - root: /* @__PURE__ */ __name(function root(_ref) { - var instance = _ref.instance; - return ["p-step", { - "p-step-active": instance.active, - "p-disabled": instance.isStepDisabled - }]; - }, "root"), - header: "p-step-header", - number: "p-step-number", - title: "p-step-title" -}; -var StepStyle = BaseStyle.extend({ - name: "step", - classes: classes$4 -}); -var script$2$2 = { - name: "StepperSeparator", - hostName: "Stepper", - "extends": script$6 -}; -function render$1$2(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("span", mergeProps({ - "class": _ctx.cx("separator") - }, _ctx.ptm("separator")), null, 16); -} -__name(render$1$2, "render$1$2"); -script$2$2.render = render$1$2; -var script$1$4 = { - name: "BaseStep", - "extends": script$6, - props: { - value: { - type: [String, Number], - "default": void 0 - }, - disabled: { - type: Boolean, - "default": false - }, - asChild: { - type: Boolean, - "default": false - }, - as: { - type: [String, Object], - "default": "DIV" - } - }, - style: StepStyle, - provide: /* @__PURE__ */ __name(function provide() { - return { - $pcStep: this, - $parentInstance: this - }; - }, "provide") -}; -var script$5 = { - name: "Step", - "extends": script$1$4, - inheritAttrs: false, - inject: { - $pcStepper: { - "default": null - }, - $pcStepList: { - "default": null - }, - $pcStepItem: { - "default": null - } - }, - data: /* @__PURE__ */ __name(function data() { - return { - isSeparatorVisible: false - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted() { - if (this.$el && this.$pcStepList) { - var index = findIndexInList(this.$el, find(this.$pcStepper.$el, '[data-pc-name="step"]')); - var stepLen = find(this.$pcStepper.$el, '[data-pc-name="step"]').length; - this.isSeparatorVisible = index !== stepLen - 1; - } - }, "mounted"), - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions(key) { - var _ptm = key === "root" ? this.ptmi : this.ptm; - return _ptm(key, { - context: { - active: this.active, - disabled: this.isStepDisabled - } - }); - }, "getPTOptions"), - onStepClick: /* @__PURE__ */ __name(function onStepClick() { - this.$pcStepper.updateValue(this.activeValue); - }, "onStepClick") - }, - computed: { - active: /* @__PURE__ */ __name(function active() { - return this.$pcStepper.isStepActive(this.activeValue); - }, "active"), - activeValue: /* @__PURE__ */ __name(function activeValue() { - var _this$$pcStepItem; - return !!this.$pcStepItem ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.value : this.value; - }, "activeValue"), - isStepDisabled: /* @__PURE__ */ __name(function isStepDisabled() { - return !this.active && (this.$pcStepper.isStepDisabled() || this.disabled); - }, "isStepDisabled"), - id: /* @__PURE__ */ __name(function id() { - var _this$$pcStepper; - return "".concat((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.id, "_step_").concat(this.activeValue); - }, "id"), - ariaControls: /* @__PURE__ */ __name(function ariaControls() { - var _this$$pcStepper2; - return "".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, "_steppanel_").concat(this.activeValue); - }, "ariaControls"), - a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs() { - return { - root: { - role: "presentation", - "aria-current": this.active ? "step" : void 0, - "data-pc-name": "step", - "data-pc-section": "root", - "data-p-disabled": this.disabled, - "data-p-active": this.active - }, - header: { - id: this.id, - role: "tab", - taindex: this.disabled ? -1 : void 0, - "aria-controls": this.ariaControls, - "data-pc-section": "header", - disabled: this.disabled, - onClick: this.onStepClick - } - }; - }, "a11yAttrs") - }, - components: { - StepperSeparator: script$2$2 - } -}; -var _hoisted_1$5 = ["id", "tabindex", "aria-controls", "disabled"]; -function render$4(_ctx, _cache, $props, $setup, $data, $options) { - var _component_StepperSeparator = resolveComponent("StepperSeparator"); - return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ - key: 0, - "class": _ctx.cx("root"), - "aria-current": $options.active ? "step" : void 0, - role: "presentation", - "data-p-active": $options.active, - "data-p-disabled": $options.isStepDisabled - }, $options.getPTOptions("root")), { - "default": withCtx(function() { - return [createBaseVNode("button", mergeProps({ - id: $options.id, - "class": _ctx.cx("header"), - role: "tab", - type: "button", - tabindex: $options.isStepDisabled ? -1 : void 0, - "aria-controls": $options.ariaControls, - disabled: $options.isStepDisabled, - onClick: _cache[0] || (_cache[0] = function() { - return $options.onStepClick && $options.onStepClick.apply($options, arguments); - }) - }, $options.getPTOptions("header")), [createBaseVNode("span", mergeProps({ - "class": _ctx.cx("number") - }, $options.getPTOptions("number")), toDisplayString($options.activeValue), 17), createBaseVNode("span", mergeProps({ - "class": _ctx.cx("title") - }, $options.getPTOptions("title")), [renderSlot(_ctx.$slots, "default")], 16)], 16, _hoisted_1$5), $data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, { - key: 0 - })) : createCommentVNode("", true)]; - }), - _: 3 - }, 16, ["class", "aria-current", "data-p-active", "data-p-disabled"])) : renderSlot(_ctx.$slots, "default", { - key: 1, - "class": normalizeClass(_ctx.cx("root")), - active: $options.active, - value: _ctx.value, - a11yAttrs: $options.a11yAttrs, - activateCallback: $options.onStepClick - }); -} -__name(render$4, "render$4"); -script$5.render = render$4; -var classes$3 = { - root: "p-steplist" -}; -var StepListStyle = BaseStyle.extend({ - name: "steplist", - classes: classes$3 -}); -var script$1$3 = { - name: "BaseStepList", - "extends": script$6, - style: StepListStyle, - provide: /* @__PURE__ */ __name(function provide2() { - return { - $pcStepList: this, - $parentInstance: this - }; - }, "provide") -}; -var script$4 = { - name: "StepList", - "extends": script$1$3, - inheritAttrs: false -}; -function render$3(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root") - }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); -} -__name(render$3, "render$3"); -script$4.render = render$3; -var classes$2 = { - root: /* @__PURE__ */ __name(function root2(_ref) { - var instance = _ref.instance; - return ["p-steppanel", { - "p-steppanel-active": instance.isVertical && instance.active - }]; - }, "root"), - content: "p-steppanel-content" -}; -var StepPanelStyle = BaseStyle.extend({ - name: "steppanel", - classes: classes$2 -}); -var script$2$1 = { - name: "StepperSeparator", - hostName: "Stepper", - "extends": script$6 -}; -function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("span", mergeProps({ - "class": _ctx.cx("separator") - }, _ctx.ptm("separator")), null, 16); -} -__name(render$1$1, "render$1$1"); -script$2$1.render = render$1$1; -var script$1$2 = { - name: "BaseStepPanel", - "extends": script$6, - props: { - value: { - type: [String, Number], - "default": void 0 - }, - asChild: { - type: Boolean, - "default": false - }, - as: { - type: [String, Object], - "default": "DIV" - } - }, - style: StepPanelStyle, - provide: /* @__PURE__ */ __name(function provide3() { - return { - $pcStepPanel: this, - $parentInstance: this - }; - }, "provide") -}; -var script$3 = { - name: "StepPanel", - "extends": script$1$2, - inheritAttrs: false, - inject: { - $pcStepper: { - "default": null - }, - $pcStepItem: { - "default": null - }, - $pcStepList: { - "default": null - } - }, - data: /* @__PURE__ */ __name(function data2() { - return { - isSeparatorVisible: false - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted2() { - if (this.$el) { - var _this$$pcStepItem, _this$$pcStepList; - var stepElements = find(this.$pcStepper.$el, '[data-pc-name="step"]'); - var stepPanelEl = findSingle(this.isVertical ? (_this$$pcStepItem = this.$pcStepItem) === null || _this$$pcStepItem === void 0 ? void 0 : _this$$pcStepItem.$el : (_this$$pcStepList = this.$pcStepList) === null || _this$$pcStepList === void 0 ? void 0 : _this$$pcStepList.$el, '[data-pc-name="step"]'); - var stepPanelIndex = findIndexInList(stepPanelEl, stepElements); - this.isSeparatorVisible = this.isVertical && stepPanelIndex !== stepElements.length - 1; - } - }, "mounted"), - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions2(key) { - var _ptm = key === "root" ? this.ptmi : this.ptm; - return _ptm(key, { - context: { - active: this.active - } - }); - }, "getPTOptions"), - updateValue: /* @__PURE__ */ __name(function updateValue(val) { - this.$pcStepper.updateValue(val); - }, "updateValue") - }, - computed: { - active: /* @__PURE__ */ __name(function active2() { - var _this$$pcStepItem2, _this$$pcStepper; - var activeValue3 = !!this.$pcStepItem ? (_this$$pcStepItem2 = this.$pcStepItem) === null || _this$$pcStepItem2 === void 0 ? void 0 : _this$$pcStepItem2.value : this.value; - return activeValue3 === ((_this$$pcStepper = this.$pcStepper) === null || _this$$pcStepper === void 0 ? void 0 : _this$$pcStepper.d_value); - }, "active"), - isVertical: /* @__PURE__ */ __name(function isVertical() { - return !!this.$pcStepItem; - }, "isVertical"), - activeValue: /* @__PURE__ */ __name(function activeValue2() { - var _this$$pcStepItem3; - return this.isVertical ? (_this$$pcStepItem3 = this.$pcStepItem) === null || _this$$pcStepItem3 === void 0 ? void 0 : _this$$pcStepItem3.value : this.value; - }, "activeValue"), - id: /* @__PURE__ */ __name(function id2() { - var _this$$pcStepper2; - return "".concat((_this$$pcStepper2 = this.$pcStepper) === null || _this$$pcStepper2 === void 0 ? void 0 : _this$$pcStepper2.id, "_steppanel_").concat(this.activeValue); - }, "id"), - ariaControls: /* @__PURE__ */ __name(function ariaControls2() { - var _this$$pcStepper3; - return "".concat((_this$$pcStepper3 = this.$pcStepper) === null || _this$$pcStepper3 === void 0 ? void 0 : _this$$pcStepper3.id, "_step_").concat(this.activeValue); - }, "ariaControls"), - a11yAttrs: /* @__PURE__ */ __name(function a11yAttrs2() { - return { - id: this.id, - role: "tabpanel", - "aria-controls": this.ariaControls, - "data-pc-name": "steppanel", - "data-p-active": this.active - }; - }, "a11yAttrs") - }, - components: { - StepperSeparator: script$2$1 - } -}; -function render$2(_ctx, _cache, $props, $setup, $data, $options) { - var _component_StepperSeparator = resolveComponent("StepperSeparator"); - return $options.isVertical ? (openBlock(), createElementBlock(Fragment, { - key: 0 - }, [!_ctx.asChild ? (openBlock(), createBlock(Transition, mergeProps({ - key: 0, - name: "p-toggleable-content" - }, _ctx.ptm("transition")), { - "default": withCtx(function() { - return [withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ - id: $options.id, - "class": _ctx.cx("root"), - role: "tabpanel", - "aria-controls": $options.ariaControls - }, $options.getPTOptions("root")), { - "default": withCtx(function() { - return [$data.isSeparatorVisible ? (openBlock(), createBlock(_component_StepperSeparator, { - key: 0 - })) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("content") - }, $options.getPTOptions("content")), [renderSlot(_ctx.$slots, "default", { - active: $options.active, - activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { - return $options.updateValue(val); - }, "activateCallback") - })], 16)]; - }), - _: 3 - }, 16, ["id", "class", "aria-controls"])), [[vShow, $options.active]])]; - }), - _: 3 - }, 16)) : renderSlot(_ctx.$slots, "default", { - key: 1, - active: $options.active, - a11yAttrs: $options.a11yAttrs, - activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { - return $options.updateValue(val); - }, "activateCallback") - })], 64)) : (openBlock(), createElementBlock(Fragment, { - key: 1 - }, [!_ctx.asChild ? withDirectives((openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ - key: 0, - id: $options.id, - "class": _ctx.cx("root"), - role: "tabpanel", - "aria-controls": $options.ariaControls - }, $options.getPTOptions("root")), { - "default": withCtx(function() { - return [renderSlot(_ctx.$slots, "default", { - active: $options.active, - activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { - return $options.updateValue(val); - }, "activateCallback") - })]; - }), - _: 3 - }, 16, ["id", "class", "aria-controls"])), [[vShow, $options.active]]) : _ctx.asChild && $options.active ? renderSlot(_ctx.$slots, "default", { - key: 1, - active: $options.active, - a11yAttrs: $options.a11yAttrs, - activateCallback: /* @__PURE__ */ __name(function activateCallback(val) { - return $options.updateValue(val); - }, "activateCallback") - }) : createCommentVNode("", true)], 64)); -} -__name(render$2, "render$2"); -script$3.render = render$2; -var classes$1 = { - root: "p-steppanels" -}; -var StepPanelsStyle = BaseStyle.extend({ - name: "steppanels", - classes: classes$1 -}); -var script$1$1 = { - name: "BaseStepPanels", - "extends": script$6, - style: StepPanelsStyle, - provide: /* @__PURE__ */ __name(function provide4() { - return { - $pcStepPanels: this, - $parentInstance: this - }; - }, "provide") -}; -var script$2 = { - name: "StepPanels", - "extends": script$1$1, - inheritAttrs: false -}; -function render$1(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root") - }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default")], 16); -} -__name(render$1, "render$1"); -script$2.render = render$1; -var theme = /* @__PURE__ */ __name(function theme2(_ref) { - var dt = _ref.dt; - return "\n.p-steplist {\n position: relative;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0;\n padding: 0;\n list-style-type: none;\n overflow-x: auto;\n}\n\n.p-step {\n position: relative;\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: ".concat(dt("stepper.step.gap"), ";\n padding: ").concat(dt("stepper.step.padding"), ";\n}\n\n.p-step:last-of-type {\n flex: initial;\n}\n\n.p-step-header {\n border: 0 none;\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n cursor: pointer;\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ";\n border-radius: ").concat(dt("stepper.step.header.border.radius"), ";\n outline-color: transparent;\n background: transparent;\n padding: ").concat(dt("stepper.step.header.padding"), ";\n gap: ").concat(dt("stepper.step.header.gap"), ";\n}\n\n.p-step-header:focus-visible {\n box-shadow: ").concat(dt("stepper.step.header.focus.ring.shadow"), ";\n outline: ").concat(dt("stepper.step.header.focus.ring.width"), " ").concat(dt("stepper.step.header.focus.ring.style"), " ").concat(dt("stepper.step.header.focus.ring.color"), ";\n outline-offset: ").concat(dt("stepper.step.header.focus.ring.offset"), ";\n}\n\n.p-stepper.p-stepper-readonly .p-step {\n cursor: auto;\n}\n\n.p-step-title {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n color: ").concat(dt("stepper.step.title.color"), ";\n font-weight: ").concat(dt("stepper.step.title.font.weight"), ";\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ";\n}\n\n.p-step-number {\n display: flex;\n align-items: center;\n justify-content: center;\n color: ").concat(dt("stepper.step.number.color"), ";\n border: 2px solid ").concat(dt("stepper.step.number.border.color"), ";\n background: ").concat(dt("stepper.step.number.background"), ";\n min-width: ").concat(dt("stepper.step.number.size"), ";\n height: ").concat(dt("stepper.step.number.size"), ";\n line-height: ").concat(dt("stepper.step.number.size"), ";\n font-size: ").concat(dt("stepper.step.number.font.size"), ";\n z-index: 1;\n border-radius: ").concat(dt("stepper.step.number.border.radius"), ";\n position: relative;\n font-weight: ").concat(dt("stepper.step.number.font.weight"), ';\n}\n\n.p-step-number::after {\n content: " ";\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ').concat(dt("stepper.step.number.border.radius"), ";\n box-shadow: ").concat(dt("stepper.step.number.shadow"), ";\n}\n\n.p-step-active .p-step-header {\n cursor: default;\n}\n\n.p-step-active .p-step-number {\n background: ").concat(dt("stepper.step.number.active.background"), ";\n border-color: ").concat(dt("stepper.step.number.active.border.color"), ";\n color: ").concat(dt("stepper.step.number.active.color"), ";\n}\n\n.p-step-active .p-step-title {\n color: ").concat(dt("stepper.step.title.active.color"), ";\n}\n\n.p-step:not(.p-disabled):focus-visible {\n outline: ").concat(dt("focus.ring.width"), " ").concat(dt("focus.ring.style"), " ").concat(dt("focus.ring.color"), ";\n outline-offset: ").concat(dt("focus.ring.offset"), ";\n}\n\n.p-step:has(~ .p-step-active) .p-stepper-separator {\n background: ").concat(dt("stepper.separator.active.background"), ";\n}\n\n.p-stepper-separator {\n flex: 1 1 0;\n background: ").concat(dt("stepper.separator.background"), ";\n width: 100%;\n height: ").concat(dt("stepper.separator.size"), ";\n transition: background ").concat(dt("stepper.transition.duration"), ", color ").concat(dt("stepper.transition.duration"), ", border-color ").concat(dt("stepper.transition.duration"), ", box-shadow ").concat(dt("stepper.transition.duration"), ", outline-color ").concat(dt("stepper.transition.duration"), ";\n}\n\n.p-steppanels {\n padding: ").concat(dt("stepper.steppanels.padding"), ";\n}\n\n.p-steppanel {\n background: ").concat(dt("stepper.steppanel.background"), ";\n color: ").concat(dt("stepper.steppanel.color"), ";\n}\n\n.p-stepper:has(.p-stepitem) {\n display: flex;\n flex-direction: column;\n}\n\n.p-stepitem {\n display: flex;\n flex-direction: column;\n flex: initial;\n}\n\n.p-stepitem.p-stepitem-active {\n flex: 1 1 auto;\n}\n\n.p-stepitem .p-step {\n flex: initial;\n}\n\n.p-stepitem .p-steppanel-content {\n width: 100%;\n padding: ").concat(dt("stepper.steppanel.padding"), ";\n}\n\n.p-stepitem .p-steppanel {\n display: flex;\n flex: 1 1 auto;\n}\n\n.p-stepitem .p-stepper-separator {\n flex: 0 0 auto;\n width: ").concat(dt("stepper.separator.size"), ";\n height: auto;\n margin: ").concat(dt("stepper.separator.margin"), ";\n position: relative;\n left: calc(-1 * ").concat(dt("stepper.separator.size"), ");\n}\n\n.p-stepitem:has(~ .p-stepitem-active) .p-stepper-separator {\n background: ").concat(dt("stepper.separator.active.background"), ";\n}\n\n.p-stepitem:last-of-type .p-steppanel {\n padding-inline-start: ").concat(dt("stepper.step.number.size"), ";\n}\n"); -}, "theme"); -var classes = { - root: /* @__PURE__ */ __name(function root3(_ref2) { - var props = _ref2.props; - return ["p-stepper p-component", { - "p-readonly": props.linear - }]; - }, "root"), - separator: "p-stepper-separator" -}; -var StepperStyle = BaseStyle.extend({ - name: "stepper", - theme, - classes -}); -var script$1 = { - name: "BaseStepper", - "extends": script$6, - props: { - value: { - type: [String, Number], - "default": void 0 - }, - linear: { - type: Boolean, - "default": false - } - }, - style: StepperStyle, - provide: /* @__PURE__ */ __name(function provide5() { - return { - $pcStepper: this, - $parentInstance: this - }; - }, "provide") -}; -var script = { - name: "Stepper", - "extends": script$1, - inheritAttrs: false, - emits: ["update:value"], - data: /* @__PURE__ */ __name(function data3() { - return { - id: this.$attrs.id, - d_value: this.value - }; - }, "data"), - watch: { - "$attrs.id": /* @__PURE__ */ __name(function $attrsId(newValue) { - this.id = newValue || UniqueComponentId(); - }, "$attrsId"), - value: /* @__PURE__ */ __name(function value(newValue) { - this.d_value = newValue; - }, "value") - }, - mounted: /* @__PURE__ */ __name(function mounted3() { - this.id = this.id || UniqueComponentId(); - }, "mounted"), - methods: { - updateValue: /* @__PURE__ */ __name(function updateValue2(newValue) { - if (this.d_value !== newValue) { - this.d_value = newValue; - this.$emit("update:value", newValue); - } - }, "updateValue"), - isStepActive: /* @__PURE__ */ __name(function isStepActive(value2) { - return this.d_value === value2; - }, "isStepActive"), - isStepDisabled: /* @__PURE__ */ __name(function isStepDisabled2() { - return this.linear; - }, "isStepDisabled") - } -}; -function render(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root"), - role: "tablist" - }, _ctx.ptmi("root")), [_ctx.$slots.start ? renderSlot(_ctx.$slots, "start", { - key: 0 - }) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.$slots.end ? renderSlot(_ctx.$slots, "end", { - key: 1 - }) : createCommentVNode("", true)], 16); -} -__name(render, "render"); -script.render = render; -const _hoisted_1$4 = { class: "flex flex-col gap-6 w-[600px]" }; -const _hoisted_2$4 = { class: "flex flex-col gap-4" }; -const _hoisted_3$4 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_4$4 = { class: "text-neutral-400 my-0" }; -const _hoisted_5$3 = { class: "flex flex-col bg-neutral-800 p-4 rounded-lg" }; -const _hoisted_6$3 = { class: "flex items-center gap-4" }; -const _hoisted_7$3 = { class: "flex-1" }; -const _hoisted_8$3 = { class: "text-lg font-medium text-neutral-100" }; -const _hoisted_9$3 = { class: "text-sm text-neutral-400 mt-1" }; -const _hoisted_10$3 = { class: "flex items-center gap-4" }; -const _hoisted_11$3 = { class: "flex-1" }; -const _hoisted_12$3 = { class: "text-lg font-medium text-neutral-100" }; -const _hoisted_13$2 = { class: "text-sm text-neutral-400 mt-1" }; -const _hoisted_14$2 = { class: "text-neutral-300" }; -const _hoisted_15$2 = { class: "font-medium mb-2" }; -const _hoisted_16$2 = { class: "list-disc pl-6 space-y-1" }; -const _hoisted_17$2 = { class: "font-medium mt-4 mb-2" }; -const _hoisted_18$2 = { class: "list-disc pl-6 space-y-1" }; -const _hoisted_19 = { class: "mt-4" }; -const _hoisted_20 = { - href: "https://comfy.org/privacy", - target: "_blank", - class: "text-blue-400 hover:text-blue-300 underline" -}; -const _sfc_main$4 = /* @__PURE__ */ defineComponent({ - __name: "DesktopSettingsConfiguration", - props: { - "autoUpdate": { required: true }, - "autoUpdateModifiers": {}, - "allowMetrics": { required: true }, - "allowMetricsModifiers": {} - }, - emits: ["update:autoUpdate", "update:allowMetrics"], - setup(__props) { - const showDialog = ref(false); - const autoUpdate = useModel(__props, "autoUpdate"); - const allowMetrics = useModel(__props, "allowMetrics"); - const showMetricsInfo = /* @__PURE__ */ __name(() => { - showDialog.value = true; - }, "showMetricsInfo"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$4, [ - createBaseVNode("div", _hoisted_2$4, [ - createBaseVNode("h2", _hoisted_3$4, toDisplayString(_ctx.$t("install.desktopAppSettings")), 1), - createBaseVNode("p", _hoisted_4$4, toDisplayString(_ctx.$t("install.desktopAppSettingsDescription")), 1) - ]), - createBaseVNode("div", _hoisted_5$3, [ - createBaseVNode("div", _hoisted_6$3, [ - createBaseVNode("div", _hoisted_7$3, [ - createBaseVNode("h3", _hoisted_8$3, toDisplayString(_ctx.$t("install.settings.autoUpdate")), 1), - createBaseVNode("p", _hoisted_9$3, toDisplayString(_ctx.$t("install.settings.autoUpdateDescription")), 1) - ]), - createVNode(unref(script$7), { - modelValue: autoUpdate.value, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => autoUpdate.value = $event) - }, null, 8, ["modelValue"]) - ]), - createVNode(unref(script$8)), - createBaseVNode("div", _hoisted_10$3, [ - createBaseVNode("div", _hoisted_11$3, [ - createBaseVNode("h3", _hoisted_12$3, toDisplayString(_ctx.$t("install.settings.allowMetrics")), 1), - createBaseVNode("p", _hoisted_13$2, toDisplayString(_ctx.$t("install.settings.allowMetricsDescription")), 1), - createBaseVNode("a", { - href: "#", - class: "text-sm text-blue-400 hover:text-blue-300 mt-1 inline-block", - onClick: withModifiers(showMetricsInfo, ["prevent"]) - }, toDisplayString(_ctx.$t("install.settings.learnMoreAboutData")), 1) - ]), - createVNode(unref(script$7), { - modelValue: allowMetrics.value, - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => allowMetrics.value = $event) - }, null, 8, ["modelValue"]) - ]) - ]), - createVNode(unref(script$9), { - visible: showDialog.value, - "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => showDialog.value = $event), - modal: "", - header: _ctx.$t("install.settings.dataCollectionDialog.title") - }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_14$2, [ - createBaseVNode("h4", _hoisted_15$2, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.whatWeCollect")), 1), - createBaseVNode("ul", _hoisted_16$2, [ - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.collect.errorReports")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.collect.systemInfo")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.collect.userJourneyEvents" - )), 1) - ]), - createBaseVNode("h4", _hoisted_17$2, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.whatWeDoNotCollect")), 1), - createBaseVNode("ul", _hoisted_18$2, [ - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.doNotCollect.personalInformation" - )), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.doNotCollect.workflowContents" - )), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.doNotCollect.fileSystemInformation" - )), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t( - "install.settings.dataCollectionDialog.doNotCollect.customNodeConfigurations" - )), 1) - ]), - createBaseVNode("div", _hoisted_19, [ - createBaseVNode("a", _hoisted_20, toDisplayString(_ctx.$t("install.settings.dataCollectionDialog.viewFullPolicy")), 1) - ]) - ]) - ]), - _: 1 - }, 8, ["visible", "header"]) - ]); - }; - } -}); -const _imports_0 = "" + new URL("images/nvidia-logo.svg", import.meta.url).href; -const _imports_1 = "" + new URL("images/apple-mps-logo.png", import.meta.url).href; -const _imports_2 = "" + new URL("images/manual-configuration.svg", import.meta.url).href; -const _withScopeId$1 = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-79125ff6"), n = n(), popScopeId(), n), "_withScopeId$1"); -const _hoisted_1$3 = { class: "flex flex-col gap-6 w-[600px] h-[30rem] select-none" }; -const _hoisted_2$3 = { class: "grow flex flex-col gap-4 text-neutral-300" }; -const _hoisted_3$3 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_4$3 = { class: "m-1 text-neutral-400" }; -const _hoisted_5$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createBaseVNode("img", { - class: "m-12", - alt: "NVIDIA logo", - width: "196", - height: "32", - src: _imports_0 -}, null, -1)); -const _hoisted_6$2 = [ - _hoisted_5$2 -]; -const _hoisted_7$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createBaseVNode("img", { - class: "rounded-lg hover-brighten", - alt: "Apple Metal Performance Shaders Logo", - width: "292", - ratio: "", - src: _imports_1 -}, null, -1)); -const _hoisted_8$2 = [ - _hoisted_7$2 -]; -const _hoisted_9$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createBaseVNode("img", { - class: "m-12", - alt: "Manual configuration", - width: "196", - src: _imports_2 -}, null, -1)); -const _hoisted_10$2 = [ - _hoisted_9$2 -]; -const _hoisted_11$2 = { - key: 0, - class: "m-1" -}; -const _hoisted_12$2 = { - key: 1, - class: "m-1" -}; -const _hoisted_13$1 = { - key: 2, - class: "text-neutral-300" -}; -const _hoisted_14$1 = { class: "m-1" }; -const _hoisted_15$1 = { key: 3 }; -const _hoisted_16$1 = { class: "m-1" }; -const _hoisted_17$1 = { class: "m-1" }; -const _hoisted_18$1 = { - for: "cpu-mode", - class: "select-none" -}; -const _sfc_main$3 = /* @__PURE__ */ defineComponent({ - __name: "GpuPicker", - props: { - "device": { - required: true - }, - "deviceModifiers": {} - }, - emits: ["update:device"], - setup(__props) { - const { t } = useI18n(); - const cpuMode = computed({ - get: /* @__PURE__ */ __name(() => selected.value === "cpu", "get"), - set: /* @__PURE__ */ __name((value2) => { - selected.value = value2 ? "cpu" : null; - }, "set") - }); - const selected = useModel(__props, "device"); - const electron = electronAPI(); - const platform = electron.getPlatform(); - const pickGpu = /* @__PURE__ */ __name((value2) => { - const newValue = selected.value === value2 ? null : value2; - selected.value = newValue; - }, "pickGpu"); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$3, [ - createBaseVNode("div", _hoisted_2$3, [ - createBaseVNode("h2", _hoisted_3$3, toDisplayString(_ctx.$t("install.gpuSelection.selectGpu")), 1), - createBaseVNode("p", _hoisted_4$3, toDisplayString(_ctx.$t("install.gpuSelection.selectGpuDescription")) + ": ", 1), - createBaseVNode("div", { - class: normalizeClass(["flex gap-2 text-center transition-opacity", { selected: selected.value }]) - }, [ - unref(platform) !== "darwin" ? (openBlock(), createElementBlock("div", { - key: 0, - class: normalizeClass(["gpu-button", { selected: selected.value === "nvidia" }]), - role: "button", - onClick: _cache[0] || (_cache[0] = ($event) => pickGpu("nvidia")) - }, _hoisted_6$2, 2)) : createCommentVNode("", true), - unref(platform) === "darwin" ? (openBlock(), createElementBlock("div", { - key: 1, - class: normalizeClass(["gpu-button", { selected: selected.value === "mps" }]), - role: "button", - onClick: _cache[1] || (_cache[1] = ($event) => pickGpu("mps")) - }, _hoisted_8$2, 2)) : createCommentVNode("", true), - createBaseVNode("div", { - class: normalizeClass(["gpu-button", { selected: selected.value === "unsupported" }]), - role: "button", - onClick: _cache[2] || (_cache[2] = ($event) => pickGpu("unsupported")) - }, _hoisted_10$2, 2) - ], 2), - selected.value === "nvidia" ? (openBlock(), createElementBlock("p", _hoisted_11$2, [ - createVNode(unref(script$a), { - icon: "pi pi-check", - severity: "success", - value: "CUDA" - }), - createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.nvidiaDescription")), 1) - ])) : createCommentVNode("", true), - selected.value === "mps" ? (openBlock(), createElementBlock("p", _hoisted_12$2, [ - createVNode(unref(script$a), { - icon: "pi pi-check", - severity: "success", - value: "MPS" - }), - createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.mpsDescription")), 1) - ])) : createCommentVNode("", true), - selected.value === "unsupported" ? (openBlock(), createElementBlock("div", _hoisted_13$1, [ - createBaseVNode("p", _hoisted_14$1, [ - createVNode(unref(script$a), { - icon: "pi pi-exclamation-triangle", - severity: "warn", - value: unref(t)("icon.exclamation-triangle") - }, null, 8, ["value"]), - createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.customSkipsPython")), 1) - ]), - createBaseVNode("ul", null, [ - createBaseVNode("li", null, [ - createBaseVNode("strong", null, toDisplayString(_ctx.$t("install.gpuSelection.customComfyNeedsPython")), 1) - ]), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customManualVenv")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customInstallRequirements")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customMayNotWork")), 1) - ]) - ])) : createCommentVNode("", true), - selected.value === "cpu" ? (openBlock(), createElementBlock("div", _hoisted_15$1, [ - createBaseVNode("p", _hoisted_16$1, [ - createVNode(unref(script$a), { - icon: "pi pi-exclamation-triangle", - severity: "warn", - value: unref(t)("icon.exclamation-triangle") - }, null, 8, ["value"]), - createTextVNode(" " + toDisplayString(_ctx.$t("install.gpuSelection.cpuModeDescription")), 1) - ]), - createBaseVNode("p", _hoisted_17$1, toDisplayString(_ctx.$t("install.gpuSelection.cpuModeDescription2")), 1) - ])) : createCommentVNode("", true) - ]), - createBaseVNode("div", { - class: normalizeClass(["transition-opacity flex gap-3 h-0", { - "opacity-40": selected.value && selected.value !== "cpu" - }]) - }, [ - createVNode(unref(script$7), { - modelValue: cpuMode.value, - "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => cpuMode.value = $event), - inputId: "cpu-mode", - class: "-translate-y-40" - }, null, 8, ["modelValue"]), - createBaseVNode("label", _hoisted_18$1, toDisplayString(_ctx.$t("install.gpuSelection.enableCpuMode")), 1) - ], 2) - ]); - }; - } -}); -const GpuPicker = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-79125ff6"]]); -const _hoisted_1$2 = { class: "flex flex-col gap-6 w-[600px]" }; -const _hoisted_2$2 = { class: "flex flex-col gap-4" }; -const _hoisted_3$2 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_4$2 = { class: "text-neutral-400 my-0" }; -const _hoisted_5$1 = { class: "flex gap-2" }; -const _hoisted_6$1 = { class: "bg-neutral-800 p-4 rounded-lg" }; -const _hoisted_7$1 = { class: "text-lg font-medium mt-0 mb-3 text-neutral-100" }; -const _hoisted_8$1 = { class: "flex flex-col gap-2" }; -const _hoisted_9$1 = { class: "flex items-center gap-2" }; -const _hoisted_10$1 = /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-folder text-neutral-400" }, null, -1); -const _hoisted_11$1 = /* @__PURE__ */ createBaseVNode("span", { class: "text-neutral-400" }, "App Data:", -1); -const _hoisted_12$1 = { class: "text-neutral-200" }; -const _hoisted_13 = { class: "pi pi-info-circle" }; -const _hoisted_14 = { class: "flex items-center gap-2" }; -const _hoisted_15 = /* @__PURE__ */ createBaseVNode("i", { class: "pi pi-desktop text-neutral-400" }, null, -1); -const _hoisted_16 = /* @__PURE__ */ createBaseVNode("span", { class: "text-neutral-400" }, "App Path:", -1); -const _hoisted_17 = { class: "text-neutral-200" }; -const _hoisted_18 = { class: "pi pi-info-circle" }; -const _sfc_main$2 = /* @__PURE__ */ defineComponent({ - __name: "InstallLocationPicker", - props: { - "installPath": { required: true }, - "installPathModifiers": {}, - "pathError": { required: true }, - "pathErrorModifiers": {} - }, - emits: ["update:installPath", "update:pathError"], - setup(__props) { - const { t } = useI18n(); - const installPath = useModel(__props, "installPath"); - const pathError = useModel(__props, "pathError"); - const pathExists = ref(false); - const appData = ref(""); - const appPath = ref(""); - const electron = electronAPI(); - onMounted(async () => { - const paths = await electron.getSystemPaths(); - appData.value = paths.appData; - appPath.value = paths.appPath; - installPath.value = paths.defaultInstallPath; - await validatePath(paths.defaultInstallPath); - }); - const validatePath = /* @__PURE__ */ __name(async (path) => { - try { - pathError.value = ""; - pathExists.value = false; - const validation = await electron.validateInstallPath(path); - if (!validation.isValid) { - const errors = []; - if (validation.cannotWrite) errors.push(t("install.cannotWrite")); - if (validation.freeSpace < validation.requiredSpace) { - const requiredGB = validation.requiredSpace / 1024 / 1024 / 1024; - errors.push(`${t("install.insufficientFreeSpace")}: ${requiredGB} GB`); - } - if (validation.parentMissing) errors.push(t("install.parentMissing")); - if (validation.error) - errors.push(`${t("install.unhandledError")}: ${validation.error}`); - pathError.value = errors.join("\n"); - } - if (validation.exists) pathExists.value = true; - } catch (error) { - pathError.value = t("install.pathValidationFailed"); - } - }, "validatePath"); - const browsePath = /* @__PURE__ */ __name(async () => { - try { - const result = await electron.showDirectoryPicker(); - if (result) { - installPath.value = result; - await validatePath(result); - } - } catch (error) { - pathError.value = t("install.failedToSelectDirectory"); - } - }, "browsePath"); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createElementBlock("div", _hoisted_1$2, [ - createBaseVNode("div", _hoisted_2$2, [ - createBaseVNode("h2", _hoisted_3$2, toDisplayString(_ctx.$t("install.chooseInstallationLocation")), 1), - createBaseVNode("p", _hoisted_4$2, toDisplayString(_ctx.$t("install.installLocationDescription")), 1), - createBaseVNode("div", _hoisted_5$1, [ - createVNode(unref(script$d), { class: "flex-1" }, { - default: withCtx(() => [ - createVNode(unref(script$b), { - modelValue: installPath.value, - "onUpdate:modelValue": [ - _cache[0] || (_cache[0] = ($event) => installPath.value = $event), - validatePath - ], - class: normalizeClass(["w-full", { "p-invalid": pathError.value }]) - }, null, 8, ["modelValue", "class"]), - withDirectives(createVNode(unref(script$c), { class: "pi pi-info-circle" }, null, 512), [ - [_directive_tooltip, _ctx.$t("install.installLocationTooltip")] - ]) - ]), - _: 1 - }), - createVNode(unref(script$e), { - icon: "pi pi-folder", - onClick: browsePath, - class: "w-12" - }) - ]), - pathError.value ? (openBlock(), createBlock(unref(script$f), { - key: 0, - severity: "error", - class: "whitespace-pre-line" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(pathError.value), 1) - ]), - _: 1 - })) : createCommentVNode("", true), - pathExists.value ? (openBlock(), createBlock(unref(script$f), { - key: 1, - severity: "warn" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.pathExists")), 1) - ]), - _: 1 - })) : createCommentVNode("", true) - ]), - createBaseVNode("div", _hoisted_6$1, [ - createBaseVNode("h3", _hoisted_7$1, toDisplayString(_ctx.$t("install.systemLocations")), 1), - createBaseVNode("div", _hoisted_8$1, [ - createBaseVNode("div", _hoisted_9$1, [ - _hoisted_10$1, - _hoisted_11$1, - createBaseVNode("span", _hoisted_12$1, toDisplayString(appData.value), 1), - withDirectives(createBaseVNode("span", _hoisted_13, null, 512), [ - [_directive_tooltip, _ctx.$t("install.appDataLocationTooltip")] - ]) - ]), - createBaseVNode("div", _hoisted_14, [ - _hoisted_15, - _hoisted_16, - createBaseVNode("span", _hoisted_17, toDisplayString(appPath.value), 1), - withDirectives(createBaseVNode("span", _hoisted_18, null, 512), [ - [_directive_tooltip, _ctx.$t("install.appPathLocationTooltip")] - ]) - ]) - ]) - ]) - ]); - }; - } -}); -const _hoisted_1$1 = { class: "flex flex-col gap-6 w-[600px]" }; -const _hoisted_2$1 = { class: "flex flex-col gap-4" }; -const _hoisted_3$1 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_4$1 = { class: "text-neutral-400 my-0" }; -const _hoisted_5 = { class: "flex gap-2" }; -const _hoisted_6 = { - key: 0, - class: "flex flex-col gap-4 bg-neutral-800 p-4 rounded-lg" -}; -const _hoisted_7 = { class: "text-lg mt-0 font-medium text-neutral-100" }; -const _hoisted_8 = { class: "flex flex-col gap-3" }; -const _hoisted_9 = ["onClick"]; -const _hoisted_10 = ["for"]; -const _hoisted_11 = { class: "text-sm text-neutral-400 my-1" }; -const _hoisted_12 = { - key: 1, - class: "text-neutral-400 italic" -}; -const _sfc_main$1 = /* @__PURE__ */ defineComponent({ - __name: "MigrationPicker", - props: { - "sourcePath": { required: false }, - "sourcePathModifiers": {}, - "migrationItemIds": { - required: false - }, - "migrationItemIdsModifiers": {} - }, - emits: ["update:sourcePath", "update:migrationItemIds"], - setup(__props) { - const { t } = useI18n(); - const electron = electronAPI(); - const sourcePath = useModel(__props, "sourcePath"); - const migrationItemIds = useModel(__props, "migrationItemIds"); - const migrationItems = ref( - MigrationItems.map((item) => ({ - ...item, - selected: true - })) - ); - const pathError = ref(""); - const isValidSource = computed( - () => sourcePath.value !== "" && pathError.value === "" - ); - const validateSource = /* @__PURE__ */ __name(async (sourcePath2) => { - if (!sourcePath2) { - pathError.value = ""; - return; - } - try { - pathError.value = ""; - const validation = await electron.validateComfyUISource(sourcePath2); - if (!validation.isValid) pathError.value = validation.error; - } catch (error) { - console.error(error); - pathError.value = t("install.pathValidationFailed"); - } - }, "validateSource"); - const browsePath = /* @__PURE__ */ __name(async () => { - try { - const result = await electron.showDirectoryPicker(); - if (result) { - sourcePath.value = result; - await validateSource(result); - } - } catch (error) { - console.error(error); - pathError.value = t("install.failedToSelectDirectory"); - } - }, "browsePath"); - watchEffect(() => { - migrationItemIds.value = migrationItems.value.filter((item) => item.selected).map((item) => item.id); - }); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("div", _hoisted_1$1, [ - createBaseVNode("div", _hoisted_2$1, [ - createBaseVNode("h2", _hoisted_3$1, toDisplayString(_ctx.$t("install.migrateFromExistingInstallation")), 1), - createBaseVNode("p", _hoisted_4$1, toDisplayString(_ctx.$t("install.migrationSourcePathDescription")), 1), - createBaseVNode("div", _hoisted_5, [ - createVNode(unref(script$b), { - modelValue: sourcePath.value, - "onUpdate:modelValue": [ - _cache[0] || (_cache[0] = ($event) => sourcePath.value = $event), - validateSource - ], - placeholder: "Select existing ComfyUI installation (optional)", - class: normalizeClass(["flex-1", { "p-invalid": pathError.value }]) - }, null, 8, ["modelValue", "class"]), - createVNode(unref(script$e), { - icon: "pi pi-folder", - onClick: browsePath, - class: "w-12" - }) - ]), - pathError.value ? (openBlock(), createBlock(unref(script$f), { - key: 0, - severity: "error" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(pathError.value), 1) - ]), - _: 1 - })) : createCommentVNode("", true) - ]), - isValidSource.value ? (openBlock(), createElementBlock("div", _hoisted_6, [ - createBaseVNode("h3", _hoisted_7, toDisplayString(_ctx.$t("install.selectItemsToMigrate")), 1), - createBaseVNode("div", _hoisted_8, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(migrationItems.value, (item) => { - return openBlock(), createElementBlock("div", { - key: item.id, - class: "flex items-center gap-3 p-2 hover:bg-neutral-700 rounded", - onClick: /* @__PURE__ */ __name(($event) => item.selected = !item.selected, "onClick") - }, [ - createVNode(unref(script$g), { - modelValue: item.selected, - "onUpdate:modelValue": /* @__PURE__ */ __name(($event) => item.selected = $event, "onUpdate:modelValue"), - inputId: item.id, - binary: true, - onClick: _cache[1] || (_cache[1] = withModifiers(() => { - }, ["stop"])) - }, null, 8, ["modelValue", "onUpdate:modelValue", "inputId"]), - createBaseVNode("div", null, [ - createBaseVNode("label", { - for: item.id, - class: "text-neutral-200 font-medium" - }, toDisplayString(item.label), 9, _hoisted_10), - createBaseVNode("p", _hoisted_11, toDisplayString(item.description), 1) - ]) - ], 8, _hoisted_9); - }), 128)) - ]) - ])) : (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString(_ctx.$t("install.migrationOptional")), 1)) - ]); - }; - } -}); -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-0a97b0ae"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = { class: "flex pt-6 justify-end" }; -const _hoisted_2 = { class: "flex pt-6 justify-between" }; -const _hoisted_3 = { class: "flex pt-6 justify-between" }; -const _hoisted_4 = { class: "flex pt-6 justify-between" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "InstallView", - setup(__props) { - const device = ref(null); - const installPath = ref(""); - const pathError = ref(""); - const migrationSourcePath = ref(""); - const migrationItemIds = ref([]); - const autoUpdate = ref(true); - const allowMetrics = ref(true); - const highestStep = ref(0); - const handleStepChange = /* @__PURE__ */ __name((value2) => { - setHighestStep(value2); - electronAPI().Events.trackEvent("install_stepper_change", { - step: value2 - }); - }, "handleStepChange"); - const setHighestStep = /* @__PURE__ */ __name((value2) => { - const int = typeof value2 === "number" ? value2 : parseInt(value2, 10); - if (!isNaN(int) && int > highestStep.value) highestStep.value = int; - }, "setHighestStep"); - const hasError = computed(() => pathError.value !== ""); - const noGpu = computed(() => typeof device.value !== "string"); - const electron = electronAPI(); - const router = useRouter(); - const install = /* @__PURE__ */ __name(() => { - const options = { - installPath: installPath.value, - autoUpdate: autoUpdate.value, - allowMetrics: allowMetrics.value, - migrationSourcePath: migrationSourcePath.value, - migrationItemIds: toRaw(migrationItemIds.value), - device: device.value - }; - electron.installComfyUI(options); - const nextPage = options.device === "unsupported" ? "/manual-configuration" : "/server-start"; - router.push(nextPage); - }, "install"); - onMounted(async () => { - if (!electron) return; - const detectedGpu = await electron.Config.getDetectedGpu(); - if (detectedGpu === "mps" || detectedGpu === "nvidia") { - device.value = detectedGpu; - } - electronAPI().Events.trackEvent("install_stepper_change", { - step: "0", - gpu: detectedGpu - }); - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$5, { dark: "" }, { - default: withCtx(() => [ - createVNode(unref(script), { - class: "h-full p-8 2xl:p-16", - value: "0", - "onUpdate:value": handleStepChange - }, { - default: withCtx(() => [ - createVNode(unref(script$4), { class: "select-none" }, { - default: withCtx(() => [ - createVNode(unref(script$5), { value: "0" }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.gpu")), 1) - ]), - _: 1 - }), - createVNode(unref(script$5), { - value: "1", - disabled: noGpu.value - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.installLocation")), 1) - ]), - _: 1 - }, 8, ["disabled"]), - createVNode(unref(script$5), { - value: "2", - disabled: noGpu.value || hasError.value || highestStep.value < 1 - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.migration")), 1) - ]), - _: 1 - }, 8, ["disabled"]), - createVNode(unref(script$5), { - value: "3", - disabled: noGpu.value || hasError.value || highestStep.value < 2 - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(_ctx.$t("install.desktopSettings")), 1) - ]), - _: 1 - }, 8, ["disabled"]) - ]), - _: 1 - }), - createVNode(unref(script$2), null, { - default: withCtx(() => [ - createVNode(unref(script$3), { value: "0" }, { - default: withCtx(({ activateCallback }) => [ - createVNode(GpuPicker, { - device: device.value, - "onUpdate:device": _cache[0] || (_cache[0] = ($event) => device.value = $event) - }, null, 8, ["device"]), - createBaseVNode("div", _hoisted_1, [ - createVNode(unref(script$e), { - label: _ctx.$t("g.next"), - icon: "pi pi-arrow-right", - iconPos: "right", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("1"), "onClick"), - disabled: typeof device.value !== "string" - }, null, 8, ["label", "onClick", "disabled"]) - ]) - ]), - _: 1 - }), - createVNode(unref(script$3), { value: "1" }, { - default: withCtx(({ activateCallback }) => [ - createVNode(_sfc_main$2, { - installPath: installPath.value, - "onUpdate:installPath": _cache[1] || (_cache[1] = ($event) => installPath.value = $event), - pathError: pathError.value, - "onUpdate:pathError": _cache[2] || (_cache[2] = ($event) => pathError.value = $event) - }, null, 8, ["installPath", "pathError"]), - createBaseVNode("div", _hoisted_2, [ - createVNode(unref(script$e), { - label: _ctx.$t("g.back"), - severity: "secondary", - icon: "pi pi-arrow-left", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("0"), "onClick") - }, null, 8, ["label", "onClick"]), - createVNode(unref(script$e), { - label: _ctx.$t("g.next"), - icon: "pi pi-arrow-right", - iconPos: "right", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("2"), "onClick"), - disabled: pathError.value !== "" - }, null, 8, ["label", "onClick", "disabled"]) - ]) - ]), - _: 1 - }), - createVNode(unref(script$3), { value: "2" }, { - default: withCtx(({ activateCallback }) => [ - createVNode(_sfc_main$1, { - sourcePath: migrationSourcePath.value, - "onUpdate:sourcePath": _cache[3] || (_cache[3] = ($event) => migrationSourcePath.value = $event), - migrationItemIds: migrationItemIds.value, - "onUpdate:migrationItemIds": _cache[4] || (_cache[4] = ($event) => migrationItemIds.value = $event) - }, null, 8, ["sourcePath", "migrationItemIds"]), - createBaseVNode("div", _hoisted_3, [ - createVNode(unref(script$e), { - label: _ctx.$t("g.back"), - severity: "secondary", - icon: "pi pi-arrow-left", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("1"), "onClick") - }, null, 8, ["label", "onClick"]), - createVNode(unref(script$e), { - label: _ctx.$t("g.next"), - icon: "pi pi-arrow-right", - iconPos: "right", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("3"), "onClick") - }, null, 8, ["label", "onClick"]) - ]) - ]), - _: 1 - }), - createVNode(unref(script$3), { value: "3" }, { - default: withCtx(({ activateCallback }) => [ - createVNode(_sfc_main$4, { - autoUpdate: autoUpdate.value, - "onUpdate:autoUpdate": _cache[5] || (_cache[5] = ($event) => autoUpdate.value = $event), - allowMetrics: allowMetrics.value, - "onUpdate:allowMetrics": _cache[6] || (_cache[6] = ($event) => allowMetrics.value = $event) - }, null, 8, ["autoUpdate", "allowMetrics"]), - createBaseVNode("div", _hoisted_4, [ - createVNode(unref(script$e), { - label: _ctx.$t("g.back"), - severity: "secondary", - icon: "pi pi-arrow-left", - onClick: /* @__PURE__ */ __name(($event) => activateCallback("2"), "onClick") - }, null, 8, ["label", "onClick"]), - createVNode(unref(script$e), { - label: _ctx.$t("g.install"), - icon: "pi pi-check", - iconPos: "right", - disabled: hasError.value, - onClick: _cache[7] || (_cache[7] = ($event) => install()) - }, null, 8, ["label", "disabled"]) - ]) - ]), - _: 1 - }) - ]), - _: 1 - }) - ]), - _: 1 - }) - ]), - _: 1 - }); - }; - } -}); -const InstallView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0a97b0ae"]]); -export { - InstallView as default -}; -//# sourceMappingURL=InstallView-By3hC1fC.js.map diff --git a/web/assets/InstallView-CxhfFC8Y.css b/web/assets/InstallView-CxhfFC8Y.css deleted file mode 100644 index a406c8695..000000000 --- a/web/assets/InstallView-CxhfFC8Y.css +++ /dev/null @@ -1,79 +0,0 @@ - -.p-tag[data-v-79125ff6] { - --p-tag-gap: 0.5rem; -} -.hover-brighten[data-v-79125ff6] { - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; - transition-property: filter, box-shadow; -&[data-v-79125ff6]:hover { - filter: brightness(107%) contrast(105%); - box-shadow: 0 0 0.25rem #ffffff79; -} -} -.p-accordioncontent-content[data-v-79125ff6] { - border-radius: 0.5rem; - --tw-bg-opacity: 1; - background-color: rgb(23 23 23 / var(--tw-bg-opacity)); - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} -div.selected[data-v-79125ff6] { -.gpu-button[data-v-79125ff6]:not(.selected) { - opacity: 0.5; -} -.gpu-button[data-v-79125ff6]:not(.selected):hover { - opacity: 1; -} -} -.gpu-button[data-v-79125ff6] { - margin: 0px; - display: flex; - width: 50%; - cursor: pointer; - flex-direction: column; - align-items: center; - justify-content: space-around; - border-radius: 0.5rem; - background-color: rgb(38 38 38 / var(--tw-bg-opacity)); - --tw-bg-opacity: 0.5; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} -.gpu-button[data-v-79125ff6]:hover { - --tw-bg-opacity: 0.75; -} -.gpu-button[data-v-79125ff6] { -&.selected[data-v-79125ff6] { - --tw-bg-opacity: 1; - background-color: rgb(64 64 64 / var(--tw-bg-opacity)); -} -&.selected[data-v-79125ff6] { - --tw-bg-opacity: 0.5; -} -&.selected[data-v-79125ff6] { - opacity: 1; -} -&.selected[data-v-79125ff6]:hover { - --tw-bg-opacity: 0.6; -} -} -.disabled[data-v-79125ff6] { - pointer-events: none; - opacity: 0.4; -} -.p-card-header[data-v-79125ff6] { - flex-grow: 1; - text-align: center; -} -.p-card-body[data-v-79125ff6] { - padding-top: 0px; - text-align: center; -} - -[data-v-0a97b0ae] .p-steppanel { - background-color: transparent -} diff --git a/web/assets/KeybindingPanel-D6O16W_1.js b/web/assets/KeybindingPanel-D6O16W_1.js deleted file mode 100644 index b0fbfd845..000000000 --- a/web/assets/KeybindingPanel-D6O16W_1.js +++ /dev/null @@ -1,283 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, c as computed, o as openBlock, f as createElementBlock, H as Fragment, I as renderList, k as createVNode, P as withCtx, aG as createTextVNode, Z as toDisplayString, j as unref, aK as script, L as createCommentVNode, ad as ref, cu as FilterMatchMode, a$ as useKeybindingStore, a4 as useCommandStore, a3 as useI18n, ah as normalizeI18nKey, w as watchEffect, bz as useToast, r as resolveDirective, J as createBlock, cv as SearchBox, m as createBaseVNode, l as script$2, ax as script$4, b3 as withModifiers, c6 as script$5, aP as script$6, i as withDirectives, cw as _sfc_main$2, p as pushScopeId, q as popScopeId, cx as KeyComboImpl, cy as KeybindingImpl, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { s as script$1, a as script$3 } from "./index-DpF-ptbJ.js"; -import { u as useKeybindingService } from "./keybindingService-Cak1En5n.js"; -import "./index-Q1cQr26V.js"; -const _hoisted_1$1 = { - key: 0, - class: "px-2" -}; -const _sfc_main$1 = /* @__PURE__ */ defineComponent({ - __name: "KeyComboDisplay", - props: { - keyCombo: {}, - isModified: { type: Boolean, default: false } - }, - setup(__props) { - const props = __props; - const keySequences = computed(() => props.keyCombo.getKeySequences()); - return (_ctx, _cache) => { - return openBlock(), createElementBlock("span", null, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(keySequences.value, (sequence, index) => { - return openBlock(), createElementBlock(Fragment, { key: index }, [ - createVNode(unref(script), { - severity: _ctx.isModified ? "info" : "secondary" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(sequence), 1) - ]), - _: 2 - }, 1032, ["severity"]), - index < keySequences.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_1$1, "+")) : createCommentVNode("", true) - ], 64); - }), 128)) - ]); - }; - } -}); -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-2554ab36"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = { class: "actions invisible flex flex-row" }; -const _hoisted_2 = ["title"]; -const _hoisted_3 = { key: 1 }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "KeybindingPanel", - setup(__props) { - const filters = ref({ - global: { value: "", matchMode: FilterMatchMode.CONTAINS } - }); - const keybindingStore = useKeybindingStore(); - const keybindingService = useKeybindingService(); - const commandStore = useCommandStore(); - const { t } = useI18n(); - const commandsData = computed(() => { - return Object.values(commandStore.commands).map((command) => ({ - id: command.id, - label: t(`commands.${normalizeI18nKey(command.id)}.label`, command.label), - keybinding: keybindingStore.getKeybindingByCommandId(command.id) - })); - }); - const selectedCommandData = ref(null); - const editDialogVisible = ref(false); - const newBindingKeyCombo = ref(null); - const currentEditingCommand = ref(null); - const keybindingInput = ref(null); - const existingKeybindingOnCombo = computed(() => { - if (!currentEditingCommand.value) { - return null; - } - if (currentEditingCommand.value.keybinding?.combo?.equals( - newBindingKeyCombo.value - )) { - return null; - } - if (!newBindingKeyCombo.value) { - return null; - } - return keybindingStore.getKeybinding(newBindingKeyCombo.value); - }); - function editKeybinding(commandData) { - currentEditingCommand.value = commandData; - newBindingKeyCombo.value = commandData.keybinding ? commandData.keybinding.combo : null; - editDialogVisible.value = true; - } - __name(editKeybinding, "editKeybinding"); - watchEffect(() => { - if (editDialogVisible.value) { - setTimeout(() => { - keybindingInput.value?.$el?.focus(); - }, 300); - } - }); - function removeKeybinding(commandData) { - if (commandData.keybinding) { - keybindingStore.unsetKeybinding(commandData.keybinding); - keybindingService.persistUserKeybindings(); - } - } - __name(removeKeybinding, "removeKeybinding"); - function captureKeybinding(event) { - const keyCombo = KeyComboImpl.fromEvent(event); - newBindingKeyCombo.value = keyCombo; - } - __name(captureKeybinding, "captureKeybinding"); - function cancelEdit() { - editDialogVisible.value = false; - currentEditingCommand.value = null; - newBindingKeyCombo.value = null; - } - __name(cancelEdit, "cancelEdit"); - function saveKeybinding() { - if (currentEditingCommand.value && newBindingKeyCombo.value) { - const updated = keybindingStore.updateKeybindingOnCommand( - new KeybindingImpl({ - commandId: currentEditingCommand.value.id, - combo: newBindingKeyCombo.value - }) - ); - if (updated) { - keybindingService.persistUserKeybindings(); - } - } - cancelEdit(); - } - __name(saveKeybinding, "saveKeybinding"); - const toast = useToast(); - async function resetKeybindings() { - keybindingStore.resetKeybindings(); - await keybindingService.persistUserKeybindings(); - toast.add({ - severity: "info", - summary: "Info", - detail: "Keybindings reset", - life: 3e3 - }); - } - __name(resetKeybindings, "resetKeybindings"); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createBlock(_sfc_main$2, { - value: "Keybinding", - class: "keybinding-panel" - }, { - header: withCtx(() => [ - createVNode(SearchBox, { - modelValue: filters.value["global"].value, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filters.value["global"].value = $event), - placeholder: _ctx.$t("g.searchKeybindings") + "..." - }, null, 8, ["modelValue", "placeholder"]) - ]), - default: withCtx(() => [ - createVNode(unref(script$3), { - value: commandsData.value, - selection: selectedCommandData.value, - "onUpdate:selection": _cache[1] || (_cache[1] = ($event) => selectedCommandData.value = $event), - "global-filter-fields": ["id"], - filters: filters.value, - selectionMode: "single", - stripedRows: "", - pt: { - header: "px-0" - } - }, { - default: withCtx(() => [ - createVNode(unref(script$1), { - field: "actions", - header: "" - }, { - body: withCtx((slotProps) => [ - createBaseVNode("div", _hoisted_1, [ - createVNode(unref(script$2), { - icon: "pi pi-pencil", - class: "p-button-text", - onClick: /* @__PURE__ */ __name(($event) => editKeybinding(slotProps.data), "onClick") - }, null, 8, ["onClick"]), - createVNode(unref(script$2), { - icon: "pi pi-trash", - class: "p-button-text p-button-danger", - onClick: /* @__PURE__ */ __name(($event) => removeKeybinding(slotProps.data), "onClick"), - disabled: !slotProps.data.keybinding - }, null, 8, ["onClick", "disabled"]) - ]) - ]), - _: 1 - }), - createVNode(unref(script$1), { - field: "id", - header: _ctx.$t("g.command"), - sortable: "", - class: "max-w-64 2xl:max-w-full" - }, { - body: withCtx((slotProps) => [ - createBaseVNode("div", { - class: "overflow-hidden text-ellipsis whitespace-nowrap", - title: slotProps.data.id - }, toDisplayString(slotProps.data.label), 9, _hoisted_2) - ]), - _: 1 - }, 8, ["header"]), - createVNode(unref(script$1), { - field: "keybinding", - header: _ctx.$t("g.keybinding") - }, { - body: withCtx((slotProps) => [ - slotProps.data.keybinding ? (openBlock(), createBlock(_sfc_main$1, { - key: 0, - keyCombo: slotProps.data.keybinding.combo, - isModified: unref(keybindingStore).isCommandKeybindingModified(slotProps.data.id) - }, null, 8, ["keyCombo", "isModified"])) : (openBlock(), createElementBlock("span", _hoisted_3, "-")) - ]), - _: 1 - }, 8, ["header"]) - ]), - _: 1 - }, 8, ["value", "selection", "filters"]), - createVNode(unref(script$6), { - class: "min-w-96", - visible: editDialogVisible.value, - "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => editDialogVisible.value = $event), - modal: "", - header: currentEditingCommand.value?.id, - onHide: cancelEdit - }, { - footer: withCtx(() => [ - createVNode(unref(script$2), { - label: "Save", - icon: "pi pi-check", - onClick: saveKeybinding, - disabled: !!existingKeybindingOnCombo.value, - autofocus: "" - }, null, 8, ["disabled"]) - ]), - default: withCtx(() => [ - createBaseVNode("div", null, [ - createVNode(unref(script$4), { - class: "mb-2 text-center", - ref_key: "keybindingInput", - ref: keybindingInput, - modelValue: newBindingKeyCombo.value?.toString() ?? "", - placeholder: "Press keys for new binding", - onKeydown: withModifiers(captureKeybinding, ["stop", "prevent"]), - autocomplete: "off", - fluid: "", - invalid: !!existingKeybindingOnCombo.value - }, null, 8, ["modelValue", "invalid"]), - existingKeybindingOnCombo.value ? (openBlock(), createBlock(unref(script$5), { - key: 0, - severity: "error" - }, { - default: withCtx(() => [ - createTextVNode(" Keybinding already exists on "), - createVNode(unref(script), { - severity: "secondary", - value: existingKeybindingOnCombo.value.commandId - }, null, 8, ["value"]) - ]), - _: 1 - })) : createCommentVNode("", true) - ]) - ]), - _: 1 - }, 8, ["visible", "header"]), - withDirectives(createVNode(unref(script$2), { - class: "mt-4", - label: _ctx.$t("g.reset"), - icon: "pi pi-trash", - severity: "danger", - fluid: "", - text: "", - onClick: resetKeybindings - }, null, 8, ["label"]), [ - [_directive_tooltip, _ctx.$t("g.resetKeybindingsTooltip")] - ]) - ]), - _: 1 - }); - }; - } -}); -const KeybindingPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2554ab36"]]); -export { - KeybindingPanel as default -}; -//# sourceMappingURL=KeybindingPanel-D6O16W_1.js.map diff --git a/web/assets/KeybindingPanel-DvrUYZ4S.css b/web/assets/KeybindingPanel-DvrUYZ4S.css deleted file mode 100644 index 8f714bcdb..000000000 --- a/web/assets/KeybindingPanel-DvrUYZ4S.css +++ /dev/null @@ -1,8 +0,0 @@ - -[data-v-2554ab36] .p-datatable-tbody > tr > td { - padding: 0.25rem; - min-height: 2rem -} -[data-v-2554ab36] .p-datatable-row-selected .actions,[data-v-2554ab36] .p-datatable-selectable-row:hover .actions { - visibility: visible -} diff --git a/web/assets/ManualConfigurationView-CsirlNfV.css b/web/assets/ManualConfigurationView-CsirlNfV.css deleted file mode 100644 index dba81a0bb..000000000 --- a/web/assets/ManualConfigurationView-CsirlNfV.css +++ /dev/null @@ -1,7 +0,0 @@ - -.p-tag[data-v-dc169863] { - --p-tag-gap: 0.5rem; -} -.comfy-installer[data-v-dc169863] { - margin-top: max(1rem, max(0px, calc((100vh - 42rem) * 0.5))); -} diff --git a/web/assets/ManualConfigurationView-enyqGo0M.js b/web/assets/ManualConfigurationView-enyqGo0M.js deleted file mode 100644 index 43131f52c..000000000 --- a/web/assets/ManualConfigurationView-enyqGo0M.js +++ /dev/null @@ -1,75 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, a3 as useI18n, ad as ref, t as onMounted, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, j as unref, aK as script, bN as script$1, l as script$2, p as pushScopeId, q as popScopeId, bV as electronAPI, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-dc169863"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = { class: "comfy-installer grow flex flex-col gap-4 text-neutral-300 max-w-110" }; -const _hoisted_2 = { class: "text-2xl font-semibold text-neutral-100" }; -const _hoisted_3 = { class: "m-1 text-neutral-300" }; -const _hoisted_4 = { class: "ml-2" }; -const _hoisted_5 = { class: "m-1 mb-4" }; -const _hoisted_6 = { class: "m-0" }; -const _hoisted_7 = { class: "m-1" }; -const _hoisted_8 = { class: "font-mono" }; -const _hoisted_9 = { class: "m-1" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "ManualConfigurationView", - setup(__props) { - const { t } = useI18n(); - const electron = electronAPI(); - const basePath = ref(null); - const sep = ref("/"); - const restartApp = /* @__PURE__ */ __name((message) => electron.restartApp(message), "restartApp"); - onMounted(async () => { - basePath.value = await electron.getBasePath(); - if (basePath.value.indexOf("/") === -1) sep.value = "\\"; - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$1, { dark: "" }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - createBaseVNode("h2", _hoisted_2, toDisplayString(_ctx.$t("install.manualConfiguration.title")), 1), - createBaseVNode("p", _hoisted_3, [ - createVNode(unref(script), { - icon: "pi pi-exclamation-triangle", - severity: "warn", - value: unref(t)("icon.exclamation-triangle") - }, null, 8, ["value"]), - createBaseVNode("strong", _hoisted_4, toDisplayString(_ctx.$t("install.gpuSelection.customComfyNeedsPython")), 1) - ]), - createBaseVNode("div", null, [ - createBaseVNode("p", _hoisted_5, toDisplayString(_ctx.$t("install.manualConfiguration.requirements")) + ": ", 1), - createBaseVNode("ul", _hoisted_6, [ - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customManualVenv")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t("install.gpuSelection.customInstallRequirements")), 1) - ]) - ]), - createBaseVNode("p", _hoisted_7, toDisplayString(_ctx.$t("install.manualConfiguration.createVenv")) + ":", 1), - createVNode(unref(script$1), { - header: unref(t)("install.manualConfiguration.virtualEnvironmentPath") - }, { - default: withCtx(() => [ - createBaseVNode("span", _hoisted_8, toDisplayString(`${basePath.value}${sep.value}.venv${sep.value}`), 1) - ]), - _: 1 - }, 8, ["header"]), - createBaseVNode("p", _hoisted_9, toDisplayString(_ctx.$t("install.manualConfiguration.restartWhenFinished")), 1), - createVNode(unref(script$2), { - class: "place-self-end", - label: unref(t)("menuLabels.Restart"), - severity: "warn", - icon: "pi pi-refresh", - onClick: _cache[0] || (_cache[0] = ($event) => restartApp("Manual configuration complete")) - }, null, 8, ["label"]) - ]) - ]), - _: 1 - }); - }; - } -}); -const ManualConfigurationView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dc169863"]]); -export { - ManualConfigurationView as default -}; -//# sourceMappingURL=ManualConfigurationView-enyqGo0M.js.map diff --git a/web/assets/MetricsConsentView-lSfLu4nr.js b/web/assets/MetricsConsentView-lSfLu4nr.js deleted file mode 100644 index a53fdbb9c..000000000 --- a/web/assets/MetricsConsentView-lSfLu4nr.js +++ /dev/null @@ -1,86 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -import { d as defineComponent, bz as useToast, a3 as useI18n, ad as ref, c2 as useRouter, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, aG as createTextVNode, k as createVNode, j as unref, cc as script, l as script$1, bV as electronAPI } from "./index-QvfM__ze.js"; -const _hoisted_1 = { class: "h-full p-8 2xl:p-16 flex flex-col items-center justify-center" }; -const _hoisted_2 = { class: "bg-neutral-800 rounded-lg shadow-lg p-6 w-full max-w-[600px] flex flex-col gap-6" }; -const _hoisted_3 = { class: "text-3xl font-semibold text-neutral-100" }; -const _hoisted_4 = { class: "text-neutral-400" }; -const _hoisted_5 = { class: "text-neutral-400" }; -const _hoisted_6 = { - href: "https://comfy.org/privacy", - target: "_blank", - class: "text-blue-400 hover:text-blue-300 underline" -}; -const _hoisted_7 = { class: "flex items-center gap-4" }; -const _hoisted_8 = { - id: "metricsDescription", - class: "text-neutral-100" -}; -const _hoisted_9 = { class: "flex pt-6 justify-end" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "MetricsConsentView", - setup(__props) { - const toast = useToast(); - const { t } = useI18n(); - const allowMetrics = ref(true); - const router = useRouter(); - const isUpdating = ref(false); - const updateConsent = /* @__PURE__ */ __name(async () => { - isUpdating.value = true; - try { - await electronAPI().setMetricsConsent(allowMetrics.value); - } catch (error) { - toast.add({ - severity: "error", - summary: t("install.errorUpdatingConsent"), - detail: t("install.errorUpdatingConsentDetail"), - life: 3e3 - }); - } finally { - isUpdating.value = false; - } - router.push("/"); - }, "updateConsent"); - return (_ctx, _cache) => { - const _component_BaseViewTemplate = _sfc_main$1; - return openBlock(), createBlock(_component_BaseViewTemplate, { dark: "" }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - createBaseVNode("div", _hoisted_2, [ - createBaseVNode("h2", _hoisted_3, toDisplayString(_ctx.$t("install.helpImprove")), 1), - createBaseVNode("p", _hoisted_4, toDisplayString(_ctx.$t("install.updateConsent")), 1), - createBaseVNode("p", _hoisted_5, [ - createTextVNode(toDisplayString(_ctx.$t("install.moreInfo")) + " ", 1), - createBaseVNode("a", _hoisted_6, toDisplayString(_ctx.$t("install.privacyPolicy")), 1), - createTextVNode(". ") - ]), - createBaseVNode("div", _hoisted_7, [ - createVNode(unref(script), { - modelValue: allowMetrics.value, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => allowMetrics.value = $event), - "aria-describedby": "metricsDescription" - }, null, 8, ["modelValue"]), - createBaseVNode("span", _hoisted_8, toDisplayString(allowMetrics.value ? _ctx.$t("install.metricsEnabled") : _ctx.$t("install.metricsDisabled")), 1) - ]), - createBaseVNode("div", _hoisted_9, [ - createVNode(unref(script$1), { - label: _ctx.$t("g.ok"), - icon: "pi pi-check", - loading: isUpdating.value, - iconPos: "right", - onClick: updateConsent - }, null, 8, ["label", "loading"]) - ]) - ]) - ]) - ]), - _: 1 - }); - }; - } -}); -export { - _sfc_main as default -}; -//# sourceMappingURL=MetricsConsentView-lSfLu4nr.js.map diff --git a/web/assets/NotSupportedView-DQerxQzi.css b/web/assets/NotSupportedView-DQerxQzi.css deleted file mode 100644 index 3b90d2796..000000000 --- a/web/assets/NotSupportedView-DQerxQzi.css +++ /dev/null @@ -1,17 +0,0 @@ - -.sad-container[data-v-ebb20958] { - display: grid; - align-items: center; - justify-content: space-evenly; - grid-template-columns: 25rem 1fr; -&[data-v-ebb20958] > * { - grid-row: 1; -} -} -.sad-text[data-v-ebb20958] { - grid-column: 1/3; -} -.sad-girl[data-v-ebb20958] { - grid-column: 2/3; - width: min(75vw, 100vh); -} diff --git a/web/assets/NotSupportedView-Vc8_xWgH.js b/web/assets/NotSupportedView-Vc8_xWgH.js deleted file mode 100644 index ebc712a47..000000000 --- a/web/assets/NotSupportedView-Vc8_xWgH.js +++ /dev/null @@ -1,88 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, c2 as useRouter, r as resolveDirective, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, j as unref, l as script, i as withDirectives, p as pushScopeId, q as popScopeId, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _imports_0 = "" + new URL("images/sad_girl.png", import.meta.url).href; -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-ebb20958"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = { class: "sad-container" }; -const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createBaseVNode("img", { - class: "sad-girl", - src: _imports_0, - alt: "Sad girl illustration" -}, null, -1)); -const _hoisted_3 = { class: "no-drag sad-text flex items-center" }; -const _hoisted_4 = { class: "flex flex-col gap-8 p-8 min-w-110" }; -const _hoisted_5 = { class: "text-4xl font-bold text-red-500" }; -const _hoisted_6 = { class: "space-y-4" }; -const _hoisted_7 = { class: "text-xl" }; -const _hoisted_8 = { class: "list-disc list-inside space-y-1 text-neutral-800" }; -const _hoisted_9 = { class: "flex gap-4" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "NotSupportedView", - setup(__props) { - const openDocs = /* @__PURE__ */ __name(() => { - window.open( - "https://github.com/Comfy-Org/desktop#currently-supported-platforms", - "_blank" - ); - }, "openDocs"); - const reportIssue = /* @__PURE__ */ __name(() => { - window.open("https://forum.comfy.org/c/v1-feedback/", "_blank"); - }, "reportIssue"); - const router = useRouter(); - const continueToInstall = /* @__PURE__ */ __name(() => { - router.push("/install"); - }, "continueToInstall"); - return (_ctx, _cache) => { - const _directive_tooltip = resolveDirective("tooltip"); - return openBlock(), createBlock(_sfc_main$1, null, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - _hoisted_2, - createBaseVNode("div", _hoisted_3, [ - createBaseVNode("div", _hoisted_4, [ - createBaseVNode("h1", _hoisted_5, toDisplayString(_ctx.$t("notSupported.title")), 1), - createBaseVNode("div", _hoisted_6, [ - createBaseVNode("p", _hoisted_7, toDisplayString(_ctx.$t("notSupported.message")), 1), - createBaseVNode("ul", _hoisted_8, [ - createBaseVNode("li", null, toDisplayString(_ctx.$t("notSupported.supportedDevices.macos")), 1), - createBaseVNode("li", null, toDisplayString(_ctx.$t("notSupported.supportedDevices.windows")), 1) - ]) - ]), - createBaseVNode("div", _hoisted_9, [ - createVNode(unref(script), { - label: _ctx.$t("notSupported.learnMore"), - icon: "pi pi-github", - onClick: openDocs, - severity: "secondary" - }, null, 8, ["label"]), - createVNode(unref(script), { - label: _ctx.$t("notSupported.reportIssue"), - icon: "pi pi-flag", - onClick: reportIssue, - severity: "secondary" - }, null, 8, ["label"]), - withDirectives(createVNode(unref(script), { - label: _ctx.$t("notSupported.continue"), - icon: "pi pi-arrow-right", - iconPos: "right", - onClick: continueToInstall, - severity: "danger" - }, null, 8, ["label"]), [ - [_directive_tooltip, _ctx.$t("notSupported.continueTooltip")] - ]) - ]) - ]) - ]) - ]) - ]), - _: 1 - }); - }; - } -}); -const NotSupportedView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ebb20958"]]); -export { - NotSupportedView as default -}; -//# sourceMappingURL=NotSupportedView-Vc8_xWgH.js.map diff --git a/web/assets/ServerConfigPanel-B-w0HFlz.js b/web/assets/ServerConfigPanel-B-w0HFlz.js deleted file mode 100644 index d00cf672a..000000000 --- a/web/assets/ServerConfigPanel-B-w0HFlz.js +++ /dev/null @@ -1,158 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { m as createBaseVNode, o as openBlock, f as createElementBlock, a0 as markRaw, d as defineComponent, a as useSettingStore, aS as storeToRefs, a7 as watch, cW as useCopyToClipboard, a3 as useI18n, J as createBlock, P as withCtx, j as unref, c6 as script, Z as toDisplayString, I as renderList, H as Fragment, k as createVNode, l as script$1, L as createCommentVNode, c4 as script$2, cX as FormItem, cw as _sfc_main$1, bV as electronAPI } from "./index-QvfM__ze.js"; -import { u as useServerConfigStore } from "./serverConfigStore-DCme3xlV.js"; -const _hoisted_1$1 = { - viewBox: "0 0 24 24", - width: "1.2em", - height: "1.2em" -}; -const _hoisted_2$1 = /* @__PURE__ */ createBaseVNode("path", { - fill: "none", - stroke: "currentColor", - "stroke-linecap": "round", - "stroke-linejoin": "round", - "stroke-width": "2", - d: "m4 17l6-6l-6-6m8 14h8" -}, null, -1); -const _hoisted_3$1 = [ - _hoisted_2$1 -]; -function render(_ctx, _cache) { - return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._hoisted_3$1]); -} -__name(render, "render"); -const __unplugin_components_0 = markRaw({ name: "lucide-terminal", render }); -const _hoisted_1 = { class: "flex flex-col gap-2" }; -const _hoisted_2 = { class: "flex justify-end gap-2" }; -const _hoisted_3 = { class: "flex items-center justify-between" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "ServerConfigPanel", - setup(__props) { - const settingStore = useSettingStore(); - const serverConfigStore = useServerConfigStore(); - const { - serverConfigsByCategory, - serverConfigValues, - launchArgs, - commandLineArgs, - modifiedConfigs - } = storeToRefs(serverConfigStore); - const revertChanges = /* @__PURE__ */ __name(() => { - serverConfigStore.revertChanges(); - }, "revertChanges"); - const restartApp = /* @__PURE__ */ __name(() => { - electronAPI().restartApp(); - }, "restartApp"); - watch(launchArgs, (newVal) => { - settingStore.set("Comfy.Server.LaunchArgs", newVal); - }); - watch(serverConfigValues, (newVal) => { - settingStore.set("Comfy.Server.ServerConfigValues", newVal); - }); - const { copyToClipboard } = useCopyToClipboard(); - const copyCommandLineArgs = /* @__PURE__ */ __name(async () => { - await copyToClipboard(commandLineArgs.value); - }, "copyCommandLineArgs"); - const { t } = useI18n(); - const translateItem = /* @__PURE__ */ __name((item) => { - return { - ...item, - name: t(`serverConfigItems.${item.id}.name`, item.name), - tooltip: item.tooltip ? t(`serverConfigItems.${item.id}.tooltip`, item.tooltip) : void 0 - }; - }, "translateItem"); - return (_ctx, _cache) => { - const _component_i_lucide58terminal = __unplugin_components_0; - return openBlock(), createBlock(_sfc_main$1, { - value: "Server-Config", - class: "server-config-panel" - }, { - header: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - unref(modifiedConfigs).length > 0 ? (openBlock(), createBlock(unref(script), { - key: 0, - severity: "info", - "pt:text": "w-full" - }, { - default: withCtx(() => [ - createBaseVNode("p", null, toDisplayString(_ctx.$t("serverConfig.modifiedConfigs")), 1), - createBaseVNode("ul", null, [ - (openBlock(true), createElementBlock(Fragment, null, renderList(unref(modifiedConfigs), (config) => { - return openBlock(), createElementBlock("li", { - key: config.id - }, toDisplayString(config.name) + ": " + toDisplayString(config.initialValue) + " → " + toDisplayString(config.value), 1); - }), 128)) - ]), - createBaseVNode("div", _hoisted_2, [ - createVNode(unref(script$1), { - label: _ctx.$t("serverConfig.revertChanges"), - onClick: revertChanges, - outlined: "" - }, null, 8, ["label"]), - createVNode(unref(script$1), { - label: _ctx.$t("serverConfig.restart"), - onClick: restartApp, - outlined: "", - severity: "danger" - }, null, 8, ["label"]) - ]) - ]), - _: 1 - })) : createCommentVNode("", true), - unref(commandLineArgs) ? (openBlock(), createBlock(unref(script), { - key: 1, - severity: "secondary", - "pt:text": "w-full" - }, { - icon: withCtx(() => [ - createVNode(_component_i_lucide58terminal, { class: "text-xl font-bold" }) - ]), - default: withCtx(() => [ - createBaseVNode("div", _hoisted_3, [ - createBaseVNode("p", null, toDisplayString(unref(commandLineArgs)), 1), - createVNode(unref(script$1), { - icon: "pi pi-clipboard", - onClick: copyCommandLineArgs, - severity: "secondary", - text: "" - }) - ]) - ]), - _: 1 - })) : createCommentVNode("", true) - ]) - ]), - default: withCtx(() => [ - (openBlock(true), createElementBlock(Fragment, null, renderList(Object.entries(unref(serverConfigsByCategory)), ([label, items], i) => { - return openBlock(), createElementBlock("div", { key: label }, [ - i > 0 ? (openBlock(), createBlock(unref(script$2), { key: 0 })) : createCommentVNode("", true), - createBaseVNode("h3", null, toDisplayString(_ctx.$t(`serverConfigCategories.${label}`, label)), 1), - (openBlock(true), createElementBlock(Fragment, null, renderList(items, (item) => { - return openBlock(), createElementBlock("div", { - key: item.name, - class: "mb-4" - }, [ - createVNode(FormItem, { - item: translateItem(item), - formValue: item.value, - "onUpdate:formValue": /* @__PURE__ */ __name(($event) => item.value = $event, "onUpdate:formValue"), - id: item.id, - labelClass: { - "text-highlight": item.initialValue !== item.value - } - }, null, 8, ["item", "formValue", "onUpdate:formValue", "id", "labelClass"]) - ]); - }), 128)) - ]); - }), 128)) - ]), - _: 1 - }); - }; - } -}); -export { - _sfc_main as default -}; -//# sourceMappingURL=ServerConfigPanel-B-w0HFlz.js.map diff --git a/web/assets/ServerStartView-48wfE1MS.js b/web/assets/ServerStartView-48wfE1MS.js deleted file mode 100644 index 4b74f5ad1..000000000 --- a/web/assets/ServerStartView-48wfE1MS.js +++ /dev/null @@ -1,101 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, a3 as useI18n, ad as ref, c7 as ProgressStatus, t as onMounted, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, aG as createTextVNode, Z as toDisplayString, j as unref, f as createElementBlock, L as createCommentVNode, k as createVNode, l as script, i as withDirectives, v as vShow, c8 as BaseTerminal, p as pushScopeId, q as popScopeId, bV as electronAPI, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-4140d62b"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = { class: "flex flex-col w-full h-full items-center" }; -const _hoisted_2 = { class: "text-2xl font-bold" }; -const _hoisted_3 = { key: 0 }; -const _hoisted_4 = { - key: 0, - class: "flex flex-col items-center gap-4" -}; -const _hoisted_5 = { class: "flex items-center my-4 gap-2" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "ServerStartView", - setup(__props) { - const electron = electronAPI(); - const { t } = useI18n(); - const status = ref(ProgressStatus.INITIAL_STATE); - const electronVersion = ref(""); - let xterm; - const terminalVisible = ref(true); - const updateProgress = /* @__PURE__ */ __name(({ status: newStatus }) => { - status.value = newStatus; - if (newStatus === ProgressStatus.ERROR) terminalVisible.value = false; - else xterm?.clear(); - }, "updateProgress"); - const terminalCreated = /* @__PURE__ */ __name(({ terminal, useAutoSize }, root) => { - xterm = terminal; - useAutoSize({ root, autoRows: true, autoCols: true }); - electron.onLogMessage((message) => { - terminal.write(message); - }); - terminal.options.cursorBlink = false; - terminal.options.disableStdin = true; - terminal.options.cursorInactiveStyle = "block"; - }, "terminalCreated"); - const reinstall = /* @__PURE__ */ __name(() => electron.reinstall(), "reinstall"); - const reportIssue = /* @__PURE__ */ __name(() => { - window.open("https://forum.comfy.org/c/v1-feedback/", "_blank"); - }, "reportIssue"); - const openLogs = /* @__PURE__ */ __name(() => electron.openLogsFolder(), "openLogs"); - onMounted(async () => { - electron.sendReady(); - electron.onProgressUpdate(updateProgress); - electronVersion.value = await electron.getElectronVersion(); - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$1, { - dark: "", - class: "flex-col" - }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - createBaseVNode("h2", _hoisted_2, [ - createTextVNode(toDisplayString(unref(t)(`serverStart.process.${status.value}`)) + " ", 1), - status.value === unref(ProgressStatus).ERROR ? (openBlock(), createElementBlock("span", _hoisted_3, " v" + toDisplayString(electronVersion.value), 1)) : createCommentVNode("", true) - ]), - status.value === unref(ProgressStatus).ERROR ? (openBlock(), createElementBlock("div", _hoisted_4, [ - createBaseVNode("div", _hoisted_5, [ - createVNode(unref(script), { - icon: "pi pi-flag", - severity: "secondary", - label: unref(t)("serverStart.reportIssue"), - onClick: reportIssue - }, null, 8, ["label"]), - createVNode(unref(script), { - icon: "pi pi-file", - severity: "secondary", - label: unref(t)("serverStart.openLogs"), - onClick: openLogs - }, null, 8, ["label"]), - createVNode(unref(script), { - icon: "pi pi-refresh", - label: unref(t)("serverStart.reinstall"), - onClick: reinstall - }, null, 8, ["label"]) - ]), - !terminalVisible.value ? (openBlock(), createBlock(unref(script), { - key: 0, - icon: "pi pi-search", - severity: "secondary", - label: unref(t)("serverStart.showTerminal"), - onClick: _cache[0] || (_cache[0] = ($event) => terminalVisible.value = true) - }, null, 8, ["label"])) : createCommentVNode("", true) - ])) : createCommentVNode("", true), - withDirectives(createVNode(BaseTerminal, { onCreated: terminalCreated }, null, 512), [ - [vShow, terminalVisible.value] - ]) - ]) - ]), - _: 1 - }); - }; - } -}); -const ServerStartView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4140d62b"]]); -export { - ServerStartView as default -}; -//# sourceMappingURL=ServerStartView-48wfE1MS.js.map diff --git a/web/assets/ServerStartView-CJiwVDQY.css b/web/assets/ServerStartView-CJiwVDQY.css deleted file mode 100644 index 7d53a927c..000000000 --- a/web/assets/ServerStartView-CJiwVDQY.css +++ /dev/null @@ -1,5 +0,0 @@ - -[data-v-4140d62b] .xterm-helper-textarea { - /* Hide this as it moves all over when uv is running */ - display: none; -} diff --git a/web/assets/UserSelectView-CXmVKOeK.js b/web/assets/UserSelectView-CXmVKOeK.js deleted file mode 100644 index 88b4d3f3d..000000000 --- a/web/assets/UserSelectView-CXmVKOeK.js +++ /dev/null @@ -1,102 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, aX as useUserStore, c2 as useRouter, ad as ref, c as computed, t as onMounted, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, c3 as withKeys, j as unref, ax as script, c4 as script$1, c5 as script$2, c6 as script$3, aG as createTextVNode, L as createCommentVNode, l as script$4 } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _hoisted_1 = { - id: "comfy-user-selection", - class: "min-w-84 relative rounded-lg bg-[var(--comfy-menu-bg)] p-5 px-10 shadow-lg" -}; -const _hoisted_2 = /* @__PURE__ */ createBaseVNode("h1", { class: "my-2.5 mb-7 font-normal" }, "ComfyUI", -1); -const _hoisted_3 = { class: "flex w-full flex-col items-center" }; -const _hoisted_4 = { class: "flex w-full flex-col gap-2" }; -const _hoisted_5 = { for: "new-user-input" }; -const _hoisted_6 = { class: "flex w-full flex-col gap-2" }; -const _hoisted_7 = { for: "existing-user-select" }; -const _hoisted_8 = { class: "mt-5" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "UserSelectView", - setup(__props) { - const userStore = useUserStore(); - const router = useRouter(); - const selectedUser = ref(null); - const newUsername = ref(""); - const loginError = ref(""); - const createNewUser = computed(() => newUsername.value.trim() !== ""); - const newUserExistsError = computed(() => { - return userStore.users.find((user) => user.username === newUsername.value) ? `User "${newUsername.value}" already exists` : ""; - }); - const error = computed(() => newUserExistsError.value || loginError.value); - const login = /* @__PURE__ */ __name(async () => { - try { - const user = createNewUser.value ? await userStore.createUser(newUsername.value) : selectedUser.value; - if (!user) { - throw new Error("No user selected"); - } - userStore.login(user); - router.push("/"); - } catch (err) { - loginError.value = err.message ?? JSON.stringify(err); - } - }, "login"); - onMounted(async () => { - if (!userStore.initialized) { - await userStore.initialize(); - } - }); - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$1, { dark: "" }, { - default: withCtx(() => [ - createBaseVNode("main", _hoisted_1, [ - _hoisted_2, - createBaseVNode("div", _hoisted_3, [ - createBaseVNode("div", _hoisted_4, [ - createBaseVNode("label", _hoisted_5, toDisplayString(_ctx.$t("userSelect.newUser")) + ":", 1), - createVNode(unref(script), { - id: "new-user-input", - modelValue: newUsername.value, - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => newUsername.value = $event), - placeholder: _ctx.$t("userSelect.enterUsername"), - onKeyup: withKeys(login, ["enter"]) - }, null, 8, ["modelValue", "placeholder"]) - ]), - createVNode(unref(script$1)), - createBaseVNode("div", _hoisted_6, [ - createBaseVNode("label", _hoisted_7, toDisplayString(_ctx.$t("userSelect.existingUser")) + ":", 1), - createVNode(unref(script$2), { - modelValue: selectedUser.value, - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => selectedUser.value = $event), - class: "w-full", - inputId: "existing-user-select", - options: unref(userStore).users, - "option-label": "username", - placeholder: _ctx.$t("userSelect.selectUser"), - disabled: createNewUser.value - }, null, 8, ["modelValue", "options", "placeholder", "disabled"]), - error.value ? (openBlock(), createBlock(unref(script$3), { - key: 0, - severity: "error" - }, { - default: withCtx(() => [ - createTextVNode(toDisplayString(error.value), 1) - ]), - _: 1 - })) : createCommentVNode("", true) - ]), - createBaseVNode("footer", _hoisted_8, [ - createVNode(unref(script$4), { - label: _ctx.$t("userSelect.next"), - onClick: login - }, null, 8, ["label"]) - ]) - ]) - ]) - ]), - _: 1 - }); - }; - } -}); -export { - _sfc_main as default -}; -//# sourceMappingURL=UserSelectView-CXmVKOeK.js.map diff --git a/web/assets/WelcomeView-Brz3-luE.css b/web/assets/WelcomeView-Brz3-luE.css deleted file mode 100644 index 522f34388..000000000 --- a/web/assets/WelcomeView-Brz3-luE.css +++ /dev/null @@ -1,36 +0,0 @@ - -.animated-gradient-text[data-v-7dfaf74c] { - font-weight: 700; - font-size: clamp(2rem, 8vw, 4rem); - background: linear-gradient(to right, #12c2e9, #c471ed, #f64f59, #12c2e9); - background-size: 300% auto; - background-clip: text; - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - animation: gradient-7dfaf74c 8s linear infinite; -} -.text-glow[data-v-7dfaf74c] { - filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3)); -} -@keyframes gradient-7dfaf74c { -0% { - background-position: 0% center; -} -100% { - background-position: 300% center; -} -} -.fade-in-up[data-v-7dfaf74c] { - animation: fadeInUp-7dfaf74c 1.5s ease-out; - animation-fill-mode: both; -} -@keyframes fadeInUp-7dfaf74c { -0% { - opacity: 0; - transform: translateY(20px); -} -100% { - opacity: 1; - transform: translateY(0); -} -} diff --git a/web/assets/WelcomeView-C8whKl15.js b/web/assets/WelcomeView-C8whKl15.js deleted file mode 100644 index 7625ec43b..000000000 --- a/web/assets/WelcomeView-C8whKl15.js +++ /dev/null @@ -1,40 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { d as defineComponent, c2 as useRouter, o as openBlock, J as createBlock, P as withCtx, m as createBaseVNode, Z as toDisplayString, k as createVNode, j as unref, l as script, p as pushScopeId, q as popScopeId, _ as _export_sfc } from "./index-QvfM__ze.js"; -import { _ as _sfc_main$1 } from "./BaseViewTemplate-BhQMaVFP.js"; -const _withScopeId = /* @__PURE__ */ __name((n) => (pushScopeId("data-v-7dfaf74c"), n = n(), popScopeId(), n), "_withScopeId"); -const _hoisted_1 = { class: "flex flex-col items-center justify-center gap-8 p-8" }; -const _hoisted_2 = { class: "animated-gradient-text text-glow select-none" }; -const _sfc_main = /* @__PURE__ */ defineComponent({ - __name: "WelcomeView", - setup(__props) { - const router = useRouter(); - const navigateTo = /* @__PURE__ */ __name((path) => { - router.push(path); - }, "navigateTo"); - return (_ctx, _cache) => { - return openBlock(), createBlock(_sfc_main$1, { dark: "" }, { - default: withCtx(() => [ - createBaseVNode("div", _hoisted_1, [ - createBaseVNode("h1", _hoisted_2, toDisplayString(_ctx.$t("welcome.title")), 1), - createVNode(unref(script), { - label: _ctx.$t("welcome.getStarted"), - icon: "pi pi-arrow-right", - iconPos: "right", - size: "large", - rounded: "", - onClick: _cache[0] || (_cache[0] = ($event) => navigateTo("/install")), - class: "p-4 text-lg fade-in-up" - }, null, 8, ["label"]) - ]) - ]), - _: 1 - }); - }; - } -}); -const WelcomeView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7dfaf74c"]]); -export { - WelcomeView as default -}; -//# sourceMappingURL=WelcomeView-C8whKl15.js.map diff --git a/web/assets/images/Git-Logo-White.svg b/web/assets/images/Git-Logo-White.svg deleted file mode 100644 index f2961b944..000000000 --- a/web/assets/images/Git-Logo-White.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/assets/images/apple-mps-logo.png b/web/assets/images/apple-mps-logo.png deleted file mode 100644 index 261edbfd6..000000000 Binary files a/web/assets/images/apple-mps-logo.png and /dev/null differ diff --git a/web/assets/images/manual-configuration.svg b/web/assets/images/manual-configuration.svg deleted file mode 100644 index bc90c6470..000000000 --- a/web/assets/images/manual-configuration.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/web/assets/images/nvidia-logo.svg b/web/assets/images/nvidia-logo.svg deleted file mode 100644 index 71f15b53b..000000000 --- a/web/assets/images/nvidia-logo.svg +++ /dev/null @@ -1,6 +0,0 @@ - Artificial Intelligence Computing Leadership from NVIDIA - - - - - \ No newline at end of file diff --git a/web/assets/images/sad_girl.png b/web/assets/images/sad_girl.png deleted file mode 100644 index 2b0925a63..000000000 Binary files a/web/assets/images/sad_girl.png and /dev/null differ diff --git a/web/assets/index-BRhY6FpL.css b/web/assets/index-BRhY6FpL.css deleted file mode 100644 index 5470ecb5e..000000000 --- a/web/assets/index-BRhY6FpL.css +++ /dev/null @@ -1,149 +0,0 @@ -.comfy-group-manage { - background: var(--bg-color); - color: var(--fg-color); - padding: 0; - font-family: Arial, Helvetica, sans-serif; - border-color: black; - margin: 20vh auto; - max-height: 60vh; -} -.comfy-group-manage-outer { - max-height: 60vh; - min-width: 500px; - display: flex; - flex-direction: column; -} -.comfy-group-manage-outer > header { - display: flex; - align-items: center; - gap: 10px; - justify-content: space-between; - background: var(--comfy-menu-bg); - padding: 15px 20px; -} -.comfy-group-manage-outer > header select { - background: var(--comfy-input-bg); - border: 1px solid var(--border-color); - color: var(--input-text); - padding: 5px 10px; - border-radius: 5px; -} -.comfy-group-manage h2 { - margin: 0; - font-weight: normal; -} -.comfy-group-manage main { - display: flex; - overflow: hidden; -} -.comfy-group-manage .drag-handle { - font-weight: bold; -} -.comfy-group-manage-list { - border-right: 1px solid var(--comfy-menu-bg); -} -.comfy-group-manage-list ul { - margin: 40px 0 0; - padding: 0; - list-style: none; -} -.comfy-group-manage-list-items { - max-height: calc(100% - 40px); - overflow-y: scroll; - overflow-x: hidden; -} -.comfy-group-manage-list li { - display: flex; - padding: 10px 20px 10px 10px; - cursor: pointer; - align-items: center; - gap: 5px; -} -.comfy-group-manage-list div { - display: flex; - flex-direction: column; -} -.comfy-group-manage-list li:not(.selected):hover div { - text-decoration: underline; -} -.comfy-group-manage-list li.selected { - background: var(--border-color); -} -.comfy-group-manage-list li span { - opacity: 0.7; - font-size: smaller; -} -.comfy-group-manage-node { - flex: auto; - background: var(--border-color); - display: flex; - flex-direction: column; -} -.comfy-group-manage-node > div { - overflow: auto; -} -.comfy-group-manage-node header { - display: flex; - background: var(--bg-color); - height: 40px; -} -.comfy-group-manage-node header a { - text-align: center; - flex: auto; - border-right: 1px solid var(--comfy-menu-bg); - border-bottom: 1px solid var(--comfy-menu-bg); - padding: 10px; - cursor: pointer; - font-size: 15px; -} -.comfy-group-manage-node header a:last-child { - border-right: none; -} -.comfy-group-manage-node header a:not(.active):hover { - text-decoration: underline; -} -.comfy-group-manage-node header a.active { - background: var(--border-color); - border-bottom: none; -} -.comfy-group-manage-node-page { - display: none; - overflow: auto; -} -.comfy-group-manage-node-page.active { - display: block; -} -.comfy-group-manage-node-page div { - padding: 10px; - display: flex; - align-items: center; - gap: 10px; -} -.comfy-group-manage-node-page input { - border: none; - color: var(--input-text); - background: var(--comfy-input-bg); - padding: 5px 10px; -} -.comfy-group-manage-node-page input[type="text"] { - flex: auto; -} -.comfy-group-manage-node-page label { - display: flex; - gap: 5px; - align-items: center; -} -.comfy-group-manage footer { - border-top: 1px solid var(--comfy-menu-bg); - padding: 10px; - display: flex; - gap: 10px; -} -.comfy-group-manage footer button { - font-size: 14px; - padding: 5px 10px; - border-radius: 0; -} -.comfy-group-manage footer button:first-child { - margin-right: auto; -} diff --git a/web/assets/index-Cf-n7v0V.css b/web/assets/index-Cf-n7v0V.css deleted file mode 100644 index b8e6a53ad..000000000 --- a/web/assets/index-Cf-n7v0V.css +++ /dev/null @@ -1,4981 +0,0 @@ -/* this CSS contains only the basic CSS needed to run the app and use it */ - -.lgraphcanvas { - /*cursor: crosshair;*/ - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - outline: none; - font-family: Tahoma, sans-serif; -} - -.lgraphcanvas * { - box-sizing: border-box; -} - -.litegraph.litecontextmenu { - font-family: Tahoma, sans-serif; - position: fixed; - top: 100px; - left: 100px; - min-width: 100px; - color: #aaf; - padding: 0; - box-shadow: 0 0 10px black !important; - background-color: #2e2e2e !important; - z-index: 10; - max-height: -webkit-fill-available; - overflow-y: auto; -} - -/* Enable scrolling overflow in Firefox */ -@supports not (max-height: -webkit-fill-available) { - .litegraph.litecontextmenu { - max-height: 80vh; - overflow-y: scroll; - } -} - -.litegraph.litecontextmenu.dark { - background-color: #000 !important; -} - -.litegraph.litecontextmenu .litemenu-title img { - margin-top: 2px; - margin-left: 2px; - margin-right: 4px; -} - -.litegraph.litecontextmenu .litemenu-entry { - margin: 2px; - padding: 2px; -} - -.litegraph.litecontextmenu .litemenu-entry.submenu { - background-color: #2e2e2e !important; -} - -.litegraph.litecontextmenu.dark .litemenu-entry.submenu { - background-color: #000 !important; -} - -.litegraph .litemenubar ul { - font-family: Tahoma, sans-serif; - margin: 0; - padding: 0; -} - -.litegraph .litemenubar li { - font-size: 14px; - color: #999; - display: inline-block; - min-width: 50px; - padding-left: 10px; - padding-right: 10px; - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - cursor: pointer; -} - -.litegraph .litemenubar li:hover { - background-color: #777; - color: #eee; -} - -.litegraph .litegraph .litemenubar-panel { - position: absolute; - top: 5px; - left: 5px; - min-width: 100px; - background-color: #444; - box-shadow: 0 0 3px black; - padding: 4px; - border-bottom: 2px solid #aaf; - z-index: 10; -} - -.litegraph .litemenu-entry, -.litemenu-title { - font-size: 12px; - color: #aaa; - padding: 0 0 0 4px; - margin: 2px; - padding-left: 2px; - -moz-user-select: none; - -webkit-user-select: none; - user-select: none; - cursor: pointer; -} - -.litegraph .litemenu-entry .icon { - display: inline-block; - width: 12px; - height: 12px; - margin: 2px; - vertical-align: top; -} - -.litegraph .litemenu-entry.checked .icon { - background-color: #aaf; -} - -.litegraph .litemenu-entry .more { - float: right; - padding-right: 5px; -} - -.litegraph .litemenu-entry.disabled { - opacity: 0.5; - cursor: default; -} - -.litegraph .litemenu-entry.separator { - display: block; - border-top: 1px solid #333; - border-bottom: 1px solid #666; - width: 100%; - height: 0px; - margin: 3px 0 2px 0; - background-color: transparent; - padding: 0 !important; - cursor: default !important; -} - -.litegraph .litemenu-entry.has_submenu { - border-right: 2px solid cyan; -} - -.litegraph .litemenu-title { - color: #dde; - background-color: #111; - margin: 0; - padding: 2px; - cursor: default; -} - -.litegraph .litemenu-entry:hover:not(.disabled):not(.separator) { - background-color: #444 !important; - color: #eee; - transition: all 0.2s; -} - -.litegraph .litemenu-entry .property_name { - display: inline-block; - text-align: left; - min-width: 80px; - min-height: 1.2em; -} - -.litegraph .litemenu-entry .property_value { - display: inline-block; - background-color: rgba(0, 0, 0, 0.5); - text-align: right; - min-width: 80px; - min-height: 1.2em; - vertical-align: middle; - padding-right: 10px; -} - -.litegraph.litesearchbox { - font-family: Tahoma, sans-serif; - position: absolute; - background-color: rgba(0, 0, 0, 0.5); - padding-top: 4px; -} - -.litegraph.litesearchbox input, -.litegraph.litesearchbox select { - margin-top: 3px; - min-width: 60px; - min-height: 1.5em; - background-color: black; - border: 0; - color: white; - padding-left: 10px; - margin-right: 5px; - max-width: 300px; -} - -.litegraph.litesearchbox .name { - display: inline-block; - min-width: 60px; - min-height: 1.5em; - padding-left: 10px; -} - -.litegraph.litesearchbox .helper { - overflow: auto; - max-height: 200px; - margin-top: 2px; -} - -.litegraph.lite-search-item { - font-family: Tahoma, sans-serif; - background-color: rgba(0, 0, 0, 0.5); - color: white; - padding-top: 2px; -} - -.litegraph.lite-search-item.not_in_filter { - /*background-color: rgba(50, 50, 50, 0.5);*/ - /*color: #999;*/ - color: #b99; - font-style: italic; -} - -.litegraph.lite-search-item.generic_type { - /*background-color: rgba(50, 50, 50, 0.5);*/ - /*color: #DD9;*/ - color: #999; - font-style: italic; -} - -.litegraph.lite-search-item:hover, -.litegraph.lite-search-item.selected { - cursor: pointer; - background-color: white; - color: black; -} - -.litegraph.lite-search-item-type { - display: inline-block; - background: rgba(0, 0, 0, 0.2); - margin-left: 5px; - font-size: 14px; - padding: 2px 5px; - position: relative; - top: -2px; - opacity: 0.8; - border-radius: 4px; -} - -/* DIALOGs ******/ - -.litegraph .dialog { - position: absolute; - top: 50%; - left: 50%; - margin-top: -150px; - margin-left: -200px; - - background-color: #2a2a2a; - - min-width: 400px; - min-height: 200px; - box-shadow: 0 0 4px #111; - border-radius: 6px; -} - -.litegraph .dialog.settings { - left: 10px; - top: 10px; - height: calc(100% - 20px); - margin: auto; - max-width: 50%; -} - -.litegraph .dialog.centered { - top: 50px; - left: 50%; - position: absolute; - transform: translateX(-50%); - min-width: 600px; - min-height: 300px; - height: calc(100% - 100px); - margin: auto; -} - -.litegraph .dialog .close { - float: right; - margin: 4px; - margin-right: 10px; - cursor: pointer; - font-size: 1.4em; -} - -.litegraph .dialog .close:hover { - color: white; -} - -.litegraph .dialog .dialog-header { - color: #aaa; - border-bottom: 1px solid #161616; - height: 40px; -} -.litegraph .dialog .dialog-footer { - height: 50px; - padding: 10px; - border-top: 1px solid #1a1a1a; -} - -.litegraph .dialog .dialog-header .dialog-title { - font: 20px "Arial"; - margin: 4px; - padding: 4px 10px; - display: inline-block; -} - -.litegraph .dialog .dialog-content, -.litegraph .dialog .dialog-alt-content { - height: calc(100% - 90px); - width: 100%; - min-height: 100px; - display: inline-block; - color: #aaa; - /*background-color: black;*/ - overflow: auto; -} - -.litegraph .dialog .dialog-content h3 { - margin: 10px; -} - -.litegraph .dialog .dialog-content .connections { - flex-direction: row; -} - -.litegraph .dialog .dialog-content .connections .connections_side { - width: calc(50% - 5px); - min-height: 100px; - background-color: black; - display: flex; -} - -.litegraph .dialog .node_type { - font-size: 1.2em; - display: block; - margin: 10px; -} - -.litegraph .dialog .node_desc { - opacity: 0.5; - display: block; - margin: 10px; -} - -.litegraph .dialog .separator { - display: block; - width: calc(100% - 4px); - height: 1px; - border-top: 1px solid #000; - border-bottom: 1px solid #333; - margin: 10px 2px; - padding: 0; -} - -.litegraph .dialog .property { - margin-bottom: 2px; - padding: 4px; -} - -.litegraph .dialog .property:hover { - background: #545454; -} - -.litegraph .dialog .property_name { - color: #737373; - display: inline-block; - text-align: left; - vertical-align: top; - width: 160px; - padding-left: 4px; - overflow: hidden; - margin-right: 6px; -} - -.litegraph .dialog .property:hover .property_name { - color: white; -} - -.litegraph .dialog .property_value { - display: inline-block; - text-align: right; - color: #aaa; - background-color: #1a1a1a; - /*width: calc( 100% - 122px );*/ - max-width: calc(100% - 162px); - min-width: 200px; - max-height: 300px; - min-height: 20px; - padding: 4px; - padding-right: 12px; - overflow: hidden; - cursor: pointer; - border-radius: 3px; -} - -.litegraph .dialog .property_value:hover { - color: white; -} - -.litegraph .dialog .property.boolean .property_value { - padding-right: 30px; - color: #a88; - /*width: auto; - float: right;*/ -} - -.litegraph .dialog .property.boolean.bool-on .property_name { - color: #8a8; -} -.litegraph .dialog .property.boolean.bool-on .property_value { - color: #8a8; -} - -.litegraph .dialog .btn { - border: 0; - border-radius: 4px; - padding: 4px 20px; - margin-left: 0px; - background-color: #060606; - color: #8e8e8e; -} - -.litegraph .dialog .btn:hover { - background-color: #111; - color: #fff; -} - -.litegraph .dialog .btn.delete:hover { - background-color: #f33; - color: black; -} - -.litegraph .subgraph_property { - padding: 4px; -} - -.litegraph .subgraph_property:hover { - background-color: #333; -} - -.litegraph .subgraph_property.extra { - margin-top: 8px; -} - -.litegraph .subgraph_property span.name { - font-size: 1.3em; - padding-left: 4px; -} - -.litegraph .subgraph_property span.type { - opacity: 0.5; - margin-right: 20px; - padding-left: 4px; -} - -.litegraph .subgraph_property span.label { - display: inline-block; - width: 60px; - padding: 0px 10px; -} - -.litegraph .subgraph_property input { - width: 140px; - color: #999; - background-color: #1a1a1a; - border-radius: 4px; - border: 0; - margin-right: 10px; - padding: 4px; - padding-left: 10px; -} - -.litegraph .subgraph_property button { - background-color: #1c1c1c; - color: #aaa; - border: 0; - border-radius: 2px; - padding: 4px 10px; - cursor: pointer; -} - -.litegraph .subgraph_property.extra { - color: #ccc; -} - -.litegraph .subgraph_property.extra input { - background-color: #111; -} - -.litegraph .bullet_icon { - margin-left: 10px; - border-radius: 10px; - width: 12px; - height: 12px; - background-color: #666; - display: inline-block; - margin-top: 2px; - margin-right: 4px; - transition: background-color 0.1s ease 0s; - -moz-transition: background-color 0.1s ease 0s; -} - -.litegraph .bullet_icon:hover { - background-color: #698; - cursor: pointer; -} - -/* OLD */ - -.graphcontextmenu { - padding: 4px; - min-width: 100px; -} - -.graphcontextmenu-title { - color: #dde; - background-color: #222; - margin: 0; - padding: 2px; - cursor: default; -} - -.graphmenu-entry { - box-sizing: border-box; - margin: 2px; - padding-left: 20px; - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - transition: all linear 0.3s; -} - -.graphmenu-entry.event, -.litemenu-entry.event { - border-left: 8px solid orange; - padding-left: 12px; -} - -.graphmenu-entry.disabled { - opacity: 0.3; -} - -.graphmenu-entry.submenu { - border-right: 2px solid #eee; -} - -.graphmenu-entry:hover { - background-color: #555; -} - -.graphmenu-entry.separator { - background-color: #111; - border-bottom: 1px solid #666; - height: 1px; - width: calc(100% - 20px); - -moz-width: calc(100% - 20px); - -webkit-width: calc(100% - 20px); -} - -.graphmenu-entry .property_name { - display: inline-block; - text-align: left; - min-width: 80px; - min-height: 1.2em; -} - -.graphmenu-entry .property_value, -.litemenu-entry .property_value { - display: inline-block; - background-color: rgba(0, 0, 0, 0.5); - text-align: right; - min-width: 80px; - min-height: 1.2em; - vertical-align: middle; - padding-right: 10px; -} - -.graphdialog { - position: absolute; - top: 10px; - left: 10px; - min-height: 2em; - background-color: #333; - font-size: 1.2em; - box-shadow: 0 0 10px black !important; - z-index: 10; -} - -.graphdialog.rounded { - border-radius: 12px; - padding-right: 2px; -} - -.graphdialog .name { - display: inline-block; - min-width: 60px; - min-height: 1.5em; - padding-left: 10px; -} - -.graphdialog input, -.graphdialog textarea, -.graphdialog select { - margin: 3px; - min-width: 60px; - min-height: 1.5em; - background-color: black; - border: 0; - color: white; - padding-left: 10px; - outline: none; -} - -.graphdialog textarea { - min-height: 150px; -} - -.graphdialog button { - margin-top: 3px; - vertical-align: top; - background-color: #999; - border: 0; -} - -.graphdialog button.rounded, -.graphdialog input.rounded { - border-radius: 0 12px 12px 0; -} - -.graphdialog .helper { - overflow: auto; - max-height: 200px; -} - -.graphdialog .help-item { - padding-left: 10px; -} - -.graphdialog .help-item:hover, -.graphdialog .help-item.selected { - cursor: pointer; - background-color: white; - color: black; -} - -.litegraph .dialog { - min-height: 0; -} -.litegraph .dialog .dialog-content { - display: block; -} -.litegraph .dialog .dialog-content .subgraph_property { - padding: 5px; -} -.litegraph .dialog .dialog-footer { - margin: 0; -} -.litegraph .dialog .dialog-footer .subgraph_property { - margin-top: 0; - display: flex; - align-items: center; - padding: 5px; -} -.litegraph .dialog .dialog-footer .subgraph_property .name { - flex: 1; -} -.litegraph .graphdialog { - display: flex; - align-items: center; - border-radius: 20px; - padding: 4px 10px; - position: fixed; -} -.litegraph .graphdialog .name { - padding: 0; - min-height: 0; - font-size: 16px; - vertical-align: middle; -} -.litegraph .graphdialog .value { - font-size: 16px; - min-height: 0; - margin: 0 10px; - padding: 2px 5px; -} -.litegraph .graphdialog input[type="checkbox"] { - width: 16px; - height: 16px; -} -.litegraph .graphdialog button { - padding: 4px 18px; - border-radius: 20px; - cursor: pointer; -} -@font-face { - font-family: 'primeicons'; - font-display: block; - src: url('./primeicons-DMOk5skT.eot'); - src: url('./primeicons-DMOk5skT.eot?#iefix') format('embedded-opentype'), url('./primeicons-C6QP2o4f.woff2') format('woff2'), url('./primeicons-WjwUDZjB.woff') format('woff'), url('./primeicons-MpK4pl85.ttf') format('truetype'), url('./primeicons-Dr5RGzOO.svg?#primeicons') format('svg'); - font-weight: normal; - font-style: normal; -} - -.pi { - font-family: 'primeicons'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - display: inline-block; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.pi:before { - --webkit-backface-visibility:hidden; - backface-visibility: hidden; -} - -.pi-fw { - width: 1.28571429em; - text-align: center; -} - -.pi-spin { - animation: fa-spin 2s infinite linear; -} - -@media (prefers-reduced-motion: reduce) { - .pi-spin { - animation-delay: -1ms; - animation-duration: 1ms; - animation-iteration-count: 1; - transition-delay: 0s; - transition-duration: 0s; - } -} - -@keyframes fa-spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(359deg); - } -} - -.pi-folder-plus:before { - content: "\ea05"; -} - -.pi-receipt:before { - content: "\ea06"; -} - -.pi-asterisk:before { - content: "\ea07"; -} - -.pi-face-smile:before { - content: "\ea08"; -} - -.pi-pinterest:before { - content: "\ea09"; -} - -.pi-expand:before { - content: "\ea0a"; -} - -.pi-pen-to-square:before { - content: "\ea0b"; -} - -.pi-wave-pulse:before { - content: "\ea0c"; -} - -.pi-turkish-lira:before { - content: "\ea0d"; -} - -.pi-spinner-dotted:before { - content: "\ea0e"; -} - -.pi-crown:before { - content: "\ea0f"; -} - -.pi-pause-circle:before { - content: "\ea10"; -} - -.pi-warehouse:before { - content: "\ea11"; -} - -.pi-objects-column:before { - content: "\ea12"; -} - -.pi-clipboard:before { - content: "\ea13"; -} - -.pi-play-circle:before { - content: "\ea14"; -} - -.pi-venus:before { - content: "\ea15"; -} - -.pi-cart-minus:before { - content: "\ea16"; -} - -.pi-file-plus:before { - content: "\ea17"; -} - -.pi-microchip:before { - content: "\ea18"; -} - -.pi-twitch:before { - content: "\ea19"; -} - -.pi-building-columns:before { - content: "\ea1a"; -} - -.pi-file-check:before { - content: "\ea1b"; -} - -.pi-microchip-ai:before { - content: "\ea1c"; -} - -.pi-trophy:before { - content: "\ea1d"; -} - -.pi-barcode:before { - content: "\ea1e"; -} - -.pi-file-arrow-up:before { - content: "\ea1f"; -} - -.pi-mars:before { - content: "\ea20"; -} - -.pi-tiktok:before { - content: "\ea21"; -} - -.pi-arrow-up-right-and-arrow-down-left-from-center:before { - content: "\ea22"; -} - -.pi-ethereum:before { - content: "\ea23"; -} - -.pi-list-check:before { - content: "\ea24"; -} - -.pi-thumbtack:before { - content: "\ea25"; -} - -.pi-arrow-down-left-and-arrow-up-right-to-center:before { - content: "\ea26"; -} - -.pi-equals:before { - content: "\ea27"; -} - -.pi-lightbulb:before { - content: "\ea28"; -} - -.pi-star-half:before { - content: "\ea29"; -} - -.pi-address-book:before { - content: "\ea2a"; -} - -.pi-chart-scatter:before { - content: "\ea2b"; -} - -.pi-indian-rupee:before { - content: "\ea2c"; -} - -.pi-star-half-fill:before { - content: "\ea2d"; -} - -.pi-cart-arrow-down:before { - content: "\ea2e"; -} - -.pi-calendar-clock:before { - content: "\ea2f"; -} - -.pi-sort-up-fill:before { - content: "\ea30"; -} - -.pi-sparkles:before { - content: "\ea31"; -} - -.pi-bullseye:before { - content: "\ea32"; -} - -.pi-sort-down-fill:before { - content: "\ea33"; -} - -.pi-graduation-cap:before { - content: "\ea34"; -} - -.pi-hammer:before { - content: "\ea35"; -} - -.pi-bell-slash:before { - content: "\ea36"; -} - -.pi-gauge:before { - content: "\ea37"; -} - -.pi-shop:before { - content: "\ea38"; -} - -.pi-headphones:before { - content: "\ea39"; -} - -.pi-eraser:before { - content: "\ea04"; -} - -.pi-stopwatch:before { - content: "\ea01"; -} - -.pi-verified:before { - content: "\ea02"; -} - -.pi-delete-left:before { - content: "\ea03"; -} - -.pi-hourglass:before { - content: "\e9fe"; -} - -.pi-truck:before { - content: "\ea00"; -} - -.pi-wrench:before { - content: "\e9ff"; -} - -.pi-microphone:before { - content: "\e9fa"; -} - -.pi-megaphone:before { - content: "\e9fb"; -} - -.pi-arrow-right-arrow-left:before { - content: "\e9fc"; -} - -.pi-bitcoin:before { - content: "\e9fd"; -} - -.pi-file-edit:before { - content: "\e9f6"; -} - -.pi-language:before { - content: "\e9f7"; -} - -.pi-file-export:before { - content: "\e9f8"; -} - -.pi-file-import:before { - content: "\e9f9"; -} - -.pi-file-word:before { - content: "\e9f1"; -} - -.pi-gift:before { - content: "\e9f2"; -} - -.pi-cart-plus:before { - content: "\e9f3"; -} - -.pi-thumbs-down-fill:before { - content: "\e9f4"; -} - -.pi-thumbs-up-fill:before { - content: "\e9f5"; -} - -.pi-arrows-alt:before { - content: "\e9f0"; -} - -.pi-calculator:before { - content: "\e9ef"; -} - -.pi-sort-alt-slash:before { - content: "\e9ee"; -} - -.pi-arrows-h:before { - content: "\e9ec"; -} - -.pi-arrows-v:before { - content: "\e9ed"; -} - -.pi-pound:before { - content: "\e9eb"; -} - -.pi-prime:before { - content: "\e9ea"; -} - -.pi-chart-pie:before { - content: "\e9e9"; -} - -.pi-reddit:before { - content: "\e9e8"; -} - -.pi-code:before { - content: "\e9e7"; -} - -.pi-sync:before { - content: "\e9e6"; -} - -.pi-shopping-bag:before { - content: "\e9e5"; -} - -.pi-server:before { - content: "\e9e4"; -} - -.pi-database:before { - content: "\e9e3"; -} - -.pi-hashtag:before { - content: "\e9e2"; -} - -.pi-bookmark-fill:before { - content: "\e9df"; -} - -.pi-filter-fill:before { - content: "\e9e0"; -} - -.pi-heart-fill:before { - content: "\e9e1"; -} - -.pi-flag-fill:before { - content: "\e9de"; -} - -.pi-circle:before { - content: "\e9dc"; -} - -.pi-circle-fill:before { - content: "\e9dd"; -} - -.pi-bolt:before { - content: "\e9db"; -} - -.pi-history:before { - content: "\e9da"; -} - -.pi-box:before { - content: "\e9d9"; -} - -.pi-at:before { - content: "\e9d8"; -} - -.pi-arrow-up-right:before { - content: "\e9d4"; -} - -.pi-arrow-up-left:before { - content: "\e9d5"; -} - -.pi-arrow-down-left:before { - content: "\e9d6"; -} - -.pi-arrow-down-right:before { - content: "\e9d7"; -} - -.pi-telegram:before { - content: "\e9d3"; -} - -.pi-stop-circle:before { - content: "\e9d2"; -} - -.pi-stop:before { - content: "\e9d1"; -} - -.pi-whatsapp:before { - content: "\e9d0"; -} - -.pi-building:before { - content: "\e9cf"; -} - -.pi-qrcode:before { - content: "\e9ce"; -} - -.pi-car:before { - content: "\e9cd"; -} - -.pi-instagram:before { - content: "\e9cc"; -} - -.pi-linkedin:before { - content: "\e9cb"; -} - -.pi-send:before { - content: "\e9ca"; -} - -.pi-slack:before { - content: "\e9c9"; -} - -.pi-sun:before { - content: "\e9c8"; -} - -.pi-moon:before { - content: "\e9c7"; -} - -.pi-vimeo:before { - content: "\e9c6"; -} - -.pi-youtube:before { - content: "\e9c5"; -} - -.pi-flag:before { - content: "\e9c4"; -} - -.pi-wallet:before { - content: "\e9c3"; -} - -.pi-map:before { - content: "\e9c2"; -} - -.pi-link:before { - content: "\e9c1"; -} - -.pi-credit-card:before { - content: "\e9bf"; -} - -.pi-discord:before { - content: "\e9c0"; -} - -.pi-percentage:before { - content: "\e9be"; -} - -.pi-euro:before { - content: "\e9bd"; -} - -.pi-book:before { - content: "\e9ba"; -} - -.pi-shield:before { - content: "\e9b9"; -} - -.pi-paypal:before { - content: "\e9bb"; -} - -.pi-amazon:before { - content: "\e9bc"; -} - -.pi-phone:before { - content: "\e9b8"; -} - -.pi-filter-slash:before { - content: "\e9b7"; -} - -.pi-facebook:before { - content: "\e9b4"; -} - -.pi-github:before { - content: "\e9b5"; -} - -.pi-twitter:before { - content: "\e9b6"; -} - -.pi-step-backward-alt:before { - content: "\e9ac"; -} - -.pi-step-forward-alt:before { - content: "\e9ad"; -} - -.pi-forward:before { - content: "\e9ae"; -} - -.pi-backward:before { - content: "\e9af"; -} - -.pi-fast-backward:before { - content: "\e9b0"; -} - -.pi-fast-forward:before { - content: "\e9b1"; -} - -.pi-pause:before { - content: "\e9b2"; -} - -.pi-play:before { - content: "\e9b3"; -} - -.pi-compass:before { - content: "\e9ab"; -} - -.pi-id-card:before { - content: "\e9aa"; -} - -.pi-ticket:before { - content: "\e9a9"; -} - -.pi-file-o:before { - content: "\e9a8"; -} - -.pi-reply:before { - content: "\e9a7"; -} - -.pi-directions-alt:before { - content: "\e9a5"; -} - -.pi-directions:before { - content: "\e9a6"; -} - -.pi-thumbs-up:before { - content: "\e9a3"; -} - -.pi-thumbs-down:before { - content: "\e9a4"; -} - -.pi-sort-numeric-down-alt:before { - content: "\e996"; -} - -.pi-sort-numeric-up-alt:before { - content: "\e997"; -} - -.pi-sort-alpha-down-alt:before { - content: "\e998"; -} - -.pi-sort-alpha-up-alt:before { - content: "\e999"; -} - -.pi-sort-numeric-down:before { - content: "\e99a"; -} - -.pi-sort-numeric-up:before { - content: "\e99b"; -} - -.pi-sort-alpha-down:before { - content: "\e99c"; -} - -.pi-sort-alpha-up:before { - content: "\e99d"; -} - -.pi-sort-alt:before { - content: "\e99e"; -} - -.pi-sort-amount-up:before { - content: "\e99f"; -} - -.pi-sort-amount-down:before { - content: "\e9a0"; -} - -.pi-sort-amount-down-alt:before { - content: "\e9a1"; -} - -.pi-sort-amount-up-alt:before { - content: "\e9a2"; -} - -.pi-palette:before { - content: "\e995"; -} - -.pi-undo:before { - content: "\e994"; -} - -.pi-desktop:before { - content: "\e993"; -} - -.pi-sliders-v:before { - content: "\e991"; -} - -.pi-sliders-h:before { - content: "\e992"; -} - -.pi-search-plus:before { - content: "\e98f"; -} - -.pi-search-minus:before { - content: "\e990"; -} - -.pi-file-excel:before { - content: "\e98e"; -} - -.pi-file-pdf:before { - content: "\e98d"; -} - -.pi-check-square:before { - content: "\e98c"; -} - -.pi-chart-line:before { - content: "\e98b"; -} - -.pi-user-edit:before { - content: "\e98a"; -} - -.pi-exclamation-circle:before { - content: "\e989"; -} - -.pi-android:before { - content: "\e985"; -} - -.pi-google:before { - content: "\e986"; -} - -.pi-apple:before { - content: "\e987"; -} - -.pi-microsoft:before { - content: "\e988"; -} - -.pi-heart:before { - content: "\e984"; -} - -.pi-mobile:before { - content: "\e982"; -} - -.pi-tablet:before { - content: "\e983"; -} - -.pi-key:before { - content: "\e981"; -} - -.pi-shopping-cart:before { - content: "\e980"; -} - -.pi-comments:before { - content: "\e97e"; -} - -.pi-comment:before { - content: "\e97f"; -} - -.pi-briefcase:before { - content: "\e97d"; -} - -.pi-bell:before { - content: "\e97c"; -} - -.pi-paperclip:before { - content: "\e97b"; -} - -.pi-share-alt:before { - content: "\e97a"; -} - -.pi-envelope:before { - content: "\e979"; -} - -.pi-volume-down:before { - content: "\e976"; -} - -.pi-volume-up:before { - content: "\e977"; -} - -.pi-volume-off:before { - content: "\e978"; -} - -.pi-eject:before { - content: "\e975"; -} - -.pi-money-bill:before { - content: "\e974"; -} - -.pi-images:before { - content: "\e973"; -} - -.pi-image:before { - content: "\e972"; -} - -.pi-sign-in:before { - content: "\e970"; -} - -.pi-sign-out:before { - content: "\e971"; -} - -.pi-wifi:before { - content: "\e96f"; -} - -.pi-sitemap:before { - content: "\e96e"; -} - -.pi-chart-bar:before { - content: "\e96d"; -} - -.pi-camera:before { - content: "\e96c"; -} - -.pi-dollar:before { - content: "\e96b"; -} - -.pi-lock-open:before { - content: "\e96a"; -} - -.pi-table:before { - content: "\e969"; -} - -.pi-map-marker:before { - content: "\e968"; -} - -.pi-list:before { - content: "\e967"; -} - -.pi-eye-slash:before { - content: "\e965"; -} - -.pi-eye:before { - content: "\e966"; -} - -.pi-folder-open:before { - content: "\e964"; -} - -.pi-folder:before { - content: "\e963"; -} - -.pi-video:before { - content: "\e962"; -} - -.pi-inbox:before { - content: "\e961"; -} - -.pi-lock:before { - content: "\e95f"; -} - -.pi-unlock:before { - content: "\e960"; -} - -.pi-tags:before { - content: "\e95d"; -} - -.pi-tag:before { - content: "\e95e"; -} - -.pi-power-off:before { - content: "\e95c"; -} - -.pi-save:before { - content: "\e95b"; -} - -.pi-question-circle:before { - content: "\e959"; -} - -.pi-question:before { - content: "\e95a"; -} - -.pi-copy:before { - content: "\e957"; -} - -.pi-file:before { - content: "\e958"; -} - -.pi-clone:before { - content: "\e955"; -} - -.pi-calendar-times:before { - content: "\e952"; -} - -.pi-calendar-minus:before { - content: "\e953"; -} - -.pi-calendar-plus:before { - content: "\e954"; -} - -.pi-ellipsis-v:before { - content: "\e950"; -} - -.pi-ellipsis-h:before { - content: "\e951"; -} - -.pi-bookmark:before { - content: "\e94e"; -} - -.pi-globe:before { - content: "\e94f"; -} - -.pi-replay:before { - content: "\e94d"; -} - -.pi-filter:before { - content: "\e94c"; -} - -.pi-print:before { - content: "\e94b"; -} - -.pi-align-right:before { - content: "\e946"; -} - -.pi-align-left:before { - content: "\e947"; -} - -.pi-align-center:before { - content: "\e948"; -} - -.pi-align-justify:before { - content: "\e949"; -} - -.pi-cog:before { - content: "\e94a"; -} - -.pi-cloud-download:before { - content: "\e943"; -} - -.pi-cloud-upload:before { - content: "\e944"; -} - -.pi-cloud:before { - content: "\e945"; -} - -.pi-pencil:before { - content: "\e942"; -} - -.pi-users:before { - content: "\e941"; -} - -.pi-clock:before { - content: "\e940"; -} - -.pi-user-minus:before { - content: "\e93e"; -} - -.pi-user-plus:before { - content: "\e93f"; -} - -.pi-trash:before { - content: "\e93d"; -} - -.pi-external-link:before { - content: "\e93c"; -} - -.pi-window-maximize:before { - content: "\e93b"; -} - -.pi-window-minimize:before { - content: "\e93a"; -} - -.pi-refresh:before { - content: "\e938"; -} - -.pi-user:before { - content: "\e939"; -} - -.pi-exclamation-triangle:before { - content: "\e922"; -} - -.pi-calendar:before { - content: "\e927"; -} - -.pi-chevron-circle-left:before { - content: "\e928"; -} - -.pi-chevron-circle-down:before { - content: "\e929"; -} - -.pi-chevron-circle-right:before { - content: "\e92a"; -} - -.pi-chevron-circle-up:before { - content: "\e92b"; -} - -.pi-angle-double-down:before { - content: "\e92c"; -} - -.pi-angle-double-left:before { - content: "\e92d"; -} - -.pi-angle-double-right:before { - content: "\e92e"; -} - -.pi-angle-double-up:before { - content: "\e92f"; -} - -.pi-angle-down:before { - content: "\e930"; -} - -.pi-angle-left:before { - content: "\e931"; -} - -.pi-angle-right:before { - content: "\e932"; -} - -.pi-angle-up:before { - content: "\e933"; -} - -.pi-upload:before { - content: "\e934"; -} - -.pi-download:before { - content: "\e956"; -} - -.pi-ban:before { - content: "\e935"; -} - -.pi-star-fill:before { - content: "\e936"; -} - -.pi-star:before { - content: "\e937"; -} - -.pi-chevron-left:before { - content: "\e900"; -} - -.pi-chevron-right:before { - content: "\e901"; -} - -.pi-chevron-down:before { - content: "\e902"; -} - -.pi-chevron-up:before { - content: "\e903"; -} - -.pi-caret-left:before { - content: "\e904"; -} - -.pi-caret-right:before { - content: "\e905"; -} - -.pi-caret-down:before { - content: "\e906"; -} - -.pi-caret-up:before { - content: "\e907"; -} - -.pi-search:before { - content: "\e908"; -} - -.pi-check:before { - content: "\e909"; -} - -.pi-check-circle:before { - content: "\e90a"; -} - -.pi-times:before { - content: "\e90b"; -} - -.pi-times-circle:before { - content: "\e90c"; -} - -.pi-plus:before { - content: "\e90d"; -} - -.pi-plus-circle:before { - content: "\e90e"; -} - -.pi-minus:before { - content: "\e90f"; -} - -.pi-minus-circle:before { - content: "\e910"; -} - -.pi-circle-on:before { - content: "\e911"; -} - -.pi-circle-off:before { - content: "\e912"; -} - -.pi-sort-down:before { - content: "\e913"; -} - -.pi-sort-up:before { - content: "\e914"; -} - -.pi-sort:before { - content: "\e915"; -} - -.pi-step-backward:before { - content: "\e916"; -} - -.pi-step-forward:before { - content: "\e917"; -} - -.pi-th-large:before { - content: "\e918"; -} - -.pi-arrow-down:before { - content: "\e919"; -} - -.pi-arrow-left:before { - content: "\e91a"; -} - -.pi-arrow-right:before { - content: "\e91b"; -} - -.pi-arrow-up:before { - content: "\e91c"; -} - -.pi-bars:before { - content: "\e91d"; -} - -.pi-arrow-circle-down:before { - content: "\e91e"; -} - -.pi-arrow-circle-left:before { - content: "\e91f"; -} - -.pi-arrow-circle-right:before { - content: "\e920"; -} - -.pi-arrow-circle-up:before { - content: "\e921"; -} - -.pi-info:before { - content: "\e923"; -} - -.pi-info-circle:before { - content: "\e924"; -} - -.pi-home:before { - content: "\e925"; -} - -.pi-spinner:before { - content: "\e926"; -} -@layer primevue, tailwind-utilities; - -@layer tailwind-utilities { - .container{ - width: 100%; - } - @media (min-width: 640px){ - - .container{ - max-width: 640px; - } - } - @media (min-width: 768px){ - - .container{ - max-width: 768px; - } - } - @media (min-width: 1024px){ - - .container{ - max-width: 1024px; - } - } - @media (min-width: 1280px){ - - .container{ - max-width: 1280px; - } - } - @media (min-width: 1536px){ - - .container{ - max-width: 1536px; - } - } - @media (min-width: 1800px){ - - .container{ - max-width: 1800px; - } - } - @media (min-width: 2500px){ - - .container{ - max-width: 2500px; - } - } - @media (min-width: 3200px){ - - .container{ - max-width: 3200px; - } - } - .pointer-events-none{ - pointer-events: none; - } - .pointer-events-auto{ - pointer-events: auto; - } - .\!visible{ - visibility: visible !important; - } - .visible{ - visibility: visible; - } - .invisible{ - visibility: hidden; - } - .collapse{ - visibility: collapse; - } - .static{ - position: static; - } - .fixed{ - position: fixed; - } - .absolute{ - position: absolute; - } - .relative{ - position: relative; - } - .inset-0{ - inset: 0px; - } - .bottom-\[10px\]{ - bottom: 10px; - } - .bottom-full{ - bottom: 100%; - } - .left-0{ - left: 0px; - } - .left-\[-350px\]{ - left: -350px; - } - .right-\[10px\]{ - right: 10px; - } - .top-0{ - top: 0px; - } - .top-\[50px\]{ - top: 50px; - } - .top-auto{ - top: auto; - } - .z-10{ - z-index: 10; - } - .z-\[1000\]{ - z-index: 1000; - } - .z-\[9999\]{ - z-index: 9999; - } - .m-0{ - margin: 0px; - } - .m-1{ - margin: 0.25rem; - } - .m-12{ - margin: 3rem; - } - .m-2{ - margin: 0.5rem; - } - .mx-1{ - margin-left: 0.25rem; - margin-right: 0.25rem; - } - .mx-2{ - margin-left: 0.5rem; - margin-right: 0.5rem; - } - .mx-6{ - margin-left: 1.5rem; - margin-right: 1.5rem; - } - .my-0{ - margin-top: 0px; - margin-bottom: 0px; - } - .my-1{ - margin-top: 0.25rem; - margin-bottom: 0.25rem; - } - .my-2{ - margin-top: 0.5rem; - margin-bottom: 0.5rem; - } - .my-2\.5{ - margin-top: 0.625rem; - margin-bottom: 0.625rem; - } - .my-4{ - margin-top: 1rem; - margin-bottom: 1rem; - } - .mb-2{ - margin-bottom: 0.5rem; - } - .mb-3{ - margin-bottom: 0.75rem; - } - .mb-4{ - margin-bottom: 1rem; - } - .mb-6{ - margin-bottom: 1.5rem; - } - .mb-7{ - margin-bottom: 1.75rem; - } - .ml-2{ - margin-left: 0.5rem; - } - .ml-\[-13px\]{ - margin-left: -13px; - } - .ml-auto{ - margin-left: auto; - } - .mr-1{ - margin-right: 0.25rem; - } - .mr-2{ - margin-right: 0.5rem; - } - .mt-0{ - margin-top: 0px; - } - .mt-1{ - margin-top: 0.25rem; - } - .mt-2{ - margin-top: 0.5rem; - } - .mt-24{ - margin-top: 6rem; - } - .mt-4{ - margin-top: 1rem; - } - .mt-5{ - margin-top: 1.25rem; - } - .block{ - display: block; - } - .inline-block{ - display: inline-block; - } - .inline{ - display: inline; - } - .flex{ - display: flex; - } - .inline-flex{ - display: inline-flex; - } - .table{ - display: table; - } - .grid{ - display: grid; - } - .contents{ - display: contents; - } - .hidden{ - display: none; - } - .h-0{ - height: 0px; - } - .h-1{ - height: 0.25rem; - } - .h-16{ - height: 4rem; - } - .h-6{ - height: 1.5rem; - } - .h-64{ - height: 16rem; - } - .h-96{ - height: 26rem; - } - .h-\[22px\]{ - height: 22px; - } - .h-\[30rem\]{ - height: 30rem; - } - .h-\[var\(--comfy-topbar-height\)\]{ - height: var(--comfy-topbar-height); - } - .h-full{ - height: 100%; - } - .h-screen{ - height: 100vh; - } - .max-h-96{ - max-height: 26rem; - } - .max-h-full{ - max-height: 100%; - } - .min-h-8{ - min-height: 2rem; - } - .min-h-screen{ - min-height: 100vh; - } - .w-1\/2{ - width: 50%; - } - .w-12{ - width: 3rem; - } - .w-14{ - width: 3.5rem; - } - .w-16{ - width: 4rem; - } - .w-28{ - width: 7rem; - } - .w-3\/12{ - width: 25%; - } - .w-44{ - width: 11rem; - } - .w-48{ - width: 12rem; - } - .w-6{ - width: 1.5rem; - } - .w-64{ - width: 16rem; - } - .w-8{ - width: 2rem; - } - .w-\[22px\]{ - width: 22px; - } - .w-\[600px\]{ - width: 600px; - } - .w-auto{ - width: auto; - } - .w-fit{ - width: -moz-fit-content; - width: fit-content; - } - .w-full{ - width: 100%; - } - .w-screen{ - width: 100vw; - } - .min-w-0{ - min-width: 0px; - } - .min-w-110{ - min-width: 32rem; - } - .min-w-84{ - min-width: 22rem; - } - .min-w-96{ - min-width: 26rem; - } - .max-w-110{ - max-width: 32rem; - } - .max-w-64{ - max-width: 16rem; - } - .max-w-\[150px\]{ - max-width: 150px; - } - .max-w-\[600px\]{ - max-width: 600px; - } - .max-w-full{ - max-width: 100%; - } - .max-w-screen-sm{ - max-width: 640px; - } - .flex-1{ - flex: 1 1 0%; - } - .flex-shrink-0{ - flex-shrink: 0; - } - .shrink-0{ - flex-shrink: 0; - } - .flex-grow{ - flex-grow: 1; - } - .grow{ - flex-grow: 1; - } - .-translate-y-40{ - --tw-translate-y: -10rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - .scale-75{ - --tw-scale-x: .75; - --tw-scale-y: .75; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - .transform{ - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); - } - .cursor-move{ - cursor: move; - } - .cursor-pointer{ - cursor: pointer; - } - .select-none{ - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - } - .resize{ - resize: both; - } - .list-inside{ - list-style-position: inside; - } - .list-disc{ - list-style-type: disc; - } - .grid-cols-2{ - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - .flex-row{ - flex-direction: row; - } - .flex-row-reverse{ - flex-direction: row-reverse; - } - .flex-col{ - flex-direction: column; - } - .flex-wrap{ - flex-wrap: wrap; - } - .flex-nowrap{ - flex-wrap: nowrap; - } - .content-center{ - align-content: center; - } - .items-center{ - align-items: center; - } - .justify-end{ - justify-content: flex-end; - } - .justify-center{ - justify-content: center; - } - .justify-between{ - justify-content: space-between; - } - .justify-around{ - justify-content: space-around; - } - .gap-0{ - gap: 0px; - } - .gap-2{ - gap: 0.5rem; - } - .gap-3{ - gap: 0.75rem; - } - .gap-4{ - gap: 1rem; - } - .gap-6{ - gap: 1.5rem; - } - .gap-8{ - gap: 2rem; - } - .space-y-1 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); - } - .space-y-2 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); - } - .space-y-4 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1rem * var(--tw-space-y-reverse)); - } - .place-self-end{ - place-self: end; - } - .justify-self-end{ - justify-self: end; - } - .overflow-auto{ - overflow: auto; - } - .overflow-hidden{ - overflow: hidden; - } - .overflow-y-auto{ - overflow-y: auto; - } - .overflow-x-hidden{ - overflow-x: hidden; - } - .truncate{ - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - .text-ellipsis{ - text-overflow: ellipsis; - } - .whitespace-nowrap{ - white-space: nowrap; - } - .whitespace-pre-line{ - white-space: pre-line; - } - .whitespace-pre-wrap{ - white-space: pre-wrap; - } - .text-wrap{ - text-wrap: wrap; - } - .text-nowrap{ - text-wrap: nowrap; - } - .rounded{ - border-radius: 0.25rem; - } - .rounded-lg{ - border-radius: 0.5rem; - } - .rounded-none{ - border-radius: 0px; - } - .rounded-t-lg{ - border-top-left-radius: 0.5rem; - border-top-right-radius: 0.5rem; - } - .border{ - border-width: 1px; - } - .border-0{ - border-width: 0px; - } - .border-x-0{ - border-left-width: 0px; - border-right-width: 0px; - } - .border-b{ - border-bottom-width: 1px; - } - .border-l{ - border-left-width: 1px; - } - .border-r{ - border-right-width: 1px; - } - .border-t-0{ - border-top-width: 0px; - } - .border-solid{ - border-style: solid; - } - .border-none{ - border-style: none; - } - .bg-\[var\(--comfy-menu-bg\)\]{ - background-color: var(--comfy-menu-bg); - } - .bg-\[var\(--p-tree-background\)\]{ - background-color: var(--p-tree-background); - } - .bg-black{ - --tw-bg-opacity: 1; - background-color: rgb(0 0 0 / var(--tw-bg-opacity)); - } - .bg-blue-500{ - --tw-bg-opacity: 1; - background-color: rgb(66 153 225 / var(--tw-bg-opacity)); - } - .bg-gray-100{ - --tw-bg-opacity: 1; - background-color: rgb(243 246 250 / var(--tw-bg-opacity)); - } - .bg-gray-800{ - --tw-bg-opacity: 1; - background-color: rgb(45 55 72 / var(--tw-bg-opacity)); - } - .bg-green-500{ - --tw-bg-opacity: 1; - background-color: rgb(150 206 76 / var(--tw-bg-opacity)); - } - .bg-neutral-300{ - --tw-bg-opacity: 1; - background-color: rgb(212 212 212 / var(--tw-bg-opacity)); - } - .bg-neutral-700{ - --tw-bg-opacity: 1; - background-color: rgb(64 64 64 / var(--tw-bg-opacity)); - } - .bg-neutral-800{ - --tw-bg-opacity: 1; - background-color: rgb(38 38 38 / var(--tw-bg-opacity)); - } - .bg-neutral-900{ - --tw-bg-opacity: 1; - background-color: rgb(23 23 23 / var(--tw-bg-opacity)); - } - .bg-red-500{ - --tw-bg-opacity: 1; - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); - } - .bg-red-700{ - --tw-bg-opacity: 1; - background-color: rgb(185 28 28 / var(--tw-bg-opacity)); - } - .bg-transparent{ - background-color: transparent; - } - .bg-opacity-50{ - --tw-bg-opacity: 0.5; - } - .bg-\[url\(\'\/assets\/images\/Git-Logo-White\.svg\'\)\]{ - background-image: url('../assets/images/Git-Logo-White.svg'); - } - .bg-right-top{ - background-position: right top; - } - .bg-no-repeat{ - background-repeat: no-repeat; - } - .bg-origin-padding{ - background-origin: padding-box; - } - .object-contain{ - -o-object-fit: contain; - object-fit: contain; - } - .object-cover{ - -o-object-fit: cover; - object-fit: cover; - } - .p-0{ - padding: 0px; - } - .p-1{ - padding: 0.25rem; - } - .p-2{ - padding: 0.5rem; - } - .p-3{ - padding: 0.75rem; - } - .p-4{ - padding: 1rem; - } - .p-5{ - padding: 1.25rem; - } - .p-6{ - padding: 1.5rem; - } - .p-8{ - padding: 2rem; - } - .px-0{ - padding-left: 0px; - padding-right: 0px; - } - .px-10{ - padding-left: 2.5rem; - padding-right: 2.5rem; - } - .px-2{ - padding-left: 0.5rem; - padding-right: 0.5rem; - } - .px-4{ - padding-left: 1rem; - padding-right: 1rem; - } - .py-0{ - padding-top: 0px; - padding-bottom: 0px; - } - .py-1{ - padding-top: 0.25rem; - padding-bottom: 0.25rem; - } - .pb-0{ - padding-bottom: 0px; - } - .pl-4{ - padding-left: 1rem; - } - .pl-6{ - padding-left: 1.5rem; - } - .pr-0{ - padding-right: 0px; - } - .pr-2{ - padding-right: 0.5rem; - } - .pt-2{ - padding-top: 0.5rem; - } - .pt-4{ - padding-top: 1rem; - } - .pt-6{ - padding-top: 1.5rem; - } - .pt-8{ - padding-top: 2rem; - } - .text-center{ - text-align: center; - } - .font-mono{ - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - } - .font-sans{ - font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - } - .text-2xl{ - font-size: 1.5rem; - } - .text-3xl{ - font-size: 1.875rem; - } - .text-4xl{ - font-size: 2.25rem; - } - .text-lg{ - font-size: 1.125rem; - } - .text-sm{ - font-size: 0.875rem; - } - .text-xl{ - font-size: 1.25rem; - } - .text-xs{ - font-size: 0.75rem; - } - .font-bold{ - font-weight: 700; - } - .font-light{ - font-weight: 300; - } - .font-medium{ - font-weight: 500; - } - .font-normal{ - font-weight: 400; - } - .font-semibold{ - font-weight: 600; - } - .uppercase{ - text-transform: uppercase; - } - .italic{ - font-style: italic; - } - .text-blue-400{ - --tw-text-opacity: 1; - color: rgb(99 179 237 / var(--tw-text-opacity)); - } - .text-gray-400{ - --tw-text-opacity: 1; - color: rgb(203 213 224 / var(--tw-text-opacity)); - } - .text-green-500{ - --tw-text-opacity: 1; - color: rgb(150 206 76 / var(--tw-text-opacity)); - } - .text-highlight{ - color: var(--p-primary-color); - } - .text-muted{ - color: var(--p-text-muted-color); - } - .text-neutral-100{ - --tw-text-opacity: 1; - color: rgb(245 245 245 / var(--tw-text-opacity)); - } - .text-neutral-200{ - --tw-text-opacity: 1; - color: rgb(229 229 229 / var(--tw-text-opacity)); - } - .text-neutral-300{ - --tw-text-opacity: 1; - color: rgb(212 212 212 / var(--tw-text-opacity)); - } - .text-neutral-400{ - --tw-text-opacity: 1; - color: rgb(163 163 163 / var(--tw-text-opacity)); - } - .text-neutral-800{ - --tw-text-opacity: 1; - color: rgb(38 38 38 / var(--tw-text-opacity)); - } - .text-neutral-900{ - --tw-text-opacity: 1; - color: rgb(23 23 23 / var(--tw-text-opacity)); - } - .text-red-500{ - --tw-text-opacity: 1; - color: rgb(239 68 68 / var(--tw-text-opacity)); - } - .underline{ - text-decoration-line: underline; - } - .no-underline{ - text-decoration-line: none; - } - .opacity-0{ - opacity: 0; - } - .opacity-100{ - opacity: 1; - } - .opacity-40{ - opacity: 0.4; - } - .opacity-50{ - opacity: 0.5; - } - .shadow-lg{ - --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); - } - .outline{ - outline-style: solid; - } - .blur{ - --tw-blur: blur(8px); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); - } - .drop-shadow{ - --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow(0 1px 1px rgb(0 0 0 / 0.06)); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); - } - .invert{ - --tw-invert: invert(100%); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); - } - .filter{ - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); - } - .backdrop-filter{ - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); - } - .transition{ - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; - } - .transition-all{ - transition-property: all; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; - } - .transition-opacity{ - transition-property: opacity; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; - } - .duration-100{ - transition-duration: 100ms; - } - .duration-300{ - transition-duration: 300ms; - } - .ease-in{ - transition-timing-function: cubic-bezier(0.4, 0, 1, 1); - } - .ease-in-out{ - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - } - .ease-out{ - transition-timing-function: cubic-bezier(0, 0, 0.2, 1); - } - .content-\[\'\'\]{ - --tw-content: ''; - content: var(--tw-content); - } -} - -:root { - --fg-color: #000; - --bg-color: #fff; - --comfy-menu-bg: #353535; - --comfy-menu-secondary-bg: #292929; - --comfy-topbar-height: 2.5rem; - --comfy-input-bg: #222; - --input-text: #ddd; - --descrip-text: #999; - --drag-text: #ccc; - --error-text: #ff4444; - --border-color: #4e4e4e; - --tr-even-bg-color: #222; - --tr-odd-bg-color: #353535; - --primary-bg: #236692; - --primary-fg: #ffffff; - --primary-hover-bg: #3485bb; - --primary-hover-fg: #ffffff; - --content-bg: #e0e0e0; - --content-fg: #000; - --content-hover-bg: #adadad; - --content-hover-fg: #000; -} - -@media (prefers-color-scheme: dark) { - :root { - --fg-color: #fff; - --bg-color: #202020; - --content-bg: #4e4e4e; - --content-fg: #fff; - --content-hover-bg: #222; - --content-hover-fg: #fff; - } -} - -body { - width: 100vw; - height: 100vh; - margin: 0; - overflow: hidden; - grid-template-columns: auto 1fr auto; - grid-template-rows: auto 1fr auto; - background: var(--bg-color) var(--bg-img); - color: var(--fg-color); - min-height: -webkit-fill-available; - max-height: -webkit-fill-available; - min-width: -webkit-fill-available; - max-width: -webkit-fill-available; - font-family: Arial, sans-serif; -} - -/** - +------------------+------------------+------------------+ - | | - | .comfyui-body- | - | top | - | (spans all cols) | - | | - +------------------+------------------+------------------+ - | | | | - | .comfyui-body- | #graph-canvas | .comfyui-body- | - | left | | right | - | | | | - | | | | - +------------------+------------------+------------------+ - | | - | .comfyui-body- | - | bottom | - | (spans all cols) | - | | - +------------------+------------------+------------------+ -*/ - -.comfyui-body-top { - order: -5; - /* Span across all columns */ - grid-column: 1/-1; - /* Position at the first row */ - grid-row: 1; - /* Top menu bar dropdown needs to be above of graph canvas splitter overlay which is z-index: 999 */ - /* Top menu bar z-index needs to be higher than bottom menu bar z-index as by default - pysssss's image feed is located at body-bottom, and it can overlap with the queue button, which - is located in body-top. */ - z-index: 1001; - display: flex; - flex-direction: column; -} - -.comfyui-body-left { - order: -4; - /* Position in the first column */ - grid-column: 1; - /* Position below the top element */ - grid-row: 2; - z-index: 10; - display: flex; -} - -.graph-canvas-container { - width: 100%; - height: 100%; - order: -3; - grid-column: 2; - grid-row: 2; - position: relative; - overflow: hidden; -} - -#graph-canvas { - width: 100%; - height: 100%; - touch-action: none; -} - -.comfyui-body-right { - order: -2; - z-index: 10; - grid-column: 3; - grid-row: 2; -} - -.comfyui-body-bottom { - order: 4; - /* Span across all columns */ - grid-column: 1/-1; - grid-row: 3; - /* Bottom menu bar dropdown needs to be above of graph canvas splitter overlay which is z-index: 999 */ - z-index: 1000; - display: flex; - flex-direction: column; -} - -.comfy-multiline-input { - background-color: var(--comfy-input-bg); - color: var(--input-text); - overflow: hidden; - overflow-y: auto; - padding: 2px; - resize: none; - border: none; - box-sizing: border-box; - font-size: var(--comfy-textarea-font-size); -} - -.comfy-markdown { - /* We assign the textarea and the Tiptap editor to the same CSS grid area to stack them on top of one another. */ - display: grid; -} - -.comfy-markdown > textarea { - grid-area: 1 / 1 / 2 / 2; -} - -.comfy-markdown .tiptap { - grid-area: 1 / 1 / 2 / 2; - background-color: var(--comfy-input-bg); - color: var(--input-text); - overflow: hidden; - overflow-y: auto; - resize: none; - border: none; - box-sizing: border-box; - font-size: var(--comfy-textarea-font-size); - height: 100%; - padding: 0.5em; -} - -.comfy-markdown.editing .tiptap { - display: none; -} - -.comfy-markdown .tiptap :first-child { - margin-top: 0; -} - -.comfy-markdown .tiptap :last-child { - margin-bottom: 0; -} - -.comfy-markdown .tiptap blockquote { - border-left: medium solid; - margin-left: 1em; - padding-left: 0.5em; -} - -.comfy-markdown .tiptap pre { - border: thin dotted; - border-radius: 0.5em; - margin: 0.5em; - padding: 0.5em; -} - -.comfy-markdown .tiptap table { - border-collapse: collapse; -} - -.comfy-markdown .tiptap th { - text-align: left; - background: var(--comfy-menu-bg); -} - -.comfy-markdown .tiptap th, -.comfy-markdown .tiptap td { - padding: 0.5em; - border: thin solid; -} - -.comfy-modal { - display: none; /* Hidden by default */ - position: fixed; /* Stay in place */ - z-index: 100; /* Sit on top */ - padding: 30px 30px 10px 30px; - background-color: var(--comfy-menu-bg); /* Modal background */ - color: var(--error-text); - box-shadow: 0 0 20px #888888; - border-radius: 10px; - top: 50%; - left: 50%; - max-width: 80vw; - max-height: 80vh; - transform: translate(-50%, -50%); - overflow: hidden; - justify-content: center; - font-family: monospace; - font-size: 15px; -} - -.comfy-modal-content { - display: flex; - flex-direction: column; -} - -.comfy-modal p { - overflow: auto; - white-space: pre-line; /* This will respect line breaks */ - margin-bottom: 20px; /* Add some margin between the text and the close button*/ -} - -.comfy-modal select, -.comfy-modal input[type='button'], -.comfy-modal input[type='checkbox'] { - margin: 3px 3px 3px 4px; -} - -.comfy-menu { - font-size: 15px; - position: absolute; - top: 50%; - right: 0; - text-align: center; - z-index: 999; - width: 190px; - display: flex; - flex-direction: column; - align-items: center; - color: var(--descrip-text); - background-color: var(--comfy-menu-bg); - font-family: sans-serif; - padding: 10px; - border-radius: 0 8px 8px 8px; - box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4); -} - -.comfy-menu-header { - display: flex; -} - -.comfy-menu-actions { - display: flex; - gap: 3px; - align-items: center; - height: 20px; - position: relative; - top: -1px; - font-size: 22px; -} - -.comfy-menu .comfy-menu-actions button { - background-color: rgba(0, 0, 0, 0); - padding: 0; - border: none; - cursor: pointer; - font-size: inherit; -} - -.comfy-menu .comfy-menu-actions .comfy-settings-btn { - font-size: 0.6em; -} - -button.comfy-close-menu-btn { - font-size: 1em; - line-height: 12px; - color: #ccc; - position: relative; - top: -1px; -} - -.comfy-menu-queue-size { - flex: auto; -} - -.comfy-menu button, -.comfy-modal button { - font-size: 20px; -} - -.comfy-menu-btns { - margin-bottom: 10px; - width: 100%; -} - -.comfy-menu-btns button { - font-size: 10px; - width: 50%; - color: var(--descrip-text) !important; -} - -.comfy-menu > button { - width: 100%; -} - -.comfy-btn, -.comfy-menu > button, -.comfy-menu-btns button, -.comfy-menu .comfy-list button, -.comfy-modal button { - color: var(--input-text); - background-color: var(--comfy-input-bg); - border-radius: 8px; - border-color: var(--border-color); - border-style: solid; - margin-top: 2px; -} - -.comfy-btn:hover:not(:disabled), -.comfy-menu > button:hover, -.comfy-menu-btns button:hover, -.comfy-menu .comfy-list button:hover, -.comfy-modal button:hover, -.comfy-menu-actions button:hover { - filter: brightness(1.2); - will-change: transform; - cursor: pointer; -} - -span.drag-handle { - width: 10px; - height: 20px; - display: inline-block; - overflow: hidden; - line-height: 5px; - padding: 3px 4px; - cursor: move; - vertical-align: middle; - margin-top: -0.4em; - margin-left: -0.2em; - font-size: 12px; - font-family: sans-serif; - letter-spacing: 2px; - color: var(--drag-text); - text-shadow: 1px 0 1px black; - touch-action: none; -} - -span.drag-handle::after { - content: '.. .. ..'; -} - -.comfy-queue-btn { - width: 100%; -} - -.comfy-list { - color: var(--descrip-text); - background-color: var(--comfy-menu-bg); - margin-bottom: 10px; - border-color: var(--border-color); - border-style: solid; -} - -.comfy-list-items { - overflow-y: scroll; - max-height: 100px; - min-height: 25px; - background-color: var(--comfy-input-bg); - padding: 5px; -} - -.comfy-list h4 { - min-width: 160px; - margin: 0; - padding: 3px; - font-weight: normal; -} - -.comfy-list-items button { - font-size: 10px; -} - -.comfy-list-actions { - margin: 5px; - display: flex; - gap: 5px; - justify-content: center; -} - -.comfy-list-actions button { - font-size: 12px; -} - -button.comfy-queue-btn { - margin: 6px 0 !important; -} - -.comfy-modal.comfy-settings, -.comfy-modal.comfy-manage-templates { - text-align: center; - font-family: sans-serif; - color: var(--descrip-text); - z-index: 99; -} - -.comfy-modal.comfy-settings input[type='range'] { - vertical-align: middle; -} - -.comfy-modal.comfy-settings input[type='range'] + input[type='number'] { - width: 3.5em; -} - -.comfy-modal input, -.comfy-modal select { - color: var(--input-text); - background-color: var(--comfy-input-bg); - border-radius: 8px; - border-color: var(--border-color); - border-style: solid; - font-size: inherit; -} - -.comfy-tooltip-indicator { - text-decoration: underline; - text-decoration-style: dashed; -} - -@media only screen and (max-height: 850px) { - .comfy-menu { - top: 0 !important; - bottom: 0 !important; - left: auto !important; - right: 0 !important; - border-radius: 0; - } - - .comfy-menu span.drag-handle { - display: none; - } - - .comfy-menu-queue-size { - flex: unset; - } - - .comfy-menu-header { - justify-content: space-between; - } - .comfy-menu-actions { - gap: 10px; - font-size: 28px; - } -} - -/* Input popup */ - -.graphdialog { - min-height: 1em; - background-color: var(--comfy-menu-bg); -} - -.graphdialog .name { - font-size: 14px; - font-family: sans-serif; - color: var(--descrip-text); -} - -.graphdialog button { - margin-top: unset; - vertical-align: unset; - height: 1.6em; - padding-right: 8px; -} - -.graphdialog input, -.graphdialog textarea, -.graphdialog select { - background-color: var(--comfy-input-bg); - border: 2px solid; - border-color: var(--border-color); - color: var(--input-text); - border-radius: 12px 0 0 12px; -} - -/* Dialogs */ - -dialog { - box-shadow: 0 0 20px #888888; -} - -dialog::backdrop { - background: rgba(0, 0, 0, 0.5); -} - -.comfy-dialog.comfyui-dialog.comfy-modal { - top: 0; - left: 0; - right: 0; - bottom: 0; - transform: none; -} - -.comfy-dialog.comfy-modal { - font-family: Arial, sans-serif; - border-color: var(--bg-color); - box-shadow: none; - border: 2px solid var(--border-color); -} - -.comfy-dialog .comfy-modal-content { - flex-direction: row; - flex-wrap: wrap; - gap: 10px; - color: var(--fg-color); -} - -.comfy-dialog .comfy-modal-content h3 { - margin-top: 0; -} - -.comfy-dialog .comfy-modal-content > p { - width: 100%; -} - -.comfy-dialog .comfy-modal-content > .comfyui-button { - flex: 1; - justify-content: center; -} - -#comfy-settings-dialog { - padding: 0; - width: 41rem; -} - -#comfy-settings-dialog tr > td:first-child { - text-align: right; -} - -#comfy-settings-dialog tbody button, -#comfy-settings-dialog table > button { - background-color: var(--bg-color); - border: 1px var(--border-color) solid; - border-radius: 0; - color: var(--input-text); - font-size: 1rem; - padding: 0.5rem; -} - -#comfy-settings-dialog button:hover { - background-color: var(--tr-odd-bg-color); -} - -/* General CSS for tables */ - -.comfy-table { - border-collapse: collapse; - color: var(--input-text); - font-family: Arial, sans-serif; - width: 100%; -} - -.comfy-table caption { - position: sticky; - top: 0; - background-color: var(--bg-color); - color: var(--input-text); - font-size: 1rem; - font-weight: bold; - padding: 8px; - text-align: center; - border-bottom: 1px solid var(--border-color); -} - -.comfy-table caption .comfy-btn { - position: absolute; - top: -2px; - right: 0; - bottom: 0; - cursor: pointer; - border: none; - height: 100%; - border-radius: 0; - aspect-ratio: 1/1; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - font-size: 20px; -} - -.comfy-table caption .comfy-btn:focus { - outline: none; -} - -.comfy-table tr:nth-child(even) { - background-color: var(--tr-even-bg-color); -} - -.comfy-table tr:nth-child(odd) { - background-color: var(--tr-odd-bg-color); -} - -.comfy-table td, -.comfy-table th { - border: 1px solid var(--border-color); - padding: 8px; -} - -/* Context menu */ - -.litegraph .dialog { - z-index: 1; - font-family: Arial, sans-serif; -} - -.litegraph .litemenu-entry.has_submenu { - position: relative; - padding-right: 20px; -} - -.litemenu-entry.has_submenu::after { - content: '>'; - position: absolute; - top: 0; - right: 2px; -} - -.litegraph.litecontextmenu, -.litegraph.litecontextmenu.dark { - z-index: 9999 !important; - background-color: var(--comfy-menu-bg) !important; -} - -.litegraph.litecontextmenu - .litemenu-entry:hover:not(.disabled):not(.separator) { - background-color: var(--comfy-menu-hover-bg, var(--border-color)) !important; - color: var(--fg-color); -} - -.litegraph.litecontextmenu .litemenu-entry.submenu, -.litegraph.litecontextmenu.dark .litemenu-entry.submenu { - background-color: var(--comfy-menu-bg) !important; - color: var(--input-text); -} - -.litegraph.litecontextmenu input { - background-color: var(--comfy-input-bg) !important; - color: var(--input-text) !important; -} - -.comfy-context-menu-filter { - box-sizing: border-box; - border: 1px solid #999; - margin: 0 0 5px 5px; - width: calc(100% - 10px); -} - -.comfy-img-preview { - pointer-events: none; - overflow: hidden; - display: flex; - flex-wrap: wrap; - align-content: flex-start; - justify-content: center; -} - -.comfy-img-preview img { - -o-object-fit: contain; - object-fit: contain; - width: var(--comfy-img-preview-width); - height: var(--comfy-img-preview-height); -} - -.comfy-missing-nodes li button { - font-size: 12px; - margin-left: 5px; -} - -/* Search box */ - -.litegraph.litesearchbox { - z-index: 9999 !important; - background-color: var(--comfy-menu-bg) !important; - overflow: hidden; - display: block; -} - -.litegraph.litesearchbox input, -.litegraph.litesearchbox select { - background-color: var(--comfy-input-bg) !important; - color: var(--input-text); -} - -.litegraph.lite-search-item { - color: var(--input-text); - background-color: var(--comfy-input-bg); - filter: brightness(80%); - will-change: transform; - padding-left: 0.2em; -} - -.litegraph.lite-search-item.generic_type { - color: var(--input-text); - filter: brightness(50%); - will-change: transform; -} - -@media only screen and (max-width: 450px) { - #comfy-settings-dialog .comfy-table tbody { - display: grid; - } - #comfy-settings-dialog .comfy-table tr { - display: grid; - } - #comfy-settings-dialog tr > td:first-child { - text-align: center; - border-bottom: none; - padding-bottom: 0; - } - #comfy-settings-dialog tr > td:not(:first-child) { - text-align: center; - border-top: none; - } -} - -audio.comfy-audio.empty-audio-widget { - display: none; -} - -#vue-app { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - pointer-events: none; -} - -/* Set auto complete panel's width as it is not accessible within vue-root */ -.p-autocomplete-overlay { - max-width: 25vw; -} - -.p-tree-node-content { - padding: var(--comfy-tree-explorer-item-padding) !important; -} - -/* [Desktop] Electron window specific styles */ -.app-drag { - app-region: drag; -} - -.no-drag { - app-region: no-drag; -} - -.window-actions-spacer { - width: calc(100vw - env(titlebar-area-width, 100vw)); -} -/* End of [Desktop] Electron window specific styles */ -.hover\:bg-neutral-700:hover{ - --tw-bg-opacity: 1; - background-color: rgb(64 64 64 / var(--tw-bg-opacity)); -} -.hover\:bg-opacity-75:hover{ - --tw-bg-opacity: 0.75; -} -.hover\:text-blue-300:hover{ - --tw-text-opacity: 1; - color: rgb(144 205 244 / var(--tw-text-opacity)); -} -.hover\:opacity-100:hover{ - opacity: 1; -} -@media (min-width: 768px){ - - .md\:flex{ - display: flex; - } - - .md\:hidden{ - display: none; - } -} -@media (min-width: 1536px){ - - .\32xl\:mx-4{ - margin-left: 1rem; - margin-right: 1rem; - } - - .\32xl\:w-64{ - width: 16rem; - } - - .\32xl\:max-w-full{ - max-width: 100%; - } - - .\32xl\:p-16{ - padding: 4rem; - } - - .\32xl\:p-4{ - padding: 1rem; - } - - .\32xl\:p-\[var\(--p-dialog-content-padding\)\]{ - padding: var(--p-dialog-content-padding); - } - - .\32xl\:p-\[var\(--p-dialog-header-padding\)\]{ - padding: var(--p-dialog-header-padding); - } - - .\32xl\:px-4{ - padding-left: 1rem; - padding-right: 1rem; - } - - .\32xl\:text-sm{ - font-size: 0.875rem; - } -} -@media (prefers-color-scheme: dark){ - - .dark\:bg-gray-800{ - --tw-bg-opacity: 1; - background-color: rgb(45 55 72 / var(--tw-bg-opacity)); - } -} - -.global-dialog .p-dialog-header { - padding: 0.5rem -} -@media (min-width: 1536px) { -.global-dialog .p-dialog-header { - padding: var(--p-dialog-header-padding) -} -} -.global-dialog .p-dialog-header { - padding-bottom: 0px -} -.global-dialog .p-dialog-content { - padding: 0.5rem -} -@media (min-width: 1536px) { -.global-dialog .p-dialog-content { - padding: var(--p-dialog-content-padding) -} -} -.global-dialog .p-dialog-content { - padding-top: 0px -} - -.prompt-dialog-content[data-v-3df70997] { - white-space: pre-wrap; -} - -.no-results-placeholder[data-v-f2b77816] .p-card { - background-color: var(--surface-ground); - text-align: center; - box-shadow: unset; -} -.no-results-placeholder h3[data-v-f2b77816] { - color: var(--text-color); - margin-bottom: 0.5rem; -} -.no-results-placeholder p[data-v-f2b77816] { - color: var(--text-color-secondary); - margin-bottom: 1rem; -} - -.comfy-error-report[data-v-09b72a20] { - display: flex; - flex-direction: column; - gap: 1rem; -} -.action-container[data-v-09b72a20] { - display: flex; - gap: 1rem; - justify-content: flex-end; -} -.wrapper-pre[data-v-09b72a20] { - white-space: pre-wrap; - word-wrap: break-word; -} - -.comfy-missing-nodes[data-v-425cc3ac] { - max-height: 300px; - overflow-y: auto; -} -.node-hint[data-v-425cc3ac] { - margin-left: 0.5rem; - font-style: italic; - color: var(--text-color-secondary); -} -[data-v-425cc3ac] .p-button { - margin-left: auto; -} - -.comfy-missing-models[data-v-ebf9fccc] { - max-height: 300px; - overflow-y: auto; -} - -[data-v-53692f7e] .i-badge { - - --tw-bg-opacity: 1; - - background-color: rgb(150 206 76 / var(--tw-bg-opacity)); - - --tw-text-opacity: 1; - - color: rgb(255 255 255 / var(--tw-text-opacity)) -} -[data-v-53692f7e] .o-badge { - - --tw-bg-opacity: 1; - - background-color: rgb(239 68 68 / var(--tw-bg-opacity)); - - --tw-text-opacity: 1; - - color: rgb(255 255 255 / var(--tw-text-opacity)) -} -[data-v-53692f7e] .c-badge { - - --tw-bg-opacity: 1; - - background-color: rgb(66 153 225 / var(--tw-bg-opacity)); - - --tw-text-opacity: 1; - - color: rgb(255 255 255 / var(--tw-text-opacity)) -} -[data-v-53692f7e] .s-badge { - - --tw-bg-opacity: 1; - - background-color: rgb(234 179 8 / var(--tw-bg-opacity)) -} - -[data-v-ba13476b] .p-inputtext { - --p-form-field-padding-x: 0.625rem; -} -.p-button.p-inputicon[data-v-ba13476b] { - width: auto; - border-style: none; - padding: 0px; -} - -.form-input[data-v-e4e3022d] .input-slider .p-inputnumber input, -.form-input[data-v-e4e3022d] .input-slider .slider-part { - - width: 5rem -} -.form-input[data-v-e4e3022d] .p-inputtext, -.form-input[data-v-e4e3022d] .p-select { - - width: 11rem -} - -.settings-tab-panels { - padding-top: 0px !important; -} - -.settings-container[data-v-2e21278f] { - display: flex; - height: 70vh; - width: 60vw; - max-width: 1024px; - overflow: hidden; -} -@media (max-width: 768px) { -.settings-container[data-v-2e21278f] { - flex-direction: column; - height: auto; - width: 80vw; -} -.settings-sidebar[data-v-2e21278f] { - width: 100%; -} -.settings-content[data-v-2e21278f] { - height: 350px; -} -} - -/* Show a separator line above the Keybinding tab */ -/* This indicates the start of custom setting panels */ -.settings-sidebar[data-v-2e21278f] .p-listbox-option[aria-label='Keybinding'] { - position: relative; -} -.settings-sidebar[data-v-2e21278f] .p-listbox-option[aria-label='Keybinding']::before { - position: absolute; - top: 0px; - left: 0px; - width: 100%; - --tw-content: ''; - content: var(--tw-content); - border-top: 1px solid var(--p-divider-border-color); -} - -.pi-cog[data-v-43089afc] { - font-size: 1.25rem; - margin-right: 0.5rem; -} -.version-tag[data-v-43089afc] { - margin-left: 0.5rem; -} - -.p-card[data-v-ffc83afa] { - --p-card-body-padding: 10px 0 0 0; - overflow: hidden; -} -[data-v-ffc83afa] .p-card-subtitle { - text-align: center; -} - -.carousel[data-v-d9962275] { - width: 66vw; -} -/** - * Copyright (c) 2014 The xterm.js authors. All rights reserved. - * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) - * https://github.com/chjj/term.js - * @license MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * Originally forked from (with the author's permission): - * Fabrice Bellard's javascript vt100 for jslinux: - * http://bellard.org/jslinux/ - * Copyright (c) 2011 Fabrice Bellard - * The original design remains. The terminal itself - * has been extended to include xterm CSI codes, among - * other features. - */ - -/** - * Default styles for xterm.js - */ - -.xterm { - cursor: text; - position: relative; - -moz-user-select: none; - user-select: none; - -ms-user-select: none; - -webkit-user-select: none; -} - -.xterm.focus, -.xterm:focus { - outline: none; -} - -.xterm .xterm-helpers { - position: absolute; - top: 0; - /** - * The z-index of the helpers must be higher than the canvases in order for - * IMEs to appear on top. - */ - z-index: 5; -} - -.xterm .xterm-helper-textarea { - padding: 0; - border: 0; - margin: 0; - /* Move textarea out of the screen to the far left, so that the cursor is not visible */ - position: absolute; - opacity: 0; - left: -9999em; - top: 0; - width: 0; - height: 0; - z-index: -5; - /** Prevent wrapping so the IME appears against the textarea at the correct position */ - white-space: nowrap; - overflow: hidden; - resize: none; -} - -.xterm .composition-view { - /* TODO: Composition position got messed up somewhere */ - background: #000; - color: #FFF; - display: none; - position: absolute; - white-space: nowrap; - z-index: 1; -} - -.xterm .composition-view.active { - display: block; -} - -.xterm .xterm-viewport { - /* On OS X this is required in order for the scroll bar to appear fully opaque */ - background-color: #000; - overflow-y: scroll; - cursor: default; - position: absolute; - right: 0; - left: 0; - top: 0; - bottom: 0; -} - -.xterm .xterm-screen { - position: relative; -} - -.xterm .xterm-screen canvas { - position: absolute; - left: 0; - top: 0; -} - -.xterm .xterm-scroll-area { - visibility: hidden; -} - -.xterm-char-measure-element { - display: inline-block; - visibility: hidden; - position: absolute; - top: 0; - left: -9999em; - line-height: normal; -} - -.xterm.enable-mouse-events { - /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */ - cursor: default; -} - -.xterm.xterm-cursor-pointer, -.xterm .xterm-cursor-pointer { - cursor: pointer; -} - -.xterm.column-select.focus { - /* Column selection mode */ - cursor: crosshair; -} - -.xterm .xterm-accessibility:not(.debug), -.xterm .xterm-message { - position: absolute; - left: 0; - top: 0; - bottom: 0; - right: 0; - z-index: 10; - color: transparent; - pointer-events: none; -} - -.xterm .xterm-accessibility-tree:not(.debug) *::-moz-selection { - color: transparent; -} - -.xterm .xterm-accessibility-tree:not(.debug) *::selection { - color: transparent; -} - -.xterm .xterm-accessibility-tree { - -webkit-user-select: text; - -moz-user-select: text; - user-select: text; - white-space: pre; -} - -.xterm .live-region { - position: absolute; - left: -9999px; - width: 1px; - height: 1px; - overflow: hidden; -} - -.xterm-dim { - /* Dim should not apply to background, so the opacity of the foreground color is applied - * explicitly in the generated class and reset to 1 here */ - opacity: 1 !important; -} - -.xterm-underline-1 { text-decoration: underline; } -.xterm-underline-2 { -webkit-text-decoration: double underline; text-decoration: double underline; } -.xterm-underline-3 { -webkit-text-decoration: wavy underline; text-decoration: wavy underline; } -.xterm-underline-4 { -webkit-text-decoration: dotted underline; text-decoration: dotted underline; } -.xterm-underline-5 { -webkit-text-decoration: dashed underline; text-decoration: dashed underline; } - -.xterm-overline { - text-decoration: overline; -} - -.xterm-overline.xterm-underline-1 { text-decoration: overline underline; } -.xterm-overline.xterm-underline-2 { -webkit-text-decoration: overline double underline; text-decoration: overline double underline; } -.xterm-overline.xterm-underline-3 { -webkit-text-decoration: overline wavy underline; text-decoration: overline wavy underline; } -.xterm-overline.xterm-underline-4 { -webkit-text-decoration: overline dotted underline; text-decoration: overline dotted underline; } -.xterm-overline.xterm-underline-5 { -webkit-text-decoration: overline dashed underline; text-decoration: overline dashed underline; } - -.xterm-strikethrough { - text-decoration: line-through; -} - -.xterm-screen .xterm-decoration-container .xterm-decoration { - z-index: 6; - position: absolute; -} - -.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer { - z-index: 7; -} - -.xterm-decoration-overview-ruler { - z-index: 8; - position: absolute; - top: 0; - right: 0; - pointer-events: none; -} - -.xterm-decoration-top { - z-index: 2; - position: relative; -} - -[data-v-250ab9af] .p-terminal .xterm { - overflow-x: auto; -} -[data-v-250ab9af] .p-terminal .xterm-screen { - background-color: black; - overflow-y: hidden; -} - -[data-v-90a7f075] .p-terminal .xterm { - overflow-x: auto; -} -[data-v-90a7f075] .p-terminal .xterm-screen { - background-color: black; - overflow-y: hidden; -} - -[data-v-03daf1c8] .p-terminal .xterm { - overflow-x: auto; -} -[data-v-03daf1c8] .p-terminal .xterm-screen { - background-color: black; - overflow-y: hidden; -} -.mdi.rotate270::before { - transform: rotate(270deg); -} - -/* Generic */ -.comfyui-button { - display: flex; - align-items: center; - gap: 0.5em; - cursor: pointer; - border: none; - border-radius: 4px; - padding: 4px 8px; - box-sizing: border-box; - margin: 0; - transition: box-shadow 0.1s; -} - -.comfyui-button:active { - box-shadow: inset 1px 1px 10px rgba(0, 0, 0, 0.5); -} - -.comfyui-button:disabled { - opacity: 0.5; - cursor: not-allowed; -} -.primary .comfyui-button, -.primary.comfyui-button { - background-color: var(--primary-bg) !important; - color: var(--primary-fg) !important; -} - -.primary .comfyui-button:not(:disabled):hover, -.primary.comfyui-button:not(:disabled):hover { - background-color: var(--primary-hover-bg) !important; - color: var(--primary-hover-fg) !important; -} - -/* Popup */ -.comfyui-popup { - position: absolute; - left: var(--left); - right: var(--right); - top: var(--top); - bottom: var(--bottom); - z-index: 2000; - max-height: calc(100vh - var(--limit) - 10px); - box-shadow: 3px 3px 5px 0px rgba(0, 0, 0, 0.3); -} - -.comfyui-popup:not(.open) { - display: none; -} - -.comfyui-popup.right.open { - border-top-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; - overflow: hidden; -} -/* Split button */ -.comfyui-split-button { - position: relative; - display: flex; -} - -.comfyui-split-primary { - flex: auto; -} - -.comfyui-split-primary .comfyui-button { - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-right: 1px solid var(--comfy-menu-bg); - width: 100%; -} - -.comfyui-split-arrow .comfyui-button { - border-top-left-radius: 0; - border-bottom-left-radius: 0; - padding-left: 2px; - padding-right: 2px; -} - -.comfyui-split-button-popup { - white-space: nowrap; - background-color: var(--content-bg); - color: var(--content-fg); - display: flex; - flex-direction: column; - overflow: auto; -} - -.comfyui-split-button-popup.hover { - z-index: 2001; -} -.comfyui-split-button-popup > .comfyui-button { - border: none; - background-color: transparent; - color: var(--fg-color); - padding: 8px 12px 8px 8px; -} - -.comfyui-split-button-popup > .comfyui-button:not(:disabled):hover { - background-color: var(--comfy-input-bg); -} - -/* Button group */ -.comfyui-button-group { - display: flex; - border-radius: 4px; - overflow: hidden; -} - -.comfyui-button-group:empty { - display: none; -} -.comfyui-button-group > .comfyui-button, -.comfyui-button-group > .comfyui-button-wrapper > .comfyui-button { - padding: 4px 10px; - border-radius: 0; -} - -/* Menu */ -.comfyui-menu .mdi::before { - font-size: 18px; -} - -.comfyui-menu .comfyui-button { - background: var(--comfy-input-bg); - color: var(--fg-color); - white-space: nowrap; -} - -.comfyui-menu .comfyui-button:not(:disabled):hover { - background: var(--border-color); - color: var(--content-fg); -} - -.comfyui-menu .comfyui-split-button-popup > .comfyui-button { - border-radius: 0; - background-color: transparent; -} - -.comfyui-menu .comfyui-split-button-popup > .comfyui-button:not(:disabled):hover { - background-color: var(--comfy-input-bg); -} - -.comfyui-menu .comfyui-split-button-popup.left { - border-top-right-radius: 4px; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -} - -.comfyui-menu .comfyui-button.popup-open { - background-color: var(--content-bg); - color: var(--content-fg); -} - -.comfyui-menu-push { - margin-left: -0.8em; - flex: auto; -} - -/** Send to workflow widget selection dialog */ -.comfy-widget-selection-dialog { - border: none; -} - -.comfy-widget-selection-dialog div { - color: var(--fg-color); - font-family: Arial, Helvetica, sans-serif; -} - -.comfy-widget-selection-dialog h2 { - margin-top: 0; -} - -.comfy-widget-selection-dialog section { - width: -moz-fit-content; - width: fit-content; - display: flex; - flex-direction: column; -} - -.comfy-widget-selection-item { - display: flex; - gap: 10px; - align-items: center; -} - -.comfy-widget-selection-item span { - margin-right: auto; -} - -.comfy-widget-selection-item span::before { - content: '#' attr(data-id); - opacity: 0.5; - margin-right: 5px; -} - -.comfy-modal .comfy-widget-selection-item button { - font-size: 1em; -} - -/***** Responsive *****/ -.lg.comfyui-menu .lt-lg-show { - display: none !important; -} -.comfyui-menu:not(.lg) .nlg-hide { - display: none !important; -} -/** Large screen */ -.lg.comfyui-menu>.comfyui-menu-mobile-collapse .comfyui-button span, -.lg.comfyui-menu>.comfyui-menu-mobile-collapse.comfyui-button span { - display: none; -} -.lg.comfyui-menu>.comfyui-menu-mobile-collapse .comfyui-popup .comfyui-button span { - display: unset; -} - -/** Non large screen */ -.lt-lg.comfyui-menu { - flex-wrap: wrap; -} - -.lt-lg.comfyui-menu > *:not(.comfyui-menu-mobile-collapse) { - order: 1; -} - -.lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse { - order: 9999; - width: 100%; -} - -.comfyui-body-bottom .lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse { - order: -1; -} - -.comfyui-body-bottom .lt-lg.comfyui-menu > .comfyui-menu-button { - top: unset; - bottom: 4px; -} - -.lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse.comfyui-button-group { - flex-wrap: wrap; -} - -.lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse .comfyui-button, -.lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse.comfyui-button { - padding: 10px; -} -.lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse .comfyui-button, -.lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse .comfyui-button-wrapper { - width: 100%; -} - -.lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse .comfyui-popup { - position: static; - background-color: var(--comfy-input-bg); - max-width: unset; - max-height: 50vh; - overflow: auto; -} - -.lt-lg.comfyui-menu:not(.expanded) > .comfyui-menu-mobile-collapse { - display: none; -} - -.lt-lg .comfyui-menu-button { - position: absolute; - top: 4px; - right: 8px; -} - -.lt-lg.comfyui-menu > .comfyui-menu-mobile-collapse .comfyui-view-list-popup { - border-radius: 0; -} - -.lt-lg.comfyui-menu .comfyui-workflows-popup { - width: 100vw; -} - -/** Small */ -.lt-md .comfyui-workflows-button-inner { - width: unset !important; -} -.lt-md .comfyui-workflows-label { - display: none; -} - -/** Extra small */ -.lt-sm .comfyui-interrupt-button { - margin-right: 45px; -} -.comfyui-body-bottom .lt-sm.comfyui-menu > .comfyui-menu-button{ - bottom: 41px; -} - - -.editable-text[data-v-d670c40f] { - display: inline; -} -.editable-text input[data-v-d670c40f] { - width: 100%; - box-sizing: border-box; -} - -.tree-node[data-v-a6457774] { - width: 100%; - display: flex; - align-items: center; - justify-content: space-between; -} -.leaf-count-badge[data-v-a6457774] { - margin-left: 0.5rem; -} -.node-content[data-v-a6457774] { - display: flex; - align-items: center; - flex-grow: 1; -} -.leaf-label[data-v-a6457774] { - margin-left: 0.5rem; -} -[data-v-a6457774] .editable-text span { - word-break: break-all; -} - -[data-v-31d518da] .tree-explorer-node-label { - width: 100%; - display: flex; - align-items: center; - margin-left: var(--p-tree-node-gap); - flex-grow: 1; -} - -/* - * The following styles are necessary to avoid layout shift when dragging nodes over folders. - * By setting the position to relative on the parent and using an absolutely positioned pseudo-element, - * we can create a visual indicator for the drop target without affecting the layout of other elements. - */ -[data-v-31d518da] .p-tree-node-content:has(.tree-folder) { - position: relative; -} -[data-v-31d518da] .p-tree-node-content:has(.tree-folder.can-drop)::after { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - border: 1px solid var(--p-content-color); - pointer-events: none; -} - -[data-v-5e759e25] .p-toolbar-end .p-button { - - padding-top: 0.25rem; - - padding-bottom: 0.25rem -} -@media (min-width: 1536px) { -[data-v-5e759e25] .p-toolbar-end .p-button { - - padding-top: 0.5rem; - - padding-bottom: 0.5rem -} -} -[data-v-5e759e25] .p-toolbar-start { - - min-width: 0px; - - flex: 1 1 0%; - - overflow: hidden -} - -.model_preview[data-v-32e6c4d9] { - background-color: var(--comfy-menu-bg); - font-family: 'Open Sans', sans-serif; - color: var(--descrip-text); - border: 1px solid var(--descrip-text); - min-width: 300px; - max-width: 500px; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - z-index: 9999; - border-radius: 12px; - overflow: hidden; - font-size: 12px; - padding: 10px; -} -.model_preview_image[data-v-32e6c4d9] { - margin: auto; - width: -moz-fit-content; - width: fit-content; -} -.model_preview_image img[data-v-32e6c4d9] { - max-width: 100%; - max-height: 150px; - -o-object-fit: contain; - object-fit: contain; -} -.model_preview_title[data-v-32e6c4d9] { - font-weight: bold; - text-align: center; - font-size: 14px; -} -.model_preview_top_container[data-v-32e6c4d9] { - text-align: center; - line-height: 0.5; -} -.model_preview_filename[data-v-32e6c4d9], -.model_preview_author[data-v-32e6c4d9], -.model_preview_architecture[data-v-32e6c4d9] { - display: inline-block; - text-align: center; - margin: 5px; - font-size: 10px; -} -.model_preview_prefix[data-v-32e6c4d9] { - font-weight: bold; -} - -.model-lib-model-icon-container[data-v-b45ea43e] { - display: inline-block; - position: relative; - left: 0; - height: 1.5rem; - vertical-align: top; - width: 0px; -} -.model-lib-model-icon[data-v-b45ea43e] { - background-size: cover; - background-position: center; - display: inline-block; - position: relative; - left: -2.2rem; - top: -0.1rem; - height: 1.7rem; - width: 1.7rem; - vertical-align: top; -} - -[data-v-0bb2ac55] .pi-fake-spacer { - height: 1px; - width: 16px; -} - -._content[data-v-c4279e6b] { - - display: flex; - - flex-direction: column -} -._content[data-v-c4279e6b] > :not([hidden]) ~ :not([hidden]) { - - --tw-space-y-reverse: 0; - - margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); - - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)) -} -._footer[data-v-c4279e6b] { - - display: flex; - - flex-direction: column; - - align-items: flex-end; - - padding-top: 1rem -} - -.slot_row[data-v-d9792337] { - padding: 2px; -} - -/* Original N-Sidebar styles */ -._sb_dot[data-v-d9792337] { - width: 8px; - height: 8px; - border-radius: 50%; - background-color: grey; -} -.node_header[data-v-d9792337] { - line-height: 1; - padding: 8px 13px 7px; - margin-bottom: 5px; - font-size: 15px; - text-wrap: nowrap; - overflow: hidden; - display: flex; - align-items: center; -} -.headdot[data-v-d9792337] { - width: 10px; - height: 10px; - float: inline-start; - margin-right: 8px; -} -.IMAGE[data-v-d9792337] { - background-color: #64b5f6; -} -.VAE[data-v-d9792337] { - background-color: #ff6e6e; -} -.LATENT[data-v-d9792337] { - background-color: #ff9cf9; -} -.MASK[data-v-d9792337] { - background-color: #81c784; -} -.CONDITIONING[data-v-d9792337] { - background-color: #ffa931; -} -.CLIP[data-v-d9792337] { - background-color: #ffd500; -} -.MODEL[data-v-d9792337] { - background-color: #b39ddb; -} -.CONTROL_NET[data-v-d9792337] { - background-color: #a5d6a7; -} -._sb_node_preview[data-v-d9792337] { - background-color: var(--comfy-menu-bg); - font-family: 'Open Sans', sans-serif; - font-size: small; - color: var(--descrip-text); - border: 1px solid var(--descrip-text); - min-width: 300px; - width: -moz-min-content; - width: min-content; - height: -moz-fit-content; - height: fit-content; - z-index: 9999; - border-radius: 12px; - overflow: hidden; - font-size: 12px; - padding-bottom: 10px; -} -._sb_node_preview ._sb_description[data-v-d9792337] { - margin: 10px; - padding: 6px; - background: var(--border-color); - border-radius: 5px; - font-style: italic; - font-weight: 500; - font-size: 0.9rem; - word-break: break-word; -} -._sb_table[data-v-d9792337] { - display: grid; - - grid-column-gap: 10px; - /* Spazio tra le colonne */ - width: 100%; - /* Imposta la larghezza della tabella al 100% del contenitore */ -} -._sb_row[data-v-d9792337] { - display: grid; - grid-template-columns: 10px 1fr 1fr 1fr 10px; - grid-column-gap: 10px; - align-items: center; - padding-left: 9px; - padding-right: 9px; -} -._sb_row_string[data-v-d9792337] { - grid-template-columns: 10px 1fr 1fr 10fr 1fr; -} -._sb_col[data-v-d9792337] { - border: 0px solid #000; - display: flex; - align-items: flex-end; - flex-direction: row-reverse; - flex-wrap: nowrap; - align-content: flex-start; - justify-content: flex-end; -} -._sb_inherit[data-v-d9792337] { - display: inherit; -} -._long_field[data-v-d9792337] { - background: var(--bg-color); - border: 2px solid var(--border-color); - margin: 5px 5px 0 5px; - border-radius: 10px; - line-height: 1.7; - text-wrap: nowrap; -} -._sb_arrow[data-v-d9792337] { - color: var(--fg-color); -} -._sb_preview_badge[data-v-d9792337] { - text-align: center; - background: var(--comfy-input-bg); - font-weight: bold; - color: var(--error-text); -} - -.node-lib-node-container[data-v-da9a8962] { - height: 100%; - width: 100% -} - -.p-selectbutton .p-button[data-v-05364174] { - padding: 0.5rem; -} -.p-selectbutton .p-button .pi[data-v-05364174] { - font-size: 1.5rem; -} -.field[data-v-05364174] { - display: flex; - flex-direction: column; - gap: 0.5rem; -} -.color-picker-container[data-v-05364174] { - display: flex; - align-items: center; - gap: 0.5rem; -} - -.scroll-container[data-v-ad33a347] { - height: 100%; - overflow-y: auto; - - /* Firefox */ - scrollbar-width: none; -&[data-v-ad33a347]::-webkit-scrollbar { - width: 1px; -} -&[data-v-ad33a347]::-webkit-scrollbar-thumb { - background-color: transparent; -} -} - -.comfy-image-wrap[data-v-a748ccd8] { - display: contents; -} -.comfy-image-blur[data-v-a748ccd8] { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - -o-object-fit: cover; - object-fit: cover; -} -.comfy-image-main[data-v-a748ccd8] { - width: 100%; - height: 100%; - -o-object-fit: cover; - object-fit: cover; - -o-object-position: center; - object-position: center; - z-index: 1; -} -.contain .comfy-image-wrap[data-v-a748ccd8] { - position: relative; - width: 100%; - height: 100%; -} -.contain .comfy-image-main[data-v-a748ccd8] { - -o-object-fit: contain; - object-fit: contain; - -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); - position: absolute; -} -.broken-image-placeholder[data-v-a748ccd8] { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - width: 100%; - height: 100%; - margin: 2rem; -} -.broken-image-placeholder i[data-v-a748ccd8] { - font-size: 3rem; - margin-bottom: 0.5rem; -} - -/* PrimeVue's galleria teleports the fullscreen gallery out of subtree so we -cannot use scoped style here. */ -img.galleria-image { - max-width: 100vw; - max-height: 100vh; - -o-object-fit: contain; - object-fit: contain; -} -.p-galleria-close-button { - /* Set z-index so the close button doesn't get hidden behind the image when image is large */ - z-index: 1; -} - -.result-container[data-v-2403edc6] { - width: 100%; - height: 100%; - aspect-ratio: 1 / 1; - overflow: hidden; - position: relative; - display: flex; - justify-content: center; - align-items: center; -} -.preview-mask[data-v-2403edc6] { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - display: flex; - align-items: center; - justify-content: center; - opacity: 0; - transition: opacity 0.3s ease; - z-index: 1; -} -.result-container:hover .preview-mask[data-v-2403edc6] { - opacity: 1; -} - -.task-result-preview[data-v-b676a511] { - aspect-ratio: 1 / 1; - overflow: hidden; - display: flex; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; -} -.task-result-preview i[data-v-b676a511], -.task-result-preview span[data-v-b676a511] { - font-size: 2rem; -} -.task-item[data-v-b676a511] { - display: flex; - flex-direction: column; - border-radius: 4px; - overflow: hidden; - position: relative; -} -.task-item-details[data-v-b676a511] { - position: absolute; - bottom: 0; - padding: 0.6rem; - display: flex; - justify-content: space-between; - align-items: center; - width: 100%; - z-index: 1; -} -.task-node-link[data-v-b676a511] { - padding: 2px; -} - -/* In dark mode, transparent background color for tags is not ideal for tags that -are floating on top of images. */ -.tag-wrapper[data-v-b676a511] { - background-color: var(--p-primary-contrast-color); - border-radius: 6px; - display: inline-flex; -} -.node-name-tag[data-v-b676a511] { - word-break: break-all; -} -.status-tag-group[data-v-b676a511] { - display: flex; - flex-direction: column; -} -.progress-preview-img[data-v-b676a511] { - width: 100%; - height: 100%; - -o-object-fit: cover; - object-fit: cover; - -o-object-position: center; - object-position: center; -} diff --git a/web/assets/index-DpF-ptbJ.js b/web/assets/index-DpF-ptbJ.js deleted file mode 100644 index 792856c66..000000000 --- a/web/assets/index-DpF-ptbJ.js +++ /dev/null @@ -1,8785 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { B as BaseStyle, y as script$s, cA as script$t, m as createBaseVNode, o as openBlock, f as createElementBlock, G as mergeProps, Z as toDisplayString, U as Ripple, r as resolveDirective, i as withDirectives, J as createBlock, K as resolveDynamicComponent, c5 as script$u, aD as resolveComponent, V as normalizeClass, aF as createSlots, P as withCtx, bG as script$v, bD as script$w, H as Fragment, I as renderList, aG as createTextVNode, bx as setAttribute, am as UniqueComponentId, bv as normalizeProps, M as renderSlot, L as createCommentVNode, T as equals, br as script$x, cg as script$y, cB as getFirstFocusableElement, ap as OverlayEventBus, E as getVNodeProp, ao as resolveFieldData, cC as invokeElementMethod, Q as getAttribute, cD as getNextElementSibling, C as getOuterWidth, cE as getPreviousElementSibling, l as script$z, aA as script$A, Y as script$B, bu as script$D, al as isNotEmpty, b3 as withModifiers, D as getOuterHeight, cF as _default, an as ZIndex, S as focus, ar as addStyle, at as absolutePosition, au as ConnectedOverlayScrollHandler, av as isTouchDevice, cG as FilterOperator, az as script$E, cH as script$F, cI as FocusTrap, k as createVNode, aE as Transition, c3 as withKeys, cJ as getIndex, aW as script$G, cK as isClickable, cL as clearSelection, cM as localeComparator, cN as sort, cO as FilterService, cu as FilterMatchMode, R as findSingle, c9 as findIndexInList, ca as find, cP as exportCSV, W as getOffset, cQ as getHiddenElementOuterWidth, cR as getHiddenElementOuterHeight, cS as reorderArray, cT as getWindowScrollTop, cU as removeClass, cV as addClass, aq as isEmpty, ay as script$H, aB as script$I } from "./index-QvfM__ze.js"; -import { s as script$C } from "./index-Q1cQr26V.js"; -var ColumnStyle = BaseStyle.extend({ - name: "column" -}); -var script$1$3 = { - name: "BaseColumn", - "extends": script$s, - props: { - columnKey: { - type: null, - "default": null - }, - field: { - type: [String, Function], - "default": null - }, - sortField: { - type: [String, Function], - "default": null - }, - filterField: { - type: [String, Function], - "default": null - }, - dataType: { - type: String, - "default": "text" - }, - sortable: { - type: Boolean, - "default": false - }, - header: { - type: null, - "default": null - }, - footer: { - type: null, - "default": null - }, - style: { - type: null, - "default": null - }, - "class": { - type: String, - "default": null - }, - headerStyle: { - type: null, - "default": null - }, - headerClass: { - type: String, - "default": null - }, - bodyStyle: { - type: null, - "default": null - }, - bodyClass: { - type: String, - "default": null - }, - footerStyle: { - type: null, - "default": null - }, - footerClass: { - type: String, - "default": null - }, - showFilterMenu: { - type: Boolean, - "default": true - }, - showFilterOperator: { - type: Boolean, - "default": true - }, - showClearButton: { - type: Boolean, - "default": true - }, - showApplyButton: { - type: Boolean, - "default": true - }, - showFilterMatchModes: { - type: Boolean, - "default": true - }, - showAddButton: { - type: Boolean, - "default": true - }, - filterMatchModeOptions: { - type: Array, - "default": null - }, - maxConstraints: { - type: Number, - "default": 2 - }, - excludeGlobalFilter: { - type: Boolean, - "default": false - }, - filterHeaderClass: { - type: String, - "default": null - }, - filterHeaderStyle: { - type: null, - "default": null - }, - filterMenuClass: { - type: String, - "default": null - }, - filterMenuStyle: { - type: null, - "default": null - }, - selectionMode: { - type: String, - "default": null - }, - expander: { - type: Boolean, - "default": false - }, - colspan: { - type: Number, - "default": null - }, - rowspan: { - type: Number, - "default": null - }, - rowReorder: { - type: Boolean, - "default": false - }, - rowReorderIcon: { - type: String, - "default": void 0 - }, - reorderableColumn: { - type: Boolean, - "default": true - }, - rowEditor: { - type: Boolean, - "default": false - }, - frozen: { - type: Boolean, - "default": false - }, - alignFrozen: { - type: String, - "default": "left" - }, - exportable: { - type: Boolean, - "default": true - }, - exportHeader: { - type: String, - "default": null - }, - exportFooter: { - type: String, - "default": null - }, - filterMatchMode: { - type: String, - "default": null - }, - hidden: { - type: Boolean, - "default": false - } - }, - style: ColumnStyle, - provide: /* @__PURE__ */ __name(function provide() { - return { - $pcColumn: this, - $parentInstance: this - }; - }, "provide") -}; -var script$r = { - name: "Column", - "extends": script$1$3, - inheritAttrs: false, - inject: ["$columns"], - mounted: /* @__PURE__ */ __name(function mounted() { - var _this$$columns; - (_this$$columns = this.$columns) === null || _this$$columns === void 0 || _this$$columns.add(this.$); - }, "mounted"), - unmounted: /* @__PURE__ */ __name(function unmounted() { - var _this$$columns2; - (_this$$columns2 = this.$columns) === null || _this$$columns2 === void 0 || _this$$columns2["delete"](this.$); - }, "unmounted"), - render: /* @__PURE__ */ __name(function render() { - return null; - }, "render") -}; -var script$q = { - name: "ArrowDownIcon", - "extends": script$t -}; -var _hoisted_1$i = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M6.99994 14C6.91097 14.0004 6.82281 13.983 6.74064 13.9489C6.65843 13.9148 6.58387 13.8646 6.52133 13.8013L1.10198 8.38193C0.982318 8.25351 0.917175 8.08367 0.920272 7.90817C0.923368 7.73267 0.994462 7.56523 1.11858 7.44111C1.24269 7.317 1.41014 7.2459 1.58563 7.2428C1.76113 7.23971 1.93098 7.30485 2.0594 7.42451L6.32263 11.6877V0.677419C6.32263 0.497756 6.394 0.325452 6.52104 0.198411C6.64808 0.0713706 6.82039 0 7.00005 0C7.17971 0 7.35202 0.0713706 7.47906 0.198411C7.6061 0.325452 7.67747 0.497756 7.67747 0.677419V11.6877L11.9407 7.42451C12.0691 7.30485 12.2389 7.23971 12.4144 7.2428C12.5899 7.2459 12.7574 7.317 12.8815 7.44111C13.0056 7.56523 13.0767 7.73267 13.0798 7.90817C13.0829 8.08367 13.0178 8.25351 12.8981 8.38193L7.47875 13.8013C7.41621 13.8646 7.34164 13.9148 7.25944 13.9489C7.17727 13.983 7.08912 14.0004 7.00015 14C7.00012 14 7.00009 14 7.00005 14C7.00001 14 6.99998 14 6.99994 14Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$f = [_hoisted_1$i]; -function render$p(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$f, 16); -} -__name(render$p, "render$p"); -script$q.render = render$p; -var script$p = { - name: "ArrowUpIcon", - "extends": script$t -}; -var _hoisted_1$h = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M6.51551 13.799C6.64205 13.9255 6.813 13.9977 6.99193 14C7.17087 13.9977 7.34182 13.9255 7.46835 13.799C7.59489 13.6725 7.66701 13.5015 7.66935 13.3226V2.31233L11.9326 6.57554C11.9951 6.63887 12.0697 6.68907 12.1519 6.72319C12.2341 6.75731 12.3223 6.77467 12.4113 6.77425C12.5003 6.77467 12.5885 6.75731 12.6707 6.72319C12.7529 6.68907 12.8274 6.63887 12.89 6.57554C13.0168 6.44853 13.0881 6.27635 13.0881 6.09683C13.0881 5.91732 13.0168 5.74514 12.89 5.61812L7.48846 0.216594C7.48274 0.210436 7.4769 0.204374 7.47094 0.198411C7.3439 0.0713707 7.1716 0 6.99193 0C6.81227 0 6.63997 0.0713707 6.51293 0.198411C6.50704 0.204296 6.50128 0.210278 6.49563 0.216354L1.09386 5.61812C0.974201 5.74654 0.909057 5.91639 0.912154 6.09189C0.91525 6.26738 0.986345 6.43483 1.11046 6.55894C1.23457 6.68306 1.40202 6.75415 1.57752 6.75725C1.75302 6.76035 1.92286 6.6952 2.05128 6.57554L6.31451 2.31231V13.3226C6.31685 13.5015 6.38898 13.6725 6.51551 13.799Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$e = [_hoisted_1$h]; -function render$o(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$e, 16); -} -__name(render$o, "render$o"); -script$p.render = render$o; -function _typeof$c(o) { - "@babel/helpers - typeof"; - return _typeof$c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$c(o); -} -__name(_typeof$c, "_typeof$c"); -function _defineProperty$b(e, r, t) { - return (r = _toPropertyKey$b(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$b, "_defineProperty$b"); -function _toPropertyKey$b(t) { - var i = _toPrimitive$b(t, "string"); - return "symbol" == _typeof$c(i) ? i : i + ""; -} -__name(_toPropertyKey$b, "_toPropertyKey$b"); -function _toPrimitive$b(t, r) { - if ("object" != _typeof$c(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$c(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$b, "_toPrimitive$b"); -var theme$2 = /* @__PURE__ */ __name(function theme(_ref) { - var dt = _ref.dt; - return "\n.p-paginator {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n background: ".concat(dt("paginator.background"), ";\n color: ").concat(dt("paginator.color"), ";\n padding: ").concat(dt("paginator.padding"), ";\n border-radius: ").concat(dt("paginator.border.radius"), ";\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-content {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-content-start {\n margin-right: auto;\n}\n\n.p-paginator-content-end {\n margin-left: auto;\n}\n\n.p-paginator-page,\n.p-paginator-next,\n.p-paginator-last,\n.p-paginator-first,\n.p-paginator-prev {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n user-select: none;\n overflow: hidden;\n position: relative;\n background: ").concat(dt("paginator.nav.button.background"), ";\n border: 0 none;\n color: ").concat(dt("paginator.nav.button.color"), ";\n min-width: ").concat(dt("paginator.nav.button.width"), ";\n height: ").concat(dt("paginator.nav.button.height"), ";\n transition: background ").concat(dt("paginator.transition.duration"), ", color ").concat(dt("paginator.transition.duration"), ", outline-color ").concat(dt("paginator.transition.duration"), ", box-shadow ").concat(dt("paginator.transition.duration"), ";\n border-radius: ").concat(dt("paginator.nav.button.border.radius"), ";\n padding: 0;\n margin: 0;\n}\n\n.p-paginator-page:focus-visible,\n.p-paginator-next:focus-visible,\n.p-paginator-last:focus-visible,\n.p-paginator-first:focus-visible,\n.p-paginator-prev:focus-visible {\n box-shadow: ").concat(dt("paginator.nav.button.focus.ring.shadow"), ";\n outline: ").concat(dt("paginator.nav.button.focus.ring.width"), " ").concat(dt("paginator.nav.button.focus.ring.style"), " ").concat(dt("paginator.nav.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("paginator.nav.button.focus.ring.offset"), ";\n}\n\n.p-paginator-page:not(.p-disabled):not(.p-paginator-page-selected):hover,\n.p-paginator-first:not(.p-disabled):hover,\n.p-paginator-prev:not(.p-disabled):hover,\n.p-paginator-next:not(.p-disabled):hover,\n.p-paginator-last:not(.p-disabled):hover {\n background: ").concat(dt("paginator.nav.button.hover.background"), ";\n color: ").concat(dt("paginator.nav.button.hover.color"), ";\n}\n\n.p-paginator-page.p-paginator-page-selected {\n background: ").concat(dt("paginator.nav.button.selected.background"), ";\n color: ").concat(dt("paginator.nav.button.selected.color"), ";\n}\n\n.p-paginator-current {\n color: ").concat(dt("paginator.current.page.report.color"), ";\n}\n\n.p-paginator-pages {\n display: flex;\n align-items: center;\n gap: ").concat(dt("paginator.gap"), ";\n}\n\n.p-paginator-jtp-input .p-inputtext {\n max-width: ").concat(dt("paginator.jump.to.page.input.max.width"), ";\n}\n"); -}, "theme"); -var classes$2 = { - paginator: /* @__PURE__ */ __name(function paginator(_ref2) { - var instance = _ref2.instance, key = _ref2.key; - return ["p-paginator p-component", _defineProperty$b({ - "p-paginator-default": !instance.hasBreakpoints() - }, "p-paginator-".concat(key), instance.hasBreakpoints())]; - }, "paginator"), - content: "p-paginator-content", - contentStart: "p-paginator-content-start", - contentEnd: "p-paginator-content-end", - first: /* @__PURE__ */ __name(function first(_ref4) { - var instance = _ref4.instance; - return ["p-paginator-first", { - "p-disabled": instance.$attrs.disabled - }]; - }, "first"), - firstIcon: "p-paginator-first-icon", - prev: /* @__PURE__ */ __name(function prev(_ref5) { - var instance = _ref5.instance; - return ["p-paginator-prev", { - "p-disabled": instance.$attrs.disabled - }]; - }, "prev"), - prevIcon: "p-paginator-prev-icon", - next: /* @__PURE__ */ __name(function next(_ref6) { - var instance = _ref6.instance; - return ["p-paginator-next", { - "p-disabled": instance.$attrs.disabled - }]; - }, "next"), - nextIcon: "p-paginator-next-icon", - last: /* @__PURE__ */ __name(function last(_ref7) { - var instance = _ref7.instance; - return ["p-paginator-last", { - "p-disabled": instance.$attrs.disabled - }]; - }, "last"), - lastIcon: "p-paginator-last-icon", - pages: "p-paginator-pages", - page: /* @__PURE__ */ __name(function page(_ref8) { - var props = _ref8.props, pageLink = _ref8.pageLink; - return ["p-paginator-page", { - "p-paginator-page-selected": pageLink - 1 === props.page - }]; - }, "page"), - current: "p-paginator-current", - pcRowPerPageDropdown: "p-paginator-rpp-dropdown", - pcJumpToPageDropdown: "p-paginator-jtp-dropdown", - pcJumpToPageInput: "p-paginator-jtp-input" -}; -var PaginatorStyle = BaseStyle.extend({ - name: "paginator", - theme: theme$2, - classes: classes$2 -}); -var script$o = { - name: "AngleDoubleLeftIcon", - "extends": script$t -}; -var _hoisted_1$g = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$d = [_hoisted_1$g]; -function render$n(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$d, 16); -} -__name(render$n, "render$n"); -script$o.render = render$n; -var script$n = { - name: "AngleDoubleRightIcon", - "extends": script$t -}; -var _hoisted_1$f = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$c = [_hoisted_1$f]; -function render$m(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$c, 16); -} -__name(render$m, "render$m"); -script$n.render = render$m; -var script$m = { - name: "AngleLeftIcon", - "extends": script$t -}; -var _hoisted_1$e = /* @__PURE__ */ createBaseVNode("path", { - d: "M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$b = [_hoisted_1$e]; -function render$l(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$b, 16); -} -__name(render$l, "render$l"); -script$m.render = render$l; -var script$a$1 = { - name: "BasePaginator", - "extends": script$s, - props: { - totalRecords: { - type: Number, - "default": 0 - }, - rows: { - type: Number, - "default": 0 - }, - first: { - type: Number, - "default": 0 - }, - pageLinkSize: { - type: Number, - "default": 5 - }, - rowsPerPageOptions: { - type: Array, - "default": null - }, - template: { - type: [Object, String], - "default": "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown" - }, - currentPageReportTemplate: { - type: null, - "default": "({currentPage} of {totalPages})" - }, - alwaysShow: { - type: Boolean, - "default": true - } - }, - style: PaginatorStyle, - provide: /* @__PURE__ */ __name(function provide2() { - return { - $pcPaginator: this, - $parentInstance: this - }; - }, "provide") -}; -var script$9$1 = { - name: "CurrentPageReport", - hostName: "Paginator", - "extends": script$s, - props: { - pageCount: { - type: Number, - "default": 0 - }, - currentPage: { - type: Number, - "default": 0 - }, - page: { - type: Number, - "default": 0 - }, - first: { - type: Number, - "default": 0 - }, - rows: { - type: Number, - "default": 0 - }, - totalRecords: { - type: Number, - "default": 0 - }, - template: { - type: String, - "default": "({currentPage} of {totalPages})" - } - }, - computed: { - text: /* @__PURE__ */ __name(function text() { - var text2 = this.template.replace("{currentPage}", this.currentPage).replace("{totalPages}", this.pageCount).replace("{first}", this.pageCount > 0 ? this.first + 1 : 0).replace("{last}", Math.min(this.first + this.rows, this.totalRecords)).replace("{rows}", this.rows).replace("{totalRecords}", this.totalRecords); - return text2; - }, "text") - } -}; -function render$9$1(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("span", mergeProps({ - "class": _ctx.cx("current") - }, _ctx.ptm("current")), toDisplayString($options.text), 17); -} -__name(render$9$1, "render$9$1"); -script$9$1.render = render$9$1; -var script$8$1 = { - name: "FirstPageLink", - hostName: "Paginator", - "extends": script$s, - props: { - template: { - type: Function, - "default": null - } - }, - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions(key) { - return this.ptm(key, { - context: { - disabled: this.$attrs.disabled - } - }); - }, "getPTOptions") - }, - components: { - AngleDoubleLeftIcon: script$o - }, - directives: { - ripple: Ripple - } -}; -function render$8$1(_ctx, _cache, $props, $setup, $data, $options) { - var _directive_ripple = resolveDirective("ripple"); - return withDirectives((openBlock(), createElementBlock("button", mergeProps({ - "class": _ctx.cx("first"), - type: "button" - }, $options.getPTOptions("first"), { - "data-pc-group-section": "pagebutton" - }), [(openBlock(), createBlock(resolveDynamicComponent($props.template || "AngleDoubleLeftIcon"), mergeProps({ - "class": _ctx.cx("firstIcon") - }, $options.getPTOptions("firstIcon")), null, 16, ["class"]))], 16)), [[_directive_ripple]]); -} -__name(render$8$1, "render$8$1"); -script$8$1.render = render$8$1; -var script$7$1 = { - name: "JumpToPageDropdown", - hostName: "Paginator", - "extends": script$s, - emits: ["page-change"], - props: { - page: Number, - pageCount: Number, - disabled: Boolean, - templates: null - }, - methods: { - onChange: /* @__PURE__ */ __name(function onChange(value) { - this.$emit("page-change", value); - }, "onChange") - }, - computed: { - pageOptions: /* @__PURE__ */ __name(function pageOptions() { - var opts = []; - for (var i = 0; i < this.pageCount; i++) { - opts.push({ - label: String(i + 1), - value: i - }); - } - return opts; - }, "pageOptions") - }, - components: { - JTPSelect: script$u - } -}; -function render$7$1(_ctx, _cache, $props, $setup, $data, $options) { - var _component_JTPSelect = resolveComponent("JTPSelect"); - return openBlock(), createBlock(_component_JTPSelect, { - modelValue: $props.page, - options: $options.pageOptions, - optionLabel: "label", - optionValue: "value", - "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) { - return $options.onChange($event); - }), - "class": normalizeClass(_ctx.cx("pcJumpToPageDropdown")), - disabled: $props.disabled, - unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcJumpToPageDropdown"), - "data-pc-group-section": "pagedropdown" - }, createSlots({ - _: 2 - }, [$props.templates["jumptopagedropdownicon"] ? { - name: "dropdownicon", - fn: withCtx(function(slotProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.templates["jumptopagedropdownicon"]), { - "class": normalizeClass(slotProps["class"]) - }, null, 8, ["class"]))]; - }), - key: "0" - } : void 0]), 1032, ["modelValue", "options", "class", "disabled", "unstyled", "pt"]); -} -__name(render$7$1, "render$7$1"); -script$7$1.render = render$7$1; -var script$6$1 = { - name: "JumpToPageInput", - hostName: "Paginator", - "extends": script$s, - inheritAttrs: false, - emits: ["page-change"], - props: { - page: Number, - pageCount: Number, - disabled: Boolean - }, - data: /* @__PURE__ */ __name(function data() { - return { - d_page: this.page - }; - }, "data"), - watch: { - page: /* @__PURE__ */ __name(function page2(newValue) { - this.d_page = newValue; - }, "page") - }, - methods: { - onChange: /* @__PURE__ */ __name(function onChange2(value) { - if (value !== this.page) { - this.d_page = value; - this.$emit("page-change", value - 1); - } - }, "onChange") - }, - computed: { - inputArialabel: /* @__PURE__ */ __name(function inputArialabel() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.jumpToPageInputLabel : void 0; - }, "inputArialabel") - }, - components: { - JTPInput: script$v - } -}; -function render$6$1(_ctx, _cache, $props, $setup, $data, $options) { - var _component_JTPInput = resolveComponent("JTPInput"); - return openBlock(), createBlock(_component_JTPInput, { - ref: "jtpInput", - modelValue: $data.d_page, - "class": normalizeClass(_ctx.cx("pcJumpToPageInput")), - "aria-label": $options.inputArialabel, - disabled: $props.disabled, - "onUpdate:modelValue": $options.onChange, - unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcJumpToPageInput") - }, null, 8, ["modelValue", "class", "aria-label", "disabled", "onUpdate:modelValue", "unstyled", "pt"]); -} -__name(render$6$1, "render$6$1"); -script$6$1.render = render$6$1; -var script$5$1 = { - name: "LastPageLink", - hostName: "Paginator", - "extends": script$s, - props: { - template: { - type: Function, - "default": null - } - }, - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions2(key) { - return this.ptm(key, { - context: { - disabled: this.$attrs.disabled - } - }); - }, "getPTOptions") - }, - components: { - AngleDoubleRightIcon: script$n - }, - directives: { - ripple: Ripple - } -}; -function render$5$1(_ctx, _cache, $props, $setup, $data, $options) { - var _directive_ripple = resolveDirective("ripple"); - return withDirectives((openBlock(), createElementBlock("button", mergeProps({ - "class": _ctx.cx("last"), - type: "button" - }, $options.getPTOptions("last"), { - "data-pc-group-section": "pagebutton" - }), [(openBlock(), createBlock(resolveDynamicComponent($props.template || "AngleDoubleRightIcon"), mergeProps({ - "class": _ctx.cx("lastIcon") - }, $options.getPTOptions("lastIcon")), null, 16, ["class"]))], 16)), [[_directive_ripple]]); -} -__name(render$5$1, "render$5$1"); -script$5$1.render = render$5$1; -var script$4$1 = { - name: "NextPageLink", - hostName: "Paginator", - "extends": script$s, - props: { - template: { - type: Function, - "default": null - } - }, - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions3(key) { - return this.ptm(key, { - context: { - disabled: this.$attrs.disabled - } - }); - }, "getPTOptions") - }, - components: { - AngleRightIcon: script$w - }, - directives: { - ripple: Ripple - } -}; -function render$4$1(_ctx, _cache, $props, $setup, $data, $options) { - var _directive_ripple = resolveDirective("ripple"); - return withDirectives((openBlock(), createElementBlock("button", mergeProps({ - "class": _ctx.cx("next"), - type: "button" - }, $options.getPTOptions("next"), { - "data-pc-group-section": "pagebutton" - }), [(openBlock(), createBlock(resolveDynamicComponent($props.template || "AngleRightIcon"), mergeProps({ - "class": _ctx.cx("nextIcon") - }, $options.getPTOptions("nextIcon")), null, 16, ["class"]))], 16)), [[_directive_ripple]]); -} -__name(render$4$1, "render$4$1"); -script$4$1.render = render$4$1; -var script$3$1 = { - name: "PageLinks", - hostName: "Paginator", - "extends": script$s, - inheritAttrs: false, - emits: ["click"], - props: { - value: Array, - page: Number - }, - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions4(pageLink, key) { - return this.ptm(key, { - context: { - active: pageLink === this.page - } - }); - }, "getPTOptions"), - onPageLinkClick: /* @__PURE__ */ __name(function onPageLinkClick(event2, pageLink) { - this.$emit("click", { - originalEvent: event2, - value: pageLink - }); - }, "onPageLinkClick"), - ariaPageLabel: /* @__PURE__ */ __name(function ariaPageLabel(value) { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g, value) : void 0; - }, "ariaPageLabel") - }, - directives: { - ripple: Ripple - } -}; -var _hoisted_1$d = ["aria-label", "aria-current", "onClick", "data-p-active"]; -function render$3$1(_ctx, _cache, $props, $setup, $data, $options) { - var _directive_ripple = resolveDirective("ripple"); - return openBlock(), createElementBlock("span", mergeProps({ - "class": _ctx.cx("pages") - }, _ctx.ptm("pages")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.value, function(pageLink) { - return withDirectives((openBlock(), createElementBlock("button", mergeProps({ - key: pageLink, - "class": _ctx.cx("page", { - pageLink - }), - type: "button", - "aria-label": $options.ariaPageLabel(pageLink), - "aria-current": pageLink - 1 === $props.page ? "page" : void 0, - onClick: /* @__PURE__ */ __name(function onClick3($event) { - return $options.onPageLinkClick($event, pageLink); - }, "onClick"), - ref_for: true - }, $options.getPTOptions(pageLink - 1, "page"), { - "data-p-active": pageLink - 1 === $props.page - }), [createTextVNode(toDisplayString(pageLink), 1)], 16, _hoisted_1$d)), [[_directive_ripple]]); - }), 128))], 16); -} -__name(render$3$1, "render$3$1"); -script$3$1.render = render$3$1; -var script$2$1 = { - name: "PrevPageLink", - hostName: "Paginator", - "extends": script$s, - props: { - template: { - type: Function, - "default": null - } - }, - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions5(key) { - return this.ptm(key, { - context: { - disabled: this.$attrs.disabled - } - }); - }, "getPTOptions") - }, - components: { - AngleLeftIcon: script$m - }, - directives: { - ripple: Ripple - } -}; -function render$2$1(_ctx, _cache, $props, $setup, $data, $options) { - var _directive_ripple = resolveDirective("ripple"); - return withDirectives((openBlock(), createElementBlock("button", mergeProps({ - "class": _ctx.cx("prev"), - type: "button" - }, $options.getPTOptions("prev"), { - "data-pc-group-section": "pagebutton" - }), [(openBlock(), createBlock(resolveDynamicComponent($props.template || "AngleLeftIcon"), mergeProps({ - "class": _ctx.cx("prevIcon") - }, $options.getPTOptions("prevIcon")), null, 16, ["class"]))], 16)), [[_directive_ripple]]); -} -__name(render$2$1, "render$2$1"); -script$2$1.render = render$2$1; -var script$1$2 = { - name: "RowsPerPageDropdown", - hostName: "Paginator", - "extends": script$s, - emits: ["rows-change"], - props: { - options: Array, - rows: Number, - disabled: Boolean, - templates: null - }, - methods: { - onChange: /* @__PURE__ */ __name(function onChange3(value) { - this.$emit("rows-change", value); - }, "onChange") - }, - computed: { - rowsOptions: /* @__PURE__ */ __name(function rowsOptions() { - var opts = []; - if (this.options) { - for (var i = 0; i < this.options.length; i++) { - opts.push({ - label: String(this.options[i]), - value: this.options[i] - }); - } - } - return opts; - }, "rowsOptions") - }, - components: { - RPPSelect: script$u - } -}; -function render$1$1(_ctx, _cache, $props, $setup, $data, $options) { - var _component_RPPSelect = resolveComponent("RPPSelect"); - return openBlock(), createBlock(_component_RPPSelect, { - modelValue: $props.rows, - options: $options.rowsOptions, - optionLabel: "label", - optionValue: "value", - "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) { - return $options.onChange($event); - }), - "class": normalizeClass(_ctx.cx("pcRowPerPageDropdown")), - disabled: $props.disabled, - unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcRowPerPageDropdown"), - "data-pc-group-section": "pagedropdown" - }, createSlots({ - _: 2 - }, [$props.templates["rowsperpagedropdownicon"] ? { - name: "dropdownicon", - fn: withCtx(function(slotProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.templates["rowsperpagedropdownicon"]), { - "class": normalizeClass(slotProps["class"]) - }, null, 8, ["class"]))]; - }), - key: "0" - } : void 0]), 1032, ["modelValue", "options", "class", "disabled", "unstyled", "pt"]); -} -__name(render$1$1, "render$1$1"); -script$1$2.render = render$1$1; -function _toConsumableArray$1(r) { - return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$3(r) || _nonIterableSpread$1(); -} -__name(_toConsumableArray$1, "_toConsumableArray$1"); -function _nonIterableSpread$1() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -__name(_nonIterableSpread$1, "_nonIterableSpread$1"); -function _iterableToArray$1(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -__name(_iterableToArray$1, "_iterableToArray$1"); -function _arrayWithoutHoles$1(r) { - if (Array.isArray(r)) return _arrayLikeToArray$3(r); -} -__name(_arrayWithoutHoles$1, "_arrayWithoutHoles$1"); -function _typeof$b(o) { - "@babel/helpers - typeof"; - return _typeof$b = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$b(o); -} -__name(_typeof$b, "_typeof$b"); -function _slicedToArray$1(r, e) { - return _arrayWithHoles$1(r) || _iterableToArrayLimit$1(r, e) || _unsupportedIterableToArray$3(r, e) || _nonIterableRest$1(); -} -__name(_slicedToArray$1, "_slicedToArray$1"); -function _nonIterableRest$1() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -__name(_nonIterableRest$1, "_nonIterableRest$1"); -function _unsupportedIterableToArray$3(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray$3(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0; - } -} -__name(_unsupportedIterableToArray$3, "_unsupportedIterableToArray$3"); -function _arrayLikeToArray$3(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -__name(_arrayLikeToArray$3, "_arrayLikeToArray$3"); -function _iterableToArrayLimit$1(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, n, i, u, a = [], f = true, o = false; - try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = false; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; - } catch (r2) { - o = true, n = r2; - } finally { - try { - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -__name(_iterableToArrayLimit$1, "_iterableToArrayLimit$1"); -function _arrayWithHoles$1(r) { - if (Array.isArray(r)) return r; -} -__name(_arrayWithHoles$1, "_arrayWithHoles$1"); -var script$l = { - name: "Paginator", - "extends": script$a$1, - inheritAttrs: false, - emits: ["update:first", "update:rows", "page"], - data: /* @__PURE__ */ __name(function data2() { - return { - d_first: this.first, - d_rows: this.rows - }; - }, "data"), - watch: { - first: /* @__PURE__ */ __name(function first2(newValue) { - this.d_first = newValue; - }, "first"), - rows: /* @__PURE__ */ __name(function rows(newValue) { - this.d_rows = newValue; - }, "rows"), - totalRecords: /* @__PURE__ */ __name(function totalRecords(newValue) { - if (this.page > 0 && newValue && this.d_first >= newValue) { - this.changePage(this.pageCount - 1); - } - }, "totalRecords") - }, - mounted: /* @__PURE__ */ __name(function mounted2() { - this.setPaginatorAttribute(); - this.createStyle(); - }, "mounted"), - methods: { - changePage: /* @__PURE__ */ __name(function changePage(p) { - var pc = this.pageCount; - if (p >= 0 && p < pc) { - this.d_first = this.d_rows * p; - var state = { - page: p, - first: this.d_first, - rows: this.d_rows, - pageCount: pc - }; - this.$emit("update:first", this.d_first); - this.$emit("update:rows", this.d_rows); - this.$emit("page", state); - } - }, "changePage"), - changePageToFirst: /* @__PURE__ */ __name(function changePageToFirst(event2) { - if (!this.isFirstPage) { - this.changePage(0); - } - event2.preventDefault(); - }, "changePageToFirst"), - changePageToPrev: /* @__PURE__ */ __name(function changePageToPrev(event2) { - this.changePage(this.page - 1); - event2.preventDefault(); - }, "changePageToPrev"), - changePageLink: /* @__PURE__ */ __name(function changePageLink(event2) { - this.changePage(event2.value - 1); - event2.originalEvent.preventDefault(); - }, "changePageLink"), - changePageToNext: /* @__PURE__ */ __name(function changePageToNext(event2) { - this.changePage(this.page + 1); - event2.preventDefault(); - }, "changePageToNext"), - changePageToLast: /* @__PURE__ */ __name(function changePageToLast(event2) { - if (!this.isLastPage) { - this.changePage(this.pageCount - 1); - } - event2.preventDefault(); - }, "changePageToLast"), - onRowChange: /* @__PURE__ */ __name(function onRowChange(value) { - this.d_rows = value; - this.changePage(this.page); - }, "onRowChange"), - createStyle: /* @__PURE__ */ __name(function createStyle() { - var _this = this; - if (this.hasBreakpoints() && !this.isUnstyled) { - var _this$$primevue; - this.styleElement = document.createElement("style"); - this.styleElement.type = "text/css"; - setAttribute(this.styleElement, "nonce", (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce); - document.head.appendChild(this.styleElement); - var innerHTML = ""; - var keys = Object.keys(this.template); - var sortedBreakpoints = {}; - keys.sort(function(a, b) { - return parseInt(a) - parseInt(b); - }).forEach(function(key2) { - sortedBreakpoints[key2] = _this.template[key2]; - }); - for (var _i = 0, _Object$entries = Object.entries(Object.entries(sortedBreakpoints)); _i < _Object$entries.length; _i++) { - var _Object$entries$_i = _slicedToArray$1(_Object$entries[_i], 2), index = _Object$entries$_i[0], _Object$entries$_i$ = _slicedToArray$1(_Object$entries$_i[1], 1), key = _Object$entries$_i$[0]; - var minValue = void 0, calculatedMinValue = void 0; - if (key !== "default" && typeof Object.keys(sortedBreakpoints)[index - 1] === "string") { - calculatedMinValue = Number(Object.keys(sortedBreakpoints)[index - 1].slice(0, -2)) + 1 + "px"; - } else { - calculatedMinValue = Object.keys(sortedBreakpoints)[index - 1]; - } - minValue = Object.entries(sortedBreakpoints)[index - 1] ? "and (min-width:".concat(calculatedMinValue, ")") : ""; - if (key === "default") { - innerHTML += "\n @media screen ".concat(minValue, " {\n .paginator[").concat(this.attributeSelector, "],\n display: flex;\n }\n }\n "); - } else { - innerHTML += "\n.paginator[".concat(this.attributeSelector, "], .p-paginator-").concat(key, " {\n display: none;\n}\n@media screen ").concat(minValue, " and (max-width: ").concat(key, ") {\n .paginator[").concat(this.attributeSelector, "], .p-paginator-").concat(key, " {\n display: flex;\n }\n .paginator[").concat(this.attributeSelector, "],\n .p-paginator-default{\n display: none;\n }\n}\n "); - } - } - this.styleElement.innerHTML = innerHTML; - } - }, "createStyle"), - hasBreakpoints: /* @__PURE__ */ __name(function hasBreakpoints() { - return _typeof$b(this.template) === "object"; - }, "hasBreakpoints"), - setPaginatorAttribute: /* @__PURE__ */ __name(function setPaginatorAttribute() { - var _this2 = this; - if (this.$refs.paginator && this.$refs.paginator.length >= 0) { - _toConsumableArray$1(this.$refs.paginator).forEach(function(el) { - el.setAttribute(_this2.attributeSelector, ""); - }); - } - }, "setPaginatorAttribute"), - getAriaLabel: /* @__PURE__ */ __name(function getAriaLabel(labelType) { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria[labelType] : void 0; - }, "getAriaLabel") - }, - computed: { - templateItems: /* @__PURE__ */ __name(function templateItems() { - var keys = {}; - if (this.hasBreakpoints()) { - keys = this.template; - if (!keys["default"]) { - keys["default"] = "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"; - } - for (var item in keys) { - keys[item] = this.template[item].split(" ").map(function(value) { - return value.trim(); - }); - } - return keys; - } - keys["default"] = this.template.split(" ").map(function(value) { - return value.trim(); - }); - return keys; - }, "templateItems"), - page: /* @__PURE__ */ __name(function page3() { - return Math.floor(this.d_first / this.d_rows); - }, "page"), - pageCount: /* @__PURE__ */ __name(function pageCount() { - return Math.ceil(this.totalRecords / this.d_rows); - }, "pageCount"), - isFirstPage: /* @__PURE__ */ __name(function isFirstPage() { - return this.page === 0; - }, "isFirstPage"), - isLastPage: /* @__PURE__ */ __name(function isLastPage() { - return this.page === this.pageCount - 1; - }, "isLastPage"), - calculatePageLinkBoundaries: /* @__PURE__ */ __name(function calculatePageLinkBoundaries() { - var numberOfPages = this.pageCount; - var visiblePages = Math.min(this.pageLinkSize, numberOfPages); - var start = Math.max(0, Math.ceil(this.page - visiblePages / 2)); - var end = Math.min(numberOfPages - 1, start + visiblePages - 1); - var delta = this.pageLinkSize - (end - start + 1); - start = Math.max(0, start - delta); - return [start, end]; - }, "calculatePageLinkBoundaries"), - pageLinks: /* @__PURE__ */ __name(function pageLinks() { - var pageLinks2 = []; - var boundaries = this.calculatePageLinkBoundaries; - var start = boundaries[0]; - var end = boundaries[1]; - for (var i = start; i <= end; i++) { - pageLinks2.push(i + 1); - } - return pageLinks2; - }, "pageLinks"), - currentState: /* @__PURE__ */ __name(function currentState() { - return { - page: this.page, - first: this.d_first, - rows: this.d_rows - }; - }, "currentState"), - empty: /* @__PURE__ */ __name(function empty() { - return this.pageCount === 0; - }, "empty"), - currentPage: /* @__PURE__ */ __name(function currentPage() { - return this.pageCount > 0 ? this.page + 1 : 0; - }, "currentPage"), - attributeSelector: /* @__PURE__ */ __name(function attributeSelector() { - return UniqueComponentId(); - }, "attributeSelector") - }, - components: { - CurrentPageReport: script$9$1, - FirstPageLink: script$8$1, - LastPageLink: script$5$1, - NextPageLink: script$4$1, - PageLinks: script$3$1, - PrevPageLink: script$2$1, - RowsPerPageDropdown: script$1$2, - JumpToPageDropdown: script$7$1, - JumpToPageInput: script$6$1 - } -}; -function render$k(_ctx, _cache, $props, $setup, $data, $options) { - var _component_FirstPageLink = resolveComponent("FirstPageLink"); - var _component_PrevPageLink = resolveComponent("PrevPageLink"); - var _component_NextPageLink = resolveComponent("NextPageLink"); - var _component_LastPageLink = resolveComponent("LastPageLink"); - var _component_PageLinks = resolveComponent("PageLinks"); - var _component_CurrentPageReport = resolveComponent("CurrentPageReport"); - var _component_RowsPerPageDropdown = resolveComponent("RowsPerPageDropdown"); - var _component_JumpToPageDropdown = resolveComponent("JumpToPageDropdown"); - var _component_JumpToPageInput = resolveComponent("JumpToPageInput"); - return (_ctx.alwaysShow ? true : $options.pageLinks && $options.pageLinks.length > 1) ? (openBlock(), createElementBlock("nav", normalizeProps(mergeProps({ - key: 0 - }, _ctx.ptmi("paginatorContainer"))), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.templateItems, function(value, key) { - return openBlock(), createElementBlock("div", mergeProps({ - key, - ref_for: true, - ref: "paginator", - "class": _ctx.cx("paginator", { - key - }) - }, _ctx.ptm("root")), [_ctx.$slots.start ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - "class": _ctx.cx("contentStart"), - ref_for: true - }, _ctx.ptm("contentStart")), [renderSlot(_ctx.$slots, "start", { - state: $options.currentState - })], 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("content"), - ref_for: true - }, _ctx.ptm("content")), [(openBlock(true), createElementBlock(Fragment, null, renderList(value, function(item) { - return openBlock(), createElementBlock(Fragment, { - key: item - }, [item === "FirstPageLink" ? (openBlock(), createBlock(_component_FirstPageLink, { - key: 0, - "aria-label": $options.getAriaLabel("firstPageLabel"), - template: _ctx.$slots.firsticon || _ctx.$slots.firstpagelinkicon, - onClick: _cache[0] || (_cache[0] = function($event) { - return $options.changePageToFirst($event); - }), - disabled: $options.isFirstPage || $options.empty, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["aria-label", "template", "disabled", "unstyled", "pt"])) : item === "PrevPageLink" ? (openBlock(), createBlock(_component_PrevPageLink, { - key: 1, - "aria-label": $options.getAriaLabel("prevPageLabel"), - template: _ctx.$slots.previcon || _ctx.$slots.prevpagelinkicon, - onClick: _cache[1] || (_cache[1] = function($event) { - return $options.changePageToPrev($event); - }), - disabled: $options.isFirstPage || $options.empty, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["aria-label", "template", "disabled", "unstyled", "pt"])) : item === "NextPageLink" ? (openBlock(), createBlock(_component_NextPageLink, { - key: 2, - "aria-label": $options.getAriaLabel("nextPageLabel"), - template: _ctx.$slots.nexticon || _ctx.$slots.nextpagelinkicon, - onClick: _cache[2] || (_cache[2] = function($event) { - return $options.changePageToNext($event); - }), - disabled: $options.isLastPage || $options.empty, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["aria-label", "template", "disabled", "unstyled", "pt"])) : item === "LastPageLink" ? (openBlock(), createBlock(_component_LastPageLink, { - key: 3, - "aria-label": $options.getAriaLabel("lastPageLabel"), - template: _ctx.$slots.lasticon || _ctx.$slots.lastpagelinkicon, - onClick: _cache[3] || (_cache[3] = function($event) { - return $options.changePageToLast($event); - }), - disabled: $options.isLastPage || $options.empty, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["aria-label", "template", "disabled", "unstyled", "pt"])) : item === "PageLinks" ? (openBlock(), createBlock(_component_PageLinks, { - key: 4, - "aria-label": $options.getAriaLabel("pageLabel"), - value: $options.pageLinks, - page: $options.page, - onClick: _cache[4] || (_cache[4] = function($event) { - return $options.changePageLink($event); - }), - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["aria-label", "value", "page", "unstyled", "pt"])) : item === "CurrentPageReport" ? (openBlock(), createBlock(_component_CurrentPageReport, { - key: 5, - "aria-live": "polite", - template: _ctx.currentPageReportTemplate, - currentPage: $options.currentPage, - page: $options.page, - pageCount: $options.pageCount, - first: $data.d_first, - rows: $data.d_rows, - totalRecords: _ctx.totalRecords, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["template", "currentPage", "page", "pageCount", "first", "rows", "totalRecords", "unstyled", "pt"])) : item === "RowsPerPageDropdown" && _ctx.rowsPerPageOptions ? (openBlock(), createBlock(_component_RowsPerPageDropdown, { - key: 6, - "aria-label": $options.getAriaLabel("rowsPerPageLabel"), - rows: $data.d_rows, - options: _ctx.rowsPerPageOptions, - onRowsChange: _cache[5] || (_cache[5] = function($event) { - return $options.onRowChange($event); - }), - disabled: $options.empty, - templates: _ctx.$slots, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["aria-label", "rows", "options", "disabled", "templates", "unstyled", "pt"])) : item === "JumpToPageDropdown" ? (openBlock(), createBlock(_component_JumpToPageDropdown, { - key: 7, - "aria-label": $options.getAriaLabel("jumpToPageDropdownLabel"), - page: $options.page, - pageCount: $options.pageCount, - onPageChange: _cache[6] || (_cache[6] = function($event) { - return $options.changePage($event); - }), - disabled: $options.empty, - templates: _ctx.$slots, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["aria-label", "page", "pageCount", "disabled", "templates", "unstyled", "pt"])) : item === "JumpToPageInput" ? (openBlock(), createBlock(_component_JumpToPageInput, { - key: 8, - page: $options.currentPage, - onPageChange: _cache[7] || (_cache[7] = function($event) { - return $options.changePage($event); - }), - disabled: $options.empty, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["page", "disabled", "unstyled", "pt"])) : createCommentVNode("", true)], 64); - }), 128))], 16), _ctx.$slots.end ? (openBlock(), createElementBlock("div", mergeProps({ - key: 1, - "class": _ctx.cx("contentEnd"), - ref_for: true - }, _ctx.ptm("contentEnd")), [renderSlot(_ctx.$slots, "end", { - state: $options.currentState - })], 16)) : createCommentVNode("", true)], 16); - }), 128))], 16)) : createCommentVNode("", true); -} -__name(render$k, "render$k"); -script$l.render = render$k; -var theme$1 = /* @__PURE__ */ __name(function theme2(_ref) { - var dt = _ref.dt; - return "\n.p-datatable {\n position: relative;\n}\n\n.p-datatable-table {\n border-spacing: 0;\n width: 100%;\n}\n\n.p-datatable-scrollable > .p-datatable-table-container {\n position: relative;\n}\n\n.p-datatable-scrollable-table > .p-datatable-thead {\n top: 0;\n z-index: 1;\n}\n\n.p-datatable-scrollable-table > .p-datatable-frozen-tbody {\n position: sticky;\n z-index: 1;\n}\n\n.p-datatable-scrollable-table>.p-datatable-tfoot {\n bottom: 0;\n z-index: 1;\n}\n\n.p-datatable-scrollable .p-datatable-frozen-column {\n position: sticky;\n background: ".concat(dt("datatable.header.cell.background"), ";\n}\n\n.p-datatable-scrollable th.p-datatable-frozen-column {\n z-index: 1;\n}\n\n.p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-thead,\n.p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-thead {\n background: ").concat(dt("datatable.header.cell.background"), ";\n}\n\n.p-datatable-scrollable > .p-datatable-table-container > .p-datatable-table > .p-datatable-tfoot,\n.p-datatable-scrollable > .p-datatable-table-container > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {\n background: ").concat(dt("datatable.footer.cell.background"), ";\n}\n\n.p-datatable-flex-scrollable {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.p-datatable-flex-scrollable > .p-datatable-table-container {\n display: flex;\n flex-direction: column;\n flex: 1;\n height: 100%;\n}\n\n.p-datatable-scrollable-table > .p-datatable-tbody > .p-datatable-row-group-header {\n position: sticky;\n z-index: 1;\n}\n\n.p-datatable-resizable-table > .p-datatable-thead > tr > th,\n.p-datatable-resizable-table > .p-datatable-tfoot > tr > td,\n.p-datatable-resizable-table > .p-datatable-tbody > tr > td {\n overflow: hidden;\n white-space: nowrap;\n}\n\n.p-datatable-resizable-table > .p-datatable-thead > tr > th.p-datatable-resizable-column:not(.p-datatable-frozen-column) {\n background-clip: padding-box;\n position: relative;\n}\n\n.p-datatable-resizable-table-fit > .p-datatable-thead > tr > th.p-datatable-resizable-column:last-child .p-datatable-column-resizer {\n display: none;\n}\n\n.p-datatable-column-resizer {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n margin: 0;\n width: ").concat(dt("datatable.column.resizer.width"), ";\n height: 100%;\n padding: 0px;\n cursor: col-resize;\n border: 1px solid transparent;\n}\n\n.p-datatable-column-header-content {\n display: flex;\n align-items: center;\n gap: ").concat(dt("datatable.header.cell.gap"), ";\n}\n\n.p-datatable-column-resize-indicator {\n width: ").concat(dt("datatable.resize.indicator.width"), ";\n position: absolute;\n z-index: 10;\n display: none;\n background: ").concat(dt("datatable.resize.indicator.color"), ";\n}\n\n.p-datatable-row-reorder-indicator-up,\n.p-datatable-row-reorder-indicator-down {\n position: absolute;\n display: none;\n}\n\n.p-datatable-reorderable-column,\n.p-datatable-reorderable-row-handle {\n cursor: move;\n}\n\n.p-datatable-mask {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2;\n}\n\n.p-datatable-inline-filter {\n display: flex;\n align-items: center;\n width: 100%;\n gap: ").concat(dt("datatable.filter.inline.gap"), ";\n}\n\n.p-datatable-inline-filter .p-datatable-filter-element-container {\n flex: 1 1 auto;\n width: 1%;\n}\n\n.p-datatable-filter-overlay {\n background: ").concat(dt("datatable.filter.overlay.select.background"), ";\n color: ").concat(dt("datatable.filter.overlay.select.color"), ";\n border: 1px solid ").concat(dt("datatable.filter.overlay.select.border.color"), ";\n border-radius: ").concat(dt("datatable.filter.overlay.select.border.radius"), ";\n box-shadow: ").concat(dt("datatable.filter.overlay.select.shadow"), ";\n min-width: 12.5rem;\n}\n\n.p-datatable-filter-constraint-list {\n margin: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n padding: ").concat(dt("datatable.filter.constraint.list.padding"), ";\n gap: ").concat(dt("datatable.filter.constraint.list.gap"), ";\n}\n\n.p-datatable-filter-constraint {\n padding: ").concat(dt("datatable.filter.constraint.padding"), ";\n color: ").concat(dt("datatable.filter.constraint.color"), ";\n border-radius: ").concat(dt("datatable.filter.constraint.border.radius"), ";\n cursor: pointer;\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-filter-constraint-selected {\n background: ").concat(dt("datatable.filter.constraint.selected.background"), ";\n color: ").concat(dt("datatable.filter.constraint.selected.color"), ";\n}\n\n.p-datatable-filter-constraint:not(.p-datatable-filter-constraint-selected):not(.p-disabled):hover {\n background: ").concat(dt("datatable.filter.constraint.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.focus.color"), ";\n}\n\n.p-datatable-filter-constraint:focus-visible {\n outline: 0 none;\n background: ").concat(dt("datatable.filter.constraint.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.focus.color"), ";\n}\n\n.p-datatable-filter-constraint-selected:focus-visible {\n outline: 0 none;\n background: ").concat(dt("datatable.filter.constraint.selected.focus.background"), ";\n color: ").concat(dt("datatable.filter.constraint.selected.focus.color"), ";\n}\n\n.p-datatable-filter-constraint-separator {\n border-top: 1px solid ").concat(dt("datatable.filter.constraint.separator.border.color"), ";\n}\n\n.p-datatable-popover-filter {\n display: inline-flex;\n margin-left: auto;\n}\n\n.p-datatable-filter-overlay-popover {\n background: ").concat(dt("datatable.filter.overlay.popover.background"), ";\n color: ").concat(dt("datatable.filter.overlay.popover.color"), ";\n border: 1px solid ").concat(dt("datatable.filter.overlay.popover.border.color"), ";\n border-radius: ").concat(dt("datatable.filter.overlay.popover.border.radius"), ";\n box-shadow: ").concat(dt("datatable.filter.overlay.popover.shadow"), ";\n min-width: 12.5rem;\n padding: ").concat(dt("datatable.filter.overlay.popover.padding"), ";\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("datatable.filter.overlay.popover.gap"), ";\n}\n\n.p-datatable-filter-operator-dropdown {\n width: 100%;\n}\n\n.p-datatable-filter-rule-list,\n.p-datatable-filter-rule {\n display: flex;\n flex-direction: column;\n gap: ").concat(dt("datatable.filter.overlay.popover.gap"), ";\n}\n\n.p-datatable-filter-rule {\n border-bottom: 1px solid ").concat(dt("datatable.filter.rule.border.color"), ";\n}\n\n.p-datatable-filter-rule:last-child {\n border-bottom: 0 none;\n}\n\n.p-datatable-filter-add-rule-button {\n width: 100%;\n}\n\n.p-datatable-filter-remove-button {\n width: 100%;\n}\n\n.p-datatable-filter-buttonbar {\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.p-datatable-virtualscroller-spacer {\n display: flex;\n}\n\n.p-datatable .p-virtualscroller .p-virtualscroller-loading {\n transform: none !important;\n min-height: 0;\n position: sticky;\n top: 0;\n left: 0;\n}\n\n.p-datatable-paginator-top {\n border-color: ").concat(dt("datatable.paginator.top.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.paginator.top.border.width"), ";\n}\n\n.p-datatable-paginator-bottom {\n border-color: ").concat(dt("datatable.paginator.bottom.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.paginator.bottom.border.width"), ";\n}\n\n.p-datatable-header {\n background: ").concat(dt("datatable.header.background"), ";\n color: ").concat(dt("datatable.header.color"), ";\n border-color: ").concat(dt("datatable.header.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.header.border.width"), ";\n padding: ").concat(dt("datatable.header.padding"), ";\n}\n\n.p-datatable-footer {\n background: ").concat(dt("datatable.footer.background"), ";\n color: ").concat(dt("datatable.footer.color"), ";\n border-color: ").concat(dt("datatable.footer.border.color"), ";\n border-style: solid;\n border-width: ").concat(dt("datatable.footer.border.width"), ";\n padding: ").concat(dt("datatable.footer.padding"), ";\n}\n\n.p-datatable-header-cell {\n padding: ").concat(dt("datatable.header.cell.padding"), ";\n background: ").concat(dt("datatable.header.cell.background"), ";\n border-color: ").concat(dt("datatable.header.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n color: ").concat(dt("datatable.header.cell.color"), ";\n font-weight: normal;\n text-align: left;\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-column-title {\n font-weight: ").concat(dt("datatable.column.title.font.weight"), ";\n}\n\n.p-datatable-tbody > tr {\n outline-color: transparent;\n background: ").concat(dt("datatable.row.background"), ";\n color: ").concat(dt("datatable.row.color"), ";\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-tbody > tr > td {\n text-align: left;\n border-color: ").concat(dt("datatable.body.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n padding: ").concat(dt("datatable.body.cell.padding"), ";\n}\n\n.p-datatable-hoverable .p-datatable-tbody > tr:not(.p-datatable-row-selected):hover {\n background: ").concat(dt("datatable.row.hover.background"), ";\n color: ").concat(dt("datatable.row.hover.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected {\n background: ").concat(dt("datatable.row.selected.background"), ";\n color: ").concat(dt("datatable.row.selected.color"), ";\n}\n\n.p-datatable-tbody > tr:has(+ .p-datatable-row-selected) > td {\n border-bottom-color: ").concat(dt("datatable.body.cell.selected.border.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected > td {\n border-bottom-color: ").concat(dt("datatable.body.cell.selected.border.color"), ";\n}\n\n.p-datatable-tbody > tr:focus-visible,\n.p-datatable-tbody > tr.p-datatable-contextmenu-row-selected {\n box-shadow: ").concat(dt("datatable.body.cell.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.body.cell.focus.ring.width"), " ").concat(dt("datatable.body.cell.focus.ring.style"), " ").concat(dt("datatable.body.cell.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.body.cell.focus.ring.offset"), ";\n}\n\n.p-datatable-tfoot > tr > td {\n text-align: left;\n padding: ").concat(dt("datatable.footer.cell.padding"), ";\n border-color: ").concat(dt("datatable.footer.cell.border.color"), ";\n border-style: solid;\n border-width: 0 0 1px 0;\n color: ").concat(dt("datatable.footer.cell.color"), ";\n background: ").concat(dt("datatable.footer.cell.background"), ";\n}\n\n.p-datatable-column-footer {\n font-weight: ").concat(dt("datatable.column.footer.font.weight"), ";\n}\n\n.p-datatable-sortable-column {\n cursor: pointer;\n user-select: none;\n outline-color: transparent;\n}\n\n.p-datatable-column-title,\n.p-datatable-sort-icon,\n.p-datatable-sort-badge {\n vertical-align: middle;\n}\n\n.p-datatable-sort-icon {\n color: ").concat(dt("datatable.sort.icon.color"), ";\n transition: color ").concat(dt("datatable.transition.duration"), ";\n}\n\n.p-datatable-sortable-column:not(.p-datatable-column-sorted):hover {\n background: ").concat(dt("datatable.header.cell.hover.background"), ";\n color: ").concat(dt("datatable.header.cell.hover.color"), ";\n}\n\n.p-datatable-sortable-column:not(.p-datatable-column-sorted):hover .p-datatable-sort-icon {\n color: ").concat(dt("datatable.sort.icon.hover.color"), ";\n}\n\n.p-datatable-column-sorted {\n background: ").concat(dt("datatable.header.cell.selected.background"), ";\n color: ").concat(dt("datatable.header.cell.selected.color"), ";\n}\n\n.p-datatable-column-sorted .p-datatable-sort-icon {\n color: ").concat(dt("datatable.header.cell.selected.color"), ";\n}\n\n.p-datatable-sortable-column:focus-visible {\n box-shadow: ").concat(dt("datatable.header.cell.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.header.cell.focus.ring.width"), " ").concat(dt("datatable.header.cell.focus.ring.style"), " ").concat(dt("datatable.header.cell.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.header.cell.focus.ring.offset"), ";\n}\n\n.p-datatable-hoverable .p-datatable-selectable-row {\n cursor: pointer;\n}\n\n.p-datatable-tbody > tr.p-datatable-dragpoint-top > td {\n box-shadow: inset 0 2px 0 0 ").concat(dt("datatable.drop.point.color"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-dragpoint-bottom > td {\n box-shadow: inset 0 -2px 0 0 ").concat(dt("datatable.drop.point.color"), ";\n}\n\n.p-datatable-loading-icon {\n font-size: ").concat(dt("datatable.loading.icon.size"), ";\n width: ").concat(dt("datatable.loading.icon.size"), ";\n height: ").concat(dt("datatable.loading.icon.size"), ";\n}\n\n.p-datatable-gridlines .p-datatable-header {\n border-width: 1px 1px 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-footer {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-paginator-top {\n border-width: 1px 1px 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-paginator-bottom {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-thead > tr > th {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-thead > tr > th:last-child {\n border-width: 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr > td {\n border-width: 1px 0 0 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr > td:last-child {\n border-width: 1px 1px 0 1px;\n}\n\np-datatable-gridlines .p-datatable-tbody > tr:last-child > td {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tbody > tr:last-child > td:last-child {\n border-width: 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tfoot > tr > td {\n border-width: 1px 0 1px 1px;\n}\n\n.p-datatable-gridlines .p-datatable-tfoot > tr > td:last-child {\n border-width: 1px 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td {\n border-width: 0 0 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines .p-datatable-thead + .p-datatable-tfoot > tr > td:last-child {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td {\n border-width: 0 0 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-thead):has(.p-datatable-tbody) .p-datatable-tbody > tr > td:last-child {\n border-width: 0 1px 1px 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td {\n border-width: 0 0 0 1px;\n}\n\n.p-datatable.p-datatable-gridlines:has(.p-datatable-tbody):has(.p-datatable-tfoot) .p-datatable-tbody > tr:last-child > td:last-child {\n border-width: 0 1px 0 1px;\n}\n\n.p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd {\n background: ").concat(dt("datatable.row.striped.background"), ";\n}\n\n.p-datatable.p-datatable-striped .p-datatable-tbody > tr.p-row-odd.p-datatable-row-selected {\n background: ").concat(dt("datatable.row.selected.background"), ";\n color: ").concat(dt("datatable.row.selected.color"), ";\n}\n\n.p-datatable.p-datatable-sm .p-datatable-header {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-thead > tr > th {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-tbody > tr > td {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-tfoot > tr > td {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-sm .p-datatable-footer {\n padding: 0.375rem 0.5rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-header {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-thead > tr > th {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-tbody>tr>td {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-tfoot>tr>td {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable.p-datatable-lg .p-datatable-footer {\n padding: 0.9375rem 1.25rem;\n}\n\n.p-datatable-row-toggle-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n position: relative;\n width: ").concat(dt("datatable.row.toggle.button.size"), ";\n height: ").concat(dt("datatable.row.toggle.button.size"), ";\n color: ").concat(dt("datatable.row.toggle.button.color"), ";\n border: 0 none;\n background: transparent;\n cursor: pointer;\n border-radius: ").concat(dt("datatable.row.toggle.button.border.radius"), ";\n transition: background ").concat(dt("datatable.transition.duration"), ", color ").concat(dt("datatable.transition.duration"), ", border-color ").concat(dt("datatable.transition.duration"), ",\n outline-color ").concat(dt("datatable.transition.duration"), ", box-shadow ").concat(dt("datatable.transition.duration"), ";\n outline-color: transparent;\n user-select: none;\n}\n\n.p-datatable-row-toggle-button:enabled:hover {\n color: ").concat(dt("datatable.row.toggle.button.hover.color"), ";\n background: ").concat(dt("datatable.row.toggle.button.hover.background"), ";\n}\n\n.p-datatable-tbody > tr.p-datatable-row-selected .p-datatable-row-toggle-button:hover {\n background: ").concat(dt("datatable.row.toggle.button.selected.hover.background"), ";\n ").concat(dt("datatable.row.toggle.button.selected.hover.color"), ";\n}\n\n.p-datatable-row-toggle-button:focus-visible {\n box-shadow: ").concat(dt("datatable.row.toggle.button.focus.ring.shadow"), ";\n outline: ").concat(dt("datatable.row.toggle.button.focus.ring.width"), " ").concat(dt("datatable.row.toggle.button.focus.ring.style"), " ").concat(dt("datatable.row.toggle.button.focus.ring.color"), ";\n outline-offset: ").concat(dt("datatable.row.toggle.button.focus.ring.offset"), ";\n}\n"); -}, "theme"); -var classes$1 = { - root: /* @__PURE__ */ __name(function root(_ref2) { - var props = _ref2.props; - return ["p-datatable p-component", { - "p-datatable-hoverable": props.rowHover || props.selectionMode, - "p-datatable-resizable": props.resizableColumns, - "p-datatable-resizable-fit": props.resizableColumns && props.columnResizeMode === "fit", - "p-datatable-scrollable": props.scrollable, - "p-datatable-flex-scrollable": props.scrollable && props.scrollHeight === "flex", - "p-datatable-striped": props.stripedRows, - "p-datatable-gridlines": props.showGridlines, - "p-datatable-sm": props.size === "small", - "p-datatable-lg": props.size === "large" - }]; - }, "root"), - mask: "p-datatable-mask p-overlay-mask", - loadingIcon: "p-datatable-loading-icon", - header: "p-datatable-header", - pcPaginator: /* @__PURE__ */ __name(function pcPaginator(_ref3) { - var position = _ref3.position; - return "p-datatable-paginator-" + position; - }, "pcPaginator"), - tableContainer: "p-datatable-table-container", - table: /* @__PURE__ */ __name(function table(_ref4) { - var props = _ref4.props; - return ["p-datatable-table", { - "p-datatable-scrollable-table": props.scrollable, - "p-datatable-resizable-table": props.resizableColumns, - "p-datatable-resizable-table-fit": props.resizableColumns && props.columnResizeMode === "fit" - }]; - }, "table"), - thead: "p-datatable-thead", - headerCell: /* @__PURE__ */ __name(function headerCell(_ref5) { - var instance = _ref5.instance, props = _ref5.props, column = _ref5.column; - return column && !instance.columnProp(column, "hidden") && (props.rowGroupMode !== "subheader" || props.groupRowsBy !== instance.columnProp(column, "field")) ? ["p-datatable-header-cell", { - "p-datatable-frozen-column": instance.columnProp(column, "frozen") - }] : ["p-datatable-header-cell", { - "p-datatable-sortable-column": instance.columnProp("sortable"), - "p-datatable-resizable-column": instance.resizableColumns, - "p-datatable-column-sorted": instance.isColumnSorted(), - "p-datatable-frozen-column": instance.columnProp("frozen"), - "p-datatable-reorderable-column": props.reorderableColumns - }]; - }, "headerCell"), - columnResizer: "p-datatable-column-resizer", - columnHeaderContent: "p-datatable-column-header-content", - columnTitle: "p-datatable-column-title", - columnFooter: "p-datatable-column-footer", - sortIcon: "p-datatable-sort-icon", - pcSortBadge: "p-datatable-sort-badge", - filter: /* @__PURE__ */ __name(function filter(_ref6) { - var props = _ref6.props; - return ["p-datatable-filter", { - "p-datatable-inline-filter": props.display === "row", - "p-datatable-popover-filter": props.display === "menu" - }]; - }, "filter"), - filterElementContainer: "p-datatable-filter-element-container", - pcColumnFilterButton: "p-datatable-column-filter-button", - pcColumnFilterClearButton: "p-datatable-column-filter-clear-button", - filterOverlay: /* @__PURE__ */ __name(function filterOverlay(_ref7) { - _ref7.instance; - var props = _ref7.props; - return ["p-datatable-filter-overlay p-component", { - "p-datatable-filter-overlay-popover": props.display === "menu" - }]; - }, "filterOverlay"), - filterConstraintList: "p-datatable-filter-constraint-list", - filterConstraint: /* @__PURE__ */ __name(function filterConstraint(_ref8) { - var instance = _ref8.instance, matchMode = _ref8.matchMode; - return ["p-datatable-filter-constraint", { - "p-datatable-filter-constraint-selected": matchMode && instance.isRowMatchModeSelected(matchMode.value) - }]; - }, "filterConstraint"), - filterConstraintSeparator: "p-datatable-filter-constraint-separator", - filterOperator: "p-datatable-filter-operator", - pcFilterOperatorDropdown: "p-datatable-filter-operator-dropdown", - filterRuleList: "p-datatable-filter-rule-list", - filterRule: "p-datatable-filter-rule", - pcFilterConstraintDropdown: "p-datatable-filter-constraint-dropdown", - pcFilterRemoveRuleButton: "p-datatable-filter-remove-rule-button", - pcFilterAddRuleButton: "p-datatable-filter-add-rule-button", - filterButtonbar: "p-datatable-filter-buttonbar", - pcFilterClearButton: "p-datatable-filter-clear-button", - pcFilterApplyButton: "p-datatable-filter-apply-button", - tbody: /* @__PURE__ */ __name(function tbody(_ref9) { - var props = _ref9.props; - return props.frozenRow ? "p-datatable-tbody p-datatable-frozen-tbody" : "p-datatable-tbody"; - }, "tbody"), - rowGroupHeader: "p-datatable-row-group-header", - rowToggleButton: "p-datatable-row-toggle-button", - rowToggleIcon: "p-datatable-row-toggle-icon", - row: /* @__PURE__ */ __name(function row(_ref10) { - var instance = _ref10.instance, props = _ref10.props, index = _ref10.index, columnSelectionMode = _ref10.columnSelectionMode; - var rowStyleClass = []; - if (props.selectionMode) { - rowStyleClass.push("p-datatable-selectable-row"); - } - if (props.selection) { - rowStyleClass.push({ - "p-datatable-row-selected": columnSelectionMode ? instance.isSelected && instance.$parentInstance.$parentInstance.highlightOnSelect : instance.isSelected - }); - } - if (props.contextMenuSelection) { - rowStyleClass.push({ - "p-datatable-contextmenu-row-selected": instance.isSelectedWithContextMenu - }); - } - rowStyleClass.push(index % 2 === 0 ? "p-row-even" : "p-row-odd"); - return rowStyleClass; - }, "row"), - rowExpansion: "p-datatable-row-expansion", - rowGroupFooter: "p-datatable-row-group-footer", - emptyMessage: "p-datatable-empty-message", - bodyCell: /* @__PURE__ */ __name(function bodyCell(_ref11) { - var instance = _ref11.instance; - return [{ - "p-datatable-frozen-column": instance.columnProp("frozen") - }]; - }, "bodyCell"), - reorderableRowHandle: "p-datatable-reorderable-row-handle", - pcRowEditorInit: "p-datatable-row-editor-init", - pcRowEditorSave: "p-datatable-row-editor-save", - pcRowEditorCancel: "p-datatable-row-editor-cancel", - tfoot: "p-datatable-tfoot", - footerCell: /* @__PURE__ */ __name(function footerCell(_ref12) { - var instance = _ref12.instance; - return [{ - "p-datatable-frozen-column": instance.columnProp("frozen") - }]; - }, "footerCell"), - virtualScrollerSpacer: "p-datatable-virtualscroller-spacer", - footer: "p-datatable-footer", - columnResizeIndicator: "p-datatable-column-resize-indicator", - rowReorderIndicatorUp: "p-datatable-row-reorder-indicator-up", - rowReorderIndicatorDown: "p-datatable-row-reorder-indicator-down" -}; -var inlineStyles = { - tableContainer: { - overflow: "auto" - }, - thead: { - position: "sticky" - }, - tfoot: { - position: "sticky" - } -}; -var DataTableStyle = BaseStyle.extend({ - name: "datatable", - theme: theme$1, - classes: classes$1, - inlineStyles -}); -var script$k = { - name: "PencilIcon", - "extends": script$t -}; -var _hoisted_1$c = /* @__PURE__ */ createBaseVNode("path", { - d: "M0.609628 13.959C0.530658 13.9599 0.452305 13.9451 0.379077 13.9156C0.305849 13.8861 0.239191 13.8424 0.18294 13.787C0.118447 13.7234 0.0688234 13.6464 0.0376166 13.5614C0.00640987 13.4765 -0.00560954 13.3857 0.00241768 13.2956L0.25679 10.1501C0.267698 10.0041 0.331934 9.86709 0.437312 9.76516L9.51265 0.705715C10.0183 0.233014 10.6911 -0.0203041 11.3835 0.00127367C12.0714 0.00660201 12.7315 0.27311 13.2298 0.746671C13.7076 1.23651 13.9824 1.88848 13.9992 2.57201C14.0159 3.25554 13.7733 3.92015 13.32 4.4327L4.23648 13.5331C4.13482 13.6342 4.0017 13.6978 3.85903 13.7133L0.667067 14L0.609628 13.959ZM1.43018 10.4696L1.25787 12.714L3.50619 12.5092L12.4502 3.56444C12.6246 3.35841 12.7361 3.10674 12.7714 2.83933C12.8067 2.57193 12.7644 2.30002 12.6495 2.05591C12.5346 1.8118 12.3519 1.60575 12.1231 1.46224C11.8943 1.31873 11.6291 1.2438 11.3589 1.24633C11.1813 1.23508 11.0033 1.25975 10.8355 1.31887C10.6677 1.37798 10.5136 1.47033 10.3824 1.59036L1.43018 10.4696Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$a = [_hoisted_1$c]; -function render$j(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$a, 16); -} -__name(render$j, "render$j"); -script$k.render = render$j; -var theme3 = /* @__PURE__ */ __name(function theme4(_ref) { - var dt = _ref.dt; - return "\n.p-radiobutton {\n position: relative;\n display: inline-flex;\n user-select: none;\n vertical-align: bottom;\n width: ".concat(dt("radiobutton.width"), ";\n height: ").concat(dt("radiobutton.height"), ";\n}\n\n.p-radiobutton-input {\n cursor: pointer;\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: 1;\n outline: 0 none;\n border: 1px solid transparent;\n border-radius: 50%;\n}\n\n.p-radiobutton-box {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n border: 1px solid ").concat(dt("radiobutton.border.color"), ";\n background: ").concat(dt("radiobutton.background"), ";\n width: ").concat(dt("radiobutton.width"), ";\n height: ").concat(dt("radiobutton.height"), ";\n transition: background ").concat(dt("radiobutton.transition.duration"), ", color ").concat(dt("radiobutton.transition.duration"), ", border-color ").concat(dt("radiobutton.transition.duration"), ", box-shadow ").concat(dt("radiobutton.transition.duration"), ", outline-color ").concat(dt("radiobutton.transition.duration"), ";\n outline-color: transparent;\n box-shadow: ").concat(dt("radiobutton.shadow"), ";\n}\n\n.p-radiobutton-icon {\n transition-duration: ").concat(dt("radiobutton.transition.duration"), ";\n background: transparent;\n font-size: ").concat(dt("radiobutton.icon.size"), ";\n width: ").concat(dt("radiobutton.icon.size"), ";\n height: ").concat(dt("radiobutton.icon.size"), ";\n border-radius: 50%;\n backface-visibility: hidden;\n transform: translateZ(0) scale(0.1);\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.hover.border.color"), ";\n}\n\n.p-radiobutton-checked .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.border.color"), ";\n background: ").concat(dt("radiobutton.checked.background"), ";\n}\n\n.p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.checked.color"), ";\n transform: translateZ(0) scale(1, 1);\n visibility: visible;\n}\n\n.p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:hover) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.hover.border.color"), ";\n background: ").concat(dt("radiobutton.checked.hover.background"), ";\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.checked.hover.color"), ";\n}\n\n.p-radiobutton:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.focus.border.color"), ";\n box-shadow: ").concat(dt("radiobutton.focus.ring.shadow"), ";\n outline: ").concat(dt("radiobutton.focus.ring.width"), " ").concat(dt("radiobutton.focus.ring.style"), " ").concat(dt("radiobutton.focus.ring.color"), ";\n outline-offset: ").concat(dt("radiobutton.focus.ring.offset"), ";\n}\n\n.p-radiobutton-checked:not(.p-disabled):has(.p-radiobutton-input:focus-visible) .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.checked.focus.border.color"), ";\n}\n\n.p-radiobutton.p-invalid > .p-radiobutton-box {\n border-color: ").concat(dt("radiobutton.invalid.border.color"), ";\n}\n\n.p-radiobutton.p-variant-filled .p-radiobutton-box {\n background: ").concat(dt("radiobutton.filled.background"), ";\n}\n\n.p-radiobutton.p-variant-filled.p-radiobutton-checked .p-radiobutton-box {\n background: ").concat(dt("radiobutton.checked.background"), ";\n}\n\n.p-radiobutton.p-variant-filled:not(.p-disabled):has(.p-radiobutton-input:hover).p-radiobutton-checked .p-radiobutton-box {\n background: ").concat(dt("radiobutton.checked.hover.background"), ";\n}\n\n.p-radiobutton.p-disabled {\n opacity: 1;\n}\n\n.p-radiobutton.p-disabled .p-radiobutton-box {\n background: ").concat(dt("radiobutton.disabled.background"), ";\n border-color: ").concat(dt("radiobutton.checked.disabled.border.color"), ";\n}\n\n.p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon {\n background: ").concat(dt("radiobutton.icon.disabled.color"), ";\n}\n"); -}, "theme"); -var classes = { - root: /* @__PURE__ */ __name(function root2(_ref2) { - var instance = _ref2.instance, props = _ref2.props; - return ["p-radiobutton p-component", { - "p-radiobutton-checked": instance.checked, - "p-disabled": props.disabled, - "p-invalid": props.invalid, - "p-variant-filled": props.variant ? props.variant === "filled" : instance.$primevue.config.inputStyle === "filled" || instance.$primevue.config.inputVariant === "filled" - }]; - }, "root"), - box: "p-radiobutton-box", - input: "p-radiobutton-input", - icon: "p-radiobutton-icon" -}; -var RadioButtonStyle = BaseStyle.extend({ - name: "radiobutton", - theme: theme3, - classes -}); -var script$1$1 = { - name: "BaseRadioButton", - "extends": script$s, - props: { - value: null, - modelValue: null, - binary: Boolean, - name: { - type: String, - "default": null - }, - variant: { - type: String, - "default": null - }, - invalid: { - type: Boolean, - "default": false - }, - disabled: { - type: Boolean, - "default": false - }, - readonly: { - type: Boolean, - "default": false - }, - tabindex: { - type: Number, - "default": null - }, - inputId: { - type: String, - "default": null - }, - inputClass: { - type: [String, Object], - "default": null - }, - inputStyle: { - type: Object, - "default": null - }, - ariaLabelledby: { - type: String, - "default": null - }, - ariaLabel: { - type: String, - "default": null - } - }, - style: RadioButtonStyle, - provide: /* @__PURE__ */ __name(function provide3() { - return { - $pcRadioButton: this, - $parentInstance: this - }; - }, "provide") -}; -var script$j = { - name: "RadioButton", - "extends": script$1$1, - inheritAttrs: false, - emits: ["update:modelValue", "change", "focus", "blur"], - methods: { - getPTOptions: /* @__PURE__ */ __name(function getPTOptions6(key) { - var _ptm = key === "root" ? this.ptmi : this.ptm; - return _ptm(key, { - context: { - checked: this.checked, - disabled: this.disabled - } - }); - }, "getPTOptions"), - onChange: /* @__PURE__ */ __name(function onChange4(event2) { - if (!this.disabled && !this.readonly) { - var newModelValue = this.binary ? !this.checked : this.value; - this.$emit("update:modelValue", newModelValue); - this.$emit("change", event2); - } - }, "onChange"), - onFocus: /* @__PURE__ */ __name(function onFocus(event2) { - this.$emit("focus", event2); - }, "onFocus"), - onBlur: /* @__PURE__ */ __name(function onBlur(event2) { - this.$emit("blur", event2); - }, "onBlur") - }, - computed: { - checked: /* @__PURE__ */ __name(function checked() { - return this.modelValue != null && (this.binary ? !!this.modelValue : equals(this.modelValue, this.value)); - }, "checked") - } -}; -var _hoisted_1$b = ["data-p-checked", "data-p-disabled"]; -var _hoisted_2$9 = ["id", "value", "name", "checked", "tabindex", "disabled", "readonly", "aria-labelledby", "aria-label", "aria-invalid"]; -function render$i(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root") - }, $options.getPTOptions("root"), { - "data-p-checked": $options.checked, - "data-p-disabled": _ctx.disabled - }), [createBaseVNode("input", mergeProps({ - id: _ctx.inputId, - type: "radio", - "class": [_ctx.cx("input"), _ctx.inputClass], - style: _ctx.inputStyle, - value: _ctx.value, - name: _ctx.name, - checked: $options.checked, - tabindex: _ctx.tabindex, - disabled: _ctx.disabled, - readonly: _ctx.readonly, - "aria-labelledby": _ctx.ariaLabelledby, - "aria-label": _ctx.ariaLabel, - "aria-invalid": _ctx.invalid || void 0, - onFocus: _cache[0] || (_cache[0] = function() { - return $options.onFocus && $options.onFocus.apply($options, arguments); - }), - onBlur: _cache[1] || (_cache[1] = function() { - return $options.onBlur && $options.onBlur.apply($options, arguments); - }), - onChange: _cache[2] || (_cache[2] = function() { - return $options.onChange && $options.onChange.apply($options, arguments); - }) - }, $options.getPTOptions("input")), null, 16, _hoisted_2$9), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("box") - }, $options.getPTOptions("box")), [createBaseVNode("div", mergeProps({ - "class": _ctx.cx("icon") - }, $options.getPTOptions("icon")), null, 16)], 16)], 16, _hoisted_1$b); -} -__name(render$i, "render$i"); -script$j.render = render$i; -var script$i = { - name: "FilterIcon", - "extends": script$t -}; -var _hoisted_1$a = /* @__PURE__ */ createBaseVNode("path", { - d: "M8.64708 14H5.35296C5.18981 13.9979 5.03395 13.9321 4.91858 13.8167C4.8032 13.7014 4.73745 13.5455 4.73531 13.3824V7L0.329431 0.98C0.259794 0.889466 0.217389 0.780968 0.20718 0.667208C0.19697 0.553448 0.219379 0.439133 0.271783 0.337647C0.324282 0.236453 0.403423 0.151519 0.500663 0.0920138C0.597903 0.0325088 0.709548 0.000692754 0.823548 0H13.1765C13.2905 0.000692754 13.4021 0.0325088 13.4994 0.0920138C13.5966 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7826 0.780968 13.7402 0.889466 13.6706 0.98L9.26472 7V13.3824C9.26259 13.5455 9.19683 13.7014 9.08146 13.8167C8.96609 13.9321 8.81022 13.9979 8.64708 14ZM5.97061 12.7647H8.02943V6.79412C8.02878 6.66289 8.07229 6.53527 8.15296 6.43177L11.9412 1.23529H2.05884L5.86355 6.43177C5.94422 6.53527 5.98773 6.66289 5.98708 6.79412L5.97061 12.7647Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$8 = [_hoisted_1$a]; -function render$h(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$8, 16); -} -__name(render$h, "render$h"); -script$i.render = render$h; -var script$h = { - name: "FilterSlashIcon", - "extends": script$t -}; -var _hoisted_1$9 = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M13.4994 0.0920138C13.5967 0.151519 13.6758 0.236453 13.7283 0.337647C13.7807 0.439133 13.8031 0.553448 13.7929 0.667208C13.7827 0.780968 13.7403 0.889466 13.6707 0.98L11.406 4.06823C11.3099 4.19928 11.1656 4.28679 11.005 4.3115C10.8444 4.33621 10.6805 4.2961 10.5495 4.2C10.4184 4.1039 10.3309 3.95967 10.3062 3.79905C10.2815 3.63843 10.3216 3.47458 10.4177 3.34353L11.9412 1.23529H7.41184C7.24803 1.23529 7.09093 1.17022 6.97509 1.05439C6.85926 0.938558 6.79419 0.781457 6.79419 0.617647C6.79419 0.453837 6.85926 0.296736 6.97509 0.180905C7.09093 0.0650733 7.24803 0 7.41184 0H13.1765C13.2905 0.000692754 13.4022 0.0325088 13.4994 0.0920138ZM4.20008 0.181168H4.24126L13.2013 9.03411C13.3169 9.14992 13.3819 9.3069 13.3819 9.47058C13.3819 9.63426 13.3169 9.79124 13.2013 9.90705C13.1445 9.96517 13.0766 10.0112 13.0016 10.0423C12.9266 10.0735 12.846 10.0891 12.7648 10.0882C12.6836 10.0886 12.6032 10.0728 12.5283 10.0417C12.4533 10.0106 12.3853 9.96479 12.3283 9.90705L9.3142 6.92587L9.26479 6.99999V13.3823C9.26265 13.5455 9.19689 13.7014 9.08152 13.8167C8.96615 13.9321 8.81029 13.9979 8.64714 14H5.35302C5.18987 13.9979 5.03401 13.9321 4.91864 13.8167C4.80327 13.7014 4.73751 13.5455 4.73537 13.3823V6.99999L0.329492 1.02117C0.259855 0.930634 0.21745 0.822137 0.207241 0.708376C0.197031 0.594616 0.21944 0.480301 0.271844 0.378815C0.324343 0.277621 0.403484 0.192687 0.500724 0.133182C0.597964 0.073677 0.709609 0.041861 0.823609 0.0411682H3.86243C3.92448 0.0461551 3.9855 0.060022 4.04361 0.0823446C4.10037 0.10735 4.15311 0.140655 4.20008 0.181168ZM8.02949 6.79411C8.02884 6.66289 8.07235 6.53526 8.15302 6.43176L8.42478 6.05293L3.55773 1.23529H2.0589L5.84714 6.43176C5.92781 6.53526 5.97132 6.66289 5.97067 6.79411V12.7647H8.02949V6.79411Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$7 = [_hoisted_1$9]; -function render$g(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$7, 16); -} -__name(render$g, "render$g"); -script$h.render = render$g; -var script$g = { - name: "TrashIcon", - "extends": script$t -}; -var _hoisted_1$8 = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M3.44802 13.9955H10.552C10.8056 14.0129 11.06 13.9797 11.3006 13.898C11.5412 13.8163 11.7632 13.6877 11.9537 13.5196C12.1442 13.3515 12.2995 13.1473 12.4104 12.9188C12.5213 12.6903 12.5858 12.442 12.6 12.1884V4.36041H13.4C13.5591 4.36041 13.7117 4.29722 13.8243 4.18476C13.9368 4.07229 14 3.91976 14 3.76071C14 3.60166 13.9368 3.44912 13.8243 3.33666C13.7117 3.22419 13.5591 3.16101 13.4 3.16101H12.0537C12.0203 3.1557 11.9863 3.15299 11.952 3.15299C11.9178 3.15299 11.8838 3.1557 11.8503 3.16101H11.2285C11.2421 3.10893 11.2487 3.05513 11.248 3.00106V1.80966C11.2171 1.30262 10.9871 0.828306 10.608 0.48989C10.229 0.151475 9.73159 -0.0236625 9.22402 0.00257442H4.77602C4.27251 -0.0171866 3.78126 0.160868 3.40746 0.498617C3.03365 0.836366 2.807 1.30697 2.77602 1.80966V3.00106C2.77602 3.0556 2.78346 3.10936 2.79776 3.16101H0.6C0.521207 3.16101 0.443185 3.17652 0.37039 3.20666C0.297595 3.2368 0.231451 3.28097 0.175736 3.33666C0.120021 3.39235 0.0758251 3.45846 0.0456722 3.53121C0.0155194 3.60397 0 3.68196 0 3.76071C0 3.83946 0.0155194 3.91744 0.0456722 3.9902C0.0758251 4.06296 0.120021 4.12907 0.175736 4.18476C0.231451 4.24045 0.297595 4.28462 0.37039 4.31476C0.443185 4.3449 0.521207 4.36041 0.6 4.36041H1.40002V12.1884C1.41426 12.442 1.47871 12.6903 1.58965 12.9188C1.7006 13.1473 1.85582 13.3515 2.04633 13.5196C2.23683 13.6877 2.45882 13.8163 2.69944 13.898C2.94005 13.9797 3.1945 14.0129 3.44802 13.9955ZM2.60002 4.36041H11.304V12.1884C11.304 12.5163 10.952 12.7961 10.504 12.7961H3.40002C2.97602 12.7961 2.60002 12.5163 2.60002 12.1884V4.36041ZM3.95429 3.16101C3.96859 3.10936 3.97602 3.0556 3.97602 3.00106V1.80966C3.97602 1.48183 4.33602 1.20197 4.77602 1.20197H9.24802C9.66403 1.20197 10.048 1.48183 10.048 1.80966V3.00106C10.0473 3.05515 10.054 3.10896 10.0678 3.16101H3.95429ZM5.57571 10.997C5.41731 10.995 5.26597 10.9311 5.15395 10.8191C5.04193 10.7071 4.97808 10.5558 4.97601 10.3973V6.77517C4.97601 6.61612 5.0392 6.46359 5.15166 6.35112C5.26413 6.23866 5.41666 6.17548 5.57571 6.17548C5.73476 6.17548 5.8873 6.23866 5.99976 6.35112C6.11223 6.46359 6.17541 6.61612 6.17541 6.77517V10.3894C6.17647 10.4688 6.16174 10.5476 6.13208 10.6213C6.10241 10.695 6.05841 10.762 6.00261 10.8186C5.94682 10.8751 5.88035 10.92 5.80707 10.9506C5.73378 10.9813 5.65514 10.9971 5.57571 10.997ZM7.99968 10.8214C8.11215 10.9339 8.26468 10.997 8.42373 10.997C8.58351 10.9949 8.73604 10.93 8.84828 10.8163C8.96052 10.7025 9.02345 10.5491 9.02343 10.3894V6.77517C9.02343 6.61612 8.96025 6.46359 8.84778 6.35112C8.73532 6.23866 8.58278 6.17548 8.42373 6.17548C8.26468 6.17548 8.11215 6.23866 7.99968 6.35112C7.88722 6.46359 7.82404 6.61612 7.82404 6.77517V10.3973C7.82404 10.5564 7.88722 10.7089 7.99968 10.8214Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$6 = [_hoisted_1$8]; -function render$f(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$6, 16); -} -__name(render$f, "render$f"); -script$g.render = render$f; -var script$f = { - name: "SortAltIcon", - "extends": script$t -}; -var _hoisted_1$7 = /* @__PURE__ */ createBaseVNode("path", { - d: "M5.64515 3.61291C5.47353 3.61291 5.30192 3.54968 5.16644 3.4142L3.38708 1.63484L1.60773 3.4142C1.34579 3.67613 0.912244 3.67613 0.650309 3.4142C0.388374 3.15226 0.388374 2.71871 0.650309 2.45678L2.90837 0.198712C3.17031 -0.0632236 3.60386 -0.0632236 3.86579 0.198712L6.12386 2.45678C6.38579 2.71871 6.38579 3.15226 6.12386 3.4142C5.98837 3.54968 5.81676 3.61291 5.64515 3.61291Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$5 = /* @__PURE__ */ createBaseVNode("path", { - d: "M3.38714 14C3.01681 14 2.70972 13.6929 2.70972 13.3226V0.677419C2.70972 0.307097 3.01681 0 3.38714 0C3.75746 0 4.06456 0.307097 4.06456 0.677419V13.3226C4.06456 13.6929 3.75746 14 3.38714 14Z", - fill: "currentColor" -}, null, -1); -var _hoisted_3$1 = /* @__PURE__ */ createBaseVNode("path", { - d: "M10.6129 14C10.4413 14 10.2697 13.9368 10.1342 13.8013L7.87611 11.5432C7.61418 11.2813 7.61418 10.8477 7.87611 10.5858C8.13805 10.3239 8.5716 10.3239 8.83353 10.5858L10.6129 12.3652L12.3922 10.5858C12.6542 10.3239 13.0877 10.3239 13.3497 10.5858C13.6116 10.8477 13.6116 11.2813 13.3497 11.5432L11.0916 13.8013C10.9561 13.9368 10.7845 14 10.6129 14Z", - fill: "currentColor" -}, null, -1); -var _hoisted_4$1 = /* @__PURE__ */ createBaseVNode("path", { - d: "M10.6129 14C10.2426 14 9.93552 13.6929 9.93552 13.3226V0.677419C9.93552 0.307097 10.2426 0 10.6129 0C10.9833 0 11.2904 0.307097 11.2904 0.677419V13.3226C11.2904 13.6929 10.9832 14 10.6129 14Z", - fill: "currentColor" -}, null, -1); -var _hoisted_5$1 = [_hoisted_1$7, _hoisted_2$5, _hoisted_3$1, _hoisted_4$1]; -function render$e(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_5$1, 16); -} -__name(render$e, "render$e"); -script$f.render = render$e; -var script$e = { - name: "SortAmountDownIcon", - "extends": script$t -}; -var _hoisted_1$6 = /* @__PURE__ */ createBaseVNode("path", { - d: "M4.93953 10.5858L3.83759 11.6877V0.677419C3.83759 0.307097 3.53049 0 3.16017 0C2.78985 0 2.48275 0.307097 2.48275 0.677419V11.6877L1.38082 10.5858C1.11888 10.3239 0.685331 10.3239 0.423396 10.5858C0.16146 10.8477 0.16146 11.2813 0.423396 11.5432L2.68146 13.8013C2.74469 13.8645 2.81694 13.9097 2.89823 13.9458C2.97952 13.9819 3.06985 14 3.16017 14C3.25049 14 3.33178 13.9819 3.42211 13.9458C3.5034 13.9097 3.57565 13.8645 3.63888 13.8013L5.89694 11.5432C6.15888 11.2813 6.15888 10.8477 5.89694 10.5858C5.63501 10.3239 5.20146 10.3239 4.93953 10.5858ZM13.0957 0H7.22468C6.85436 0 6.54726 0.307097 6.54726 0.677419C6.54726 1.04774 6.85436 1.35484 7.22468 1.35484H13.0957C13.466 1.35484 13.7731 1.04774 13.7731 0.677419C13.7731 0.307097 13.466 0 13.0957 0ZM7.22468 5.41935H9.48275C9.85307 5.41935 10.1602 5.72645 10.1602 6.09677C10.1602 6.4671 9.85307 6.77419 9.48275 6.77419H7.22468C6.85436 6.77419 6.54726 6.4671 6.54726 6.09677C6.54726 5.72645 6.85436 5.41935 7.22468 5.41935ZM7.6763 8.12903H7.22468C6.85436 8.12903 6.54726 8.43613 6.54726 8.80645C6.54726 9.17677 6.85436 9.48387 7.22468 9.48387H7.6763C8.04662 9.48387 8.35372 9.17677 8.35372 8.80645C8.35372 8.43613 8.04662 8.12903 7.6763 8.12903ZM7.22468 2.70968H11.2892C11.6595 2.70968 11.9666 3.01677 11.9666 3.3871C11.9666 3.75742 11.6595 4.06452 11.2892 4.06452H7.22468C6.85436 4.06452 6.54726 3.75742 6.54726 3.3871C6.54726 3.01677 6.85436 2.70968 7.22468 2.70968Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$4 = [_hoisted_1$6]; -function render$d(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$4, 16); -} -__name(render$d, "render$d"); -script$e.render = render$d; -var script$d = { - name: "SortAmountUpAltIcon", - "extends": script$t -}; -var _hoisted_1$5 = /* @__PURE__ */ createBaseVNode("path", { - d: "M3.63435 0.19871C3.57113 0.135484 3.49887 0.0903226 3.41758 0.0541935C3.255 -0.0180645 3.06532 -0.0180645 2.90274 0.0541935C2.82145 0.0903226 2.74919 0.135484 2.68597 0.19871L0.427901 2.45677C0.165965 2.71871 0.165965 3.15226 0.427901 3.41419C0.689836 3.67613 1.12338 3.67613 1.38532 3.41419L2.48726 2.31226V13.3226C2.48726 13.6929 2.79435 14 3.16467 14C3.535 14 3.84209 13.6929 3.84209 13.3226V2.31226L4.94403 3.41419C5.07951 3.54968 5.25113 3.6129 5.42274 3.6129C5.59435 3.6129 5.76597 3.54968 5.90145 3.41419C6.16338 3.15226 6.16338 2.71871 5.90145 2.45677L3.64338 0.19871H3.63435ZM13.7685 13.3226C13.7685 12.9523 13.4615 12.6452 13.0911 12.6452H7.22016C6.84984 12.6452 6.54274 12.9523 6.54274 13.3226C6.54274 13.6929 6.84984 14 7.22016 14H13.0911C13.4615 14 13.7685 13.6929 13.7685 13.3226ZM7.22016 8.58064C6.84984 8.58064 6.54274 8.27355 6.54274 7.90323C6.54274 7.5329 6.84984 7.22581 7.22016 7.22581H9.47823C9.84855 7.22581 10.1556 7.5329 10.1556 7.90323C10.1556 8.27355 9.84855 8.58064 9.47823 8.58064H7.22016ZM7.22016 5.87097H7.67177C8.0421 5.87097 8.34919 5.56387 8.34919 5.19355C8.34919 4.82323 8.0421 4.51613 7.67177 4.51613H7.22016C6.84984 4.51613 6.54274 4.82323 6.54274 5.19355C6.54274 5.56387 6.84984 5.87097 7.22016 5.87097ZM11.2847 11.2903H7.22016C6.84984 11.2903 6.54274 10.9832 6.54274 10.6129C6.54274 10.2426 6.84984 9.93548 7.22016 9.93548H11.2847C11.655 9.93548 11.9621 10.2426 11.9621 10.6129C11.9621 10.9832 11.655 11.2903 11.2847 11.2903Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2$3 = [_hoisted_1$5]; -function render$c(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2$3, 16); -} -__name(render$c, "render$c"); -script$d.render = render$c; -var script$c = { - name: "BaseDataTable", - "extends": script$s, - props: { - value: { - type: Array, - "default": null - }, - dataKey: { - type: [String, Function], - "default": null - }, - rows: { - type: Number, - "default": 0 - }, - first: { - type: Number, - "default": 0 - }, - totalRecords: { - type: Number, - "default": 0 - }, - paginator: { - type: Boolean, - "default": false - }, - paginatorPosition: { - type: String, - "default": "bottom" - }, - alwaysShowPaginator: { - type: Boolean, - "default": true - }, - paginatorTemplate: { - type: [Object, String], - "default": "FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown" - }, - pageLinkSize: { - type: Number, - "default": 5 - }, - rowsPerPageOptions: { - type: Array, - "default": null - }, - currentPageReportTemplate: { - type: String, - "default": "({currentPage} of {totalPages})" - }, - lazy: { - type: Boolean, - "default": false - }, - loading: { - type: Boolean, - "default": false - }, - loadingIcon: { - type: String, - "default": void 0 - }, - sortField: { - type: [String, Function], - "default": null - }, - sortOrder: { - type: Number, - "default": null - }, - defaultSortOrder: { - type: Number, - "default": 1 - }, - nullSortOrder: { - type: Number, - "default": 1 - }, - multiSortMeta: { - type: Array, - "default": null - }, - sortMode: { - type: String, - "default": "single" - }, - removableSort: { - type: Boolean, - "default": false - }, - filters: { - type: Object, - "default": null - }, - filterDisplay: { - type: String, - "default": null - }, - globalFilterFields: { - type: Array, - "default": null - }, - filterLocale: { - type: String, - "default": void 0 - }, - selection: { - type: [Array, Object], - "default": null - }, - selectionMode: { - type: String, - "default": null - }, - compareSelectionBy: { - type: String, - "default": "deepEquals" - }, - metaKeySelection: { - type: Boolean, - "default": false - }, - contextMenu: { - type: Boolean, - "default": false - }, - contextMenuSelection: { - type: Object, - "default": null - }, - selectAll: { - type: Boolean, - "default": null - }, - rowHover: { - type: Boolean, - "default": false - }, - csvSeparator: { - type: String, - "default": "," - }, - exportFilename: { - type: String, - "default": "download" - }, - exportFunction: { - type: Function, - "default": null - }, - resizableColumns: { - type: Boolean, - "default": false - }, - columnResizeMode: { - type: String, - "default": "fit" - }, - reorderableColumns: { - type: Boolean, - "default": false - }, - expandedRows: { - type: [Array, Object], - "default": null - }, - expandedRowIcon: { - type: String, - "default": void 0 - }, - collapsedRowIcon: { - type: String, - "default": void 0 - }, - rowGroupMode: { - type: String, - "default": null - }, - groupRowsBy: { - type: [Array, String, Function], - "default": null - }, - expandableRowGroups: { - type: Boolean, - "default": false - }, - expandedRowGroups: { - type: Array, - "default": null - }, - stateStorage: { - type: String, - "default": "session" - }, - stateKey: { - type: String, - "default": null - }, - editMode: { - type: String, - "default": null - }, - editingRows: { - type: Array, - "default": null - }, - rowClass: { - type: Function, - "default": null - }, - rowStyle: { - type: Function, - "default": null - }, - scrollable: { - type: Boolean, - "default": false - }, - virtualScrollerOptions: { - type: Object, - "default": null - }, - scrollHeight: { - type: String, - "default": null - }, - frozenValue: { - type: Array, - "default": null - }, - breakpoint: { - type: String, - "default": "960px" - }, - showGridlines: { - type: Boolean, - "default": false - }, - stripedRows: { - type: Boolean, - "default": false - }, - highlightOnSelect: { - type: Boolean, - "default": false - }, - size: { - type: String, - "default": null - }, - tableStyle: { - type: null, - "default": null - }, - tableClass: { - type: [String, Object], - "default": null - }, - tableProps: { - type: Object, - "default": null - }, - filterInputProps: { - type: null, - "default": null - }, - filterButtonProps: { - type: Object, - "default": /* @__PURE__ */ __name(function _default2() { - return { - filter: { - severity: "secondary", - text: true, - rounded: true - }, - inline: { - clear: { - severity: "secondary", - text: true, - rounded: true - } - }, - popover: { - addRule: { - severity: "info", - text: true, - size: "small" - }, - removeRule: { - severity: "danger", - text: true, - size: "small" - }, - apply: { - size: "small" - }, - clear: { - outlined: true, - size: "small" - } - } - }; - }, "_default") - }, - editButtonProps: { - type: Object, - "default": /* @__PURE__ */ __name(function _default3() { - return { - init: { - severity: "secondary", - text: true, - rounded: true - }, - save: { - severity: "secondary", - text: true, - rounded: true - }, - cancel: { - severity: "secondary", - text: true, - rounded: true - } - }; - }, "_default") - } - }, - style: DataTableStyle, - provide: /* @__PURE__ */ __name(function provide4() { - return { - $pcDataTable: this, - $parentInstance: this - }; - }, "provide") -}; -var script$b = { - name: "RowCheckbox", - hostName: "DataTable", - "extends": script$s, - emits: ["change"], - props: { - value: null, - checked: null, - column: null, - rowCheckboxIconTemplate: { - type: Function, - "default": null - }, - index: { - type: Number, - "default": null - } - }, - methods: { - getColumnPT: /* @__PURE__ */ __name(function getColumnPT(key) { - var columnMetaData = { - props: this.column.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - index: this.index, - checked: this.checked, - disabled: this.$attrs.disabled - } - }; - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); - }, "getColumnPT"), - getColumnProp: /* @__PURE__ */ __name(function getColumnProp() { - return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; - }, "getColumnProp"), - onChange: /* @__PURE__ */ __name(function onChange5(event2) { - if (!this.$attrs.disabled) { - this.$emit("change", { - originalEvent: event2, - data: this.value - }); - } - }, "onChange") - }, - computed: { - checkboxAriaLabel: /* @__PURE__ */ __name(function checkboxAriaLabel() { - return this.$primevue.config.locale.aria ? this.checked ? this.$primevue.config.locale.aria.selectRow : this.$primevue.config.locale.aria.unselectRow : void 0; - }, "checkboxAriaLabel") - }, - components: { - CheckIcon: script$x, - Checkbox: script$y - } -}; -function render$b(_ctx, _cache, $props, $setup, $data, $options) { - var _component_CheckIcon = resolveComponent("CheckIcon"); - var _component_Checkbox = resolveComponent("Checkbox"); - return openBlock(), createBlock(_component_Checkbox, { - modelValue: $props.checked, - binary: true, - disabled: _ctx.$attrs.disabled, - "aria-label": $options.checkboxAriaLabel, - onChange: $options.onChange, - unstyled: _ctx.unstyled, - pt: $options.getColumnPT("pcRowCheckbox") - }, { - icon: withCtx(function(slotProps) { - return [$props.rowCheckboxIconTemplate ? (openBlock(), createBlock(resolveDynamicComponent($props.rowCheckboxIconTemplate), { - key: 0, - checked: slotProps.checked, - "class": normalizeClass(slotProps["class"]) - }, null, 8, ["checked", "class"])) : !$props.rowCheckboxIconTemplate && slotProps.checked ? (openBlock(), createBlock(_component_CheckIcon, mergeProps({ - key: 1, - "class": slotProps["class"] - }, $options.getColumnPT("pcRowCheckbox")["icon"]), null, 16, ["class"])) : createCommentVNode("", true)]; - }), - _: 1 - }, 8, ["modelValue", "disabled", "aria-label", "onChange", "unstyled", "pt"]); -} -__name(render$b, "render$b"); -script$b.render = render$b; -var script$a = { - name: "RowRadioButton", - hostName: "DataTable", - "extends": script$s, - emits: ["change"], - props: { - value: null, - checked: null, - name: null, - column: null, - index: { - type: Number, - "default": null - } - }, - methods: { - getColumnPT: /* @__PURE__ */ __name(function getColumnPT2(key) { - var columnMetaData = { - props: this.column.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - index: this.index, - checked: this.checked, - disabled: this.$attrs.disabled - } - }; - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); - }, "getColumnPT"), - getColumnProp: /* @__PURE__ */ __name(function getColumnProp2() { - return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; - }, "getColumnProp"), - onChange: /* @__PURE__ */ __name(function onChange6(event2) { - if (!this.$attrs.disabled) { - this.$emit("change", { - originalEvent: event2, - data: this.value - }); - } - }, "onChange") - }, - components: { - RadioButton: script$j - } -}; -function render$a(_ctx, _cache, $props, $setup, $data, $options) { - var _component_RadioButton = resolveComponent("RadioButton"); - return openBlock(), createBlock(_component_RadioButton, { - modelValue: $props.checked, - binary: true, - disabled: _ctx.$attrs.disabled, - name: $props.name, - onChange: $options.onChange, - unstyled: _ctx.unstyled, - pt: $options.getColumnPT("pcRowRadiobutton") - }, null, 8, ["modelValue", "disabled", "name", "onChange", "unstyled", "pt"]); -} -__name(render$a, "render$a"); -script$a.render = render$a; -var script$9 = { - name: "BodyCell", - hostName: "DataTable", - "extends": script$s, - emits: ["cell-edit-init", "cell-edit-complete", "cell-edit-cancel", "row-edit-init", "row-edit-save", "row-edit-cancel", "row-toggle", "radio-change", "checkbox-change", "editing-meta-change"], - props: { - rowData: { - type: Object, - "default": null - }, - column: { - type: Object, - "default": null - }, - frozenRow: { - type: Boolean, - "default": false - }, - rowIndex: { - type: Number, - "default": null - }, - index: { - type: Number, - "default": null - }, - isRowExpanded: { - type: Boolean, - "default": false - }, - selected: { - type: Boolean, - "default": false - }, - editing: { - type: Boolean, - "default": false - }, - editingMeta: { - type: Object, - "default": null - }, - editMode: { - type: String, - "default": null - }, - virtualScrollerContentProps: { - type: Object, - "default": null - }, - ariaControls: { - type: String, - "default": null - }, - name: { - type: String, - "default": null - }, - expandedRowIcon: { - type: String, - "default": null - }, - collapsedRowIcon: { - type: String, - "default": null - }, - editButtonProps: { - type: Object, - "default": null - } - }, - documentEditListener: null, - selfClick: false, - overlayEventListener: null, - data: /* @__PURE__ */ __name(function data3() { - return { - d_editing: this.editing, - styleObject: {} - }; - }, "data"), - watch: { - editing: /* @__PURE__ */ __name(function editing(newValue) { - this.d_editing = newValue; - }, "editing"), - "$data.d_editing": /* @__PURE__ */ __name(function $dataD_editing(newValue) { - this.$emit("editing-meta-change", { - data: this.rowData, - field: this.field || "field_".concat(this.index), - index: this.rowIndex, - editing: newValue - }); - }, "$dataD_editing") - }, - mounted: /* @__PURE__ */ __name(function mounted3() { - if (this.columnProp("frozen")) { - this.updateStickyPosition(); - } - }, "mounted"), - updated: /* @__PURE__ */ __name(function updated() { - var _this = this; - if (this.columnProp("frozen")) { - this.updateStickyPosition(); - } - if (this.d_editing && (this.editMode === "cell" || this.editMode === "row" && this.columnProp("rowEditor"))) { - setTimeout(function() { - var focusableEl = getFirstFocusableElement(_this.$el); - focusableEl && focusableEl.focus(); - }, 1); - } - }, "updated"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount() { - if (this.overlayEventListener) { - OverlayEventBus.off("overlay-click", this.overlayEventListener); - this.overlayEventListener = null; - } - }, "beforeUnmount"), - methods: { - columnProp: /* @__PURE__ */ __name(function columnProp(prop) { - return getVNodeProp(this.column, prop); - }, "columnProp"), - getColumnPT: /* @__PURE__ */ __name(function getColumnPT3(key) { - var _this$$parentInstance, _this$$parentInstance2; - var columnMetaData = { - props: this.column.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - index: this.index, - size: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 || (_this$$parentInstance = _this$$parentInstance.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.size, - showGridlines: (_this$$parentInstance2 = this.$parentInstance) === null || _this$$parentInstance2 === void 0 || (_this$$parentInstance2 = _this$$parentInstance2.$parentInstance) === null || _this$$parentInstance2 === void 0 ? void 0 : _this$$parentInstance2.showGridlines - } - }; - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); - }, "getColumnPT"), - getColumnProp: /* @__PURE__ */ __name(function getColumnProp3() { - return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; - }, "getColumnProp"), - resolveFieldData: /* @__PURE__ */ __name(function resolveFieldData$1() { - return resolveFieldData(this.rowData, this.field); - }, "resolveFieldData$1"), - toggleRow: /* @__PURE__ */ __name(function toggleRow(event2) { - this.$emit("row-toggle", { - originalEvent: event2, - data: this.rowData - }); - }, "toggleRow"), - toggleRowWithRadio: /* @__PURE__ */ __name(function toggleRowWithRadio(event2, index) { - this.$emit("radio-change", { - originalEvent: event2.originalEvent, - index, - data: event2.data - }); - }, "toggleRowWithRadio"), - toggleRowWithCheckbox: /* @__PURE__ */ __name(function toggleRowWithCheckbox(event2, index) { - this.$emit("checkbox-change", { - originalEvent: event2.originalEvent, - index, - data: event2.data - }); - }, "toggleRowWithCheckbox"), - isEditable: /* @__PURE__ */ __name(function isEditable() { - return this.column.children && this.column.children.editor != null; - }, "isEditable"), - bindDocumentEditListener: /* @__PURE__ */ __name(function bindDocumentEditListener() { - var _this2 = this; - if (!this.documentEditListener) { - this.documentEditListener = function(event2) { - if (!_this2.selfClick) { - _this2.completeEdit(event2, "outside"); - } - _this2.selfClick = false; - }; - document.addEventListener("click", this.documentEditListener); - } - }, "bindDocumentEditListener"), - unbindDocumentEditListener: /* @__PURE__ */ __name(function unbindDocumentEditListener() { - if (this.documentEditListener) { - document.removeEventListener("click", this.documentEditListener); - this.documentEditListener = null; - this.selfClick = false; - } - }, "unbindDocumentEditListener"), - switchCellToViewMode: /* @__PURE__ */ __name(function switchCellToViewMode() { - this.d_editing = false; - this.unbindDocumentEditListener(); - OverlayEventBus.off("overlay-click", this.overlayEventListener); - this.overlayEventListener = null; - }, "switchCellToViewMode"), - onClick: /* @__PURE__ */ __name(function onClick(event2) { - var _this3 = this; - if (this.editMode === "cell" && this.isEditable()) { - this.selfClick = true; - if (!this.d_editing) { - this.d_editing = true; - this.bindDocumentEditListener(); - this.$emit("cell-edit-init", { - originalEvent: event2, - data: this.rowData, - field: this.field, - index: this.rowIndex - }); - this.overlayEventListener = function(e) { - if (_this3.$el && _this3.$el.contains(e.target)) { - _this3.selfClick = true; - } - }; - OverlayEventBus.on("overlay-click", this.overlayEventListener); - } - } - }, "onClick"), - completeEdit: /* @__PURE__ */ __name(function completeEdit(event2, type) { - var completeEvent = { - originalEvent: event2, - data: this.rowData, - newData: this.editingRowData, - value: this.rowData[this.field], - newValue: this.editingRowData[this.field], - field: this.field, - index: this.rowIndex, - type, - defaultPrevented: false, - preventDefault: /* @__PURE__ */ __name(function preventDefault() { - this.defaultPrevented = true; - }, "preventDefault") - }; - this.$emit("cell-edit-complete", completeEvent); - if (!completeEvent.defaultPrevented) { - this.switchCellToViewMode(); - } - }, "completeEdit"), - onKeyDown: /* @__PURE__ */ __name(function onKeyDown(event2) { - if (this.editMode === "cell") { - switch (event2.code) { - case "Enter": - case "NumpadEnter": - this.completeEdit(event2, "enter"); - break; - case "Escape": - this.switchCellToViewMode(); - this.$emit("cell-edit-cancel", { - originalEvent: event2, - data: this.rowData, - field: this.field, - index: this.rowIndex - }); - break; - case "Tab": - this.completeEdit(event2, "tab"); - if (event2.shiftKey) this.moveToPreviousCell(event2); - else this.moveToNextCell(event2); - break; - } - } - }, "onKeyDown"), - moveToPreviousCell: /* @__PURE__ */ __name(function moveToPreviousCell(event2) { - var currentCell = this.findCell(event2.target); - var targetCell = this.findPreviousEditableColumn(currentCell); - if (targetCell) { - invokeElementMethod(targetCell, "click"); - event2.preventDefault(); - } - }, "moveToPreviousCell"), - moveToNextCell: /* @__PURE__ */ __name(function moveToNextCell(event2) { - var currentCell = this.findCell(event2.target); - var targetCell = this.findNextEditableColumn(currentCell); - if (targetCell) { - invokeElementMethod(targetCell, "click"); - event2.preventDefault(); - } - }, "moveToNextCell"), - findCell: /* @__PURE__ */ __name(function findCell(element) { - if (element) { - var cell = element; - while (cell && !getAttribute(cell, "data-p-cell-editing")) { - cell = cell.parentElement; - } - return cell; - } else { - return null; - } - }, "findCell"), - findPreviousEditableColumn: /* @__PURE__ */ __name(function findPreviousEditableColumn(cell) { - var prevCell = cell.previousElementSibling; - if (!prevCell) { - var previousRow = cell.parentElement.previousElementSibling; - if (previousRow) { - prevCell = previousRow.lastElementChild; - } - } - if (prevCell) { - if (getAttribute(prevCell, "data-p-editable-column")) return prevCell; - else return this.findPreviousEditableColumn(prevCell); - } else { - return null; - } - }, "findPreviousEditableColumn"), - findNextEditableColumn: /* @__PURE__ */ __name(function findNextEditableColumn(cell) { - var nextCell = cell.nextElementSibling; - if (!nextCell) { - var nextRow = cell.parentElement.nextElementSibling; - if (nextRow) { - nextCell = nextRow.firstElementChild; - } - } - if (nextCell) { - if (getAttribute(nextCell, "data-p-editable-column")) return nextCell; - else return this.findNextEditableColumn(nextCell); - } else { - return null; - } - }, "findNextEditableColumn"), - onRowEditInit: /* @__PURE__ */ __name(function onRowEditInit(event2) { - this.$emit("row-edit-init", { - originalEvent: event2, - data: this.rowData, - newData: this.editingRowData, - field: this.field, - index: this.rowIndex - }); - }, "onRowEditInit"), - onRowEditSave: /* @__PURE__ */ __name(function onRowEditSave(event2) { - this.$emit("row-edit-save", { - originalEvent: event2, - data: this.rowData, - newData: this.editingRowData, - field: this.field, - index: this.rowIndex - }); - }, "onRowEditSave"), - onRowEditCancel: /* @__PURE__ */ __name(function onRowEditCancel(event2) { - this.$emit("row-edit-cancel", { - originalEvent: event2, - data: this.rowData, - newData: this.editingRowData, - field: this.field, - index: this.rowIndex - }); - }, "onRowEditCancel"), - editorInitCallback: /* @__PURE__ */ __name(function editorInitCallback(event2) { - this.$emit("row-edit-init", { - originalEvent: event2, - data: this.rowData, - newData: this.editingRowData, - field: this.field, - index: this.rowIndex - }); - }, "editorInitCallback"), - editorSaveCallback: /* @__PURE__ */ __name(function editorSaveCallback(event2) { - if (this.editMode === "row") { - this.$emit("row-edit-save", { - originalEvent: event2, - data: this.rowData, - newData: this.editingRowData, - field: this.field, - index: this.rowIndex - }); - } else { - this.completeEdit(event2, "enter"); - } - }, "editorSaveCallback"), - editorCancelCallback: /* @__PURE__ */ __name(function editorCancelCallback(event2) { - if (this.editMode === "row") { - this.$emit("row-edit-cancel", { - originalEvent: event2, - data: this.rowData, - newData: this.editingRowData, - field: this.field, - index: this.rowIndex - }); - } else { - this.switchCellToViewMode(); - this.$emit("cell-edit-cancel", { - originalEvent: event2, - data: this.rowData, - field: this.field, - index: this.rowIndex - }); - } - }, "editorCancelCallback"), - updateStickyPosition: /* @__PURE__ */ __name(function updateStickyPosition() { - if (this.columnProp("frozen")) { - var align = this.columnProp("alignFrozen"); - if (align === "right") { - var right = 0; - var next2 = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); - if (next2) { - right = getOuterWidth(next2) + parseFloat(next2.style.right || 0); - } - this.styleObject.right = right + "px"; - } else { - var left = 0; - var prev2 = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); - if (prev2) { - left = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); - } - this.styleObject.left = left + "px"; - } - } - }, "updateStickyPosition"), - getVirtualScrollerProp: /* @__PURE__ */ __name(function getVirtualScrollerProp(option) { - return this.virtualScrollerContentProps ? this.virtualScrollerContentProps[option] : null; - }, "getVirtualScrollerProp") - }, - computed: { - editingRowData: /* @__PURE__ */ __name(function editingRowData() { - return this.editingMeta[this.rowIndex] ? this.editingMeta[this.rowIndex].data : this.rowData; - }, "editingRowData"), - field: /* @__PURE__ */ __name(function field() { - return this.columnProp("field"); - }, "field"), - containerClass: /* @__PURE__ */ __name(function containerClass() { - return [this.columnProp("bodyClass"), this.columnProp("class"), this.cx("bodyCell")]; - }, "containerClass"), - containerStyle: /* @__PURE__ */ __name(function containerStyle() { - var bodyStyle = this.columnProp("bodyStyle"); - var columnStyle = this.columnProp("style"); - return this.columnProp("frozen") ? [columnStyle, bodyStyle, this.styleObject] : [columnStyle, bodyStyle]; - }, "containerStyle"), - loading: /* @__PURE__ */ __name(function loading() { - return this.getVirtualScrollerProp("loading"); - }, "loading"), - loadingOptions: /* @__PURE__ */ __name(function loadingOptions() { - var getLoaderOptions = this.getVirtualScrollerProp("getLoaderOptions"); - return getLoaderOptions && getLoaderOptions(this.rowIndex, { - cellIndex: this.index, - cellFirst: this.index === 0, - cellLast: this.index === this.getVirtualScrollerProp("columns").length - 1, - cellEven: this.index % 2 === 0, - cellOdd: this.index % 2 !== 0, - column: this.column, - field: this.field - }); - }, "loadingOptions"), - expandButtonAriaLabel: /* @__PURE__ */ __name(function expandButtonAriaLabel() { - return this.$primevue.config.locale.aria ? this.isRowExpanded ? this.$primevue.config.locale.aria.expandRow : this.$primevue.config.locale.aria.collapseRow : void 0; - }, "expandButtonAriaLabel"), - initButtonAriaLabel: /* @__PURE__ */ __name(function initButtonAriaLabel() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.editRow : void 0; - }, "initButtonAriaLabel"), - saveButtonAriaLabel: /* @__PURE__ */ __name(function saveButtonAriaLabel() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.saveEdit : void 0; - }, "saveButtonAriaLabel"), - cancelButtonAriaLabel: /* @__PURE__ */ __name(function cancelButtonAriaLabel() { - return this.$primevue.config.locale.aria ? this.$primevue.config.locale.aria.cancelEdit : void 0; - }, "cancelButtonAriaLabel") - }, - components: { - DTRadioButton: script$a, - DTCheckbox: script$b, - Button: script$z, - ChevronDownIcon: script$A, - ChevronRightIcon: script$B, - BarsIcon: script$C, - PencilIcon: script$k, - CheckIcon: script$x, - TimesIcon: script$D - }, - directives: { - ripple: Ripple - } -}; -function _typeof$a(o) { - "@babel/helpers - typeof"; - return _typeof$a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$a(o); -} -__name(_typeof$a, "_typeof$a"); -function ownKeys$a(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$a, "ownKeys$a"); -function _objectSpread$a(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$a(Object(t), true).forEach(function(r2) { - _defineProperty$a(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$a, "_objectSpread$a"); -function _defineProperty$a(e, r, t) { - return (r = _toPropertyKey$a(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$a, "_defineProperty$a"); -function _toPropertyKey$a(t) { - var i = _toPrimitive$a(t, "string"); - return "symbol" == _typeof$a(i) ? i : i + ""; -} -__name(_toPropertyKey$a, "_toPropertyKey$a"); -function _toPrimitive$a(t, r) { - if ("object" != _typeof$a(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$a(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$a, "_toPrimitive$a"); -var _hoisted_1$4 = ["colspan", "rowspan", "data-p-selection-column", "data-p-editable-column", "data-p-cell-editing", "data-p-frozen-column"]; -var _hoisted_2$2 = ["aria-expanded", "aria-controls", "aria-label"]; -function render$9(_ctx, _cache, $props, $setup, $data, $options) { - var _component_DTRadioButton = resolveComponent("DTRadioButton"); - var _component_DTCheckbox = resolveComponent("DTCheckbox"); - var _component_BarsIcon = resolveComponent("BarsIcon"); - var _component_ChevronDownIcon = resolveComponent("ChevronDownIcon"); - var _component_ChevronRightIcon = resolveComponent("ChevronRightIcon"); - var _component_Button = resolveComponent("Button"); - var _directive_ripple = resolveDirective("ripple"); - return $options.loading ? (openBlock(), createElementBlock("td", mergeProps({ - key: 0, - style: $options.containerStyle, - "class": $options.containerClass, - role: "cell" - }, _objectSpread$a(_objectSpread$a({}, $options.getColumnPT("root")), $options.getColumnPT("bodyCell"))), [(openBlock(), createBlock(resolveDynamicComponent($props.column.children.loading), { - data: $props.rowData, - column: $props.column, - field: $options.field, - index: $props.rowIndex, - frozenRow: $props.frozenRow, - loadingOptions: $options.loadingOptions - }, null, 8, ["data", "column", "field", "index", "frozenRow", "loadingOptions"]))], 16)) : (openBlock(), createElementBlock("td", mergeProps({ - key: 1, - style: $options.containerStyle, - "class": $options.containerClass, - colspan: $options.columnProp("colspan"), - rowspan: $options.columnProp("rowspan"), - onClick: _cache[3] || (_cache[3] = function() { - return $options.onClick && $options.onClick.apply($options, arguments); - }), - onKeydown: _cache[4] || (_cache[4] = function() { - return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); - }), - role: "cell" - }, _objectSpread$a(_objectSpread$a({}, $options.getColumnPT("root")), $options.getColumnPT("bodyCell")), { - "data-p-selection-column": $options.columnProp("selectionMode") != null, - "data-p-editable-column": $options.isEditable(), - "data-p-cell-editing": $data.d_editing, - "data-p-frozen-column": $options.columnProp("frozen") - }), [$props.column.children && $props.column.children.body && !$data.d_editing ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.body), { - key: 0, - data: $props.rowData, - column: $props.column, - field: $options.field, - index: $props.rowIndex, - frozenRow: $props.frozenRow, - editorInitCallback: $options.editorInitCallback, - rowTogglerCallback: $options.toggleRow - }, null, 8, ["data", "column", "field", "index", "frozenRow", "editorInitCallback", "rowTogglerCallback"])) : $props.column.children && $props.column.children.editor && $data.d_editing ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.editor), { - key: 1, - data: $options.editingRowData, - column: $props.column, - field: $options.field, - index: $props.rowIndex, - frozenRow: $props.frozenRow, - editorSaveCallback: $options.editorSaveCallback, - editorCancelCallback: $options.editorCancelCallback - }, null, 8, ["data", "column", "field", "index", "frozenRow", "editorSaveCallback", "editorCancelCallback"])) : $props.column.children && $props.column.children.body && !$props.column.children.editor && $data.d_editing ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.body), { - key: 2, - data: $options.editingRowData, - column: $props.column, - field: $options.field, - index: $props.rowIndex, - frozenRow: $props.frozenRow - }, null, 8, ["data", "column", "field", "index", "frozenRow"])) : $options.columnProp("selectionMode") ? (openBlock(), createElementBlock(Fragment, { - key: 3 - }, [$options.columnProp("selectionMode") === "single" ? (openBlock(), createBlock(_component_DTRadioButton, { - key: 0, - value: $props.rowData, - name: $props.name, - checked: $props.selected, - onChange: _cache[0] || (_cache[0] = function($event) { - return $options.toggleRowWithRadio($event, $props.rowIndex); - }), - column: $props.column, - index: $props.index, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["value", "name", "checked", "column", "index", "unstyled", "pt"])) : $options.columnProp("selectionMode") === "multiple" ? (openBlock(), createBlock(_component_DTCheckbox, { - key: 1, - value: $props.rowData, - checked: $props.selected, - rowCheckboxIconTemplate: $props.column.children && $props.column.children.rowcheckboxicon, - "aria-selected": $props.selected ? true : void 0, - onChange: _cache[1] || (_cache[1] = function($event) { - return $options.toggleRowWithCheckbox($event, $props.rowIndex); - }), - column: $props.column, - index: $props.index, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["value", "checked", "rowCheckboxIconTemplate", "aria-selected", "column", "index", "unstyled", "pt"])) : createCommentVNode("", true)], 64)) : $options.columnProp("rowReorder") ? (openBlock(), createElementBlock(Fragment, { - key: 4 - }, [$props.column.children && $props.column.children.rowreordericon ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.rowreordericon), { - key: 0, - "class": normalizeClass(_ctx.cx("reorderableRowHandle")) - }, null, 8, ["class"])) : $options.columnProp("rowReorderIcon") ? (openBlock(), createElementBlock("i", mergeProps({ - key: 1, - "class": [_ctx.cx("reorderableRowHandle"), $options.columnProp("rowReorderIcon")] - }, $options.getColumnPT("reorderableRowHandle")), null, 16)) : (openBlock(), createBlock(_component_BarsIcon, mergeProps({ - key: 2, - "class": _ctx.cx("reorderableRowHandle") - }, $options.getColumnPT("reorderableRowHandle")), null, 16, ["class"]))], 64)) : $options.columnProp("expander") ? withDirectives((openBlock(), createElementBlock("button", mergeProps({ - key: 5, - "class": _ctx.cx("rowToggleButton"), - type: "button", - "aria-expanded": $props.isRowExpanded, - "aria-controls": $props.ariaControls, - "aria-label": $options.expandButtonAriaLabel, - onClick: _cache[2] || (_cache[2] = function() { - return $options.toggleRow && $options.toggleRow.apply($options, arguments); - }) - }, $options.getColumnPT("rowToggleButton"), { - "data-pc-group-section": "rowactionbutton" - }), [$props.column.children && $props.column.children.rowtogglericon ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.rowtogglericon), { - key: 0, - "class": normalizeClass(_ctx.cx("rowToggleIcon")), - rowExpanded: $props.isRowExpanded - }, null, 8, ["class", "rowExpanded"])) : (openBlock(), createElementBlock(Fragment, { - key: 1 - }, [$props.isRowExpanded && $props.expandedRowIcon ? (openBlock(), createElementBlock("span", { - key: 0, - "class": normalizeClass([_ctx.cx("rowToggleIcon"), $props.expandedRowIcon]) - }, null, 2)) : $props.isRowExpanded && !$props.expandedRowIcon ? (openBlock(), createBlock(_component_ChevronDownIcon, mergeProps({ - key: 1, - "class": _ctx.cx("rowToggleIcon") - }, $options.getColumnPT("rowToggleIcon")), null, 16, ["class"])) : !$props.isRowExpanded && $props.collapsedRowIcon ? (openBlock(), createElementBlock("span", { - key: 2, - "class": normalizeClass([_ctx.cx("rowToggleIcon"), $props.collapsedRowIcon]) - }, null, 2)) : !$props.isRowExpanded && !$props.collapsedRowIcon ? (openBlock(), createBlock(_component_ChevronRightIcon, mergeProps({ - key: 3, - "class": _ctx.cx("rowToggleIcon") - }, $options.getColumnPT("rowToggleIcon")), null, 16, ["class"])) : createCommentVNode("", true)], 64))], 16, _hoisted_2$2)), [[_directive_ripple]]) : $props.editMode === "row" && $options.columnProp("rowEditor") ? (openBlock(), createElementBlock(Fragment, { - key: 6 - }, [!$data.d_editing ? (openBlock(), createBlock(_component_Button, mergeProps({ - key: 0, - "class": _ctx.cx("pcRowEditorInit"), - "aria-label": $options.initButtonAriaLabel, - unstyled: _ctx.unstyled, - onClick: $options.onRowEditInit - }, $props.editButtonProps.init, { - pt: $options.getColumnPT("pcRowEditorInit"), - "data-pc-group-section": "rowactionbutton" - }), { - icon: withCtx(function(slotProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.column.children && $props.column.children.roweditoriniticon || "PencilIcon"), mergeProps({ - "class": slotProps["class"] - }, $options.getColumnPT("pcRowEditorInit")["icon"]), null, 16, ["class"]))]; - }), - _: 1 - }, 16, ["class", "aria-label", "unstyled", "onClick", "pt"])) : createCommentVNode("", true), $data.d_editing ? (openBlock(), createBlock(_component_Button, mergeProps({ - key: 1, - "class": _ctx.cx("pcRowEditorSave"), - "aria-label": $options.saveButtonAriaLabel, - unstyled: _ctx.unstyled, - onClick: $options.onRowEditSave - }, $props.editButtonProps.save, { - pt: $options.getColumnPT("pcRowEditorSave"), - "data-pc-group-section": "rowactionbutton" - }), { - icon: withCtx(function(slotProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.column.children && $props.column.children.roweditorsaveicon || "CheckIcon"), mergeProps({ - "class": slotProps["class"] - }, $options.getColumnPT("pcRowEditorSave")["icon"]), null, 16, ["class"]))]; - }), - _: 1 - }, 16, ["class", "aria-label", "unstyled", "onClick", "pt"])) : createCommentVNode("", true), $data.d_editing ? (openBlock(), createBlock(_component_Button, mergeProps({ - key: 2, - "class": _ctx.cx("pcRowEditorCancel"), - "aria-label": $options.cancelButtonAriaLabel, - unstyled: _ctx.unstyled, - onClick: $options.onRowEditCancel - }, $props.editButtonProps.cancel, { - pt: $options.getColumnPT("pcRowEditorCancel"), - "data-pc-group-section": "rowactionbutton" - }), { - icon: withCtx(function(slotProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.column.children && $props.column.children.roweditorcancelicon || "TimesIcon"), mergeProps({ - "class": slotProps["class"] - }, $options.getColumnPT("pcRowEditorCancel")["icon"]), null, 16, ["class"]))]; - }), - _: 1 - }, 16, ["class", "aria-label", "unstyled", "onClick", "pt"])) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock(Fragment, { - key: 7 - }, [createTextVNode(toDisplayString($options.resolveFieldData()), 1)], 64))], 16, _hoisted_1$4)); -} -__name(render$9, "render$9"); -script$9.render = render$9; -function _typeof$9(o) { - "@babel/helpers - typeof"; - return _typeof$9 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$9(o); -} -__name(_typeof$9, "_typeof$9"); -function _createForOfIteratorHelper$2(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e) { - t && (r = t); - var _n = 0, F = /* @__PURE__ */ __name(function F2() { - }, "F"); - return { s: F, n: /* @__PURE__ */ __name(function n() { - return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; - }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { - throw r2; - }, "e"), f: F }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, a = true, u = false; - return { s: /* @__PURE__ */ __name(function s() { - t = t.call(r); - }, "s"), n: /* @__PURE__ */ __name(function n() { - var r2 = t.next(); - return a = r2.done, r2; - }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { - u = true, o = r2; - }, "e"), f: /* @__PURE__ */ __name(function f() { - try { - a || null == t["return"] || t["return"](); - } finally { - if (u) throw o; - } - }, "f") }; -} -__name(_createForOfIteratorHelper$2, "_createForOfIteratorHelper$2"); -function _unsupportedIterableToArray$2(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray$2(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; - } -} -__name(_unsupportedIterableToArray$2, "_unsupportedIterableToArray$2"); -function _arrayLikeToArray$2(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -__name(_arrayLikeToArray$2, "_arrayLikeToArray$2"); -function ownKeys$9(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$9, "ownKeys$9"); -function _objectSpread$9(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$9(Object(t), true).forEach(function(r2) { - _defineProperty$9(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$9, "_objectSpread$9"); -function _defineProperty$9(e, r, t) { - return (r = _toPropertyKey$9(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$9, "_defineProperty$9"); -function _toPropertyKey$9(t) { - var i = _toPrimitive$9(t, "string"); - return "symbol" == _typeof$9(i) ? i : i + ""; -} -__name(_toPropertyKey$9, "_toPropertyKey$9"); -function _toPrimitive$9(t, r) { - if ("object" != _typeof$9(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$9(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$9, "_toPrimitive$9"); -var script$8 = { - name: "BodyRow", - hostName: "DataTable", - "extends": script$s, - emits: ["rowgroup-toggle", "row-click", "row-dblclick", "row-rightclick", "row-touchend", "row-keydown", "row-mousedown", "row-dragstart", "row-dragover", "row-dragleave", "row-dragend", "row-drop", "row-toggle", "radio-change", "checkbox-change", "cell-edit-init", "cell-edit-complete", "cell-edit-cancel", "row-edit-init", "row-edit-save", "row-edit-cancel", "editing-meta-change"], - props: { - rowData: { - type: Object, - "default": null - }, - index: { - type: Number, - "default": 0 - }, - value: { - type: Array, - "default": null - }, - columns: { - type: null, - "default": null - }, - frozenRow: { - type: Boolean, - "default": false - }, - empty: { - type: Boolean, - "default": false - }, - rowGroupMode: { - type: String, - "default": null - }, - groupRowsBy: { - type: [Array, String, Function], - "default": null - }, - expandableRowGroups: { - type: Boolean, - "default": false - }, - expandedRowGroups: { - type: Array, - "default": null - }, - first: { - type: Number, - "default": 0 - }, - dataKey: { - type: [String, Function], - "default": null - }, - expandedRowIcon: { - type: String, - "default": null - }, - collapsedRowIcon: { - type: String, - "default": null - }, - expandedRows: { - type: [Array, Object], - "default": null - }, - selection: { - type: [Array, Object], - "default": null - }, - selectionKeys: { - type: null, - "default": null - }, - selectionMode: { - type: String, - "default": null - }, - contextMenu: { - type: Boolean, - "default": false - }, - contextMenuSelection: { - type: Object, - "default": null - }, - rowClass: { - type: null, - "default": null - }, - rowStyle: { - type: null, - "default": null - }, - rowGroupHeaderStyle: { - type: null, - "default": null - }, - editMode: { - type: String, - "default": null - }, - compareSelectionBy: { - type: String, - "default": "deepEquals" - }, - editingRows: { - type: Array, - "default": null - }, - editingRowKeys: { - type: null, - "default": null - }, - editingMeta: { - type: Object, - "default": null - }, - templates: { - type: null, - "default": null - }, - scrollable: { - type: Boolean, - "default": false - }, - editButtonProps: { - type: Object, - "default": null - }, - virtualScrollerContentProps: { - type: Object, - "default": null - }, - isVirtualScrollerDisabled: { - type: Boolean, - "default": false - }, - expandedRowId: { - type: String, - "default": null - }, - nameAttributeSelector: { - type: String, - "default": null - } - }, - data: /* @__PURE__ */ __name(function data4() { - return { - d_rowExpanded: false - }; - }, "data"), - watch: { - expandedRows: { - deep: true, - immediate: true, - handler: /* @__PURE__ */ __name(function handler(newValue) { - var _this = this; - this.d_rowExpanded = this.dataKey ? (newValue === null || newValue === void 0 ? void 0 : newValue[resolveFieldData(this.rowData, this.dataKey)]) !== void 0 : newValue === null || newValue === void 0 ? void 0 : newValue.some(function(d) { - return _this.equals(_this.rowData, d); - }); - }, "handler") - } - }, - methods: { - columnProp: /* @__PURE__ */ __name(function columnProp2(col, prop) { - return getVNodeProp(col, prop); - }, "columnProp"), - //@todo - update this method - getColumnPT: /* @__PURE__ */ __name(function getColumnPT4(key) { - var columnMetaData = { - parent: { - instance: this, - props: this.$props, - state: this.$data - } - }; - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.columnProp({}, "pt"), key, columnMetaData)); - }, "getColumnPT"), - //@todo - update this method - getBodyRowPTOptions: /* @__PURE__ */ __name(function getBodyRowPTOptions(key) { - var _this$$parentInstance; - var datatable = (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.$parentInstance; - return this.ptm(key, { - context: { - index: this.rowIndex, - selectable: (datatable === null || datatable === void 0 ? void 0 : datatable.rowHover) || (datatable === null || datatable === void 0 ? void 0 : datatable.selectionMode), - selected: this.isSelected, - stripedRows: (datatable === null || datatable === void 0 ? void 0 : datatable.stripedRows) || false - } - }); - }, "getBodyRowPTOptions"), - shouldRenderBodyCell: /* @__PURE__ */ __name(function shouldRenderBodyCell(column) { - var isHidden = this.columnProp(column, "hidden"); - if (this.rowGroupMode && !isHidden) { - var field2 = this.columnProp(column, "field"); - if (this.rowGroupMode === "subheader") { - return this.groupRowsBy !== field2; - } else if (this.rowGroupMode === "rowspan") { - if (this.isGrouped(column)) { - var prevRowData = this.value[this.rowIndex - 1]; - if (prevRowData) { - var currentRowFieldData = resolveFieldData(this.value[this.rowIndex], field2); - var previousRowFieldData = resolveFieldData(prevRowData, field2); - return currentRowFieldData !== previousRowFieldData; - } else { - return true; - } - } else { - return true; - } - } - } else { - return !isHidden; - } - }, "shouldRenderBodyCell"), - calculateRowGroupSize: /* @__PURE__ */ __name(function calculateRowGroupSize(column) { - if (this.isGrouped(column)) { - var index = this.rowIndex; - var field2 = this.columnProp(column, "field"); - var currentRowFieldData = resolveFieldData(this.value[index], field2); - var nextRowFieldData = currentRowFieldData; - var groupRowSpan = 0; - while (currentRowFieldData === nextRowFieldData) { - groupRowSpan++; - var nextRowData = this.value[++index]; - if (nextRowData) { - nextRowFieldData = resolveFieldData(nextRowData, field2); - } else { - break; - } - } - return groupRowSpan === 1 ? null : groupRowSpan; - } else { - return null; - } - }, "calculateRowGroupSize"), - isGrouped: /* @__PURE__ */ __name(function isGrouped(column) { - var field2 = this.columnProp(column, "field"); - if (this.groupRowsBy && field2) { - if (Array.isArray(this.groupRowsBy)) return this.groupRowsBy.indexOf(field2) > -1; - else return this.groupRowsBy === field2; - } else { - return false; - } - }, "isGrouped"), - findIndexInSelection: /* @__PURE__ */ __name(function findIndexInSelection(data12) { - return this.findIndex(data12, this.selection); - }, "findIndexInSelection"), - findIndex: /* @__PURE__ */ __name(function findIndex(data12, collection) { - var index = -1; - if (collection && collection.length) { - for (var i = 0; i < collection.length; i++) { - if (this.equals(data12, collection[i])) { - index = i; - break; - } - } - } - return index; - }, "findIndex"), - equals: /* @__PURE__ */ __name(function equals$1(data1, data22) { - return this.compareSelectionBy === "equals" ? data1 === data22 : equals(data1, data22, this.dataKey); - }, "equals$1"), - onRowGroupToggle: /* @__PURE__ */ __name(function onRowGroupToggle(event2) { - this.$emit("rowgroup-toggle", { - originalEvent: event2, - data: this.rowData - }); - }, "onRowGroupToggle"), - onRowClick: /* @__PURE__ */ __name(function onRowClick(event2) { - this.$emit("row-click", { - originalEvent: event2, - data: this.rowData, - index: this.rowIndex - }); - }, "onRowClick"), - onRowDblClick: /* @__PURE__ */ __name(function onRowDblClick(event2) { - this.$emit("row-dblclick", { - originalEvent: event2, - data: this.rowData, - index: this.rowIndex - }); - }, "onRowDblClick"), - onRowRightClick: /* @__PURE__ */ __name(function onRowRightClick(event2) { - this.$emit("row-rightclick", { - originalEvent: event2, - data: this.rowData, - index: this.rowIndex - }); - }, "onRowRightClick"), - onRowTouchEnd: /* @__PURE__ */ __name(function onRowTouchEnd(event2) { - this.$emit("row-touchend", event2); - }, "onRowTouchEnd"), - onRowKeyDown: /* @__PURE__ */ __name(function onRowKeyDown(event2) { - this.$emit("row-keydown", { - originalEvent: event2, - data: this.rowData, - index: this.rowIndex - }); - }, "onRowKeyDown"), - onRowMouseDown: /* @__PURE__ */ __name(function onRowMouseDown(event2) { - this.$emit("row-mousedown", event2); - }, "onRowMouseDown"), - onRowDragStart: /* @__PURE__ */ __name(function onRowDragStart(event2) { - this.$emit("row-dragstart", { - originalEvent: event2, - index: this.rowIndex - }); - }, "onRowDragStart"), - onRowDragOver: /* @__PURE__ */ __name(function onRowDragOver(event2) { - this.$emit("row-dragover", { - originalEvent: event2, - index: this.rowIndex - }); - }, "onRowDragOver"), - onRowDragLeave: /* @__PURE__ */ __name(function onRowDragLeave(event2) { - this.$emit("row-dragleave", event2); - }, "onRowDragLeave"), - onRowDragEnd: /* @__PURE__ */ __name(function onRowDragEnd(event2) { - this.$emit("row-dragend", event2); - }, "onRowDragEnd"), - onRowDrop: /* @__PURE__ */ __name(function onRowDrop(event2) { - this.$emit("row-drop", event2); - }, "onRowDrop"), - onRowToggle: /* @__PURE__ */ __name(function onRowToggle(event2) { - this.d_rowExpanded = !this.d_rowExpanded; - this.$emit("row-toggle", _objectSpread$9(_objectSpread$9({}, event2), {}, { - expanded: this.d_rowExpanded - })); - }, "onRowToggle"), - onRadioChange: /* @__PURE__ */ __name(function onRadioChange(event2) { - this.$emit("radio-change", event2); - }, "onRadioChange"), - onCheckboxChange: /* @__PURE__ */ __name(function onCheckboxChange(event2) { - this.$emit("checkbox-change", event2); - }, "onCheckboxChange"), - onCellEditInit: /* @__PURE__ */ __name(function onCellEditInit(event2) { - this.$emit("cell-edit-init", event2); - }, "onCellEditInit"), - onCellEditComplete: /* @__PURE__ */ __name(function onCellEditComplete(event2) { - this.$emit("cell-edit-complete", event2); - }, "onCellEditComplete"), - onCellEditCancel: /* @__PURE__ */ __name(function onCellEditCancel(event2) { - this.$emit("cell-edit-cancel", event2); - }, "onCellEditCancel"), - onRowEditInit: /* @__PURE__ */ __name(function onRowEditInit2(event2) { - this.$emit("row-edit-init", event2); - }, "onRowEditInit"), - onRowEditSave: /* @__PURE__ */ __name(function onRowEditSave2(event2) { - this.$emit("row-edit-save", event2); - }, "onRowEditSave"), - onRowEditCancel: /* @__PURE__ */ __name(function onRowEditCancel2(event2) { - this.$emit("row-edit-cancel", event2); - }, "onRowEditCancel"), - onEditingMetaChange: /* @__PURE__ */ __name(function onEditingMetaChange(event2) { - this.$emit("editing-meta-change", event2); - }, "onEditingMetaChange"), - getVirtualScrollerProp: /* @__PURE__ */ __name(function getVirtualScrollerProp2(option, options) { - options = options || this.virtualScrollerContentProps; - return options ? options[option] : null; - }, "getVirtualScrollerProp") - }, - computed: { - rowIndex: /* @__PURE__ */ __name(function rowIndex() { - var getItemOptions = this.getVirtualScrollerProp("getItemOptions"); - return getItemOptions ? getItemOptions(this.index).index : this.index; - }, "rowIndex"), - rowStyles: /* @__PURE__ */ __name(function rowStyles() { - var _this$rowStyle; - return (_this$rowStyle = this.rowStyle) === null || _this$rowStyle === void 0 ? void 0 : _this$rowStyle.call(this, this.rowData); - }, "rowStyles"), - rowClasses: /* @__PURE__ */ __name(function rowClasses() { - var rowStyleClass = []; - var columnSelectionMode = null; - if (this.rowClass) { - var rowClassValue = this.rowClass(this.rowData); - if (rowClassValue) { - rowStyleClass.push(rowClassValue); - } - } - if (this.columns) { - var _iterator = _createForOfIteratorHelper$2(this.columns), _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done; ) { - var col = _step.value; - var _selectionMode = this.columnProp(col, "selectionMode"); - if (isNotEmpty(_selectionMode)) { - columnSelectionMode = _selectionMode; - break; - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - return [this.cx("row", { - rowData: this.rowData, - index: this.rowIndex, - columnSelectionMode - }), rowStyleClass]; - }, "rowClasses"), - rowTabindex: /* @__PURE__ */ __name(function rowTabindex() { - if (this.selection === null && (this.selectionMode === "single" || this.selectionMode === "multiple")) { - return this.rowIndex === 0 ? 0 : -1; - } - return -1; - }, "rowTabindex"), - isRowEditing: /* @__PURE__ */ __name(function isRowEditing() { - if (this.rowData && this.editingRows) { - if (this.dataKey) return this.editingRowKeys ? this.editingRowKeys[resolveFieldData(this.rowData, this.dataKey)] !== void 0 : false; - else return this.findIndex(this.rowData, this.editingRows) > -1; - } - return false; - }, "isRowEditing"), - isRowGroupExpanded: /* @__PURE__ */ __name(function isRowGroupExpanded() { - if (this.expandableRowGroups && this.expandedRowGroups) { - var groupFieldValue = resolveFieldData(this.rowData, this.groupRowsBy); - return this.expandedRowGroups.indexOf(groupFieldValue) > -1; - } - return false; - }, "isRowGroupExpanded"), - isSelected: /* @__PURE__ */ __name(function isSelected() { - if (this.rowData && this.selection) { - if (this.dataKey) { - return this.selectionKeys ? this.selectionKeys[resolveFieldData(this.rowData, this.dataKey)] !== void 0 : false; - } else { - if (this.selection instanceof Array) return this.findIndexInSelection(this.rowData) > -1; - else return this.equals(this.rowData, this.selection); - } - } - return false; - }, "isSelected"), - isSelectedWithContextMenu: /* @__PURE__ */ __name(function isSelectedWithContextMenu() { - if (this.rowData && this.contextMenuSelection) { - return this.equals(this.rowData, this.contextMenuSelection, this.dataKey); - } - return false; - }, "isSelectedWithContextMenu"), - shouldRenderRowGroupHeader: /* @__PURE__ */ __name(function shouldRenderRowGroupHeader() { - var currentRowFieldData = resolveFieldData(this.rowData, this.groupRowsBy); - var prevRowData = this.value[this.rowIndex - 1]; - if (prevRowData) { - var previousRowFieldData = resolveFieldData(prevRowData, this.groupRowsBy); - return currentRowFieldData !== previousRowFieldData; - } else { - return true; - } - }, "shouldRenderRowGroupHeader"), - shouldRenderRowGroupFooter: /* @__PURE__ */ __name(function shouldRenderRowGroupFooter() { - if (this.expandableRowGroups && !this.isRowGroupExpanded) { - return false; - } else { - var currentRowFieldData = resolveFieldData(this.rowData, this.groupRowsBy); - var nextRowData = this.value[this.rowIndex + 1]; - if (nextRowData) { - var nextRowFieldData = resolveFieldData(nextRowData, this.groupRowsBy); - return currentRowFieldData !== nextRowFieldData; - } else { - return true; - } - } - }, "shouldRenderRowGroupFooter"), - columnsLength: /* @__PURE__ */ __name(function columnsLength() { - var _this2 = this; - if (this.columns) { - var hiddenColLength = 0; - this.columns.forEach(function(column) { - if (_this2.columnProp(column, "selectionMode") === "single") hiddenColLength--; - if (_this2.columnProp(column, "hidden")) hiddenColLength++; - }); - return this.columns.length - hiddenColLength; - } - return 0; - }, "columnsLength") - }, - components: { - DTBodyCell: script$9, - ChevronDownIcon: script$A, - ChevronRightIcon: script$B - } -}; -function _typeof$8(o) { - "@babel/helpers - typeof"; - return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$8(o); -} -__name(_typeof$8, "_typeof$8"); -function ownKeys$8(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$8, "ownKeys$8"); -function _objectSpread$8(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$8(Object(t), true).forEach(function(r2) { - _defineProperty$8(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$8, "_objectSpread$8"); -function _defineProperty$8(e, r, t) { - return (r = _toPropertyKey$8(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$8, "_defineProperty$8"); -function _toPropertyKey$8(t) { - var i = _toPrimitive$8(t, "string"); - return "symbol" == _typeof$8(i) ? i : i + ""; -} -__name(_toPropertyKey$8, "_toPropertyKey$8"); -function _toPrimitive$8(t, r) { - if ("object" != _typeof$8(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$8(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$8, "_toPrimitive$8"); -var _hoisted_1$3 = ["colspan"]; -var _hoisted_2$1 = ["tabindex", "aria-selected", "data-p-index", "data-p-selectable-row", "data-p-selected", "data-p-selected-contextmenu"]; -var _hoisted_3 = ["id"]; -var _hoisted_4 = ["colspan"]; -var _hoisted_5 = ["colspan"]; -var _hoisted_6 = ["colspan"]; -function render$8(_ctx, _cache, $props, $setup, $data, $options) { - var _component_ChevronDownIcon = resolveComponent("ChevronDownIcon"); - var _component_ChevronRightIcon = resolveComponent("ChevronRightIcon"); - var _component_DTBodyCell = resolveComponent("DTBodyCell"); - return !$props.empty ? (openBlock(), createElementBlock(Fragment, { - key: 0 - }, [$props.templates["groupheader"] && $props.rowGroupMode === "subheader" && $options.shouldRenderRowGroupHeader ? (openBlock(), createElementBlock("tr", mergeProps({ - key: 0, - "class": _ctx.cx("rowGroupHeader"), - style: $props.rowGroupHeaderStyle, - role: "row" - }, _ctx.ptm("rowGroupHeader")), [createBaseVNode("td", mergeProps({ - colspan: $options.columnsLength - 1 - }, _objectSpread$8(_objectSpread$8({}, $options.getColumnPT("bodycell")), _ctx.ptm("rowGroupHeaderCell"))), [$props.expandableRowGroups ? (openBlock(), createElementBlock("button", mergeProps({ - key: 0, - "class": _ctx.cx("rowToggleButton"), - onClick: _cache[0] || (_cache[0] = function() { - return $options.onRowGroupToggle && $options.onRowGroupToggle.apply($options, arguments); - }), - type: "button" - }, _ctx.ptm("rowToggleButton")), [$props.templates["rowtoggleicon"] || $props.templates["rowgrouptogglericon"] ? (openBlock(), createBlock(resolveDynamicComponent($props.templates["rowtoggleicon"] || $props.templates["rowgrouptogglericon"]), { - key: 0, - expanded: $options.isRowGroupExpanded - }, null, 8, ["expanded"])) : (openBlock(), createElementBlock(Fragment, { - key: 1 - }, [$options.isRowGroupExpanded && $props.expandedRowIcon ? (openBlock(), createElementBlock("span", mergeProps({ - key: 0, - "class": [_ctx.cx("rowToggleIcon"), $props.expandedRowIcon] - }, _ctx.ptm("rowToggleIcon")), null, 16)) : $options.isRowGroupExpanded && !$props.expandedRowIcon ? (openBlock(), createBlock(_component_ChevronDownIcon, mergeProps({ - key: 1, - "class": _ctx.cx("rowToggleIcon") - }, _ctx.ptm("rowToggleIcon")), null, 16, ["class"])) : !$options.isRowGroupExpanded && $props.collapsedRowIcon ? (openBlock(), createElementBlock("span", mergeProps({ - key: 2, - "class": [_ctx.cx("rowToggleIcon"), $props.collapsedRowIcon] - }, _ctx.ptm("rowToggleIcon")), null, 16)) : !$options.isRowGroupExpanded && !$props.collapsedRowIcon ? (openBlock(), createBlock(_component_ChevronRightIcon, mergeProps({ - key: 3, - "class": _ctx.cx("rowToggleIcon") - }, _ctx.ptm("rowToggleIcon")), null, 16, ["class"])) : createCommentVNode("", true)], 64))], 16)) : createCommentVNode("", true), (openBlock(), createBlock(resolveDynamicComponent($props.templates["groupheader"]), { - data: $props.rowData, - index: $options.rowIndex - }, null, 8, ["data", "index"]))], 16, _hoisted_1$3)], 16)) : createCommentVNode("", true), ($props.expandableRowGroups ? $options.isRowGroupExpanded : true) ? (openBlock(), createElementBlock("tr", mergeProps({ - key: 1, - "class": $options.rowClasses, - style: $options.rowStyles, - tabindex: $options.rowTabindex, - role: "row", - "aria-selected": $props.selectionMode ? $options.isSelected : null, - onClick: _cache[1] || (_cache[1] = function() { - return $options.onRowClick && $options.onRowClick.apply($options, arguments); - }), - onDblclick: _cache[2] || (_cache[2] = function() { - return $options.onRowDblClick && $options.onRowDblClick.apply($options, arguments); - }), - onContextmenu: _cache[3] || (_cache[3] = function() { - return $options.onRowRightClick && $options.onRowRightClick.apply($options, arguments); - }), - onTouchend: _cache[4] || (_cache[4] = function() { - return $options.onRowTouchEnd && $options.onRowTouchEnd.apply($options, arguments); - }), - onKeydown: _cache[5] || (_cache[5] = withModifiers(function() { - return $options.onRowKeyDown && $options.onRowKeyDown.apply($options, arguments); - }, ["self"])), - onMousedown: _cache[6] || (_cache[6] = function() { - return $options.onRowMouseDown && $options.onRowMouseDown.apply($options, arguments); - }), - onDragstart: _cache[7] || (_cache[7] = function() { - return $options.onRowDragStart && $options.onRowDragStart.apply($options, arguments); - }), - onDragover: _cache[8] || (_cache[8] = function() { - return $options.onRowDragOver && $options.onRowDragOver.apply($options, arguments); - }), - onDragleave: _cache[9] || (_cache[9] = function() { - return $options.onRowDragLeave && $options.onRowDragLeave.apply($options, arguments); - }), - onDragend: _cache[10] || (_cache[10] = function() { - return $options.onRowDragEnd && $options.onRowDragEnd.apply($options, arguments); - }), - onDrop: _cache[11] || (_cache[11] = function() { - return $options.onRowDrop && $options.onRowDrop.apply($options, arguments); - }) - }, $options.getBodyRowPTOptions("bodyRow"), { - "data-p-index": $options.rowIndex, - "data-p-selectable-row": $props.selectionMode ? true : false, - "data-p-selected": $props.selection && $options.isSelected, - "data-p-selected-contextmenu": $props.contextMenuSelection && $options.isSelectedWithContextMenu - }), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.columns, function(col, i) { - return openBlock(), createElementBlock(Fragment, null, [$options.shouldRenderBodyCell(col) ? (openBlock(), createBlock(_component_DTBodyCell, { - key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || i, - rowData: $props.rowData, - column: col, - rowIndex: $options.rowIndex, - index: i, - selected: $options.isSelected, - frozenRow: $props.frozenRow, - rowspan: $props.rowGroupMode === "rowspan" ? $options.calculateRowGroupSize(col) : null, - editMode: $props.editMode, - editing: $props.editMode === "row" && $options.isRowEditing, - editingMeta: $props.editingMeta, - virtualScrollerContentProps: $props.virtualScrollerContentProps, - ariaControls: $props.expandedRowId + "_" + $options.rowIndex + "_expansion", - name: $props.nameAttributeSelector, - isRowExpanded: $data.d_rowExpanded, - expandedRowIcon: $props.expandedRowIcon, - collapsedRowIcon: $props.collapsedRowIcon, - editButtonProps: $props.editButtonProps, - onRadioChange: $options.onRadioChange, - onCheckboxChange: $options.onCheckboxChange, - onRowToggle: $options.onRowToggle, - onCellEditInit: $options.onCellEditInit, - onCellEditComplete: $options.onCellEditComplete, - onCellEditCancel: $options.onCellEditCancel, - onRowEditInit: $options.onRowEditInit, - onRowEditSave: $options.onRowEditSave, - onRowEditCancel: $options.onRowEditCancel, - onEditingMetaChange: $options.onEditingMetaChange, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["rowData", "column", "rowIndex", "index", "selected", "frozenRow", "rowspan", "editMode", "editing", "editingMeta", "virtualScrollerContentProps", "ariaControls", "name", "isRowExpanded", "expandedRowIcon", "collapsedRowIcon", "editButtonProps", "onRadioChange", "onCheckboxChange", "onRowToggle", "onCellEditInit", "onCellEditComplete", "onCellEditCancel", "onRowEditInit", "onRowEditSave", "onRowEditCancel", "onEditingMetaChange", "unstyled", "pt"])) : createCommentVNode("", true)], 64); - }), 256))], 16, _hoisted_2$1)) : createCommentVNode("", true), $props.templates["expansion"] && $props.expandedRows && $data.d_rowExpanded ? (openBlock(), createElementBlock("tr", mergeProps({ - key: 2, - id: $props.expandedRowId + "_" + $options.rowIndex + "_expansion", - "class": _ctx.cx("rowExpansion"), - role: "row" - }, _ctx.ptm("rowExpansion")), [createBaseVNode("td", mergeProps({ - colspan: $options.columnsLength - }, _objectSpread$8(_objectSpread$8({}, $options.getColumnPT("bodycell")), _ctx.ptm("rowExpansionCell"))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates["expansion"]), { - data: $props.rowData, - index: $options.rowIndex - }, null, 8, ["data", "index"]))], 16, _hoisted_4)], 16, _hoisted_3)) : createCommentVNode("", true), $props.templates["groupfooter"] && $props.rowGroupMode === "subheader" && $options.shouldRenderRowGroupFooter ? (openBlock(), createElementBlock("tr", mergeProps({ - key: 3, - "class": _ctx.cx("rowGroupFooter"), - role: "row" - }, _ctx.ptm("rowGroupFooter")), [createBaseVNode("td", mergeProps({ - colspan: $options.columnsLength - 1 - }, _objectSpread$8(_objectSpread$8({}, $options.getColumnPT("bodycell")), _ctx.ptm("rowGroupFooterCell"))), [(openBlock(), createBlock(resolveDynamicComponent($props.templates["groupfooter"]), { - data: $props.rowData, - index: $options.rowIndex - }, null, 8, ["data", "index"]))], 16, _hoisted_5)], 16)) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("tr", mergeProps({ - key: 1, - "class": _ctx.cx("emptyMessage"), - role: "row" - }, _ctx.ptm("emptyMessage")), [createBaseVNode("td", mergeProps({ - colspan: $options.columnsLength - }, _objectSpread$8(_objectSpread$8({}, $options.getColumnPT("bodycell")), _ctx.ptm("emptyMessageCell"))), [$props.templates.empty ? (openBlock(), createBlock(resolveDynamicComponent($props.templates.empty), { - key: 0 - })) : createCommentVNode("", true)], 16, _hoisted_6)], 16)); -} -__name(render$8, "render$8"); -script$8.render = render$8; -var script$7 = { - name: "TableBody", - hostName: "DataTable", - "extends": script$s, - emits: ["rowgroup-toggle", "row-click", "row-dblclick", "row-rightclick", "row-touchend", "row-keydown", "row-mousedown", "row-dragstart", "row-dragover", "row-dragleave", "row-dragend", "row-drop", "row-toggle", "radio-change", "checkbox-change", "cell-edit-init", "cell-edit-complete", "cell-edit-cancel", "row-edit-init", "row-edit-save", "row-edit-cancel", "editing-meta-change"], - props: { - value: { - type: Array, - "default": null - }, - columns: { - type: null, - "default": null - }, - frozenRow: { - type: Boolean, - "default": false - }, - empty: { - type: Boolean, - "default": false - }, - rowGroupMode: { - type: String, - "default": null - }, - groupRowsBy: { - type: [Array, String, Function], - "default": null - }, - expandableRowGroups: { - type: Boolean, - "default": false - }, - expandedRowGroups: { - type: Array, - "default": null - }, - first: { - type: Number, - "default": 0 - }, - dataKey: { - type: [String, Function], - "default": null - }, - expandedRowIcon: { - type: String, - "default": null - }, - collapsedRowIcon: { - type: String, - "default": null - }, - expandedRows: { - type: [Array, Object], - "default": null - }, - selection: { - type: [Array, Object], - "default": null - }, - selectionKeys: { - type: null, - "default": null - }, - selectionMode: { - type: String, - "default": null - }, - contextMenu: { - type: Boolean, - "default": false - }, - contextMenuSelection: { - type: Object, - "default": null - }, - rowClass: { - type: null, - "default": null - }, - rowStyle: { - type: null, - "default": null - }, - editMode: { - type: String, - "default": null - }, - compareSelectionBy: { - type: String, - "default": "deepEquals" - }, - editingRows: { - type: Array, - "default": null - }, - editingRowKeys: { - type: null, - "default": null - }, - editingMeta: { - type: Object, - "default": null - }, - templates: { - type: null, - "default": null - }, - scrollable: { - type: Boolean, - "default": false - }, - editButtonProps: { - type: Object, - "default": null - }, - virtualScrollerContentProps: { - type: Object, - "default": null - }, - isVirtualScrollerDisabled: { - type: Boolean, - "default": false - } - }, - data: /* @__PURE__ */ __name(function data5() { - return { - rowGroupHeaderStyleObject: {} - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted4() { - if (this.frozenRow) { - this.updateFrozenRowStickyPosition(); - } - if (this.scrollable && this.rowGroupMode === "subheader") { - this.updateFrozenRowGroupHeaderStickyPosition(); - } - }, "mounted"), - updated: /* @__PURE__ */ __name(function updated2() { - if (this.frozenRow) { - this.updateFrozenRowStickyPosition(); - } - if (this.scrollable && this.rowGroupMode === "subheader") { - this.updateFrozenRowGroupHeaderStickyPosition(); - } - }, "updated"), - methods: { - getRowKey: /* @__PURE__ */ __name(function getRowKey(rowData, rowIndex2) { - return this.dataKey ? resolveFieldData(rowData, this.dataKey) : rowIndex2; - }, "getRowKey"), - updateFrozenRowStickyPosition: /* @__PURE__ */ __name(function updateFrozenRowStickyPosition() { - this.$el.style.top = getOuterHeight(this.$el.previousElementSibling) + "px"; - }, "updateFrozenRowStickyPosition"), - updateFrozenRowGroupHeaderStickyPosition: /* @__PURE__ */ __name(function updateFrozenRowGroupHeaderStickyPosition() { - var tableHeaderHeight = getOuterHeight(this.$el.previousElementSibling); - this.rowGroupHeaderStyleObject.top = tableHeaderHeight + "px"; - }, "updateFrozenRowGroupHeaderStickyPosition"), - getVirtualScrollerProp: /* @__PURE__ */ __name(function getVirtualScrollerProp3(option, options) { - options = options || this.virtualScrollerContentProps; - return options ? options[option] : null; - }, "getVirtualScrollerProp"), - bodyRef: /* @__PURE__ */ __name(function bodyRef(el) { - var contentRef = this.getVirtualScrollerProp("contentRef"); - contentRef && contentRef(el); - }, "bodyRef") - }, - computed: { - rowGroupHeaderStyle: /* @__PURE__ */ __name(function rowGroupHeaderStyle() { - if (this.scrollable) { - return { - top: this.rowGroupHeaderStyleObject.top - }; - } - return null; - }, "rowGroupHeaderStyle"), - bodyContentStyle: /* @__PURE__ */ __name(function bodyContentStyle() { - return this.getVirtualScrollerProp("contentStyle"); - }, "bodyContentStyle"), - ptmTBodyOptions: /* @__PURE__ */ __name(function ptmTBodyOptions() { - var _this$$parentInstance; - return { - context: { - scrollable: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 || (_this$$parentInstance = _this$$parentInstance.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.scrollable - } - }; - }, "ptmTBodyOptions"), - expandedRowId: /* @__PURE__ */ __name(function expandedRowId() { - return UniqueComponentId(); - }, "expandedRowId"), - nameAttributeSelector: /* @__PURE__ */ __name(function nameAttributeSelector() { - return UniqueComponentId(); - }, "nameAttributeSelector") - }, - components: { - DTBodyRow: script$8 - } -}; -function render$7(_ctx, _cache, $props, $setup, $data, $options) { - var _component_DTBodyRow = resolveComponent("DTBodyRow"); - return openBlock(), createElementBlock("tbody", mergeProps({ - ref: $options.bodyRef, - "class": _ctx.cx("tbody"), - role: "rowgroup", - style: $options.bodyContentStyle - }, _ctx.ptm("tbody", $options.ptmTBodyOptions)), [!$props.empty ? (openBlock(true), createElementBlock(Fragment, { - key: 0 - }, renderList($props.value, function(rowData, rowIndex2) { - return openBlock(), createBlock(_component_DTBodyRow, { - key: $options.getRowKey(rowData, rowIndex2), - rowData, - index: rowIndex2, - value: $props.value, - columns: $props.columns, - frozenRow: $props.frozenRow, - empty: $props.empty, - first: $props.first, - dataKey: $props.dataKey, - selection: $props.selection, - selectionKeys: $props.selectionKeys, - selectionMode: $props.selectionMode, - contextMenu: $props.contextMenu, - contextMenuSelection: $props.contextMenuSelection, - rowGroupMode: $props.rowGroupMode, - groupRowsBy: $props.groupRowsBy, - expandableRowGroups: $props.expandableRowGroups, - rowClass: $props.rowClass, - rowStyle: $props.rowStyle, - editMode: $props.editMode, - compareSelectionBy: $props.compareSelectionBy, - scrollable: $props.scrollable, - expandedRowIcon: $props.expandedRowIcon, - collapsedRowIcon: $props.collapsedRowIcon, - expandedRows: $props.expandedRows, - expandedRowGroups: $props.expandedRowGroups, - editingRows: $props.editingRows, - editingRowKeys: $props.editingRowKeys, - templates: $props.templates, - editButtonProps: $props.editButtonProps, - virtualScrollerContentProps: $props.virtualScrollerContentProps, - isVirtualScrollerDisabled: $props.isVirtualScrollerDisabled, - editingMeta: $props.editingMeta, - rowGroupHeaderStyle: $options.rowGroupHeaderStyle, - expandedRowId: $options.expandedRowId, - nameAttributeSelector: $options.nameAttributeSelector, - onRowgroupToggle: _cache[0] || (_cache[0] = function($event) { - return _ctx.$emit("rowgroup-toggle", $event); - }), - onRowClick: _cache[1] || (_cache[1] = function($event) { - return _ctx.$emit("row-click", $event); - }), - onRowDblclick: _cache[2] || (_cache[2] = function($event) { - return _ctx.$emit("row-dblclick", $event); - }), - onRowRightclick: _cache[3] || (_cache[3] = function($event) { - return _ctx.$emit("row-rightclick", $event); - }), - onRowTouchend: _cache[4] || (_cache[4] = function($event) { - return _ctx.$emit("row-touchend", $event); - }), - onRowKeydown: _cache[5] || (_cache[5] = function($event) { - return _ctx.$emit("row-keydown", $event); - }), - onRowMousedown: _cache[6] || (_cache[6] = function($event) { - return _ctx.$emit("row-mousedown", $event); - }), - onRowDragstart: _cache[7] || (_cache[7] = function($event) { - return _ctx.$emit("row-dragstart", $event); - }), - onRowDragover: _cache[8] || (_cache[8] = function($event) { - return _ctx.$emit("row-dragover", $event); - }), - onRowDragleave: _cache[9] || (_cache[9] = function($event) { - return _ctx.$emit("row-dragleave", $event); - }), - onRowDragend: _cache[10] || (_cache[10] = function($event) { - return _ctx.$emit("row-dragend", $event); - }), - onRowDrop: _cache[11] || (_cache[11] = function($event) { - return _ctx.$emit("row-drop", $event); - }), - onRowToggle: _cache[12] || (_cache[12] = function($event) { - return _ctx.$emit("row-toggle", $event); - }), - onRadioChange: _cache[13] || (_cache[13] = function($event) { - return _ctx.$emit("radio-change", $event); - }), - onCheckboxChange: _cache[14] || (_cache[14] = function($event) { - return _ctx.$emit("checkbox-change", $event); - }), - onCellEditInit: _cache[15] || (_cache[15] = function($event) { - return _ctx.$emit("cell-edit-init", $event); - }), - onCellEditComplete: _cache[16] || (_cache[16] = function($event) { - return _ctx.$emit("cell-edit-complete", $event); - }), - onCellEditCancel: _cache[17] || (_cache[17] = function($event) { - return _ctx.$emit("cell-edit-cancel", $event); - }), - onRowEditInit: _cache[18] || (_cache[18] = function($event) { - return _ctx.$emit("row-edit-init", $event); - }), - onRowEditSave: _cache[19] || (_cache[19] = function($event) { - return _ctx.$emit("row-edit-save", $event); - }), - onRowEditCancel: _cache[20] || (_cache[20] = function($event) { - return _ctx.$emit("row-edit-cancel", $event); - }), - onEditingMetaChange: _cache[21] || (_cache[21] = function($event) { - return _ctx.$emit("editing-meta-change", $event); - }), - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["rowData", "index", "value", "columns", "frozenRow", "empty", "first", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "editButtonProps", "virtualScrollerContentProps", "isVirtualScrollerDisabled", "editingMeta", "rowGroupHeaderStyle", "expandedRowId", "nameAttributeSelector", "unstyled", "pt"]); - }), 128)) : (openBlock(), createBlock(_component_DTBodyRow, { - key: 1, - empty: $props.empty, - columns: $props.columns, - templates: $props.templates - }, null, 8, ["empty", "columns", "templates"]))], 16); -} -__name(render$7, "render$7"); -script$7.render = render$7; -var script$6 = { - name: "FooterCell", - hostName: "DataTable", - "extends": script$s, - props: { - column: { - type: Object, - "default": null - }, - index: { - type: Number, - "default": null - } - }, - data: /* @__PURE__ */ __name(function data6() { - return { - styleObject: {} - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted5() { - if (this.columnProp("frozen")) { - this.updateStickyPosition(); - } - }, "mounted"), - updated: /* @__PURE__ */ __name(function updated3() { - if (this.columnProp("frozen")) { - this.updateStickyPosition(); - } - }, "updated"), - methods: { - columnProp: /* @__PURE__ */ __name(function columnProp3(prop) { - return getVNodeProp(this.column, prop); - }, "columnProp"), - getColumnPT: /* @__PURE__ */ __name(function getColumnPT5(key) { - var _this$$parentInstance, _this$$parentInstance2; - var columnMetaData = { - props: this.column.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - index: this.index, - size: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 || (_this$$parentInstance = _this$$parentInstance.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.size, - showGridlines: ((_this$$parentInstance2 = this.$parentInstance) === null || _this$$parentInstance2 === void 0 || (_this$$parentInstance2 = _this$$parentInstance2.$parentInstance) === null || _this$$parentInstance2 === void 0 ? void 0 : _this$$parentInstance2.showGridlines) || false - } - }; - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); - }, "getColumnPT"), - getColumnProp: /* @__PURE__ */ __name(function getColumnProp4() { - return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; - }, "getColumnProp"), - updateStickyPosition: /* @__PURE__ */ __name(function updateStickyPosition2() { - if (this.columnProp("frozen")) { - var align = this.columnProp("alignFrozen"); - if (align === "right") { - var right = 0; - var next2 = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); - if (next2) { - right = getOuterWidth(next2) + parseFloat(next2.style.right || 0); - } - this.styleObject.right = right + "px"; - } else { - var left = 0; - var prev2 = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); - if (prev2) { - left = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); - } - this.styleObject.left = left + "px"; - } - } - }, "updateStickyPosition") - }, - computed: { - containerClass: /* @__PURE__ */ __name(function containerClass2() { - return [this.columnProp("footerClass"), this.columnProp("class"), this.cx("footerCell")]; - }, "containerClass"), - containerStyle: /* @__PURE__ */ __name(function containerStyle2() { - var bodyStyle = this.columnProp("footerStyle"); - var columnStyle = this.columnProp("style"); - return this.columnProp("frozen") ? [columnStyle, bodyStyle, this.styleObject] : [columnStyle, bodyStyle]; - }, "containerStyle") - } -}; -function _typeof$7(o) { - "@babel/helpers - typeof"; - return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$7(o); -} -__name(_typeof$7, "_typeof$7"); -function ownKeys$7(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$7, "ownKeys$7"); -function _objectSpread$7(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$7(Object(t), true).forEach(function(r2) { - _defineProperty$7(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$7, "_objectSpread$7"); -function _defineProperty$7(e, r, t) { - return (r = _toPropertyKey$7(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$7, "_defineProperty$7"); -function _toPropertyKey$7(t) { - var i = _toPrimitive$7(t, "string"); - return "symbol" == _typeof$7(i) ? i : i + ""; -} -__name(_toPropertyKey$7, "_toPropertyKey$7"); -function _toPrimitive$7(t, r) { - if ("object" != _typeof$7(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$7(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$7, "_toPrimitive$7"); -var _hoisted_1$2 = ["colspan", "rowspan", "data-p-frozen-column"]; -function render$6(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("td", mergeProps({ - style: $options.containerStyle, - "class": $options.containerClass, - role: "cell", - colspan: $options.columnProp("colspan"), - rowspan: $options.columnProp("rowspan") - }, _objectSpread$7(_objectSpread$7({}, $options.getColumnPT("root")), $options.getColumnPT("footerCell")), { - "data-p-frozen-column": $options.columnProp("frozen") - }), [$props.column.children && $props.column.children.footer ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.footer), { - key: 0, - column: $props.column - }, null, 8, ["column"])) : createCommentVNode("", true), $options.columnProp("footer") ? (openBlock(), createElementBlock("span", mergeProps({ - key: 1, - "class": _ctx.cx("columnFooter") - }, $options.getColumnPT("columnFooter")), toDisplayString($options.columnProp("footer")), 17)) : createCommentVNode("", true)], 16, _hoisted_1$2); -} -__name(render$6, "render$6"); -script$6.render = render$6; -function _createForOfIteratorHelper$1(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e) { - t && (r = t); - var _n = 0, F = /* @__PURE__ */ __name(function F2() { - }, "F"); - return { s: F, n: /* @__PURE__ */ __name(function n() { - return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; - }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { - throw r2; - }, "e"), f: F }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, a = true, u = false; - return { s: /* @__PURE__ */ __name(function s() { - t = t.call(r); - }, "s"), n: /* @__PURE__ */ __name(function n() { - var r2 = t.next(); - return a = r2.done, r2; - }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { - u = true, o = r2; - }, "e"), f: /* @__PURE__ */ __name(function f() { - try { - a || null == t["return"] || t["return"](); - } finally { - if (u) throw o; - } - }, "f") }; -} -__name(_createForOfIteratorHelper$1, "_createForOfIteratorHelper$1"); -function _unsupportedIterableToArray$1(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray$1(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; - } -} -__name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray$1"); -function _arrayLikeToArray$1(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -__name(_arrayLikeToArray$1, "_arrayLikeToArray$1"); -var script$5 = { - name: "TableFooter", - hostName: "DataTable", - "extends": script$s, - props: { - columnGroup: { - type: null, - "default": null - }, - columns: { - type: Object, - "default": null - } - }, - provide: /* @__PURE__ */ __name(function provide5() { - return { - $rows: this.d_footerRows, - $columns: this.d_footerColumns - }; - }, "provide"), - data: /* @__PURE__ */ __name(function data7() { - return { - d_footerRows: new _default({ - type: "Row" - }), - d_footerColumns: new _default({ - type: "Column" - }) - }; - }, "data"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount2() { - this.d_footerRows.clear(); - this.d_footerColumns.clear(); - }, "beforeUnmount"), - methods: { - columnProp: /* @__PURE__ */ __name(function columnProp4(col, prop) { - return getVNodeProp(col, prop); - }, "columnProp"), - getColumnGroupPT: /* @__PURE__ */ __name(function getColumnGroupPT(key) { - var columnGroupMetaData = { - props: this.getColumnGroupProps(), - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - type: "footer", - scrollable: this.ptmTFootOptions.context.scrollable - } - }; - return mergeProps(this.ptm("columnGroup.".concat(key), { - columnGroup: columnGroupMetaData - }), this.ptm("columnGroup.".concat(key), columnGroupMetaData), this.ptmo(this.getColumnGroupProps(), key, columnGroupMetaData)); - }, "getColumnGroupPT"), - getColumnGroupProps: /* @__PURE__ */ __name(function getColumnGroupProps() { - return this.columnGroup && this.columnGroup.props && this.columnGroup.props.pt ? this.columnGroup.props.pt : void 0; - }, "getColumnGroupProps"), - getRowPT: /* @__PURE__ */ __name(function getRowPT(row2, key, index) { - var rowMetaData = { - props: row2.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - index - } - }; - return mergeProps(this.ptm("row.".concat(key), { - row: rowMetaData - }), this.ptm("row.".concat(key), rowMetaData), this.ptmo(this.getRowProp(row2), key, rowMetaData)); - }, "getRowPT"), - getRowProp: /* @__PURE__ */ __name(function getRowProp(row2) { - return row2.props && row2.props.pt ? row2.props.pt : void 0; - }, "getRowProp"), - getFooterRows: /* @__PURE__ */ __name(function getFooterRows() { - var _this$d_footerRows; - return (_this$d_footerRows = this.d_footerRows) === null || _this$d_footerRows === void 0 ? void 0 : _this$d_footerRows.get(this.columnGroup, this.columnGroup.children); - }, "getFooterRows"), - getFooterColumns: /* @__PURE__ */ __name(function getFooterColumns(row2) { - var _this$d_footerColumns; - return (_this$d_footerColumns = this.d_footerColumns) === null || _this$d_footerColumns === void 0 ? void 0 : _this$d_footerColumns.get(row2, row2.children); - }, "getFooterColumns") - }, - computed: { - hasFooter: /* @__PURE__ */ __name(function hasFooter() { - var hasFooter2 = false; - if (this.columnGroup) { - hasFooter2 = true; - } else if (this.columns) { - var _iterator = _createForOfIteratorHelper$1(this.columns), _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done; ) { - var col = _step.value; - if (this.columnProp(col, "footer") || col.children && col.children.footer) { - hasFooter2 = true; - break; - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - return hasFooter2; - }, "hasFooter"), - ptmTFootOptions: /* @__PURE__ */ __name(function ptmTFootOptions() { - var _this$$parentInstance; - return { - context: { - scrollable: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 || (_this$$parentInstance = _this$$parentInstance.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.scrollable - } - }; - }, "ptmTFootOptions") - }, - components: { - DTFooterCell: script$6 - } -}; -function _typeof$6(o) { - "@babel/helpers - typeof"; - return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$6(o); -} -__name(_typeof$6, "_typeof$6"); -function ownKeys$6(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$6, "ownKeys$6"); -function _objectSpread$6(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$6(Object(t), true).forEach(function(r2) { - _defineProperty$6(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$6, "_objectSpread$6"); -function _defineProperty$6(e, r, t) { - return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$6, "_defineProperty$6"); -function _toPropertyKey$6(t) { - var i = _toPrimitive$6(t, "string"); - return "symbol" == _typeof$6(i) ? i : i + ""; -} -__name(_toPropertyKey$6, "_toPropertyKey$6"); -function _toPrimitive$6(t, r) { - if ("object" != _typeof$6(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$6(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$6, "_toPrimitive$6"); -function render$5(_ctx, _cache, $props, $setup, $data, $options) { - var _component_DTFooterCell = resolveComponent("DTFooterCell"); - return $options.hasFooter ? (openBlock(), createElementBlock("tfoot", mergeProps({ - key: 0, - "class": _ctx.cx("tfoot"), - style: _ctx.sx("tfoot"), - role: "rowgroup" - }, $props.columnGroup ? _objectSpread$6(_objectSpread$6({}, _ctx.ptm("tfoot", $options.ptmTFootOptions)), $options.getColumnGroupPT("root")) : _ctx.ptm("tfoot", $options.ptmTFootOptions), { - "data-pc-section": "tfoot" - }), [!$props.columnGroup ? (openBlock(), createElementBlock("tr", mergeProps({ - key: 0, - role: "row" - }, _ctx.ptm("footerRow")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.columns, function(col, i) { - return openBlock(), createElementBlock(Fragment, { - key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || i - }, [!$options.columnProp(col, "hidden") ? (openBlock(), createBlock(_component_DTFooterCell, { - key: 0, - column: col, - pt: _ctx.pt - }, null, 8, ["column", "pt"])) : createCommentVNode("", true)], 64); - }), 128))], 16)) : (openBlock(true), createElementBlock(Fragment, { - key: 1 - }, renderList($options.getFooterRows(), function(row2, i) { - return openBlock(), createElementBlock("tr", mergeProps({ - key: i, - role: "row", - ref_for: true - }, _objectSpread$6(_objectSpread$6({}, _ctx.ptm("footerRow")), $options.getRowPT(row2, "root", i))), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.getFooterColumns(row2), function(col, j) { - return openBlock(), createElementBlock(Fragment, { - key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || j - }, [!$options.columnProp(col, "hidden") ? (openBlock(), createBlock(_component_DTFooterCell, { - key: 0, - column: col, - index: i, - pt: _ctx.pt - }, null, 8, ["column", "index", "pt"])) : createCommentVNode("", true)], 64); - }), 128))], 16); - }), 128))], 16)) : createCommentVNode("", true); -} -__name(render$5, "render$5"); -script$5.render = render$5; -function _typeof$5(o) { - "@babel/helpers - typeof"; - return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$5(o); -} -__name(_typeof$5, "_typeof$5"); -function ownKeys$5(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$5, "ownKeys$5"); -function _objectSpread$5(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$5(Object(t), true).forEach(function(r2) { - _defineProperty$5(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$5, "_objectSpread$5"); -function _defineProperty$5(e, r, t) { - return (r = _toPropertyKey$5(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$5, "_defineProperty$5"); -function _toPropertyKey$5(t) { - var i = _toPrimitive$5(t, "string"); - return "symbol" == _typeof$5(i) ? i : i + ""; -} -__name(_toPropertyKey$5, "_toPropertyKey$5"); -function _toPrimitive$5(t, r) { - if ("object" != _typeof$5(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$5(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$5, "_toPrimitive$5"); -var script$4 = { - name: "ColumnFilter", - hostName: "DataTable", - "extends": script$s, - emits: ["filter-change", "filter-apply", "operator-change", "matchmode-change", "constraint-add", "constraint-remove", "filter-clear", "apply-click"], - props: { - field: { - type: String, - "default": null - }, - type: { - type: String, - "default": "text" - }, - display: { - type: String, - "default": null - }, - showMenu: { - type: Boolean, - "default": true - }, - matchMode: { - type: String, - "default": null - }, - showOperator: { - type: Boolean, - "default": true - }, - showClearButton: { - type: Boolean, - "default": true - }, - showApplyButton: { - type: Boolean, - "default": true - }, - showMatchModes: { - type: Boolean, - "default": true - }, - showAddButton: { - type: Boolean, - "default": true - }, - matchModeOptions: { - type: Array, - "default": null - }, - maxConstraints: { - type: Number, - "default": 2 - }, - filterElement: { - type: Function, - "default": null - }, - filterHeaderTemplate: { - type: Function, - "default": null - }, - filterFooterTemplate: { - type: Function, - "default": null - }, - filterClearTemplate: { - type: Function, - "default": null - }, - filterApplyTemplate: { - type: Function, - "default": null - }, - filterIconTemplate: { - type: Function, - "default": null - }, - filterAddIconTemplate: { - type: Function, - "default": null - }, - filterRemoveIconTemplate: { - type: Function, - "default": null - }, - filterClearIconTemplate: { - type: Function, - "default": null - }, - filters: { - type: Object, - "default": null - }, - filtersStore: { - type: Object, - "default": null - }, - filterMenuClass: { - type: String, - "default": null - }, - filterMenuStyle: { - type: null, - "default": null - }, - filterInputProps: { - type: null, - "default": null - }, - filterButtonProps: { - type: null, - "default": null - }, - column: null - }, - data: /* @__PURE__ */ __name(function data8() { - return { - id: this.$attrs.id, - overlayVisible: false, - defaultMatchMode: null, - defaultOperator: null - }; - }, "data"), - watch: { - "$attrs.id": /* @__PURE__ */ __name(function $attrsId(newValue) { - this.id = newValue || UniqueComponentId(); - }, "$attrsId") - }, - overlay: null, - selfClick: false, - overlayEventListener: null, - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount3() { - if (this.overlayEventListener) { - OverlayEventBus.off("overlay-click", this.overlayEventListener); - this.overlayEventListener = null; - } - if (this.overlay) { - ZIndex.clear(this.overlay); - this.onOverlayHide(); - } - }, "beforeUnmount"), - mounted: /* @__PURE__ */ __name(function mounted6() { - this.id = this.id || UniqueComponentId(); - if (this.filters && this.filters[this.field]) { - var fieldFilters = this.filters[this.field]; - if (fieldFilters.operator) { - this.defaultMatchMode = fieldFilters.constraints[0].matchMode; - this.defaultOperator = fieldFilters.operator; - } else { - this.defaultMatchMode = this.filters[this.field].matchMode; - } - } - }, "mounted"), - methods: { - getColumnPT: /* @__PURE__ */ __name(function getColumnPT6(key, params) { - var columnMetaData = _objectSpread$5({ - props: this.column.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - } - }, params); - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); - }, "getColumnPT"), - getColumnProp: /* @__PURE__ */ __name(function getColumnProp5() { - return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; - }, "getColumnProp"), - ptmFilterConstraintOptions: /* @__PURE__ */ __name(function ptmFilterConstraintOptions(matchMode) { - return { - context: { - highlighted: matchMode && this.isRowMatchModeSelected(matchMode.value) - } - }; - }, "ptmFilterConstraintOptions"), - clearFilter: /* @__PURE__ */ __name(function clearFilter() { - var _filters = _objectSpread$5({}, this.filters); - if (_filters[this.field].operator) { - _filters[this.field].constraints.splice(1); - _filters[this.field].operator = this.defaultOperator; - _filters[this.field].constraints[0] = { - value: null, - matchMode: this.defaultMatchMode - }; - } else { - _filters[this.field].value = null; - _filters[this.field].matchMode = this.defaultMatchMode; - } - this.$emit("filter-clear"); - this.$emit("filter-change", _filters); - this.$emit("filter-apply"); - this.hide(); - }, "clearFilter"), - applyFilter: /* @__PURE__ */ __name(function applyFilter() { - this.$emit("apply-click", { - field: this.field, - constraints: this.filters[this.field] - }); - this.$emit("filter-apply"); - this.hide(); - }, "applyFilter"), - hasFilter: /* @__PURE__ */ __name(function hasFilter() { - if (this.filtersStore) { - var fieldFilter = this.filtersStore[this.field]; - if (fieldFilter) { - if (fieldFilter.operator) return !this.isFilterBlank(fieldFilter.constraints[0].value); - else return !this.isFilterBlank(fieldFilter.value); - } - } - return false; - }, "hasFilter"), - hasRowFilter: /* @__PURE__ */ __name(function hasRowFilter() { - return this.filters[this.field] && !this.isFilterBlank(this.filters[this.field].value); - }, "hasRowFilter"), - isFilterBlank: /* @__PURE__ */ __name(function isFilterBlank(filter3) { - if (filter3 !== null && filter3 !== void 0) { - if (typeof filter3 === "string" && filter3.trim().length == 0 || filter3 instanceof Array && filter3.length == 0) return true; - else return false; - } - return true; - }, "isFilterBlank"), - toggleMenu: /* @__PURE__ */ __name(function toggleMenu(event2) { - this.overlayVisible = !this.overlayVisible; - event2.preventDefault(); - }, "toggleMenu"), - onToggleButtonKeyDown: /* @__PURE__ */ __name(function onToggleButtonKeyDown(event2) { - switch (event2.code) { - case "Enter": - case "NumpadEnter": - case "Space": - this.toggleMenu(event2); - break; - case "Escape": - this.overlayVisible = false; - break; - } - }, "onToggleButtonKeyDown"), - onRowMatchModeChange: /* @__PURE__ */ __name(function onRowMatchModeChange(matchMode) { - var _filters = _objectSpread$5({}, this.filters); - _filters[this.field].matchMode = matchMode; - this.$emit("matchmode-change", { - field: this.field, - matchMode - }); - this.$emit("filter-change", _filters); - this.$emit("filter-apply"); - this.hide(); - }, "onRowMatchModeChange"), - onRowMatchModeKeyDown: /* @__PURE__ */ __name(function onRowMatchModeKeyDown(event2) { - var item = event2.target; - switch (event2.code) { - case "ArrowDown": - var nextItem = this.findNextItem(item); - if (nextItem) { - item.removeAttribute("tabindex"); - nextItem.tabIndex = "0"; - nextItem.focus(); - } - event2.preventDefault(); - break; - case "ArrowUp": - var prevItem = this.findPrevItem(item); - if (prevItem) { - item.removeAttribute("tabindex"); - prevItem.tabIndex = "0"; - prevItem.focus(); - } - event2.preventDefault(); - break; - } - }, "onRowMatchModeKeyDown"), - isRowMatchModeSelected: /* @__PURE__ */ __name(function isRowMatchModeSelected(matchMode) { - return this.filters[this.field].matchMode === matchMode; - }, "isRowMatchModeSelected"), - onOperatorChange: /* @__PURE__ */ __name(function onOperatorChange(value) { - var _filters = _objectSpread$5({}, this.filters); - _filters[this.field].operator = value; - this.$emit("filter-change", _filters); - this.$emit("operator-change", { - field: this.field, - operator: value - }); - if (!this.showApplyButton) { - this.$emit("filter-apply"); - } - }, "onOperatorChange"), - onMenuMatchModeChange: /* @__PURE__ */ __name(function onMenuMatchModeChange(value, index) { - var _filters = _objectSpread$5({}, this.filters); - _filters[this.field].constraints[index].matchMode = value; - this.$emit("matchmode-change", { - field: this.field, - matchMode: value, - index - }); - if (!this.showApplyButton) { - this.$emit("filter-apply"); - } - }, "onMenuMatchModeChange"), - addConstraint: /* @__PURE__ */ __name(function addConstraint() { - var _filters = _objectSpread$5({}, this.filters); - var newConstraint = { - value: null, - matchMode: this.defaultMatchMode - }; - _filters[this.field].constraints.push(newConstraint); - this.$emit("constraint-add", { - field: this.field, - constraing: newConstraint - }); - this.$emit("filter-change", _filters); - if (!this.showApplyButton) { - this.$emit("filter-apply"); - } - }, "addConstraint"), - removeConstraint: /* @__PURE__ */ __name(function removeConstraint(index) { - var _filters = _objectSpread$5({}, this.filters); - var removedConstraint = _filters[this.field].constraints.splice(index, 1); - this.$emit("constraint-remove", { - field: this.field, - constraing: removedConstraint - }); - this.$emit("filter-change", _filters); - if (!this.showApplyButton) { - this.$emit("filter-apply"); - } - }, "removeConstraint"), - filterCallback: /* @__PURE__ */ __name(function filterCallback() { - this.$emit("filter-apply"); - }, "filterCallback"), - findNextItem: /* @__PURE__ */ __name(function findNextItem(item) { - var nextItem = item.nextElementSibling; - if (nextItem) return getAttribute(nextItem, "data-pc-section") === "filterconstraintseparator" ? this.findNextItem(nextItem) : nextItem; - else return item.parentElement.firstElementChild; - }, "findNextItem"), - findPrevItem: /* @__PURE__ */ __name(function findPrevItem(item) { - var prevItem = item.previousElementSibling; - if (prevItem) return getAttribute(prevItem, "data-pc-section") === "filterconstraintseparator" ? this.findPrevItem(prevItem) : prevItem; - else return item.parentElement.lastElementChild; - }, "findPrevItem"), - hide: /* @__PURE__ */ __name(function hide() { - this.overlayVisible = false; - this.showMenuButton && focus(this.$refs.icon.$el); - }, "hide"), - onContentClick: /* @__PURE__ */ __name(function onContentClick(event2) { - this.selfClick = true; - OverlayEventBus.emit("overlay-click", { - originalEvent: event2, - target: this.overlay - }); - }, "onContentClick"), - onContentMouseDown: /* @__PURE__ */ __name(function onContentMouseDown() { - this.selfClick = true; - }, "onContentMouseDown"), - onOverlayEnter: /* @__PURE__ */ __name(function onOverlayEnter(el) { - var _this = this; - if (this.filterMenuStyle) { - addStyle(this.overlay, this.filterMenuStyle); - } - ZIndex.set("overlay", el, this.$primevue.config.zIndex.overlay); - addStyle(el, { - position: "absolute", - top: "0", - left: "0" - }); - absolutePosition(this.overlay, this.$refs.icon.$el); - this.bindOutsideClickListener(); - this.bindScrollListener(); - this.bindResizeListener(); - this.overlayEventListener = function(e) { - if (!_this.isOutsideClicked(e.target)) { - _this.selfClick = true; - } - }; - OverlayEventBus.on("overlay-click", this.overlayEventListener); - }, "onOverlayEnter"), - onOverlayAfterEnter: /* @__PURE__ */ __name(function onOverlayAfterEnter() { - var _this$overlay; - (_this$overlay = this.overlay) === null || _this$overlay === void 0 || (_this$overlay = _this$overlay.$focustrap) === null || _this$overlay === void 0 || _this$overlay.autoFocus(); - }, "onOverlayAfterEnter"), - onOverlayLeave: /* @__PURE__ */ __name(function onOverlayLeave() { - this.onOverlayHide(); - }, "onOverlayLeave"), - onOverlayAfterLeave: /* @__PURE__ */ __name(function onOverlayAfterLeave(el) { - ZIndex.clear(el); - }, "onOverlayAfterLeave"), - onOverlayHide: /* @__PURE__ */ __name(function onOverlayHide() { - this.unbindOutsideClickListener(); - this.unbindResizeListener(); - this.unbindScrollListener(); - this.overlay = null; - OverlayEventBus.off("overlay-click", this.overlayEventListener); - this.overlayEventListener = null; - }, "onOverlayHide"), - overlayRef: /* @__PURE__ */ __name(function overlayRef(el) { - this.overlay = el; - }, "overlayRef"), - isOutsideClicked: /* @__PURE__ */ __name(function isOutsideClicked(target) { - return !this.isTargetClicked(target) && this.overlay && !(this.overlay.isSameNode(target) || this.overlay.contains(target)); - }, "isOutsideClicked"), - isTargetClicked: /* @__PURE__ */ __name(function isTargetClicked(target) { - return this.$refs.icon && (this.$refs.icon.$el.isSameNode(target) || this.$refs.icon.$el.contains(target)); - }, "isTargetClicked"), - bindOutsideClickListener: /* @__PURE__ */ __name(function bindOutsideClickListener() { - var _this2 = this; - if (!this.outsideClickListener) { - this.outsideClickListener = function(event2) { - if (_this2.overlayVisible && !_this2.selfClick && _this2.isOutsideClicked(event2.target)) { - _this2.overlayVisible = false; - } - _this2.selfClick = false; - }; - document.addEventListener("click", this.outsideClickListener); - } - }, "bindOutsideClickListener"), - unbindOutsideClickListener: /* @__PURE__ */ __name(function unbindOutsideClickListener() { - if (this.outsideClickListener) { - document.removeEventListener("click", this.outsideClickListener); - this.outsideClickListener = null; - this.selfClick = false; - } - }, "unbindOutsideClickListener"), - bindScrollListener: /* @__PURE__ */ __name(function bindScrollListener() { - var _this3 = this; - if (!this.scrollHandler) { - this.scrollHandler = new ConnectedOverlayScrollHandler(this.$refs.icon.$el, function() { - if (_this3.overlayVisible) { - _this3.hide(); - } - }); - } - this.scrollHandler.bindScrollListener(); - }, "bindScrollListener"), - unbindScrollListener: /* @__PURE__ */ __name(function unbindScrollListener() { - if (this.scrollHandler) { - this.scrollHandler.unbindScrollListener(); - } - }, "unbindScrollListener"), - bindResizeListener: /* @__PURE__ */ __name(function bindResizeListener() { - var _this4 = this; - if (!this.resizeListener) { - this.resizeListener = function() { - if (_this4.overlayVisible && !isTouchDevice()) { - _this4.hide(); - } - }; - window.addEventListener("resize", this.resizeListener); - } - }, "bindResizeListener"), - unbindResizeListener: /* @__PURE__ */ __name(function unbindResizeListener() { - if (this.resizeListener) { - window.removeEventListener("resize", this.resizeListener); - this.resizeListener = null; - } - }, "unbindResizeListener") - }, - computed: { - showMenuButton: /* @__PURE__ */ __name(function showMenuButton() { - return this.showMenu && (this.display === "row" ? this.type !== "boolean" : true); - }, "showMenuButton"), - overlayId: /* @__PURE__ */ __name(function overlayId() { - return this.id + "_overlay"; - }, "overlayId"), - matchModes: /* @__PURE__ */ __name(function matchModes() { - var _this5 = this; - return this.matchModeOptions || this.$primevue.config.filterMatchModeOptions[this.type].map(function(key) { - return { - label: _this5.$primevue.config.locale[key], - value: key - }; - }); - }, "matchModes"), - isShowMatchModes: /* @__PURE__ */ __name(function isShowMatchModes() { - return this.type !== "boolean" && this.showMatchModes && this.matchModes; - }, "isShowMatchModes"), - operatorOptions: /* @__PURE__ */ __name(function operatorOptions() { - return [{ - label: this.$primevue.config.locale.matchAll, - value: FilterOperator.AND - }, { - label: this.$primevue.config.locale.matchAny, - value: FilterOperator.OR - }]; - }, "operatorOptions"), - noFilterLabel: /* @__PURE__ */ __name(function noFilterLabel() { - return this.$primevue.config.locale ? this.$primevue.config.locale.noFilter : void 0; - }, "noFilterLabel"), - isShowOperator: /* @__PURE__ */ __name(function isShowOperator() { - return this.showOperator && this.filters[this.field].operator; - }, "isShowOperator"), - operator: /* @__PURE__ */ __name(function operator() { - return this.filters[this.field].operator; - }, "operator"), - fieldConstraints: /* @__PURE__ */ __name(function fieldConstraints() { - return this.filters[this.field].constraints || [this.filters[this.field]]; - }, "fieldConstraints"), - showRemoveIcon: /* @__PURE__ */ __name(function showRemoveIcon() { - return this.fieldConstraints.length > 1; - }, "showRemoveIcon"), - removeRuleButtonLabel: /* @__PURE__ */ __name(function removeRuleButtonLabel() { - return this.$primevue.config.locale ? this.$primevue.config.locale.removeRule : void 0; - }, "removeRuleButtonLabel"), - addRuleButtonLabel: /* @__PURE__ */ __name(function addRuleButtonLabel() { - return this.$primevue.config.locale ? this.$primevue.config.locale.addRule : void 0; - }, "addRuleButtonLabel"), - isShowAddConstraint: /* @__PURE__ */ __name(function isShowAddConstraint() { - return this.showAddButton && this.filters[this.field].operator && this.fieldConstraints && this.fieldConstraints.length < this.maxConstraints; - }, "isShowAddConstraint"), - clearButtonLabel: /* @__PURE__ */ __name(function clearButtonLabel() { - return this.$primevue.config.locale ? this.$primevue.config.locale.clear : void 0; - }, "clearButtonLabel"), - applyButtonLabel: /* @__PURE__ */ __name(function applyButtonLabel() { - return this.$primevue.config.locale ? this.$primevue.config.locale.apply : void 0; - }, "applyButtonLabel"), - columnFilterButtonAriaLabel: /* @__PURE__ */ __name(function columnFilterButtonAriaLabel() { - return this.$primevue.config.locale ? this.overlayVisible ? this.$primevue.config.locale.showFilterMenu : this.$primevue.config.locale.hideFilterMenu : void 0; - }, "columnFilterButtonAriaLabel"), - filterOperatorAriaLabel: /* @__PURE__ */ __name(function filterOperatorAriaLabel() { - return this.$primevue.config.locale ? this.$primevue.config.locale.filterOperator : void 0; - }, "filterOperatorAriaLabel"), - filterRuleAriaLabel: /* @__PURE__ */ __name(function filterRuleAriaLabel() { - return this.$primevue.config.locale ? this.$primevue.config.locale.filterConstraint : void 0; - }, "filterRuleAriaLabel"), - ptmHeaderFilterClearParams: /* @__PURE__ */ __name(function ptmHeaderFilterClearParams() { - return { - context: { - hidden: this.hasRowFilter() - } - }; - }, "ptmHeaderFilterClearParams"), - ptmFilterMenuParams: /* @__PURE__ */ __name(function ptmFilterMenuParams() { - return { - context: { - overlayVisible: this.overlayVisible, - active: this.hasFilter() - } - }; - }, "ptmFilterMenuParams") - }, - components: { - Select: script$u, - Button: script$z, - Portal: script$E, - FilterSlashIcon: script$h, - FilterIcon: script$i, - TrashIcon: script$g, - PlusIcon: script$F - }, - directives: { - focustrap: FocusTrap - } -}; -function _typeof$4(o) { - "@babel/helpers - typeof"; - return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$4(o); -} -__name(_typeof$4, "_typeof$4"); -function ownKeys$4(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$4, "ownKeys$4"); -function _objectSpread$4(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$4(Object(t), true).forEach(function(r2) { - _defineProperty$4(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$4, "_objectSpread$4"); -function _defineProperty$4(e, r, t) { - return (r = _toPropertyKey$4(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$4, "_defineProperty$4"); -function _toPropertyKey$4(t) { - var i = _toPrimitive$4(t, "string"); - return "symbol" == _typeof$4(i) ? i : i + ""; -} -__name(_toPropertyKey$4, "_toPropertyKey$4"); -function _toPrimitive$4(t, r) { - if ("object" != _typeof$4(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$4(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$4, "_toPrimitive$4"); -var _hoisted_1$1 = ["id", "aria-modal"]; -var _hoisted_2 = ["onClick", "onKeydown", "tabindex"]; -function render$4(_ctx, _cache, $props, $setup, $data, $options) { - var _component_Button = resolveComponent("Button"); - var _component_Select = resolveComponent("Select"); - var _component_Portal = resolveComponent("Portal"); - var _directive_focustrap = resolveDirective("focustrap"); - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("filter") - }, $options.getColumnPT("filter")), [$props.display === "row" ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - "class": _ctx.cx("filterElementContainer") - }, _objectSpread$4(_objectSpread$4({}, $props.filterInputProps), $options.getColumnPT("filterElementContainer"))), [(openBlock(), createBlock(resolveDynamicComponent($props.filterElement), { - field: $props.field, - filterModel: $props.filters[$props.field], - filterCallback: $options.filterCallback - }, null, 8, ["field", "filterModel", "filterCallback"]))], 16)) : createCommentVNode("", true), $options.showMenuButton ? (openBlock(), createBlock(_component_Button, mergeProps({ - key: 1, - ref: "icon", - "aria-label": $options.columnFilterButtonAriaLabel, - "aria-haspopup": "true", - "aria-expanded": $data.overlayVisible, - "aria-controls": $options.overlayId, - "class": _ctx.cx("pcColumnFilterButton"), - unstyled: _ctx.unstyled, - onClick: _cache[0] || (_cache[0] = function($event) { - return $options.toggleMenu($event); - }), - onKeydown: _cache[1] || (_cache[1] = function($event) { - return $options.onToggleButtonKeyDown($event); - }) - }, _objectSpread$4(_objectSpread$4({}, $options.getColumnPT("pcColumnFilterButton", $options.ptmFilterMenuParams)), $props.filterButtonProps.filter)), { - icon: withCtx(function(slotProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.filterIconTemplate || "FilterIcon"), mergeProps({ - "class": slotProps["class"] - }, $options.getColumnPT("filterMenuIcon")), null, 16, ["class"]))]; - }), - _: 1 - }, 16, ["aria-label", "aria-expanded", "aria-controls", "class", "unstyled"])) : createCommentVNode("", true), $props.showClearButton && $props.display === "row" && $options.hasRowFilter() ? (openBlock(), createBlock(_component_Button, mergeProps({ - key: 2, - "class": _ctx.cx("pcColumnFilterClearButton"), - unstyled: _ctx.unstyled, - onClick: _cache[2] || (_cache[2] = function($event) { - return $options.clearFilter(); - }) - }, _objectSpread$4(_objectSpread$4({}, $options.getColumnPT("pcColumnFilterClearButton", $options.ptmHeaderFilterClearParams)), $props.filterButtonProps.inline.clear)), { - icon: withCtx(function(slotProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.filterClearIconTemplate || "FilterSlashIcon"), mergeProps({ - "class": slotProps["class"] - }, $options.getColumnPT("filterClearIcon")), null, 16, ["class"]))]; - }), - _: 1 - }, 16, ["class", "unstyled"])) : createCommentVNode("", true), createVNode(_component_Portal, null, { - "default": withCtx(function() { - return [createVNode(Transition, mergeProps({ - name: "p-connected-overlay", - onEnter: $options.onOverlayEnter, - onAfterEnter: $options.onOverlayAfterEnter, - onLeave: $options.onOverlayLeave, - onAfterLeave: $options.onOverlayAfterLeave - }, $options.getColumnPT("transition")), { - "default": withCtx(function() { - return [$data.overlayVisible ? withDirectives((openBlock(), createElementBlock("div", mergeProps({ - key: 0, - ref: $options.overlayRef, - id: $options.overlayId, - "aria-modal": $data.overlayVisible, - role: "dialog", - "class": [_ctx.cx("filterOverlay"), $props.filterMenuClass], - onKeydown: _cache[10] || (_cache[10] = withKeys(function() { - return $options.hide && $options.hide.apply($options, arguments); - }, ["escape"])), - onClick: _cache[11] || (_cache[11] = function() { - return $options.onContentClick && $options.onContentClick.apply($options, arguments); - }), - onMousedown: _cache[12] || (_cache[12] = function() { - return $options.onContentMouseDown && $options.onContentMouseDown.apply($options, arguments); - }) - }, $options.getColumnPT("filterOverlay")), [(openBlock(), createBlock(resolveDynamicComponent($props.filterHeaderTemplate), { - field: $props.field, - filterModel: $props.filters[$props.field], - filterCallback: $options.filterCallback - }, null, 8, ["field", "filterModel", "filterCallback"])), $props.display === "row" ? (openBlock(), createElementBlock("ul", mergeProps({ - key: 0, - "class": _ctx.cx("filterConstraintList") - }, $options.getColumnPT("filterConstraintList")), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.matchModes, function(matchMode, i) { - return openBlock(), createElementBlock("li", mergeProps({ - key: matchMode.label, - "class": _ctx.cx("filterConstraint", { - matchMode - }), - onClick: /* @__PURE__ */ __name(function onClick3($event) { - return $options.onRowMatchModeChange(matchMode.value); - }, "onClick"), - onKeydown: [_cache[3] || (_cache[3] = function($event) { - return $options.onRowMatchModeKeyDown($event); - }), withKeys(withModifiers(function($event) { - return $options.onRowMatchModeChange(matchMode.value); - }, ["prevent"]), ["enter"])], - tabindex: i === 0 ? "0" : null, - ref_for: true - }, $options.getColumnPT("filterConstraint", $options.ptmFilterConstraintOptions(matchMode))), toDisplayString(matchMode.label), 17, _hoisted_2); - }), 128)), createBaseVNode("li", mergeProps({ - "class": _ctx.cx("filterConstraintSeparator") - }, $options.getColumnPT("filterConstraintSeparator")), null, 16), createBaseVNode("li", mergeProps({ - "class": _ctx.cx("filterConstraint"), - onClick: _cache[4] || (_cache[4] = function($event) { - return $options.clearFilter(); - }), - onKeydown: [_cache[5] || (_cache[5] = function($event) { - return $options.onRowMatchModeKeyDown($event); - }), _cache[6] || (_cache[6] = withKeys(function($event) { - return _ctx.onRowClearItemClick(); - }, ["enter"]))] - }, $options.getColumnPT("filterConstraint")), toDisplayString($options.noFilterLabel), 17)], 16)) : (openBlock(), createElementBlock(Fragment, { - key: 1 - }, [$options.isShowOperator ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - "class": _ctx.cx("filterOperator") - }, $options.getColumnPT("filterOperator")), [createVNode(_component_Select, { - options: $options.operatorOptions, - modelValue: $options.operator, - "aria-label": $options.filterOperatorAriaLabel, - "class": normalizeClass(_ctx.cx("pcFilterOperatorDropdown")), - optionLabel: "label", - optionValue: "value", - "onUpdate:modelValue": _cache[7] || (_cache[7] = function($event) { - return $options.onOperatorChange($event); - }), - unstyled: _ctx.unstyled, - pt: $options.getColumnPT("pcFilterOperatorDropdown") - }, null, 8, ["options", "modelValue", "aria-label", "class", "unstyled", "pt"])], 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("filterRuleList") - }, $options.getColumnPT("filterRuleList")), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.fieldConstraints, function(fieldConstraint, i) { - return openBlock(), createElementBlock("div", mergeProps({ - key: i, - "class": _ctx.cx("filterRule"), - ref_for: true - }, $options.getColumnPT("filterRule")), [$options.isShowMatchModes ? (openBlock(), createBlock(_component_Select, { - key: 0, - options: $options.matchModes, - modelValue: fieldConstraint.matchMode, - "class": normalizeClass(_ctx.cx("pcFilterConstraintDropdown")), - optionLabel: "label", - optionValue: "value", - "aria-label": $options.filterRuleAriaLabel, - "onUpdate:modelValue": /* @__PURE__ */ __name(function onUpdateModelValue($event) { - return $options.onMenuMatchModeChange($event, i); - }, "onUpdateModelValue"), - unstyled: _ctx.unstyled, - pt: $options.getColumnPT("pcFilterConstraintDropdown") - }, null, 8, ["options", "modelValue", "class", "aria-label", "onUpdate:modelValue", "unstyled", "pt"])) : createCommentVNode("", true), $props.display === "menu" ? (openBlock(), createBlock(resolveDynamicComponent($props.filterElement), { - key: 1, - field: $props.field, - filterModel: fieldConstraint, - filterCallback: $options.filterCallback, - applyFilter: $options.applyFilter - }, null, 8, ["field", "filterModel", "filterCallback", "applyFilter"])) : createCommentVNode("", true), $options.showRemoveIcon ? (openBlock(), createElementBlock("div", mergeProps({ - key: 2, - ref_for: true - }, $options.getColumnPT("filterRemove")), [createVNode(_component_Button, mergeProps({ - type: "button", - "class": _ctx.cx("pcFilterRemoveRuleButton"), - onClick: /* @__PURE__ */ __name(function onClick3($event) { - return $options.removeConstraint(i); - }, "onClick"), - label: $options.removeRuleButtonLabel, - unstyled: _ctx.unstyled, - ref_for: true - }, $props.filterButtonProps.popover.removeRule, { - pt: $options.getColumnPT("pcFilterRemoveRuleButton") - }), { - icon: withCtx(function(iconProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.filterRemoveIconTemplate || "TrashIcon"), mergeProps({ - "class": iconProps["class"], - ref_for: true - }, $options.getColumnPT("pcFilterRemoveRuleButton")["icon"]), null, 16, ["class"]))]; - }), - _: 2 - }, 1040, ["class", "onClick", "label", "unstyled", "pt"])], 16)) : createCommentVNode("", true)], 16); - }), 128))], 16), $options.isShowAddConstraint ? (openBlock(), createElementBlock("div", normalizeProps(mergeProps({ - key: 1 - }, $options.getColumnPT("filterAddButtonContainer"))), [createVNode(_component_Button, mergeProps({ - type: "button", - label: $options.addRuleButtonLabel, - iconPos: "left", - "class": _ctx.cx("pcFilterAddRuleButton"), - onClick: _cache[8] || (_cache[8] = function($event) { - return $options.addConstraint(); - }), - unstyled: _ctx.unstyled - }, $props.filterButtonProps.popover.addRule, { - pt: $options.getColumnPT("pcFilterAddRuleButton") - }), { - icon: withCtx(function(iconProps) { - return [(openBlock(), createBlock(resolveDynamicComponent($props.filterAddIconTemplate || "PlusIcon"), mergeProps({ - "class": iconProps["class"] - }, $options.getColumnPT("pcFilterAddRuleButton")["icon"]), null, 16, ["class"]))]; - }), - _: 1 - }, 16, ["label", "class", "unstyled", "pt"])], 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("filterButtonbar") - }, $options.getColumnPT("filterButtonbar")), [!$props.filterClearTemplate && $props.showClearButton ? (openBlock(), createBlock(_component_Button, mergeProps({ - key: 0, - type: "button", - "class": _ctx.cx("pcFilterClearButton"), - label: $options.clearButtonLabel, - onClick: $options.clearFilter, - unstyled: _ctx.unstyled - }, $props.filterButtonProps.popover.clear, { - pt: $options.getColumnPT("pcFilterClearButton") - }), null, 16, ["class", "label", "onClick", "unstyled", "pt"])) : (openBlock(), createBlock(resolveDynamicComponent($props.filterClearTemplate), { - key: 1, - field: $props.field, - filterModel: $props.filters[$props.field], - filterCallback: $options.clearFilter - }, null, 8, ["field", "filterModel", "filterCallback"])), $props.showApplyButton ? (openBlock(), createElementBlock(Fragment, { - key: 2 - }, [!$props.filterApplyTemplate ? (openBlock(), createBlock(_component_Button, mergeProps({ - key: 0, - type: "button", - "class": _ctx.cx("pcFilterApplyButton"), - label: $options.applyButtonLabel, - onClick: _cache[9] || (_cache[9] = function($event) { - return $options.applyFilter(); - }), - unstyled: _ctx.unstyled - }, $props.filterButtonProps.popover.apply, { - pt: $options.getColumnPT("pcFilterApplyButton") - }), null, 16, ["class", "label", "unstyled", "pt"])) : (openBlock(), createBlock(resolveDynamicComponent($props.filterApplyTemplate), { - key: 1, - field: $props.field, - filterModel: $props.filters[$props.field], - filterCallback: $options.applyFilter - }, null, 8, ["field", "filterModel", "filterCallback"]))], 64)) : createCommentVNode("", true)], 16)], 64)), (openBlock(), createBlock(resolveDynamicComponent($props.filterFooterTemplate), { - field: $props.field, - filterModel: $props.filters[$props.field], - filterCallback: $options.filterCallback - }, null, 8, ["field", "filterModel", "filterCallback"]))], 16, _hoisted_1$1)), [[_directive_focustrap]]) : createCommentVNode("", true)]; - }), - _: 1 - }, 16, ["onEnter", "onAfterEnter", "onLeave", "onAfterLeave"])]; - }), - _: 1 - })], 16); -} -__name(render$4, "render$4"); -script$4.render = render$4; -var script$3 = { - name: "HeaderCheckbox", - hostName: "DataTable", - "extends": script$s, - emits: ["change"], - props: { - checked: null, - disabled: null, - column: null, - headerCheckboxIconTemplate: { - type: Function, - "default": null - } - }, - methods: { - getColumnPT: /* @__PURE__ */ __name(function getColumnPT7(key) { - var columnMetaData = { - props: this.column.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - checked: this.checked, - disabled: this.disabled - } - }; - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); - }, "getColumnPT"), - getColumnProp: /* @__PURE__ */ __name(function getColumnProp6() { - return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; - }, "getColumnProp"), - onChange: /* @__PURE__ */ __name(function onChange7(event2) { - this.$emit("change", { - originalEvent: event2, - checked: !this.checked - }); - }, "onChange") - }, - computed: { - headerCheckboxAriaLabel: /* @__PURE__ */ __name(function headerCheckboxAriaLabel() { - return this.$primevue.config.locale.aria ? this.checked ? this.$primevue.config.locale.aria.selectAll : this.$primevue.config.locale.aria.unselectAll : void 0; - }, "headerCheckboxAriaLabel") - }, - components: { - CheckIcon: script$x, - Checkbox: script$y - } -}; -function render$3(_ctx, _cache, $props, $setup, $data, $options) { - var _component_CheckIcon = resolveComponent("CheckIcon"); - var _component_Checkbox = resolveComponent("Checkbox"); - return openBlock(), createBlock(_component_Checkbox, { - modelValue: $props.checked, - binary: true, - disabled: $props.disabled, - "aria-label": $options.headerCheckboxAriaLabel, - onChange: $options.onChange, - pt: $options.getColumnPT("pcHeaderCheckbox") - }, { - icon: withCtx(function(slotProps) { - return [$props.headerCheckboxIconTemplate ? (openBlock(), createBlock(resolveDynamicComponent($props.headerCheckboxIconTemplate), { - key: 0, - checked: slotProps.checked, - "class": normalizeClass(slotProps["class"]) - }, null, 8, ["checked", "class"])) : !$props.headerCheckboxIconTemplate && slotProps.checked ? (openBlock(), createBlock(_component_CheckIcon, mergeProps({ - key: 1, - "class": slotProps["class"] - }, $options.getColumnPT("pcHeaderCheckbox")["icon"]), null, 16, ["class"])) : createCommentVNode("", true)]; - }), - _: 1 - }, 8, ["modelValue", "disabled", "aria-label", "onChange", "pt"]); -} -__name(render$3, "render$3"); -script$3.render = render$3; -var script$2 = { - name: "HeaderCell", - hostName: "DataTable", - "extends": script$s, - emits: ["column-click", "column-mousedown", "column-dragstart", "column-dragover", "column-dragleave", "column-drop", "column-resizestart", "checkbox-change", "filter-change", "filter-apply", "operator-change", "matchmode-change", "constraint-add", "constraint-remove", "filter-clear", "apply-click"], - props: { - column: { - type: Object, - "default": null - }, - index: { - type: Number, - "default": null - }, - resizableColumns: { - type: Boolean, - "default": false - }, - groupRowsBy: { - type: [Array, String, Function], - "default": null - }, - sortMode: { - type: String, - "default": "single" - }, - groupRowSortField: { - type: [String, Function], - "default": null - }, - sortField: { - type: [String, Function], - "default": null - }, - sortOrder: { - type: Number, - "default": null - }, - multiSortMeta: { - type: Array, - "default": null - }, - allRowsSelected: { - type: Boolean, - "default": false - }, - empty: { - type: Boolean, - "default": false - }, - filterDisplay: { - type: String, - "default": null - }, - filters: { - type: Object, - "default": null - }, - filtersStore: { - type: Object, - "default": null - }, - filterColumn: { - type: Boolean, - "default": false - }, - reorderableColumns: { - type: Boolean, - "default": false - }, - filterInputProps: { - type: null, - "default": null - }, - filterButtonProps: { - type: null, - "default": null - } - }, - data: /* @__PURE__ */ __name(function data9() { - return { - styleObject: {} - }; - }, "data"), - mounted: /* @__PURE__ */ __name(function mounted7() { - if (this.columnProp("frozen")) { - this.updateStickyPosition(); - } - }, "mounted"), - updated: /* @__PURE__ */ __name(function updated4() { - if (this.columnProp("frozen")) { - this.updateStickyPosition(); - } - }, "updated"), - methods: { - columnProp: /* @__PURE__ */ __name(function columnProp5(prop) { - return getVNodeProp(this.column, prop); - }, "columnProp"), - getColumnPT: /* @__PURE__ */ __name(function getColumnPT8(key) { - var _this$$parentInstance, _this$$parentInstance2; - var columnMetaData = { - props: this.column.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - index: this.index, - sortable: this.columnProp("sortable") === "" || this.columnProp("sortable"), - sorted: this.isColumnSorted(), - resizable: this.resizableColumns, - size: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 || (_this$$parentInstance = _this$$parentInstance.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.size, - showGridlines: ((_this$$parentInstance2 = this.$parentInstance) === null || _this$$parentInstance2 === void 0 || (_this$$parentInstance2 = _this$$parentInstance2.$parentInstance) === null || _this$$parentInstance2 === void 0 ? void 0 : _this$$parentInstance2.showGridlines) || false - } - }; - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(), key, columnMetaData)); - }, "getColumnPT"), - getColumnProp: /* @__PURE__ */ __name(function getColumnProp7() { - return this.column.props && this.column.props.pt ? this.column.props.pt : void 0; - }, "getColumnProp"), - onClick: /* @__PURE__ */ __name(function onClick2(event2) { - this.$emit("column-click", { - originalEvent: event2, - column: this.column - }); - }, "onClick"), - onKeyDown: /* @__PURE__ */ __name(function onKeyDown2(event2) { - if ((event2.code === "Enter" || event2.code === "NumpadEnter" || event2.code === "Space") && event2.currentTarget.nodeName === "TH" && getAttribute(event2.currentTarget, "data-p-sortable-column")) { - this.$emit("column-click", { - originalEvent: event2, - column: this.column - }); - event2.preventDefault(); - } - }, "onKeyDown"), - onMouseDown: /* @__PURE__ */ __name(function onMouseDown(event2) { - this.$emit("column-mousedown", { - originalEvent: event2, - column: this.column - }); - }, "onMouseDown"), - onDragStart: /* @__PURE__ */ __name(function onDragStart(event2) { - this.$emit("column-dragstart", { - originalEvent: event2, - column: this.column - }); - }, "onDragStart"), - onDragOver: /* @__PURE__ */ __name(function onDragOver(event2) { - this.$emit("column-dragover", { - originalEvent: event2, - column: this.column - }); - }, "onDragOver"), - onDragLeave: /* @__PURE__ */ __name(function onDragLeave(event2) { - this.$emit("column-dragleave", { - originalEvent: event2, - column: this.column - }); - }, "onDragLeave"), - onDrop: /* @__PURE__ */ __name(function onDrop(event2) { - this.$emit("column-drop", { - originalEvent: event2, - column: this.column - }); - }, "onDrop"), - onResizeStart: /* @__PURE__ */ __name(function onResizeStart(event2) { - this.$emit("column-resizestart", event2); - }, "onResizeStart"), - getMultiSortMetaIndex: /* @__PURE__ */ __name(function getMultiSortMetaIndex() { - var _this = this; - return this.multiSortMeta.findIndex(function(meta) { - return meta.field === _this.columnProp("field") || meta.field === _this.columnProp("sortField"); - }); - }, "getMultiSortMetaIndex"), - getBadgeValue: /* @__PURE__ */ __name(function getBadgeValue() { - var index = this.getMultiSortMetaIndex(); - return this.groupRowsBy && this.groupRowsBy === this.groupRowSortField && index > -1 ? index : index + 1; - }, "getBadgeValue"), - isMultiSorted: /* @__PURE__ */ __name(function isMultiSorted() { - return this.sortMode === "multiple" && this.columnProp("sortable") && this.getMultiSortMetaIndex() > -1; - }, "isMultiSorted"), - isColumnSorted: /* @__PURE__ */ __name(function isColumnSorted() { - return this.sortMode === "single" ? this.sortField && (this.sortField === this.columnProp("field") || this.sortField === this.columnProp("sortField")) : this.isMultiSorted(); - }, "isColumnSorted"), - updateStickyPosition: /* @__PURE__ */ __name(function updateStickyPosition3() { - if (this.columnProp("frozen")) { - var align = this.columnProp("alignFrozen"); - if (align === "right") { - var right = 0; - var next2 = getNextElementSibling(this.$el, '[data-p-frozen-column="true"]'); - if (next2) { - right = getOuterWidth(next2) + parseFloat(next2.style.right || 0); - } - this.styleObject.right = right + "px"; - } else { - var left = 0; - var prev2 = getPreviousElementSibling(this.$el, '[data-p-frozen-column="true"]'); - if (prev2) { - left = getOuterWidth(prev2) + parseFloat(prev2.style.left || 0); - } - this.styleObject.left = left + "px"; - } - var filterRow = this.$el.parentElement.nextElementSibling; - if (filterRow) { - var index = getIndex(this.$el); - if (filterRow.children[index]) { - filterRow.children[index].style.left = this.styleObject.left; - filterRow.children[index].style.right = this.styleObject.right; - } - } - } - }, "updateStickyPosition"), - onHeaderCheckboxChange: /* @__PURE__ */ __name(function onHeaderCheckboxChange(event2) { - this.$emit("checkbox-change", event2); - }, "onHeaderCheckboxChange") - }, - computed: { - containerClass: /* @__PURE__ */ __name(function containerClass3() { - return [this.cx("headerCell"), this.filterColumn ? this.columnProp("filterHeaderClass") : this.columnProp("headerClass"), this.columnProp("class")]; - }, "containerClass"), - containerStyle: /* @__PURE__ */ __name(function containerStyle3() { - var headerStyle = this.filterColumn ? this.columnProp("filterHeaderStyle") : this.columnProp("headerStyle"); - var columnStyle = this.columnProp("style"); - return this.columnProp("frozen") ? [columnStyle, headerStyle, this.styleObject] : [columnStyle, headerStyle]; - }, "containerStyle"), - sortState: /* @__PURE__ */ __name(function sortState() { - var sorted2 = false; - var sortOrder2 = null; - if (this.sortMode === "single") { - sorted2 = this.sortField && (this.sortField === this.columnProp("field") || this.sortField === this.columnProp("sortField")); - sortOrder2 = sorted2 ? this.sortOrder : 0; - } else if (this.sortMode === "multiple") { - var metaIndex = this.getMultiSortMetaIndex(); - if (metaIndex > -1) { - sorted2 = true; - sortOrder2 = this.multiSortMeta[metaIndex].order; - } - } - return { - sorted: sorted2, - sortOrder: sortOrder2 - }; - }, "sortState"), - sortableColumnIcon: /* @__PURE__ */ __name(function sortableColumnIcon() { - var _this$sortState = this.sortState, sorted2 = _this$sortState.sorted, sortOrder2 = _this$sortState.sortOrder; - if (!sorted2) return script$f; - else if (sorted2 && sortOrder2 > 0) return script$d; - else if (sorted2 && sortOrder2 < 0) return script$e; - return null; - }, "sortableColumnIcon"), - ariaSort: /* @__PURE__ */ __name(function ariaSort() { - if (this.columnProp("sortable")) { - var _this$sortState2 = this.sortState, sorted2 = _this$sortState2.sorted, sortOrder2 = _this$sortState2.sortOrder; - if (sorted2 && sortOrder2 < 0) return "descending"; - else if (sorted2 && sortOrder2 > 0) return "ascending"; - else return "none"; - } else { - return null; - } - }, "ariaSort") - }, - components: { - Badge: script$G, - DTHeaderCheckbox: script$3, - DTColumnFilter: script$4, - SortAltIcon: script$f, - SortAmountUpAltIcon: script$d, - SortAmountDownIcon: script$e - } -}; -function _typeof$3(o) { - "@babel/helpers - typeof"; - return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$3(o); -} -__name(_typeof$3, "_typeof$3"); -function ownKeys$3(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$3, "ownKeys$3"); -function _objectSpread$3(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$3(Object(t), true).forEach(function(r2) { - _defineProperty$3(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$3, "_objectSpread$3"); -function _defineProperty$3(e, r, t) { - return (r = _toPropertyKey$3(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$3, "_defineProperty$3"); -function _toPropertyKey$3(t) { - var i = _toPrimitive$3(t, "string"); - return "symbol" == _typeof$3(i) ? i : i + ""; -} -__name(_toPropertyKey$3, "_toPropertyKey$3"); -function _toPrimitive$3(t, r) { - if ("object" != _typeof$3(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$3(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$3, "_toPrimitive$3"); -var _hoisted_1 = ["tabindex", "colspan", "rowspan", "aria-sort", "data-p-sortable-column", "data-p-resizable-column", "data-p-sorted", "data-p-filter-column", "data-p-frozen-column", "data-p-reorderable-column"]; -function render$2(_ctx, _cache, $props, $setup, $data, $options) { - var _component_Badge = resolveComponent("Badge"); - var _component_DTHeaderCheckbox = resolveComponent("DTHeaderCheckbox"); - var _component_DTColumnFilter = resolveComponent("DTColumnFilter"); - return openBlock(), createElementBlock("th", mergeProps({ - style: $options.containerStyle, - "class": $options.containerClass, - tabindex: $options.columnProp("sortable") ? "0" : null, - role: "columnheader", - colspan: $options.columnProp("colspan"), - rowspan: $options.columnProp("rowspan"), - "aria-sort": $options.ariaSort, - onClick: _cache[8] || (_cache[8] = function() { - return $options.onClick && $options.onClick.apply($options, arguments); - }), - onKeydown: _cache[9] || (_cache[9] = function() { - return $options.onKeyDown && $options.onKeyDown.apply($options, arguments); - }), - onMousedown: _cache[10] || (_cache[10] = function() { - return $options.onMouseDown && $options.onMouseDown.apply($options, arguments); - }), - onDragstart: _cache[11] || (_cache[11] = function() { - return $options.onDragStart && $options.onDragStart.apply($options, arguments); - }), - onDragover: _cache[12] || (_cache[12] = function() { - return $options.onDragOver && $options.onDragOver.apply($options, arguments); - }), - onDragleave: _cache[13] || (_cache[13] = function() { - return $options.onDragLeave && $options.onDragLeave.apply($options, arguments); - }), - onDrop: _cache[14] || (_cache[14] = function() { - return $options.onDrop && $options.onDrop.apply($options, arguments); - }) - }, _objectSpread$3(_objectSpread$3({}, $options.getColumnPT("root")), $options.getColumnPT("headerCell")), { - "data-p-sortable-column": $options.columnProp("sortable"), - "data-p-resizable-column": $props.resizableColumns, - "data-p-sorted": $options.isColumnSorted(), - "data-p-filter-column": $props.filterColumn, - "data-p-frozen-column": $options.columnProp("frozen"), - "data-p-reorderable-column": $props.reorderableColumns - }), [$props.resizableColumns && !$options.columnProp("frozen") ? (openBlock(), createElementBlock("span", mergeProps({ - key: 0, - "class": _ctx.cx("columnResizer"), - onMousedown: _cache[0] || (_cache[0] = function() { - return $options.onResizeStart && $options.onResizeStart.apply($options, arguments); - }) - }, $options.getColumnPT("columnResizer")), null, 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("columnHeaderContent") - }, $options.getColumnPT("columnHeaderContent")), [$props.column.children && $props.column.children.header ? (openBlock(), createBlock(resolveDynamicComponent($props.column.children.header), { - key: 0, - column: $props.column - }, null, 8, ["column"])) : createCommentVNode("", true), $options.columnProp("header") ? (openBlock(), createElementBlock("span", mergeProps({ - key: 1, - "class": _ctx.cx("columnTitle") - }, $options.getColumnPT("columnTitle")), toDisplayString($options.columnProp("header")), 17)) : createCommentVNode("", true), $options.columnProp("sortable") ? (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ - key: 2 - }, $options.getColumnPT("sort"))), [(openBlock(), createBlock(resolveDynamicComponent($props.column.children && $props.column.children.sorticon || $options.sortableColumnIcon), mergeProps({ - sorted: $options.sortState.sorted, - sortOrder: $options.sortState.sortOrder, - "class": _ctx.cx("sortIcon") - }, $options.getColumnPT("sorticon")), null, 16, ["sorted", "sortOrder", "class"]))], 16)) : createCommentVNode("", true), $options.isMultiSorted() ? (openBlock(), createBlock(_component_Badge, { - key: 3, - "class": normalizeClass(_ctx.cx("pcSortBadge")), - pt: $options.getColumnPT("pcSortBadge"), - value: $options.getBadgeValue(), - size: "small" - }, null, 8, ["class", "pt", "value"])) : createCommentVNode("", true), $options.columnProp("selectionMode") === "multiple" && $props.filterDisplay !== "row" ? (openBlock(), createBlock(_component_DTHeaderCheckbox, { - key: 4, - checked: $props.allRowsSelected, - onChange: $options.onHeaderCheckboxChange, - disabled: $props.empty, - headerCheckboxIconTemplate: $props.column.children && $props.column.children.headercheckboxicon, - column: $props.column, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["checked", "onChange", "disabled", "headerCheckboxIconTemplate", "column", "unstyled", "pt"])) : createCommentVNode("", true), $props.filterDisplay === "menu" && $props.column.children && $props.column.children.filter ? (openBlock(), createBlock(_component_DTColumnFilter, { - key: 5, - field: $options.columnProp("filterField") || $options.columnProp("field"), - type: $options.columnProp("dataType"), - display: "menu", - showMenu: $options.columnProp("showFilterMenu"), - filterElement: $props.column.children && $props.column.children.filter, - filterHeaderTemplate: $props.column.children && $props.column.children.filterheader, - filterFooterTemplate: $props.column.children && $props.column.children.filterfooter, - filterClearTemplate: $props.column.children && $props.column.children.filterclear, - filterApplyTemplate: $props.column.children && $props.column.children.filterapply, - filterIconTemplate: $props.column.children && $props.column.children.filtericon, - filterAddIconTemplate: $props.column.children && $props.column.children.filteraddicon, - filterRemoveIconTemplate: $props.column.children && $props.column.children.filterremoveicon, - filterClearIconTemplate: $props.column.children && $props.column.children.filterclearicon, - filters: $props.filters, - filtersStore: $props.filtersStore, - filterInputProps: $props.filterInputProps, - filterButtonProps: $props.filterButtonProps, - onFilterChange: _cache[1] || (_cache[1] = function($event) { - return _ctx.$emit("filter-change", $event); - }), - onFilterApply: _cache[2] || (_cache[2] = function($event) { - return _ctx.$emit("filter-apply"); - }), - filterMenuStyle: $options.columnProp("filterMenuStyle"), - filterMenuClass: $options.columnProp("filterMenuClass"), - showOperator: $options.columnProp("showFilterOperator"), - showClearButton: $options.columnProp("showClearButton"), - showApplyButton: $options.columnProp("showApplyButton"), - showMatchModes: $options.columnProp("showFilterMatchModes"), - showAddButton: $options.columnProp("showAddButton"), - matchModeOptions: $options.columnProp("filterMatchModeOptions"), - maxConstraints: $options.columnProp("maxConstraints"), - onOperatorChange: _cache[3] || (_cache[3] = function($event) { - return _ctx.$emit("operator-change", $event); - }), - onMatchmodeChange: _cache[4] || (_cache[4] = function($event) { - return _ctx.$emit("matchmode-change", $event); - }), - onConstraintAdd: _cache[5] || (_cache[5] = function($event) { - return _ctx.$emit("constraint-add", $event); - }), - onConstraintRemove: _cache[6] || (_cache[6] = function($event) { - return _ctx.$emit("constraint-remove", $event); - }), - onApplyClick: _cache[7] || (_cache[7] = function($event) { - return _ctx.$emit("apply-click", $event); - }), - column: $props.column, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["field", "type", "showMenu", "filterElement", "filterHeaderTemplate", "filterFooterTemplate", "filterClearTemplate", "filterApplyTemplate", "filterIconTemplate", "filterAddIconTemplate", "filterRemoveIconTemplate", "filterClearIconTemplate", "filters", "filtersStore", "filterInputProps", "filterButtonProps", "filterMenuStyle", "filterMenuClass", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "matchModeOptions", "maxConstraints", "column", "unstyled", "pt"])) : createCommentVNode("", true)], 16)], 16, _hoisted_1); -} -__name(render$2, "render$2"); -script$2.render = render$2; -var script$1 = { - name: "TableHeader", - hostName: "DataTable", - "extends": script$s, - emits: ["column-click", "column-mousedown", "column-dragstart", "column-dragover", "column-dragleave", "column-drop", "column-resizestart", "checkbox-change", "filter-change", "filter-apply", "operator-change", "matchmode-change", "constraint-add", "constraint-remove", "filter-clear", "apply-click"], - props: { - columnGroup: { - type: null, - "default": null - }, - columns: { - type: null, - "default": null - }, - rowGroupMode: { - type: String, - "default": null - }, - groupRowsBy: { - type: [Array, String, Function], - "default": null - }, - resizableColumns: { - type: Boolean, - "default": false - }, - allRowsSelected: { - type: Boolean, - "default": false - }, - empty: { - type: Boolean, - "default": false - }, - sortMode: { - type: String, - "default": "single" - }, - groupRowSortField: { - type: [String, Function], - "default": null - }, - sortField: { - type: [String, Function], - "default": null - }, - sortOrder: { - type: Number, - "default": null - }, - multiSortMeta: { - type: Array, - "default": null - }, - filterDisplay: { - type: String, - "default": null - }, - filters: { - type: Object, - "default": null - }, - filtersStore: { - type: Object, - "default": null - }, - reorderableColumns: { - type: Boolean, - "default": false - }, - first: { - type: Number, - "default": 0 - }, - filterInputProps: { - type: null, - "default": null - }, - filterButtonProps: { - type: null, - "default": null - } - }, - provide: /* @__PURE__ */ __name(function provide6() { - return { - $rows: this.d_headerRows, - $columns: this.d_headerColumns - }; - }, "provide"), - data: /* @__PURE__ */ __name(function data10() { - return { - d_headerRows: new _default({ - type: "Row" - }), - d_headerColumns: new _default({ - type: "Column" - }) - }; - }, "data"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount4() { - this.d_headerRows.clear(); - this.d_headerColumns.clear(); - }, "beforeUnmount"), - methods: { - columnProp: /* @__PURE__ */ __name(function columnProp6(col, prop) { - return getVNodeProp(col, prop); - }, "columnProp"), - getColumnGroupPT: /* @__PURE__ */ __name(function getColumnGroupPT2(key) { - var _this$$parentInstance; - var columnGroupMetaData = { - props: this.getColumnGroupProps(), - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - type: "header", - scrollable: (_this$$parentInstance = this.$parentInstance) === null || _this$$parentInstance === void 0 || (_this$$parentInstance = _this$$parentInstance.$parentInstance) === null || _this$$parentInstance === void 0 ? void 0 : _this$$parentInstance.scrollable - } - }; - return mergeProps(this.ptm("columnGroup.".concat(key), { - columnGroup: columnGroupMetaData - }), this.ptm("columnGroup.".concat(key), columnGroupMetaData), this.ptmo(this.getColumnGroupProps(), key, columnGroupMetaData)); - }, "getColumnGroupPT"), - getColumnGroupProps: /* @__PURE__ */ __name(function getColumnGroupProps2() { - return this.columnGroup && this.columnGroup.props && this.columnGroup.props.pt ? this.columnGroup.props.pt : void 0; - }, "getColumnGroupProps"), - getRowPT: /* @__PURE__ */ __name(function getRowPT2(row2, key, index) { - var rowMetaData = { - props: row2.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - index - } - }; - return mergeProps(this.ptm("row.".concat(key), { - row: rowMetaData - }), this.ptm("row.".concat(key), rowMetaData), this.ptmo(this.getRowProp(row2), key, rowMetaData)); - }, "getRowPT"), - getRowProp: /* @__PURE__ */ __name(function getRowProp2(row2) { - return row2.props && row2.props.pt ? row2.props.pt : void 0; - }, "getRowProp"), - getColumnPT: /* @__PURE__ */ __name(function getColumnPT9(column, key, index) { - var columnMetaData = { - props: column.props, - parent: { - instance: this, - props: this.$props, - state: this.$data - }, - context: { - index - } - }; - return mergeProps(this.ptm("column.".concat(key), { - column: columnMetaData - }), this.ptm("column.".concat(key), columnMetaData), this.ptmo(this.getColumnProp(column), key, columnMetaData)); - }, "getColumnPT"), - getColumnProp: /* @__PURE__ */ __name(function getColumnProp8(column) { - return column.props && column.props.pt ? column.props.pt : void 0; - }, "getColumnProp"), - getFilterColumnHeaderClass: /* @__PURE__ */ __name(function getFilterColumnHeaderClass(column) { - return [this.cx("headerCell", { - column - }), this.columnProp(column, "filterHeaderClass"), this.columnProp(column, "class")]; - }, "getFilterColumnHeaderClass"), - getFilterColumnHeaderStyle: /* @__PURE__ */ __name(function getFilterColumnHeaderStyle(column) { - return [this.columnProp(column, "filterHeaderStyle"), this.columnProp(column, "style")]; - }, "getFilterColumnHeaderStyle"), - getHeaderRows: /* @__PURE__ */ __name(function getHeaderRows() { - var _this$d_headerRows; - return (_this$d_headerRows = this.d_headerRows) === null || _this$d_headerRows === void 0 ? void 0 : _this$d_headerRows.get(this.columnGroup, this.columnGroup.children); - }, "getHeaderRows"), - getHeaderColumns: /* @__PURE__ */ __name(function getHeaderColumns(row2) { - var _this$d_headerColumns; - return (_this$d_headerColumns = this.d_headerColumns) === null || _this$d_headerColumns === void 0 ? void 0 : _this$d_headerColumns.get(row2, row2.children); - }, "getHeaderColumns") - }, - computed: { - ptmTHeadOptions: /* @__PURE__ */ __name(function ptmTHeadOptions() { - var _this$$parentInstance2; - return { - context: { - scrollable: (_this$$parentInstance2 = this.$parentInstance) === null || _this$$parentInstance2 === void 0 || (_this$$parentInstance2 = _this$$parentInstance2.$parentInstance) === null || _this$$parentInstance2 === void 0 ? void 0 : _this$$parentInstance2.scrollable - } - }; - }, "ptmTHeadOptions") - }, - components: { - DTHeaderCell: script$2, - DTHeaderCheckbox: script$3, - DTColumnFilter: script$4 - } -}; -function _typeof$2(o) { - "@babel/helpers - typeof"; - return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$2(o); -} -__name(_typeof$2, "_typeof$2"); -function ownKeys$2(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$2, "ownKeys$2"); -function _objectSpread$2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$2(Object(t), true).forEach(function(r2) { - _defineProperty$2(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$2, "_objectSpread$2"); -function _defineProperty$2(e, r, t) { - return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$2, "_defineProperty$2"); -function _toPropertyKey$2(t) { - var i = _toPrimitive$2(t, "string"); - return "symbol" == _typeof$2(i) ? i : i + ""; -} -__name(_toPropertyKey$2, "_toPropertyKey$2"); -function _toPrimitive$2(t, r) { - if ("object" != _typeof$2(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$2(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$2, "_toPrimitive$2"); -function render$1(_ctx, _cache, $props, $setup, $data, $options) { - var _component_DTHeaderCell = resolveComponent("DTHeaderCell"); - var _component_DTHeaderCheckbox = resolveComponent("DTHeaderCheckbox"); - var _component_DTColumnFilter = resolveComponent("DTColumnFilter"); - return openBlock(), createElementBlock("thead", mergeProps({ - "class": _ctx.cx("thead"), - style: _ctx.sx("thead"), - role: "rowgroup" - }, $props.columnGroup ? _objectSpread$2(_objectSpread$2({}, _ctx.ptm("thead", $options.ptmTHeadOptions)), $options.getColumnGroupPT("root")) : _ctx.ptm("thead", $options.ptmTHeadOptions), { - "data-pc-section": "thead" - }), [!$props.columnGroup ? (openBlock(), createElementBlock(Fragment, { - key: 0 - }, [createBaseVNode("tr", mergeProps({ - role: "row" - }, _ctx.ptm("headerRow")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.columns, function(col, i) { - return openBlock(), createElementBlock(Fragment, { - key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || i - }, [!$options.columnProp(col, "hidden") && ($props.rowGroupMode !== "subheader" || $props.groupRowsBy !== $options.columnProp(col, "field")) ? (openBlock(), createBlock(_component_DTHeaderCell, { - key: 0, - column: col, - index: i, - onColumnClick: _cache[0] || (_cache[0] = function($event) { - return _ctx.$emit("column-click", $event); - }), - onColumnMousedown: _cache[1] || (_cache[1] = function($event) { - return _ctx.$emit("column-mousedown", $event); - }), - onColumnDragstart: _cache[2] || (_cache[2] = function($event) { - return _ctx.$emit("column-dragstart", $event); - }), - onColumnDragover: _cache[3] || (_cache[3] = function($event) { - return _ctx.$emit("column-dragover", $event); - }), - onColumnDragleave: _cache[4] || (_cache[4] = function($event) { - return _ctx.$emit("column-dragleave", $event); - }), - onColumnDrop: _cache[5] || (_cache[5] = function($event) { - return _ctx.$emit("column-drop", $event); - }), - groupRowsBy: $props.groupRowsBy, - groupRowSortField: $props.groupRowSortField, - reorderableColumns: $props.reorderableColumns, - resizableColumns: $props.resizableColumns, - onColumnResizestart: _cache[6] || (_cache[6] = function($event) { - return _ctx.$emit("column-resizestart", $event); - }), - sortMode: $props.sortMode, - sortField: $props.sortField, - sortOrder: $props.sortOrder, - multiSortMeta: $props.multiSortMeta, - allRowsSelected: $props.allRowsSelected, - empty: $props.empty, - onCheckboxChange: _cache[7] || (_cache[7] = function($event) { - return _ctx.$emit("checkbox-change", $event); - }), - filters: $props.filters, - filterDisplay: $props.filterDisplay, - filtersStore: $props.filtersStore, - filterInputProps: $props.filterInputProps, - filterButtonProps: $props.filterButtonProps, - first: $props.first, - onFilterChange: _cache[8] || (_cache[8] = function($event) { - return _ctx.$emit("filter-change", $event); - }), - onFilterApply: _cache[9] || (_cache[9] = function($event) { - return _ctx.$emit("filter-apply"); - }), - onOperatorChange: _cache[10] || (_cache[10] = function($event) { - return _ctx.$emit("operator-change", $event); - }), - onMatchmodeChange: _cache[11] || (_cache[11] = function($event) { - return _ctx.$emit("matchmode-change", $event); - }), - onConstraintAdd: _cache[12] || (_cache[12] = function($event) { - return _ctx.$emit("constraint-add", $event); - }), - onConstraintRemove: _cache[13] || (_cache[13] = function($event) { - return _ctx.$emit("constraint-remove", $event); - }), - onApplyClick: _cache[14] || (_cache[14] = function($event) { - return _ctx.$emit("apply-click", $event); - }), - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["column", "index", "groupRowsBy", "groupRowSortField", "reorderableColumns", "resizableColumns", "sortMode", "sortField", "sortOrder", "multiSortMeta", "allRowsSelected", "empty", "filters", "filterDisplay", "filtersStore", "filterInputProps", "filterButtonProps", "first", "unstyled", "pt"])) : createCommentVNode("", true)], 64); - }), 128))], 16), $props.filterDisplay === "row" ? (openBlock(), createElementBlock("tr", mergeProps({ - key: 0, - role: "row" - }, _ctx.ptm("headerRow")), [(openBlock(true), createElementBlock(Fragment, null, renderList($props.columns, function(col, i) { - return openBlock(), createElementBlock(Fragment, { - key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || i - }, [!$options.columnProp(col, "hidden") && ($props.rowGroupMode !== "subheader" || $props.groupRowsBy !== $options.columnProp(col, "field")) ? (openBlock(), createElementBlock("th", mergeProps({ - key: 0, - style: $options.getFilterColumnHeaderStyle(col), - "class": $options.getFilterColumnHeaderClass(col), - ref_for: true - }, _objectSpread$2(_objectSpread$2({}, $options.getColumnPT(col, "root", i)), $options.getColumnPT(col, "headerCell", i))), [$options.columnProp(col, "selectionMode") === "multiple" ? (openBlock(), createBlock(_component_DTHeaderCheckbox, { - key: 0, - checked: $props.allRowsSelected, - disabled: $props.empty, - onChange: _cache[15] || (_cache[15] = function($event) { - return _ctx.$emit("checkbox-change", $event); - }), - column: col, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["checked", "disabled", "column", "unstyled", "pt"])) : createCommentVNode("", true), col.children && col.children.filter ? (openBlock(), createBlock(_component_DTColumnFilter, { - key: 1, - field: $options.columnProp(col, "filterField") || $options.columnProp(col, "field"), - type: $options.columnProp(col, "dataType"), - display: "row", - showMenu: $options.columnProp(col, "showFilterMenu"), - filterElement: col.children && col.children.filter, - filterHeaderTemplate: col.children && col.children.filterheader, - filterFooterTemplate: col.children && col.children.filterfooter, - filterClearTemplate: col.children && col.children.filterclear, - filterApplyTemplate: col.children && col.children.filterapply, - filterIconTemplate: col.children && col.children.filtericon, - filterAddIconTemplate: col.children && col.children.filteraddicon, - filterRemoveIconTemplate: col.children && col.children.filterremoveicon, - filterClearIconTemplate: col.children && col.children.filterclearicon, - filters: $props.filters, - filtersStore: $props.filtersStore, - filterInputProps: $props.filterInputProps, - filterButtonProps: $props.filterButtonProps, - onFilterChange: _cache[16] || (_cache[16] = function($event) { - return _ctx.$emit("filter-change", $event); - }), - onFilterApply: _cache[17] || (_cache[17] = function($event) { - return _ctx.$emit("filter-apply"); - }), - filterMenuStyle: $options.columnProp(col, "filterMenuStyle"), - filterMenuClass: $options.columnProp(col, "filterMenuClass"), - showOperator: $options.columnProp(col, "showFilterOperator"), - showClearButton: $options.columnProp(col, "showClearButton"), - showApplyButton: $options.columnProp(col, "showApplyButton"), - showMatchModes: $options.columnProp(col, "showFilterMatchModes"), - showAddButton: $options.columnProp(col, "showAddButton"), - matchModeOptions: $options.columnProp(col, "filterMatchModeOptions"), - maxConstraints: $options.columnProp(col, "maxConstraints"), - onOperatorChange: _cache[18] || (_cache[18] = function($event) { - return _ctx.$emit("operator-change", $event); - }), - onMatchmodeChange: _cache[19] || (_cache[19] = function($event) { - return _ctx.$emit("matchmode-change", $event); - }), - onConstraintAdd: _cache[20] || (_cache[20] = function($event) { - return _ctx.$emit("constraint-add", $event); - }), - onConstraintRemove: _cache[21] || (_cache[21] = function($event) { - return _ctx.$emit("constraint-remove", $event); - }), - onApplyClick: _cache[22] || (_cache[22] = function($event) { - return _ctx.$emit("apply-click", $event); - }), - column: col, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["field", "type", "showMenu", "filterElement", "filterHeaderTemplate", "filterFooterTemplate", "filterClearTemplate", "filterApplyTemplate", "filterIconTemplate", "filterAddIconTemplate", "filterRemoveIconTemplate", "filterClearIconTemplate", "filters", "filtersStore", "filterInputProps", "filterButtonProps", "filterMenuStyle", "filterMenuClass", "showOperator", "showClearButton", "showApplyButton", "showMatchModes", "showAddButton", "matchModeOptions", "maxConstraints", "column", "unstyled", "pt"])) : createCommentVNode("", true)], 16)) : createCommentVNode("", true)], 64); - }), 128))], 16)) : createCommentVNode("", true)], 64)) : (openBlock(true), createElementBlock(Fragment, { - key: 1 - }, renderList($options.getHeaderRows(), function(row2, i) { - return openBlock(), createElementBlock("tr", mergeProps({ - key: i, - role: "row", - ref_for: true - }, _objectSpread$2(_objectSpread$2({}, _ctx.ptm("headerRow")), $options.getRowPT(row2, "root", i))), [(openBlock(true), createElementBlock(Fragment, null, renderList($options.getHeaderColumns(row2), function(col, j) { - return openBlock(), createElementBlock(Fragment, { - key: $options.columnProp(col, "columnKey") || $options.columnProp(col, "field") || j - }, [!$options.columnProp(col, "hidden") && ($props.rowGroupMode !== "subheader" || $props.groupRowsBy !== $options.columnProp(col, "field")) && typeof col.children !== "string" ? (openBlock(), createBlock(_component_DTHeaderCell, { - key: 0, - column: col, - onColumnClick: _cache[23] || (_cache[23] = function($event) { - return _ctx.$emit("column-click", $event); - }), - onColumnMousedown: _cache[24] || (_cache[24] = function($event) { - return _ctx.$emit("column-mousedown", $event); - }), - groupRowsBy: $props.groupRowsBy, - groupRowSortField: $props.groupRowSortField, - sortMode: $props.sortMode, - sortField: $props.sortField, - sortOrder: $props.sortOrder, - multiSortMeta: $props.multiSortMeta, - allRowsSelected: $props.allRowsSelected, - empty: $props.empty, - onCheckboxChange: _cache[25] || (_cache[25] = function($event) { - return _ctx.$emit("checkbox-change", $event); - }), - filters: $props.filters, - filterDisplay: $props.filterDisplay, - filtersStore: $props.filtersStore, - onFilterChange: _cache[26] || (_cache[26] = function($event) { - return _ctx.$emit("filter-change", $event); - }), - onFilterApply: _cache[27] || (_cache[27] = function($event) { - return _ctx.$emit("filter-apply"); - }), - onOperatorChange: _cache[28] || (_cache[28] = function($event) { - return _ctx.$emit("operator-change", $event); - }), - onMatchmodeChange: _cache[29] || (_cache[29] = function($event) { - return _ctx.$emit("matchmode-change", $event); - }), - onConstraintAdd: _cache[30] || (_cache[30] = function($event) { - return _ctx.$emit("constraint-add", $event); - }), - onConstraintRemove: _cache[31] || (_cache[31] = function($event) { - return _ctx.$emit("constraint-remove", $event); - }), - onApplyClick: _cache[32] || (_cache[32] = function($event) { - return _ctx.$emit("apply-click", $event); - }), - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["column", "groupRowsBy", "groupRowSortField", "sortMode", "sortField", "sortOrder", "multiSortMeta", "allRowsSelected", "empty", "filters", "filterDisplay", "filtersStore", "unstyled", "pt"])) : createCommentVNode("", true)], 64); - }), 128))], 16); - }), 128))], 16); -} -__name(render$1, "render$1"); -script$1.render = render$1; -function _typeof$1(o) { - "@babel/helpers - typeof"; - return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof$1(o); -} -__name(_typeof$1, "_typeof$1"); -var _excluded = ["expanded"]; -function _objectWithoutProperties(e, t) { - if (null == e) return {}; - var o, r, i = _objectWithoutPropertiesLoose(e, t); - if (Object.getOwnPropertySymbols) { - var s = Object.getOwnPropertySymbols(e); - for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); - } - return i; -} -__name(_objectWithoutProperties, "_objectWithoutProperties"); -function _objectWithoutPropertiesLoose(r, e) { - if (null == r) return {}; - var t = {}; - for (var n in r) if ({}.hasOwnProperty.call(r, n)) { - if (e.includes(n)) continue; - t[n] = r[n]; - } - return t; -} -__name(_objectWithoutPropertiesLoose, "_objectWithoutPropertiesLoose"); -function ownKeys$1(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys$1, "ownKeys$1"); -function _objectSpread$1(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys$1(Object(t), true).forEach(function(r2) { - _defineProperty$1(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread$1, "_objectSpread$1"); -function _defineProperty$1(e, r, t) { - return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty$1, "_defineProperty$1"); -function _toPropertyKey$1(t) { - var i = _toPrimitive$1(t, "string"); - return "symbol" == _typeof$1(i) ? i : i + ""; -} -__name(_toPropertyKey$1, "_toPropertyKey$1"); -function _toPrimitive$1(t, r) { - if ("object" != _typeof$1(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof$1(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive$1, "_toPrimitive$1"); -function _slicedToArray(r, e) { - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); -} -__name(_slicedToArray, "_slicedToArray"); -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -__name(_nonIterableRest, "_nonIterableRest"); -function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, n, i, u, a = [], f = true, o = false; - try { - if (i = (t = t.call(r)).next, 0 === l) ; - else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; - } catch (r2) { - o = true, n = r2; - } finally { - try { - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -__name(_iterableToArrayLimit, "_iterableToArrayLimit"); -function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; -} -__name(_arrayWithHoles, "_arrayWithHoles"); -function _createForOfIteratorHelper(r, e) { - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (!t) { - if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { - t && (r = t); - var _n = 0, F = /* @__PURE__ */ __name(function F2() { - }, "F"); - return { s: F, n: /* @__PURE__ */ __name(function n() { - return _n >= r.length ? { done: true } : { done: false, value: r[_n++] }; - }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { - throw r2; - }, "e"), f: F }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - var o, a = true, u = false; - return { s: /* @__PURE__ */ __name(function s() { - t = t.call(r); - }, "s"), n: /* @__PURE__ */ __name(function n() { - var r2 = t.next(); - return a = r2.done, r2; - }, "n"), e: /* @__PURE__ */ __name(function e2(r2) { - u = true, o = r2; - }, "e"), f: /* @__PURE__ */ __name(function f() { - try { - a || null == t["return"] || t["return"](); - } finally { - if (u) throw o; - } - }, "f") }; -} -__name(_createForOfIteratorHelper, "_createForOfIteratorHelper"); -function _toConsumableArray(r) { - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); -} -__name(_toConsumableArray, "_toConsumableArray"); -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -__name(_nonIterableSpread, "_nonIterableSpread"); -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; - } -} -__name(_unsupportedIterableToArray, "_unsupportedIterableToArray"); -function _iterableToArray(r) { - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); -} -__name(_iterableToArray, "_iterableToArray"); -function _arrayWithoutHoles(r) { - if (Array.isArray(r)) return _arrayLikeToArray(r); -} -__name(_arrayWithoutHoles, "_arrayWithoutHoles"); -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -__name(_arrayLikeToArray, "_arrayLikeToArray"); -var script = { - name: "DataTable", - "extends": script$c, - inheritAttrs: false, - emits: ["value-change", "update:first", "update:rows", "page", "update:sortField", "update:sortOrder", "update:multiSortMeta", "sort", "filter", "row-click", "row-dblclick", "update:selection", "row-select", "row-unselect", "update:contextMenuSelection", "row-contextmenu", "row-unselect-all", "row-select-all", "select-all-change", "column-resize-end", "column-reorder", "row-reorder", "update:expandedRows", "row-collapse", "row-expand", "update:expandedRowGroups", "rowgroup-collapse", "rowgroup-expand", "update:filters", "state-restore", "state-save", "cell-edit-init", "cell-edit-complete", "cell-edit-cancel", "update:editingRows", "row-edit-init", "row-edit-save", "row-edit-cancel"], - provide: /* @__PURE__ */ __name(function provide7() { - return { - $columns: this.d_columns, - $columnGroups: this.d_columnGroups - }; - }, "provide"), - data: /* @__PURE__ */ __name(function data11() { - return { - d_first: this.first, - d_rows: this.rows, - d_sortField: this.sortField, - d_sortOrder: this.sortOrder, - d_nullSortOrder: this.nullSortOrder, - d_multiSortMeta: this.multiSortMeta ? _toConsumableArray(this.multiSortMeta) : [], - d_groupRowsSortMeta: null, - d_selectionKeys: null, - d_columnOrder: null, - d_editingRowKeys: null, - d_editingMeta: {}, - d_filters: this.cloneFilters(this.filters), - d_columns: new _default({ - type: "Column" - }), - d_columnGroups: new _default({ - type: "ColumnGroup" - }) - }; - }, "data"), - rowTouched: false, - anchorRowIndex: null, - rangeRowIndex: null, - documentColumnResizeListener: null, - documentColumnResizeEndListener: null, - lastResizeHelperX: null, - resizeColumnElement: null, - columnResizing: false, - colReorderIconWidth: null, - colReorderIconHeight: null, - draggedColumn: null, - draggedColumnElement: null, - draggedRowIndex: null, - droppedRowIndex: null, - rowDragging: null, - columnWidthsState: null, - tableWidthState: null, - columnWidthsRestored: false, - watch: { - first: /* @__PURE__ */ __name(function first3(newValue) { - this.d_first = newValue; - }, "first"), - rows: /* @__PURE__ */ __name(function rows2(newValue) { - this.d_rows = newValue; - }, "rows"), - sortField: /* @__PURE__ */ __name(function sortField(newValue) { - this.d_sortField = newValue; - }, "sortField"), - sortOrder: /* @__PURE__ */ __name(function sortOrder(newValue) { - this.d_sortOrder = newValue; - }, "sortOrder"), - nullSortOrder: /* @__PURE__ */ __name(function nullSortOrder(newValue) { - this.d_nullSortOrder = newValue; - }, "nullSortOrder"), - multiSortMeta: /* @__PURE__ */ __name(function multiSortMeta(newValue) { - this.d_multiSortMeta = newValue; - }, "multiSortMeta"), - selection: { - immediate: true, - handler: /* @__PURE__ */ __name(function handler2(newValue) { - if (this.dataKey) { - this.updateSelectionKeys(newValue); - } - }, "handler") - }, - editingRows: { - immediate: true, - handler: /* @__PURE__ */ __name(function handler3(newValue) { - if (this.dataKey) { - this.updateEditingRowKeys(newValue); - } - }, "handler") - }, - filters: { - deep: true, - handler: /* @__PURE__ */ __name(function handler4(newValue) { - this.d_filters = this.cloneFilters(newValue); - }, "handler") - } - }, - mounted: /* @__PURE__ */ __name(function mounted8() { - this.$el.setAttribute(this.attributeSelector, ""); - if (this.isStateful()) { - this.restoreState(); - this.resizableColumns && this.restoreColumnWidths(); - } - if (this.editMode === "row" && this.dataKey && !this.d_editingRowKeys) { - this.updateEditingRowKeys(this.editingRows); - } - }, "mounted"), - beforeUnmount: /* @__PURE__ */ __name(function beforeUnmount5() { - this.unbindColumnResizeEvents(); - this.destroyStyleElement(); - this.d_columns.clear(); - this.d_columnGroups.clear(); - }, "beforeUnmount"), - updated: /* @__PURE__ */ __name(function updated5() { - if (this.isStateful()) { - this.saveState(); - } - if (this.editMode === "row" && this.dataKey && !this.d_editingRowKeys) { - this.updateEditingRowKeys(this.editingRows); - } - }, "updated"), - methods: { - columnProp: /* @__PURE__ */ __name(function columnProp7(col, prop) { - return getVNodeProp(col, prop); - }, "columnProp"), - onPage: /* @__PURE__ */ __name(function onPage(event2) { - var _this = this; - this.clearEditingMetaData(); - this.d_first = event2.first; - this.d_rows = event2.rows; - var pageEvent = this.createLazyLoadEvent(event2); - pageEvent.pageCount = event2.pageCount; - pageEvent.page = event2.page; - this.$emit("update:first", this.d_first); - this.$emit("update:rows", this.d_rows); - this.$emit("page", pageEvent); - this.$nextTick(function() { - _this.$emit("value-change", _this.processedData); - }); - }, "onPage"), - onColumnHeaderClick: /* @__PURE__ */ __name(function onColumnHeaderClick(e) { - var _this2 = this; - var event2 = e.originalEvent; - var column = e.column; - if (this.columnProp(column, "sortable")) { - var targetNode = event2.target; - var columnField = this.columnProp(column, "sortField") || this.columnProp(column, "field"); - if (getAttribute(targetNode, "data-p-sortable-column") === true || getAttribute(targetNode, "data-pc-section") === "columntitle" || getAttribute(targetNode, "data-pc-section") === "columnheadercontent" || getAttribute(targetNode, "data-pc-section") === "sorticon" || getAttribute(targetNode.parentElement, "data-pc-section") === "sorticon" || getAttribute(targetNode.parentElement.parentElement, "data-pc-section") === "sorticon" || targetNode.closest('[data-p-sortable-column="true"]') && !targetNode.closest('[data-pc-section="columnfilterbutton"]') && !isClickable(event2.target)) { - clearSelection(); - if (this.sortMode === "single") { - if (this.d_sortField === columnField) { - if (this.removableSort && this.d_sortOrder * -1 === this.defaultSortOrder) { - this.d_sortOrder = null; - this.d_sortField = null; - } else { - this.d_sortOrder = this.d_sortOrder * -1; - } - } else { - this.d_sortOrder = this.defaultSortOrder; - this.d_sortField = columnField; - } - this.$emit("update:sortField", this.d_sortField); - this.$emit("update:sortOrder", this.d_sortOrder); - this.resetPage(); - } else if (this.sortMode === "multiple") { - var metaKey = event2.metaKey || event2.ctrlKey; - if (!metaKey) { - this.d_multiSortMeta = this.d_multiSortMeta.filter(function(meta) { - return meta.field === columnField; - }); - } - this.addMultiSortField(columnField); - this.$emit("update:multiSortMeta", this.d_multiSortMeta); - } - this.$emit("sort", this.createLazyLoadEvent(event2)); - this.$nextTick(function() { - _this2.$emit("value-change", _this2.processedData); - }); - } - } - }, "onColumnHeaderClick"), - sortSingle: /* @__PURE__ */ __name(function sortSingle(value) { - var _this3 = this; - this.clearEditingMetaData(); - if (this.groupRowsBy && this.groupRowsBy === this.sortField) { - this.d_multiSortMeta = [{ - field: this.sortField, - order: this.sortOrder || this.defaultSortOrder - }, { - field: this.d_sortField, - order: this.d_sortOrder - }]; - return this.sortMultiple(value); - } - var data12 = _toConsumableArray(value); - var resolvedFieldData = /* @__PURE__ */ new Map(); - var _iterator = _createForOfIteratorHelper(data12), _step; - try { - for (_iterator.s(); !(_step = _iterator.n()).done; ) { - var item = _step.value; - resolvedFieldData.set(item, resolveFieldData(item, this.d_sortField)); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - var comparer = localeComparator(); - data12.sort(function(data1, data22) { - var value1 = resolvedFieldData.get(data1); - var value2 = resolvedFieldData.get(data22); - return sort(value1, value2, _this3.d_sortOrder, comparer, _this3.d_nullSortOrder); - }); - return data12; - }, "sortSingle"), - sortMultiple: /* @__PURE__ */ __name(function sortMultiple(value) { - var _this4 = this; - this.clearEditingMetaData(); - if (this.groupRowsBy && (this.d_groupRowsSortMeta || this.d_multiSortMeta.length && this.groupRowsBy === this.d_multiSortMeta[0].field)) { - var firstSortMeta = this.d_multiSortMeta[0]; - !this.d_groupRowsSortMeta && (this.d_groupRowsSortMeta = firstSortMeta); - if (firstSortMeta.field !== this.d_groupRowsSortMeta.field) { - this.d_multiSortMeta = [this.d_groupRowsSortMeta].concat(_toConsumableArray(this.d_multiSortMeta)); - } - } - var data12 = _toConsumableArray(value); - data12.sort(function(data1, data22) { - return _this4.multisortField(data1, data22, 0); - }); - return data12; - }, "sortMultiple"), - multisortField: /* @__PURE__ */ __name(function multisortField(data1, data22, index) { - var value1 = resolveFieldData(data1, this.d_multiSortMeta[index].field); - var value2 = resolveFieldData(data22, this.d_multiSortMeta[index].field); - var comparer = localeComparator(); - if (value1 === value2) { - return this.d_multiSortMeta.length - 1 > index ? this.multisortField(data1, data22, index + 1) : 0; - } - return sort(value1, value2, this.d_multiSortMeta[index].order, comparer, this.d_nullSortOrder); - }, "multisortField"), - addMultiSortField: /* @__PURE__ */ __name(function addMultiSortField(field2) { - var index = this.d_multiSortMeta.findIndex(function(meta) { - return meta.field === field2; - }); - if (index >= 0) { - if (this.removableSort && this.d_multiSortMeta[index].order * -1 === this.defaultSortOrder) this.d_multiSortMeta.splice(index, 1); - else this.d_multiSortMeta[index] = { - field: field2, - order: this.d_multiSortMeta[index].order * -1 - }; - } else { - this.d_multiSortMeta.push({ - field: field2, - order: this.defaultSortOrder - }); - } - this.d_multiSortMeta = _toConsumableArray(this.d_multiSortMeta); - }, "addMultiSortField"), - getActiveFilters: /* @__PURE__ */ __name(function getActiveFilters(filters) { - var removeEmptyFilters = /* @__PURE__ */ __name(function removeEmptyFilters2(_ref) { - var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], value = _ref2[1]; - if (value.constraints) { - var filteredConstraints = value.constraints.filter(function(constraint) { - return constraint.value !== null; - }); - if (filteredConstraints.length > 0) { - return [key, _objectSpread$1(_objectSpread$1({}, value), {}, { - constraints: filteredConstraints - })]; - } - } else if (value.value !== null) { - return [key, value]; - } - return void 0; - }, "removeEmptyFilters"); - var filterValidEntries = /* @__PURE__ */ __name(function filterValidEntries2(entry) { - return entry !== void 0; - }, "filterValidEntries"); - var entries = Object.entries(filters).map(removeEmptyFilters).filter(filterValidEntries); - return Object.fromEntries(entries); - }, "getActiveFilters"), - filter: /* @__PURE__ */ __name(function filter2(data12) { - var _this5 = this; - if (!data12) { - return; - } - this.clearEditingMetaData(); - var activeFilters = this.getActiveFilters(this.filters); - var globalFilterFieldsArray; - if (activeFilters["global"]) { - globalFilterFieldsArray = this.globalFilterFields || this.columns.map(function(col) { - return _this5.columnProp(col, "filterField") || _this5.columnProp(col, "field"); - }); - } - var filteredValue = []; - for (var i = 0; i < data12.length; i++) { - var localMatch = true; - var globalMatch = false; - var localFiltered = false; - for (var prop in activeFilters) { - if (Object.prototype.hasOwnProperty.call(activeFilters, prop) && prop !== "global") { - localFiltered = true; - var filterField = prop; - var filterMeta = activeFilters[filterField]; - if (filterMeta.operator) { - var _iterator2 = _createForOfIteratorHelper(filterMeta.constraints), _step2; - try { - for (_iterator2.s(); !(_step2 = _iterator2.n()).done; ) { - var filterConstraint2 = _step2.value; - localMatch = this.executeLocalFilter(filterField, data12[i], filterConstraint2); - if (filterMeta.operator === FilterOperator.OR && localMatch || filterMeta.operator === FilterOperator.AND && !localMatch) { - break; - } - } - } catch (err) { - _iterator2.e(err); - } finally { - _iterator2.f(); - } - } else { - localMatch = this.executeLocalFilter(filterField, data12[i], filterMeta); - } - if (!localMatch) { - break; - } - } - } - if (localMatch && activeFilters["global"] && !globalMatch && globalFilterFieldsArray) { - for (var j = 0; j < globalFilterFieldsArray.length; j++) { - var globalFilterField = globalFilterFieldsArray[j]; - globalMatch = FilterService.filters[activeFilters["global"].matchMode || FilterMatchMode.CONTAINS](resolveFieldData(data12[i], globalFilterField), activeFilters["global"].value, this.filterLocale); - if (globalMatch) { - break; - } - } - } - var matches = void 0; - if (activeFilters["global"]) { - matches = localFiltered ? localFiltered && localMatch && globalMatch : globalMatch; - } else { - matches = localFiltered && localMatch; - } - if (matches) { - filteredValue.push(data12[i]); - } - } - if (filteredValue.length === this.value.length || Object.keys(activeFilters).length == 0) { - filteredValue = data12; - } - var filterEvent = this.createLazyLoadEvent(); - filterEvent.filteredValue = filteredValue; - this.$emit("filter", filterEvent); - this.$nextTick(function() { - _this5.$emit("value-change", _this5.processedData); - }); - return filteredValue; - }, "filter"), - executeLocalFilter: /* @__PURE__ */ __name(function executeLocalFilter(field2, rowData, filterMeta) { - var filterValue = filterMeta.value; - var filterMatchMode = filterMeta.matchMode || FilterMatchMode.STARTS_WITH; - var dataFieldValue = resolveFieldData(rowData, field2); - var filterConstraint2 = FilterService.filters[filterMatchMode]; - return filterConstraint2(dataFieldValue, filterValue, this.filterLocale); - }, "executeLocalFilter"), - onRowClick: /* @__PURE__ */ __name(function onRowClick2(e) { - var event2 = e.originalEvent; - var body = this.$refs.bodyRef && this.$refs.bodyRef.$el; - var focusedItem = findSingle(body, 'tr[data-p-selectable-row="true"][tabindex="0"]'); - if (isClickable(event2.target)) { - return; - } - this.$emit("row-click", e); - if (this.selectionMode) { - var rowData = e.data; - var rowIndex2 = this.d_first + e.index; - if (this.isMultipleSelectionMode() && event2.shiftKey && this.anchorRowIndex != null) { - clearSelection(); - this.rangeRowIndex = rowIndex2; - this.selectRange(event2); - } else { - var selected = this.isSelected(rowData); - var metaSelection = this.rowTouched ? false : this.metaKeySelection; - this.anchorRowIndex = rowIndex2; - this.rangeRowIndex = rowIndex2; - if (metaSelection) { - var metaKey = event2.metaKey || event2.ctrlKey; - if (selected && metaKey) { - if (this.isSingleSelectionMode()) { - this.$emit("update:selection", null); - } else { - var selectionIndex = this.findIndexInSelection(rowData); - var _selection = this.selection.filter(function(val, i) { - return i != selectionIndex; - }); - this.$emit("update:selection", _selection); - } - this.$emit("row-unselect", { - originalEvent: event2, - data: rowData, - index: rowIndex2, - type: "row" - }); - } else { - if (this.isSingleSelectionMode()) { - this.$emit("update:selection", rowData); - } else if (this.isMultipleSelectionMode()) { - var _selection2 = metaKey ? this.selection || [] : []; - _selection2 = [].concat(_toConsumableArray(_selection2), [rowData]); - this.$emit("update:selection", _selection2); - } - this.$emit("row-select", { - originalEvent: event2, - data: rowData, - index: rowIndex2, - type: "row" - }); - } - } else { - if (this.selectionMode === "single") { - if (selected) { - this.$emit("update:selection", null); - this.$emit("row-unselect", { - originalEvent: event2, - data: rowData, - index: rowIndex2, - type: "row" - }); - } else { - this.$emit("update:selection", rowData); - this.$emit("row-select", { - originalEvent: event2, - data: rowData, - index: rowIndex2, - type: "row" - }); - } - } else if (this.selectionMode === "multiple") { - if (selected) { - var _selectionIndex = this.findIndexInSelection(rowData); - var _selection3 = this.selection.filter(function(val, i) { - return i != _selectionIndex; - }); - this.$emit("update:selection", _selection3); - this.$emit("row-unselect", { - originalEvent: event2, - data: rowData, - index: rowIndex2, - type: "row" - }); - } else { - var _selection4 = this.selection ? [].concat(_toConsumableArray(this.selection), [rowData]) : [rowData]; - this.$emit("update:selection", _selection4); - this.$emit("row-select", { - originalEvent: event2, - data: rowData, - index: rowIndex2, - type: "row" - }); - } - } - } - } - } - this.rowTouched = false; - if (focusedItem) { - var _event$target, _event$target2, _event$target3; - if (((_event$target = event2.target) === null || _event$target === void 0 ? void 0 : _event$target.getAttribute("data-pc-section")) === "rowtoggleicon" || ((_event$target2 = event2.target) === null || _event$target2 === void 0 || (_event$target2 = _event$target2.parentElement) === null || _event$target2 === void 0 ? void 0 : _event$target2.getAttribute("data-pc-section")) === "rowtoggleicon") return; - var targetRow = (_event$target3 = event2.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.closest('tr[data-p-selectable-row="true"]'); - focusedItem.tabIndex = "-1"; - targetRow.tabIndex = "0"; - } - }, "onRowClick"), - onRowDblClick: /* @__PURE__ */ __name(function onRowDblClick2(e) { - var event2 = e.originalEvent; - if (isClickable(event2.target)) { - return; - } - this.$emit("row-dblclick", e); - }, "onRowDblClick"), - onRowRightClick: /* @__PURE__ */ __name(function onRowRightClick2(event2) { - if (this.contextMenu) { - clearSelection(); - event2.originalEvent.target.focus(); - } - this.$emit("update:contextMenuSelection", event2.data); - this.$emit("row-contextmenu", event2); - }, "onRowRightClick"), - onRowTouchEnd: /* @__PURE__ */ __name(function onRowTouchEnd2() { - this.rowTouched = true; - }, "onRowTouchEnd"), - onRowKeyDown: /* @__PURE__ */ __name(function onRowKeyDown2(e, slotProps) { - var event2 = e.originalEvent; - var rowData = e.data; - var rowIndex2 = e.index; - var metaKey = event2.metaKey || event2.ctrlKey; - if (this.selectionMode) { - var row2 = event2.target; - switch (event2.code) { - case "ArrowDown": - this.onArrowDownKey(event2, row2, rowIndex2, slotProps); - break; - case "ArrowUp": - this.onArrowUpKey(event2, row2, rowIndex2, slotProps); - break; - case "Home": - this.onHomeKey(event2, row2, rowIndex2, slotProps); - break; - case "End": - this.onEndKey(event2, row2, rowIndex2, slotProps); - break; - case "Enter": - case "NumpadEnter": - this.onEnterKey(event2, rowData, rowIndex2); - break; - case "Space": - this.onSpaceKey(event2, rowData, rowIndex2, slotProps); - break; - case "Tab": - this.onTabKey(event2, rowIndex2); - break; - default: - if (event2.code === "KeyA" && metaKey && this.isMultipleSelectionMode()) { - var data12 = this.dataToRender(slotProps.rows); - this.$emit("update:selection", data12); - } - event2.preventDefault(); - break; - } - } - }, "onRowKeyDown"), - onArrowDownKey: /* @__PURE__ */ __name(function onArrowDownKey(event2, row2, rowIndex2, slotProps) { - var nextRow = this.findNextSelectableRow(row2); - nextRow && this.focusRowChange(row2, nextRow); - if (event2.shiftKey) { - var data12 = this.dataToRender(slotProps.rows); - var nextRowIndex = rowIndex2 + 1 >= data12.length ? data12.length - 1 : rowIndex2 + 1; - this.onRowClick({ - originalEvent: event2, - data: data12[nextRowIndex], - index: nextRowIndex - }); - } - event2.preventDefault(); - }, "onArrowDownKey"), - onArrowUpKey: /* @__PURE__ */ __name(function onArrowUpKey(event2, row2, rowIndex2, slotProps) { - var prevRow = this.findPrevSelectableRow(row2); - prevRow && this.focusRowChange(row2, prevRow); - if (event2.shiftKey) { - var data12 = this.dataToRender(slotProps.rows); - var prevRowIndex = rowIndex2 - 1 <= 0 ? 0 : rowIndex2 - 1; - this.onRowClick({ - originalEvent: event2, - data: data12[prevRowIndex], - index: prevRowIndex - }); - } - event2.preventDefault(); - }, "onArrowUpKey"), - onHomeKey: /* @__PURE__ */ __name(function onHomeKey(event2, row2, rowIndex2, slotProps) { - var firstRow = this.findFirstSelectableRow(); - firstRow && this.focusRowChange(row2, firstRow); - if (event2.ctrlKey && event2.shiftKey) { - var data12 = this.dataToRender(slotProps.rows); - this.$emit("update:selection", data12.slice(0, rowIndex2 + 1)); - } - event2.preventDefault(); - }, "onHomeKey"), - onEndKey: /* @__PURE__ */ __name(function onEndKey(event2, row2, rowIndex2, slotProps) { - var lastRow = this.findLastSelectableRow(); - lastRow && this.focusRowChange(row2, lastRow); - if (event2.ctrlKey && event2.shiftKey) { - var data12 = this.dataToRender(slotProps.rows); - this.$emit("update:selection", data12.slice(rowIndex2, data12.length)); - } - event2.preventDefault(); - }, "onEndKey"), - onEnterKey: /* @__PURE__ */ __name(function onEnterKey(event2, rowData, rowIndex2) { - this.onRowClick({ - originalEvent: event2, - data: rowData, - index: rowIndex2 - }); - event2.preventDefault(); - }, "onEnterKey"), - onSpaceKey: /* @__PURE__ */ __name(function onSpaceKey(event2, rowData, rowIndex2, slotProps) { - this.onEnterKey(event2, rowData, rowIndex2); - if (event2.shiftKey && this.selection !== null) { - var data12 = this.dataToRender(slotProps.rows); - var index; - if (this.selection.length > 0) { - var firstSelectedRowIndex, lastSelectedRowIndex; - firstSelectedRowIndex = findIndexInList(this.selection[0], data12); - lastSelectedRowIndex = findIndexInList(this.selection[this.selection.length - 1], data12); - index = rowIndex2 <= firstSelectedRowIndex ? lastSelectedRowIndex : firstSelectedRowIndex; - } else { - index = findIndexInList(this.selection, data12); - } - var _selection = index !== rowIndex2 ? data12.slice(Math.min(index, rowIndex2), Math.max(index, rowIndex2) + 1) : rowData; - this.$emit("update:selection", _selection); - } - }, "onSpaceKey"), - onTabKey: /* @__PURE__ */ __name(function onTabKey(event2, rowIndex2) { - var body = this.$refs.bodyRef && this.$refs.bodyRef.$el; - var rows3 = find(body, 'tr[data-p-selectable-row="true"]'); - if (event2.code === "Tab" && rows3 && rows3.length > 0) { - var firstSelectedRow = findSingle(body, 'tr[data-p-selected="true"]'); - var focusedItem = findSingle(body, 'tr[data-p-selectable-row="true"][tabindex="0"]'); - if (firstSelectedRow) { - firstSelectedRow.tabIndex = "0"; - focusedItem && focusedItem !== firstSelectedRow && (focusedItem.tabIndex = "-1"); - } else { - rows3[0].tabIndex = "0"; - focusedItem !== rows3[0] && (rows3[rowIndex2].tabIndex = "-1"); - } - } - }, "onTabKey"), - findNextSelectableRow: /* @__PURE__ */ __name(function findNextSelectableRow(row2) { - var nextRow = row2.nextElementSibling; - if (nextRow) { - if (getAttribute(nextRow, "data-p-selectable-row") === true) return nextRow; - else return this.findNextSelectableRow(nextRow); - } else { - return null; - } - }, "findNextSelectableRow"), - findPrevSelectableRow: /* @__PURE__ */ __name(function findPrevSelectableRow(row2) { - var prevRow = row2.previousElementSibling; - if (prevRow) { - if (getAttribute(prevRow, "data-p-selectable-row") === true) return prevRow; - else return this.findPrevSelectableRow(prevRow); - } else { - return null; - } - }, "findPrevSelectableRow"), - findFirstSelectableRow: /* @__PURE__ */ __name(function findFirstSelectableRow() { - var firstRow = findSingle(this.$refs.table, 'tr[data-p-selectable-row="true"]'); - return firstRow; - }, "findFirstSelectableRow"), - findLastSelectableRow: /* @__PURE__ */ __name(function findLastSelectableRow() { - var rows3 = find(this.$refs.table, 'tr[data-p-selectable-row="true"]'); - return rows3 ? rows3[rows3.length - 1] : null; - }, "findLastSelectableRow"), - focusRowChange: /* @__PURE__ */ __name(function focusRowChange(firstFocusableRow, currentFocusedRow) { - firstFocusableRow.tabIndex = "-1"; - currentFocusedRow.tabIndex = "0"; - focus(currentFocusedRow); - }, "focusRowChange"), - toggleRowWithRadio: /* @__PURE__ */ __name(function toggleRowWithRadio2(event2) { - var rowData = event2.data; - if (this.isSelected(rowData)) { - this.$emit("update:selection", null); - this.$emit("row-unselect", { - originalEvent: event2.originalEvent, - data: rowData, - index: event2.index, - type: "radiobutton" - }); - } else { - this.$emit("update:selection", rowData); - this.$emit("row-select", { - originalEvent: event2.originalEvent, - data: rowData, - index: event2.index, - type: "radiobutton" - }); - } - }, "toggleRowWithRadio"), - toggleRowWithCheckbox: /* @__PURE__ */ __name(function toggleRowWithCheckbox2(event2) { - var rowData = event2.data; - if (this.isSelected(rowData)) { - var selectionIndex = this.findIndexInSelection(rowData); - var _selection = this.selection.filter(function(val, i) { - return i != selectionIndex; - }); - this.$emit("update:selection", _selection); - this.$emit("row-unselect", { - originalEvent: event2.originalEvent, - data: rowData, - index: event2.index, - type: "checkbox" - }); - } else { - var _selection5 = this.selection ? _toConsumableArray(this.selection) : []; - _selection5 = [].concat(_toConsumableArray(_selection5), [rowData]); - this.$emit("update:selection", _selection5); - this.$emit("row-select", { - originalEvent: event2.originalEvent, - data: rowData, - index: event2.index, - type: "checkbox" - }); - } - }, "toggleRowWithCheckbox"), - toggleRowsWithCheckbox: /* @__PURE__ */ __name(function toggleRowsWithCheckbox(event2) { - if (this.selectAll !== null) { - this.$emit("select-all-change", event2); - } else { - var originalEvent = event2.originalEvent, checked2 = event2.checked; - var _selection = []; - if (checked2) { - _selection = this.frozenValue ? [].concat(_toConsumableArray(this.frozenValue), _toConsumableArray(this.processedData)) : this.processedData; - this.$emit("row-select-all", { - originalEvent, - data: _selection - }); - } else { - this.$emit("row-unselect-all", { - originalEvent - }); - } - this.$emit("update:selection", _selection); - } - }, "toggleRowsWithCheckbox"), - isSingleSelectionMode: /* @__PURE__ */ __name(function isSingleSelectionMode() { - return this.selectionMode === "single"; - }, "isSingleSelectionMode"), - isMultipleSelectionMode: /* @__PURE__ */ __name(function isMultipleSelectionMode() { - return this.selectionMode === "multiple"; - }, "isMultipleSelectionMode"), - isSelected: /* @__PURE__ */ __name(function isSelected2(rowData) { - if (rowData && this.selection) { - if (this.dataKey) { - return this.d_selectionKeys ? this.d_selectionKeys[resolveFieldData(rowData, this.dataKey)] !== void 0 : false; - } else { - if (this.selection instanceof Array) return this.findIndexInSelection(rowData) > -1; - else return this.equals(rowData, this.selection); - } - } - return false; - }, "isSelected"), - findIndexInSelection: /* @__PURE__ */ __name(function findIndexInSelection2(rowData) { - return this.findIndex(rowData, this.selection); - }, "findIndexInSelection"), - findIndex: /* @__PURE__ */ __name(function findIndex2(rowData, collection) { - var index = -1; - if (collection && collection.length) { - for (var i = 0; i < collection.length; i++) { - if (this.equals(rowData, collection[i])) { - index = i; - break; - } - } - } - return index; - }, "findIndex"), - updateSelectionKeys: /* @__PURE__ */ __name(function updateSelectionKeys(selection) { - this.d_selectionKeys = {}; - if (Array.isArray(selection)) { - var _iterator3 = _createForOfIteratorHelper(selection), _step3; - try { - for (_iterator3.s(); !(_step3 = _iterator3.n()).done; ) { - var data12 = _step3.value; - this.d_selectionKeys[String(resolveFieldData(data12, this.dataKey))] = 1; - } - } catch (err) { - _iterator3.e(err); - } finally { - _iterator3.f(); - } - } else { - this.d_selectionKeys[String(resolveFieldData(selection, this.dataKey))] = 1; - } - }, "updateSelectionKeys"), - updateEditingRowKeys: /* @__PURE__ */ __name(function updateEditingRowKeys(editingRows) { - if (editingRows && editingRows.length) { - this.d_editingRowKeys = {}; - var _iterator4 = _createForOfIteratorHelper(editingRows), _step4; - try { - for (_iterator4.s(); !(_step4 = _iterator4.n()).done; ) { - var data12 = _step4.value; - this.d_editingRowKeys[String(resolveFieldData(data12, this.dataKey))] = 1; - } - } catch (err) { - _iterator4.e(err); - } finally { - _iterator4.f(); - } - } else { - this.d_editingRowKeys = null; - } - }, "updateEditingRowKeys"), - equals: /* @__PURE__ */ __name(function equals$12(data1, data22) { - return this.compareSelectionBy === "equals" ? data1 === data22 : equals(data1, data22, this.dataKey); - }, "equals$1"), - selectRange: /* @__PURE__ */ __name(function selectRange(event2) { - var rangeStart, rangeEnd; - if (this.rangeRowIndex > this.anchorRowIndex) { - rangeStart = this.anchorRowIndex; - rangeEnd = this.rangeRowIndex; - } else if (this.rangeRowIndex < this.anchorRowIndex) { - rangeStart = this.rangeRowIndex; - rangeEnd = this.anchorRowIndex; - } else { - rangeStart = this.rangeRowIndex; - rangeEnd = this.rangeRowIndex; - } - if (this.lazy && this.paginator) { - rangeStart -= this.first; - rangeEnd -= this.first; - } - var value = this.processedData; - var _selection = []; - for (var i = rangeStart; i <= rangeEnd; i++) { - var rangeRowData = value[i]; - _selection.push(rangeRowData); - this.$emit("row-select", { - originalEvent: event2, - data: rangeRowData, - type: "row" - }); - } - this.$emit("update:selection", _selection); - }, "selectRange"), - exportCSV: /* @__PURE__ */ __name(function exportCSV$1(options, data12) { - var _this6 = this; - var csv = "\uFEFF"; - if (!data12) { - data12 = this.processedData; - if (options && options.selectionOnly) data12 = this.selection || []; - else if (this.frozenValue) data12 = data12 ? [].concat(_toConsumableArray(this.frozenValue), _toConsumableArray(data12)) : this.frozenValue; - } - var headerInitiated = false; - for (var i = 0; i < this.columns.length; i++) { - var column = this.columns[i]; - if (this.columnProp(column, "exportable") !== false && this.columnProp(column, "field")) { - if (headerInitiated) csv += this.csvSeparator; - else headerInitiated = true; - csv += '"' + (this.columnProp(column, "exportHeader") || this.columnProp(column, "header") || this.columnProp(column, "field")) + '"'; - } - } - if (data12) { - data12.forEach(function(record) { - csv += "\n"; - var rowInitiated = false; - for (var _i = 0; _i < _this6.columns.length; _i++) { - var _column = _this6.columns[_i]; - if (_this6.columnProp(_column, "exportable") !== false && _this6.columnProp(_column, "field")) { - if (rowInitiated) csv += _this6.csvSeparator; - else rowInitiated = true; - var cellData = resolveFieldData(record, _this6.columnProp(_column, "field")); - if (cellData != null) { - if (_this6.exportFunction) { - cellData = _this6.exportFunction({ - data: cellData, - field: _this6.columnProp(_column, "field") - }); - } else cellData = String(cellData).replace(/"/g, '""'); - } else cellData = ""; - csv += '"' + cellData + '"'; - } - } - }); - } - var footerInitiated = false; - for (var _i2 = 0; _i2 < this.columns.length; _i2++) { - var _column2 = this.columns[_i2]; - if (_i2 === 0) csv += "\n"; - if (this.columnProp(_column2, "exportable") !== false && this.columnProp(_column2, "exportFooter")) { - if (footerInitiated) csv += this.csvSeparator; - else footerInitiated = true; - csv += '"' + (this.columnProp(_column2, "exportFooter") || this.columnProp(_column2, "footer") || this.columnProp(_column2, "field")) + '"'; - } - } - exportCSV(csv, this.exportFilename); - }, "exportCSV$1"), - resetPage: /* @__PURE__ */ __name(function resetPage() { - this.d_first = 0; - this.$emit("update:first", this.d_first); - }, "resetPage"), - onColumnResizeStart: /* @__PURE__ */ __name(function onColumnResizeStart(event2) { - var containerLeft = getOffset(this.$el).left; - this.resizeColumnElement = event2.target.parentElement; - this.columnResizing = true; - this.lastResizeHelperX = event2.pageX - containerLeft + this.$el.scrollLeft; - this.bindColumnResizeEvents(); - }, "onColumnResizeStart"), - onColumnResize: /* @__PURE__ */ __name(function onColumnResize(event2) { - var containerLeft = getOffset(this.$el).left; - this.$el.setAttribute("data-p-unselectable-text", "true"); - !this.isUnstyled && addStyle(this.$el, { - "user-select": "none" - }); - this.$refs.resizeHelper.style.height = this.$el.offsetHeight + "px"; - this.$refs.resizeHelper.style.top = "0px"; - this.$refs.resizeHelper.style.left = event2.pageX - containerLeft + this.$el.scrollLeft + "px"; - this.$refs.resizeHelper.style.display = "block"; - }, "onColumnResize"), - onColumnResizeEnd: /* @__PURE__ */ __name(function onColumnResizeEnd() { - var delta = this.$refs.resizeHelper.offsetLeft - this.lastResizeHelperX; - var columnWidth = this.resizeColumnElement.offsetWidth; - var newColumnWidth = columnWidth + delta; - var minWidth = this.resizeColumnElement.style.minWidth || 15; - if (columnWidth + delta > parseInt(minWidth, 10)) { - if (this.columnResizeMode === "fit") { - var nextColumn = this.resizeColumnElement.nextElementSibling; - var nextColumnWidth = nextColumn.offsetWidth - delta; - if (newColumnWidth > 15 && nextColumnWidth > 15) { - this.resizeTableCells(newColumnWidth, nextColumnWidth); - } - } else if (this.columnResizeMode === "expand") { - var tableWidth = this.$refs.table.offsetWidth + delta + "px"; - var updateTableWidth = /* @__PURE__ */ __name(function updateTableWidth2(el) { - !!el && (el.style.width = el.style.minWidth = tableWidth); - }, "updateTableWidth"); - this.resizeTableCells(newColumnWidth); - updateTableWidth(this.$refs.table); - if (!this.virtualScrollerDisabled) { - var body = this.$refs.bodyRef && this.$refs.bodyRef.$el; - var frozenBody = this.$refs.frozenBodyRef && this.$refs.frozenBodyRef.$el; - updateTableWidth(body); - updateTableWidth(frozenBody); - } - } - this.$emit("column-resize-end", { - element: this.resizeColumnElement, - delta - }); - } - this.$refs.resizeHelper.style.display = "none"; - this.resizeColumn = null; - this.$el.removeAttribute("data-p-unselectable-text"); - !this.isUnstyled && (this.$el.style["user-select"] = ""); - this.unbindColumnResizeEvents(); - if (this.isStateful()) { - this.saveState(); - } - }, "onColumnResizeEnd"), - resizeTableCells: /* @__PURE__ */ __name(function resizeTableCells(newColumnWidth, nextColumnWidth) { - var colIndex = getIndex(this.resizeColumnElement); - var widths = []; - var headers = find(this.$refs.table, 'thead[data-pc-section="thead"] > tr > th'); - headers.forEach(function(header) { - return widths.push(getOuterWidth(header)); - }); - this.destroyStyleElement(); - this.createStyleElement(); - var innerHTML = ""; - var selector = '[data-pc-name="datatable"]['.concat(this.attributeSelector, '] > [data-pc-section="tablecontainer"] ').concat(this.virtualScrollerDisabled ? "" : '> [data-pc-name="virtualscroller"]', ' > table[data-pc-section="table"]'); - widths.forEach(function(width, index) { - var colWidth = index === colIndex ? newColumnWidth : nextColumnWidth && index === colIndex + 1 ? nextColumnWidth : width; - var style = "width: ".concat(colWidth, "px !important; max-width: ").concat(colWidth, "px !important"); - innerHTML += "\n ".concat(selector, ' > thead[data-pc-section="thead"] > tr > th:nth-child(').concat(index + 1, "),\n ").concat(selector, ' > tbody[data-pc-section="tbody"] > tr > td:nth-child(').concat(index + 1, "),\n ").concat(selector, ' > tfoot[data-pc-section="tfoot"] > tr > td:nth-child(').concat(index + 1, ") {\n ").concat(style, "\n }\n "); - }); - this.styleElement.innerHTML = innerHTML; - }, "resizeTableCells"), - bindColumnResizeEvents: /* @__PURE__ */ __name(function bindColumnResizeEvents() { - var _this7 = this; - if (!this.documentColumnResizeListener) { - this.documentColumnResizeListener = document.addEventListener("mousemove", function() { - if (_this7.columnResizing) { - _this7.onColumnResize(event); - } - }); - } - if (!this.documentColumnResizeEndListener) { - this.documentColumnResizeEndListener = document.addEventListener("mouseup", function() { - if (_this7.columnResizing) { - _this7.columnResizing = false; - _this7.onColumnResizeEnd(); - } - }); - } - }, "bindColumnResizeEvents"), - unbindColumnResizeEvents: /* @__PURE__ */ __name(function unbindColumnResizeEvents() { - if (this.documentColumnResizeListener) { - document.removeEventListener("document", this.documentColumnResizeListener); - this.documentColumnResizeListener = null; - } - if (this.documentColumnResizeEndListener) { - document.removeEventListener("document", this.documentColumnResizeEndListener); - this.documentColumnResizeEndListener = null; - } - }, "unbindColumnResizeEvents"), - onColumnHeaderMouseDown: /* @__PURE__ */ __name(function onColumnHeaderMouseDown(e) { - var event2 = e.originalEvent; - var column = e.column; - if (this.reorderableColumns && this.columnProp(column, "reorderableColumn") !== false) { - if (event2.target.nodeName === "INPUT" || event2.target.nodeName === "TEXTAREA" || getAttribute(event2.target, '[data-pc-section="columnresizer"]')) event2.currentTarget.draggable = false; - else event2.currentTarget.draggable = true; - } - }, "onColumnHeaderMouseDown"), - onColumnHeaderDragStart: /* @__PURE__ */ __name(function onColumnHeaderDragStart(e) { - var event2 = e.originalEvent, column = e.column; - if (this.columnResizing) { - event2.preventDefault(); - return; - } - this.colReorderIconWidth = getHiddenElementOuterWidth(this.$refs.reorderIndicatorUp); - this.colReorderIconHeight = getHiddenElementOuterHeight(this.$refs.reorderIndicatorUp); - this.draggedColumn = column; - this.draggedColumnElement = this.findParentHeader(event2.target); - event2.dataTransfer.setData("text", "b"); - }, "onColumnHeaderDragStart"), - onColumnHeaderDragOver: /* @__PURE__ */ __name(function onColumnHeaderDragOver(e) { - var event2 = e.originalEvent, column = e.column; - var dropHeader = this.findParentHeader(event2.target); - if (this.reorderableColumns && this.draggedColumnElement && dropHeader && !this.columnProp(column, "frozen")) { - event2.preventDefault(); - var containerOffset = getOffset(this.$el); - var dropHeaderOffset = getOffset(dropHeader); - if (this.draggedColumnElement !== dropHeader) { - var targetLeft = dropHeaderOffset.left - containerOffset.left; - var columnCenter = dropHeaderOffset.left + dropHeader.offsetWidth / 2; - this.$refs.reorderIndicatorUp.style.top = dropHeaderOffset.top - containerOffset.top - (this.colReorderIconHeight - 1) + "px"; - this.$refs.reorderIndicatorDown.style.top = dropHeaderOffset.top - containerOffset.top + dropHeader.offsetHeight + "px"; - if (event2.pageX > columnCenter) { - this.$refs.reorderIndicatorUp.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(this.colReorderIconWidth / 2) + "px"; - this.$refs.reorderIndicatorDown.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(this.colReorderIconWidth / 2) + "px"; - this.dropPosition = 1; - } else { - this.$refs.reorderIndicatorUp.style.left = targetLeft - Math.ceil(this.colReorderIconWidth / 2) + "px"; - this.$refs.reorderIndicatorDown.style.left = targetLeft - Math.ceil(this.colReorderIconWidth / 2) + "px"; - this.dropPosition = -1; - } - this.$refs.reorderIndicatorUp.style.display = "block"; - this.$refs.reorderIndicatorDown.style.display = "block"; - } - } - }, "onColumnHeaderDragOver"), - onColumnHeaderDragLeave: /* @__PURE__ */ __name(function onColumnHeaderDragLeave(e) { - var event2 = e.originalEvent; - if (this.reorderableColumns && this.draggedColumnElement) { - event2.preventDefault(); - this.$refs.reorderIndicatorUp.style.display = "none"; - this.$refs.reorderIndicatorDown.style.display = "none"; - } - }, "onColumnHeaderDragLeave"), - onColumnHeaderDrop: /* @__PURE__ */ __name(function onColumnHeaderDrop(e) { - var _this8 = this; - var event2 = e.originalEvent, column = e.column; - event2.preventDefault(); - if (this.draggedColumnElement) { - var dragIndex = getIndex(this.draggedColumnElement); - var dropIndex = getIndex(this.findParentHeader(event2.target)); - var allowDrop = dragIndex !== dropIndex; - if (allowDrop && (dropIndex - dragIndex === 1 && this.dropPosition === -1 || dropIndex - dragIndex === -1 && this.dropPosition === 1)) { - allowDrop = false; - } - if (allowDrop) { - var isSameColumn = /* @__PURE__ */ __name(function isSameColumn2(col1, col2) { - return _this8.columnProp(col1, "columnKey") || _this8.columnProp(col2, "columnKey") ? _this8.columnProp(col1, "columnKey") === _this8.columnProp(col2, "columnKey") : _this8.columnProp(col1, "field") === _this8.columnProp(col2, "field"); - }, "isSameColumn"); - var dragColIndex = this.columns.findIndex(function(child) { - return isSameColumn(child, _this8.draggedColumn); - }); - var dropColIndex = this.columns.findIndex(function(child) { - return isSameColumn(child, column); - }); - var widths = []; - var headers = find(this.$el, 'thead[data-pc-section="thead"] > tr > th'); - headers.forEach(function(header) { - return widths.push(getOuterWidth(header)); - }); - var movedItem = widths.find(function(_, index) { - return index === dragColIndex; - }); - var remainingItems = widths.filter(function(_, index) { - return index !== dragColIndex; - }); - var reorderedWidths = [].concat(_toConsumableArray(remainingItems.slice(0, dropColIndex)), [movedItem], _toConsumableArray(remainingItems.slice(dropColIndex))); - this.addColumnWidthStyles(reorderedWidths); - if (dropColIndex < dragColIndex && this.dropPosition === 1) { - dropColIndex++; - } - if (dropColIndex > dragColIndex && this.dropPosition === -1) { - dropColIndex--; - } - reorderArray(this.columns, dragColIndex, dropColIndex); - this.updateReorderableColumns(); - this.$emit("column-reorder", { - originalEvent: event2, - dragIndex: dragColIndex, - dropIndex: dropColIndex - }); - } - this.$refs.reorderIndicatorUp.style.display = "none"; - this.$refs.reorderIndicatorDown.style.display = "none"; - this.draggedColumnElement.draggable = false; - this.draggedColumnElement = null; - this.draggedColumn = null; - this.dropPosition = null; - } - }, "onColumnHeaderDrop"), - findParentHeader: /* @__PURE__ */ __name(function findParentHeader(element) { - if (element.nodeName === "TH") { - return element; - } else { - var parent = element.parentElement; - while (parent.nodeName !== "TH") { - parent = parent.parentElement; - if (!parent) break; - } - return parent; - } - }, "findParentHeader"), - findColumnByKey: /* @__PURE__ */ __name(function findColumnByKey(columns2, key) { - if (columns2 && columns2.length) { - for (var i = 0; i < columns2.length; i++) { - var column = columns2[i]; - if (this.columnProp(column, "columnKey") === key || this.columnProp(column, "field") === key) { - return column; - } - } - } - return null; - }, "findColumnByKey"), - onRowMouseDown: /* @__PURE__ */ __name(function onRowMouseDown2(event2) { - if (getAttribute(event2.target, "data-pc-section") === "reorderablerowhandle" || getAttribute(event2.target.parentElement, "data-pc-section") === "reorderablerowhandle") event2.currentTarget.draggable = true; - else event2.currentTarget.draggable = false; - }, "onRowMouseDown"), - onRowDragStart: /* @__PURE__ */ __name(function onRowDragStart2(e) { - var event2 = e.originalEvent; - var index = e.index; - this.rowDragging = true; - this.draggedRowIndex = index; - event2.dataTransfer.setData("text", "b"); - }, "onRowDragStart"), - onRowDragOver: /* @__PURE__ */ __name(function onRowDragOver2(e) { - var event2 = e.originalEvent; - var index = e.index; - if (this.rowDragging && this.draggedRowIndex !== index) { - var rowElement = event2.currentTarget; - var rowY = getOffset(rowElement).top + getWindowScrollTop(); - var pageY = event2.pageY; - var rowMidY = rowY + getOuterHeight(rowElement) / 2; - var prevRowElement = rowElement.previousElementSibling; - if (pageY < rowMidY) { - rowElement.setAttribute("data-p-datatable-dragpoint-bottom", "false"); - !this.isUnstyled && removeClass(rowElement, "p-datatable-dragpoint-bottom"); - this.droppedRowIndex = index; - if (prevRowElement) { - prevRowElement.setAttribute("data-p-datatable-dragpoint-bottom", "true"); - !this.isUnstyled && addClass(prevRowElement, "p-datatable-dragpoint-bottom"); - } else { - rowElement.setAttribute("data-p-datatable-dragpoint-top", "true"); - !this.isUnstyled && addClass(rowElement, "p-datatable-dragpoint-top"); - } - } else { - if (prevRowElement) { - prevRowElement.setAttribute("data-p-datatable-dragpoint-bottom", "false"); - !this.isUnstyled && removeClass(prevRowElement, "p-datatable-dragpoint-bottom"); - } else { - rowElement.setAttribute("data-p-datatable-dragpoint-top", "true"); - !this.isUnstyled && addClass(rowElement, "p-datatable-dragpoint-top"); - } - this.droppedRowIndex = index + 1; - rowElement.setAttribute("data-p-datatable-dragpoint-bottom", "true"); - !this.isUnstyled && addClass(rowElement, "p-datatable-dragpoint-bottom"); - } - event2.preventDefault(); - } - }, "onRowDragOver"), - onRowDragLeave: /* @__PURE__ */ __name(function onRowDragLeave2(event2) { - var rowElement = event2.currentTarget; - var prevRowElement = rowElement.previousElementSibling; - if (prevRowElement) { - prevRowElement.setAttribute("data-p-datatable-dragpoint-bottom", "false"); - !this.isUnstyled && removeClass(prevRowElement, "p-datatable-dragpoint-bottom"); - } - rowElement.setAttribute("data-p-datatable-dragpoint-bottom", "false"); - !this.isUnstyled && removeClass(rowElement, "p-datatable-dragpoint-bottom"); - rowElement.setAttribute("data-p-datatable-dragpoint-top", "false"); - !this.isUnstyled && removeClass(rowElement, "p-datatable-dragpoint-top"); - }, "onRowDragLeave"), - onRowDragEnd: /* @__PURE__ */ __name(function onRowDragEnd2(event2) { - this.rowDragging = false; - this.draggedRowIndex = null; - this.droppedRowIndex = null; - event2.currentTarget.draggable = false; - }, "onRowDragEnd"), - onRowDrop: /* @__PURE__ */ __name(function onRowDrop2(event2) { - if (this.droppedRowIndex != null) { - var dropIndex = this.draggedRowIndex > this.droppedRowIndex ? this.droppedRowIndex : this.droppedRowIndex === 0 ? 0 : this.droppedRowIndex - 1; - var processedData2 = _toConsumableArray(this.processedData); - reorderArray(processedData2, this.draggedRowIndex + this.d_first, dropIndex + this.d_first); - this.$emit("row-reorder", { - originalEvent: event2, - dragIndex: this.draggedRowIndex, - dropIndex, - value: processedData2 - }); - } - this.onRowDragLeave(event2); - this.onRowDragEnd(event2); - event2.preventDefault(); - }, "onRowDrop"), - toggleRow: /* @__PURE__ */ __name(function toggleRow2(event2) { - var _this9 = this; - var expanded = event2.expanded, rest = _objectWithoutProperties(event2, _excluded); - var rowData = event2.data; - var expandedRows; - if (this.dataKey) { - var value = resolveFieldData(rowData, this.dataKey); - expandedRows = this.expandedRows ? _objectSpread$1({}, this.expandedRows) : {}; - expanded ? expandedRows[value] = true : delete expandedRows[value]; - } else { - expandedRows = this.expandedRows ? _toConsumableArray(this.expandedRows) : []; - expanded ? expandedRows.push(rowData) : expandedRows = expandedRows.filter(function(d) { - return !_this9.equals(rowData, d); - }); - } - this.$emit("update:expandedRows", expandedRows); - expanded ? this.$emit("row-expand", rest) : this.$emit("row-collapse", rest); - }, "toggleRow"), - toggleRowGroup: /* @__PURE__ */ __name(function toggleRowGroup(e) { - var event2 = e.originalEvent; - var data12 = e.data; - var groupFieldValue = resolveFieldData(data12, this.groupRowsBy); - var _expandedRowGroups = this.expandedRowGroups ? _toConsumableArray(this.expandedRowGroups) : []; - if (this.isRowGroupExpanded(data12)) { - _expandedRowGroups = _expandedRowGroups.filter(function(group) { - return group !== groupFieldValue; - }); - this.$emit("update:expandedRowGroups", _expandedRowGroups); - this.$emit("rowgroup-collapse", { - originalEvent: event2, - data: groupFieldValue - }); - } else { - _expandedRowGroups.push(groupFieldValue); - this.$emit("update:expandedRowGroups", _expandedRowGroups); - this.$emit("rowgroup-expand", { - originalEvent: event2, - data: groupFieldValue - }); - } - }, "toggleRowGroup"), - isRowGroupExpanded: /* @__PURE__ */ __name(function isRowGroupExpanded2(rowData) { - if (this.expandableRowGroups && this.expandedRowGroups) { - var groupFieldValue = resolveFieldData(rowData, this.groupRowsBy); - return this.expandedRowGroups.indexOf(groupFieldValue) > -1; - } - return false; - }, "isRowGroupExpanded"), - isStateful: /* @__PURE__ */ __name(function isStateful() { - return this.stateKey != null; - }, "isStateful"), - getStorage: /* @__PURE__ */ __name(function getStorage() { - switch (this.stateStorage) { - case "local": - return window.localStorage; - case "session": - return window.sessionStorage; - default: - throw new Error(this.stateStorage + ' is not a valid value for the state storage, supported values are "local" and "session".'); - } - }, "getStorage"), - saveState: /* @__PURE__ */ __name(function saveState() { - var storage = this.getStorage(); - var state = {}; - if (this.paginator) { - state.first = this.d_first; - state.rows = this.d_rows; - } - if (this.d_sortField) { - state.sortField = this.d_sortField; - state.sortOrder = this.d_sortOrder; - } - if (this.d_multiSortMeta) { - state.multiSortMeta = this.d_multiSortMeta; - } - if (this.hasFilters) { - state.filters = this.filters; - } - if (this.resizableColumns) { - this.saveColumnWidths(state); - } - if (this.reorderableColumns) { - state.columnOrder = this.d_columnOrder; - } - if (this.expandedRows) { - state.expandedRows = this.expandedRows; - } - if (this.expandedRowGroups) { - state.expandedRowGroups = this.expandedRowGroups; - } - if (this.selection) { - state.selection = this.selection; - state.selectionKeys = this.d_selectionKeys; - } - if (Object.keys(state).length) { - storage.setItem(this.stateKey, JSON.stringify(state)); - } - this.$emit("state-save", state); - }, "saveState"), - restoreState: /* @__PURE__ */ __name(function restoreState() { - var storage = this.getStorage(); - var stateString = storage.getItem(this.stateKey); - var dateFormat = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/; - var reviver = /* @__PURE__ */ __name(function reviver2(key, value) { - if (typeof value === "string" && dateFormat.test(value)) { - return new Date(value); - } - return value; - }, "reviver"); - if (stateString) { - var restoredState = JSON.parse(stateString, reviver); - if (this.paginator) { - this.d_first = restoredState.first; - this.d_rows = restoredState.rows; - } - if (restoredState.sortField) { - this.d_sortField = restoredState.sortField; - this.d_sortOrder = restoredState.sortOrder; - } - if (restoredState.multiSortMeta) { - this.d_multiSortMeta = restoredState.multiSortMeta; - } - if (restoredState.filters) { - this.$emit("update:filters", restoredState.filters); - } - if (this.resizableColumns) { - this.columnWidthsState = restoredState.columnWidths; - this.tableWidthState = restoredState.tableWidth; - } - if (this.reorderableColumns) { - this.d_columnOrder = restoredState.columnOrder; - } - if (restoredState.expandedRows) { - this.$emit("update:expandedRows", restoredState.expandedRows); - } - if (restoredState.expandedRowGroups) { - this.$emit("update:expandedRowGroups", restoredState.expandedRowGroups); - } - if (restoredState.selection) { - this.d_selectionKeys = restoredState.d_selectionKeys; - this.$emit("update:selection", restoredState.selection); - } - this.$emit("state-restore", restoredState); - } - }, "restoreState"), - saveColumnWidths: /* @__PURE__ */ __name(function saveColumnWidths(state) { - var widths = []; - var headers = find(this.$el, 'thead[data-pc-section="thead"] > tr > th'); - headers.forEach(function(header) { - return widths.push(getOuterWidth(header)); - }); - state.columnWidths = widths.join(","); - if (this.columnResizeMode === "expand") { - state.tableWidth = getOuterWidth(this.$refs.table) + "px"; - } - }, "saveColumnWidths"), - addColumnWidthStyles: /* @__PURE__ */ __name(function addColumnWidthStyles(widths) { - this.createStyleElement(); - var innerHTML = ""; - var selector = '[data-pc-name="datatable"]['.concat(this.attributeSelector, '] > [data-pc-section="tablecontainer"] ').concat(this.virtualScrollerDisabled ? "" : '> [data-pc-name="virtualscroller"]', ' > table[data-pc-section="table"]'); - widths.forEach(function(width, index) { - var style = "width: ".concat(width, "px !important; max-width: ").concat(width, "px !important"); - innerHTML += "\n ".concat(selector, ' > thead[data-pc-section="thead"] > tr > th:nth-child(').concat(index + 1, "),\n ").concat(selector, ' > tbody[data-pc-section="tbody"] > tr > td:nth-child(').concat(index + 1, "),\n ").concat(selector, ' > tfoot[data-pc-section="tfoot"] > tr > td:nth-child(').concat(index + 1, ") {\n ").concat(style, "\n }\n "); - }); - this.styleElement.innerHTML = innerHTML; - }, "addColumnWidthStyles"), - restoreColumnWidths: /* @__PURE__ */ __name(function restoreColumnWidths() { - if (this.columnWidthsState) { - var widths = this.columnWidthsState.split(","); - if (this.columnResizeMode === "expand" && this.tableWidthState) { - this.$refs.table.style.width = this.tableWidthState; - this.$refs.table.style.minWidth = this.tableWidthState; - } - if (isNotEmpty(widths)) { - this.addColumnWidthStyles(widths); - } - } - }, "restoreColumnWidths"), - onCellEditInit: /* @__PURE__ */ __name(function onCellEditInit2(event2) { - this.$emit("cell-edit-init", event2); - }, "onCellEditInit"), - onCellEditComplete: /* @__PURE__ */ __name(function onCellEditComplete2(event2) { - this.$emit("cell-edit-complete", event2); - }, "onCellEditComplete"), - onCellEditCancel: /* @__PURE__ */ __name(function onCellEditCancel2(event2) { - this.$emit("cell-edit-cancel", event2); - }, "onCellEditCancel"), - onRowEditInit: /* @__PURE__ */ __name(function onRowEditInit3(event2) { - var _editingRows = this.editingRows ? _toConsumableArray(this.editingRows) : []; - _editingRows.push(event2.data); - this.$emit("update:editingRows", _editingRows); - this.$emit("row-edit-init", event2); - }, "onRowEditInit"), - onRowEditSave: /* @__PURE__ */ __name(function onRowEditSave3(event2) { - var _editingRows = _toConsumableArray(this.editingRows); - _editingRows.splice(this.findIndex(event2.data, _editingRows), 1); - this.$emit("update:editingRows", _editingRows); - this.$emit("row-edit-save", event2); - }, "onRowEditSave"), - onRowEditCancel: /* @__PURE__ */ __name(function onRowEditCancel3(event2) { - var _editingRows = _toConsumableArray(this.editingRows); - _editingRows.splice(this.findIndex(event2.data, _editingRows), 1); - this.$emit("update:editingRows", _editingRows); - this.$emit("row-edit-cancel", event2); - }, "onRowEditCancel"), - onEditingMetaChange: /* @__PURE__ */ __name(function onEditingMetaChange2(event2) { - var data12 = event2.data, field2 = event2.field, index = event2.index, editing2 = event2.editing; - var editingMeta = _objectSpread$1({}, this.d_editingMeta); - var meta = editingMeta[index]; - if (editing2) { - !meta && (meta = editingMeta[index] = { - data: _objectSpread$1({}, data12), - fields: [] - }); - meta["fields"].push(field2); - } else if (meta) { - var fields = meta["fields"].filter(function(f) { - return f !== field2; - }); - !fields.length ? delete editingMeta[index] : meta["fields"] = fields; - } - this.d_editingMeta = editingMeta; - }, "onEditingMetaChange"), - clearEditingMetaData: /* @__PURE__ */ __name(function clearEditingMetaData() { - if (this.editMode) { - this.d_editingMeta = {}; - } - }, "clearEditingMetaData"), - createLazyLoadEvent: /* @__PURE__ */ __name(function createLazyLoadEvent(event2) { - return { - originalEvent: event2, - first: this.d_first, - rows: this.d_rows, - sortField: this.d_sortField, - sortOrder: this.d_sortOrder, - multiSortMeta: this.d_multiSortMeta, - filters: this.d_filters - }; - }, "createLazyLoadEvent"), - hasGlobalFilter: /* @__PURE__ */ __name(function hasGlobalFilter() { - return this.filters && Object.prototype.hasOwnProperty.call(this.filters, "global"); - }, "hasGlobalFilter"), - onFilterChange: /* @__PURE__ */ __name(function onFilterChange(filters) { - this.d_filters = filters; - }, "onFilterChange"), - onFilterApply: /* @__PURE__ */ __name(function onFilterApply() { - this.d_first = 0; - this.$emit("update:first", this.d_first); - this.$emit("update:filters", this.d_filters); - if (this.lazy) { - this.$emit("filter", this.createLazyLoadEvent()); - } - }, "onFilterApply"), - cloneFilters: /* @__PURE__ */ __name(function cloneFilters() { - var cloned = {}; - if (this.filters) { - Object.entries(this.filters).forEach(function(_ref3) { - var _ref4 = _slicedToArray(_ref3, 2), prop = _ref4[0], value = _ref4[1]; - cloned[prop] = value.operator ? { - operator: value.operator, - constraints: value.constraints.map(function(constraint) { - return _objectSpread$1({}, constraint); - }) - } : _objectSpread$1({}, value); - }); - } - return cloned; - }, "cloneFilters"), - updateReorderableColumns: /* @__PURE__ */ __name(function updateReorderableColumns() { - var _this10 = this; - var columnOrder = []; - this.columns.forEach(function(col) { - return columnOrder.push(_this10.columnProp(col, "columnKey") || _this10.columnProp(col, "field")); - }); - this.d_columnOrder = columnOrder; - }, "updateReorderableColumns"), - createStyleElement: /* @__PURE__ */ __name(function createStyleElement() { - var _this$$primevue; - this.styleElement = document.createElement("style"); - this.styleElement.type = "text/css"; - setAttribute(this.styleElement, "nonce", (_this$$primevue = this.$primevue) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.config) === null || _this$$primevue === void 0 || (_this$$primevue = _this$$primevue.csp) === null || _this$$primevue === void 0 ? void 0 : _this$$primevue.nonce); - document.head.appendChild(this.styleElement); - }, "createStyleElement"), - destroyStyleElement: /* @__PURE__ */ __name(function destroyStyleElement() { - if (this.styleElement) { - document.head.removeChild(this.styleElement); - this.styleElement = null; - } - }, "destroyStyleElement"), - dataToRender: /* @__PURE__ */ __name(function dataToRender(data12) { - var _data = data12 || this.processedData; - if (_data && this.paginator) { - var first4 = this.lazy ? 0 : this.d_first; - return _data.slice(first4, first4 + this.d_rows); - } - return _data; - }, "dataToRender"), - getVirtualScrollerRef: /* @__PURE__ */ __name(function getVirtualScrollerRef() { - return this.$refs.virtualScroller; - }, "getVirtualScrollerRef"), - hasSpacerStyle: /* @__PURE__ */ __name(function hasSpacerStyle(style) { - return isNotEmpty(style); - }, "hasSpacerStyle") - }, - computed: { - columns: /* @__PURE__ */ __name(function columns() { - var cols = this.d_columns.get(this); - if (this.reorderableColumns && this.d_columnOrder) { - var orderedColumns = []; - var _iterator5 = _createForOfIteratorHelper(this.d_columnOrder), _step5; - try { - for (_iterator5.s(); !(_step5 = _iterator5.n()).done; ) { - var columnKey = _step5.value; - var column = this.findColumnByKey(cols, columnKey); - if (column && !this.columnProp(column, "hidden")) { - orderedColumns.push(column); - } - } - } catch (err) { - _iterator5.e(err); - } finally { - _iterator5.f(); - } - return [].concat(orderedColumns, _toConsumableArray(cols.filter(function(item) { - return orderedColumns.indexOf(item) < 0; - }))); - } - return cols; - }, "columns"), - columnGroups: /* @__PURE__ */ __name(function columnGroups() { - return this.d_columnGroups.get(this); - }, "columnGroups"), - headerColumnGroup: /* @__PURE__ */ __name(function headerColumnGroup() { - var _this$columnGroups, _this11 = this; - return (_this$columnGroups = this.columnGroups) === null || _this$columnGroups === void 0 ? void 0 : _this$columnGroups.find(function(group) { - return _this11.columnProp(group, "type") === "header"; - }); - }, "headerColumnGroup"), - footerColumnGroup: /* @__PURE__ */ __name(function footerColumnGroup() { - var _this$columnGroups2, _this12 = this; - return (_this$columnGroups2 = this.columnGroups) === null || _this$columnGroups2 === void 0 ? void 0 : _this$columnGroups2.find(function(group) { - return _this12.columnProp(group, "type") === "footer"; - }); - }, "footerColumnGroup"), - hasFilters: /* @__PURE__ */ __name(function hasFilters() { - return this.filters && Object.keys(this.filters).length > 0 && this.filters.constructor === Object; - }, "hasFilters"), - processedData: /* @__PURE__ */ __name(function processedData() { - var _this$virtualScroller; - var data12 = this.value || []; - if (!this.lazy && !((_this$virtualScroller = this.virtualScrollerOptions) !== null && _this$virtualScroller !== void 0 && _this$virtualScroller.lazy)) { - if (data12 && data12.length) { - if (this.hasFilters) { - data12 = this.filter(data12); - } - if (this.sorted) { - if (this.sortMode === "single") data12 = this.sortSingle(data12); - else if (this.sortMode === "multiple") data12 = this.sortMultiple(data12); - } - } - } - return data12; - }, "processedData"), - totalRecordsLength: /* @__PURE__ */ __name(function totalRecordsLength() { - if (this.lazy) { - return this.totalRecords; - } else { - var data12 = this.processedData; - return data12 ? data12.length : 0; - } - }, "totalRecordsLength"), - empty: /* @__PURE__ */ __name(function empty2() { - var data12 = this.processedData; - return !data12 || data12.length === 0; - }, "empty"), - paginatorTop: /* @__PURE__ */ __name(function paginatorTop() { - return this.paginator && (this.paginatorPosition !== "bottom" || this.paginatorPosition === "both"); - }, "paginatorTop"), - paginatorBottom: /* @__PURE__ */ __name(function paginatorBottom() { - return this.paginator && (this.paginatorPosition !== "top" || this.paginatorPosition === "both"); - }, "paginatorBottom"), - sorted: /* @__PURE__ */ __name(function sorted() { - return this.d_sortField || this.d_multiSortMeta && this.d_multiSortMeta.length > 0; - }, "sorted"), - allRowsSelected: /* @__PURE__ */ __name(function allRowsSelected() { - var _this13 = this; - if (this.selectAll !== null) { - return this.selectAll; - } else { - var val = this.frozenValue ? [].concat(_toConsumableArray(this.frozenValue), _toConsumableArray(this.processedData)) : this.processedData; - return isNotEmpty(val) && this.selection && Array.isArray(this.selection) && val.every(function(v) { - return _this13.selection.some(function(s) { - return _this13.equals(s, v); - }); - }); - } - }, "allRowsSelected"), - attributeSelector: /* @__PURE__ */ __name(function attributeSelector2() { - return UniqueComponentId(); - }, "attributeSelector"), - groupRowSortField: /* @__PURE__ */ __name(function groupRowSortField() { - return this.sortMode === "single" ? this.sortField : this.d_groupRowsSortMeta ? this.d_groupRowsSortMeta.field : null; - }, "groupRowSortField"), - headerFilterButtonProps: /* @__PURE__ */ __name(function headerFilterButtonProps() { - return _objectSpread$1(_objectSpread$1({ - filter: { - severity: "secondary", - text: true, - rounded: true - } - }, this.filterButtonProps), {}, { - inline: _objectSpread$1({ - clear: { - severity: "secondary", - text: true, - rounded: true - } - }, this.filterButtonProps.inline), - popover: _objectSpread$1({ - addRule: { - severity: "info", - text: true, - size: "small" - }, - removeRule: { - severity: "danger", - text: true, - size: "small" - }, - apply: { - size: "small" - }, - clear: { - outlined: true, - size: "small" - } - }, this.filterButtonProps.popover) - }); - }, "headerFilterButtonProps"), - rowEditButtonProps: /* @__PURE__ */ __name(function rowEditButtonProps() { - return _objectSpread$1(_objectSpread$1({}, { - init: { - severity: "secondary", - text: true, - rounded: true - }, - save: { - severity: "secondary", - text: true, - rounded: true - }, - cancel: { - severity: "secondary", - text: true, - rounded: true - } - }), this.editButtonProps); - }, "rowEditButtonProps"), - virtualScrollerDisabled: /* @__PURE__ */ __name(function virtualScrollerDisabled() { - return isEmpty(this.virtualScrollerOptions) || !this.scrollable; - }, "virtualScrollerDisabled") - }, - components: { - DTPaginator: script$l, - DTTableHeader: script$1, - DTTableBody: script$7, - DTTableFooter: script$5, - DTVirtualScroller: script$H, - ArrowDownIcon: script$q, - ArrowUpIcon: script$p, - SpinnerIcon: script$I - } -}; -function _typeof(o) { - "@babel/helpers - typeof"; - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) { - return typeof o2; - } : function(o2) { - return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2; - }, _typeof(o); -} -__name(_typeof, "_typeof"); -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function(r2) { - return Object.getOwnPropertyDescriptor(e, r2).enumerable; - })), t.push.apply(t, o); - } - return t; -} -__name(ownKeys, "ownKeys"); -function _objectSpread(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), true).forEach(function(r2) { - _defineProperty(e, r2, t[r2]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) { - Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2)); - }); - } - return e; -} -__name(_objectSpread, "_objectSpread"); -function _defineProperty(e, r, t) { - return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; -} -__name(_defineProperty, "_defineProperty"); -function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == _typeof(i) ? i : i + ""; -} -__name(_toPropertyKey, "_toPropertyKey"); -function _toPrimitive(t, r) { - if ("object" != _typeof(t) || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != _typeof(i)) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -__name(_toPrimitive, "_toPrimitive"); -function render2(_ctx, _cache, $props, $setup, $data, $options) { - var _component_SpinnerIcon = resolveComponent("SpinnerIcon"); - var _component_DTPaginator = resolveComponent("DTPaginator"); - var _component_DTTableHeader = resolveComponent("DTTableHeader"); - var _component_DTTableBody = resolveComponent("DTTableBody"); - var _component_DTTableFooter = resolveComponent("DTTableFooter"); - var _component_DTVirtualScroller = resolveComponent("DTVirtualScroller"); - return openBlock(), createElementBlock("div", mergeProps({ - "class": _ctx.cx("root"), - "data-scrollselectors": ".p-datatable-wrapper" - }, _ctx.ptmi("root")), [renderSlot(_ctx.$slots, "default"), _ctx.loading ? (openBlock(), createElementBlock("div", mergeProps({ - key: 0, - "class": _ctx.cx("mask") - }, _ctx.ptm("mask")), [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { - key: 0 - }) : (openBlock(), createElementBlock(Fragment, { - key: 1 - }, [_ctx.$slots.loadingicon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.loadingicon), { - key: 0, - "class": normalizeClass(_ctx.cx("loadingIcon")) - }, null, 8, ["class"])) : _ctx.loadingIcon ? (openBlock(), createElementBlock("i", mergeProps({ - key: 1, - "class": [_ctx.cx("loadingIcon"), "pi-spin", _ctx.loadingIcon] - }, _ctx.ptm("loadingIcon")), null, 16)) : (openBlock(), createBlock(_component_SpinnerIcon, mergeProps({ - key: 2, - spin: "", - "class": _ctx.cx("loadingIcon") - }, _ctx.ptm("loadingIcon")), null, 16, ["class"]))], 64))], 16)) : createCommentVNode("", true), _ctx.$slots.header ? (openBlock(), createElementBlock("div", mergeProps({ - key: 1, - "class": _ctx.cx("header") - }, _ctx.ptm("header")), [renderSlot(_ctx.$slots, "header")], 16)) : createCommentVNode("", true), $options.paginatorTop ? (openBlock(), createBlock(_component_DTPaginator, { - key: 2, - rows: $data.d_rows, - first: $data.d_first, - totalRecords: $options.totalRecordsLength, - pageLinkSize: _ctx.pageLinkSize, - template: _ctx.paginatorTemplate, - rowsPerPageOptions: _ctx.rowsPerPageOptions, - currentPageReportTemplate: _ctx.currentPageReportTemplate, - "class": normalizeClass(_ctx.cx("pcPaginator", { - position: "top" - })), - onPage: _cache[0] || (_cache[0] = function($event) { - return $options.onPage($event); - }), - alwaysShow: _ctx.alwaysShowPaginator, - unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcPaginator") - }, createSlots({ - _: 2 - }, [_ctx.$slots.paginatorstart ? { - name: "start", - fn: withCtx(function() { - return [renderSlot(_ctx.$slots, "paginatorstart")]; - }), - key: "0" - } : void 0, _ctx.$slots.paginatorend ? { - name: "end", - fn: withCtx(function() { - return [renderSlot(_ctx.$slots, "paginatorend")]; - }), - key: "1" - } : void 0, _ctx.$slots.paginatorfirstpagelinkicon ? { - name: "firstpagelinkicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorfirstpagelinkicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "2" - } : void 0, _ctx.$slots.paginatorprevpagelinkicon ? { - name: "prevpagelinkicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorprevpagelinkicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "3" - } : void 0, _ctx.$slots.paginatornextpagelinkicon ? { - name: "nextpagelinkicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatornextpagelinkicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "4" - } : void 0, _ctx.$slots.paginatorlastpagelinkicon ? { - name: "lastpagelinkicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorlastpagelinkicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "5" - } : void 0, _ctx.$slots.paginatorjumptopagedropdownicon ? { - name: "jumptopagedropdownicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorjumptopagedropdownicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "6" - } : void 0, _ctx.$slots.paginatorrowsperpagedropdownicon ? { - name: "rowsperpagedropdownicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorrowsperpagedropdownicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "7" - } : void 0]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - "class": _ctx.cx("tableContainer"), - style: [_ctx.sx("tableContainer"), { - maxHeight: $options.virtualScrollerDisabled ? _ctx.scrollHeight : "" - }] - }, _ctx.ptm("tableContainer")), [createVNode(_component_DTVirtualScroller, mergeProps({ - ref: "virtualScroller" - }, _ctx.virtualScrollerOptions, { - items: $options.processedData, - columns: $options.columns, - style: _ctx.scrollHeight !== "flex" ? { - height: _ctx.scrollHeight - } : void 0, - scrollHeight: _ctx.scrollHeight !== "flex" ? void 0 : "100%", - disabled: $options.virtualScrollerDisabled, - loaderDisabled: "", - inline: "", - autoSize: "", - showSpacer: false, - pt: _ctx.ptm("virtualScroller") - }), { - content: withCtx(function(slotProps) { - return [createBaseVNode("table", mergeProps({ - ref: "table", - role: "table", - "class": [_ctx.cx("table"), _ctx.tableClass], - style: [_ctx.tableStyle, slotProps.spacerStyle] - }, _objectSpread(_objectSpread({}, _ctx.tableProps), _ctx.ptm("table"))), [createVNode(_component_DTTableHeader, { - columnGroup: $options.headerColumnGroup, - columns: slotProps.columns, - rowGroupMode: _ctx.rowGroupMode, - groupRowsBy: _ctx.groupRowsBy, - groupRowSortField: $options.groupRowSortField, - reorderableColumns: _ctx.reorderableColumns, - resizableColumns: _ctx.resizableColumns, - allRowsSelected: $options.allRowsSelected, - empty: $options.empty, - sortMode: _ctx.sortMode, - sortField: $data.d_sortField, - sortOrder: $data.d_sortOrder, - multiSortMeta: $data.d_multiSortMeta, - filters: $data.d_filters, - filtersStore: _ctx.filters, - filterDisplay: _ctx.filterDisplay, - filterButtonProps: $options.headerFilterButtonProps, - filterInputProps: _ctx.filterInputProps, - first: $data.d_first, - onColumnClick: _cache[1] || (_cache[1] = function($event) { - return $options.onColumnHeaderClick($event); - }), - onColumnMousedown: _cache[2] || (_cache[2] = function($event) { - return $options.onColumnHeaderMouseDown($event); - }), - onFilterChange: $options.onFilterChange, - onFilterApply: $options.onFilterApply, - onColumnDragstart: _cache[3] || (_cache[3] = function($event) { - return $options.onColumnHeaderDragStart($event); - }), - onColumnDragover: _cache[4] || (_cache[4] = function($event) { - return $options.onColumnHeaderDragOver($event); - }), - onColumnDragleave: _cache[5] || (_cache[5] = function($event) { - return $options.onColumnHeaderDragLeave($event); - }), - onColumnDrop: _cache[6] || (_cache[6] = function($event) { - return $options.onColumnHeaderDrop($event); - }), - onColumnResizestart: _cache[7] || (_cache[7] = function($event) { - return $options.onColumnResizeStart($event); - }), - onCheckboxChange: _cache[8] || (_cache[8] = function($event) { - return $options.toggleRowsWithCheckbox($event); - }), - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["columnGroup", "columns", "rowGroupMode", "groupRowsBy", "groupRowSortField", "reorderableColumns", "resizableColumns", "allRowsSelected", "empty", "sortMode", "sortField", "sortOrder", "multiSortMeta", "filters", "filtersStore", "filterDisplay", "filterButtonProps", "filterInputProps", "first", "onFilterChange", "onFilterApply", "unstyled", "pt"]), _ctx.frozenValue ? (openBlock(), createBlock(_component_DTTableBody, { - key: 0, - ref: "frozenBodyRef", - value: _ctx.frozenValue, - frozenRow: true, - columns: slotProps.columns, - first: $data.d_first, - dataKey: _ctx.dataKey, - selection: _ctx.selection, - selectionKeys: $data.d_selectionKeys, - selectionMode: _ctx.selectionMode, - contextMenu: _ctx.contextMenu, - contextMenuSelection: _ctx.contextMenuSelection, - rowGroupMode: _ctx.rowGroupMode, - groupRowsBy: _ctx.groupRowsBy, - expandableRowGroups: _ctx.expandableRowGroups, - rowClass: _ctx.rowClass, - rowStyle: _ctx.rowStyle, - editMode: _ctx.editMode, - compareSelectionBy: _ctx.compareSelectionBy, - scrollable: _ctx.scrollable, - expandedRowIcon: _ctx.expandedRowIcon, - collapsedRowIcon: _ctx.collapsedRowIcon, - expandedRows: _ctx.expandedRows, - expandedRowGroups: _ctx.expandedRowGroups, - editingRows: _ctx.editingRows, - editingRowKeys: $data.d_editingRowKeys, - templates: _ctx.$slots, - editButtonProps: $options.rowEditButtonProps, - isVirtualScrollerDisabled: true, - onRowgroupToggle: $options.toggleRowGroup, - onRowClick: _cache[9] || (_cache[9] = function($event) { - return $options.onRowClick($event); - }), - onRowDblclick: _cache[10] || (_cache[10] = function($event) { - return $options.onRowDblClick($event); - }), - onRowRightclick: _cache[11] || (_cache[11] = function($event) { - return $options.onRowRightClick($event); - }), - onRowTouchend: $options.onRowTouchEnd, - onRowKeydown: $options.onRowKeyDown, - onRowMousedown: $options.onRowMouseDown, - onRowDragstart: _cache[12] || (_cache[12] = function($event) { - return $options.onRowDragStart($event); - }), - onRowDragover: _cache[13] || (_cache[13] = function($event) { - return $options.onRowDragOver($event); - }), - onRowDragleave: _cache[14] || (_cache[14] = function($event) { - return $options.onRowDragLeave($event); - }), - onRowDragend: _cache[15] || (_cache[15] = function($event) { - return $options.onRowDragEnd($event); - }), - onRowDrop: _cache[16] || (_cache[16] = function($event) { - return $options.onRowDrop($event); - }), - onRowToggle: _cache[17] || (_cache[17] = function($event) { - return $options.toggleRow($event); - }), - onRadioChange: _cache[18] || (_cache[18] = function($event) { - return $options.toggleRowWithRadio($event); - }), - onCheckboxChange: _cache[19] || (_cache[19] = function($event) { - return $options.toggleRowWithCheckbox($event); - }), - onCellEditInit: _cache[20] || (_cache[20] = function($event) { - return $options.onCellEditInit($event); - }), - onCellEditComplete: _cache[21] || (_cache[21] = function($event) { - return $options.onCellEditComplete($event); - }), - onCellEditCancel: _cache[22] || (_cache[22] = function($event) { - return $options.onCellEditCancel($event); - }), - onRowEditInit: _cache[23] || (_cache[23] = function($event) { - return $options.onRowEditInit($event); - }), - onRowEditSave: _cache[24] || (_cache[24] = function($event) { - return $options.onRowEditSave($event); - }), - onRowEditCancel: _cache[25] || (_cache[25] = function($event) { - return $options.onRowEditCancel($event); - }), - editingMeta: $data.d_editingMeta, - onEditingMetaChange: $options.onEditingMetaChange, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["value", "columns", "first", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "editButtonProps", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange", "unstyled", "pt"])) : createCommentVNode("", true), createVNode(_component_DTTableBody, { - ref: "bodyRef", - value: $options.dataToRender(slotProps.rows), - "class": normalizeClass(slotProps.styleClass), - columns: slotProps.columns, - empty: $options.empty, - first: $data.d_first, - dataKey: _ctx.dataKey, - selection: _ctx.selection, - selectionKeys: $data.d_selectionKeys, - selectionMode: _ctx.selectionMode, - contextMenu: _ctx.contextMenu, - contextMenuSelection: _ctx.contextMenuSelection, - rowGroupMode: _ctx.rowGroupMode, - groupRowsBy: _ctx.groupRowsBy, - expandableRowGroups: _ctx.expandableRowGroups, - rowClass: _ctx.rowClass, - rowStyle: _ctx.rowStyle, - editMode: _ctx.editMode, - compareSelectionBy: _ctx.compareSelectionBy, - scrollable: _ctx.scrollable, - expandedRowIcon: _ctx.expandedRowIcon, - collapsedRowIcon: _ctx.collapsedRowIcon, - expandedRows: _ctx.expandedRows, - expandedRowGroups: _ctx.expandedRowGroups, - editingRows: _ctx.editingRows, - editingRowKeys: $data.d_editingRowKeys, - templates: _ctx.$slots, - editButtonProps: $options.rowEditButtonProps, - virtualScrollerContentProps: slotProps, - isVirtualScrollerDisabled: $options.virtualScrollerDisabled, - onRowgroupToggle: $options.toggleRowGroup, - onRowClick: _cache[26] || (_cache[26] = function($event) { - return $options.onRowClick($event); - }), - onRowDblclick: _cache[27] || (_cache[27] = function($event) { - return $options.onRowDblClick($event); - }), - onRowRightclick: _cache[28] || (_cache[28] = function($event) { - return $options.onRowRightClick($event); - }), - onRowTouchend: $options.onRowTouchEnd, - onRowKeydown: /* @__PURE__ */ __name(function onRowKeydown($event) { - return $options.onRowKeyDown($event, slotProps); - }, "onRowKeydown"), - onRowMousedown: $options.onRowMouseDown, - onRowDragstart: _cache[29] || (_cache[29] = function($event) { - return $options.onRowDragStart($event); - }), - onRowDragover: _cache[30] || (_cache[30] = function($event) { - return $options.onRowDragOver($event); - }), - onRowDragleave: _cache[31] || (_cache[31] = function($event) { - return $options.onRowDragLeave($event); - }), - onRowDragend: _cache[32] || (_cache[32] = function($event) { - return $options.onRowDragEnd($event); - }), - onRowDrop: _cache[33] || (_cache[33] = function($event) { - return $options.onRowDrop($event); - }), - onRowToggle: _cache[34] || (_cache[34] = function($event) { - return $options.toggleRow($event); - }), - onRadioChange: _cache[35] || (_cache[35] = function($event) { - return $options.toggleRowWithRadio($event); - }), - onCheckboxChange: _cache[36] || (_cache[36] = function($event) { - return $options.toggleRowWithCheckbox($event); - }), - onCellEditInit: _cache[37] || (_cache[37] = function($event) { - return $options.onCellEditInit($event); - }), - onCellEditComplete: _cache[38] || (_cache[38] = function($event) { - return $options.onCellEditComplete($event); - }), - onCellEditCancel: _cache[39] || (_cache[39] = function($event) { - return $options.onCellEditCancel($event); - }), - onRowEditInit: _cache[40] || (_cache[40] = function($event) { - return $options.onRowEditInit($event); - }), - onRowEditSave: _cache[41] || (_cache[41] = function($event) { - return $options.onRowEditSave($event); - }), - onRowEditCancel: _cache[42] || (_cache[42] = function($event) { - return $options.onRowEditCancel($event); - }), - editingMeta: $data.d_editingMeta, - onEditingMetaChange: $options.onEditingMetaChange, - unstyled: _ctx.unstyled, - pt: _ctx.pt - }, null, 8, ["value", "class", "columns", "empty", "first", "dataKey", "selection", "selectionKeys", "selectionMode", "contextMenu", "contextMenuSelection", "rowGroupMode", "groupRowsBy", "expandableRowGroups", "rowClass", "rowStyle", "editMode", "compareSelectionBy", "scrollable", "expandedRowIcon", "collapsedRowIcon", "expandedRows", "expandedRowGroups", "editingRows", "editingRowKeys", "templates", "editButtonProps", "virtualScrollerContentProps", "isVirtualScrollerDisabled", "onRowgroupToggle", "onRowTouchend", "onRowKeydown", "onRowMousedown", "editingMeta", "onEditingMetaChange", "unstyled", "pt"]), $options.hasSpacerStyle(slotProps.spacerStyle) ? (openBlock(), createElementBlock("tbody", mergeProps({ - key: 1, - "class": _ctx.cx("virtualScrollerSpacer"), - style: { - height: "calc(".concat(slotProps.spacerStyle.height, " - ").concat(slotProps.rows.length * slotProps.itemSize, "px)") - } - }, _ctx.ptm("virtualScrollerSpacer")), null, 16)) : createCommentVNode("", true), createVNode(_component_DTTableFooter, { - columnGroup: $options.footerColumnGroup, - columns: slotProps.columns, - pt: _ctx.pt - }, null, 8, ["columnGroup", "columns", "pt"])], 16)]; - }), - _: 1 - }, 16, ["items", "columns", "style", "scrollHeight", "disabled", "pt"])], 16), $options.paginatorBottom ? (openBlock(), createBlock(_component_DTPaginator, { - key: 3, - rows: $data.d_rows, - first: $data.d_first, - totalRecords: $options.totalRecordsLength, - pageLinkSize: _ctx.pageLinkSize, - template: _ctx.paginatorTemplate, - rowsPerPageOptions: _ctx.rowsPerPageOptions, - currentPageReportTemplate: _ctx.currentPageReportTemplate, - "class": normalizeClass(_ctx.cx("pcPaginator", { - position: "bottom" - })), - onPage: _cache[43] || (_cache[43] = function($event) { - return $options.onPage($event); - }), - alwaysShow: _ctx.alwaysShowPaginator, - unstyled: _ctx.unstyled, - pt: _ctx.ptm("pcPaginator") - }, createSlots({ - _: 2 - }, [_ctx.$slots.paginatorstart ? { - name: "start", - fn: withCtx(function() { - return [renderSlot(_ctx.$slots, "paginatorstart")]; - }), - key: "0" - } : void 0, _ctx.$slots.paginatorend ? { - name: "end", - fn: withCtx(function() { - return [renderSlot(_ctx.$slots, "paginatorend")]; - }), - key: "1" - } : void 0, _ctx.$slots.paginatorfirstpagelinkicon ? { - name: "firstpagelinkicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorfirstpagelinkicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "2" - } : void 0, _ctx.$slots.paginatorprevpagelinkicon ? { - name: "prevpagelinkicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorprevpagelinkicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "3" - } : void 0, _ctx.$slots.paginatornextpagelinkicon ? { - name: "nextpagelinkicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatornextpagelinkicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "4" - } : void 0, _ctx.$slots.paginatorlastpagelinkicon ? { - name: "lastpagelinkicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorlastpagelinkicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "5" - } : void 0, _ctx.$slots.paginatorjumptopagedropdownicon ? { - name: "jumptopagedropdownicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorjumptopagedropdownicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "6" - } : void 0, _ctx.$slots.paginatorrowsperpagedropdownicon ? { - name: "rowsperpagedropdownicon", - fn: withCtx(function(slotProps) { - return [renderSlot(_ctx.$slots, "paginatorrowsperpagedropdownicon", { - "class": normalizeClass(slotProps["class"]) - })]; - }), - key: "7" - } : void 0]), 1032, ["rows", "first", "totalRecords", "pageLinkSize", "template", "rowsPerPageOptions", "currentPageReportTemplate", "class", "alwaysShow", "unstyled", "pt"])) : createCommentVNode("", true), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({ - key: 4, - "class": _ctx.cx("footer") - }, _ctx.ptm("footer")), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true), createBaseVNode("div", mergeProps({ - ref: "resizeHelper", - "class": _ctx.cx("columnResizeIndicator"), - style: { - "display": "none" - } - }, _ctx.ptm("columnResizeIndicator")), null, 16), _ctx.reorderableColumns ? (openBlock(), createElementBlock("span", mergeProps({ - key: 5, - ref: "reorderIndicatorUp", - "class": _ctx.cx("rowReorderIndicatorUp"), - style: { - "position": "absolute", - "display": "none" - } - }, _ctx.ptm("rowReorderIndicatorUp")), [(openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.rowreorderindicatorupicon || _ctx.$slots.reorderindicatorupicon || "ArrowDownIcon")))], 16)) : createCommentVNode("", true), _ctx.reorderableColumns ? (openBlock(), createElementBlock("span", mergeProps({ - key: 6, - ref: "reorderIndicatorDown", - "class": _ctx.cx("rowReorderIndicatorDown"), - style: { - "position": "absolute", - "display": "none" - } - }, _ctx.ptm("rowReorderIndicatorDown")), [(openBlock(), createBlock(resolveDynamicComponent(_ctx.$slots.rowreorderindicatordownicon || _ctx.$slots.reorderindicatordownicon || "ArrowUpIcon")))], 16)) : createCommentVNode("", true)], 16); -} -__name(render2, "render"); -script.render = render2; -export { - script as a, - script$r as s -}; -//# sourceMappingURL=index-DpF-ptbJ.js.map diff --git a/web/assets/index-Q1cQr26V.js b/web/assets/index-Q1cQr26V.js deleted file mode 100644 index ce20e200e..000000000 --- a/web/assets/index-Q1cQr26V.js +++ /dev/null @@ -1,29 +0,0 @@ -var __defProp = Object.defineProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -import { cA as script$1, m as createBaseVNode, o as openBlock, f as createElementBlock, G as mergeProps } from "./index-QvfM__ze.js"; -var script = { - name: "BarsIcon", - "extends": script$1 -}; -var _hoisted_1 = /* @__PURE__ */ createBaseVNode("path", { - "fill-rule": "evenodd", - "clip-rule": "evenodd", - d: "M13.3226 3.6129H0.677419C0.497757 3.6129 0.325452 3.54152 0.198411 3.41448C0.0713707 3.28744 0 3.11514 0 2.93548C0 2.75581 0.0713707 2.58351 0.198411 2.45647C0.325452 2.32943 0.497757 2.25806 0.677419 2.25806H13.3226C13.5022 2.25806 13.6745 2.32943 13.8016 2.45647C13.9286 2.58351 14 2.75581 14 2.93548C14 3.11514 13.9286 3.28744 13.8016 3.41448C13.6745 3.54152 13.5022 3.6129 13.3226 3.6129ZM13.3226 7.67741H0.677419C0.497757 7.67741 0.325452 7.60604 0.198411 7.479C0.0713707 7.35196 0 7.17965 0 6.99999C0 6.82033 0.0713707 6.64802 0.198411 6.52098C0.325452 6.39394 0.497757 6.32257 0.677419 6.32257H13.3226C13.5022 6.32257 13.6745 6.39394 13.8016 6.52098C13.9286 6.64802 14 6.82033 14 6.99999C14 7.17965 13.9286 7.35196 13.8016 7.479C13.6745 7.60604 13.5022 7.67741 13.3226 7.67741ZM0.677419 11.7419H13.3226C13.5022 11.7419 13.6745 11.6706 13.8016 11.5435C13.9286 11.4165 14 11.2442 14 11.0645C14 10.8848 13.9286 10.7125 13.8016 10.5855C13.6745 10.4585 13.5022 10.3871 13.3226 10.3871H0.677419C0.497757 10.3871 0.325452 10.4585 0.198411 10.5855C0.0713707 10.7125 0 10.8848 0 11.0645C0 11.2442 0.0713707 11.4165 0.198411 11.5435C0.325452 11.6706 0.497757 11.7419 0.677419 11.7419Z", - fill: "currentColor" -}, null, -1); -var _hoisted_2 = [_hoisted_1]; -function render(_ctx, _cache, $props, $setup, $data, $options) { - return openBlock(), createElementBlock("svg", mergeProps({ - width: "14", - height: "14", - viewBox: "0 0 14 14", - fill: "none", - xmlns: "http://www.w3.org/2000/svg" - }, _ctx.pti()), _hoisted_2, 16); -} -__name(render, "render"); -script.render = render; -export { - script as s -}; -//# sourceMappingURL=index-Q1cQr26V.js.map diff --git a/web/assets/index-QvfM__ze.js b/web/assets/index-QvfM__ze.js deleted file mode 100644 index dc3143769..000000000 --- a/web/assets/index-QvfM__ze.js +++ /dev/null @@ -1,212819 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GraphView-CDDCHVO0.js","./index-Q1cQr26V.js","./keybindingService-Cak1En5n.js","./serverConfigStore-DCme3xlV.js","./GraphView-CqZ3opAX.css","./UserSelectView-CXmVKOeK.js","./BaseViewTemplate-BhQMaVFP.js","./ServerStartView-48wfE1MS.js","./ServerStartView-CJiwVDQY.css","./InstallView-By3hC1fC.js","./InstallView-CxhfFC8Y.css","./WelcomeView-C8whKl15.js","./WelcomeView-Brz3-luE.css","./NotSupportedView-Vc8_xWgH.js","./NotSupportedView-DQerxQzi.css","./DownloadGitView-rPK_vYgU.js","./ManualConfigurationView-enyqGo0M.js","./ManualConfigurationView-CsirlNfV.css","./MetricsConsentView-lSfLu4nr.js","./DesktopStartView-le6AjGZr.js","./KeybindingPanel-D6O16W_1.js","./index-DpF-ptbJ.js","./KeybindingPanel-DvrUYZ4S.css","./ExtensionPanel-3jWrm6Zi.js","./ServerConfigPanel-B-w0HFlz.js","./index-je62U6DH.js","./index-BRhY6FpL.css"])))=>i.map(i=>d[i]); -var __defProp2 = Object.defineProperty; -var __name = (target, value4) => __defProp2(target, "name", { value: value4, configurable: true }); -(/* @__PURE__ */ __name(function polyfill2() { - const relList = document.createElement("link").relList; - if (relList && relList.supports && relList.supports("modulepreload")) { - return; - } - for (const link2 of document.querySelectorAll('link[rel="modulepreload"]')) { - processPreload(link2); - } - new MutationObserver((mutations) => { - for (const mutation of mutations) { - if (mutation.type !== "childList") { - continue; - } - for (const node3 of mutation.addedNodes) { - if (node3.tagName === "LINK" && node3.rel === "modulepreload") - processPreload(node3); - } - } - }).observe(document, { childList: true, subtree: true }); - function getFetchOpts(link2) { - const fetchOpts = {}; - if (link2.integrity) fetchOpts.integrity = link2.integrity; - if (link2.referrerPolicy) fetchOpts.referrerPolicy = link2.referrerPolicy; - if (link2.crossOrigin === "use-credentials") - fetchOpts.credentials = "include"; - else if (link2.crossOrigin === "anonymous") fetchOpts.credentials = "omit"; - else fetchOpts.credentials = "same-origin"; - return fetchOpts; - } - __name(getFetchOpts, "getFetchOpts"); - function processPreload(link2) { - if (link2.ep) - return; - link2.ep = true; - const fetchOpts = getFetchOpts(link2); - fetch(link2.href, fetchOpts); - } - __name(processPreload, "processPreload"); -}, "polyfill"))(); -var __defProp$2 = Object.defineProperty; -var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; -var __hasOwnProp$1 = Object.prototype.hasOwnProperty; -var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$2 = /* @__PURE__ */ __name((obj, key, value4) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value: value4 }) : obj[key] = value4, "__defNormalProp$2"); -var __spreadValues$1 = /* @__PURE__ */ __name((a2, b2) => { - for (var prop2 in b2 || (b2 = {})) - if (__hasOwnProp$1.call(b2, prop2)) - __defNormalProp$2(a2, prop2, b2[prop2]); - if (__getOwnPropSymbols$1) - for (var prop2 of __getOwnPropSymbols$1(b2)) { - if (__propIsEnum$1.call(b2, prop2)) - __defNormalProp$2(a2, prop2, b2[prop2]); - } - return a2; -}, "__spreadValues$1"); -function isEmpty$1(value4) { - return value4 === null || value4 === void 0 || value4 === "" || Array.isArray(value4) && value4.length === 0 || !(value4 instanceof Date) && typeof value4 === "object" && Object.keys(value4).length === 0; -} -__name(isEmpty$1, "isEmpty$1"); -function compare$1(value1, value22, comparator2, order = 1) { - let result = -1; - const emptyValue1 = isEmpty$1(value1); - const emptyValue2 = isEmpty$1(value22); - if (emptyValue1 && emptyValue2) result = 0; - else if (emptyValue1) result = order; - else if (emptyValue2) result = -order; - else if (typeof value1 === "string" && typeof value22 === "string") result = comparator2(value1, value22); - else result = value1 < value22 ? -1 : value1 > value22 ? 1 : 0; - return result; -} -__name(compare$1, "compare$1"); -function deepEquals(obj1, obj2) { - if (obj1 === obj2) return true; - if (obj1 && obj2 && typeof obj1 == "object" && typeof obj2 == "object") { - var arrObj1 = Array.isArray(obj1), arrObj2 = Array.isArray(obj2), i2, length, key; - if (arrObj1 && arrObj2) { - length = obj1.length; - if (length != obj2.length) return false; - for (i2 = length; i2-- !== 0; ) if (!deepEquals(obj1[i2], obj2[i2])) return false; - return true; - } - if (arrObj1 != arrObj2) return false; - var dateObj1 = obj1 instanceof Date, dateObj2 = obj2 instanceof Date; - if (dateObj1 != dateObj2) return false; - if (dateObj1 && dateObj2) return obj1.getTime() == obj2.getTime(); - var regexpObj1 = obj1 instanceof RegExp, regexpObj2 = obj2 instanceof RegExp; - if (regexpObj1 != regexpObj2) return false; - if (regexpObj1 && regexpObj2) return obj1.toString() == obj2.toString(); - var keys2 = Object.keys(obj1); - length = keys2.length; - if (length !== Object.keys(obj2).length) return false; - for (i2 = length; i2-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(obj2, keys2[i2])) return false; - for (i2 = length; i2-- !== 0; ) { - key = keys2[i2]; - if (!deepEquals(obj1[key], obj2[key])) return false; - } - return true; - } - return obj1 !== obj1 && obj2 !== obj2; -} -__name(deepEquals, "deepEquals"); -function isFunction$9(value4) { - return !!(value4 && value4.constructor && value4.call && value4.apply); -} -__name(isFunction$9, "isFunction$9"); -function isNotEmpty(value4) { - return !isEmpty$1(value4); -} -__name(isNotEmpty, "isNotEmpty"); -function resolveFieldData(data25, field) { - if (!data25 || !field) { - return null; - } - try { - const value4 = data25[field]; - if (isNotEmpty(value4)) return value4; - } catch (e2) { - } - if (Object.keys(data25).length) { - if (isFunction$9(field)) { - return field(data25); - } else if (field.indexOf(".") === -1) { - return data25[field]; - } else { - let fields = field.split("."); - let value4 = data25; - for (let i2 = 0, len = fields.length; i2 < len; ++i2) { - if (value4 == null) { - return null; - } - value4 = value4[fields[i2]]; - } - return value4; - } - } - return null; -} -__name(resolveFieldData, "resolveFieldData"); -function equals(obj1, obj2, field) { - if (field) return resolveFieldData(obj1, field) === resolveFieldData(obj2, field); - else return deepEquals(obj1, obj2); -} -__name(equals, "equals"); -function contains(value4, list2) { - if (value4 != null && list2 && list2.length) { - for (let val of list2) { - if (equals(value4, val)) return true; - } - } - return false; -} -__name(contains, "contains"); -function filter(value4, fields, filterValue) { - let filteredItems = []; - if (value4) { - for (let item3 of value4) { - for (let field of fields) { - if (String(resolveFieldData(item3, field)).toLowerCase().indexOf(filterValue.toLowerCase()) > -1) { - filteredItems.push(item3); - break; - } - } - } - } - return filteredItems; -} -__name(filter, "filter"); -function findIndexInList(value4, list2) { - let index2 = -1; - if (list2) { - for (let i2 = 0; i2 < list2.length; i2++) { - if (list2[i2] === value4) { - index2 = i2; - break; - } - } - } - return index2; -} -__name(findIndexInList, "findIndexInList"); -function findLast$1(arr, callback) { - let item3; - if (isNotEmpty(arr)) { - try { - item3 = arr.findLast(callback); - } catch (e2) { - item3 = [...arr].reverse().find(callback); - } - } - return item3; -} -__name(findLast$1, "findLast$1"); -function findLastIndex(arr, callback) { - let index2 = -1; - if (isNotEmpty(arr)) { - try { - index2 = arr.findLastIndex(callback); - } catch (e2) { - index2 = arr.lastIndexOf([...arr].reverse().find(callback)); - } - } - return index2; -} -__name(findLastIndex, "findLastIndex"); -function isObject$e(value4, empty3 = true) { - return value4 instanceof Object && value4.constructor === Object && (empty3 || Object.keys(value4).length !== 0); -} -__name(isObject$e, "isObject$e"); -function resolve$2(obj, ...params) { - return isFunction$9(obj) ? obj(...params) : obj; -} -__name(resolve$2, "resolve$2"); -function isString$9(value4, empty3 = true) { - return typeof value4 === "string" && (empty3 || value4 !== ""); -} -__name(isString$9, "isString$9"); -function toFlatCase(str) { - return isString$9(str) ? str.replace(/(-|_)/g, "").toLowerCase() : str; -} -__name(toFlatCase, "toFlatCase"); -function getKeyValue(obj, key = "", params = {}) { - const fKeys = toFlatCase(key).split("."); - const fKey = fKeys.shift(); - return fKey ? isObject$e(obj) ? getKeyValue(resolve$2(obj[Object.keys(obj).find((k2) => toFlatCase(k2) === fKey) || ""], params), fKeys.join("."), params) : void 0 : resolve$2(obj, params); -} -__name(getKeyValue, "getKeyValue"); -function insertIntoOrderedArray(item3, index2, arr, sourceArr) { - if (arr.length > 0) { - let injected = false; - for (let i2 = 0; i2 < arr.length; i2++) { - let currentItemIndex = findIndexInList(arr[i2], sourceArr); - if (currentItemIndex > index2) { - arr.splice(i2, 0, item3); - injected = true; - break; - } - } - if (!injected) { - arr.push(item3); - } - } else { - arr.push(item3); - } -} -__name(insertIntoOrderedArray, "insertIntoOrderedArray"); -function isArray$a(value4, empty3 = true) { - return Array.isArray(value4) && (empty3 || value4.length !== 0); -} -__name(isArray$a, "isArray$a"); -function isDate$3(value4) { - return value4 instanceof Date && value4.constructor === Date; -} -__name(isDate$3, "isDate$3"); -function isNumber$5(value4) { - return isNotEmpty(value4) && !isNaN(value4); -} -__name(isNumber$5, "isNumber$5"); -function isPrintableCharacter(char = "") { - return isNotEmpty(char) && char.length === 1 && !!char.match(/\S| /); -} -__name(isPrintableCharacter, "isPrintableCharacter"); -function localeComparator() { - return new Intl.Collator(void 0, { numeric: true }).compare; -} -__name(localeComparator, "localeComparator"); -function matchRegex(str, regex2) { - if (regex2) { - const match2 = regex2.test(str); - regex2.lastIndex = 0; - return match2; - } - return false; -} -__name(matchRegex, "matchRegex"); -function mergeKeys(...args) { - const _mergeKeys = /* @__PURE__ */ __name((target = {}, source = {}) => { - const mergedObj = __spreadValues$1({}, target); - Object.keys(source).forEach((key) => { - if (isObject$e(source[key]) && key in target && isObject$e(target[key])) { - mergedObj[key] = _mergeKeys(target[key], source[key]); - } else { - mergedObj[key] = source[key]; - } - }); - return mergedObj; - }, "_mergeKeys"); - return args.reduce((acc, obj, i2) => i2 === 0 ? obj : _mergeKeys(acc, obj), {}); -} -__name(mergeKeys, "mergeKeys"); -function minifyCSS(css3) { - return css3 ? css3.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/ ([{:}]) /g, "$1").replace(/([;,]) /g, "$1").replace(/ !/g, "!").replace(/: /g, ":") : css3; -} -__name(minifyCSS, "minifyCSS"); -function nestedKeys(obj = {}, parentKey = "") { - return Object.entries(obj).reduce((o2, [key, value4]) => { - const currentKey = parentKey ? `${parentKey}.${key}` : key; - isObject$e(value4) ? o2 = o2.concat(nestedKeys(value4, currentKey)) : o2.push(currentKey); - return o2; - }, []); -} -__name(nestedKeys, "nestedKeys"); -function removeAccents(str) { - if (str && str.search(/[\xC0-\xFF]/g) > -1) { - str = str.replace(/[\xC0-\xC5]/g, "A").replace(/[\xC6]/g, "AE").replace(/[\xC7]/g, "C").replace(/[\xC8-\xCB]/g, "E").replace(/[\xCC-\xCF]/g, "I").replace(/[\xD0]/g, "D").replace(/[\xD1]/g, "N").replace(/[\xD2-\xD6\xD8]/g, "O").replace(/[\xD9-\xDC]/g, "U").replace(/[\xDD]/g, "Y").replace(/[\xDE]/g, "P").replace(/[\xE0-\xE5]/g, "a").replace(/[\xE6]/g, "ae").replace(/[\xE7]/g, "c").replace(/[\xE8-\xEB]/g, "e").replace(/[\xEC-\xEF]/g, "i").replace(/[\xF1]/g, "n").replace(/[\xF2-\xF6\xF8]/g, "o").replace(/[\xF9-\xFC]/g, "u").replace(/[\xFE]/g, "p").replace(/[\xFD\xFF]/g, "y"); - } - return str; -} -__name(removeAccents, "removeAccents"); -function reorderArray(value4, from2, to) { - if (value4 && from2 !== to) { - if (to >= value4.length) { - to %= value4.length; - from2 %= value4.length; - } - value4.splice(to, 0, value4.splice(from2, 1)[0]); - } -} -__name(reorderArray, "reorderArray"); -function sort(value1, value22, order = 1, comparator2, nullSortOrder = 1) { - const result = compare$1(value1, value22, comparator2, order); - let finalSortOrder = order; - if (isEmpty$1(value1) || isEmpty$1(value22)) { - finalSortOrder = nullSortOrder === 1 ? order : nullSortOrder; - } - return finalSortOrder * result; -} -__name(sort, "sort"); -function stringify(value4, indent = 2, currentIndent = 0) { - const currentIndentStr = " ".repeat(currentIndent); - const nextIndentStr = " ".repeat(currentIndent + indent); - if (isArray$a(value4)) { - return "[" + value4.map((v2) => stringify(v2, indent, currentIndent + indent)).join(", ") + "]"; - } else if (isDate$3(value4)) { - return value4.toISOString(); - } else if (isFunction$9(value4)) { - return value4.toString(); - } else if (isObject$e(value4)) { - return "{\n" + Object.entries(value4).map(([k2, v2]) => `${nextIndentStr}${k2}: ${stringify(v2, indent, currentIndent + indent)}`).join(",\n") + ` -${currentIndentStr}}`; - } else { - return JSON.stringify(value4); - } -} -__name(stringify, "stringify"); -function toCapitalCase(str) { - return isString$9(str, false) ? str[0].toUpperCase() + str.slice(1) : str; -} -__name(toCapitalCase, "toCapitalCase"); -function toKebabCase(str) { - return isString$9(str) ? str.replace(/(_)/g, "-").replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "-" + c2.toLowerCase()).toLowerCase() : str; -} -__name(toKebabCase, "toKebabCase"); -function toTokenKey$1(str) { - return isString$9(str) ? str.replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "." + c2.toLowerCase()).toLowerCase() : str; -} -__name(toTokenKey$1, "toTokenKey$1"); -function EventBus() { - const allHandlers = /* @__PURE__ */ new Map(); - return { - on(type, handler6) { - let handlers2 = allHandlers.get(type); - if (!handlers2) handlers2 = [handler6]; - else handlers2.push(handler6); - allHandlers.set(type, handlers2); - return this; - }, - off(type, handler6) { - let handlers2 = allHandlers.get(type); - if (handlers2) { - handlers2.splice(handlers2.indexOf(handler6) >>> 0, 1); - } - return this; - }, - emit(type, evt) { - let handlers2 = allHandlers.get(type); - if (handlers2) { - handlers2.slice().map((handler6) => { - handler6(evt); - }); - } - }, - clear() { - allHandlers.clear(); - } - }; -} -__name(EventBus, "EventBus"); -var __defProp$1 = Object.defineProperty; -var __defProps = Object.defineProperties; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp$1 = /* @__PURE__ */ __name((obj, key, value4) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value: value4 }) : obj[key] = value4, "__defNormalProp$1"); -var __spreadValues = /* @__PURE__ */ __name((a2, b2) => { - for (var prop2 in b2 || (b2 = {})) - if (__hasOwnProp.call(b2, prop2)) - __defNormalProp$1(a2, prop2, b2[prop2]); - if (__getOwnPropSymbols) - for (var prop2 of __getOwnPropSymbols(b2)) { - if (__propIsEnum.call(b2, prop2)) - __defNormalProp$1(a2, prop2, b2[prop2]); - } - return a2; -}, "__spreadValues"); -var __spreadProps = /* @__PURE__ */ __name((a2, b2) => __defProps(a2, __getOwnPropDescs(b2)), "__spreadProps"); -var __objRest = /* @__PURE__ */ __name((source, exclude) => { - var target = {}; - for (var prop2 in source) - if (__hasOwnProp.call(source, prop2) && exclude.indexOf(prop2) < 0) - target[prop2] = source[prop2]; - if (source != null && __getOwnPropSymbols) - for (var prop2 of __getOwnPropSymbols(source)) { - if (exclude.indexOf(prop2) < 0 && __propIsEnum.call(source, prop2)) - target[prop2] = source[prop2]; - } - return target; -}, "__objRest"); -function definePreset(...presets) { - return mergeKeys(...presets); -} -__name(definePreset, "definePreset"); -var ThemeService = EventBus(); -var service_default = ThemeService; -function toTokenKey(str) { - return isString$9(str) ? str.replace(/[A-Z]/g, (c2, i2) => i2 === 0 ? c2 : "." + c2.toLowerCase()).toLowerCase() : str; -} -__name(toTokenKey, "toTokenKey"); -function merge$2(value1, value22) { - if (isArray$a(value1)) { - value1.push(...value22 || []); - } else if (isObject$e(value1)) { - Object.assign(value1, value22); - } -} -__name(merge$2, "merge$2"); -function toValue$2(value4) { - return isObject$e(value4) && value4.hasOwnProperty("value") && value4.hasOwnProperty("type") ? value4.value : value4; -} -__name(toValue$2, "toValue$2"); -function toUnit(value4, variable = "") { - const excludedProperties = ["opacity", "z-index", "line-height", "font-weight", "flex", "flex-grow", "flex-shrink", "order"]; - if (!excludedProperties.some((property) => variable.endsWith(property))) { - const val = `${value4}`.trim(); - const valArr = val.split(" "); - return valArr.map((v2) => isNumber$5(v2) ? `${v2}px` : v2).join(" "); - } - return value4; -} -__name(toUnit, "toUnit"); -function toNormalizePrefix(prefix2) { - return prefix2.replaceAll(/ /g, "").replace(/[^\w]/g, "-"); -} -__name(toNormalizePrefix, "toNormalizePrefix"); -function toNormalizeVariable(prefix2 = "", variable = "") { - return toNormalizePrefix(`${isString$9(prefix2, false) && isString$9(variable, false) ? `${prefix2}-` : prefix2}${variable}`); -} -__name(toNormalizeVariable, "toNormalizeVariable"); -function getVariableName(prefix2 = "", variable = "") { - return `--${toNormalizeVariable(prefix2, variable)}`; -} -__name(getVariableName, "getVariableName"); -function getVariableValue(value4, variable = "", prefix2 = "", excludedKeyRegexes = [], fallback) { - if (isString$9(value4)) { - const regex2 = /{([^}]*)}/g; - const val = value4.trim(); - if (matchRegex(val, regex2)) { - const _val = val.replaceAll(regex2, (v2) => { - const path = v2.replace(/{|}/g, ""); - const keys2 = path.split(".").filter((_v) => !excludedKeyRegexes.some((_r) => matchRegex(_v, _r))); - return `var(${getVariableName(prefix2, toKebabCase(keys2.join("-")))}${isNotEmpty(fallback) ? `, ${fallback}` : ""})`; - }); - const calculationRegex = /(\d+\s+[\+\-\*\/]\s+\d+)/g; - const cleanedVarRegex = /var\([^)]+\)/g; - return matchRegex(_val.replace(cleanedVarRegex, "0"), calculationRegex) ? `calc(${_val})` : _val; - } - return toUnit(val, variable); - } else if (isNumber$5(value4)) { - return toUnit(value4, variable); - } - return void 0; -} -__name(getVariableValue, "getVariableValue"); -function getComputedValue(obj = {}, value4) { - if (isString$9(value4)) { - const regex2 = /{([^}]*)}/g; - const val = value4.trim(); - return matchRegex(val, regex2) ? val.replaceAll(regex2, (v2) => getKeyValue(obj, v2.replace(/{|}/g, ""))) : val; - } else if (isNumber$5(value4)) { - return value4; - } - return void 0; -} -__name(getComputedValue, "getComputedValue"); -function setProperty(properties, key, value4) { - if (isString$9(key, false)) { - properties.push(`${key}:${value4};`); - } -} -__name(setProperty, "setProperty"); -function getRule(selector, properties) { - if (selector) { - return `${selector}{${properties}}`; - } - return ""; -} -__name(getRule, "getRule"); -function normalizeColor(color2) { - if (color2.length === 4) { - return `#${color2[1]}${color2[1]}${color2[2]}${color2[2]}${color2[3]}${color2[3]}`; - } - return color2; -} -__name(normalizeColor, "normalizeColor"); -function hexToRgb$1(hex) { - var bigint = parseInt(hex.substring(1), 16); - var r2 = bigint >> 16 & 255; - var g2 = bigint >> 8 & 255; - var b2 = bigint & 255; - return { r: r2, g: g2, b: b2 }; -} -__name(hexToRgb$1, "hexToRgb$1"); -function rgbToHex(r2, g2, b2) { - return `#${r2.toString(16).padStart(2, "0")}${g2.toString(16).padStart(2, "0")}${b2.toString(16).padStart(2, "0")}`; -} -__name(rgbToHex, "rgbToHex"); -var mix_default = /* @__PURE__ */ __name((color1, color2, weight) => { - color1 = normalizeColor(color1); - color2 = normalizeColor(color2); - var p2 = weight / 100; - var w2 = p2 * 2 - 1; - var w1 = (w2 + 1) / 2; - var w22 = 1 - w1; - var rgb1 = hexToRgb$1(color1); - var rgb2 = hexToRgb$1(color2); - var r2 = Math.round(rgb1.r * w1 + rgb2.r * w22); - var g2 = Math.round(rgb1.g * w1 + rgb2.g * w22); - var b2 = Math.round(rgb1.b * w1 + rgb2.b * w22); - return rgbToHex(r2, g2, b2); -}, "mix_default"); -var shade_default = /* @__PURE__ */ __name((color2, percent) => mix_default("#000000", color2, percent), "shade_default"); -var tint_default = /* @__PURE__ */ __name((color2, percent) => mix_default("#ffffff", color2, percent), "tint_default"); -var scales = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]; -var palette_default = /* @__PURE__ */ __name((color2) => { - if (/{([^}]*)}/g.test(color2)) { - const token = color2.replace(/{|}/g, ""); - return scales.reduce((acc, scale) => (acc[scale] = `{${token}.${scale}}`, acc), {}); - } - return typeof color2 === "string" ? scales.reduce((acc, scale, i2) => (acc[scale] = i2 <= 5 ? tint_default(color2, (5 - i2) * 19) : shade_default(color2, (i2 - 5) * 15), acc), {}) : color2; -}, "palette_default"); -var $dt = /* @__PURE__ */ __name((tokenPath) => { - var _a2; - const theme42 = config_default.getTheme(); - const variable = dtwt(theme42, tokenPath, void 0, "variable"); - const name2 = (_a2 = variable.match(/--[\w-]+/g)) == null ? void 0 : _a2[0]; - const value4 = dtwt(theme42, tokenPath, void 0, "value"); - return { - name: name2, - variable, - value: value4 - }; -}, "$dt"); -var dt = /* @__PURE__ */ __name((...args) => { - return dtwt(config_default.getTheme(), ...args); -}, "dt"); -var dtwt = /* @__PURE__ */ __name((theme42 = {}, tokenPath, fallback, type = "variable") => { - if (tokenPath) { - const { variable: VARIABLE, options: OPTIONS } = config_default.defaults || {}; - const { prefix: prefix2, transform: transform2 } = (theme42 == null ? void 0 : theme42.options) || OPTIONS || {}; - const regex2 = /{([^}]*)}/g; - const token = matchRegex(tokenPath, regex2) ? tokenPath : `{${tokenPath}}`; - const isStrictTransform = type === "value" || transform2 === "strict"; - return isStrictTransform ? config_default.getTokenValue(tokenPath) : getVariableValue(token, void 0, prefix2, [VARIABLE.excludedKeyRegex], fallback); - } - return ""; -}, "dtwt"); -function css$2(style2) { - return resolve$2(style2, { dt }); -} -__name(css$2, "css$2"); -var $t = /* @__PURE__ */ __name((theme42 = {}) => { - let { preset: _preset, options: _options } = theme42; - return { - preset(value4) { - _preset = _preset ? mergeKeys(_preset, value4) : value4; - return this; - }, - options(value4) { - _options = _options ? __spreadValues(__spreadValues({}, _options), value4) : value4; - return this; - }, - // features - primaryPalette(primary) { - const { semantic } = _preset || {}; - _preset = __spreadProps(__spreadValues({}, _preset), { semantic: __spreadProps(__spreadValues({}, semantic), { primary }) }); - return this; - }, - surfacePalette(surface) { - var _a2, _b; - const { semantic } = _preset || {}; - const lightSurface = (surface == null ? void 0 : surface.hasOwnProperty("light")) ? surface == null ? void 0 : surface.light : surface; - const darkSurface = (surface == null ? void 0 : surface.hasOwnProperty("dark")) ? surface == null ? void 0 : surface.dark : surface; - const newColorScheme = { - colorScheme: { - light: __spreadValues(__spreadValues({}, (_a2 = semantic == null ? void 0 : semantic.colorScheme) == null ? void 0 : _a2.light), !!lightSurface && { surface: lightSurface }), - dark: __spreadValues(__spreadValues({}, (_b = semantic == null ? void 0 : semantic.colorScheme) == null ? void 0 : _b.dark), !!darkSurface && { surface: darkSurface }) - } - }; - _preset = __spreadProps(__spreadValues({}, _preset), { semantic: __spreadValues(__spreadValues({}, semantic), newColorScheme) }); - return this; - }, - // actions - define({ useDefaultPreset = false, useDefaultOptions = false } = {}) { - return { - preset: useDefaultPreset ? config_default.getPreset() : _preset, - options: useDefaultOptions ? config_default.getOptions() : _options - }; - }, - update({ mergePresets = true, mergeOptions: mergeOptions2 = true } = {}) { - const newTheme = { - preset: mergePresets ? mergeKeys(config_default.getPreset(), _preset) : _preset, - options: mergeOptions2 ? __spreadValues(__spreadValues({}, config_default.getOptions()), _options) : _options - }; - config_default.setTheme(newTheme); - return newTheme; - }, - use(options4) { - const newTheme = this.define(options4); - config_default.setTheme(newTheme); - return newTheme; - } - }; -}, "$t"); -function toVariables_default(theme42, options4 = {}) { - const VARIABLE = config_default.defaults.variable; - const { prefix: prefix2 = VARIABLE.prefix, selector = VARIABLE.selector, excludedKeyRegex = VARIABLE.excludedKeyRegex } = options4; - const _toVariables = /* @__PURE__ */ __name((_theme, _prefix = "") => { - return Object.entries(_theme).reduce( - (acc, [key, value4]) => { - const px = matchRegex(key, excludedKeyRegex) ? toNormalizeVariable(_prefix) : toNormalizeVariable(_prefix, toKebabCase(key)); - const v2 = toValue$2(value4); - if (isObject$e(v2)) { - const { variables: variables2, tokens: tokens2 } = _toVariables(v2, px); - merge$2(acc["tokens"], tokens2); - merge$2(acc["variables"], variables2); - } else { - acc["tokens"].push((prefix2 ? px.replace(`${prefix2}-`, "") : px).replaceAll("-", ".")); - setProperty(acc["variables"], getVariableName(px), getVariableValue(v2, px, prefix2, [excludedKeyRegex])); - } - return acc; - }, - { variables: [], tokens: [] } - ); - }, "_toVariables"); - const { variables, tokens } = _toVariables(theme42, prefix2); - return { - value: variables, - tokens, - declarations: variables.join(""), - css: getRule(selector, variables.join("")) - }; -} -__name(toVariables_default, "toVariables_default"); -var themeUtils_default = { - regex: { - rules: { - class: { - pattern: /^\.([a-zA-Z][\w-]*)$/, - resolve(value4) { - return { type: "class", selector: value4, matched: this.pattern.test(value4.trim()) }; - } - }, - attr: { - pattern: /^\[(.*)\]$/, - resolve(value4) { - return { type: "attr", selector: `:root${value4}`, matched: this.pattern.test(value4.trim()) }; - } - }, - media: { - pattern: /^@media (.*)$/, - resolve(value4) { - return { type: "media", selector: `${value4}{:root{[CSS]}}`, matched: this.pattern.test(value4.trim()) }; - } - }, - system: { - pattern: /^system$/, - resolve(value4) { - return { type: "system", selector: "@media (prefers-color-scheme: dark){:root{[CSS]}}", matched: this.pattern.test(value4.trim()) }; - } - }, - custom: { - resolve(value4) { - return { type: "custom", selector: value4, matched: true }; - } - } - }, - resolve(value4) { - const rules = Object.keys(this.rules).filter((k2) => k2 !== "custom").map((r2) => this.rules[r2]); - return [value4].flat().map((v2) => { - var _a2; - return (_a2 = rules.map((r2) => r2.resolve(v2)).find((rr) => rr.matched)) != null ? _a2 : this.rules.custom.resolve(v2); - }); - } - }, - _toVariables(theme42, options4) { - return toVariables_default(theme42, { prefix: options4 == null ? void 0 : options4.prefix }); - }, - getCommon({ name: name2 = "", theme: theme42 = {}, params, set: set3, defaults: defaults2 }) { - var _c, _d, _e, _f; - const { preset, options: options4 } = theme42; - let primitive_css, primitive_tokens, semantic_css, semantic_tokens; - if (isNotEmpty(preset)) { - const { primitive, semantic } = preset; - const _a2 = semantic || {}, { colorScheme } = _a2, sRest = __objRest(_a2, ["colorScheme"]); - const _b = colorScheme || {}, { dark: dark2 } = _b, csRest = __objRest(_b, ["dark"]); - const prim_var = isNotEmpty(primitive) ? this._toVariables({ primitive }, options4) : {}; - const sRest_var = isNotEmpty(sRest) ? this._toVariables({ semantic: sRest }, options4) : {}; - const csRest_var = isNotEmpty(csRest) ? this._toVariables({ light: csRest }, options4) : {}; - const dark_var = isNotEmpty(dark2) ? this._toVariables({ dark: dark2 }, options4) : {}; - const [prim_css, prim_tokens] = [(_c = prim_var.declarations) != null ? _c : "", prim_var.tokens]; - const [sRest_css, sRest_tokens] = [(_d = sRest_var.declarations) != null ? _d : "", sRest_var.tokens || []]; - const [csRest_css, csRest_tokens] = [(_e = csRest_var.declarations) != null ? _e : "", csRest_var.tokens || []]; - const [dark_css, dark_tokens] = [(_f = dark_var.declarations) != null ? _f : "", dark_var.tokens || []]; - primitive_css = this.transformCSS(name2, prim_css, "light", "variable", options4, set3, defaults2); - primitive_tokens = prim_tokens; - const semantic_light_css = this.transformCSS(name2, `${sRest_css}${csRest_css}color-scheme:light`, "light", "variable", options4, set3, defaults2); - const semantic_dark_css = this.transformCSS(name2, `${dark_css}color-scheme:dark`, "dark", "variable", options4, set3, defaults2); - semantic_css = `${semantic_light_css}${semantic_dark_css}`; - semantic_tokens = [.../* @__PURE__ */ new Set([...sRest_tokens, ...csRest_tokens, ...dark_tokens])]; - } - return { - primitive: { - css: primitive_css, - tokens: primitive_tokens - }, - semantic: { - css: semantic_css, - tokens: semantic_tokens - } - }; - }, - getPreset({ name: name2 = "", preset = {}, options: options4, params, set: set3, defaults: defaults2, selector }) { - var _c, _d, _e; - const _name = name2.replace("-directive", ""); - const _a2 = preset, { colorScheme } = _a2, vRest = __objRest(_a2, ["colorScheme"]); - const _b = colorScheme || {}, { dark: dark2 } = _b, csRest = __objRest(_b, ["dark"]); - const vRest_var = isNotEmpty(vRest) ? this._toVariables({ [_name]: vRest }, options4) : {}; - const csRest_var = isNotEmpty(csRest) ? this._toVariables({ [_name]: csRest }, options4) : {}; - const dark_var = isNotEmpty(dark2) ? this._toVariables({ [_name]: dark2 }, options4) : {}; - const [vRest_css, vRest_tokens] = [(_c = vRest_var.declarations) != null ? _c : "", vRest_var.tokens || []]; - const [csRest_css, csRest_tokens] = [(_d = csRest_var.declarations) != null ? _d : "", csRest_var.tokens || []]; - const [dark_css, dark_tokens] = [(_e = dark_var.declarations) != null ? _e : "", dark_var.tokens || []]; - const tokens = [.../* @__PURE__ */ new Set([...vRest_tokens, ...csRest_tokens, ...dark_tokens])]; - const light_variable_css = this.transformCSS(_name, `${vRest_css}${csRest_css}`, "light", "variable", options4, set3, defaults2, selector); - const dark_variable_css = this.transformCSS(_name, dark_css, "dark", "variable", options4, set3, defaults2, selector); - return { - css: `${light_variable_css}${dark_variable_css}`, - tokens - }; - }, - getPresetC({ name: name2 = "", theme: theme42 = {}, params, set: set3, defaults: defaults2 }) { - var _a2; - const { preset, options: options4 } = theme42; - const cPreset = (_a2 = preset == null ? void 0 : preset.components) == null ? void 0 : _a2[name2]; - return this.getPreset({ name: name2, preset: cPreset, options: options4, params, set: set3, defaults: defaults2 }); - }, - getPresetD({ name: name2 = "", theme: theme42 = {}, params, set: set3, defaults: defaults2 }) { - var _a2; - const dName = name2.replace("-directive", ""); - const { preset, options: options4 } = theme42; - const dPreset = (_a2 = preset == null ? void 0 : preset.directives) == null ? void 0 : _a2[dName]; - return this.getPreset({ name: dName, preset: dPreset, options: options4, params, set: set3, defaults: defaults2 }); - }, - getColorSchemeOption(options4, defaults2) { - var _a2; - return this.regex.resolve((_a2 = options4.darkModeSelector) != null ? _a2 : defaults2.options.darkModeSelector); - }, - getLayerOrder(name2, options4 = {}, params, defaults2) { - const { cssLayer } = options4; - if (cssLayer) { - const order = resolve$2(cssLayer.order || "primeui", params); - return `@layer ${order}`; - } - return ""; - }, - getCommonStyleSheet({ name: name2 = "", theme: theme42 = {}, params, props = {}, set: set3, defaults: defaults2 }) { - const common = this.getCommon({ name: name2, theme: theme42, params, set: set3, defaults: defaults2 }); - const _props = Object.entries(props).reduce((acc, [k2, v2]) => acc.push(`${k2}="${v2}"`) && acc, []).join(" "); - return Object.entries(common || {}).reduce((acc, [key, value4]) => { - if (value4 == null ? void 0 : value4.css) { - const _css = minifyCSS(value4 == null ? void 0 : value4.css); - const id3 = `${key}-variables`; - acc.push(``); - } - return acc; - }, []).join(""); - }, - getStyleSheet({ name: name2 = "", theme: theme42 = {}, params, props = {}, set: set3, defaults: defaults2 }) { - var _a2; - const options4 = { name: name2, theme: theme42, params, set: set3, defaults: defaults2 }; - const preset_css = (_a2 = name2.includes("-directive") ? this.getPresetD(options4) : this.getPresetC(options4)) == null ? void 0 : _a2.css; - const _props = Object.entries(props).reduce((acc, [k2, v2]) => acc.push(`${k2}="${v2}"`) && acc, []).join(" "); - return preset_css ? `` : ""; - }, - createTokens(obj = {}, defaults2, parentKey = "", parentPath = "", tokens = {}) { - Object.entries(obj).forEach(([key, value4]) => { - const currentKey = matchRegex(key, defaults2.variable.excludedKeyRegex) ? parentKey : parentKey ? `${parentKey}.${toTokenKey$1(key)}` : toTokenKey$1(key); - const currentPath = parentPath ? `${parentPath}.${key}` : key; - if (isObject$e(value4)) { - this.createTokens(value4, defaults2, currentKey, currentPath, tokens); - } else { - tokens[currentKey] || (tokens[currentKey] = { - paths: [], - computed(colorScheme, tokenPathMap = {}) { - if (colorScheme) { - const path = this.paths.find((p2) => p2.scheme === colorScheme) || this.paths.find((p2) => p2.scheme === "none"); - return path == null ? void 0 : path.computed(colorScheme, tokenPathMap["binding"]); - } - return this.paths.map((p2) => p2.computed(p2.scheme, tokenPathMap[p2.scheme])); - } - }); - tokens[currentKey].paths.push({ - path: currentPath, - value: value4, - scheme: currentPath.includes("colorScheme.light") ? "light" : currentPath.includes("colorScheme.dark") ? "dark" : "none", - computed(colorScheme, tokenPathMap = {}) { - const regex2 = /{([^}]*)}/g; - let computedValue = value4; - tokenPathMap["name"] = this.path; - tokenPathMap["binding"] || (tokenPathMap["binding"] = {}); - if (matchRegex(value4, regex2)) { - const val = value4.trim(); - const _val = val.replaceAll(regex2, (v2) => { - var _a2, _b; - const path = v2.replace(/{|}/g, ""); - return (_b = (_a2 = tokens[path]) == null ? void 0 : _a2.computed(colorScheme, tokenPathMap)) == null ? void 0 : _b.value; - }); - const calculationRegex = /(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g; - const cleanedVarRegex = /var\([^)]+\)/g; - computedValue = matchRegex(_val.replace(cleanedVarRegex, "0"), calculationRegex) ? `calc(${_val})` : _val; - } - isEmpty$1(tokenPathMap["binding"]) && delete tokenPathMap["binding"]; - return { - colorScheme, - path: this.path, - paths: tokenPathMap, - value: computedValue.includes("undefined") ? void 0 : computedValue - }; - } - }); - } - }); - return tokens; - }, - getTokenValue(tokens, path, defaults2) { - var _a2; - const normalizePath2 = /* @__PURE__ */ __name((str) => { - const strArr = str.split("."); - return strArr.filter((s2) => !matchRegex(s2.toLowerCase(), defaults2.variable.excludedKeyRegex)).join("."); - }, "normalizePath"); - const token = normalizePath2(path); - const colorScheme = path.includes("colorScheme.light") ? "light" : path.includes("colorScheme.dark") ? "dark" : void 0; - const computedValues = [(_a2 = tokens[token]) == null ? void 0 : _a2.computed(colorScheme)].flat().filter((computed2) => computed2); - return computedValues.length === 1 ? computedValues[0].value : computedValues.reduce((acc = {}, computed2) => { - const _a22 = computed2, { colorScheme: cs } = _a22, rest = __objRest(_a22, ["colorScheme"]); - acc[cs] = rest; - return acc; - }, void 0); - }, - transformCSS(name2, css22, mode2, type, options4 = {}, set3, defaults2, selector) { - if (isNotEmpty(css22)) { - const { cssLayer } = options4; - if (type !== "style") { - const colorSchemeOption = this.getColorSchemeOption(options4, defaults2); - const _css = selector ? getRule(selector, css22) : css22; - css22 = mode2 === "dark" ? colorSchemeOption.reduce((acc, { selector: _selector }) => { - if (isNotEmpty(_selector)) { - acc += _selector.includes("[CSS]") ? _selector.replace("[CSS]", _css) : getRule(_selector, _css); - } - return acc; - }, "") : getRule(selector != null ? selector : ":root", css22); - } - if (cssLayer) { - const layerOptions = { - name: "primeui", - order: "primeui" - }; - isObject$e(cssLayer) && (layerOptions.name = resolve$2(cssLayer.name, { name: name2, type })); - if (isNotEmpty(layerOptions.name)) { - css22 = getRule(`@layer ${layerOptions.name}`, css22); - set3 == null ? void 0 : set3.layerNames(layerOptions.name); - } - } - return css22; - } - return ""; - } -}; -var config_default = { - defaults: { - variable: { - prefix: "p", - selector: ":root", - excludedKeyRegex: /^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states)$/gi - }, - options: { - prefix: "p", - darkModeSelector: "system", - cssLayer: false - } - }, - _theme: void 0, - _layerNames: /* @__PURE__ */ new Set(), - _loadedStyleNames: /* @__PURE__ */ new Set(), - _loadingStyles: /* @__PURE__ */ new Set(), - _tokens: {}, - update(newValues = {}) { - const { theme: theme42 } = newValues; - if (theme42) { - this._theme = __spreadProps(__spreadValues({}, theme42), { - options: __spreadValues(__spreadValues({}, this.defaults.options), theme42.options) - }); - this._tokens = themeUtils_default.createTokens(this.preset, this.defaults); - this.clearLoadedStyleNames(); - } - }, - get theme() { - return this._theme; - }, - get preset() { - var _a2; - return ((_a2 = this.theme) == null ? void 0 : _a2.preset) || {}; - }, - get options() { - var _a2; - return ((_a2 = this.theme) == null ? void 0 : _a2.options) || {}; - }, - get tokens() { - return this._tokens; - }, - getTheme() { - return this.theme; - }, - setTheme(newValue2) { - this.update({ theme: newValue2 }); - service_default.emit("theme:change", newValue2); - }, - getPreset() { - return this.preset; - }, - setPreset(newValue2) { - this._theme = __spreadProps(__spreadValues({}, this.theme), { preset: newValue2 }); - this._tokens = themeUtils_default.createTokens(newValue2, this.defaults); - this.clearLoadedStyleNames(); - service_default.emit("preset:change", newValue2); - service_default.emit("theme:change", this.theme); - }, - getOptions() { - return this.options; - }, - setOptions(newValue2) { - this._theme = __spreadProps(__spreadValues({}, this.theme), { options: newValue2 }); - this.clearLoadedStyleNames(); - service_default.emit("options:change", newValue2); - service_default.emit("theme:change", this.theme); - }, - getLayerNames() { - return [...this._layerNames]; - }, - setLayerNames(layerName) { - this._layerNames.add(layerName); - }, - getLoadedStyleNames() { - return this._loadedStyleNames; - }, - isStyleNameLoaded(name2) { - return this._loadedStyleNames.has(name2); - }, - setLoadedStyleName(name2) { - this._loadedStyleNames.add(name2); - }, - deleteLoadedStyleName(name2) { - this._loadedStyleNames.delete(name2); - }, - clearLoadedStyleNames() { - this._loadedStyleNames.clear(); - }, - getTokenValue(tokenPath) { - return themeUtils_default.getTokenValue(this.tokens, tokenPath, this.defaults); - }, - getCommon(name2 = "", params) { - return themeUtils_default.getCommon({ name: name2, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); - }, - getComponent(name2 = "", params) { - const options4 = { name: name2, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; - return themeUtils_default.getPresetC(options4); - }, - getDirective(name2 = "", params) { - const options4 = { name: name2, theme: this.theme, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; - return themeUtils_default.getPresetD(options4); - }, - getCustomPreset(name2 = "", preset, selector, params) { - const options4 = { name: name2, preset, options: this.options, selector, params, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }; - return themeUtils_default.getPreset(options4); - }, - getLayerOrderCSS(name2 = "") { - return themeUtils_default.getLayerOrder(name2, this.options, { names: this.getLayerNames() }, this.defaults); - }, - transformCSS(name2 = "", css22, type = "style", mode2) { - return themeUtils_default.transformCSS(name2, css22, mode2, type, this.options, { layerNames: this.setLayerNames.bind(this) }, this.defaults); - }, - getCommonStyleSheet(name2 = "", params, props = {}) { - return themeUtils_default.getCommonStyleSheet({ name: name2, theme: this.theme, params, props, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); - }, - getStyleSheet(name2, params, props = {}) { - return themeUtils_default.getStyleSheet({ name: name2, theme: this.theme, params, props, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } }); - }, - onStyleMounted(name2) { - this._loadingStyles.add(name2); - }, - onStyleUpdated(name2) { - this._loadingStyles.add(name2); - }, - onStyleLoaded(event, { name: name2 }) { - if (this._loadingStyles.size) { - this._loadingStyles.delete(name2); - service_default.emit(`theme:${name2}:load`, event); - !this._loadingStyles.size && service_default.emit("theme:load"); - } - } -}; -function updatePreset(...presets) { - const newPreset = mergeKeys(config_default.getPreset(), ...presets); - config_default.setPreset(newPreset); - return newPreset; -} -__name(updatePreset, "updatePreset"); -function updatePrimaryPalette(primary) { - return $t().primaryPalette(primary).update().preset; -} -__name(updatePrimaryPalette, "updatePrimaryPalette"); -function updateSurfacePalette(palette) { - return $t().surfacePalette(palette).update().preset; -} -__name(updateSurfacePalette, "updateSurfacePalette"); -function usePreset(...presets) { - const newPreset = mergeKeys(...presets); - config_default.setPreset(newPreset); - return newPreset; -} -__name(usePreset, "usePreset"); -function useTheme(theme42) { - return $t(theme42).update({ mergePresets: false }); -} -__name(useTheme, "useTheme"); -var index$1n = { - root: { - transitionDuration: "{transition.duration}" - }, - panel: { - borderWidth: "0 0 1px 0", - borderColor: "{content.border.color}" - }, - header: { - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{text.color}", - padding: "1.125rem", - fontWeight: "600", - borderRadius: "0", - borderWidth: "0", - borderColor: "{content.border.color}", - background: "{content.background}", - hoverBackground: "{content.background}", - activeBackground: "{content.background}", - activeHoverBackground: "{content.background}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - toggleIcon: { - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{text.color}", - activeHoverColor: "{text.color}" - }, - first: { - topBorderRadius: "{content.border.radius}", - borderWidth: "0" - }, - last: { - bottomBorderRadius: "{content.border.radius}", - activeBottomBorderRadius: "0" - } - }, - content: { - borderWidth: "0", - borderColor: "{content.border.color}", - background: "{content.background}", - color: "{text.color}", - padding: "0 1.125rem 1.125rem 1.125rem" - } -}; -var index$1m = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}" - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - }, - optionGroup: { - background: "{list.option.group.background}", - color: "{list.option.group.color}", - fontWeight: "{list.option.group.font.weight}", - padding: "{list.option.group.padding}" - }, - dropdown: { - width: "2.5rem", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.border.color}", - activeBorderColor: "{form.field.border.color}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - chip: { - borderRadius: "{border.radius.sm}" - }, - emptyMessage: { - padding: "{list.option.padding}" - }, - colorScheme: { - light: { - dropdown: { - background: "{surface.100}", - hoverBackground: "{surface.200}", - activeBackground: "{surface.300}", - color: "{surface.600}", - hoverColor: "{surface.700}", - activeColor: "{surface.800}" - } - }, - dark: { - dropdown: { - background: "{surface.800}", - hoverBackground: "{surface.700}", - activeBackground: "{surface.600}", - color: "{surface.300}", - hoverColor: "{surface.200}", - activeColor: "{surface.100}" - } - } - } -}; -var index$1l = { - root: { - width: "2rem", - height: "2rem", - fontSize: "1rem", - background: "{content.border.color}", - borderRadius: "{content.border.radius}" - }, - group: { - borderColor: "{content.background}", - offset: "-1rem" - }, - lg: { - width: "3rem", - height: "3rem", - fontSize: "1.5rem" - }, - xl: { - width: "4rem", - height: "4rem", - fontSize: "2rem" - } -}; -var index$1k = { - root: { - borderRadius: "{border.radius.md}", - padding: "0 0.5rem", - fontSize: "0.75rem", - fontWeight: "700", - minWidth: "1.5rem", - height: "1.5rem" - }, - dot: { - size: "0.5rem" - }, - sm: { - fontSize: "0.625rem", - minWidth: "1.25rem", - height: "1.25rem" - }, - lg: { - fontSize: "0.875rem", - minWidth: "1.75rem", - height: "1.75rem" - }, - xl: { - fontSize: "1rem", - minWidth: "2rem", - height: "2rem" - }, - colorScheme: { - light: { - primary: { - background: "{primary.color}", - color: "{primary.contrast.color}" - }, - secondary: { - background: "{surface.100}", - color: "{surface.600}" - }, - success: { - background: "{green.500}", - color: "{surface.0}" - }, - info: { - background: "{sky.500}", - color: "{surface.0}" - }, - warn: { - background: "{orange.500}", - color: "{surface.0}" - }, - danger: { - background: "{red.500}", - color: "{surface.0}" - }, - contrast: { - background: "{surface.950}", - color: "{surface.0}" - } - }, - dark: { - primary: { - background: "{primary.color}", - color: "{primary.contrast.color}" - }, - secondary: { - background: "{surface.800}", - color: "{surface.300}" - }, - success: { - background: "{green.400}", - color: "{green.950}" - }, - info: { - background: "{sky.400}", - color: "{sky.950}" - }, - warn: { - background: "{orange.400}", - color: "{orange.950}" - }, - danger: { - background: "{red.400}", - color: "{red.950}" - }, - contrast: { - background: "{surface.0}", - color: "{surface.950}" - } - } - } -}; -var index$1j = { - root: { - borderRadius: "{content.border.radius}" - } -}; -var index$1i = { - root: { - padding: "1rem", - background: "{content.background}", - gap: "0.5rem", - transitionDuration: "{transition.duration}" - }, - item: { - color: "{text.muted.color}", - hoverColor: "{text.color}", - borderRadius: "{content.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - hoverColor: "{navigation.item.icon.focus.color}" - }, - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - separator: { - color: "{navigation.item.icon.color}" - } -}; -var index$1h = { - root: { - borderRadius: "{form.field.border.radius}", - roundedBorderRadius: "2rem", - gap: "0.5rem", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - iconOnlyWidth: "2.5rem", - sm: { - fontSize: "0.875rem", - paddingX: "0.625rem", - paddingY: "0.375rem" - }, - lg: { - fontSize: "1.125rem", - paddingX: "0.875rem", - paddingY: "0.625rem" - }, - label: { - fontWeight: "500" - }, - raisedShadow: "0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - offset: "{focus.ring.offset}" - }, - badgeSize: "1rem", - transitionDuration: "{form.field.transition.duration}" - }, - colorScheme: { - light: { - root: { - primary: { - background: "{primary.color}", - hoverBackground: "{primary.hover.color}", - activeBackground: "{primary.active.color}", - borderColor: "{primary.color}", - hoverBorderColor: "{primary.hover.color}", - activeBorderColor: "{primary.active.color}", - color: "{primary.contrast.color}", - hoverColor: "{primary.contrast.color}", - activeColor: "{primary.contrast.color}", - focusRing: { - color: "{primary.color}", - shadow: "none" - } - }, - secondary: { - background: "{surface.100}", - hoverBackground: "{surface.200}", - activeBackground: "{surface.300}", - borderColor: "{surface.100}", - hoverBorderColor: "{surface.200}", - activeBorderColor: "{surface.300}", - color: "{surface.600}", - hoverColor: "{surface.700}", - activeColor: "{surface.800}", - focusRing: { - color: "{surface.600}", - shadow: "none" - } - }, - info: { - background: "{sky.500}", - hoverBackground: "{sky.600}", - activeBackground: "{sky.700}", - borderColor: "{sky.500}", - hoverBorderColor: "{sky.600}", - activeBorderColor: "{sky.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{sky.500}", - shadow: "none" - } - }, - success: { - background: "{green.500}", - hoverBackground: "{green.600}", - activeBackground: "{green.700}", - borderColor: "{green.500}", - hoverBorderColor: "{green.600}", - activeBorderColor: "{green.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{green.500}", - shadow: "none" - } - }, - warn: { - background: "{orange.500}", - hoverBackground: "{orange.600}", - activeBackground: "{orange.700}", - borderColor: "{orange.500}", - hoverBorderColor: "{orange.600}", - activeBorderColor: "{orange.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{orange.500}", - shadow: "none" - } - }, - help: { - background: "{purple.500}", - hoverBackground: "{purple.600}", - activeBackground: "{purple.700}", - borderColor: "{purple.500}", - hoverBorderColor: "{purple.600}", - activeBorderColor: "{purple.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{purple.500}", - shadow: "none" - } - }, - danger: { - background: "{red.500}", - hoverBackground: "{red.600}", - activeBackground: "{red.700}", - borderColor: "{red.500}", - hoverBorderColor: "{red.600}", - activeBorderColor: "{red.700}", - color: "#ffffff", - hoverColor: "#ffffff", - activeColor: "#ffffff", - focusRing: { - color: "{red.500}", - shadow: "none" - } - }, - contrast: { - background: "{surface.950}", - hoverBackground: "{surface.900}", - activeBackground: "{surface.800}", - borderColor: "{surface.950}", - hoverBorderColor: "{surface.900}", - activeBorderColor: "{surface.800}", - color: "{surface.0}", - hoverColor: "{surface.0}", - activeColor: "{surface.0}", - focusRing: { - color: "{surface.950}", - shadow: "none" - } - } - }, - outlined: { - primary: { - hoverBackground: "{primary.50}", - activeBackground: "{primary.100}", - borderColor: "{primary.200}", - color: "{primary.color}" - }, - secondary: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.500}" - }, - success: { - hoverBackground: "{green.50}", - activeBackground: "{green.100}", - borderColor: "{green.200}", - color: "{green.500}" - }, - info: { - hoverBackground: "{sky.50}", - activeBackground: "{sky.100}", - borderColor: "{sky.200}", - color: "{sky.500}" - }, - warn: { - hoverBackground: "{orange.50}", - activeBackground: "{orange.100}", - borderColor: "{orange.200}", - color: "{orange.500}" - }, - help: { - hoverBackground: "{purple.50}", - activeBackground: "{purple.100}", - borderColor: "{purple.200}", - color: "{purple.500}" - }, - danger: { - hoverBackground: "{red.50}", - activeBackground: "{red.100}", - borderColor: "{red.200}", - color: "{red.500}" - }, - contrast: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - borderColor: "{surface.700}", - color: "{surface.950}" - }, - plain: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.700}" - } - }, - text: { - primary: { - hoverBackground: "{primary.50}", - activeBackground: "{primary.100}", - color: "{primary.color}" - }, - secondary: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - color: "{surface.500}" - }, - success: { - hoverBackground: "{green.50}", - activeBackground: "{green.100}", - color: "{green.500}" - }, - info: { - hoverBackground: "{sky.50}", - activeBackground: "{sky.100}", - color: "{sky.500}" - }, - warn: { - hoverBackground: "{orange.50}", - activeBackground: "{orange.100}", - color: "{orange.500}" - }, - help: { - hoverBackground: "{purple.50}", - activeBackground: "{purple.100}", - color: "{purple.500}" - }, - danger: { - hoverBackground: "{red.50}", - activeBackground: "{red.100}", - color: "{red.500}" - }, - plain: { - hoverBackground: "{surface.50}", - activeBackground: "{surface.100}", - color: "{surface.700}" - } - }, - link: { - color: "{primary.color}", - hoverColor: "{primary.color}", - activeColor: "{primary.color}" - } - }, - dark: { - root: { - primary: { - background: "{primary.color}", - hoverBackground: "{primary.hover.color}", - activeBackground: "{primary.active.color}", - borderColor: "{primary.color}", - hoverBorderColor: "{primary.hover.color}", - activeBorderColor: "{primary.active.color}", - color: "{primary.contrast.color}", - hoverColor: "{primary.contrast.color}", - activeColor: "{primary.contrast.color}", - focusRing: { - color: "{primary.color}", - shadow: "none" - } - }, - secondary: { - background: "{surface.800}", - hoverBackground: "{surface.700}", - activeBackground: "{surface.600}", - borderColor: "{surface.800}", - hoverBorderColor: "{surface.700}", - activeBorderColor: "{surface.600}", - color: "{surface.300}", - hoverColor: "{surface.200}", - activeColor: "{surface.100}", - focusRing: { - color: "{surface.300}", - shadow: "none" - } - }, - info: { - background: "{sky.400}", - hoverBackground: "{sky.300}", - activeBackground: "{sky.200}", - borderColor: "{sky.400}", - hoverBorderColor: "{sky.300}", - activeBorderColor: "{sky.200}", - color: "{sky.950}", - hoverColor: "{sky.950}", - activeColor: "{sky.950}", - focusRing: { - color: "{sky.400}", - shadow: "none" - } - }, - success: { - background: "{green.400}", - hoverBackground: "{green.300}", - activeBackground: "{green.200}", - borderColor: "{green.400}", - hoverBorderColor: "{green.300}", - activeBorderColor: "{green.200}", - color: "{green.950}", - hoverColor: "{green.950}", - activeColor: "{green.950}", - focusRing: { - color: "{green.400}", - shadow: "none" - } - }, - warn: { - background: "{orange.400}", - hoverBackground: "{orange.300}", - activeBackground: "{orange.200}", - borderColor: "{orange.400}", - hoverBorderColor: "{orange.300}", - activeBorderColor: "{orange.200}", - color: "{orange.950}", - hoverColor: "{orange.950}", - activeColor: "{orange.950}", - focusRing: { - color: "{orange.400}", - shadow: "none" - } - }, - help: { - background: "{purple.400}", - hoverBackground: "{purple.300}", - activeBackground: "{purple.200}", - borderColor: "{purple.400}", - hoverBorderColor: "{purple.300}", - activeBorderColor: "{purple.200}", - color: "{purple.950}", - hoverColor: "{purple.950}", - activeColor: "{purple.950}", - focusRing: { - color: "{purple.400}", - shadow: "none" - } - }, - danger: { - background: "{red.400}", - hoverBackground: "{red.300}", - activeBackground: "{red.200}", - borderColor: "{red.400}", - hoverBorderColor: "{red.300}", - activeBorderColor: "{red.200}", - color: "{red.950}", - hoverColor: "{red.950}", - activeColor: "{red.950}", - focusRing: { - color: "{red.400}", - shadow: "none" - } - }, - contrast: { - background: "{surface.0}", - hoverBackground: "{surface.100}", - activeBackground: "{surface.200}", - borderColor: "{surface.0}", - hoverBorderColor: "{surface.100}", - activeBorderColor: "{surface.200}", - color: "{surface.950}", - hoverColor: "{surface.950}", - activeColor: "{surface.950}", - focusRing: { - color: "{surface.0}", - shadow: "none" - } - } - }, - outlined: { - primary: { - hoverBackground: "color-mix(in srgb, {primary.color}, transparent 96%)", - activeBackground: "color-mix(in srgb, {primary.color}, transparent 84%)", - borderColor: "{primary.700}", - color: "{primary.color}" - }, - secondary: { - hoverBackground: "rgba(255,255,255,0.04)", - activeBackground: "rgba(255,255,255,0.16)", - borderColor: "{surface.700}", - color: "{surface.400}" - }, - success: { - hoverBackground: "color-mix(in srgb, {green.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {green.400}, transparent 84%)", - borderColor: "{green.700}", - color: "{green.400}" - }, - info: { - hoverBackground: "color-mix(in srgb, {sky.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {sky.400}, transparent 84%)", - borderColor: "{sky.700}", - color: "{sky.400}" - }, - warn: { - hoverBackground: "color-mix(in srgb, {orange.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {orange.400}, transparent 84%)", - borderColor: "{orange.700}", - color: "{orange.400}" - }, - help: { - hoverBackground: "color-mix(in srgb, {purple.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {purple.400}, transparent 84%)", - borderColor: "{purple.700}", - color: "{purple.400}" - }, - danger: { - hoverBackground: "color-mix(in srgb, {red.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {red.400}, transparent 84%)", - borderColor: "{red.700}", - color: "{red.400}" - }, - contrast: { - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - borderColor: "{surface.500}", - color: "{surface.0}" - }, - plain: { - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - borderColor: "{surface.600}", - color: "{surface.0}" - } - }, - text: { - primary: { - hoverBackground: "color-mix(in srgb, {primary.color}, transparent 96%)", - activeBackground: "color-mix(in srgb, {primary.color}, transparent 84%)", - color: "{primary.color}" - }, - secondary: { - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - color: "{surface.400}" - }, - success: { - hoverBackground: "color-mix(in srgb, {green.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {green.400}, transparent 84%)", - color: "{green.400}" - }, - info: { - hoverBackground: "color-mix(in srgb, {sky.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {sky.400}, transparent 84%)", - color: "{sky.400}" - }, - warn: { - hoverBackground: "color-mix(in srgb, {orange.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {orange.400}, transparent 84%)", - color: "{orange.400}" - }, - help: { - hoverBackground: "color-mix(in srgb, {purple.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {purple.400}, transparent 84%)", - color: "{purple.400}" - }, - danger: { - hoverBackground: "color-mix(in srgb, {red.400}, transparent 96%)", - activeBackground: "color-mix(in srgb, {red.400}, transparent 84%)", - color: "{red.400}" - }, - plain: { - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - color: "{surface.0}" - } - }, - link: { - color: "{primary.color}", - hoverColor: "{primary.color}", - activeColor: "{primary.color}" - } - } - } -}; -var index$1g = { - root: { - background: "{content.background}", - borderRadius: "{border.radius.xl}", - color: "{content.color}", - shadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)" - }, - body: { - padding: "1.25rem", - gap: "0.5rem" - }, - caption: { - gap: "0.5rem" - }, - title: { - fontSize: "1.25rem", - fontWeight: "500" - }, - subtitle: { - color: "{text.muted.color}" - } -}; -var index$1f = { - root: { - transitionDuration: "{transition.duration}" - }, - content: { - gap: "0.25rem" - }, - indicatorList: { - padding: "1rem", - gap: "0.5rem" - }, - indicator: { - width: "2rem", - height: "0.5rem", - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - colorScheme: { - light: { - indicator: { - background: "{surface.200}", - hoverBackground: "{surface.300}", - activeBackground: "{primary.color}" - } - }, - dark: { - indicator: { - background: "{surface.700}", - hoverBackground: "{surface.600}", - activeBackground: "{primary.color}" - } - } - } -}; -var index$1e = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - dropdown: { - width: "2.5rem", - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}" - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}", - icon: { - color: "{list.option.icon.color}", - focusColor: "{list.option.icon.focus.color}", - size: "0.875rem" - } - } -}; -var index$1d = { - root: { - borderRadius: "{border.radius.sm}", - width: "1.25rem", - height: "1.25rem", - background: "{form.field.background}", - checkedBackground: "{primary.color}", - checkedHoverBackground: "{primary.hover.color}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.border.color}", - checkedBorderColor: "{primary.color}", - checkedHoverBorderColor: "{primary.hover.color}", - checkedFocusBorderColor: "{primary.color}", - checkedDisabledBorderColor: "{form.field.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - shadow: "{form.field.shadow}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - icon: { - size: "0.875rem", - color: "{form.field.color}", - checkedColor: "{primary.contrast.color}", - checkedHoverColor: "{primary.contrast.color}", - disabledColor: "{form.field.disabled.color}" - } -}; -var index$1c = { - root: { - borderRadius: "16px", - paddingX: "0.75rem", - paddingY: "0.5rem", - gap: "0.5rem", - transitionDuration: "{transition.duration}" - }, - image: { - width: "2rem", - height: "2rem" - }, - icon: { - size: "1rem" - }, - removeIcon: { - size: "1rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - } - }, - colorScheme: { - light: { - root: { - background: "{surface.100}", - color: "{surface.800}" - }, - icon: { - color: "{surface.800}" - }, - removeIcon: { - color: "{surface.800}" - } - }, - dark: { - root: { - background: "{surface.800}", - color: "{surface.0}" - }, - icon: { - color: "{surface.0}" - }, - removeIcon: { - color: "{surface.0}" - } - } - } -}; -var index$1b = { - root: { - transitionDuration: "{transition.duration}" - }, - preview: { - width: "1.5rem", - height: "1.5rem", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - panel: { - shadow: "{overlay.popover.shadow}", - borderRadius: "{overlay.popover.borderRadius}" - }, - colorScheme: { - light: { - panel: { - background: "{surface.800}", - borderColor: "{surface.900}" - }, - handle: { - color: "{surface.0}" - } - }, - dark: { - panel: { - background: "{surface.900}", - borderColor: "{surface.700}" - }, - handle: { - color: "{surface.0}" - } - } - } -}; -var index$1a = { - icon: { - size: "2rem", - color: "{overlay.modal.color}" - }, - content: { - gap: "1rem" - } -}; -var index$19 = { - root: { - background: "{overlay.popover.background}", - borderColor: "{overlay.popover.border.color}", - color: "{overlay.popover.color}", - borderRadius: "{overlay.popover.border.radius}", - shadow: "{overlay.popover.shadow}", - gutter: "10px", - arrowOffset: "1.25rem" - }, - content: { - padding: "{overlay.popover.padding}", - gap: "1rem" - }, - icon: { - size: "1.5rem", - color: "{overlay.popover.color}" - }, - footer: { - gap: "0.5rem", - padding: "0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}" - } -}; -var index$18 = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.navigation.shadow}", - transitionDuration: "{transition.duration}" - }, - list: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - activeBackground: "{navigation.item.active.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - activeColor: "{navigation.item.active.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}", - activeColor: "{navigation.item.icon.active.color}" - } - }, - submenuIcon: { - size: "{navigation.submenu.icon.size}", - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}", - activeColor: "{navigation.submenu.icon.active.color}" - }, - separator: { - borderColor: "{content.border.color}" - } -}; -var index$17 = { - root: { - transitionDuration: "{transition.duration}" - }, - header: { - background: "{content.background}", - borderColor: "{datatable.border.color}", - color: "{content.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem" - }, - headerCell: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - borderColor: "{datatable.border.color}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{highlight.color}", - gap: "0.5rem", - padding: "0.75rem 1rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - columnTitle: { - fontWeight: "600" - }, - row: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{highlight.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - bodyCell: { - borderColor: "{datatable.border.color}", - padding: "0.75rem 1rem" - }, - footerCell: { - background: "{content.background}", - borderColor: "{datatable.border.color}", - color: "{content.color}", - padding: "0.75rem 1rem" - }, - columnFooter: { - fontWeight: "600" - }, - footer: { - background: "{content.background}", - borderColor: "{datatable.border.color}", - color: "{content.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem" - }, - dropPointColor: "{primary.color}", - columnResizerWidth: "0.5rem", - resizeIndicator: { - width: "1px", - color: "{primary.color}" - }, - sortIcon: { - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}" - }, - loadingIcon: { - size: "2rem" - }, - rowToggleButton: { - hoverBackground: "{content.hover.background}", - selectedHoverBackground: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - selectedHoverColor: "{primary.color}", - size: "1.75rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - filter: { - inlineGap: "0.5rem", - overlaySelect: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - overlayPopover: { - background: "{overlay.popover.background}", - borderColor: "{overlay.popover.border.color}", - borderRadius: "{overlay.popover.border.radius}", - color: "{overlay.popover.color}", - shadow: "{overlay.popover.shadow}", - padding: "{overlay.popover.padding}", - gap: "0.5rem" - }, - rule: { - borderColor: "{content.border.color}" - }, - constraintList: { - padding: "{list.padding}", - gap: "{list.gap}" - }, - constraint: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - separator: { - borderColor: "{content.border.color}" - }, - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - } - }, - paginatorTop: { - borderColor: "{datatable.border.color}", - borderWidth: "0 0 1px 0" - }, - paginatorBottom: { - borderColor: "{datatable.border.color}", - borderWidth: "0 0 1px 0" - }, - colorScheme: { - light: { - root: { - borderColor: "{content.border.color}" - }, - row: { - stripedBackground: "{surface.50}" - }, - bodyCell: { - selectedBorderColor: "{primary.100}" - } - }, - dark: { - root: { - borderColor: "{surface.800}" - }, - row: { - stripedBackground: "{surface.950}" - }, - bodyCell: { - selectedBorderColor: "{primary.900}" - } - } - } -}; -var index$16 = { - root: { - borderColor: "transparent", - borderWidth: "0", - borderRadius: "0", - padding: "0" - }, - header: { - background: "{content.background}", - color: "{content.color}", - borderColor: "{content.border.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem", - borderRadius: "0" - }, - content: { - background: "{content.background}", - color: "{content.color}", - borderColor: "transparent", - borderWidth: "0", - padding: "0", - borderRadius: "0" - }, - footer: { - background: "{content.background}", - color: "{content.color}", - borderColor: "{content.border.color}", - borderWidth: "1px 0 0 0", - padding: "0.75rem 1rem", - borderRadius: "0" - }, - paginatorTop: { - borderColor: "{content.border.color}", - borderWidth: "0 0 1px 0" - }, - paginatorBottom: { - borderColor: "{content.border.color}", - borderWidth: "1px 0 0 0" - } -}; -var index$15 = { - root: { - transitionDuration: "{transition.duration}" - }, - panel: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.popover.shadow}", - padding: "{overlay.popover.padding}" - }, - header: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - padding: "0 0 0.5rem 0", - fontWeight: "500", - gap: "0.5rem" - }, - title: { - gap: "0.5rem", - fontWeight: "500" - }, - dropdown: { - width: "2.5rem", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.border.color}", - activeBorderColor: "{form.field.border.color}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - inputIcon: { - color: "{form.field.icon.color}" - }, - selectMonth: { - hoverBackground: "{content.hover.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - padding: "0.25rem 0.5rem", - borderRadius: "{content.border.radius}" - }, - selectYear: { - hoverBackground: "{content.hover.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - padding: "0.25rem 0.5rem", - borderRadius: "{content.border.radius}" - }, - group: { - borderColor: "{content.border.color}", - gap: "{overlay.popover.padding}" - }, - dayView: { - margin: "0.5rem 0 0 0" - }, - weekDay: { - padding: "0.25rem", - fontWeight: "500", - color: "{content.color}" - }, - date: { - hoverBackground: "{content.hover.background}", - selectedBackground: "{primary.color}", - rangeSelectedBackground: "{highlight.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{primary.contrast.color}", - rangeSelectedColor: "{highlight.color}", - width: "2rem", - height: "2rem", - borderRadius: "50%", - padding: "0.25rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - monthView: { - margin: "0.5rem 0 0 0" - }, - month: { - borderRadius: "{content.border.radius}" - }, - yearView: { - margin: "0.5rem 0 0 0" - }, - year: { - borderRadius: "{content.border.radius}" - }, - buttonbar: { - padding: "0.5rem 0 0 0", - borderColor: "{content.border.color}" - }, - timePicker: { - padding: "0.5rem 0 0 0", - borderColor: "{content.border.color}", - gap: "0.5rem", - buttonGap: "0.25rem" - }, - colorScheme: { - light: { - dropdown: { - background: "{surface.100}", - hoverBackground: "{surface.200}", - activeBackground: "{surface.300}", - color: "{surface.600}", - hoverColor: "{surface.700}", - activeColor: "{surface.800}" - }, - today: { - background: "{surface.200}", - color: "{surface.900}" - } - }, - dark: { - dropdown: { - background: "{surface.800}", - hoverBackground: "{surface.700}", - activeBackground: "{surface.600}", - color: "{surface.300}", - hoverColor: "{surface.200}", - activeColor: "{surface.100}" - }, - today: { - background: "{surface.700}", - color: "{surface.0}" - } - } - } -}; -var index$14 = { - root: { - background: "{overlay.modal.background}", - borderColor: "{overlay.modal.border.color}", - color: "{overlay.modal.color}", - borderRadius: "{overlay.modal.border.radius}", - shadow: "{overlay.modal.shadow}" - }, - header: { - padding: "{overlay.modal.padding}", - gap: "0.5rem" - }, - title: { - fontSize: "1.25rem", - fontWeight: "600" - }, - content: { - padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}" - }, - footer: { - padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}", - gap: "0.5rem" - } -}; -var index$13 = { - root: { - borderColor: "{content.border.color}" - }, - content: { - background: "{content.background}", - color: "{text.color}" - }, - horizontal: { - margin: "1rem 0", - padding: "0 1rem", - content: { - padding: "0 0.5rem" - } - }, - vertical: { - margin: "0 1rem", - padding: "0.5rem 0", - content: { - padding: "0.5rem 0" - } - } -}; -var index$12 = { - root: { - background: "rgba(255, 255, 255, 0.1)", - borderColor: "rgba(255, 255, 255, 0.2)", - padding: "0.5rem", - borderRadius: "{border.radius.xl}" - }, - item: { - borderRadius: "{content.border.radius}", - padding: "0.5rem", - size: "3rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$11 = { - root: { - background: "{overlay.modal.background}", - borderColor: "{overlay.modal.border.color}", - color: "{overlay.modal.color}", - borderRadius: "{overlay.modal.border.radius}", - shadow: "{overlay.modal.shadow}" - }, - header: { - padding: "{overlay.modal.padding}" - }, - title: { - fontSize: "1.5rem", - fontWeight: "600" - }, - content: { - padding: "0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}" - } -}; -var index$10 = { - toolbar: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}" - }, - toolbarItem: { - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}", - padding: "{list.padding}" - }, - overlayOption: { - focusBackground: "{list.option.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - }, - content: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}" - } -}; -var index$$ = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - padding: "0 1.125rem 1.125rem 1.125rem", - transitionDuration: "{transition.duration}" - }, - legend: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - borderRadius: "{content.border.radius}", - borderWidth: "1px", - borderColor: "transparent", - padding: "0.5rem 0.75rem", - gap: "0.5rem", - fontWeight: "600", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - toggleIcon: { - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}" - }, - content: { - padding: "0" - } -}; -var index$_ = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - transitionDuration: "{transition.duration}" - }, - header: { - background: "transparent", - color: "{text.color}", - padding: "1.125rem", - borderWidth: "0", - borderRadius: "0", - gap: "0.5rem" - }, - content: { - highlightBorderColor: "{primary.color}", - padding: "0 1.125rem 1.125rem 1.125rem" - }, - file: { - padding: "1rem", - gap: "1rem", - borderColor: "{content.border.color}", - info: { - gap: "0.5rem" - } - }, - progressbar: { - height: "0.25rem" - }, - basic: { - gap: "0.5rem" - } -}; -var index$Z = { - root: { - color: "{form.field.float.label.color}", - focusColor: "{form.field.float.label.focus.color}", - invalidColor: "{form.field.float.label.invalid.color}", - transitionDuration: "0.2s" - } -}; -var index$Y = { - root: { - borderWidth: "1px", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - transitionDuration: "{transition.duration}" - }, - navButton: { - background: "rgba(255, 255, 255, 0.1)", - hoverBackground: "rgba(255, 255, 255, 0.2)", - color: "{surface.100}", - hoverColor: "{surface.0}", - size: "3rem", - gutter: "0.5rem", - prev: { - borderRadius: "50%" - }, - next: { - borderRadius: "50%" - }, - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - navIcon: { - size: "1.5rem" - }, - thumbnailsContent: { - background: "{content.background}", - padding: "1rem 0.25rem" - }, - thumbnailNavButton: { - size: "2rem", - borderRadius: "{content.border.radius}", - gutter: "0.5rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - thumbnailNavButtonIcon: { - size: "1rem" - }, - caption: { - background: "rgba(0, 0, 0, 0.5)", - color: "{surface.100}", - padding: "1rem" - }, - indicatorList: { - gap: "0.5rem", - padding: "1rem" - }, - indicatorButton: { - width: "1rem", - height: "1rem", - activeBackground: "{primary.color}", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - insetIndicatorList: { - background: "rgba(0, 0, 0, 0.5)" - }, - insetIndicatorButton: { - background: "rgba(255, 255, 255, 0.4)", - hoverBackground: "rgba(255, 255, 255, 0.6)", - activeBackground: "rgba(255, 255, 255, 0.9)" - }, - mask: { - background: "{mask.background}", - color: "{mask.color}" - }, - closeButton: { - size: "3rem", - gutter: "0.5rem", - background: "rgba(255, 255, 255, 0.1)", - hoverBackground: "rgba(255, 255, 255, 0.2)", - color: "{surface.50}", - hoverColor: "{surface.0}", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - closeButtonIcon: { - size: "1.5rem" - }, - colorScheme: { - light: { - thumbnailNavButton: { - hoverBackground: "{surface.100}", - color: "{surface.600}", - hoverColor: "{surface.700}" - }, - indicatorButton: { - background: "{surface.200}", - hoverBackground: "{surface.300}" - } - }, - dark: { - thumbnailNavButton: { - hoverBackground: "{surface.700}", - color: "{surface.400}", - hoverColor: "{surface.0}" - }, - indicatorButton: { - background: "{surface.700}", - hoverBackground: "{surface.600}" - } - } - } -}; -var index$X = { - icon: { - color: "{form.field.icon.color}" - } -}; -var index$W = { - root: { - transitionDuration: "{transition.duration}" - }, - preview: { - icon: { - size: "1.5rem" - }, - mask: { - background: "{mask.background}", - color: "{mask.color}" - } - }, - toolbar: { - position: { - left: "auto", - right: "1rem", - top: "1rem", - bottom: "auto" - }, - blur: "8px", - background: "rgba(255,255,255,0.1)", - borderColor: "rgba(255,255,255,0.2)", - borderWidth: "1px", - borderRadius: "30px", - padding: ".5rem", - gap: "0.5rem" - }, - action: { - hoverBackground: "rgba(255,255,255,0.1)", - color: "{surface.50}", - hoverColor: "{surface.0}", - size: "3rem", - iconSize: "1.5rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$V = { - root: { - padding: "{form.field.padding.y} {form.field.padding.x}", - borderRadius: "{content.border.radius}", - gap: "0.5rem" - }, - text: { - fontWeight: "500" - }, - icon: { - size: "1rem" - }, - colorScheme: { - light: { - info: { - background: "color-mix(in srgb, {blue.50}, transparent 5%)", - borderColor: "{blue.200}", - color: "{blue.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)" - }, - success: { - background: "color-mix(in srgb, {green.50}, transparent 5%)", - borderColor: "{green.200}", - color: "{green.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)" - }, - warn: { - background: "color-mix(in srgb,{yellow.50}, transparent 5%)", - borderColor: "{yellow.200}", - color: "{yellow.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)" - }, - error: { - background: "color-mix(in srgb, {red.50}, transparent 5%)", - borderColor: "{red.200}", - color: "{red.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)" - }, - secondary: { - background: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)" - }, - contrast: { - background: "{surface.900}", - borderColor: "{surface.950}", - color: "{surface.50}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)" - } - }, - dark: { - info: { - background: "color-mix(in srgb, {blue.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", - color: "{blue.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)" - }, - success: { - background: "color-mix(in srgb, {green.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", - color: "{green.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)" - }, - warn: { - background: "color-mix(in srgb, {yellow.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", - color: "{yellow.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)" - }, - error: { - background: "color-mix(in srgb, {red.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", - color: "{red.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)" - }, - secondary: { - background: "{surface.800}", - borderColor: "{surface.700}", - color: "{surface.300}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)" - }, - contrast: { - background: "{surface.0}", - borderColor: "{surface.100}", - color: "{surface.950}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)" - } - } - } -}; -var index$U = { - root: { - padding: "{form.field.padding.y} {form.field.padding.x}", - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - transitionDuration: "{transition.duration}" - }, - display: { - hoverBackground: "{content.hover.background}", - hoverColor: "{content.hover.color}" - } -}; -var index$T = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - chip: { - borderRadius: "{border.radius.sm}" - }, - colorScheme: { - light: { - chip: { - focusBackground: "{surface.200}", - color: "{surface.800}" - } - }, - dark: { - chip: { - focusBackground: "{surface.700}", - color: "{surface.0}" - } - } - } -}; -var index$S = { - addon: { - background: "{form.field.background}", - borderColor: "{form.field.border.color}", - color: "{form.field.icon.color}", - borderRadius: "{form.field.border.radius}" - } -}; -var index$R = { - root: { - transitionDuration: "{transition.duration}" - }, - button: { - width: "2.5rem", - borderRadius: "{form.field.border.radius}", - verticalPadding: "{form.field.padding.y}" - }, - colorScheme: { - light: { - button: { - background: "transparent", - hoverBackground: "{surface.100}", - activeBackground: "{surface.200}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.border.color}", - activeBorderColor: "{form.field.border.color}", - color: "{surface.400}", - hoverColor: "{surface.500}", - activeColor: "{surface.600}" - } - }, - dark: { - button: { - background: "transparent", - hoverBackground: "{surface.800}", - activeBackground: "{surface.700}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.border.color}", - activeBorderColor: "{form.field.border.color}", - color: "{surface.400}", - hoverColor: "{surface.300}", - activeColor: "{surface.200}" - } - } - } -}; -var index$Q = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}", - sm: { - fontSize: "0.875rem", - paddingX: "0.625rem", - paddingY: "0.375rem" - }, - lg: { - fontSize: "1.125rem", - paddingX: "0.875rem", - paddingY: "0.625rem" - } - } -}; -var index$P = { - root: { - transitionDuration: "{transition.duration}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - value: { - background: "{primary.color}" - }, - range: { - background: "{content.border.color}" - }, - text: { - color: "{text.muted.color}" - } -}; -var index$O = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - shadow: "{form.field.shadow}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}", - header: { - padding: "{list.header.padding}" - } - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - }, - optionGroup: { - background: "{list.option.group.background}", - color: "{list.option.group.color}", - fontWeight: "{list.option.group.font.weight}", - padding: "{list.option.group.padding}" - }, - checkmark: { - color: "{list.option.color}", - gutterStart: "-0.375rem", - gutterEnd: "0.375rem" - }, - emptyMessage: { - padding: "{list.option.padding}" - }, - colorScheme: { - light: { - option: { - stripedBackground: "{surface.50}" - } - }, - dark: { - option: { - stripedBackground: "{surface.900}" - } - } - } -}; -var index$N = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - gap: "0.5rem", - verticalOrientation: { - padding: "{navigation.list.padding}", - gap: "0" - }, - horizontalOrientation: { - padding: "0.5rem 0.75rem" - }, - transitionDuration: "{transition.duration}" - }, - baseItem: { - borderRadius: "{content.border.radius}", - padding: "{navigation.item.padding}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - activeBackground: "{navigation.item.active.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - activeColor: "{navigation.item.active.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}", - activeColor: "{navigation.item.icon.active.color}" - } - }, - overlay: { - padding: "0", - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - shadow: "{overlay.navigation.shadow}", - gap: "0.5rem" - }, - submenu: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}" - }, - submenuLabel: { - padding: "{navigation.submenu.label.padding}", - fontWeight: "{navigation.submenu.label.font.weight}", - background: "{navigation.submenu.label.background.}", - color: "{navigation.submenu.label.color}" - }, - submenuIcon: { - size: "{navigation.submenu.icon.size}", - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}", - activeColor: "{navigation.submenu.icon.active.color}" - }, - separator: { - borderColor: "{content.border.color}" - }, - mobileButton: { - borderRadius: "50%", - size: "1.75rem", - color: "{text.muted.color}", - hoverColor: "{text.muted.hover.color}", - hoverBackground: "{content.hover.background}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$M = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.navigation.shadow}", - transitionDuration: "{transition.duration}" - }, - list: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}" - } - }, - submenuLabel: { - padding: "{navigation.submenu.label.padding}", - fontWeight: "{navigation.submenu.label.font.weight}", - background: "{navigation.submenu.label.background}", - color: "{navigation.submenu.label.color}" - }, - separator: { - borderColor: "{content.border.color}" - } -}; -var index$L = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - gap: "0.5rem", - padding: "0.5rem 0.75rem", - transitionDuration: "{transition.duration}" - }, - baseItem: { - borderRadius: "{content.border.radius}", - padding: "{navigation.item.padding}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - activeBackground: "{navigation.item.active.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - activeColor: "{navigation.item.active.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}", - activeColor: "{navigation.item.icon.active.color}" - } - }, - submenu: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}", - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.navigation.shadow}", - mobileIndent: "1rem" - }, - submenuIcon: { - size: "{navigation.submenu.icon.size}", - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}", - activeColor: "{navigation.submenu.icon.active.color}" - }, - separator: { - borderColor: "{content.border.color}" - }, - mobileButton: { - borderRadius: "50%", - size: "1.75rem", - color: "{text.muted.color}", - hoverColor: "{text.muted.hover.color}", - hoverBackground: "{content.hover.background}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$K = { - root: { - borderRadius: "{content.border.radius}", - borderWidth: "1px", - transitionDuration: "{transition.duration}" - }, - content: { - padding: "0.5rem 0.75rem", - gap: "0.5rem" - }, - text: { - fontSize: "1rem", - fontWeight: "500" - }, - icon: { - size: "1.125rem" - }, - closeButton: { - width: "1.75rem", - height: "1.75rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - offset: "{focus.ring.offset}" - } - }, - closeIcon: { - size: "1rem" - }, - colorScheme: { - light: { - info: { - background: "color-mix(in srgb, {blue.50}, transparent 5%)", - borderColor: "{blue.200}", - color: "{blue.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", - closeButton: { - hoverBackground: "{blue.100}", - focusRing: { - color: "{blue.600}", - shadow: "none" - } - } - }, - success: { - background: "color-mix(in srgb, {green.50}, transparent 5%)", - borderColor: "{green.200}", - color: "{green.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", - closeButton: { - hoverBackground: "{green.100}", - focusRing: { - color: "{green.600}", - shadow: "none" - } - } - }, - warn: { - background: "color-mix(in srgb,{yellow.50}, transparent 5%)", - borderColor: "{yellow.200}", - color: "{yellow.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", - closeButton: { - hoverBackground: "{yellow.100}", - focusRing: { - color: "{yellow.600}", - shadow: "none" - } - } - }, - error: { - background: "color-mix(in srgb, {red.50}, transparent 5%)", - borderColor: "{red.200}", - color: "{red.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", - closeButton: { - hoverBackground: "{red.100}", - focusRing: { - color: "{red.600}", - shadow: "none" - } - } - }, - secondary: { - background: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.600}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.200}", - focusRing: { - color: "{surface.600}", - shadow: "none" - } - } - }, - contrast: { - background: "{surface.900}", - borderColor: "{surface.950}", - color: "{surface.50}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.800}", - focusRing: { - color: "{surface.50}", - shadow: "none" - } - } - } - }, - dark: { - info: { - background: "color-mix(in srgb, {blue.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", - color: "{blue.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{blue.500}", - shadow: "none" - } - } - }, - success: { - background: "color-mix(in srgb, {green.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", - color: "{green.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{green.500}", - shadow: "none" - } - } - }, - warn: { - background: "color-mix(in srgb, {yellow.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", - color: "{yellow.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{yellow.500}", - shadow: "none" - } - } - }, - error: { - background: "color-mix(in srgb, {red.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", - color: "{red.500}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{red.500}", - shadow: "none" - } - } - }, - secondary: { - background: "{surface.800}", - borderColor: "{surface.700}", - color: "{surface.300}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.700}", - focusRing: { - color: "{surface.300}", - shadow: "none" - } - } - }, - contrast: { - background: "{surface.0}", - borderColor: "{surface.100}", - color: "{surface.950}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.100}", - focusRing: { - color: "{surface.950}", - shadow: "none" - } - } - } - } - } -}; -var index$J = { - root: { - borderRadius: "{content.border.radius}", - gap: "1rem" - }, - meters: { - background: "{content.border.color}", - size: "0.5rem" - }, - label: { - gap: "0.5rem" - }, - labelMarker: { - size: "0.5rem" - }, - labelIcon: { - size: "1rem" - }, - labelList: { - verticalGap: "0.5rem", - horizontalGap: "1rem" - } -}; -var index$I = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - dropdown: { - width: "2.5rem", - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}", - header: { - padding: "{list.header.padding}" - } - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}", - gap: "0.5rem" - }, - optionGroup: { - background: "{list.option.group.background}", - color: "{list.option.group.color}", - fontWeight: "{list.option.group.font.weight}", - padding: "{list.option.group.padding}" - }, - chip: { - borderRadius: "{border.radius.sm}" - }, - emptyMessage: { - padding: "{list.option.padding}" - } -}; -var index$H = { - root: { - gap: "1.125rem" - }, - controls: { - gap: "0.5rem" - } -}; -var index$G = { - root: { - gutter: "0.75rem", - transitionDuration: "{transition.duration}" - }, - node: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - selectedColor: "{highlight.color}", - hoverColor: "{content.hover.color}", - padding: "0.75rem 1rem", - toggleablePadding: "0.75rem 1rem 1.25rem 1rem", - borderRadius: "{content.border.radius}" - }, - nodeToggleButton: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - borderColor: "{content.border.color}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - size: "1.5rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - connector: { - color: "{content.border.color}", - borderRadius: "{content.border.radius}", - height: "24px" - } -}; -var index$F = { - root: { - outline: { - width: "2px", - color: "{content.background}" - } - } -}; -var index$E = { - root: { - padding: "0.5rem 1rem", - gap: "0.25rem", - borderRadius: "{content.border.radius}", - background: "{content.background}", - color: "{content.color}", - transitionDuration: "{transition.duration}" - }, - navButton: { - background: "transparent", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}", - selectedColor: "{highlight.color}", - width: "2.5rem", - height: "2.5rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - currentPageReport: { - color: "{text.muted.color}" - }, - jumpToPageInput: { - maxWidth: "2.5rem" - } -}; -var index$D = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}" - }, - header: { - background: "transparent", - color: "{text.color}", - padding: "1.125rem", - borderColor: "{content.border.color}", - borderWidth: "0", - borderRadius: "0" - }, - toggleableHeader: { - padding: "0.375rem 1.125rem" - }, - title: { - fontWeight: "600" - }, - content: { - padding: "0 1.125rem 1.125rem 1.125rem" - }, - footer: { - padding: "0 1.125rem 1.125rem 1.125rem" - } -}; -var index$C = { - root: { - gap: "0.5rem", - transitionDuration: "{transition.duration}" - }, - panel: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderWidth: "1px", - color: "{content.color}", - padding: "0.25rem 0.25rem", - borderRadius: "{content.border.radius}", - first: { - borderWidth: "1px", - topBorderRadius: "{content.border.radius}" - }, - last: { - borderWidth: "1px", - bottomBorderRadius: "{content.border.radius}" - } - }, - item: { - focusBackground: "{navigation.item.focus.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - gap: "0.5rem", - padding: "{navigation.item.padding}", - borderRadius: "{content.border.radius}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}" - } - }, - submenu: { - indent: "1rem" - }, - submenuIcon: { - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}" - } -}; -var index$B = { - meter: { - background: "{content.border.color}", - borderRadius: "{content.border.radius}", - height: ".75rem" - }, - icon: { - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.popover.background}", - borderColor: "{overlay.popover.border.color}", - borderRadius: "{overlay.popover.border.radius}", - color: "{overlay.popover.color}", - padding: "{overlay.popover.padding}", - shadow: "{overlay.popover.shadow}" - }, - content: { - gap: "0.5rem" - }, - colorScheme: { - light: { - strength: { - weakBackground: "{red.500}", - mediumBackground: "{amber.500}", - strongBackground: "{green.500}" - } - }, - dark: { - strength: { - weakBackground: "{red.400}", - mediumBackground: "{amber.400}", - strongBackground: "{green.400}" - } - } - } -}; -var index$A = { - root: { - gap: "1.125rem" - }, - controls: { - gap: "0.5rem" - } -}; -var index$z = { - root: { - background: "{overlay.popover.background}", - borderColor: "{overlay.popover.border.color}", - color: "{overlay.popover.color}", - borderRadius: "{overlay.popover.border.radius}", - shadow: "{overlay.popover.shadow}", - gutter: "10px", - arrowOffset: "1.25rem" - }, - content: { - padding: "{overlay.popover.padding}" - } -}; -var index$y = { - root: { - background: "{content.border.color}", - borderRadius: "{content.border.radius}", - height: "1.25rem" - }, - value: { - background: "{primary.color}" - }, - label: { - color: "{primary.contrast.color}", - fontSize: "0.75rem", - fontWeight: "600" - } -}; -var index$x = { - colorScheme: { - light: { - root: { - "color.1": "{red.500}", - "color.2": "{blue.500}", - "color.3": "{green.500}", - "color.4": "{yellow.500}" - } - }, - dark: { - root: { - "color.1": "{red.400}", - "color.2": "{blue.400}", - "color.3": "{green.400}", - "color.4": "{yellow.400}" - } - } - } -}; -var index$w = { - root: { - width: "1.25rem", - height: "1.25rem", - background: "{form.field.background}", - checkedBackground: "{primary.color}", - checkedHoverBackground: "{primary.hover.color}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.border.color}", - checkedBorderColor: "{primary.color}", - checkedHoverBorderColor: "{primary.hover.color}", - checkedFocusBorderColor: "{primary.color}", - checkedDisabledBorderColor: "{form.field.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - shadow: "{form.field.shadow}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - icon: { - size: "0.75rem", - checkedColor: "{primary.contrast.color}", - checkedHoverColor: "{primary.contrast.color}", - disabledColor: "{form.field.disabled.color}" - } -}; -var index$v = { - root: { - gap: "0.25rem", - transitionDuration: "{transition.duration}" - }, - icon: { - size: "1rem", - color: "{text.muted.color}", - hoverColor: "{primary.color}", - activeColor: "{primary.color}" - } -}; -var index$u = { - colorScheme: { - light: { - root: { - background: "rgba(0,0,0,0.1)" - } - }, - dark: { - root: { - background: "rgba(255,255,255,0.3)" - } - } - } -}; -var index$t = { - root: { - transitionDuration: "{transition.duration}" - }, - bar: { - size: "9px", - borderRadius: "{border.radius.sm}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - colorScheme: { - light: { - bar: { - background: "{surface.100}" - } - }, - dark: { - bar: { - background: "{surface.800}" - } - } - } -}; -var index$s = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - dropdown: { - width: "2.5rem", - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - list: { - padding: "{list.padding}", - gap: "{list.gap}", - header: { - padding: "{list.header.padding}" - } - }, - option: { - focusBackground: "{list.option.focus.background}", - selectedBackground: "{list.option.selected.background}", - selectedFocusBackground: "{list.option.selected.focus.background}", - color: "{list.option.color}", - focusColor: "{list.option.focus.color}", - selectedColor: "{list.option.selected.color}", - selectedFocusColor: "{list.option.selected.focus.color}", - padding: "{list.option.padding}", - borderRadius: "{list.option.border.radius}" - }, - optionGroup: { - background: "{list.option.group.background}", - color: "{list.option.group.color}", - fontWeight: "{list.option.group.font.weight}", - padding: "{list.option.group.padding}" - }, - clearIcon: { - color: "{form.field.icon.color}" - }, - checkmark: { - color: "{list.option.color}", - gutterStart: "-0.375rem", - gutterEnd: "0.375rem" - }, - emptyMessage: { - padding: "{list.option.padding}" - } -}; -var index$r = { - root: { - borderRadius: "{form.field.border.radius}" - }, - colorScheme: { - light: { - root: { - invalidBorderColor: "{form.field.invalid.border.color}" - } - }, - dark: { - root: { - invalidBorderColor: "{form.field.invalid.border.color}" - } - } - } -}; -var index$q = { - root: { - borderRadius: "{content.border.radius}" - }, - colorScheme: { - light: { - root: { - background: "{surface.200}", - animationBackground: "rgba(255,255,255,0.4)" - } - }, - dark: { - root: { - background: "rgba(255, 255, 255, 0.06)", - animationBackground: "rgba(255, 255, 255, 0.04)" - } - } - } -}; -var index$p = { - root: { - transitionDuration: "{transition.duration}" - }, - track: { - background: "{content.border.color}", - borderRadius: "{content.border.radius}", - size: "3px" - }, - range: { - background: "{primary.color}" - }, - handle: { - width: "20px", - height: "20px", - borderRadius: "50%", - background: "{content.border.color}", - hoverBackground: "{content.border.color}", - content: { - borderRadius: "50%", - hoverBackground: "{content.background}", - width: "16px", - height: "16px", - shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14)" - }, - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - colorScheme: { - light: { - handle: { - contentBackground: "{surface.0}" - } - }, - dark: { - handle: { - contentBackground: "{surface.950}" - } - } - } -}; -var index$o = { - root: { - gap: "0.5rem", - transitionDuration: "{transition.duration}" - } -}; -var index$n = { - root: { - borderRadius: "{form.field.border.radius}", - roundedBorderRadius: "2rem", - raisedShadow: "0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)" - } -}; -var index$m = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - transitionDuration: "{transition.duration}" - }, - gutter: { - background: "{content.border.color}" - }, - handle: { - size: "24px", - background: "transparent", - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - } -}; -var index$l = { - root: { - transitionDuration: "{transition.duration}" - }, - separator: { - background: "{content.border.color}", - activeBackground: "{primary.color}", - margin: "0 0 0 1.625rem", - size: "2px" - }, - step: { - padding: "0.5rem", - gap: "1rem" - }, - stepHeader: { - padding: "0", - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - gap: "0.5rem" - }, - stepTitle: { - color: "{text.muted.color}", - activeColor: "{primary.color}", - fontWeight: "500" - }, - stepNumber: { - background: "{content.background}", - activeBackground: "{content.background}", - borderColor: "{content.border.color}", - activeBorderColor: "{content.border.color}", - color: "{text.muted.color}", - activeColor: "{primary.color}", - size: "2rem", - fontSize: "1.143rem", - fontWeight: "500", - borderRadius: "50%", - shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" - }, - steppanels: { - padding: "0.875rem 0.5rem 1.125rem 0.5rem" - }, - steppanel: { - background: "{content.background}", - color: "{content.color}", - padding: "0 0 0 1rem" - } -}; -var index$k = { - root: { - transitionDuration: "{transition.duration}" - }, - separator: { - background: "{content.border.color}" - }, - itemLink: { - borderRadius: "{content.border.radius}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - gap: "0.5rem" - }, - itemLabel: { - color: "{text.muted.color}", - activeColor: "{primary.color}", - fontWeight: "500" - }, - itemNumber: { - background: "{content.background}", - activeBackground: "{content.background}", - borderColor: "{content.border.color}", - activeBorderColor: "{content.border.color}", - color: "{text.muted.color}", - activeColor: "{primary.color}", - size: "2rem", - fontSize: "1.143rem", - fontWeight: "500", - borderRadius: "50%", - shadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" - } -}; -var index$j = { - root: { - transitionDuration: "{transition.duration}" - }, - tablist: { - borderWidth: "0 0 1px 0", - background: "{content.background}", - borderColor: "{content.border.color}" - }, - item: { - background: "transparent", - hoverBackground: "transparent", - activeBackground: "transparent", - borderWidth: "0 0 1px 0", - borderColor: "{content.border.color}", - hoverBorderColor: "{content.border.color}", - activeBorderColor: "{primary.color}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}", - padding: "1rem 1.125rem", - fontWeight: "600", - margin: "0 0 -1px 0", - gap: "0.5rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - itemIcon: { - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}" - }, - activeBar: { - height: "1px", - bottom: "-1px", - background: "{primary.color}" - } -}; -var index$i = { - root: { - transitionDuration: "{transition.duration}" - }, - tablist: { - borderWidth: "0 0 1px 0", - background: "{content.background}", - borderColor: "{content.border.color}" - }, - tab: { - background: "transparent", - hoverBackground: "transparent", - activeBackground: "transparent", - borderWidth: "0 0 1px 0", - borderColor: "{content.border.color}", - hoverBorderColor: "{content.border.color}", - activeBorderColor: "{primary.color}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}", - padding: "1rem 1.125rem", - fontWeight: "600", - margin: "0 0 -1px 0", - gap: "0.5rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - tabpanel: { - background: "{content.background}", - color: "{content.color}", - padding: "0.875rem 1.125rem 1.125rem 1.125rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "inset {focus.ring.shadow}" - } - }, - navButton: { - background: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - width: "2.5rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - activeBar: { - height: "1px", - bottom: "-1px", - background: "{primary.color}" - }, - colorScheme: { - light: { - navButton: { - shadow: "0px 0px 10px 50px rgba(255, 255, 255, 0.6)" - } - }, - dark: { - navButton: { - shadow: "0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)" - } - } - } -}; -var index$h = { - root: { - transitionDuration: "{transition.duration}" - }, - tabList: { - background: "{content.background}", - borderColor: "{content.border.color}" - }, - tab: { - borderColor: "{content.border.color}", - activeBorderColor: "{primary.color}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - activeColor: "{primary.color}" - }, - tabPanel: { - background: "{content.background}", - color: "{content.color}" - }, - navButton: { - background: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.color}" - }, - colorScheme: { - light: { - navButton: { - shadow: "0px 0px 10px 50px rgba(255, 255, 255, 0.6)" - } - }, - dark: { - navButton: { - shadow: "0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)" - } - } - } -}; -var index$g = { - root: { - fontSize: "0.875rem", - fontWeight: "700", - padding: "0.25rem 0.5rem", - gap: "0.25rem", - borderRadius: "{content.border.radius}", - roundedBorderRadius: "{border.radius.xl}" - }, - icon: { - size: "0.75rem" - }, - colorScheme: { - light: { - primary: { - background: "{primary.100}", - color: "{primary.700}" - }, - secondary: { - background: "{surface.100}", - color: "{surface.600}" - }, - success: { - background: "{green.100}", - color: "{green.700}" - }, - info: { - background: "{sky.100}", - color: "{sky.700}" - }, - warn: { - background: "{orange.100}", - color: "{orange.700}" - }, - danger: { - background: "{red.100}", - color: "{red.700}" - }, - contrast: { - background: "{surface.950}", - color: "{surface.0}" - } - }, - dark: { - primary: { - background: "color-mix(in srgb, {primary.500}, transparent 84%)", - color: "{primary.300}" - }, - secondary: { - background: "{surface.800}", - color: "{surface.300}" - }, - success: { - background: "color-mix(in srgb, {green.500}, transparent 84%)", - color: "{green.300}" - }, - info: { - background: "color-mix(in srgb, {sky.500}, transparent 84%)", - color: "{sky.300}" - }, - warn: { - background: "color-mix(in srgb, {orange.500}, transparent 84%)", - color: "{orange.300}" - }, - danger: { - background: "color-mix(in srgb, {red.500}, transparent 84%)", - color: "{red.300}" - }, - contrast: { - background: "{surface.0}", - color: "{surface.950}" - } - } - } -}; -var index$f = { - root: { - background: "{form.field.background}", - borderColor: "{form.field.border.color}", - color: "{form.field.color}", - height: "18rem", - padding: "{form.field.padding.y} {form.field.padding.x}", - borderRadius: "{form.field.border.radius}" - }, - prompt: { - gap: "0.25rem" - }, - commandResponse: { - margin: "2px 0" - } -}; -var index$e = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - } -}; -var index$d = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - color: "{content.color}", - borderRadius: "{content.border.radius}", - shadow: "{overlay.navigation.shadow}", - transitionDuration: "{transition.duration}" - }, - list: { - padding: "{navigation.list.padding}", - gap: "{navigation.list.gap}" - }, - item: { - focusBackground: "{navigation.item.focus.background}", - activeBackground: "{navigation.item.active.background}", - color: "{navigation.item.color}", - focusColor: "{navigation.item.focus.color}", - activeColor: "{navigation.item.active.color}", - padding: "{navigation.item.padding}", - borderRadius: "{navigation.item.border.radius}", - gap: "{navigation.item.gap}", - icon: { - color: "{navigation.item.icon.color}", - focusColor: "{navigation.item.icon.focus.color}", - activeColor: "{navigation.item.icon.active.color}" - } - }, - submenuLabel: { - padding: "{navigation.submenu.label.padding}", - fontWeight: "{navigation.submenu.label.font.weight}", - background: "{navigation.submenu.label.background.}", - color: "{navigation.submenu.label.color}" - }, - submenuIcon: { - size: "{navigation.submenu.icon.size}", - color: "{navigation.submenu.icon.color}", - focusColor: "{navigation.submenu.icon.focus.color}", - activeColor: "{navigation.submenu.icon.active.color}" - }, - separator: { - borderColor: "{content.border.color}" - } -}; -var index$c = { - event: { - minHeight: "5rem" - }, - horizontal: { - eventContent: { - padding: "1rem 0" - } - }, - vertical: { - eventContent: { - padding: "0 1rem" - } - }, - eventMarker: { - size: "1.125rem", - borderRadius: "50%", - borderWidth: "2px", - background: "{content.background}", - borderColor: "{content.border.color}", - content: { - borderRadius: "50%", - size: "0.375rem", - background: "{primary.color}", - insetShadow: "0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)" - } - }, - eventConnector: { - color: "{content.border.color}", - size: "2px" - } -}; -var index$b = { - root: { - width: "25rem", - borderRadius: "{content.border.radius}", - borderWidth: "1px", - transitionDuration: "{transition.duration}" - }, - icon: { - size: "1.125rem" - }, - content: { - padding: "{overlay.popover.padding}", - gap: "0.5rem" - }, - text: { - gap: "0.5rem" - }, - summary: { - fontWeight: "500", - fontSize: "1rem" - }, - detail: { - fontWeight: "500", - fontSize: "0.875rem" - }, - closeButton: { - width: "1.75rem", - height: "1.75rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - offset: "{focus.ring.offset}" - } - }, - closeIcon: { - size: "1rem" - }, - colorScheme: { - light: { - blur: "1.5px", - info: { - background: "color-mix(in srgb, {blue.50}, transparent 5%)", - borderColor: "{blue.200}", - color: "{blue.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", - closeButton: { - hoverBackground: "{blue.100}", - focusRing: { - color: "{blue.600}", - shadow: "none" - } - } - }, - success: { - background: "color-mix(in srgb, {green.50}, transparent 5%)", - borderColor: "{green.200}", - color: "{green.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", - closeButton: { - hoverBackground: "{green.100}", - focusRing: { - color: "{green.600}", - shadow: "none" - } - } - }, - warn: { - background: "color-mix(in srgb,{yellow.50}, transparent 5%)", - borderColor: "{yellow.200}", - color: "{yellow.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", - closeButton: { - hoverBackground: "{yellow.100}", - focusRing: { - color: "{yellow.600}", - shadow: "none" - } - } - }, - error: { - background: "color-mix(in srgb, {red.50}, transparent 5%)", - borderColor: "{red.200}", - color: "{red.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", - closeButton: { - hoverBackground: "{red.100}", - focusRing: { - color: "{red.600}", - shadow: "none" - } - } - }, - secondary: { - background: "{surface.100}", - borderColor: "{surface.200}", - color: "{surface.600}", - detailColor: "{surface.700}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.200}", - focusRing: { - color: "{surface.600}", - shadow: "none" - } - } - }, - contrast: { - background: "{surface.900}", - borderColor: "{surface.950}", - color: "{surface.50}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.800}", - focusRing: { - color: "{surface.50}", - shadow: "none" - } - } - } - }, - dark: { - blur: "10px", - info: { - background: "color-mix(in srgb, {blue.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {blue.700}, transparent 64%)", - color: "{blue.500}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{blue.500}", - shadow: "none" - } - } - }, - success: { - background: "color-mix(in srgb, {green.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {green.700}, transparent 64%)", - color: "{green.500}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{green.500}", - shadow: "none" - } - } - }, - warn: { - background: "color-mix(in srgb, {yellow.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {yellow.700}, transparent 64%)", - color: "{yellow.500}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{yellow.500}", - shadow: "none" - } - } - }, - error: { - background: "color-mix(in srgb, {red.500}, transparent 84%)", - borderColor: "color-mix(in srgb, {red.700}, transparent 64%)", - color: "{red.500}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)", - closeButton: { - hoverBackground: "rgba(255, 255, 255, 0.05)", - focusRing: { - color: "{red.500}", - shadow: "none" - } - } - }, - secondary: { - background: "{surface.800}", - borderColor: "{surface.700}", - color: "{surface.300}", - detailColor: "{surface.0}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.700}", - focusRing: { - color: "{surface.300}", - shadow: "none" - } - } - }, - contrast: { - background: "{surface.0}", - borderColor: "{surface.100}", - color: "{surface.950}", - detailColor: "{surface.950}", - shadow: "0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)", - closeButton: { - hoverBackground: "{surface.100}", - focusRing: { - color: "{surface.950}", - shadow: "none" - } - } - } - } - } -}; -var index$a = { - root: { - padding: "0.5rem 1rem", - borderRadius: "{content.border.radius}", - gap: "0.5rem", - fontWeight: "500", - disabledBackground: "{form.field.disabled.background}", - disabledBorderColor: "{form.field.disabled.background}", - disabledColor: "{form.field.disabled.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - icon: { - disabledColor: "{form.field.disabled.color}" - }, - content: { - left: "0.25rem", - top: "0.25rem", - checkedShadow: "0px 1px 2px 0px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.04)" - }, - colorScheme: { - light: { - root: { - background: "{surface.100}", - checkedBackground: "{surface.100}", - hoverBackground: "{surface.100}", - borderColor: "{surface.100}", - color: "{surface.500}", - hoverColor: "{surface.700}", - checkedColor: "{surface.900}", - checkedBorderColor: "{surface.100}" - }, - content: { - checkedBackground: "{surface.0}" - }, - icon: { - color: "{surface.500}", - hoverColor: "{surface.700}", - checkedColor: "{surface.900}" - } - }, - dark: { - root: { - background: "{surface.950}", - checkedBackground: "{surface.950}", - hoverBackground: "{surface.950}", - borderColor: "{surface.950}", - color: "{surface.400}", - hoverColor: "{surface.300}", - checkedColor: "{surface.0}", - checkedBorderColor: "{surface.950}" - }, - content: { - checkedBackground: "{surface.800}" - }, - icon: { - color: "{surface.400}", - hoverColor: "{surface.300}", - checkedColor: "{surface.0}" - } - } - } -}; -var index$9 = { - root: { - width: "2.5rem", - height: "1.5rem", - borderRadius: "30px", - gap: "0.25rem", - shadow: "{form.field.shadow}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - }, - borderWidth: "1px", - borderColor: "transparent", - hoverBorderColor: "transparent", - checkedBorderColor: "transparent", - checkedHoverBorderColor: "transparent", - invalidBorderColor: "{form.field.invalid.border.color}", - transitionDuration: "{form.field.transition.duration}", - slideDuration: "0.2s", - disabledBackground: "{form.field.disabled.background}" - }, - handle: { - borderRadius: "50%", - size: "1rem", - disabledBackground: "{form.field.disabled.color}" - }, - colorScheme: { - light: { - root: { - background: "{surface.300}", - hoverBackground: "{surface.400}", - checkedBackground: "{primary.color}", - checkedHoverBackground: "{primary.hover.color}" - }, - handle: { - background: "{surface.0}", - hoverBackground: "{surface.0}", - checkedBackground: "{surface.0}", - checkedHoverBackground: "{surface.0}" - } - }, - dark: { - root: { - background: "{surface.700}", - hoverBackground: "{surface.600}", - checkedBackground: "{primary.color}", - checkedHoverBackground: "{primary.hover.color}" - }, - handle: { - background: "{surface.400}", - hoverBackground: "{surface.300}", - checkedBackground: "{surface.900}", - checkedHoverBackground: "{surface.900}" - } - } - } -}; -var index$8 = { - root: { - background: "{content.background}", - borderColor: "{content.border.color}", - borderRadius: "{content.border.radius}", - color: "{content.color}", - gap: "0.5rem", - padding: "0.75rem" - } -}; -var index$7 = { - root: { - maxWidth: "12.5rem", - gutter: "0.25rem", - shadow: "{overlay.popover.shadow}", - padding: "0.5rem 0.75rem", - borderRadius: "{overlay.popover.border.radius}" - }, - colorScheme: { - light: { - root: { - background: "{surface.700}", - color: "{surface.0}" - } - }, - dark: { - root: { - background: "{surface.700}", - color: "{surface.0}" - } - } - } -}; -var index$6 = { - root: { - background: "{content.background}", - color: "{content.color}", - padding: "1rem", - gap: "2px", - indent: "1rem", - transitionDuration: "{transition.duration}" - }, - node: { - padding: "0.25rem 0.5rem", - borderRadius: "{content.border.radius}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - color: "{text.color}", - hoverColor: "{text.hover.color}", - selectedColor: "{highlight.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - }, - gap: "0.25rem" - }, - nodeIcon: { - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}", - selectedColor: "{highlight.color}" - }, - nodeToggleButton: { - borderRadius: "50%", - size: "1.75rem", - hoverBackground: "{content.hover.background}", - selectedHoverBackground: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}", - selectedHoverColor: "{primary.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - loadingIcon: { - size: "2rem" - } -}; -var index$5 = { - root: { - background: "{form.field.background}", - disabledBackground: "{form.field.disabled.background}", - filledBackground: "{form.field.filled.background}", - filledFocusBackground: "{form.field.filled.focus.background}", - borderColor: "{form.field.border.color}", - hoverBorderColor: "{form.field.hover.border.color}", - focusBorderColor: "{form.field.focus.border.color}", - invalidBorderColor: "{form.field.invalid.border.color}", - color: "{form.field.color}", - disabledColor: "{form.field.disabled.color}", - placeholderColor: "{form.field.placeholder.color}", - shadow: "{form.field.shadow}", - paddingX: "{form.field.padding.x}", - paddingY: "{form.field.padding.y}", - borderRadius: "{form.field.border.radius}", - focusRing: { - width: "{form.field.focus.ring.width}", - style: "{form.field.focus.ring.style}", - color: "{form.field.focus.ring.color}", - offset: "{form.field.focus.ring.offset}", - shadow: "{form.field.focus.ring.shadow}" - }, - transitionDuration: "{form.field.transition.duration}" - }, - dropdown: { - width: "2.5rem", - color: "{form.field.icon.color}" - }, - overlay: { - background: "{overlay.select.background}", - borderColor: "{overlay.select.border.color}", - borderRadius: "{overlay.select.border.radius}", - color: "{overlay.select.color}", - shadow: "{overlay.select.shadow}" - }, - tree: { - padding: "{list.padding}" - }, - emptyMessage: { - padding: "{list.option.padding}" - }, - chip: { - borderRadius: "{border.radius.sm}" - } -}; -var index$4 = { - root: { - transitionDuration: "{transition.duration}" - }, - header: { - background: "{content.background}", - borderColor: "{treetable.border.color}", - color: "{content.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem" - }, - headerCell: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - borderColor: "{treetable.border.color}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{highlight.color}", - gap: "0.5rem", - padding: "0.75rem 1rem", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - columnTitle: { - fontWeight: "600" - }, - row: { - background: "{content.background}", - hoverBackground: "{content.hover.background}", - selectedBackground: "{highlight.background}", - color: "{content.color}", - hoverColor: "{content.hover.color}", - selectedColor: "{highlight.color}", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "-1px", - shadow: "{focus.ring.shadow}" - } - }, - bodyCell: { - borderColor: "{treetable.border.color}", - padding: "0.75rem 1rem", - gap: "0.5rem" - }, - footerCell: { - background: "{content.background}", - borderColor: "{treetable.border.color}", - color: "{content.color}", - padding: "0.75rem 1rem" - }, - columnFooter: { - fontWeight: "600" - }, - footer: { - background: "{content.background}", - borderColor: "{treetable.border.color}", - color: "{content.color}", - borderWidth: "0 0 1px 0", - padding: "0.75rem 1rem" - }, - columnResizerWidth: "0.5rem", - resizeIndicator: { - width: "1px", - color: "{primary.color}" - }, - sortIcon: { - color: "{text.muted.color}", - hoverColor: "{text.hover.muted.color}" - }, - loadingIcon: { - size: "2rem" - }, - nodeToggleButton: { - hoverBackground: "{content.hover.background}", - selectedHoverBackground: "{content.background}", - color: "{text.muted.color}", - hoverColor: "{text.color}", - selectedHoverColor: "{primary.color}", - size: "1.75rem", - borderRadius: "50%", - focusRing: { - width: "{focus.ring.width}", - style: "{focus.ring.style}", - color: "{focus.ring.color}", - offset: "{focus.ring.offset}", - shadow: "{focus.ring.shadow}" - } - }, - paginatorTop: { - borderColor: "{content.border.color}", - borderWidth: "0 0 1px 0" - }, - paginatorBottom: { - borderColor: "{content.border.color}", - borderWidth: "0 0 1px 0" - }, - colorScheme: { - light: { - root: { - borderColor: "{content.border.color}" - }, - bodyCell: { - selectedBorderColor: "{primary.100}" - } - }, - dark: { - root: { - borderColor: "{surface.800}" - }, - bodyCell: { - selectedBorderColor: "{primary.900}" - } - } - } -}; -var index$3 = { - loader: { - mask: { - background: "{content.background}", - color: "{text.muted.color}" - }, - icon: { - size: "2rem" - } - } -}; -var index$2 = { - primitive: { - borderRadius: { - none: "0", - xs: "2px", - sm: "4px", - md: "6px", - lg: "8px", - xl: "12px" - }, - emerald: { - 50: "#ecfdf5", - 100: "#d1fae5", - 200: "#a7f3d0", - 300: "#6ee7b7", - 400: "#34d399", - 500: "#10b981", - 600: "#059669", - 700: "#047857", - 800: "#065f46", - 900: "#064e3b", - 950: "#022c22" - }, - green: { - 50: "#f0fdf4", - 100: "#dcfce7", - 200: "#bbf7d0", - 300: "#86efac", - 400: "#4ade80", - 500: "#22c55e", - 600: "#16a34a", - 700: "#15803d", - 800: "#166534", - 900: "#14532d", - 950: "#052e16" - }, - lime: { - 50: "#f7fee7", - 100: "#ecfccb", - 200: "#d9f99d", - 300: "#bef264", - 400: "#a3e635", - 500: "#84cc16", - 600: "#65a30d", - 700: "#4d7c0f", - 800: "#3f6212", - 900: "#365314", - 950: "#1a2e05" - }, - red: { - 50: "#fef2f2", - 100: "#fee2e2", - 200: "#fecaca", - 300: "#fca5a5", - 400: "#f87171", - 500: "#ef4444", - 600: "#dc2626", - 700: "#b91c1c", - 800: "#991b1b", - 900: "#7f1d1d", - 950: "#450a0a" - }, - orange: { - 50: "#fff7ed", - 100: "#ffedd5", - 200: "#fed7aa", - 300: "#fdba74", - 400: "#fb923c", - 500: "#f97316", - 600: "#ea580c", - 700: "#c2410c", - 800: "#9a3412", - 900: "#7c2d12", - 950: "#431407" - }, - amber: { - 50: "#fffbeb", - 100: "#fef3c7", - 200: "#fde68a", - 300: "#fcd34d", - 400: "#fbbf24", - 500: "#f59e0b", - 600: "#d97706", - 700: "#b45309", - 800: "#92400e", - 900: "#78350f", - 950: "#451a03" - }, - yellow: { - 50: "#fefce8", - 100: "#fef9c3", - 200: "#fef08a", - 300: "#fde047", - 400: "#facc15", - 500: "#eab308", - 600: "#ca8a04", - 700: "#a16207", - 800: "#854d0e", - 900: "#713f12", - 950: "#422006" - }, - teal: { - 50: "#f0fdfa", - 100: "#ccfbf1", - 200: "#99f6e4", - 300: "#5eead4", - 400: "#2dd4bf", - 500: "#14b8a6", - 600: "#0d9488", - 700: "#0f766e", - 800: "#115e59", - 900: "#134e4a", - 950: "#042f2e" - }, - cyan: { - 50: "#ecfeff", - 100: "#cffafe", - 200: "#a5f3fc", - 300: "#67e8f9", - 400: "#22d3ee", - 500: "#06b6d4", - 600: "#0891b2", - 700: "#0e7490", - 800: "#155e75", - 900: "#164e63", - 950: "#083344" - }, - sky: { - 50: "#f0f9ff", - 100: "#e0f2fe", - 200: "#bae6fd", - 300: "#7dd3fc", - 400: "#38bdf8", - 500: "#0ea5e9", - 600: "#0284c7", - 700: "#0369a1", - 800: "#075985", - 900: "#0c4a6e", - 950: "#082f49" - }, - blue: { - 50: "#eff6ff", - 100: "#dbeafe", - 200: "#bfdbfe", - 300: "#93c5fd", - 400: "#60a5fa", - 500: "#3b82f6", - 600: "#2563eb", - 700: "#1d4ed8", - 800: "#1e40af", - 900: "#1e3a8a", - 950: "#172554" - }, - indigo: { - 50: "#eef2ff", - 100: "#e0e7ff", - 200: "#c7d2fe", - 300: "#a5b4fc", - 400: "#818cf8", - 500: "#6366f1", - 600: "#4f46e5", - 700: "#4338ca", - 800: "#3730a3", - 900: "#312e81", - 950: "#1e1b4b" - }, - violet: { - 50: "#f5f3ff", - 100: "#ede9fe", - 200: "#ddd6fe", - 300: "#c4b5fd", - 400: "#a78bfa", - 500: "#8b5cf6", - 600: "#7c3aed", - 700: "#6d28d9", - 800: "#5b21b6", - 900: "#4c1d95", - 950: "#2e1065" - }, - purple: { - 50: "#faf5ff", - 100: "#f3e8ff", - 200: "#e9d5ff", - 300: "#d8b4fe", - 400: "#c084fc", - 500: "#a855f7", - 600: "#9333ea", - 700: "#7e22ce", - 800: "#6b21a8", - 900: "#581c87", - 950: "#3b0764" - }, - fuchsia: { - 50: "#fdf4ff", - 100: "#fae8ff", - 200: "#f5d0fe", - 300: "#f0abfc", - 400: "#e879f9", - 500: "#d946ef", - 600: "#c026d3", - 700: "#a21caf", - 800: "#86198f", - 900: "#701a75", - 950: "#4a044e" - }, - pink: { - 50: "#fdf2f8", - 100: "#fce7f3", - 200: "#fbcfe8", - 300: "#f9a8d4", - 400: "#f472b6", - 500: "#ec4899", - 600: "#db2777", - 700: "#be185d", - 800: "#9d174d", - 900: "#831843", - 950: "#500724" - }, - rose: { - 50: "#fff1f2", - 100: "#ffe4e6", - 200: "#fecdd3", - 300: "#fda4af", - 400: "#fb7185", - 500: "#f43f5e", - 600: "#e11d48", - 700: "#be123c", - 800: "#9f1239", - 900: "#881337", - 950: "#4c0519" - }, - slate: { - 50: "#f8fafc", - 100: "#f1f5f9", - 200: "#e2e8f0", - 300: "#cbd5e1", - 400: "#94a3b8", - 500: "#64748b", - 600: "#475569", - 700: "#334155", - 800: "#1e293b", - 900: "#0f172a", - 950: "#020617" - }, - gray: { - 50: "#f9fafb", - 100: "#f3f4f6", - 200: "#e5e7eb", - 300: "#d1d5db", - 400: "#9ca3af", - 500: "#6b7280", - 600: "#4b5563", - 700: "#374151", - 800: "#1f2937", - 900: "#111827", - 950: "#030712" - }, - zinc: { - 50: "#fafafa", - 100: "#f4f4f5", - 200: "#e4e4e7", - 300: "#d4d4d8", - 400: "#a1a1aa", - 500: "#71717a", - 600: "#52525b", - 700: "#3f3f46", - 800: "#27272a", - 900: "#18181b", - 950: "#09090b" - }, - neutral: { - 50: "#fafafa", - 100: "#f5f5f5", - 200: "#e5e5e5", - 300: "#d4d4d4", - 400: "#a3a3a3", - 500: "#737373", - 600: "#525252", - 700: "#404040", - 800: "#262626", - 900: "#171717", - 950: "#0a0a0a" - }, - stone: { - 50: "#fafaf9", - 100: "#f5f5f4", - 200: "#e7e5e4", - 300: "#d6d3d1", - 400: "#a8a29e", - 500: "#78716c", - 600: "#57534e", - 700: "#44403c", - 800: "#292524", - 900: "#1c1917", - 950: "#0c0a09" - } - }, - semantic: { - transitionDuration: "0.2s", - focusRing: { - width: "1px", - style: "solid", - color: "{primary.color}", - offset: "2px", - shadow: "none" - }, - disabledOpacity: "0.6", - iconSize: "1rem", - anchorGutter: "2px", - primary: { - 50: "{emerald.50}", - 100: "{emerald.100}", - 200: "{emerald.200}", - 300: "{emerald.300}", - 400: "{emerald.400}", - 500: "{emerald.500}", - 600: "{emerald.600}", - 700: "{emerald.700}", - 800: "{emerald.800}", - 900: "{emerald.900}", - 950: "{emerald.950}" - }, - formField: { - paddingX: "0.75rem", - paddingY: "0.5rem", - borderRadius: "{border.radius.md}", - focusRing: { - width: "0", - style: "none", - color: "transparent", - offset: "0", - shadow: "none" - }, - transitionDuration: "{transition.duration}" - }, - list: { - padding: "0.25rem 0.25rem", - gap: "2px", - header: { - padding: "0.5rem 1rem 0.25rem 1rem" - }, - option: { - padding: "0.5rem 0.75rem", - borderRadius: "{border.radius.sm}" - }, - optionGroup: { - padding: "0.5rem 0.75rem", - fontWeight: "600" - } - }, - content: { - borderRadius: "{border.radius.md}" - }, - mask: { - transitionDuration: "0.15s" - }, - navigation: { - list: { - padding: "0.25rem 0.25rem", - gap: "2px" - }, - item: { - padding: "0.5rem 0.75rem", - borderRadius: "{border.radius.sm}", - gap: "0.5rem" - }, - submenuLabel: { - padding: "0.5rem 0.75rem", - fontWeight: "600" - }, - submenuIcon: { - size: "0.875rem" - } - }, - overlay: { - select: { - borderRadius: "{border.radius.md}", - shadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)" - }, - popover: { - borderRadius: "{border.radius.md}", - padding: "0.75rem", - shadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)" - }, - modal: { - borderRadius: "{border.radius.xl}", - padding: "1.25rem", - shadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)" - }, - navigation: { - shadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)" - } - }, - colorScheme: { - light: { - surface: { - 0: "#ffffff", - 50: "{slate.50}", - 100: "{slate.100}", - 200: "{slate.200}", - 300: "{slate.300}", - 400: "{slate.400}", - 500: "{slate.500}", - 600: "{slate.600}", - 700: "{slate.700}", - 800: "{slate.800}", - 900: "{slate.900}", - 950: "{slate.950}" - }, - primary: { - color: "{primary.500}", - contrastColor: "#ffffff", - hoverColor: "{primary.600}", - activeColor: "{primary.700}" - }, - highlight: { - background: "{primary.50}", - focusBackground: "{primary.100}", - color: "{primary.700}", - focusColor: "{primary.800}" - }, - mask: { - background: "rgba(0,0,0,0.4)", - color: "{surface.200}" - }, - formField: { - background: "{surface.0}", - disabledBackground: "{surface.200}", - filledBackground: "{surface.50}", - filledFocusBackground: "{surface.50}", - borderColor: "{surface.300}", - hoverBorderColor: "{surface.400}", - focusBorderColor: "{primary.color}", - invalidBorderColor: "{red.400}", - color: "{surface.700}", - disabledColor: "{surface.500}", - placeholderColor: "{surface.500}", - floatLabelColor: "{surface.500}", - floatLabelFocusColor: "{surface.500}", - floatLabelInvalidColor: "{red.400}", - iconColor: "{surface.400}", - shadow: "0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)" - }, - text: { - color: "{surface.700}", - hoverColor: "{surface.800}", - mutedColor: "{surface.500}", - hoverMutedColor: "{surface.600}" - }, - content: { - background: "{surface.0}", - hoverBackground: "{surface.100}", - borderColor: "{surface.200}", - color: "{text.color}", - hoverColor: "{text.hover.color}" - }, - overlay: { - select: { - background: "{surface.0}", - borderColor: "{surface.200}", - color: "{text.color}" - }, - popover: { - background: "{surface.0}", - borderColor: "{surface.200}", - color: "{text.color}" - }, - modal: { - background: "{surface.0}", - borderColor: "{surface.200}", - color: "{text.color}" - } - }, - list: { - option: { - focusBackground: "{surface.100}", - selectedBackground: "{highlight.background}", - selectedFocusBackground: "{highlight.focus.background}", - color: "{text.color}", - focusColor: "{text.hover.color}", - selectedColor: "{highlight.color}", - selectedFocusColor: "{highlight.focus.color}", - icon: { - color: "{surface.400}", - focusColor: "{surface.500}" - } - }, - optionGroup: { - background: "transparent", - color: "{text.muted.color}" - } - }, - navigation: { - item: { - focusBackground: "{surface.100}", - activeBackground: "{surface.100}", - color: "{text.color}", - focusColor: "{text.hover.color}", - activeColor: "{text.hover.color}", - icon: { - color: "{surface.400}", - focusColor: "{surface.500}", - activeColor: "{surface.500}" - } - }, - submenuLabel: { - background: "transparent", - color: "{text.muted.color}" - }, - submenuIcon: { - color: "{surface.400}", - focusColor: "{surface.500}", - activeColor: "{surface.500}" - } - } - }, - dark: { - surface: { - 0: "#ffffff", - 50: "{zinc.50}", - 100: "{zinc.100}", - 200: "{zinc.200}", - 300: "{zinc.300}", - 400: "{zinc.400}", - 500: "{zinc.500}", - 600: "{zinc.600}", - 700: "{zinc.700}", - 800: "{zinc.800}", - 900: "{zinc.900}", - 950: "{zinc.950}" - }, - primary: { - color: "{primary.400}", - contrastColor: "{surface.900}", - hoverColor: "{primary.300}", - activeColor: "{primary.200}" - }, - highlight: { - background: "color-mix(in srgb, {primary.400}, transparent 84%)", - focusBackground: "color-mix(in srgb, {primary.400}, transparent 76%)", - color: "rgba(255,255,255,.87)", - focusColor: "rgba(255,255,255,.87)" - }, - mask: { - background: "rgba(0,0,0,0.6)", - color: "{surface.200}" - }, - formField: { - background: "{surface.950}", - disabledBackground: "{surface.700}", - filledBackground: "{surface.800}", - filledFocusBackground: "{surface.800}", - borderColor: "{surface.700}", - hoverBorderColor: "{surface.600}", - focusBorderColor: "{primary.color}", - invalidBorderColor: "{red.300}", - color: "{surface.0}", - disabledColor: "{surface.400}", - placeholderColor: "{surface.400}", - floatLabelColor: "{surface.400}", - floatLabelFocusColor: "{surface.400}", - floatLabelInvalidColor: "{red.300}", - iconColor: "{surface.400}", - shadow: "0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)" - }, - text: { - color: "{surface.0}", - hoverColor: "{surface.0}", - mutedColor: "{surface.400}", - hoverMutedColor: "{surface.300}" - }, - content: { - background: "{surface.900}", - hoverBackground: "{surface.800}", - borderColor: "{surface.700}", - color: "{text.color}", - hoverColor: "{text.hover.color}" - }, - overlay: { - select: { - background: "{surface.900}", - borderColor: "{surface.700}", - color: "{text.color}" - }, - popover: { - background: "{surface.900}", - borderColor: "{surface.700}", - color: "{text.color}" - }, - modal: { - background: "{surface.900}", - borderColor: "{surface.700}", - color: "{text.color}" - } - }, - list: { - option: { - focusBackground: "{surface.800}", - selectedBackground: "{highlight.background}", - selectedFocusBackground: "{highlight.focus.background}", - color: "{text.color}", - focusColor: "{text.hover.color}", - selectedColor: "{highlight.color}", - selectedFocusColor: "{highlight.focus.color}", - icon: { - color: "{surface.500}", - focusColor: "{surface.400}" - } - }, - optionGroup: { - background: "transparent", - color: "{text.muted.color}" - } - }, - navigation: { - item: { - focusBackground: "{surface.800}", - activeBackground: "{surface.800}", - color: "{text.color}", - focusColor: "{text.hover.color}", - activeColor: "{text.hover.color}", - icon: { - color: "{surface.500}", - focusColor: "{surface.400}", - activeColor: "{surface.400}" - } - }, - submenuLabel: { - background: "transparent", - color: "{text.muted.color}" - }, - submenuIcon: { - color: "{surface.500}", - focusColor: "{surface.400}", - activeColor: "{surface.400}" - } - } - } - } - }, - components: { - accordion: index$1n, - autocomplete: index$1m, - avatar: index$1l, - badge: index$1k, - blockui: index$1j, - breadcrumb: index$1i, - button: index$1h, - datepicker: index$15, - card: index$1g, - carousel: index$1f, - cascadeselect: index$1e, - checkbox: index$1d, - chip: index$1c, - colorpicker: index$1b, - confirmdialog: index$1a, - confirmpopup: index$19, - contextmenu: index$18, - dataview: index$16, - datatable: index$17, - dialog: index$14, - divider: index$13, - dock: index$12, - drawer: index$11, - editor: index$10, - fieldset: index$$, - fileupload: index$_, - floatlabel: index$Z, - galleria: index$Y, - iconfield: index$X, - image: index$W, - inlinemessage: index$V, - inplace: index$U, - inputchips: index$T, - inputgroup: index$S, - inputnumber: index$R, - inputtext: index$Q, - knob: index$P, - listbox: index$O, - megamenu: index$N, - menu: index$M, - menubar: index$L, - message: index$K, - metergroup: index$J, - multiselect: index$I, - orderlist: index$H, - organizationchart: index$G, - overlaybadge: index$F, - popover: index$z, - paginator: index$E, - password: index$B, - panel: index$D, - panelmenu: index$C, - picklist: index$A, - progressbar: index$y, - progressspinner: index$x, - radiobutton: index$w, - rating: index$v, - scrollpanel: index$t, - select: index$s, - selectbutton: index$r, - skeleton: index$q, - slider: index$p, - speeddial: index$o, - splitter: index$m, - splitbutton: index$n, - stepper: index$l, - steps: index$k, - tabmenu: index$j, - tabs: index$i, - tabview: index$h, - textarea: index$e, - tieredmenu: index$d, - tag: index$g, - terminal: index$f, - timeline: index$c, - togglebutton: index$a, - toggleswitch: index$9, - tree: index$6, - treeselect: index$5, - treetable: index$4, - toast: index$b, - toolbar: index$8, - virtualscroller: index$3 - }, - directives: { - tooltip: index$7, - ripple: index$u - } -}; -const DEBUG_BUILD$6 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; -const SDK_VERSION = "8.48.0"; -const GLOBAL_OBJ = globalThis; -function getGlobalSingleton(name2, creator, obj) { - const gbl = obj || GLOBAL_OBJ; - const __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {}; - const versionedCarrier = __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {}; - return versionedCarrier[name2] || (versionedCarrier[name2] = creator()); -} -__name(getGlobalSingleton, "getGlobalSingleton"); -const DEBUG_BUILD$5 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; -const PREFIX$2 = "Sentry Logger "; -const CONSOLE_LEVELS$1 = [ - "debug", - "info", - "warn", - "error", - "log", - "assert", - "trace" -]; -const originalConsoleMethods = {}; -function consoleSandbox(callback) { - if (!("console" in GLOBAL_OBJ)) { - return callback(); - } - const console2 = GLOBAL_OBJ.console; - const wrappedFuncs = {}; - const wrappedLevels = Object.keys(originalConsoleMethods); - wrappedLevels.forEach((level) => { - const originalConsoleMethod = originalConsoleMethods[level]; - wrappedFuncs[level] = console2[level]; - console2[level] = originalConsoleMethod; - }); - try { - return callback(); - } finally { - wrappedLevels.forEach((level) => { - console2[level] = wrappedFuncs[level]; - }); - } -} -__name(consoleSandbox, "consoleSandbox"); -function makeLogger() { - let enabled = false; - const logger2 = { - enable: /* @__PURE__ */ __name(() => { - enabled = true; - }, "enable"), - disable: /* @__PURE__ */ __name(() => { - enabled = false; - }, "disable"), - isEnabled: /* @__PURE__ */ __name(() => enabled, "isEnabled") - }; - if (DEBUG_BUILD$5) { - CONSOLE_LEVELS$1.forEach((name2) => { - logger2[name2] = (...args) => { - if (enabled) { - consoleSandbox(() => { - GLOBAL_OBJ.console[name2](`${PREFIX$2}[${name2}]:`, ...args); - }); - } - }; - }); - } else { - CONSOLE_LEVELS$1.forEach((name2) => { - logger2[name2] = () => void 0; - }); - } - return logger2; -} -__name(makeLogger, "makeLogger"); -const logger$2 = getGlobalSingleton("logger", makeLogger); -const STACKTRACE_FRAME_LIMIT = 50; -const UNKNOWN_FUNCTION = "?"; -const WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/; -const STRIP_FRAME_REGEXP = /captureMessage|captureException/; -function createStackParser(...parsers) { - const sortedParsers = parsers.sort((a2, b2) => a2[0] - b2[0]).map((p2) => p2[1]); - return (stack2, skipFirstLines = 0, framesToPop = 0) => { - const frames = []; - const lines = stack2.split("\n"); - for (let i2 = skipFirstLines; i2 < lines.length; i2++) { - const line = lines[i2]; - if (line.length > 1024) { - continue; - } - const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, "$1") : line; - if (cleanedLine.match(/\S*Error: /)) { - continue; - } - for (const parser of sortedParsers) { - const frame = parser(cleanedLine); - if (frame) { - frames.push(frame); - break; - } - } - if (frames.length >= STACKTRACE_FRAME_LIMIT + framesToPop) { - break; - } - } - return stripSentryFramesAndReverse(frames.slice(framesToPop)); - }; -} -__name(createStackParser, "createStackParser"); -function stackParserFromStackParserOptions(stackParser) { - if (Array.isArray(stackParser)) { - return createStackParser(...stackParser); - } - return stackParser; -} -__name(stackParserFromStackParserOptions, "stackParserFromStackParserOptions"); -function stripSentryFramesAndReverse(stack2) { - if (!stack2.length) { - return []; - } - const localStack = Array.from(stack2); - if (/sentryWrapped/.test(getLastStackFrame(localStack).function || "")) { - localStack.pop(); - } - localStack.reverse(); - if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || "")) { - localStack.pop(); - if (STRIP_FRAME_REGEXP.test(getLastStackFrame(localStack).function || "")) { - localStack.pop(); - } - } - return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({ - ...frame, - filename: frame.filename || getLastStackFrame(localStack).filename, - function: frame.function || UNKNOWN_FUNCTION - })); -} -__name(stripSentryFramesAndReverse, "stripSentryFramesAndReverse"); -function getLastStackFrame(arr) { - return arr[arr.length - 1] || {}; -} -__name(getLastStackFrame, "getLastStackFrame"); -const defaultFunctionName = ""; -function getFunctionName(fn) { - try { - if (!fn || typeof fn !== "function") { - return defaultFunctionName; - } - return fn.name || defaultFunctionName; - } catch (e2) { - return defaultFunctionName; - } -} -__name(getFunctionName, "getFunctionName"); -function getFramesFromEvent(event) { - const exception = event.exception; - if (exception) { - const frames = []; - try { - exception.values.forEach((value4) => { - if (value4.stacktrace.frames) { - frames.push(...value4.stacktrace.frames); - } - }); - return frames; - } catch (_oO) { - return void 0; - } - } - return void 0; -} -__name(getFramesFromEvent, "getFramesFromEvent"); -const handlers$4 = {}; -const instrumented$1 = {}; -function addHandler$1(type, handler6) { - handlers$4[type] = handlers$4[type] || []; - handlers$4[type].push(handler6); -} -__name(addHandler$1, "addHandler$1"); -function resetInstrumentationHandlers() { - Object.keys(handlers$4).forEach((key) => { - handlers$4[key] = void 0; - }); -} -__name(resetInstrumentationHandlers, "resetInstrumentationHandlers"); -function maybeInstrument(type, instrumentFn) { - if (!instrumented$1[type]) { - instrumented$1[type] = true; - try { - instrumentFn(); - } catch (e2) { - DEBUG_BUILD$5 && logger$2.error(`Error while instrumenting ${type}`, e2); - } - } -} -__name(maybeInstrument, "maybeInstrument"); -function triggerHandlers$1(type, data25) { - const typeHandlers = type && handlers$4[type]; - if (!typeHandlers) { - return; - } - for (const handler6 of typeHandlers) { - try { - handler6(data25); - } catch (e2) { - DEBUG_BUILD$5 && logger$2.error( - `Error while triggering instrumentation handler. -Type: ${type} -Name: ${getFunctionName(handler6)} -Error:`, - e2 - ); - } - } -} -__name(triggerHandlers$1, "triggerHandlers$1"); -let _oldOnErrorHandler = null; -function addGlobalErrorInstrumentationHandler(handler6) { - const type = "error"; - addHandler$1(type, handler6); - maybeInstrument(type, instrumentError); -} -__name(addGlobalErrorInstrumentationHandler, "addGlobalErrorInstrumentationHandler"); -function instrumentError() { - _oldOnErrorHandler = GLOBAL_OBJ.onerror; - GLOBAL_OBJ.onerror = function(msg, url, line, column, error2) { - const handlerData = { - column, - error: error2, - line, - msg, - url - }; - triggerHandlers$1("error", handlerData); - if (_oldOnErrorHandler) { - return _oldOnErrorHandler.apply(this, arguments); - } - return false; - }; - GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true; -} -__name(instrumentError, "instrumentError"); -let _oldOnUnhandledRejectionHandler = null; -function addGlobalUnhandledRejectionInstrumentationHandler(handler6) { - const type = "unhandledrejection"; - addHandler$1(type, handler6); - maybeInstrument(type, instrumentUnhandledRejection); -} -__name(addGlobalUnhandledRejectionInstrumentationHandler, "addGlobalUnhandledRejectionInstrumentationHandler"); -function instrumentUnhandledRejection() { - _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection; - GLOBAL_OBJ.onunhandledrejection = function(e2) { - const handlerData = e2; - triggerHandlers$1("unhandledrejection", handlerData); - if (_oldOnUnhandledRejectionHandler) { - return _oldOnUnhandledRejectionHandler.apply(this, arguments); - } - return true; - }; - GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true; -} -__name(instrumentUnhandledRejection, "instrumentUnhandledRejection"); -function getMainCarrier() { - getSentryCarrier(GLOBAL_OBJ); - return GLOBAL_OBJ; -} -__name(getMainCarrier, "getMainCarrier"); -function getSentryCarrier(carrier) { - const __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {}; - __SENTRY__.version = __SENTRY__.version || SDK_VERSION; - return __SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {}; -} -__name(getSentryCarrier, "getSentryCarrier"); -const objectToString$4 = Object.prototype.toString; -function isError(wat) { - switch (objectToString$4.call(wat)) { - case "[object Error]": - case "[object Exception]": - case "[object DOMException]": - case "[object WebAssembly.Exception]": - return true; - default: - return isInstanceOf(wat, Error); - } -} -__name(isError, "isError"); -function isBuiltin(wat, className) { - return objectToString$4.call(wat) === `[object ${className}]`; -} -__name(isBuiltin, "isBuiltin"); -function isErrorEvent$2(wat) { - return isBuiltin(wat, "ErrorEvent"); -} -__name(isErrorEvent$2, "isErrorEvent$2"); -function isDOMError(wat) { - return isBuiltin(wat, "DOMError"); -} -__name(isDOMError, "isDOMError"); -function isDOMException(wat) { - return isBuiltin(wat, "DOMException"); -} -__name(isDOMException, "isDOMException"); -function isString$8(wat) { - return isBuiltin(wat, "String"); -} -__name(isString$8, "isString$8"); -function isParameterizedString(wat) { - return typeof wat === "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat; -} -__name(isParameterizedString, "isParameterizedString"); -function isPrimitive(wat) { - return wat === null || isParameterizedString(wat) || typeof wat !== "object" && typeof wat !== "function"; -} -__name(isPrimitive, "isPrimitive"); -function isPlainObject$5(wat) { - return isBuiltin(wat, "Object"); -} -__name(isPlainObject$5, "isPlainObject$5"); -function isEvent(wat) { - return typeof Event !== "undefined" && isInstanceOf(wat, Event); -} -__name(isEvent, "isEvent"); -function isElement$3(wat) { - return typeof Element !== "undefined" && isInstanceOf(wat, Element); -} -__name(isElement$3, "isElement$3"); -function isRegExp$5(wat) { - return isBuiltin(wat, "RegExp"); -} -__name(isRegExp$5, "isRegExp$5"); -function isThenable$1(wat) { - return Boolean(wat && wat.then && typeof wat.then === "function"); -} -__name(isThenable$1, "isThenable$1"); -function isSyntheticEvent(wat) { - return isPlainObject$5(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat; -} -__name(isSyntheticEvent, "isSyntheticEvent"); -function isInstanceOf(wat, base2) { - try { - return wat instanceof base2; - } catch (_e) { - return false; - } -} -__name(isInstanceOf, "isInstanceOf"); -function isVueViewModel(wat) { - return !!(typeof wat === "object" && wat !== null && (wat.__isVue || wat._isVue)); -} -__name(isVueViewModel, "isVueViewModel"); -const WINDOW$8 = GLOBAL_OBJ; -const DEFAULT_MAX_STRING_LENGTH = 80; -function htmlTreeAsString(elem, options4 = {}) { - if (!elem) { - return ""; - } - try { - let currentElem = elem; - const MAX_TRAVERSE_HEIGHT = 5; - const out = []; - let height = 0; - let len = 0; - const separator = " > "; - const sepLength = separator.length; - let nextStr; - const keyAttrs = Array.isArray(options4) ? options4 : options4.keyAttrs; - const maxStringLength = !Array.isArray(options4) && options4.maxStringLength || DEFAULT_MAX_STRING_LENGTH; - while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { - nextStr = _htmlElementAsString(currentElem, keyAttrs); - if (nextStr === "html" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) { - break; - } - out.push(nextStr); - len += nextStr.length; - currentElem = currentElem.parentNode; - } - return out.reverse().join(separator); - } catch (_oO) { - return ""; - } -} -__name(htmlTreeAsString, "htmlTreeAsString"); -function _htmlElementAsString(el, keyAttrs) { - const elem = el; - const out = []; - if (!elem || !elem.tagName) { - return ""; - } - if (WINDOW$8.HTMLElement) { - if (elem instanceof HTMLElement && elem.dataset) { - if (elem.dataset["sentryComponent"]) { - return elem.dataset["sentryComponent"]; - } - if (elem.dataset["sentryElement"]) { - return elem.dataset["sentryElement"]; - } - } - } - out.push(elem.tagName.toLowerCase()); - const keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null; - if (keyAttrPairs && keyAttrPairs.length) { - keyAttrPairs.forEach((keyAttrPair) => { - out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`); - }); - } else { - if (elem.id) { - out.push(`#${elem.id}`); - } - const className = elem.className; - if (className && isString$8(className)) { - const classes2 = className.split(/\s+/); - for (const c2 of classes2) { - out.push(`.${c2}`); - } - } - } - const allowedAttrs = ["aria-label", "type", "name", "title", "alt"]; - for (const k2 of allowedAttrs) { - const attr = elem.getAttribute(k2); - if (attr) { - out.push(`[${k2}="${attr}"]`); - } - } - return out.join(""); -} -__name(_htmlElementAsString, "_htmlElementAsString"); -function getLocationHref() { - try { - return WINDOW$8.document.location.href; - } catch (oO) { - return ""; - } -} -__name(getLocationHref, "getLocationHref"); -function getDomElement(selector) { - if (WINDOW$8.document && WINDOW$8.document.querySelector) { - return WINDOW$8.document.querySelector(selector); - } - return null; -} -__name(getDomElement, "getDomElement"); -function getComponentName$1(elem) { - if (!WINDOW$8.HTMLElement) { - return null; - } - let currentElem = elem; - const MAX_TRAVERSE_HEIGHT = 5; - for (let i2 = 0; i2 < MAX_TRAVERSE_HEIGHT; i2++) { - if (!currentElem) { - return null; - } - if (currentElem instanceof HTMLElement) { - if (currentElem.dataset["sentryComponent"]) { - return currentElem.dataset["sentryComponent"]; - } - if (currentElem.dataset["sentryElement"]) { - return currentElem.dataset["sentryElement"]; - } - } - currentElem = currentElem.parentNode; - } - return null; -} -__name(getComponentName$1, "getComponentName$1"); -function truncate(str, max = 0) { - if (typeof str !== "string" || max === 0) { - return str; - } - return str.length <= max ? str : `${str.slice(0, max)}...`; -} -__name(truncate, "truncate"); -function snipLine(line, colno) { - let newLine = line; - const lineLength = newLine.length; - if (lineLength <= 150) { - return newLine; - } - if (colno > lineLength) { - colno = lineLength; - } - let start2 = Math.max(colno - 60, 0); - if (start2 < 5) { - start2 = 0; - } - let end = Math.min(start2 + 140, lineLength); - if (end > lineLength - 5) { - end = lineLength; - } - if (end === lineLength) { - start2 = Math.max(end - 140, 0); - } - newLine = newLine.slice(start2, end); - if (start2 > 0) { - newLine = `'{snip} ${newLine}`; - } - if (end < lineLength) { - newLine += " {snip}"; - } - return newLine; -} -__name(snipLine, "snipLine"); -function safeJoin(input, delimiter2) { - if (!Array.isArray(input)) { - return ""; - } - const output = []; - for (let i2 = 0; i2 < input.length; i2++) { - const value4 = input[i2]; - try { - if (isVueViewModel(value4)) { - output.push("[VueViewModel]"); - } else { - output.push(String(value4)); - } - } catch (e2) { - output.push("[value cannot be serialized]"); - } - } - return output.join(delimiter2); -} -__name(safeJoin, "safeJoin"); -function isMatchingPattern(value4, pattern, requireExactStringMatch = false) { - if (!isString$8(value4)) { - return false; - } - if (isRegExp$5(pattern)) { - return pattern.test(value4); - } - if (isString$8(pattern)) { - return requireExactStringMatch ? value4 === pattern : value4.includes(pattern); - } - return false; -} -__name(isMatchingPattern, "isMatchingPattern"); -function stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = false) { - return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch)); -} -__name(stringMatchesSomePattern, "stringMatchesSomePattern"); -function fill(source, name2, replacementFactory) { - if (!(name2 in source)) { - return; - } - const original = source[name2]; - const wrapped = replacementFactory(original); - if (typeof wrapped === "function") { - markFunctionWrapped(wrapped, original); - } - try { - source[name2] = wrapped; - } catch (e2) { - DEBUG_BUILD$5 && logger$2.log(`Failed to replace method "${name2}" in object`, source); - } -} -__name(fill, "fill"); -function addNonEnumerableProperty(obj, name2, value4) { - try { - Object.defineProperty(obj, name2, { - // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it - value: value4, - writable: true, - configurable: true - }); - } catch (o_O) { - DEBUG_BUILD$5 && logger$2.log(`Failed to add non-enumerable property "${name2}" to object`, obj); - } -} -__name(addNonEnumerableProperty, "addNonEnumerableProperty"); -function markFunctionWrapped(wrapped, original) { - try { - const proto = original.prototype || {}; - wrapped.prototype = original.prototype = proto; - addNonEnumerableProperty(wrapped, "__sentry_original__", original); - } catch (o_O) { - } -} -__name(markFunctionWrapped, "markFunctionWrapped"); -function getOriginalFunction(func) { - return func.__sentry_original__; -} -__name(getOriginalFunction, "getOriginalFunction"); -function urlEncode(object) { - return Object.entries(object).map(([key, value4]) => `${encodeURIComponent(key)}=${encodeURIComponent(value4)}`).join("&"); -} -__name(urlEncode, "urlEncode"); -function convertToPlainObject(value4) { - if (isError(value4)) { - return { - message: value4.message, - name: value4.name, - stack: value4.stack, - ...getOwnProperties(value4) - }; - } else if (isEvent(value4)) { - const newObj = { - type: value4.type, - target: serializeEventTarget(value4.target), - currentTarget: serializeEventTarget(value4.currentTarget), - ...getOwnProperties(value4) - }; - if (typeof CustomEvent !== "undefined" && isInstanceOf(value4, CustomEvent)) { - newObj.detail = value4.detail; - } - return newObj; - } else { - return value4; - } -} -__name(convertToPlainObject, "convertToPlainObject"); -function serializeEventTarget(target) { - try { - return isElement$3(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target); - } catch (_oO) { - return ""; - } -} -__name(serializeEventTarget, "serializeEventTarget"); -function getOwnProperties(obj) { - if (typeof obj === "object" && obj !== null) { - const extractedProps = {}; - for (const property in obj) { - if (Object.prototype.hasOwnProperty.call(obj, property)) { - extractedProps[property] = obj[property]; - } - } - return extractedProps; - } else { - return {}; - } -} -__name(getOwnProperties, "getOwnProperties"); -function extractExceptionKeysForMessage(exception, maxLength = 40) { - const keys2 = Object.keys(convertToPlainObject(exception)); - keys2.sort(); - const firstKey = keys2[0]; - if (!firstKey) { - return "[object has no keys]"; - } - if (firstKey.length >= maxLength) { - return truncate(firstKey, maxLength); - } - for (let includedKeys = keys2.length; includedKeys > 0; includedKeys--) { - const serialized = keys2.slice(0, includedKeys).join(", "); - if (serialized.length > maxLength) { - continue; - } - if (includedKeys === keys2.length) { - return serialized; - } - return truncate(serialized, maxLength); - } - return ""; -} -__name(extractExceptionKeysForMessage, "extractExceptionKeysForMessage"); -function dropUndefinedKeys(inputValue) { - const memoizationMap = /* @__PURE__ */ new Map(); - return _dropUndefinedKeys(inputValue, memoizationMap); -} -__name(dropUndefinedKeys, "dropUndefinedKeys"); -function _dropUndefinedKeys(inputValue, memoizationMap) { - if (isPojo(inputValue)) { - const memoVal = memoizationMap.get(inputValue); - if (memoVal !== void 0) { - return memoVal; - } - const returnValue = {}; - memoizationMap.set(inputValue, returnValue); - for (const key of Object.getOwnPropertyNames(inputValue)) { - if (typeof inputValue[key] !== "undefined") { - returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap); - } - } - return returnValue; - } - if (Array.isArray(inputValue)) { - const memoVal = memoizationMap.get(inputValue); - if (memoVal !== void 0) { - return memoVal; - } - const returnValue = []; - memoizationMap.set(inputValue, returnValue); - inputValue.forEach((item3) => { - returnValue.push(_dropUndefinedKeys(item3, memoizationMap)); - }); - return returnValue; - } - return inputValue; -} -__name(_dropUndefinedKeys, "_dropUndefinedKeys"); -function isPojo(input) { - if (!isPlainObject$5(input)) { - return false; - } - try { - const name2 = Object.getPrototypeOf(input).constructor.name; - return !name2 || name2 === "Object"; - } catch (e2) { - return true; - } -} -__name(isPojo, "isPojo"); -function objectify(wat) { - let objectified; - switch (true) { - case wat == void 0: - objectified = new String(wat); - break; - case (typeof wat === "symbol" || typeof wat === "bigint"): - objectified = Object(wat); - break; - case isPrimitive(wat): - objectified = new wat.constructor(wat); - break; - default: - objectified = wat; - break; - } - return objectified; -} -__name(objectify, "objectify"); -const ONE_SECOND_IN_MS = 1e3; -function dateTimestampInSeconds() { - return Date.now() / ONE_SECOND_IN_MS; -} -__name(dateTimestampInSeconds, "dateTimestampInSeconds"); -function createUnixTimestampInSecondsFunc() { - const { performance: performance2 } = GLOBAL_OBJ; - if (!performance2 || !performance2.now) { - return dateTimestampInSeconds; - } - const approxStartingTimeOrigin = Date.now() - performance2.now(); - const timeOrigin = performance2.timeOrigin == void 0 ? approxStartingTimeOrigin : performance2.timeOrigin; - return () => { - return (timeOrigin + performance2.now()) / ONE_SECOND_IN_MS; - }; -} -__name(createUnixTimestampInSecondsFunc, "createUnixTimestampInSecondsFunc"); -const timestampInSeconds = createUnixTimestampInSecondsFunc(); -let _browserPerformanceTimeOriginMode; -const browserPerformanceTimeOrigin = (() => { - const { performance: performance2 } = GLOBAL_OBJ; - if (!performance2 || !performance2.now) { - _browserPerformanceTimeOriginMode = "none"; - return void 0; - } - const threshold = 3600 * 1e3; - const performanceNow = performance2.now(); - const dateNow = Date.now(); - const timeOriginDelta = performance2.timeOrigin ? Math.abs(performance2.timeOrigin + performanceNow - dateNow) : threshold; - const timeOriginIsReliable = timeOriginDelta < threshold; - const navigationStart = performance2.timing && performance2.timing.navigationStart; - const hasNavigationStart = typeof navigationStart === "number"; - const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold; - const navigationStartIsReliable = navigationStartDelta < threshold; - if (timeOriginIsReliable || navigationStartIsReliable) { - if (timeOriginDelta <= navigationStartDelta) { - _browserPerformanceTimeOriginMode = "timeOrigin"; - return performance2.timeOrigin; - } else { - _browserPerformanceTimeOriginMode = "navigationStart"; - return navigationStart; - } - } - _browserPerformanceTimeOriginMode = "dateNow"; - return dateNow; -})(); -function uuid4() { - const gbl = GLOBAL_OBJ; - const crypto = gbl.crypto || gbl.msCrypto; - let getRandomByte = /* @__PURE__ */ __name(() => Math.random() * 16, "getRandomByte"); - try { - if (crypto && crypto.randomUUID) { - return crypto.randomUUID().replace(/-/g, ""); - } - if (crypto && crypto.getRandomValues) { - getRandomByte = /* @__PURE__ */ __name(() => { - const typedArray = new Uint8Array(1); - crypto.getRandomValues(typedArray); - return typedArray[0]; - }, "getRandomByte"); - } - } catch (_2) { - } - return ("10000000100040008000" + 1e11).replace( - /[018]/g, - (c2) => ( - // eslint-disable-next-line no-bitwise - (c2 ^ (getRandomByte() & 15) >> c2 / 4).toString(16) - ) - ); -} -__name(uuid4, "uuid4"); -function getFirstException(event) { - return event.exception && event.exception.values ? event.exception.values[0] : void 0; -} -__name(getFirstException, "getFirstException"); -function getEventDescription(event) { - const { message: message3, event_id: eventId } = event; - if (message3) { - return message3; - } - const firstException = getFirstException(event); - if (firstException) { - if (firstException.type && firstException.value) { - return `${firstException.type}: ${firstException.value}`; - } - return firstException.type || firstException.value || eventId || ""; - } - return eventId || ""; -} -__name(getEventDescription, "getEventDescription"); -function addExceptionTypeValue(event, value4, type) { - const exception = event.exception = event.exception || {}; - const values = exception.values = exception.values || []; - const firstException = values[0] = values[0] || {}; - if (!firstException.value) { - firstException.value = value4 || ""; - } - if (!firstException.type) { - firstException.type = type || "Error"; - } -} -__name(addExceptionTypeValue, "addExceptionTypeValue"); -function addExceptionMechanism(event, newMechanism) { - const firstException = getFirstException(event); - if (!firstException) { - return; - } - const defaultMechanism = { type: "generic", handled: true }; - const currentMechanism = firstException.mechanism; - firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }; - if (newMechanism && "data" in newMechanism) { - const mergedData = { ...currentMechanism && currentMechanism.data, ...newMechanism.data }; - firstException.mechanism.data = mergedData; - } -} -__name(addExceptionMechanism, "addExceptionMechanism"); -const SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; -function _parseInt(input) { - return parseInt(input || "", 10); -} -__name(_parseInt, "_parseInt"); -function parseSemver(input) { - const match2 = input.match(SEMVER_REGEXP) || []; - const major = _parseInt(match2[1]); - const minor = _parseInt(match2[2]); - const patch2 = _parseInt(match2[3]); - return { - buildmetadata: match2[5], - major: isNaN(major) ? void 0 : major, - minor: isNaN(minor) ? void 0 : minor, - patch: isNaN(patch2) ? void 0 : patch2, - prerelease: match2[4] - }; -} -__name(parseSemver, "parseSemver"); -function addContextToFrame(lines, frame, linesOfContext = 5) { - if (frame.lineno === void 0) { - return; - } - const maxLines = lines.length; - const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0); - frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map((line) => snipLine(line, 0)); - const lineIndex = Math.min(maxLines - 1, sourceLine); - frame.context_line = snipLine(lines[lineIndex], frame.colno || 0); - frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map((line) => snipLine(line, 0)); -} -__name(addContextToFrame, "addContextToFrame"); -function checkOrSetAlreadyCaught(exception) { - if (isAlreadyCaptured(exception)) { - return true; - } - try { - addNonEnumerableProperty(exception, "__sentry_captured__", true); - } catch (err) { - } - return false; -} -__name(checkOrSetAlreadyCaught, "checkOrSetAlreadyCaught"); -function isAlreadyCaptured(exception) { - try { - return exception.__sentry_captured__; - } catch (e2) { - } -} -__name(isAlreadyCaptured, "isAlreadyCaptured"); -function arrayify(maybeArray) { - return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; -} -__name(arrayify, "arrayify"); -var States; -(function(States2) { - const PENDING = 0; - States2[States2["PENDING"] = PENDING] = "PENDING"; - const RESOLVED = 1; - States2[States2["RESOLVED"] = RESOLVED] = "RESOLVED"; - const REJECTED = 2; - States2[States2["REJECTED"] = REJECTED] = "REJECTED"; -})(States || (States = {})); -function resolvedSyncPromise(value4) { - return new SyncPromise((resolve2) => { - resolve2(value4); - }); -} -__name(resolvedSyncPromise, "resolvedSyncPromise"); -function rejectedSyncPromise(reason) { - return new SyncPromise((_2, reject3) => { - reject3(reason); - }); -} -__name(rejectedSyncPromise, "rejectedSyncPromise"); -class SyncPromise { - static { - __name(this, "SyncPromise"); - } - constructor(executor) { - SyncPromise.prototype.__init.call(this); - SyncPromise.prototype.__init2.call(this); - SyncPromise.prototype.__init3.call(this); - SyncPromise.prototype.__init4.call(this); - this._state = States.PENDING; - this._handlers = []; - try { - executor(this._resolve, this._reject); - } catch (e2) { - this._reject(e2); - } - } - /** JSDoc */ - then(onfulfilled, onrejected) { - return new SyncPromise((resolve2, reject3) => { - this._handlers.push([ - false, - (result) => { - if (!onfulfilled) { - resolve2(result); - } else { - try { - resolve2(onfulfilled(result)); - } catch (e2) { - reject3(e2); - } - } - }, - (reason) => { - if (!onrejected) { - reject3(reason); - } else { - try { - resolve2(onrejected(reason)); - } catch (e2) { - reject3(e2); - } - } - } - ]); - this._executeHandlers(); - }); - } - /** JSDoc */ - catch(onrejected) { - return this.then((val) => val, onrejected); - } - /** JSDoc */ - finally(onfinally) { - return new SyncPromise((resolve2, reject3) => { - let val; - let isRejected; - return this.then( - (value4) => { - isRejected = false; - val = value4; - if (onfinally) { - onfinally(); - } - }, - (reason) => { - isRejected = true; - val = reason; - if (onfinally) { - onfinally(); - } - } - ).then(() => { - if (isRejected) { - reject3(val); - return; - } - resolve2(val); - }); - }); - } - /** JSDoc */ - __init() { - this._resolve = (value4) => { - this._setResult(States.RESOLVED, value4); - }; - } - /** JSDoc */ - __init2() { - this._reject = (reason) => { - this._setResult(States.REJECTED, reason); - }; - } - /** JSDoc */ - __init3() { - this._setResult = (state, value4) => { - if (this._state !== States.PENDING) { - return; - } - if (isThenable$1(value4)) { - void value4.then(this._resolve, this._reject); - return; - } - this._state = state; - this._value = value4; - this._executeHandlers(); - }; - } - /** JSDoc */ - __init4() { - this._executeHandlers = () => { - if (this._state === States.PENDING) { - return; - } - const cachedHandlers = this._handlers.slice(); - this._handlers = []; - cachedHandlers.forEach((handler6) => { - if (handler6[0]) { - return; - } - if (this._state === States.RESOLVED) { - handler6[1](this._value); - } - if (this._state === States.REJECTED) { - handler6[2](this._value); - } - handler6[0] = true; - }); - }; - } -} -function makeSession$1(context) { - const startingTime = timestampInSeconds(); - const session = { - sid: uuid4(), - init: true, - timestamp: startingTime, - started: startingTime, - duration: 0, - status: "ok", - errors: 0, - ignoreDuration: false, - toJSON: /* @__PURE__ */ __name(() => sessionToJSON(session), "toJSON") - }; - if (context) { - updateSession(session, context); - } - return session; -} -__name(makeSession$1, "makeSession$1"); -function updateSession(session, context = {}) { - if (context.user) { - if (!session.ipAddress && context.user.ip_address) { - session.ipAddress = context.user.ip_address; - } - if (!session.did && !context.did) { - session.did = context.user.id || context.user.email || context.user.username; - } - } - session.timestamp = context.timestamp || timestampInSeconds(); - if (context.abnormal_mechanism) { - session.abnormal_mechanism = context.abnormal_mechanism; - } - if (context.ignoreDuration) { - session.ignoreDuration = context.ignoreDuration; - } - if (context.sid) { - session.sid = context.sid.length === 32 ? context.sid : uuid4(); - } - if (context.init !== void 0) { - session.init = context.init; - } - if (!session.did && context.did) { - session.did = `${context.did}`; - } - if (typeof context.started === "number") { - session.started = context.started; - } - if (session.ignoreDuration) { - session.duration = void 0; - } else if (typeof context.duration === "number") { - session.duration = context.duration; - } else { - const duration = session.timestamp - session.started; - session.duration = duration >= 0 ? duration : 0; - } - if (context.release) { - session.release = context.release; - } - if (context.environment) { - session.environment = context.environment; - } - if (!session.ipAddress && context.ipAddress) { - session.ipAddress = context.ipAddress; - } - if (!session.userAgent && context.userAgent) { - session.userAgent = context.userAgent; - } - if (typeof context.errors === "number") { - session.errors = context.errors; - } - if (context.status) { - session.status = context.status; - } -} -__name(updateSession, "updateSession"); -function closeSession(session, status) { - let context = {}; - if (status) { - context = { status }; - } else if (session.status === "ok") { - context = { status: "exited" }; - } - updateSession(session, context); -} -__name(closeSession, "closeSession"); -function sessionToJSON(session) { - return dropUndefinedKeys({ - sid: `${session.sid}`, - init: session.init, - // Make sure that sec is converted to ms for date constructor - started: new Date(session.started * 1e3).toISOString(), - timestamp: new Date(session.timestamp * 1e3).toISOString(), - status: session.status, - errors: session.errors, - did: typeof session.did === "number" || typeof session.did === "string" ? `${session.did}` : void 0, - duration: session.duration, - abnormal_mechanism: session.abnormal_mechanism, - attrs: { - release: session.release, - environment: session.environment, - ip_address: session.ipAddress, - user_agent: session.userAgent - } - }); -} -__name(sessionToJSON, "sessionToJSON"); -function generatePropagationContext() { - return { - traceId: generateTraceId(), - spanId: generateSpanId() - }; -} -__name(generatePropagationContext, "generatePropagationContext"); -function generateTraceId() { - return uuid4(); -} -__name(generateTraceId, "generateTraceId"); -function generateSpanId() { - return uuid4().substring(16); -} -__name(generateSpanId, "generateSpanId"); -function merge$1(initialObj, mergeObj, levels = 2) { - if (!mergeObj || typeof mergeObj !== "object" || levels <= 0) { - return mergeObj; - } - if (initialObj && mergeObj && Object.keys(mergeObj).length === 0) { - return initialObj; - } - const output = { ...initialObj }; - for (const key in mergeObj) { - if (Object.prototype.hasOwnProperty.call(mergeObj, key)) { - output[key] = merge$1(output[key], mergeObj[key], levels - 1); - } - } - return output; -} -__name(merge$1, "merge$1"); -const SCOPE_SPAN_FIELD = "_sentrySpan"; -function _setSpanForScope(scope, span) { - if (span) { - addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, span); - } else { - delete scope[SCOPE_SPAN_FIELD]; - } -} -__name(_setSpanForScope, "_setSpanForScope"); -function _getSpanForScope(scope) { - return scope[SCOPE_SPAN_FIELD]; -} -__name(_getSpanForScope, "_getSpanForScope"); -const DEFAULT_MAX_BREADCRUMBS = 100; -class ScopeClass { - static { - __name(this, "ScopeClass"); - } - /** Flag if notifying is happening. */ - /** Callback for client to receive scope changes. */ - /** Callback list that will be called during event processing. */ - /** Array of breadcrumbs. */ - /** User */ - /** Tags */ - /** Extra */ - /** Contexts */ - /** Attachments */ - /** Propagation Context for distributed tracing */ - /** - * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get - * sent to Sentry - */ - /** Fingerprint */ - /** Severity */ - /** - * Transaction Name - * - * IMPORTANT: The transaction name on the scope has nothing to do with root spans/transaction objects. - * It's purpose is to assign a transaction to the scope that's added to non-transaction events. - */ - /** Session */ - /** Request Mode Session Status */ - // eslint-disable-next-line deprecation/deprecation - /** The client on this scope */ - /** Contains the last event id of a captured event. */ - // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. - constructor() { - this._notifyingListeners = false; - this._scopeListeners = []; - this._eventProcessors = []; - this._breadcrumbs = []; - this._attachments = []; - this._user = {}; - this._tags = {}; - this._extra = {}; - this._contexts = {}; - this._sdkProcessingMetadata = {}; - this._propagationContext = { - traceId: generateTraceId(), - spanId: generateSpanId() - }; - } - /** - * @inheritDoc - */ - clone() { - const newScope = new ScopeClass(); - newScope._breadcrumbs = [...this._breadcrumbs]; - newScope._tags = { ...this._tags }; - newScope._extra = { ...this._extra }; - newScope._contexts = { ...this._contexts }; - if (this._contexts.flags) { - newScope._contexts.flags = { - values: [...this._contexts.flags.values] - }; - } - newScope._user = this._user; - newScope._level = this._level; - newScope._session = this._session; - newScope._transactionName = this._transactionName; - newScope._fingerprint = this._fingerprint; - newScope._eventProcessors = [...this._eventProcessors]; - newScope._requestSession = this._requestSession; - newScope._attachments = [...this._attachments]; - newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }; - newScope._propagationContext = { ...this._propagationContext }; - newScope._client = this._client; - newScope._lastEventId = this._lastEventId; - _setSpanForScope(newScope, _getSpanForScope(this)); - return newScope; - } - /** - * @inheritDoc - */ - setClient(client) { - this._client = client; - } - /** - * @inheritDoc - */ - setLastEventId(lastEventId2) { - this._lastEventId = lastEventId2; - } - /** - * @inheritDoc - */ - getClient() { - return this._client; - } - /** - * @inheritDoc - */ - lastEventId() { - return this._lastEventId; - } - /** - * @inheritDoc - */ - addScopeListener(callback) { - this._scopeListeners.push(callback); - } - /** - * @inheritDoc - */ - addEventProcessor(callback) { - this._eventProcessors.push(callback); - return this; - } - /** - * @inheritDoc - */ - setUser(user) { - this._user = user || { - email: void 0, - id: void 0, - ip_address: void 0, - username: void 0 - }; - if (this._session) { - updateSession(this._session, { user }); - } - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - getUser() { - return this._user; - } - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - getRequestSession() { - return this._requestSession; - } - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - setRequestSession(requestSession) { - this._requestSession = requestSession; - return this; - } - /** - * @inheritDoc - */ - setTags(tags) { - this._tags = { - ...this._tags, - ...tags - }; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setTag(key, value4) { - this._tags = { ...this._tags, [key]: value4 }; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setExtras(extras) { - this._extra = { - ...this._extra, - ...extras - }; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setExtra(key, extra) { - this._extra = { ...this._extra, [key]: extra }; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setFingerprint(fingerprint) { - this._fingerprint = fingerprint; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setLevel(level) { - this._level = level; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setTransactionName(name2) { - this._transactionName = name2; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setContext(key, context) { - if (context === null) { - delete this._contexts[key]; - } else { - this._contexts[key] = context; - } - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - setSession(session) { - if (!session) { - delete this._session; - } else { - this._session = session; - } - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - getSession() { - return this._session; - } - /** - * @inheritDoc - */ - update(captureContext) { - if (!captureContext) { - return this; - } - const scopeToMerge = typeof captureContext === "function" ? captureContext(this) : captureContext; - const [scopeInstance, requestSession] = scopeToMerge instanceof Scope ? ( - // eslint-disable-next-line deprecation/deprecation - [scopeToMerge.getScopeData(), scopeToMerge.getRequestSession()] - ) : isPlainObject$5(scopeToMerge) ? [captureContext, captureContext.requestSession] : []; - const { tags, extra, user, contexts, level, fingerprint = [], propagationContext } = scopeInstance || {}; - this._tags = { ...this._tags, ...tags }; - this._extra = { ...this._extra, ...extra }; - this._contexts = { ...this._contexts, ...contexts }; - if (user && Object.keys(user).length) { - this._user = user; - } - if (level) { - this._level = level; - } - if (fingerprint.length) { - this._fingerprint = fingerprint; - } - if (propagationContext) { - this._propagationContext = propagationContext; - } - if (requestSession) { - this._requestSession = requestSession; - } - return this; - } - /** - * @inheritDoc - */ - clear() { - this._breadcrumbs = []; - this._tags = {}; - this._extra = {}; - this._user = {}; - this._contexts = {}; - this._level = void 0; - this._transactionName = void 0; - this._fingerprint = void 0; - this._requestSession = void 0; - this._session = void 0; - _setSpanForScope(this, void 0); - this._attachments = []; - this.setPropagationContext({ traceId: generateTraceId() }); - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - addBreadcrumb(breadcrumb, maxBreadcrumbs) { - const maxCrumbs = typeof maxBreadcrumbs === "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; - if (maxCrumbs <= 0) { - return this; - } - const mergedBreadcrumb = { - timestamp: dateTimestampInSeconds(), - ...breadcrumb - }; - const breadcrumbs = this._breadcrumbs; - breadcrumbs.push(mergedBreadcrumb); - this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - getLastBreadcrumb() { - return this._breadcrumbs[this._breadcrumbs.length - 1]; - } - /** - * @inheritDoc - */ - clearBreadcrumbs() { - this._breadcrumbs = []; - this._notifyScopeListeners(); - return this; - } - /** - * @inheritDoc - */ - addAttachment(attachment) { - this._attachments.push(attachment); - return this; - } - /** - * @inheritDoc - */ - clearAttachments() { - this._attachments = []; - return this; - } - /** @inheritDoc */ - getScopeData() { - return { - breadcrumbs: this._breadcrumbs, - attachments: this._attachments, - contexts: this._contexts, - tags: this._tags, - extra: this._extra, - user: this._user, - level: this._level, - fingerprint: this._fingerprint || [], - eventProcessors: this._eventProcessors, - propagationContext: this._propagationContext, - sdkProcessingMetadata: this._sdkProcessingMetadata, - transactionName: this._transactionName, - span: _getSpanForScope(this) - }; - } - /** - * @inheritDoc - */ - setSDKProcessingMetadata(newData) { - this._sdkProcessingMetadata = merge$1(this._sdkProcessingMetadata, newData, 2); - return this; - } - /** - * @inheritDoc - */ - setPropagationContext(context) { - this._propagationContext = { - // eslint-disable-next-line deprecation/deprecation - spanId: generateSpanId(), - ...context - }; - return this; - } - /** - * @inheritDoc - */ - getPropagationContext() { - return this._propagationContext; - } - /** - * @inheritDoc - */ - captureException(exception, hint) { - const eventId = hint && hint.event_id ? hint.event_id : uuid4(); - if (!this._client) { - logger$2.warn("No client configured on scope - will not capture exception!"); - return eventId; - } - const syntheticException = new Error("Sentry syntheticException"); - this._client.captureException( - exception, - { - originalException: exception, - syntheticException, - ...hint, - event_id: eventId - }, - this - ); - return eventId; - } - /** - * @inheritDoc - */ - captureMessage(message3, level, hint) { - const eventId = hint && hint.event_id ? hint.event_id : uuid4(); - if (!this._client) { - logger$2.warn("No client configured on scope - will not capture message!"); - return eventId; - } - const syntheticException = new Error(message3); - this._client.captureMessage( - message3, - level, - { - originalException: message3, - syntheticException, - ...hint, - event_id: eventId - }, - this - ); - return eventId; - } - /** - * @inheritDoc - */ - captureEvent(event, hint) { - const eventId = hint && hint.event_id ? hint.event_id : uuid4(); - if (!this._client) { - logger$2.warn("No client configured on scope - will not capture event!"); - return eventId; - } - this._client.captureEvent(event, { ...hint, event_id: eventId }, this); - return eventId; - } - /** - * This will be called on every set call. - */ - _notifyScopeListeners() { - if (!this._notifyingListeners) { - this._notifyingListeners = true; - this._scopeListeners.forEach((callback) => { - callback(this); - }); - this._notifyingListeners = false; - } - } -} -const Scope = ScopeClass; -function getDefaultCurrentScope() { - return getGlobalSingleton("defaultCurrentScope", () => new Scope()); -} -__name(getDefaultCurrentScope, "getDefaultCurrentScope"); -function getDefaultIsolationScope() { - return getGlobalSingleton("defaultIsolationScope", () => new Scope()); -} -__name(getDefaultIsolationScope, "getDefaultIsolationScope"); -class AsyncContextStack { - static { - __name(this, "AsyncContextStack"); - } - constructor(scope, isolationScope) { - let assignedScope; - if (!scope) { - assignedScope = new Scope(); - } else { - assignedScope = scope; - } - let assignedIsolationScope; - if (!isolationScope) { - assignedIsolationScope = new Scope(); - } else { - assignedIsolationScope = isolationScope; - } - this._stack = [{ scope: assignedScope }]; - this._isolationScope = assignedIsolationScope; - } - /** - * Fork a scope for the stack. - */ - withScope(callback) { - const scope = this._pushScope(); - let maybePromiseResult; - try { - maybePromiseResult = callback(scope); - } catch (e2) { - this._popScope(); - throw e2; - } - if (isThenable$1(maybePromiseResult)) { - return maybePromiseResult.then( - (res) => { - this._popScope(); - return res; - }, - (e2) => { - this._popScope(); - throw e2; - } - ); - } - this._popScope(); - return maybePromiseResult; - } - /** - * Get the client of the stack. - */ - getClient() { - return this.getStackTop().client; - } - /** - * Returns the scope of the top stack. - */ - getScope() { - return this.getStackTop().scope; - } - /** - * Get the isolation scope for the stack. - */ - getIsolationScope() { - return this._isolationScope; - } - /** - * Returns the topmost scope layer in the order domain > local > process. - */ - getStackTop() { - return this._stack[this._stack.length - 1]; - } - /** - * Push a scope to the stack. - */ - _pushScope() { - const scope = this.getScope().clone(); - this._stack.push({ - client: this.getClient(), - scope - }); - return scope; - } - /** - * Pop a scope from the stack. - */ - _popScope() { - if (this._stack.length <= 1) return false; - return !!this._stack.pop(); - } -} -function getAsyncContextStack() { - const registry = getMainCarrier(); - const sentry = getSentryCarrier(registry); - return sentry.stack = sentry.stack || new AsyncContextStack(getDefaultCurrentScope(), getDefaultIsolationScope()); -} -__name(getAsyncContextStack, "getAsyncContextStack"); -function withScope$1(callback) { - return getAsyncContextStack().withScope(callback); -} -__name(withScope$1, "withScope$1"); -function withSetScope(scope, callback) { - const stack2 = getAsyncContextStack(); - return stack2.withScope(() => { - stack2.getStackTop().scope = scope; - return callback(scope); - }); -} -__name(withSetScope, "withSetScope"); -function withIsolationScope$1(callback) { - return getAsyncContextStack().withScope(() => { - return callback(getAsyncContextStack().getIsolationScope()); - }); -} -__name(withIsolationScope$1, "withIsolationScope$1"); -function getStackAsyncContextStrategy() { - return { - withIsolationScope: withIsolationScope$1, - withScope: withScope$1, - withSetScope, - withSetIsolationScope: /* @__PURE__ */ __name((_isolationScope, callback) => { - return withIsolationScope$1(callback); - }, "withSetIsolationScope"), - getCurrentScope: /* @__PURE__ */ __name(() => getAsyncContextStack().getScope(), "getCurrentScope"), - getIsolationScope: /* @__PURE__ */ __name(() => getAsyncContextStack().getIsolationScope(), "getIsolationScope") - }; -} -__name(getStackAsyncContextStrategy, "getStackAsyncContextStrategy"); -function setAsyncContextStrategy(strategy) { - const registry = getMainCarrier(); - const sentry = getSentryCarrier(registry); - sentry.acs = strategy; -} -__name(setAsyncContextStrategy, "setAsyncContextStrategy"); -function getAsyncContextStrategy(carrier) { - const sentry = getSentryCarrier(carrier); - if (sentry.acs) { - return sentry.acs; - } - return getStackAsyncContextStrategy(); -} -__name(getAsyncContextStrategy, "getAsyncContextStrategy"); -function getCurrentScope$1() { - const carrier = getMainCarrier(); - const acs = getAsyncContextStrategy(carrier); - return acs.getCurrentScope(); -} -__name(getCurrentScope$1, "getCurrentScope$1"); -function getIsolationScope() { - const carrier = getMainCarrier(); - const acs = getAsyncContextStrategy(carrier); - return acs.getIsolationScope(); -} -__name(getIsolationScope, "getIsolationScope"); -function getGlobalScope() { - return getGlobalSingleton("globalScope", () => new Scope()); -} -__name(getGlobalScope, "getGlobalScope"); -function withScope(...rest) { - const carrier = getMainCarrier(); - const acs = getAsyncContextStrategy(carrier); - if (rest.length === 2) { - const [scope, callback] = rest; - if (!scope) { - return acs.withScope(callback); - } - return acs.withSetScope(scope, callback); - } - return acs.withScope(rest[0]); -} -__name(withScope, "withScope"); -function withIsolationScope(...rest) { - const carrier = getMainCarrier(); - const acs = getAsyncContextStrategy(carrier); - if (rest.length === 2) { - const [isolationScope, callback] = rest; - if (!isolationScope) { - return acs.withIsolationScope(callback); - } - return acs.withSetIsolationScope(isolationScope, callback); - } - return acs.withIsolationScope(rest[0]); -} -__name(withIsolationScope, "withIsolationScope"); -function getClient() { - return getCurrentScope$1().getClient(); -} -__name(getClient, "getClient"); -function getTraceContextFromScope(scope) { - const propagationContext = scope.getPropagationContext(); - const { traceId, spanId, parentSpanId } = propagationContext; - const traceContext = dropUndefinedKeys({ - trace_id: traceId, - span_id: spanId, - parent_span_id: parentSpanId - }); - return traceContext; -} -__name(getTraceContextFromScope, "getTraceContextFromScope"); -const METRICS_SPAN_FIELD = "_sentryMetrics"; -function getMetricSummaryJsonForSpan(span) { - const storage = span[METRICS_SPAN_FIELD]; - if (!storage) { - return void 0; - } - const output = {}; - for (const [, [exportKey, summary]] of storage) { - const arr = output[exportKey] || (output[exportKey] = []); - arr.push(dropUndefinedKeys(summary)); - } - return output; -} -__name(getMetricSummaryJsonForSpan, "getMetricSummaryJsonForSpan"); -function updateMetricSummaryOnSpan(span, metricType, sanitizedName, value4, unit, tags, bucketKey) { - const existingStorage = span[METRICS_SPAN_FIELD]; - const storage = existingStorage || (span[METRICS_SPAN_FIELD] = /* @__PURE__ */ new Map()); - const exportKey = `${metricType}:${sanitizedName}@${unit}`; - const bucketItem = storage.get(bucketKey); - if (bucketItem) { - const [, summary] = bucketItem; - storage.set(bucketKey, [ - exportKey, - { - min: Math.min(summary.min, value4), - max: Math.max(summary.max, value4), - count: summary.count += 1, - sum: summary.sum += value4, - tags: summary.tags - } - ]); - } else { - storage.set(bucketKey, [ - exportKey, - { - min: value4, - max: value4, - count: 1, - sum: value4, - tags - } - ]); - } -} -__name(updateMetricSummaryOnSpan, "updateMetricSummaryOnSpan"); -const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source"; -const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate"; -const SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op"; -const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin"; -const SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON = "sentry.idle_span_finish_reason"; -const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT = "sentry.measurement_unit"; -const SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE = "sentry.measurement_value"; -const SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME = "sentry.custom_span_name"; -const SEMANTIC_ATTRIBUTE_PROFILE_ID = "sentry.profile_id"; -const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = "sentry.exclusive_time"; -const SEMANTIC_ATTRIBUTE_CACHE_HIT = "cache.hit"; -const SEMANTIC_ATTRIBUTE_CACHE_KEY = "cache.key"; -const SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE = "cache.item_size"; -const SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD = "http.request.method"; -const SEMANTIC_ATTRIBUTE_URL_FULL = "url.full"; -const SPAN_STATUS_UNSET = 0; -const SPAN_STATUS_OK = 1; -const SPAN_STATUS_ERROR = 2; -function getSpanStatusFromHttpCode(httpStatus) { - if (httpStatus < 400 && httpStatus >= 100) { - return { code: SPAN_STATUS_OK }; - } - if (httpStatus >= 400 && httpStatus < 500) { - switch (httpStatus) { - case 401: - return { code: SPAN_STATUS_ERROR, message: "unauthenticated" }; - case 403: - return { code: SPAN_STATUS_ERROR, message: "permission_denied" }; - case 404: - return { code: SPAN_STATUS_ERROR, message: "not_found" }; - case 409: - return { code: SPAN_STATUS_ERROR, message: "already_exists" }; - case 413: - return { code: SPAN_STATUS_ERROR, message: "failed_precondition" }; - case 429: - return { code: SPAN_STATUS_ERROR, message: "resource_exhausted" }; - case 499: - return { code: SPAN_STATUS_ERROR, message: "cancelled" }; - default: - return { code: SPAN_STATUS_ERROR, message: "invalid_argument" }; - } - } - if (httpStatus >= 500 && httpStatus < 600) { - switch (httpStatus) { - case 501: - return { code: SPAN_STATUS_ERROR, message: "unimplemented" }; - case 503: - return { code: SPAN_STATUS_ERROR, message: "unavailable" }; - case 504: - return { code: SPAN_STATUS_ERROR, message: "deadline_exceeded" }; - default: - return { code: SPAN_STATUS_ERROR, message: "internal_error" }; - } - } - return { code: SPAN_STATUS_ERROR, message: "unknown_error" }; -} -__name(getSpanStatusFromHttpCode, "getSpanStatusFromHttpCode"); -function setHttpStatus(span, httpStatus) { - span.setAttribute("http.response.status_code", httpStatus); - const spanStatus = getSpanStatusFromHttpCode(httpStatus); - if (spanStatus.message !== "unknown_error") { - span.setStatus(spanStatus); - } -} -__name(setHttpStatus, "setHttpStatus"); -const BAGGAGE_HEADER_NAME = "baggage"; -const SENTRY_BAGGAGE_KEY_PREFIX = "sentry-"; -const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/; -const MAX_BAGGAGE_STRING_LENGTH = 8192; -function baggageHeaderToDynamicSamplingContext(baggageHeader) { - const baggageObject = parseBaggageHeader(baggageHeader); - if (!baggageObject) { - return void 0; - } - const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value4]) => { - if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) { - const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length); - acc[nonPrefixedKey] = value4; - } - return acc; - }, {}); - if (Object.keys(dynamicSamplingContext).length > 0) { - return dynamicSamplingContext; - } else { - return void 0; - } -} -__name(baggageHeaderToDynamicSamplingContext, "baggageHeaderToDynamicSamplingContext"); -function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) { - if (!dynamicSamplingContext) { - return void 0; - } - const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce( - (acc, [dscKey, dscValue]) => { - if (dscValue) { - acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue; - } - return acc; - }, - {} - ); - return objectToBaggageHeader(sentryPrefixedDSC); -} -__name(dynamicSamplingContextToSentryBaggageHeader, "dynamicSamplingContextToSentryBaggageHeader"); -function parseBaggageHeader(baggageHeader) { - if (!baggageHeader || !isString$8(baggageHeader) && !Array.isArray(baggageHeader)) { - return void 0; - } - if (Array.isArray(baggageHeader)) { - return baggageHeader.reduce((acc, curr) => { - const currBaggageObject = baggageHeaderToObject(curr); - Object.entries(currBaggageObject).forEach(([key, value4]) => { - acc[key] = value4; - }); - return acc; - }, {}); - } - return baggageHeaderToObject(baggageHeader); -} -__name(parseBaggageHeader, "parseBaggageHeader"); -function baggageHeaderToObject(baggageHeader) { - return baggageHeader.split(",").map((baggageEntry) => baggageEntry.split("=").map((keyOrValue) => decodeURIComponent(keyOrValue.trim()))).reduce((acc, [key, value4]) => { - if (key && value4) { - acc[key] = value4; - } - return acc; - }, {}); -} -__name(baggageHeaderToObject, "baggageHeaderToObject"); -function objectToBaggageHeader(object) { - if (Object.keys(object).length === 0) { - return void 0; - } - return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => { - const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`; - const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`; - if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) { - DEBUG_BUILD$5 && logger$2.warn( - `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.` - ); - return baggageHeader; - } else { - return newBaggageHeader; - } - }, ""); -} -__name(objectToBaggageHeader, "objectToBaggageHeader"); -const TRACEPARENT_REGEXP = new RegExp( - "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$" - // whitespace -); -function extractTraceparentData(traceparent) { - if (!traceparent) { - return void 0; - } - const matches2 = traceparent.match(TRACEPARENT_REGEXP); - if (!matches2) { - return void 0; - } - let parentSampled; - if (matches2[3] === "1") { - parentSampled = true; - } else if (matches2[3] === "0") { - parentSampled = false; - } - return { - traceId: matches2[1], - parentSampled, - parentSpanId: matches2[2] - }; -} -__name(extractTraceparentData, "extractTraceparentData"); -function propagationContextFromHeaders(sentryTrace, baggage) { - const traceparentData = extractTraceparentData(sentryTrace); - const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage); - if (!traceparentData || !traceparentData.traceId) { - return { traceId: generateTraceId(), spanId: generateSpanId() }; - } - const { traceId, parentSpanId, parentSampled } = traceparentData; - const virtualSpanId = generateSpanId(); - return { - traceId, - parentSpanId, - spanId: virtualSpanId, - sampled: parentSampled, - dsc: dynamicSamplingContext || {} - // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it - }; -} -__name(propagationContextFromHeaders, "propagationContextFromHeaders"); -function generateSentryTraceHeader(traceId = generateTraceId(), spanId = generateSpanId(), sampled) { - let sampledString = ""; - if (sampled !== void 0) { - sampledString = sampled ? "-1" : "-0"; - } - return `${traceId}-${spanId}${sampledString}`; -} -__name(generateSentryTraceHeader, "generateSentryTraceHeader"); -const TRACE_FLAG_NONE = 0; -const TRACE_FLAG_SAMPLED = 1; -let hasShownSpanDropWarning = false; -function spanToTransactionTraceContext(span) { - const { spanId: span_id, traceId: trace_id } = span.spanContext(); - const { data: data25, op, parent_span_id, status, origin: origin2 } = spanToJSON(span); - return dropUndefinedKeys({ - parent_span_id, - span_id, - trace_id, - data: data25, - op, - status, - origin: origin2 - }); -} -__name(spanToTransactionTraceContext, "spanToTransactionTraceContext"); -function spanToTraceContext(span) { - const { spanId, traceId: trace_id, isRemote } = span.spanContext(); - const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id; - const span_id = isRemote ? generateSpanId() : spanId; - return dropUndefinedKeys({ - parent_span_id, - span_id, - trace_id - }); -} -__name(spanToTraceContext, "spanToTraceContext"); -function spanToTraceHeader(span) { - const { traceId, spanId } = span.spanContext(); - const sampled = spanIsSampled(span); - return generateSentryTraceHeader(traceId, spanId, sampled); -} -__name(spanToTraceHeader, "spanToTraceHeader"); -function spanTimeInputToSeconds(input) { - if (typeof input === "number") { - return ensureTimestampInSeconds(input); - } - if (Array.isArray(input)) { - return input[0] + input[1] / 1e9; - } - if (input instanceof Date) { - return ensureTimestampInSeconds(input.getTime()); - } - return timestampInSeconds(); -} -__name(spanTimeInputToSeconds, "spanTimeInputToSeconds"); -function ensureTimestampInSeconds(timestamp2) { - const isMs = timestamp2 > 9999999999; - return isMs ? timestamp2 / 1e3 : timestamp2; -} -__name(ensureTimestampInSeconds, "ensureTimestampInSeconds"); -function spanToJSON(span) { - if (spanIsSentrySpan(span)) { - return span.getSpanJSON(); - } - try { - const { spanId: span_id, traceId: trace_id } = span.spanContext(); - if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) { - const { attributes, startTime, name: name2, endTime, parentSpanId, status } = span; - return dropUndefinedKeys({ - span_id, - trace_id, - data: attributes, - description: name2, - parent_span_id: parentSpanId, - start_timestamp: spanTimeInputToSeconds(startTime), - // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time - timestamp: spanTimeInputToSeconds(endTime) || void 0, - status: getStatusMessage(status), - op: attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP], - origin: attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], - _metrics_summary: getMetricSummaryJsonForSpan(span) - }); - } - return { - span_id, - trace_id - }; - } catch (e2) { - return {}; - } -} -__name(spanToJSON, "spanToJSON"); -function spanIsOpenTelemetrySdkTraceBaseSpan(span) { - const castSpan = span; - return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status; -} -__name(spanIsOpenTelemetrySdkTraceBaseSpan, "spanIsOpenTelemetrySdkTraceBaseSpan"); -function spanIsSentrySpan(span) { - return typeof span.getSpanJSON === "function"; -} -__name(spanIsSentrySpan, "spanIsSentrySpan"); -function spanIsSampled(span) { - const { traceFlags } = span.spanContext(); - return traceFlags === TRACE_FLAG_SAMPLED; -} -__name(spanIsSampled, "spanIsSampled"); -function getStatusMessage(status) { - if (!status || status.code === SPAN_STATUS_UNSET) { - return void 0; - } - if (status.code === SPAN_STATUS_OK) { - return "ok"; - } - return status.message || "unknown_error"; -} -__name(getStatusMessage, "getStatusMessage"); -const CHILD_SPANS_FIELD = "_sentryChildSpans"; -const ROOT_SPAN_FIELD = "_sentryRootSpan"; -function addChildSpanToSpan(span, childSpan) { - const rootSpan = span[ROOT_SPAN_FIELD] || span; - addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan); - if (span[CHILD_SPANS_FIELD]) { - span[CHILD_SPANS_FIELD].add(childSpan); - } else { - addNonEnumerableProperty(span, CHILD_SPANS_FIELD, /* @__PURE__ */ new Set([childSpan])); - } -} -__name(addChildSpanToSpan, "addChildSpanToSpan"); -function removeChildSpanFromSpan(span, childSpan) { - if (span[CHILD_SPANS_FIELD]) { - span[CHILD_SPANS_FIELD].delete(childSpan); - } -} -__name(removeChildSpanFromSpan, "removeChildSpanFromSpan"); -function getSpanDescendants(span) { - const resultSet = /* @__PURE__ */ new Set(); - function addSpanChildren(span2) { - if (resultSet.has(span2)) { - return; - } else if (spanIsSampled(span2)) { - resultSet.add(span2); - const childSpans = span2[CHILD_SPANS_FIELD] ? Array.from(span2[CHILD_SPANS_FIELD]) : []; - for (const childSpan of childSpans) { - addSpanChildren(childSpan); - } - } - } - __name(addSpanChildren, "addSpanChildren"); - addSpanChildren(span); - return Array.from(resultSet); -} -__name(getSpanDescendants, "getSpanDescendants"); -function getRootSpan(span) { - return span[ROOT_SPAN_FIELD] || span; -} -__name(getRootSpan, "getRootSpan"); -function getActiveSpan() { - const carrier = getMainCarrier(); - const acs = getAsyncContextStrategy(carrier); - if (acs.getActiveSpan) { - return acs.getActiveSpan(); - } - return _getSpanForScope(getCurrentScope$1()); -} -__name(getActiveSpan, "getActiveSpan"); -function updateMetricSummaryOnActiveSpan(metricType, sanitizedName, value4, unit, tags, bucketKey) { - const span = getActiveSpan(); - if (span) { - updateMetricSummaryOnSpan(span, metricType, sanitizedName, value4, unit, tags, bucketKey); - } -} -__name(updateMetricSummaryOnActiveSpan, "updateMetricSummaryOnActiveSpan"); -function showSpanDropWarning() { - if (!hasShownSpanDropWarning) { - consoleSandbox(() => { - console.warn( - "[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly." - ); - }); - hasShownSpanDropWarning = true; - } -} -__name(showSpanDropWarning, "showSpanDropWarning"); -function updateSpanName(span, name2) { - span.updateName(name2); - span.setAttributes({ - [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom", - [SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name2 - }); -} -__name(updateSpanName, "updateSpanName"); -let errorsInstrumented = false; -function registerSpanErrorInstrumentation() { - if (errorsInstrumented) { - return; - } - errorsInstrumented = true; - addGlobalErrorInstrumentationHandler(errorCallback); - addGlobalUnhandledRejectionInstrumentationHandler(errorCallback); -} -__name(registerSpanErrorInstrumentation, "registerSpanErrorInstrumentation"); -function errorCallback() { - const activeSpan = getActiveSpan(); - const rootSpan = activeSpan && getRootSpan(activeSpan); - if (rootSpan) { - const message3 = "internal_error"; - DEBUG_BUILD$6 && logger$2.log(`[Tracing] Root span: ${message3} -> Global error occurred`); - rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: message3 }); - } -} -__name(errorCallback, "errorCallback"); -errorCallback.tag = "sentry_tracingErrorCallback"; -const SCOPE_ON_START_SPAN_FIELD = "_sentryScope"; -const ISOLATION_SCOPE_ON_START_SPAN_FIELD = "_sentryIsolationScope"; -function setCapturedScopesOnSpan(span, scope, isolationScope) { - if (span) { - addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope); - addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope); - } -} -__name(setCapturedScopesOnSpan, "setCapturedScopesOnSpan"); -function getCapturedScopesOnSpan(span) { - return { - scope: span[SCOPE_ON_START_SPAN_FIELD], - isolationScope: span[ISOLATION_SCOPE_ON_START_SPAN_FIELD] - }; -} -__name(getCapturedScopesOnSpan, "getCapturedScopesOnSpan"); -function addTracingExtensions() { - registerSpanErrorInstrumentation(); -} -__name(addTracingExtensions, "addTracingExtensions"); -function hasTracingEnabled(maybeOptions) { - if (typeof __SENTRY_TRACING__ === "boolean" && !__SENTRY_TRACING__) { - return false; - } - const client = getClient(); - const options4 = maybeOptions || client && client.getOptions(); - return !!options4 && (options4.enableTracing || "tracesSampleRate" in options4 || "tracesSampler" in options4); -} -__name(hasTracingEnabled, "hasTracingEnabled"); -class SentryNonRecordingSpan { - static { - __name(this, "SentryNonRecordingSpan"); - } - constructor(spanContext = {}) { - this._traceId = spanContext.traceId || generateTraceId(); - this._spanId = spanContext.spanId || generateSpanId(); - } - /** @inheritdoc */ - spanContext() { - return { - spanId: this._spanId, - traceId: this._traceId, - traceFlags: TRACE_FLAG_NONE - }; - } - /** @inheritdoc */ - // eslint-disable-next-line @typescript-eslint/no-empty-function - end(_timestamp) { - } - /** @inheritdoc */ - setAttribute(_key, _value) { - return this; - } - /** @inheritdoc */ - setAttributes(_values) { - return this; - } - /** @inheritdoc */ - setStatus(_status) { - return this; - } - /** @inheritdoc */ - updateName(_name) { - return this; - } - /** @inheritdoc */ - isRecording() { - return false; - } - /** @inheritdoc */ - addEvent(_name, _attributesOrStartTime, _startTime) { - return this; - } - /** - * This should generally not be used, - * but we need it for being compliant with the OTEL Span interface. - * - * @hidden - * @internal - */ - addLink(_link) { - return this; - } - /** - * This should generally not be used, - * but we need it for being compliant with the OTEL Span interface. - * - * @hidden - * @internal - */ - addLinks(_links) { - return this; - } - /** - * This should generally not be used, - * but we need it for being compliant with the OTEL Span interface. - * - * @hidden - * @internal - */ - recordException(_exception, _time) { - } -} -function handleCallbackErrors(fn, onError, onFinally = () => { -}) { - let maybePromiseResult; - try { - maybePromiseResult = fn(); - } catch (e2) { - onError(e2); - onFinally(); - throw e2; - } - return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally); -} -__name(handleCallbackErrors, "handleCallbackErrors"); -function maybeHandlePromiseRejection(value4, onError, onFinally) { - if (isThenable$1(value4)) { - return value4.then( - (res) => { - onFinally(); - return res; - }, - (e2) => { - onError(e2); - onFinally(); - throw e2; - } - ); - } - onFinally(); - return value4; -} -__name(maybeHandlePromiseRejection, "maybeHandlePromiseRejection"); -const DEFAULT_ENVIRONMENT = "production"; -const FROZEN_DSC_FIELD = "_frozenDsc"; -function freezeDscOnSpan(span, dsc) { - const spanWithMaybeDsc = span; - addNonEnumerableProperty(spanWithMaybeDsc, FROZEN_DSC_FIELD, dsc); -} -__name(freezeDscOnSpan, "freezeDscOnSpan"); -function getDynamicSamplingContextFromClient(trace_id, client) { - const options4 = client.getOptions(); - const { publicKey: public_key } = client.getDsn() || {}; - const dsc = dropUndefinedKeys({ - environment: options4.environment || DEFAULT_ENVIRONMENT, - release: options4.release, - public_key, - trace_id - }); - client.emit("createDsc", dsc); - return dsc; -} -__name(getDynamicSamplingContextFromClient, "getDynamicSamplingContextFromClient"); -function getDynamicSamplingContextFromScope(client, scope) { - const propagationContext = scope.getPropagationContext(); - return propagationContext.dsc || getDynamicSamplingContextFromClient(propagationContext.traceId, client); -} -__name(getDynamicSamplingContextFromScope, "getDynamicSamplingContextFromScope"); -function getDynamicSamplingContextFromSpan(span) { - const client = getClient(); - if (!client) { - return {}; - } - const rootSpan = getRootSpan(span); - const frozenDsc = rootSpan[FROZEN_DSC_FIELD]; - if (frozenDsc) { - return frozenDsc; - } - const traceState = rootSpan.spanContext().traceState; - const traceStateDsc = traceState && traceState.get("sentry.dsc"); - const dscOnTraceState = traceStateDsc && baggageHeaderToDynamicSamplingContext(traceStateDsc); - if (dscOnTraceState) { - return dscOnTraceState; - } - const dsc = getDynamicSamplingContextFromClient(span.spanContext().traceId, client); - const jsonSpan = spanToJSON(rootSpan); - const attributes = jsonSpan.data || {}; - const maybeSampleRate = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]; - if (maybeSampleRate != null) { - dsc.sample_rate = `${maybeSampleRate}`; - } - const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; - const name2 = jsonSpan.description; - if (source !== "url" && name2) { - dsc.transaction = name2; - } - if (hasTracingEnabled()) { - dsc.sampled = String(spanIsSampled(rootSpan)); - } - client.emit("createDsc", dsc, rootSpan); - return dsc; -} -__name(getDynamicSamplingContextFromSpan, "getDynamicSamplingContextFromSpan"); -function spanToBaggageHeader(span) { - const dsc = getDynamicSamplingContextFromSpan(span); - return dynamicSamplingContextToSentryBaggageHeader(dsc); -} -__name(spanToBaggageHeader, "spanToBaggageHeader"); -function logSpanStart(span) { - if (!DEBUG_BUILD$6) return; - const { description = "< unknown name >", op = "< unknown op >", parent_span_id: parentSpanId } = spanToJSON(span); - const { spanId } = span.spanContext(); - const sampled = spanIsSampled(span); - const rootSpan = getRootSpan(span); - const isRootSpan = rootSpan === span; - const header3 = `[Tracing] Starting ${sampled ? "sampled" : "unsampled"} ${isRootSpan ? "root " : ""}span`; - const infoParts = [`op: ${op}`, `name: ${description}`, `ID: ${spanId}`]; - if (parentSpanId) { - infoParts.push(`parent ID: ${parentSpanId}`); - } - if (!isRootSpan) { - const { op: op2, description: description2 } = spanToJSON(rootSpan); - infoParts.push(`root ID: ${rootSpan.spanContext().spanId}`); - if (op2) { - infoParts.push(`root op: ${op2}`); - } - if (description2) { - infoParts.push(`root description: ${description2}`); - } - } - logger$2.log(`${header3} - ${infoParts.join("\n ")}`); -} -__name(logSpanStart, "logSpanStart"); -function logSpanEnd(span) { - if (!DEBUG_BUILD$6) return; - const { description = "< unknown name >", op = "< unknown op >" } = spanToJSON(span); - const { spanId } = span.spanContext(); - const rootSpan = getRootSpan(span); - const isRootSpan = rootSpan === span; - const msg = `[Tracing] Finishing "${op}" ${isRootSpan ? "root " : ""}span "${description}" with ID ${spanId}`; - logger$2.log(msg); -} -__name(logSpanEnd, "logSpanEnd"); -function parseSampleRate(sampleRate) { - if (typeof sampleRate === "boolean") { - return Number(sampleRate); - } - const rate = typeof sampleRate === "string" ? parseFloat(sampleRate) : sampleRate; - if (typeof rate !== "number" || isNaN(rate) || rate < 0 || rate > 1) { - DEBUG_BUILD$6 && logger$2.warn( - `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( - sampleRate - )} of type ${JSON.stringify(typeof sampleRate)}.` - ); - return void 0; - } - return rate; -} -__name(parseSampleRate, "parseSampleRate"); -function sampleSpan(options4, samplingContext) { - if (!hasTracingEnabled(options4)) { - return [false]; - } - const normalizedRequest = getIsolationScope().getScopeData().sdkProcessingMetadata.normalizedRequest; - const enhancedSamplingContext = { - ...samplingContext, - normalizedRequest: samplingContext.normalizedRequest || normalizedRequest - }; - let sampleRate; - if (typeof options4.tracesSampler === "function") { - sampleRate = options4.tracesSampler(enhancedSamplingContext); - } else if (enhancedSamplingContext.parentSampled !== void 0) { - sampleRate = enhancedSamplingContext.parentSampled; - } else if (typeof options4.tracesSampleRate !== "undefined") { - sampleRate = options4.tracesSampleRate; - } else { - sampleRate = 1; - } - const parsedSampleRate = parseSampleRate(sampleRate); - if (parsedSampleRate === void 0) { - DEBUG_BUILD$6 && logger$2.warn("[Tracing] Discarding transaction because of invalid sample rate."); - return [false]; - } - if (!parsedSampleRate) { - DEBUG_BUILD$6 && logger$2.log( - `[Tracing] Discarding transaction because ${typeof options4.tracesSampler === "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}` - ); - return [false, parsedSampleRate]; - } - const shouldSample = Math.random() < parsedSampleRate; - if (!shouldSample) { - DEBUG_BUILD$6 && logger$2.log( - `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( - sampleRate - )})` - ); - return [false, parsedSampleRate]; - } - return [true, parsedSampleRate]; -} -__name(sampleSpan, "sampleSpan"); -const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; -function isValidProtocol(protocol) { - return protocol === "http" || protocol === "https"; -} -__name(isValidProtocol, "isValidProtocol"); -function dsnToString(dsn, withPassword = false) { - const { host, path, pass, port, projectId, protocol, publicKey } = dsn; - return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path ? `${path}/` : path}${projectId}`; -} -__name(dsnToString, "dsnToString"); -function dsnFromString(str) { - const match2 = DSN_REGEX.exec(str); - if (!match2) { - consoleSandbox(() => { - console.error(`Invalid Sentry Dsn: ${str}`); - }); - return void 0; - } - const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match2.slice(1); - let path = ""; - let projectId = lastPath; - const split2 = projectId.split("/"); - if (split2.length > 1) { - path = split2.slice(0, -1).join("/"); - projectId = split2.pop(); - } - if (projectId) { - const projectMatch = projectId.match(/^\d+/); - if (projectMatch) { - projectId = projectMatch[0]; - } - } - return dsnFromComponents({ host, pass, path, projectId, port, protocol, publicKey }); -} -__name(dsnFromString, "dsnFromString"); -function dsnFromComponents(components) { - return { - protocol: components.protocol, - publicKey: components.publicKey || "", - pass: components.pass || "", - host: components.host, - port: components.port || "", - path: components.path || "", - projectId: components.projectId - }; -} -__name(dsnFromComponents, "dsnFromComponents"); -function validateDsn(dsn) { - if (!DEBUG_BUILD$5) { - return true; - } - const { port, projectId, protocol } = dsn; - const requiredComponents = ["protocol", "publicKey", "host", "projectId"]; - const hasMissingRequiredComponent = requiredComponents.find((component) => { - if (!dsn[component]) { - logger$2.error(`Invalid Sentry Dsn: ${component} missing`); - return true; - } - return false; - }); - if (hasMissingRequiredComponent) { - return false; - } - if (!projectId.match(/^\d+$/)) { - logger$2.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`); - return false; - } - if (!isValidProtocol(protocol)) { - logger$2.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`); - return false; - } - if (port && isNaN(parseInt(port, 10))) { - logger$2.error(`Invalid Sentry Dsn: Invalid port ${port}`); - return false; - } - return true; -} -__name(validateDsn, "validateDsn"); -function makeDsn(from2) { - const components = typeof from2 === "string" ? dsnFromString(from2) : dsnFromComponents(from2); - if (!components || !validateDsn(components)) { - return void 0; - } - return components; -} -__name(makeDsn, "makeDsn"); -function memoBuilder() { - const hasWeakSet = typeof WeakSet === "function"; - const inner = hasWeakSet ? /* @__PURE__ */ new WeakSet() : []; - function memoize(obj) { - if (hasWeakSet) { - if (inner.has(obj)) { - return true; - } - inner.add(obj); - return false; - } - for (let i2 = 0; i2 < inner.length; i2++) { - const value4 = inner[i2]; - if (value4 === obj) { - return true; - } - } - inner.push(obj); - return false; - } - __name(memoize, "memoize"); - function unmemoize(obj) { - if (hasWeakSet) { - inner.delete(obj); - } else { - for (let i2 = 0; i2 < inner.length; i2++) { - if (inner[i2] === obj) { - inner.splice(i2, 1); - break; - } - } - } - } - __name(unmemoize, "unmemoize"); - return [memoize, unmemoize]; -} -__name(memoBuilder, "memoBuilder"); -function normalize$2(input, depth = 100, maxProperties = Infinity) { - try { - return visit("", input, depth, maxProperties); - } catch (err) { - return { ERROR: `**non-serializable** (${err})` }; - } -} -__name(normalize$2, "normalize$2"); -function normalizeToSize(object, depth = 3, maxSize = 100 * 1024) { - const normalized = normalize$2(object, depth); - if (jsonSize(normalized) > maxSize) { - return normalizeToSize(object, depth - 1, maxSize); - } - return normalized; -} -__name(normalizeToSize, "normalizeToSize"); -function visit(key, value4, depth = Infinity, maxProperties = Infinity, memo = memoBuilder()) { - const [memoize, unmemoize] = memo; - if (value4 == null || // this matches null and undefined -> eqeq not eqeqeq - ["boolean", "string"].includes(typeof value4) || typeof value4 === "number" && Number.isFinite(value4)) { - return value4; - } - const stringified = stringifyValue(key, value4); - if (!stringified.startsWith("[object ")) { - return stringified; - } - if (value4["__sentry_skip_normalization__"]) { - return value4; - } - const remainingDepth = typeof value4["__sentry_override_normalization_depth__"] === "number" ? value4["__sentry_override_normalization_depth__"] : depth; - if (remainingDepth === 0) { - return stringified.replace("object ", ""); - } - if (memoize(value4)) { - return "[Circular ~]"; - } - const valueWithToJSON = value4; - if (valueWithToJSON && typeof valueWithToJSON.toJSON === "function") { - try { - const jsonValue = valueWithToJSON.toJSON(); - return visit("", jsonValue, remainingDepth - 1, maxProperties, memo); - } catch (err) { - } - } - const normalized = Array.isArray(value4) ? [] : {}; - let numAdded = 0; - const visitable = convertToPlainObject(value4); - for (const visitKey in visitable) { - if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) { - continue; - } - if (numAdded >= maxProperties) { - normalized[visitKey] = "[MaxProperties ~]"; - break; - } - const visitValue = visitable[visitKey]; - normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo); - numAdded++; - } - unmemoize(value4); - return normalized; -} -__name(visit, "visit"); -function stringifyValue(key, value4) { - try { - if (key === "domain" && value4 && typeof value4 === "object" && value4._events) { - return "[Domain]"; - } - if (key === "domainEmitter") { - return "[DomainEmitter]"; - } - if (typeof global !== "undefined" && value4 === global) { - return "[Global]"; - } - if (typeof window !== "undefined" && value4 === window) { - return "[Window]"; - } - if (typeof document !== "undefined" && value4 === document) { - return "[Document]"; - } - if (isVueViewModel(value4)) { - return "[VueViewModel]"; - } - if (isSyntheticEvent(value4)) { - return "[SyntheticEvent]"; - } - if (typeof value4 === "number" && !Number.isFinite(value4)) { - return `[${value4}]`; - } - if (typeof value4 === "function") { - return `[Function: ${getFunctionName(value4)}]`; - } - if (typeof value4 === "symbol") { - return `[${String(value4)}]`; - } - if (typeof value4 === "bigint") { - return `[BigInt: ${String(value4)}]`; - } - const objName = getConstructorName(value4); - if (/^HTML(\w*)Element$/.test(objName)) { - return `[HTMLElement: ${objName}]`; - } - return `[object ${objName}]`; - } catch (err) { - return `**non-serializable** (${err})`; - } -} -__name(stringifyValue, "stringifyValue"); -function getConstructorName(value4) { - const prototype2 = Object.getPrototypeOf(value4); - return prototype2 ? prototype2.constructor.name : "null prototype"; -} -__name(getConstructorName, "getConstructorName"); -function utf8Length(value4) { - return ~-encodeURI(value4).split(/%..|./).length; -} -__name(utf8Length, "utf8Length"); -function jsonSize(value4) { - return utf8Length(JSON.stringify(value4)); -} -__name(jsonSize, "jsonSize"); -function normalizeUrlToBase(url, basePath2) { - const escapedBase = basePath2.replace(/\\/g, "/").replace(/[|\\{}()[\]^$+*?.]/g, "\\$&"); - let newUrl = url; - try { - newUrl = decodeURI(url); - } catch (_Oo) { - } - return newUrl.replace(/\\/g, "/").replace(/webpack:\/?/g, "").replace(new RegExp(`(file://)?/*${escapedBase}/*`, "ig"), "app:///"); -} -__name(normalizeUrlToBase, "normalizeUrlToBase"); -function createEnvelope(headers, items2 = []) { - return [headers, items2]; -} -__name(createEnvelope, "createEnvelope"); -function addItemToEnvelope(envelope, newItem) { - const [headers, items2] = envelope; - return [headers, [...items2, newItem]]; -} -__name(addItemToEnvelope, "addItemToEnvelope"); -function forEachEnvelopeItem(envelope, callback) { - const envelopeItems = envelope[1]; - for (const envelopeItem of envelopeItems) { - const envelopeItemType = envelopeItem[0].type; - const result = callback(envelopeItem, envelopeItemType); - if (result) { - return true; - } - } - return false; -} -__name(forEachEnvelopeItem, "forEachEnvelopeItem"); -function envelopeContainsItemType(envelope, types) { - return forEachEnvelopeItem(envelope, (_2, type) => types.includes(type)); -} -__name(envelopeContainsItemType, "envelopeContainsItemType"); -function encodeUTF8(input) { - return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.encodePolyfill ? GLOBAL_OBJ.__SENTRY__.encodePolyfill(input) : new TextEncoder().encode(input); -} -__name(encodeUTF8, "encodeUTF8"); -function decodeUTF8(input) { - return GLOBAL_OBJ.__SENTRY__ && GLOBAL_OBJ.__SENTRY__.decodePolyfill ? GLOBAL_OBJ.__SENTRY__.decodePolyfill(input) : new TextDecoder().decode(input); -} -__name(decodeUTF8, "decodeUTF8"); -function serializeEnvelope(envelope) { - const [envHeaders, items2] = envelope; - let parts2 = JSON.stringify(envHeaders); - function append3(next2) { - if (typeof parts2 === "string") { - parts2 = typeof next2 === "string" ? parts2 + next2 : [encodeUTF8(parts2), next2]; - } else { - parts2.push(typeof next2 === "string" ? encodeUTF8(next2) : next2); - } - } - __name(append3, "append"); - for (const item3 of items2) { - const [itemHeaders, payload] = item3; - append3(` -${JSON.stringify(itemHeaders)} -`); - if (typeof payload === "string" || payload instanceof Uint8Array) { - append3(payload); - } else { - let stringifiedPayload; - try { - stringifiedPayload = JSON.stringify(payload); - } catch (e2) { - stringifiedPayload = JSON.stringify(normalize$2(payload)); - } - append3(stringifiedPayload); - } - } - return typeof parts2 === "string" ? parts2 : concatBuffers(parts2); -} -__name(serializeEnvelope, "serializeEnvelope"); -function concatBuffers(buffers) { - const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0); - const merged = new Uint8Array(totalLength); - let offset = 0; - for (const buffer2 of buffers) { - merged.set(buffer2, offset); - offset += buffer2.length; - } - return merged; -} -__name(concatBuffers, "concatBuffers"); -function parseEnvelope(env) { - let buffer2 = typeof env === "string" ? encodeUTF8(env) : env; - function readBinary(length) { - const bin = buffer2.subarray(0, length); - buffer2 = buffer2.subarray(length + 1); - return bin; - } - __name(readBinary, "readBinary"); - function readJson() { - let i2 = buffer2.indexOf(10); - if (i2 < 0) { - i2 = buffer2.length; - } - return JSON.parse(decodeUTF8(readBinary(i2))); - } - __name(readJson, "readJson"); - const envelopeHeader = readJson(); - const items2 = []; - while (buffer2.length) { - const itemHeader = readJson(); - const binaryLength = typeof itemHeader.length === "number" ? itemHeader.length : void 0; - items2.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]); - } - return [envelopeHeader, items2]; -} -__name(parseEnvelope, "parseEnvelope"); -function createSpanEnvelopeItem(spanJson) { - const spanHeaders = { - type: "span" - }; - return [spanHeaders, spanJson]; -} -__name(createSpanEnvelopeItem, "createSpanEnvelopeItem"); -function createAttachmentEnvelopeItem(attachment) { - const buffer2 = typeof attachment.data === "string" ? encodeUTF8(attachment.data) : attachment.data; - return [ - dropUndefinedKeys({ - type: "attachment", - length: buffer2.length, - filename: attachment.filename, - content_type: attachment.contentType, - attachment_type: attachment.attachmentType - }), - buffer2 - ]; -} -__name(createAttachmentEnvelopeItem, "createAttachmentEnvelopeItem"); -const ITEM_TYPE_TO_DATA_CATEGORY_MAP = { - session: "session", - sessions: "session", - attachment: "attachment", - transaction: "transaction", - event: "error", - client_report: "internal", - user_report: "default", - profile: "profile", - profile_chunk: "profile", - replay_event: "replay", - replay_recording: "replay", - check_in: "monitor", - feedback: "feedback", - span: "span", - statsd: "metric_bucket", - raw_security: "security" -}; -function envelopeItemTypeToDataCategory(type) { - return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type]; -} -__name(envelopeItemTypeToDataCategory, "envelopeItemTypeToDataCategory"); -function getSdkMetadataForEnvelopeHeader(metadataOrEvent) { - if (!metadataOrEvent || !metadataOrEvent.sdk) { - return; - } - const { name: name2, version: version2 } = metadataOrEvent.sdk; - return { name: name2, version: version2 }; -} -__name(getSdkMetadataForEnvelopeHeader, "getSdkMetadataForEnvelopeHeader"); -function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) { - const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext; - return { - event_id: event.event_id, - sent_at: (/* @__PURE__ */ new Date()).toISOString(), - ...sdkInfo && { sdk: sdkInfo }, - ...!!tunnel && dsn && { dsn: dsnToString(dsn) }, - ...dynamicSamplingContext && { - trace: dropUndefinedKeys({ ...dynamicSamplingContext }) - } - }; -} -__name(createEventEnvelopeHeaders, "createEventEnvelopeHeaders"); -function enhanceEventWithSdkInfo(event, sdkInfo) { - if (!sdkInfo) { - return event; - } - event.sdk = event.sdk || {}; - event.sdk.name = event.sdk.name || sdkInfo.name; - event.sdk.version = event.sdk.version || sdkInfo.version; - event.sdk.integrations = [...event.sdk.integrations || [], ...sdkInfo.integrations || []]; - event.sdk.packages = [...event.sdk.packages || [], ...sdkInfo.packages || []]; - return event; -} -__name(enhanceEventWithSdkInfo, "enhanceEventWithSdkInfo"); -function createSessionEnvelope(session, dsn, metadata, tunnel) { - const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata); - const envelopeHeaders = { - sent_at: (/* @__PURE__ */ new Date()).toISOString(), - ...sdkInfo && { sdk: sdkInfo }, - ...!!tunnel && dsn && { dsn: dsnToString(dsn) } - }; - const envelopeItem = "aggregates" in session ? [{ type: "sessions" }, session] : [{ type: "session" }, session.toJSON()]; - return createEnvelope(envelopeHeaders, [envelopeItem]); -} -__name(createSessionEnvelope, "createSessionEnvelope"); -function createEventEnvelope(event, dsn, metadata, tunnel) { - const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata); - const eventType = event.type && event.type !== "replay_event" ? event.type : "event"; - enhanceEventWithSdkInfo(event, metadata && metadata.sdk); - const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); - delete event.sdkProcessingMetadata; - const eventItem = [{ type: eventType }, event]; - return createEnvelope(envelopeHeaders, [eventItem]); -} -__name(createEventEnvelope, "createEventEnvelope"); -function createSpanEnvelope(spans, client) { - function dscHasRequiredProps(dsc2) { - return !!dsc2.trace_id && !!dsc2.public_key; - } - __name(dscHasRequiredProps, "dscHasRequiredProps"); - const dsc = getDynamicSamplingContextFromSpan(spans[0]); - const dsn = client && client.getDsn(); - const tunnel = client && client.getOptions().tunnel; - const headers = { - sent_at: (/* @__PURE__ */ new Date()).toISOString(), - ...dscHasRequiredProps(dsc) && { trace: dsc }, - ...!!tunnel && dsn && { dsn: dsnToString(dsn) } - }; - const beforeSendSpan = client && client.getOptions().beforeSendSpan; - const convertToSpanJSON = beforeSendSpan ? (span) => { - const spanJson = beforeSendSpan(spanToJSON(span)); - if (!spanJson) { - showSpanDropWarning(); - } - return spanJson; - } : (span) => spanToJSON(span); - const items2 = []; - for (const span of spans) { - const spanJson = convertToSpanJSON(span); - if (spanJson) { - items2.push(createSpanEnvelopeItem(spanJson)); - } - } - return createEnvelope(headers, items2); -} -__name(createSpanEnvelope, "createSpanEnvelope"); -function setMeasurement(name2, value4, unit, activeSpan = getActiveSpan()) { - const rootSpan = activeSpan && getRootSpan(activeSpan); - if (rootSpan) { - DEBUG_BUILD$6 && logger$2.log(`[Measurement] Setting measurement on root span: ${name2} = ${value4} ${unit}`); - rootSpan.addEvent(name2, { - [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: value4, - [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: unit - }); - } -} -__name(setMeasurement, "setMeasurement"); -function timedEventsToMeasurements(events2) { - if (!events2 || events2.length === 0) { - return void 0; - } - const measurements = {}; - events2.forEach((event) => { - const attributes = event.attributes || {}; - const unit = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]; - const value4 = attributes[SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]; - if (typeof unit === "string" && typeof value4 === "number") { - measurements[event.name] = { value: value4, unit }; - } - }); - return measurements; -} -__name(timedEventsToMeasurements, "timedEventsToMeasurements"); -const MAX_SPAN_COUNT = 1e3; -class SentrySpan { - static { - __name(this, "SentrySpan"); - } - /** Epoch timestamp in seconds when the span started. */ - /** Epoch timestamp in seconds when the span ended. */ - /** Internal keeper of the status */ - /** The timed events added to this span. */ - /** if true, treat span as a standalone span (not part of a transaction) */ - /** - * You should never call the constructor manually, always use `Sentry.startSpan()` - * or other span methods. - * @internal - * @hideconstructor - * @hidden - */ - constructor(spanContext = {}) { - this._traceId = spanContext.traceId || generateTraceId(); - this._spanId = spanContext.spanId || generateSpanId(); - this._startTime = spanContext.startTimestamp || timestampInSeconds(); - this._attributes = {}; - this.setAttributes({ - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "manual", - [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op, - ...spanContext.attributes - }); - this._name = spanContext.name; - if (spanContext.parentSpanId) { - this._parentSpanId = spanContext.parentSpanId; - } - if ("sampled" in spanContext) { - this._sampled = spanContext.sampled; - } - if (spanContext.endTimestamp) { - this._endTime = spanContext.endTimestamp; - } - this._events = []; - this._isStandaloneSpan = spanContext.isStandalone; - if (this._endTime) { - this._onSpanEnded(); - } - } - /** - * This should generally not be used, - * but it is needed for being compliant with the OTEL Span interface. - * - * @hidden - * @internal - */ - addLink(_link) { - return this; - } - /** - * This should generally not be used, - * but it is needed for being compliant with the OTEL Span interface. - * - * @hidden - * @internal - */ - addLinks(_links) { - return this; - } - /** - * This should generally not be used, - * but it is needed for being compliant with the OTEL Span interface. - * - * @hidden - * @internal - */ - recordException(_exception, _time) { - } - /** @inheritdoc */ - spanContext() { - const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this; - return { - spanId, - traceId, - traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE - }; - } - /** @inheritdoc */ - setAttribute(key, value4) { - if (value4 === void 0) { - delete this._attributes[key]; - } else { - this._attributes[key] = value4; - } - return this; - } - /** @inheritdoc */ - setAttributes(attributes) { - Object.keys(attributes).forEach((key) => this.setAttribute(key, attributes[key])); - return this; - } - /** - * This should generally not be used, - * but we need it for browser tracing where we want to adjust the start time afterwards. - * USE THIS WITH CAUTION! - * - * @hidden - * @internal - */ - updateStartTime(timeInput) { - this._startTime = spanTimeInputToSeconds(timeInput); - } - /** - * @inheritDoc - */ - setStatus(value4) { - this._status = value4; - return this; - } - /** - * @inheritDoc - */ - updateName(name2) { - this._name = name2; - this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, "custom"); - return this; - } - /** @inheritdoc */ - end(endTimestamp) { - if (this._endTime) { - return; - } - this._endTime = spanTimeInputToSeconds(endTimestamp); - logSpanEnd(this); - this._onSpanEnded(); - } - /** - * Get JSON representation of this span. - * - * @hidden - * @internal This method is purely for internal purposes and should not be used outside - * of SDK code. If you need to get a JSON representation of a span, - * use `spanToJSON(span)` instead. - */ - getSpanJSON() { - return dropUndefinedKeys({ - data: this._attributes, - description: this._name, - op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP], - parent_span_id: this._parentSpanId, - span_id: this._spanId, - start_timestamp: this._startTime, - status: getStatusMessage(this._status), - timestamp: this._endTime, - trace_id: this._traceId, - origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], - _metrics_summary: getMetricSummaryJsonForSpan(this), - profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID], - exclusive_time: this._attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME], - measurements: timedEventsToMeasurements(this._events), - is_segment: this._isStandaloneSpan && getRootSpan(this) === this || void 0, - segment_id: this._isStandaloneSpan ? getRootSpan(this).spanContext().spanId : void 0 - }); - } - /** @inheritdoc */ - isRecording() { - return !this._endTime && !!this._sampled; - } - /** - * @inheritdoc - */ - addEvent(name2, attributesOrStartTime, startTime) { - DEBUG_BUILD$6 && logger$2.log("[Tracing] Adding an event to span:", name2); - const time = isSpanTimeInput(attributesOrStartTime) ? attributesOrStartTime : startTime || timestampInSeconds(); - const attributes = isSpanTimeInput(attributesOrStartTime) ? {} : attributesOrStartTime || {}; - const event = { - name: name2, - time: spanTimeInputToSeconds(time), - attributes - }; - this._events.push(event); - return this; - } - /** - * This method should generally not be used, - * but for now we need a way to publicly check if the `_isStandaloneSpan` flag is set. - * USE THIS WITH CAUTION! - * @internal - * @hidden - * @experimental - */ - isStandaloneSpan() { - return !!this._isStandaloneSpan; - } - /** Emit `spanEnd` when the span is ended. */ - _onSpanEnded() { - const client = getClient(); - if (client) { - client.emit("spanEnd", this); - } - const isSegmentSpan = this._isStandaloneSpan || this === getRootSpan(this); - if (!isSegmentSpan) { - return; - } - if (this._isStandaloneSpan) { - if (this._sampled) { - sendSpanEnvelope(createSpanEnvelope([this], client)); - } else { - DEBUG_BUILD$6 && logger$2.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."); - if (client) { - client.recordDroppedEvent("sample_rate", "span"); - } - } - return; - } - const transactionEvent = this._convertSpanToTransaction(); - if (transactionEvent) { - const scope = getCapturedScopesOnSpan(this).scope || getCurrentScope$1(); - scope.captureEvent(transactionEvent); - } - } - /** - * Finish the transaction & prepare the event to send to Sentry. - */ - _convertSpanToTransaction() { - if (!isFullFinishedSpan(spanToJSON(this))) { - return void 0; - } - if (!this._name) { - DEBUG_BUILD$6 && logger$2.warn("Transaction has no name, falling back to ``."); - this._name = ""; - } - const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this); - const scope = capturedSpanScope || getCurrentScope$1(); - const client = scope.getClient() || getClient(); - if (this._sampled !== true) { - DEBUG_BUILD$6 && logger$2.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."); - if (client) { - client.recordDroppedEvent("sample_rate", "transaction"); - } - return void 0; - } - const finishedSpans = getSpanDescendants(this).filter((span) => span !== this && !isStandaloneSpan(span)); - const spans = finishedSpans.map((span) => spanToJSON(span)).filter(isFullFinishedSpan); - const source = this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; - delete this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]; - spans.forEach((span) => { - span.data && delete span.data[SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]; - }); - const transaction = { - contexts: { - trace: spanToTransactionTraceContext(this) - }, - spans: ( - // spans.sort() mutates the array, but `spans` is already a copy so we can safely do this here - // we do not use spans anymore after this point - spans.length > MAX_SPAN_COUNT ? spans.sort((a2, b2) => a2.start_timestamp - b2.start_timestamp).slice(0, MAX_SPAN_COUNT) : spans - ), - start_timestamp: this._startTime, - timestamp: this._endTime, - transaction: this._name, - type: "transaction", - sdkProcessingMetadata: { - capturedSpanScope, - capturedSpanIsolationScope, - ...dropUndefinedKeys({ - dynamicSamplingContext: getDynamicSamplingContextFromSpan(this) - }) - }, - _metrics_summary: getMetricSummaryJsonForSpan(this), - ...source && { - transaction_info: { - source - } - } - }; - const measurements = timedEventsToMeasurements(this._events); - const hasMeasurements = measurements && Object.keys(measurements).length; - if (hasMeasurements) { - DEBUG_BUILD$6 && logger$2.log( - "[Measurements] Adding measurements to transaction event", - JSON.stringify(measurements, void 0, 2) - ); - transaction.measurements = measurements; - } - return transaction; - } -} -function isSpanTimeInput(value4) { - return value4 && typeof value4 === "number" || value4 instanceof Date || Array.isArray(value4); -} -__name(isSpanTimeInput, "isSpanTimeInput"); -function isFullFinishedSpan(input) { - return !!input.start_timestamp && !!input.timestamp && !!input.span_id && !!input.trace_id; -} -__name(isFullFinishedSpan, "isFullFinishedSpan"); -function isStandaloneSpan(span) { - return span instanceof SentrySpan && span.isStandaloneSpan(); -} -__name(isStandaloneSpan, "isStandaloneSpan"); -function sendSpanEnvelope(envelope) { - const client = getClient(); - if (!client) { - return; - } - const spanItems = envelope[1]; - if (!spanItems || spanItems.length === 0) { - client.recordDroppedEvent("before_send", "span"); - return; - } - client.sendEnvelope(envelope); -} -__name(sendSpanEnvelope, "sendSpanEnvelope"); -const SUPPRESS_TRACING_KEY = "__SENTRY_SUPPRESS_TRACING__"; -function startSpan(options4, callback) { - const acs = getAcs(); - if (acs.startSpan) { - return acs.startSpan(options4, callback); - } - const spanArguments = parseSentrySpanArguments(options4); - const { forceTransaction, parentSpan: customParentSpan } = options4; - return withScope(options4.scope, () => { - const wrapper = getActiveSpanWrapper(customParentSpan); - return wrapper(() => { - const scope = getCurrentScope$1(); - const parentSpan = getParentSpan(scope); - const shouldSkipSpan = options4.onlyIfParent && !parentSpan; - const activeSpan = shouldSkipSpan ? new SentryNonRecordingSpan() : createChildOrRootSpan({ - parentSpan, - spanArguments, - forceTransaction, - scope - }); - _setSpanForScope(scope, activeSpan); - return handleCallbackErrors( - () => callback(activeSpan), - () => { - const { status } = spanToJSON(activeSpan); - if (activeSpan.isRecording() && (!status || status === "ok")) { - activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" }); - } - }, - () => activeSpan.end() - ); - }); - }); -} -__name(startSpan, "startSpan"); -function startSpanManual(options4, callback) { - const acs = getAcs(); - if (acs.startSpanManual) { - return acs.startSpanManual(options4, callback); - } - const spanArguments = parseSentrySpanArguments(options4); - const { forceTransaction, parentSpan: customParentSpan } = options4; - return withScope(options4.scope, () => { - const wrapper = getActiveSpanWrapper(customParentSpan); - return wrapper(() => { - const scope = getCurrentScope$1(); - const parentSpan = getParentSpan(scope); - const shouldSkipSpan = options4.onlyIfParent && !parentSpan; - const activeSpan = shouldSkipSpan ? new SentryNonRecordingSpan() : createChildOrRootSpan({ - parentSpan, - spanArguments, - forceTransaction, - scope - }); - _setSpanForScope(scope, activeSpan); - function finishAndSetSpan() { - activeSpan.end(); - } - __name(finishAndSetSpan, "finishAndSetSpan"); - return handleCallbackErrors( - () => callback(activeSpan, finishAndSetSpan), - () => { - const { status } = spanToJSON(activeSpan); - if (activeSpan.isRecording() && (!status || status === "ok")) { - activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" }); - } - } - ); - }); - }); -} -__name(startSpanManual, "startSpanManual"); -function startInactiveSpan(options4) { - const acs = getAcs(); - if (acs.startInactiveSpan) { - return acs.startInactiveSpan(options4); - } - const spanArguments = parseSentrySpanArguments(options4); - const { forceTransaction, parentSpan: customParentSpan } = options4; - const wrapper = options4.scope ? (callback) => withScope(options4.scope, callback) : customParentSpan !== void 0 ? (callback) => withActiveSpan(customParentSpan, callback) : (callback) => callback(); - return wrapper(() => { - const scope = getCurrentScope$1(); - const parentSpan = getParentSpan(scope); - const shouldSkipSpan = options4.onlyIfParent && !parentSpan; - if (shouldSkipSpan) { - return new SentryNonRecordingSpan(); - } - return createChildOrRootSpan({ - parentSpan, - spanArguments, - forceTransaction, - scope - }); - }); -} -__name(startInactiveSpan, "startInactiveSpan"); -const continueTrace = /* @__PURE__ */ __name((options4, callback) => { - const carrier = getMainCarrier(); - const acs = getAsyncContextStrategy(carrier); - if (acs.continueTrace) { - return acs.continueTrace(options4, callback); - } - const { sentryTrace, baggage } = options4; - return withScope((scope) => { - const propagationContext = propagationContextFromHeaders(sentryTrace, baggage); - scope.setPropagationContext(propagationContext); - return callback(); - }); -}, "continueTrace"); -function withActiveSpan(span, callback) { - const acs = getAcs(); - if (acs.withActiveSpan) { - return acs.withActiveSpan(span, callback); - } - return withScope((scope) => { - _setSpanForScope(scope, span || void 0); - return callback(scope); - }); -} -__name(withActiveSpan, "withActiveSpan"); -function suppressTracing(callback) { - const acs = getAcs(); - if (acs.suppressTracing) { - return acs.suppressTracing(callback); - } - return withScope((scope) => { - scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true }); - return callback(); - }); -} -__name(suppressTracing, "suppressTracing"); -function startNewTrace(callback) { - return withScope((scope) => { - scope.setPropagationContext({ traceId: generateTraceId() }); - DEBUG_BUILD$6 && logger$2.info(`Starting a new trace with id ${scope.getPropagationContext().traceId}`); - return withActiveSpan(null, callback); - }); -} -__name(startNewTrace, "startNewTrace"); -function createChildOrRootSpan({ - parentSpan, - spanArguments, - forceTransaction, - scope -}) { - if (!hasTracingEnabled()) { - return new SentryNonRecordingSpan(); - } - const isolationScope = getIsolationScope(); - let span; - if (parentSpan && !forceTransaction) { - span = _startChildSpan(parentSpan, scope, spanArguments); - addChildSpanToSpan(parentSpan, span); - } else if (parentSpan) { - const dsc = getDynamicSamplingContextFromSpan(parentSpan); - const { traceId, spanId: parentSpanId } = parentSpan.spanContext(); - const parentSampled = spanIsSampled(parentSpan); - span = _startRootSpan( - { - traceId, - parentSpanId, - ...spanArguments - }, - scope, - parentSampled - ); - freezeDscOnSpan(span, dsc); - } else { - const { - traceId, - dsc, - parentSpanId, - sampled: parentSampled - } = { - ...isolationScope.getPropagationContext(), - ...scope.getPropagationContext() - }; - span = _startRootSpan( - { - traceId, - parentSpanId, - ...spanArguments - }, - scope, - parentSampled - ); - if (dsc) { - freezeDscOnSpan(span, dsc); - } - } - logSpanStart(span); - setCapturedScopesOnSpan(span, scope, isolationScope); - return span; -} -__name(createChildOrRootSpan, "createChildOrRootSpan"); -function parseSentrySpanArguments(options4) { - const exp = options4.experimental || {}; - const initialCtx = { - isStandalone: exp.standalone, - ...options4 - }; - if (options4.startTime) { - const ctx = { ...initialCtx }; - ctx.startTimestamp = spanTimeInputToSeconds(options4.startTime); - delete ctx.startTime; - return ctx; - } - return initialCtx; -} -__name(parseSentrySpanArguments, "parseSentrySpanArguments"); -function getAcs() { - const carrier = getMainCarrier(); - return getAsyncContextStrategy(carrier); -} -__name(getAcs, "getAcs"); -function _startRootSpan(spanArguments, scope, parentSampled) { - const client = getClient(); - const options4 = client && client.getOptions() || {}; - const { name: name2 = "", attributes } = spanArguments; - const [sampled, sampleRate] = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? [false] : sampleSpan(options4, { - name: name2, - parentSampled, - attributes, - transactionContext: { - name: name2, - parentSampled - } - }); - const rootSpan = new SentrySpan({ - ...spanArguments, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "custom", - ...spanArguments.attributes - }, - sampled - }); - if (sampleRate !== void 0) { - rootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate); - } - if (client) { - client.emit("spanStart", rootSpan); - } - return rootSpan; -} -__name(_startRootSpan, "_startRootSpan"); -function _startChildSpan(parentSpan, scope, spanArguments) { - const { spanId, traceId } = parentSpan.spanContext(); - const sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? false : spanIsSampled(parentSpan); - const childSpan = sampled ? new SentrySpan({ - ...spanArguments, - parentSpanId: spanId, - traceId, - sampled - }) : new SentryNonRecordingSpan({ traceId }); - addChildSpanToSpan(parentSpan, childSpan); - const client = getClient(); - if (client) { - client.emit("spanStart", childSpan); - if (spanArguments.endTimestamp) { - client.emit("spanEnd", childSpan); - } - } - return childSpan; -} -__name(_startChildSpan, "_startChildSpan"); -function getParentSpan(scope) { - const span = _getSpanForScope(scope); - if (!span) { - return void 0; - } - const client = getClient(); - const options4 = client ? client.getOptions() : {}; - if (options4.parentSpanIsAlwaysRootSpan) { - return getRootSpan(span); - } - return span; -} -__name(getParentSpan, "getParentSpan"); -function getActiveSpanWrapper(parentSpan) { - return parentSpan !== void 0 ? (callback) => { - return withActiveSpan(parentSpan, callback); - } : (callback) => callback(); -} -__name(getActiveSpanWrapper, "getActiveSpanWrapper"); -const TRACING_DEFAULTS = { - idleTimeout: 1e3, - finalTimeout: 3e4, - childSpanTimeout: 15e3 -}; -const FINISH_REASON_HEARTBEAT_FAILED = "heartbeatFailed"; -const FINISH_REASON_IDLE_TIMEOUT = "idleTimeout"; -const FINISH_REASON_FINAL_TIMEOUT = "finalTimeout"; -const FINISH_REASON_EXTERNAL_FINISH = "externalFinish"; -function startIdleSpan(startSpanOptions, options4 = {}) { - const activities = /* @__PURE__ */ new Map(); - let _finished = false; - let _idleTimeoutID; - let _finishReason = FINISH_REASON_EXTERNAL_FINISH; - let _autoFinishAllowed = !options4.disableAutoFinish; - const _cleanupHooks = []; - const { - idleTimeout = TRACING_DEFAULTS.idleTimeout, - finalTimeout = TRACING_DEFAULTS.finalTimeout, - childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout, - beforeSpanEnd - } = options4; - const client = getClient(); - if (!client || !hasTracingEnabled()) { - return new SentryNonRecordingSpan(); - } - const scope = getCurrentScope$1(); - const previousActiveSpan = getActiveSpan(); - const span = _startIdleSpan(startSpanOptions); - span.end = new Proxy(span.end, { - apply(target, thisArg, args) { - if (beforeSpanEnd) { - beforeSpanEnd(span); - } - const [definedEndTimestamp, ...rest] = args; - const timestamp2 = definedEndTimestamp || timestampInSeconds(); - const spanEndTimestamp = spanTimeInputToSeconds(timestamp2); - const spans = getSpanDescendants(span).filter((child) => child !== span); - if (!spans.length) { - onIdleSpanEnded(spanEndTimestamp); - return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]); - } - const childEndTimestamps = spans.map((span2) => spanToJSON(span2).timestamp).filter((timestamp3) => !!timestamp3); - const latestSpanEndTimestamp = childEndTimestamps.length ? Math.max(...childEndTimestamps) : void 0; - const spanStartTimestamp = spanToJSON(span).start_timestamp; - const endTimestamp = Math.min( - spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1e3 : Infinity, - Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)) - ); - onIdleSpanEnded(endTimestamp); - return Reflect.apply(target, thisArg, [endTimestamp, ...rest]); - } - }); - function _cancelIdleTimeout() { - if (_idleTimeoutID) { - clearTimeout(_idleTimeoutID); - _idleTimeoutID = void 0; - } - } - __name(_cancelIdleTimeout, "_cancelIdleTimeout"); - function _restartIdleTimeout(endTimestamp) { - _cancelIdleTimeout(); - _idleTimeoutID = setTimeout(() => { - if (!_finished && activities.size === 0 && _autoFinishAllowed) { - _finishReason = FINISH_REASON_IDLE_TIMEOUT; - span.end(endTimestamp); - } - }, idleTimeout); - } - __name(_restartIdleTimeout, "_restartIdleTimeout"); - function _restartChildSpanTimeout(endTimestamp) { - _idleTimeoutID = setTimeout(() => { - if (!_finished && _autoFinishAllowed) { - _finishReason = FINISH_REASON_HEARTBEAT_FAILED; - span.end(endTimestamp); - } - }, childSpanTimeout); - } - __name(_restartChildSpanTimeout, "_restartChildSpanTimeout"); - function _pushActivity(spanId) { - _cancelIdleTimeout(); - activities.set(spanId, true); - const endTimestamp = timestampInSeconds(); - _restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1e3); - } - __name(_pushActivity, "_pushActivity"); - function _popActivity(spanId) { - if (activities.has(spanId)) { - activities.delete(spanId); - } - if (activities.size === 0) { - const endTimestamp = timestampInSeconds(); - _restartIdleTimeout(endTimestamp + idleTimeout / 1e3); - } - } - __name(_popActivity, "_popActivity"); - function onIdleSpanEnded(endTimestamp) { - _finished = true; - activities.clear(); - _cleanupHooks.forEach((cleanup) => cleanup()); - _setSpanForScope(scope, previousActiveSpan); - const spanJSON = spanToJSON(span); - const { start_timestamp: startTimestamp } = spanJSON; - if (!startTimestamp) { - return; - } - const attributes = spanJSON.data || {}; - if (!attributes[SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]) { - span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason); - } - logger$2.log(`[Tracing] Idle span "${spanJSON.op}" finished`); - const childSpans = getSpanDescendants(span).filter((child) => child !== span); - let discardedSpans = 0; - childSpans.forEach((childSpan) => { - if (childSpan.isRecording()) { - childSpan.setStatus({ code: SPAN_STATUS_ERROR, message: "cancelled" }); - childSpan.end(endTimestamp); - DEBUG_BUILD$6 && logger$2.log("[Tracing] Cancelling span since span ended early", JSON.stringify(childSpan, void 0, 2)); - } - const childSpanJSON = spanToJSON(childSpan); - const { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON; - const spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp; - const timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1e3; - const spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError; - if (DEBUG_BUILD$6) { - const stringifiedSpan = JSON.stringify(childSpan, void 0, 2); - if (!spanStartedBeforeIdleSpanEnd) { - logger$2.log("[Tracing] Discarding span since it happened after idle span was finished", stringifiedSpan); - } else if (!spanEndedBeforeFinalTimeout) { - logger$2.log("[Tracing] Discarding span since it finished after idle span final timeout", stringifiedSpan); - } - } - if (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) { - removeChildSpanFromSpan(span, childSpan); - discardedSpans++; - } - }); - if (discardedSpans > 0) { - span.setAttribute("sentry.idle_span_discarded_spans", discardedSpans); - } - } - __name(onIdleSpanEnded, "onIdleSpanEnded"); - _cleanupHooks.push( - client.on("spanStart", (startedSpan) => { - if (_finished || startedSpan === span || !!spanToJSON(startedSpan).timestamp) { - return; - } - const allSpans = getSpanDescendants(span); - if (allSpans.includes(startedSpan)) { - _pushActivity(startedSpan.spanContext().spanId); - } - }) - ); - _cleanupHooks.push( - client.on("spanEnd", (endedSpan) => { - if (_finished) { - return; - } - _popActivity(endedSpan.spanContext().spanId); - }) - ); - _cleanupHooks.push( - client.on("idleSpanEnableAutoFinish", (spanToAllowAutoFinish) => { - if (spanToAllowAutoFinish === span) { - _autoFinishAllowed = true; - _restartIdleTimeout(); - if (activities.size) { - _restartChildSpanTimeout(); - } - } - }) - ); - if (!options4.disableAutoFinish) { - _restartIdleTimeout(); - } - setTimeout(() => { - if (!_finished) { - span.setStatus({ code: SPAN_STATUS_ERROR, message: "deadline_exceeded" }); - _finishReason = FINISH_REASON_FINAL_TIMEOUT; - span.end(); - } - }, finalTimeout); - return span; -} -__name(startIdleSpan, "startIdleSpan"); -function _startIdleSpan(options4) { - const span = startInactiveSpan(options4); - _setSpanForScope(getCurrentScope$1(), span); - DEBUG_BUILD$6 && logger$2.log("[Tracing] Started span is an idle span"); - return span; -} -__name(_startIdleSpan, "_startIdleSpan"); -function notifyEventProcessors(processors, event, hint, index2 = 0) { - return new SyncPromise((resolve2, reject3) => { - const processor = processors[index2]; - if (event === null || typeof processor !== "function") { - resolve2(event); - } else { - const result = processor({ ...event }, hint); - DEBUG_BUILD$6 && processor.id && result === null && logger$2.log(`Event processor "${processor.id}" dropped event`); - if (isThenable$1(result)) { - void result.then((final) => notifyEventProcessors(processors, final, hint, index2 + 1).then(resolve2)).then(null, reject3); - } else { - void notifyEventProcessors(processors, result, hint, index2 + 1).then(resolve2).then(null, reject3); - } - } - }); -} -__name(notifyEventProcessors, "notifyEventProcessors"); -let parsedStackResults; -let lastKeysCount; -let cachedFilenameDebugIds; -function getFilenameToDebugIdMap(stackParser) { - const debugIdMap = GLOBAL_OBJ._sentryDebugIds; - if (!debugIdMap) { - return {}; - } - const debugIdKeys = Object.keys(debugIdMap); - if (cachedFilenameDebugIds && debugIdKeys.length === lastKeysCount) { - return cachedFilenameDebugIds; - } - lastKeysCount = debugIdKeys.length; - cachedFilenameDebugIds = debugIdKeys.reduce((acc, stackKey) => { - if (!parsedStackResults) { - parsedStackResults = {}; - } - const result = parsedStackResults[stackKey]; - if (result) { - acc[result[0]] = result[1]; - } else { - const parsedStack = stackParser(stackKey); - for (let i2 = parsedStack.length - 1; i2 >= 0; i2--) { - const stackFrame = parsedStack[i2]; - const filename = stackFrame && stackFrame.filename; - const debugId = debugIdMap[stackKey]; - if (filename && debugId) { - acc[filename] = debugId; - parsedStackResults[stackKey] = [filename, debugId]; - break; - } - } - } - return acc; - }, {}); - return cachedFilenameDebugIds; -} -__name(getFilenameToDebugIdMap, "getFilenameToDebugIdMap"); -function getDebugImagesForResources(stackParser, resource_paths) { - const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser); - if (!filenameDebugIdMap) { - return []; - } - const images = []; - for (const path of resource_paths) { - if (path && filenameDebugIdMap[path]) { - images.push({ - type: "sourcemap", - code_file: path, - debug_id: filenameDebugIdMap[path] - }); - } - } - return images; -} -__name(getDebugImagesForResources, "getDebugImagesForResources"); -function applyScopeDataToEvent(event, data25) { - const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data25; - applyDataToEvent(event, data25); - if (span) { - applySpanToEvent(event, span); - } - applyFingerprintToEvent(event, fingerprint); - applyBreadcrumbsToEvent(event, breadcrumbs); - applySdkMetadataToEvent(event, sdkProcessingMetadata); -} -__name(applyScopeDataToEvent, "applyScopeDataToEvent"); -function mergeScopeData(data25, mergeData) { - const { - extra, - tags, - user, - contexts, - level, - sdkProcessingMetadata, - breadcrumbs, - fingerprint, - eventProcessors, - attachments, - propagationContext, - transactionName, - span - } = mergeData; - mergeAndOverwriteScopeData(data25, "extra", extra); - mergeAndOverwriteScopeData(data25, "tags", tags); - mergeAndOverwriteScopeData(data25, "user", user); - mergeAndOverwriteScopeData(data25, "contexts", contexts); - data25.sdkProcessingMetadata = merge$1(data25.sdkProcessingMetadata, sdkProcessingMetadata, 2); - if (level) { - data25.level = level; - } - if (transactionName) { - data25.transactionName = transactionName; - } - if (span) { - data25.span = span; - } - if (breadcrumbs.length) { - data25.breadcrumbs = [...data25.breadcrumbs, ...breadcrumbs]; - } - if (fingerprint.length) { - data25.fingerprint = [...data25.fingerprint, ...fingerprint]; - } - if (eventProcessors.length) { - data25.eventProcessors = [...data25.eventProcessors, ...eventProcessors]; - } - if (attachments.length) { - data25.attachments = [...data25.attachments, ...attachments]; - } - data25.propagationContext = { ...data25.propagationContext, ...propagationContext }; -} -__name(mergeScopeData, "mergeScopeData"); -function mergeAndOverwriteScopeData(data25, prop2, mergeVal) { - data25[prop2] = merge$1(data25[prop2], mergeVal, 1); -} -__name(mergeAndOverwriteScopeData, "mergeAndOverwriteScopeData"); -function applyDataToEvent(event, data25) { - const { extra, tags, user, contexts, level, transactionName } = data25; - const cleanedExtra = dropUndefinedKeys(extra); - if (cleanedExtra && Object.keys(cleanedExtra).length) { - event.extra = { ...cleanedExtra, ...event.extra }; - } - const cleanedTags = dropUndefinedKeys(tags); - if (cleanedTags && Object.keys(cleanedTags).length) { - event.tags = { ...cleanedTags, ...event.tags }; - } - const cleanedUser = dropUndefinedKeys(user); - if (cleanedUser && Object.keys(cleanedUser).length) { - event.user = { ...cleanedUser, ...event.user }; - } - const cleanedContexts = dropUndefinedKeys(contexts); - if (cleanedContexts && Object.keys(cleanedContexts).length) { - event.contexts = { ...cleanedContexts, ...event.contexts }; - } - if (level) { - event.level = level; - } - if (transactionName && event.type !== "transaction") { - event.transaction = transactionName; - } -} -__name(applyDataToEvent, "applyDataToEvent"); -function applyBreadcrumbsToEvent(event, breadcrumbs) { - const mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs]; - event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : void 0; -} -__name(applyBreadcrumbsToEvent, "applyBreadcrumbsToEvent"); -function applySdkMetadataToEvent(event, sdkProcessingMetadata) { - event.sdkProcessingMetadata = { - ...event.sdkProcessingMetadata, - ...sdkProcessingMetadata - }; -} -__name(applySdkMetadataToEvent, "applySdkMetadataToEvent"); -function applySpanToEvent(event, span) { - event.contexts = { - trace: spanToTraceContext(span), - ...event.contexts - }; - event.sdkProcessingMetadata = { - dynamicSamplingContext: getDynamicSamplingContextFromSpan(span), - ...event.sdkProcessingMetadata - }; - const rootSpan = getRootSpan(span); - const transactionName = spanToJSON(rootSpan).description; - if (transactionName && !event.transaction && event.type === "transaction") { - event.transaction = transactionName; - } -} -__name(applySpanToEvent, "applySpanToEvent"); -function applyFingerprintToEvent(event, fingerprint) { - event.fingerprint = event.fingerprint ? Array.isArray(event.fingerprint) ? event.fingerprint : [event.fingerprint] : []; - if (fingerprint) { - event.fingerprint = event.fingerprint.concat(fingerprint); - } - if (event.fingerprint && !event.fingerprint.length) { - delete event.fingerprint; - } -} -__name(applyFingerprintToEvent, "applyFingerprintToEvent"); -function prepareEvent(options4, event, hint, scope, client, isolationScope) { - const { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options4; - const prepared = { - ...event, - event_id: event.event_id || hint.event_id || uuid4(), - timestamp: event.timestamp || dateTimestampInSeconds() - }; - const integrations = hint.integrations || options4.integrations.map((i2) => i2.name); - applyClientOptions(prepared, options4); - applyIntegrationsMetadata(prepared, integrations); - if (client) { - client.emit("applyFrameMetadata", event); - } - if (event.type === void 0) { - applyDebugIds(prepared, options4.stackParser); - } - const finalScope = getFinalScope(scope, hint.captureContext); - if (hint.mechanism) { - addExceptionMechanism(prepared, hint.mechanism); - } - const clientEventProcessors = client ? client.getEventProcessors() : []; - const data25 = getGlobalScope().getScopeData(); - if (isolationScope) { - const isolationData = isolationScope.getScopeData(); - mergeScopeData(data25, isolationData); - } - if (finalScope) { - const finalScopeData = finalScope.getScopeData(); - mergeScopeData(data25, finalScopeData); - } - const attachments = [...hint.attachments || [], ...data25.attachments]; - if (attachments.length) { - hint.attachments = attachments; - } - applyScopeDataToEvent(prepared, data25); - const eventProcessors = [ - ...clientEventProcessors, - // Run scope event processors _after_ all other processors - ...data25.eventProcessors - ]; - const result = notifyEventProcessors(eventProcessors, prepared, hint); - return result.then((evt) => { - if (evt) { - applyDebugMeta(evt); - } - if (typeof normalizeDepth === "number" && normalizeDepth > 0) { - return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth); - } - return evt; - }); -} -__name(prepareEvent, "prepareEvent"); -function applyClientOptions(event, options4) { - const { environment, release, dist: dist3, maxValueLength = 250 } = options4; - event.environment = event.environment || environment || DEFAULT_ENVIRONMENT; - if (!event.release && release) { - event.release = release; - } - if (!event.dist && dist3) { - event.dist = dist3; - } - if (event.message) { - event.message = truncate(event.message, maxValueLength); - } - const exception = event.exception && event.exception.values && event.exception.values[0]; - if (exception && exception.value) { - exception.value = truncate(exception.value, maxValueLength); - } - const request = event.request; - if (request && request.url) { - request.url = truncate(request.url, maxValueLength); - } -} -__name(applyClientOptions, "applyClientOptions"); -function applyDebugIds(event, stackParser) { - const filenameDebugIdMap = getFilenameToDebugIdMap(stackParser); - try { - event.exception.values.forEach((exception) => { - exception.stacktrace.frames.forEach((frame) => { - if (filenameDebugIdMap && frame.filename) { - frame.debug_id = filenameDebugIdMap[frame.filename]; - } - }); - }); - } catch (e2) { - } -} -__name(applyDebugIds, "applyDebugIds"); -function applyDebugMeta(event) { - const filenameDebugIdMap = {}; - try { - event.exception.values.forEach((exception) => { - exception.stacktrace.frames.forEach((frame) => { - if (frame.debug_id) { - if (frame.abs_path) { - filenameDebugIdMap[frame.abs_path] = frame.debug_id; - } else if (frame.filename) { - filenameDebugIdMap[frame.filename] = frame.debug_id; - } - delete frame.debug_id; - } - }); - }); - } catch (e2) { - } - if (Object.keys(filenameDebugIdMap).length === 0) { - return; - } - event.debug_meta = event.debug_meta || {}; - event.debug_meta.images = event.debug_meta.images || []; - const images = event.debug_meta.images; - Object.entries(filenameDebugIdMap).forEach(([filename, debug_id]) => { - images.push({ - type: "sourcemap", - code_file: filename, - debug_id - }); - }); -} -__name(applyDebugMeta, "applyDebugMeta"); -function applyIntegrationsMetadata(event, integrationNames) { - if (integrationNames.length > 0) { - event.sdk = event.sdk || {}; - event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames]; - } -} -__name(applyIntegrationsMetadata, "applyIntegrationsMetadata"); -function normalizeEvent(event, depth, maxBreadth) { - if (!event) { - return null; - } - const normalized = { - ...event, - ...event.breadcrumbs && { - breadcrumbs: event.breadcrumbs.map((b2) => ({ - ...b2, - ...b2.data && { - data: normalize$2(b2.data, depth, maxBreadth) - } - })) - }, - ...event.user && { - user: normalize$2(event.user, depth, maxBreadth) - }, - ...event.contexts && { - contexts: normalize$2(event.contexts, depth, maxBreadth) - }, - ...event.extra && { - extra: normalize$2(event.extra, depth, maxBreadth) - } - }; - if (event.contexts && event.contexts.trace && normalized.contexts) { - normalized.contexts.trace = event.contexts.trace; - if (event.contexts.trace.data) { - normalized.contexts.trace.data = normalize$2(event.contexts.trace.data, depth, maxBreadth); - } - } - if (event.spans) { - normalized.spans = event.spans.map((span) => { - return { - ...span, - ...span.data && { - data: normalize$2(span.data, depth, maxBreadth) - } - }; - }); - } - if (event.contexts && event.contexts.flags && normalized.contexts) { - normalized.contexts.flags = normalize$2(event.contexts.flags, 3, maxBreadth); - } - return normalized; -} -__name(normalizeEvent, "normalizeEvent"); -function getFinalScope(scope, captureContext) { - if (!captureContext) { - return scope; - } - const finalScope = scope ? scope.clone() : new Scope(); - finalScope.update(captureContext); - return finalScope; -} -__name(getFinalScope, "getFinalScope"); -function parseEventHintOrCaptureContext(hint) { - if (!hint) { - return void 0; - } - if (hintIsScopeOrFunction(hint)) { - return { captureContext: hint }; - } - if (hintIsScopeContext(hint)) { - return { - captureContext: hint - }; - } - return hint; -} -__name(parseEventHintOrCaptureContext, "parseEventHintOrCaptureContext"); -function hintIsScopeOrFunction(hint) { - return hint instanceof Scope || typeof hint === "function"; -} -__name(hintIsScopeOrFunction, "hintIsScopeOrFunction"); -const captureContextKeys = [ - "user", - "level", - "extra", - "contexts", - "tags", - "fingerprint", - "requestSession", - "propagationContext" -]; -function hintIsScopeContext(hint) { - return Object.keys(hint).some((key) => captureContextKeys.includes(key)); -} -__name(hintIsScopeContext, "hintIsScopeContext"); -function captureException(exception, hint) { - return getCurrentScope$1().captureException(exception, parseEventHintOrCaptureContext(hint)); -} -__name(captureException, "captureException"); -function captureMessage(message3, captureContext) { - const level = typeof captureContext === "string" ? captureContext : void 0; - const context = typeof captureContext !== "string" ? { captureContext } : void 0; - return getCurrentScope$1().captureMessage(message3, level, context); -} -__name(captureMessage, "captureMessage"); -function captureEvent(event, hint) { - return getCurrentScope$1().captureEvent(event, hint); -} -__name(captureEvent, "captureEvent"); -function setContext(name2, context) { - getIsolationScope().setContext(name2, context); -} -__name(setContext, "setContext"); -function setExtras(extras) { - getIsolationScope().setExtras(extras); -} -__name(setExtras, "setExtras"); -function setExtra(key, extra) { - getIsolationScope().setExtra(key, extra); -} -__name(setExtra, "setExtra"); -function setTags(tags) { - getIsolationScope().setTags(tags); -} -__name(setTags, "setTags"); -function setTag$5(key, value4) { - getIsolationScope().setTag(key, value4); -} -__name(setTag$5, "setTag$5"); -function setUser(user) { - getIsolationScope().setUser(user); -} -__name(setUser, "setUser"); -function lastEventId() { - return getIsolationScope().lastEventId(); -} -__name(lastEventId, "lastEventId"); -function captureCheckIn(checkIn, upsertMonitorConfig) { - const scope = getCurrentScope$1(); - const client = getClient(); - if (!client) { - DEBUG_BUILD$6 && logger$2.warn("Cannot capture check-in. No client defined."); - } else if (!client.captureCheckIn) { - DEBUG_BUILD$6 && logger$2.warn("Cannot capture check-in. Client does not support sending check-ins."); - } else { - return client.captureCheckIn(checkIn, upsertMonitorConfig, scope); - } - return uuid4(); -} -__name(captureCheckIn, "captureCheckIn"); -function withMonitor(monitorSlug, callback, upsertMonitorConfig) { - const checkInId = captureCheckIn({ monitorSlug, status: "in_progress" }, upsertMonitorConfig); - const now2 = timestampInSeconds(); - function finishCheckIn(status) { - captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now2 }); - } - __name(finishCheckIn, "finishCheckIn"); - return withIsolationScope(() => { - let maybePromiseResult; - try { - maybePromiseResult = callback(); - } catch (e2) { - finishCheckIn("error"); - throw e2; - } - if (isThenable$1(maybePromiseResult)) { - Promise.resolve(maybePromiseResult).then( - () => { - finishCheckIn("ok"); - }, - (e2) => { - finishCheckIn("error"); - throw e2; - } - ); - } else { - finishCheckIn("ok"); - } - return maybePromiseResult; - }); -} -__name(withMonitor, "withMonitor"); -async function flush(timeout) { - const client = getClient(); - if (client) { - return client.flush(timeout); - } - DEBUG_BUILD$6 && logger$2.warn("Cannot flush events. No client defined."); - return Promise.resolve(false); -} -__name(flush, "flush"); -async function close$1(timeout) { - const client = getClient(); - if (client) { - return client.close(timeout); - } - DEBUG_BUILD$6 && logger$2.warn("Cannot flush events and disable SDK. No client defined."); - return Promise.resolve(false); -} -__name(close$1, "close$1"); -function isInitialized() { - return !!getClient(); -} -__name(isInitialized, "isInitialized"); -function isEnabled() { - const client = getClient(); - return !!client && client.getOptions().enabled !== false && !!client.getTransport(); -} -__name(isEnabled, "isEnabled"); -function addEventProcessor(callback) { - getIsolationScope().addEventProcessor(callback); -} -__name(addEventProcessor, "addEventProcessor"); -function startSession(context) { - const client = getClient(); - const isolationScope = getIsolationScope(); - const currentScope = getCurrentScope$1(); - const { release, environment = DEFAULT_ENVIRONMENT } = client && client.getOptions() || {}; - const { userAgent } = GLOBAL_OBJ.navigator || {}; - const session = makeSession$1({ - release, - environment, - user: currentScope.getUser() || isolationScope.getUser(), - ...userAgent && { userAgent }, - ...context - }); - const currentSession = isolationScope.getSession(); - if (currentSession && currentSession.status === "ok") { - updateSession(currentSession, { status: "exited" }); - } - endSession(); - isolationScope.setSession(session); - currentScope.setSession(session); - return session; -} -__name(startSession, "startSession"); -function endSession() { - const isolationScope = getIsolationScope(); - const currentScope = getCurrentScope$1(); - const session = currentScope.getSession() || isolationScope.getSession(); - if (session) { - closeSession(session); - } - _sendSessionUpdate$1(); - isolationScope.setSession(); - currentScope.setSession(); -} -__name(endSession, "endSession"); -function _sendSessionUpdate$1() { - const isolationScope = getIsolationScope(); - const currentScope = getCurrentScope$1(); - const client = getClient(); - const session = currentScope.getSession() || isolationScope.getSession(); - if (session && client) { - client.captureSession(session); - } -} -__name(_sendSessionUpdate$1, "_sendSessionUpdate$1"); -function captureSession(end = false) { - if (end) { - endSession(); - return; - } - _sendSessionUpdate$1(); -} -__name(captureSession, "captureSession"); -class SessionFlusher { - static { - __name(this, "SessionFlusher"); - } - // We adjust the type here to add the `unref()` part, as setInterval can technically return a number or a NodeJS.Timer - constructor(client, attrs4) { - this._client = client; - this.flushTimeout = 60; - this._pendingAggregates = /* @__PURE__ */ new Map(); - this._isEnabled = true; - this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3); - if (this._intervalId.unref) { - this._intervalId.unref(); - } - this._sessionAttrs = attrs4; - } - /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ - flush() { - const sessionAggregates = this.getSessionAggregates(); - if (sessionAggregates.aggregates.length === 0) { - return; - } - this._pendingAggregates = /* @__PURE__ */ new Map(); - this._client.sendSession(sessionAggregates); - } - /** Massages the entries in `pendingAggregates` and returns aggregated sessions */ - getSessionAggregates() { - const aggregates = Array.from(this._pendingAggregates.values()); - const sessionAggregates = { - attrs: this._sessionAttrs, - aggregates - }; - return dropUndefinedKeys(sessionAggregates); - } - /** JSDoc */ - close() { - clearInterval(this._intervalId); - this._isEnabled = false; - this.flush(); - } - /** - * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then - * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to - * `_incrementSessionStatusCount` along with the start date - */ - incrementSessionStatusCount() { - if (!this._isEnabled) { - return; - } - const isolationScope = getIsolationScope(); - const requestSession = isolationScope.getRequestSession(); - if (requestSession && requestSession.status) { - this._incrementSessionStatusCount(requestSession.status, /* @__PURE__ */ new Date()); - isolationScope.setRequestSession(void 0); - } - } - /** - * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of - * the session received - */ - // eslint-disable-next-line deprecation/deprecation - _incrementSessionStatusCount(status, date) { - const sessionStartedTrunc = new Date(date).setSeconds(0, 0); - let aggregationCounts = this._pendingAggregates.get(sessionStartedTrunc); - if (!aggregationCounts) { - aggregationCounts = { started: new Date(sessionStartedTrunc).toISOString() }; - this._pendingAggregates.set(sessionStartedTrunc, aggregationCounts); - } - switch (status) { - case "errored": - aggregationCounts.errored = (aggregationCounts.errored || 0) + 1; - return aggregationCounts.errored; - case "ok": - aggregationCounts.exited = (aggregationCounts.exited || 0) + 1; - return aggregationCounts.exited; - default: - aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1; - return aggregationCounts.crashed; - } - } -} -const SENTRY_API_VERSION = "7"; -function getBaseApiEndpoint(dsn) { - const protocol = dsn.protocol ? `${dsn.protocol}:` : ""; - const port = dsn.port ? `:${dsn.port}` : ""; - return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ""}/api/`; -} -__name(getBaseApiEndpoint, "getBaseApiEndpoint"); -function _getIngestEndpoint(dsn) { - return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; -} -__name(_getIngestEndpoint, "_getIngestEndpoint"); -function _encodedAuth(dsn, sdkInfo) { - const params = { - sentry_version: SENTRY_API_VERSION - }; - if (dsn.publicKey) { - params.sentry_key = dsn.publicKey; - } - if (sdkInfo) { - params.sentry_client = `${sdkInfo.name}/${sdkInfo.version}`; - } - return new URLSearchParams(params).toString(); -} -__name(_encodedAuth, "_encodedAuth"); -function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel, sdkInfo) { - return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; -} -__name(getEnvelopeEndpointWithUrlEncodedAuth, "getEnvelopeEndpointWithUrlEncodedAuth"); -function getReportDialogEndpoint(dsnLike, dialogOptions) { - const dsn = makeDsn(dsnLike); - if (!dsn) { - return ""; - } - const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`; - let encodedOptions = `dsn=${dsnToString(dsn)}`; - for (const key in dialogOptions) { - if (key === "dsn") { - continue; - } - if (key === "onClose") { - continue; - } - if (key === "user") { - const user = dialogOptions.user; - if (!user) { - continue; - } - if (user.name) { - encodedOptions += `&name=${encodeURIComponent(user.name)}`; - } - if (user.email) { - encodedOptions += `&email=${encodeURIComponent(user.email)}`; - } - } else { - encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key])}`; - } - } - return `${endpoint}?${encodedOptions}`; -} -__name(getReportDialogEndpoint, "getReportDialogEndpoint"); -const installedIntegrations = []; -function filterDuplicates(integrations) { - const integrationsByName = {}; - integrations.forEach((currentInstance2) => { - const { name: name2 } = currentInstance2; - const existingInstance = integrationsByName[name2]; - if (existingInstance && !existingInstance.isDefaultInstance && currentInstance2.isDefaultInstance) { - return; - } - integrationsByName[name2] = currentInstance2; - }); - return Object.values(integrationsByName); -} -__name(filterDuplicates, "filterDuplicates"); -function getIntegrationsToSetup(options4) { - const defaultIntegrations = options4.defaultIntegrations || []; - const userIntegrations = options4.integrations; - defaultIntegrations.forEach((integration) => { - integration.isDefaultInstance = true; - }); - let integrations; - if (Array.isArray(userIntegrations)) { - integrations = [...defaultIntegrations, ...userIntegrations]; - } else if (typeof userIntegrations === "function") { - const resolvedUserIntegrations = userIntegrations(defaultIntegrations); - integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations]; - } else { - integrations = defaultIntegrations; - } - const finalIntegrations = filterDuplicates(integrations); - const debugIndex = finalIntegrations.findIndex((integration) => integration.name === "Debug"); - if (debugIndex > -1) { - const [debugInstance] = finalIntegrations.splice(debugIndex, 1); - finalIntegrations.push(debugInstance); - } - return finalIntegrations; -} -__name(getIntegrationsToSetup, "getIntegrationsToSetup"); -function setupIntegrations(client, integrations) { - const integrationIndex = {}; - integrations.forEach((integration) => { - if (integration) { - setupIntegration(client, integration, integrationIndex); - } - }); - return integrationIndex; -} -__name(setupIntegrations, "setupIntegrations"); -function afterSetupIntegrations(client, integrations) { - for (const integration of integrations) { - if (integration && integration.afterAllSetup) { - integration.afterAllSetup(client); - } - } -} -__name(afterSetupIntegrations, "afterSetupIntegrations"); -function setupIntegration(client, integration, integrationIndex) { - if (integrationIndex[integration.name]) { - DEBUG_BUILD$6 && logger$2.log(`Integration skipped because it was already installed: ${integration.name}`); - return; - } - integrationIndex[integration.name] = integration; - if (installedIntegrations.indexOf(integration.name) === -1 && typeof integration.setupOnce === "function") { - integration.setupOnce(); - installedIntegrations.push(integration.name); - } - if (integration.setup && typeof integration.setup === "function") { - integration.setup(client); - } - if (typeof integration.preprocessEvent === "function") { - const callback = integration.preprocessEvent.bind(integration); - client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); - } - if (typeof integration.processEvent === "function") { - const callback = integration.processEvent.bind(integration); - const processor = Object.assign((event, hint) => callback(event, hint, client), { - id: integration.name - }); - client.addEventProcessor(processor); - } - DEBUG_BUILD$6 && logger$2.log(`Integration installed: ${integration.name}`); -} -__name(setupIntegration, "setupIntegration"); -function addIntegration(integration) { - const client = getClient(); - if (!client) { - DEBUG_BUILD$6 && logger$2.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`); - return; - } - client.addIntegration(integration); -} -__name(addIntegration, "addIntegration"); -function defineIntegration(fn) { - return fn; -} -__name(defineIntegration, "defineIntegration"); -function createClientReportEnvelope(discarded_events, dsn, timestamp2) { - const clientReportItem = [ - { type: "client_report" }, - { - timestamp: timestamp2 || dateTimestampInSeconds(), - discarded_events - } - ]; - return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]); -} -__name(createClientReportEnvelope, "createClientReportEnvelope"); -class SentryError extends Error { - static { - __name(this, "SentryError"); - } - /** Display name of this error instance. */ - constructor(message3, logLevel = "warn") { - super(message3); - this.message = message3; - this.name = new.target.prototype.constructor.name; - Object.setPrototypeOf(this, new.target.prototype); - this.logLevel = logLevel; - } -} -const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured."; -class BaseClient { - static { - __name(this, "BaseClient"); - } - /** Options passed to the SDK. */ - /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ - /** Array of set up integrations. */ - /** Number of calls being processed */ - /** Holds flushable */ - // eslint-disable-next-line @typescript-eslint/ban-types - /** - * Initializes this client instance. - * - * @param options Options for the client. - */ - constructor(options4) { - this._options = options4; - this._integrations = {}; - this._numProcessing = 0; - this._outcomes = {}; - this._hooks = {}; - this._eventProcessors = []; - if (options4.dsn) { - this._dsn = makeDsn(options4.dsn); - } else { - DEBUG_BUILD$6 && logger$2.warn("No DSN provided, client will not send events."); - } - if (this._dsn) { - const url = getEnvelopeEndpointWithUrlEncodedAuth( - this._dsn, - options4.tunnel, - options4._metadata ? options4._metadata.sdk : void 0 - ); - this._transport = options4.transport({ - tunnel: this._options.tunnel, - recordDroppedEvent: this.recordDroppedEvent.bind(this), - ...options4.transportOptions, - url - }); - } - const tracingOptions = ["enableTracing", "tracesSampleRate", "tracesSampler"]; - const undefinedOption = tracingOptions.find((option3) => option3 in options4 && options4[option3] == void 0); - if (undefinedOption) { - consoleSandbox(() => { - console.warn( - `[Sentry] Deprecation warning: \`${undefinedOption}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.` - ); - }); - } - } - /** - * @inheritDoc - */ - captureException(exception, hint, scope) { - const eventId = uuid4(); - if (checkOrSetAlreadyCaught(exception)) { - DEBUG_BUILD$6 && logger$2.log(ALREADY_SEEN_ERROR); - return eventId; - } - const hintWithEventId = { - event_id: eventId, - ...hint - }; - this._process( - this.eventFromException(exception, hintWithEventId).then( - (event) => this._captureEvent(event, hintWithEventId, scope) - ) - ); - return hintWithEventId.event_id; - } - /** - * @inheritDoc - */ - captureMessage(message3, level, hint, currentScope) { - const hintWithEventId = { - event_id: uuid4(), - ...hint - }; - const eventMessage = isParameterizedString(message3) ? message3 : String(message3); - const promisedEvent = isPrimitive(message3) ? this.eventFromMessage(eventMessage, level, hintWithEventId) : this.eventFromException(message3, hintWithEventId); - this._process(promisedEvent.then((event) => this._captureEvent(event, hintWithEventId, currentScope))); - return hintWithEventId.event_id; - } - /** - * @inheritDoc - */ - captureEvent(event, hint, currentScope) { - const eventId = uuid4(); - if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) { - DEBUG_BUILD$6 && logger$2.log(ALREADY_SEEN_ERROR); - return eventId; - } - const hintWithEventId = { - event_id: eventId, - ...hint - }; - const sdkProcessingMetadata = event.sdkProcessingMetadata || {}; - const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope; - this._process(this._captureEvent(event, hintWithEventId, capturedSpanScope || currentScope)); - return hintWithEventId.event_id; - } - /** - * @inheritDoc - */ - captureSession(session) { - if (!(typeof session.release === "string")) { - DEBUG_BUILD$6 && logger$2.warn("Discarded session because of missing or non-string release"); - } else { - this.sendSession(session); - updateSession(session, { init: false }); - } - } - /** - * @inheritDoc - */ - getDsn() { - return this._dsn; - } - /** - * @inheritDoc - */ - getOptions() { - return this._options; - } - /** - * @see SdkMetadata - * - * @return The metadata of the SDK - */ - getSdkMetadata() { - return this._options._metadata; - } - /** - * @inheritDoc - */ - getTransport() { - return this._transport; - } - /** - * @inheritDoc - */ - flush(timeout) { - const transport = this._transport; - if (transport) { - this.emit("flush"); - return this._isClientDoneProcessing(timeout).then((clientFinished) => { - return transport.flush(timeout).then((transportFlushed) => clientFinished && transportFlushed); - }); - } else { - return resolvedSyncPromise(true); - } - } - /** - * @inheritDoc - */ - close(timeout) { - return this.flush(timeout).then((result) => { - this.getOptions().enabled = false; - this.emit("close"); - return result; - }); - } - /** Get all installed event processors. */ - getEventProcessors() { - return this._eventProcessors; - } - /** @inheritDoc */ - addEventProcessor(eventProcessor) { - this._eventProcessors.push(eventProcessor); - } - /** @inheritdoc */ - init() { - if (this._isEnabled() || // Force integrations to be setup even if no DSN was set when we have - // Spotlight enabled. This is particularly important for browser as we - // don't support the `spotlight` option there and rely on the users - // adding the `spotlightBrowserIntegration()` to their integrations which - // wouldn't get initialized with the check below when there's no DSN set. - this._options.integrations.some(({ name: name2 }) => name2.startsWith("Spotlight"))) { - this._setupIntegrations(); - } - } - /** - * Gets an installed integration by its name. - * - * @returns The installed integration or `undefined` if no integration with that `name` was installed. - */ - getIntegrationByName(integrationName) { - return this._integrations[integrationName]; - } - /** - * @inheritDoc - */ - addIntegration(integration) { - const isAlreadyInstalled = this._integrations[integration.name]; - setupIntegration(this, integration, this._integrations); - if (!isAlreadyInstalled) { - afterSetupIntegrations(this, [integration]); - } - } - /** - * @inheritDoc - */ - sendEvent(event, hint = {}) { - this.emit("beforeSendEvent", event, hint); - let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); - for (const attachment of hint.attachments || []) { - env = addItemToEnvelope(env, createAttachmentEnvelopeItem(attachment)); - } - const promise = this.sendEnvelope(env); - if (promise) { - promise.then((sendResponse) => this.emit("afterSendEvent", event, sendResponse), null); - } - } - /** - * @inheritDoc - */ - sendSession(session) { - const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel); - this.sendEnvelope(env); - } - /** - * @inheritDoc - */ - recordDroppedEvent(reason, category, eventOrCount) { - if (this._options.sendClientReports) { - const count = typeof eventOrCount === "number" ? eventOrCount : 1; - const key = `${reason}:${category}`; - DEBUG_BUILD$6 && logger$2.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` : ""}`); - this._outcomes[key] = (this._outcomes[key] || 0) + count; - } - } - // Keep on() & emit() signatures in sync with types' client.ts interface - /* eslint-disable @typescript-eslint/unified-signatures */ - /** @inheritdoc */ - /** @inheritdoc */ - on(hook, callback) { - const hooks2 = this._hooks[hook] = this._hooks[hook] || []; - hooks2.push(callback); - return () => { - const cbIndex = hooks2.indexOf(callback); - if (cbIndex > -1) { - hooks2.splice(cbIndex, 1); - } - }; - } - /** @inheritdoc */ - /** @inheritdoc */ - emit(hook, ...rest) { - const callbacks = this._hooks[hook]; - if (callbacks) { - callbacks.forEach((callback) => callback(...rest)); - } - } - /** - * @inheritdoc - */ - sendEnvelope(envelope) { - this.emit("beforeEnvelope", envelope); - if (this._isEnabled() && this._transport) { - return this._transport.send(envelope).then(null, (reason) => { - DEBUG_BUILD$6 && logger$2.error("Error while sending envelope:", reason); - return reason; - }); - } - DEBUG_BUILD$6 && logger$2.error("Transport disabled"); - return resolvedSyncPromise({}); - } - /* eslint-enable @typescript-eslint/unified-signatures */ - /** Setup integrations for this client. */ - _setupIntegrations() { - const { integrations } = this._options; - this._integrations = setupIntegrations(this, integrations); - afterSetupIntegrations(this, integrations); - } - /** Updates existing session based on the provided event */ - _updateSessionFromEvent(session, event) { - let crashed = false; - let errored = false; - const exceptions = event.exception && event.exception.values; - if (exceptions) { - errored = true; - for (const ex of exceptions) { - const mechanism = ex.mechanism; - if (mechanism && mechanism.handled === false) { - crashed = true; - break; - } - } - } - const sessionNonTerminal = session.status === "ok"; - const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed; - if (shouldUpdateAndSend) { - updateSession(session, { - ...crashed && { status: "crashed" }, - errors: session.errors || Number(errored || crashed) - }); - this.captureSession(session); - } - } - /** - * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying - * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. - * - * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not - * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to - * `true`. - * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and - * `false` otherwise - */ - _isClientDoneProcessing(timeout) { - return new SyncPromise((resolve2) => { - let ticked = 0; - const tick = 1; - const interval = setInterval(() => { - if (this._numProcessing == 0) { - clearInterval(interval); - resolve2(true); - } else { - ticked += tick; - if (timeout && ticked >= timeout) { - clearInterval(interval); - resolve2(false); - } - } - }, tick); - }); - } - /** Determines whether this SDK is enabled and a transport is present. */ - _isEnabled() { - return this.getOptions().enabled !== false && this._transport !== void 0; - } - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional information about the original exception. - * @param currentScope A scope containing event metadata. - * @returns A new event with more information. - */ - _prepareEvent(event, hint, currentScope = getCurrentScope$1(), isolationScope = getIsolationScope()) { - const options4 = this.getOptions(); - const integrations = Object.keys(this._integrations); - if (!hint.integrations && integrations.length > 0) { - hint.integrations = integrations; - } - this.emit("preprocessEvent", event, hint); - if (!event.type) { - isolationScope.setLastEventId(event.event_id || hint.event_id); - } - return prepareEvent(options4, event, hint, currentScope, this, isolationScope).then((evt) => { - if (evt === null) { - return evt; - } - evt.contexts = { - trace: getTraceContextFromScope(currentScope), - ...evt.contexts - }; - const dynamicSamplingContext = getDynamicSamplingContextFromScope(this, currentScope); - evt.sdkProcessingMetadata = { - dynamicSamplingContext, - ...evt.sdkProcessingMetadata - }; - return evt; - }); - } - /** - * Processes the event and logs an error in case of rejection - * @param event - * @param hint - * @param scope - */ - _captureEvent(event, hint = {}, scope) { - return this._processEvent(event, hint, scope).then( - (finalEvent) => { - return finalEvent.event_id; - }, - (reason) => { - if (DEBUG_BUILD$6) { - const sentryError = reason; - if (sentryError.logLevel === "log") { - logger$2.log(sentryError.message); - } else { - logger$2.warn(sentryError); - } - } - return void 0; - } - ); - } - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional information about the original exception. - * @param currentScope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - _processEvent(event, hint, currentScope) { - const options4 = this.getOptions(); - const { sampleRate } = options4; - const isTransaction = isTransactionEvent$1(event); - const isError2 = isErrorEvent$1(event); - const eventType = event.type || "error"; - const beforeSendLabel = `before send for type \`${eventType}\``; - const parsedSampleRate = typeof sampleRate === "undefined" ? void 0 : parseSampleRate(sampleRate); - if (isError2 && typeof parsedSampleRate === "number" && Math.random() > parsedSampleRate) { - this.recordDroppedEvent("sample_rate", "error", event); - return rejectedSyncPromise( - new SentryError( - `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, - "log" - ) - ); - } - const dataCategory = eventType === "replay_event" ? "replay" : eventType; - const sdkProcessingMetadata = event.sdkProcessingMetadata || {}; - const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope; - return this._prepareEvent(event, hint, currentScope, capturedSpanIsolationScope).then((prepared) => { - if (prepared === null) { - this.recordDroppedEvent("event_processor", dataCategory, event); - throw new SentryError("An event processor returned `null`, will not send event.", "log"); - } - const isInternalException = hint.data && hint.data.__sentry__ === true; - if (isInternalException) { - return prepared; - } - const result = processBeforeSend(this, options4, prepared, hint); - return _validateBeforeSendResult(result, beforeSendLabel); - }).then((processedEvent) => { - if (processedEvent === null) { - this.recordDroppedEvent("before_send", dataCategory, event); - if (isTransaction) { - const spans = event.spans || []; - const spanCount = 1 + spans.length; - this.recordDroppedEvent("before_send", "span", spanCount); - } - throw new SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, "log"); - } - const session = currentScope && currentScope.getSession(); - if (!isTransaction && session) { - this._updateSessionFromEvent(session, processedEvent); - } - if (isTransaction) { - const spanCountBefore = processedEvent.sdkProcessingMetadata && processedEvent.sdkProcessingMetadata.spanCountBeforeProcessing || 0; - const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0; - const droppedSpanCount = spanCountBefore - spanCountAfter; - if (droppedSpanCount > 0) { - this.recordDroppedEvent("before_send", "span", droppedSpanCount); - } - } - const transactionInfo = processedEvent.transaction_info; - if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { - const source = "custom"; - processedEvent.transaction_info = { - ...transactionInfo, - source - }; - } - this.sendEvent(processedEvent, hint); - return processedEvent; - }).then(null, (reason) => { - if (reason instanceof SentryError) { - throw reason; - } - this.captureException(reason, { - data: { - __sentry__: true - }, - originalException: reason - }); - throw new SentryError( - `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${reason}` - ); - }); - } - /** - * Occupies the client with processing and event - */ - _process(promise) { - this._numProcessing++; - void promise.then( - (value4) => { - this._numProcessing--; - return value4; - }, - (reason) => { - this._numProcessing--; - return reason; - } - ); - } - /** - * Clears outcomes on this client and returns them. - */ - _clearOutcomes() { - const outcomes = this._outcomes; - this._outcomes = {}; - return Object.entries(outcomes).map(([key, quantity]) => { - const [reason, category] = key.split(":"); - return { - reason, - category, - quantity - }; - }); - } - /** - * Sends client reports as an envelope. - */ - _flushOutcomes() { - DEBUG_BUILD$6 && logger$2.log("Flushing outcomes..."); - const outcomes = this._clearOutcomes(); - if (outcomes.length === 0) { - DEBUG_BUILD$6 && logger$2.log("No outcomes to send"); - return; - } - if (!this._dsn) { - DEBUG_BUILD$6 && logger$2.log("No dsn provided, will not send outcomes"); - return; - } - DEBUG_BUILD$6 && logger$2.log("Sending outcomes:", outcomes); - const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn)); - this.sendEnvelope(envelope); - } - /** - * @inheritDoc - */ -} -function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) { - const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; - if (isThenable$1(beforeSendResult)) { - return beforeSendResult.then( - (event) => { - if (!isPlainObject$5(event) && event !== null) { - throw new SentryError(invalidValueError); - } - return event; - }, - (e2) => { - throw new SentryError(`${beforeSendLabel} rejected with ${e2}`); - } - ); - } else if (!isPlainObject$5(beforeSendResult) && beforeSendResult !== null) { - throw new SentryError(invalidValueError); - } - return beforeSendResult; -} -__name(_validateBeforeSendResult, "_validateBeforeSendResult"); -function processBeforeSend(client, options4, event, hint) { - const { beforeSend, beforeSendTransaction, beforeSendSpan } = options4; - if (isErrorEvent$1(event) && beforeSend) { - return beforeSend(event, hint); - } - if (isTransactionEvent$1(event)) { - if (event.spans && beforeSendSpan) { - const processedSpans = []; - for (const span of event.spans) { - const processedSpan = beforeSendSpan(span); - if (processedSpan) { - processedSpans.push(processedSpan); - } else { - showSpanDropWarning(); - client.recordDroppedEvent("before_send", "span"); - } - } - event.spans = processedSpans; - } - if (beforeSendTransaction) { - if (event.spans) { - const spanCountBefore = event.spans.length; - event.sdkProcessingMetadata = { - ...event.sdkProcessingMetadata, - spanCountBeforeProcessing: spanCountBefore - }; - } - return beforeSendTransaction(event, hint); - } - } - return event; -} -__name(processBeforeSend, "processBeforeSend"); -function isErrorEvent$1(event) { - return event.type === void 0; -} -__name(isErrorEvent$1, "isErrorEvent$1"); -function isTransactionEvent$1(event) { - return event.type === "transaction"; -} -__name(isTransactionEvent$1, "isTransactionEvent$1"); -function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel, dsn) { - const headers = { - sent_at: (/* @__PURE__ */ new Date()).toISOString() - }; - if (metadata && metadata.sdk) { - headers.sdk = { - name: metadata.sdk.name, - version: metadata.sdk.version - }; - } - if (!!tunnel && !!dsn) { - headers.dsn = dsnToString(dsn); - } - if (dynamicSamplingContext) { - headers.trace = dropUndefinedKeys(dynamicSamplingContext); - } - const item3 = createCheckInEnvelopeItem(checkIn); - return createEnvelope(headers, [item3]); -} -__name(createCheckInEnvelope, "createCheckInEnvelope"); -function createCheckInEnvelopeItem(checkIn) { - const checkInHeaders = { - type: "check_in" - }; - return [checkInHeaders, checkIn]; -} -__name(createCheckInEnvelopeItem, "createCheckInEnvelopeItem"); -function parseStackFrames$1(stackParser, error2) { - return stackParser(error2.stack || "", 1); -} -__name(parseStackFrames$1, "parseStackFrames$1"); -function exceptionFromError$1(stackParser, error2) { - const exception = { - type: error2.name || error2.constructor.name, - value: error2.message - }; - const frames = parseStackFrames$1(stackParser, error2); - if (frames.length) { - exception.stacktrace = { frames }; - } - return exception; -} -__name(exceptionFromError$1, "exceptionFromError$1"); -function getErrorPropertyFromObject$1(obj) { - for (const prop2 in obj) { - if (Object.prototype.hasOwnProperty.call(obj, prop2)) { - const value4 = obj[prop2]; - if (value4 instanceof Error) { - return value4; - } - } - } - return void 0; -} -__name(getErrorPropertyFromObject$1, "getErrorPropertyFromObject$1"); -function getMessageForObject(exception) { - if ("name" in exception && typeof exception.name === "string") { - let message3 = `'${exception.name}' captured as exception`; - if ("message" in exception && typeof exception.message === "string") { - message3 += ` with message '${exception.message}'`; - } - return message3; - } else if ("message" in exception && typeof exception.message === "string") { - return exception.message; - } - const keys2 = extractExceptionKeysForMessage(exception); - if (isErrorEvent$2(exception)) { - return `Event \`ErrorEvent\` captured as exception with message \`${exception.message}\``; - } - const className = getObjectClassName$1(exception); - return `${className && className !== "Object" ? `'${className}'` : "Object"} captured as exception with keys: ${keys2}`; -} -__name(getMessageForObject, "getMessageForObject"); -function getObjectClassName$1(obj) { - try { - const prototype2 = Object.getPrototypeOf(obj); - return prototype2 ? prototype2.constructor.name : void 0; - } catch (e2) { - } -} -__name(getObjectClassName$1, "getObjectClassName$1"); -function getException(client, mechanism, exception, hint) { - if (isError(exception)) { - return [exception, void 0]; - } - mechanism.synthetic = true; - if (isPlainObject$5(exception)) { - const normalizeDepth = client && client.getOptions().normalizeDepth; - const extras = { ["__serialized__"]: normalizeToSize(exception, normalizeDepth) }; - const errorFromProp = getErrorPropertyFromObject$1(exception); - if (errorFromProp) { - return [errorFromProp, extras]; - } - const message3 = getMessageForObject(exception); - const ex2 = hint && hint.syntheticException || new Error(message3); - ex2.message = message3; - return [ex2, extras]; - } - const ex = hint && hint.syntheticException || new Error(exception); - ex.message = `${exception}`; - return [ex, void 0]; -} -__name(getException, "getException"); -function eventFromUnknownInput$1(client, stackParser, exception, hint) { - const providedMechanism = hint && hint.data && hint.data.mechanism; - const mechanism = providedMechanism || { - handled: true, - type: "generic" - }; - const [ex, extras] = getException(client, mechanism, exception, hint); - const event = { - exception: { - values: [exceptionFromError$1(stackParser, ex)] - } - }; - if (extras) { - event.extra = extras; - } - addExceptionTypeValue(event, void 0, void 0); - addExceptionMechanism(event, mechanism); - return { - ...event, - event_id: hint && hint.event_id - }; -} -__name(eventFromUnknownInput$1, "eventFromUnknownInput$1"); -function eventFromMessage$1(stackParser, message3, level = "info", hint, attachStacktrace) { - const event = { - event_id: hint && hint.event_id, - level - }; - if (attachStacktrace && hint && hint.syntheticException) { - const frames = parseStackFrames$1(stackParser, hint.syntheticException); - if (frames.length) { - event.exception = { - values: [ - { - value: message3, - stacktrace: { frames } - } - ] - }; - addExceptionMechanism(event, { synthetic: true }); - } - } - if (isParameterizedString(message3)) { - const { __sentry_template_string__, __sentry_template_values__ } = message3; - event.logentry = { - message: __sentry_template_string__, - params: __sentry_template_values__ - }; - return event; - } - event.message = message3; - return event; -} -__name(eventFromMessage$1, "eventFromMessage$1"); -class ServerRuntimeClient extends BaseClient { - static { - __name(this, "ServerRuntimeClient"); - } - // eslint-disable-next-line deprecation/deprecation - /** - * Creates a new Edge SDK instance. - * @param options Configuration options for this SDK. - */ - constructor(options4) { - registerSpanErrorInstrumentation(); - super(options4); - } - /** - * @inheritDoc - */ - eventFromException(exception, hint) { - const event = eventFromUnknownInput$1(this, this._options.stackParser, exception, hint); - event.level = "error"; - return resolvedSyncPromise(event); - } - /** - * @inheritDoc - */ - eventFromMessage(message3, level = "info", hint) { - return resolvedSyncPromise( - eventFromMessage$1(this._options.stackParser, message3, level, hint, this._options.attachStacktrace) - ); - } - /** - * @inheritDoc - */ - captureException(exception, hint, scope) { - if (this._options.autoSessionTracking && this._sessionFlusher) { - const requestSession = getIsolationScope().getRequestSession(); - if (requestSession && requestSession.status === "ok") { - requestSession.status = "errored"; - } - } - return super.captureException(exception, hint, scope); - } - /** - * @inheritDoc - */ - captureEvent(event, hint, scope) { - if (this._options.autoSessionTracking && this._sessionFlusher) { - const eventType = event.type || "exception"; - const isException = eventType === "exception" && event.exception && event.exception.values && event.exception.values.length > 0; - if (isException) { - const requestSession = getIsolationScope().getRequestSession(); - if (requestSession && requestSession.status === "ok") { - requestSession.status = "errored"; - } - } - } - return super.captureEvent(event, hint, scope); - } - /** - * - * @inheritdoc - */ - close(timeout) { - if (this._sessionFlusher) { - this._sessionFlusher.close(); - } - return super.close(timeout); - } - /** - * Initializes an instance of SessionFlusher on the client which will aggregate and periodically flush session data. - * - * NOTICE: This method will implicitly create an interval that is periodically called. - * To clean up this resources, call `.close()` when you no longer intend to use the client. - * Not doing so will result in a memory leak. - */ - initSessionFlusher() { - const { release, environment } = this._options; - if (!release) { - DEBUG_BUILD$6 && logger$2.warn("Cannot initialize an instance of SessionFlusher if no release is provided!"); - } else { - this._sessionFlusher = new SessionFlusher(this, { - release, - environment - }); - } - } - /** - * Create a cron monitor check in and send it to Sentry. - * - * @param checkIn An object that describes a check in. - * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want - * to create a monitor automatically when sending a check in. - */ - captureCheckIn(checkIn, monitorConfig, scope) { - const id3 = "checkInId" in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4(); - if (!this._isEnabled()) { - DEBUG_BUILD$6 && logger$2.warn("SDK not enabled, will not capture checkin."); - return id3; - } - const options4 = this.getOptions(); - const { release, environment, tunnel } = options4; - const serializedCheckIn = { - check_in_id: id3, - monitor_slug: checkIn.monitorSlug, - status: checkIn.status, - release, - environment - }; - if ("duration" in checkIn) { - serializedCheckIn.duration = checkIn.duration; - } - if (monitorConfig) { - serializedCheckIn.monitor_config = { - schedule: monitorConfig.schedule, - checkin_margin: monitorConfig.checkinMargin, - max_runtime: monitorConfig.maxRuntime, - timezone: monitorConfig.timezone, - failure_issue_threshold: monitorConfig.failureIssueThreshold, - recovery_threshold: monitorConfig.recoveryThreshold - }; - } - const [dynamicSamplingContext, traceContext] = this._getTraceInfoFromScope(scope); - if (traceContext) { - serializedCheckIn.contexts = { - trace: traceContext - }; - } - const envelope = createCheckInEnvelope( - serializedCheckIn, - dynamicSamplingContext, - this.getSdkMetadata(), - tunnel, - this.getDsn() - ); - DEBUG_BUILD$6 && logger$2.info("Sending checkin:", checkIn.monitorSlug, checkIn.status); - this.sendEnvelope(envelope); - return id3; - } - /** - * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment - * appropriate session aggregates bucket - * - * @deprecated This method should not be used or extended. It's functionality will move into the `httpIntegration` and not be part of any public API. - */ - _captureRequestSession() { - if (!this._sessionFlusher) { - DEBUG_BUILD$6 && logger$2.warn("Discarded request mode session because autoSessionTracking option was disabled"); - } else { - this._sessionFlusher.incrementSessionStatusCount(); - } - } - /** - * @inheritDoc - */ - _prepareEvent(event, hint, scope, isolationScope) { - if (this._options.platform) { - event.platform = event.platform || this._options.platform; - } - if (this._options.runtime) { - event.contexts = { - ...event.contexts, - runtime: (event.contexts || {}).runtime || this._options.runtime - }; - } - if (this._options.serverName) { - event.server_name = event.server_name || this._options.serverName; - } - return super._prepareEvent(event, hint, scope, isolationScope); - } - /** Extract trace information from scope */ - _getTraceInfoFromScope(scope) { - if (!scope) { - return [void 0, void 0]; - } - const span = _getSpanForScope(scope); - const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope); - const dynamicSamplingContext = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(this, scope); - return [dynamicSamplingContext, traceContext]; - } -} -function initAndBind(clientClass, options4) { - if (options4.debug === true) { - if (DEBUG_BUILD$6) { - logger$2.enable(); - } else { - consoleSandbox(() => { - console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."); - }); - } - } - const scope = getCurrentScope$1(); - scope.update(options4.initialScope); - const client = new clientClass(options4); - setCurrentClient(client); - client.init(); - return client; -} -__name(initAndBind, "initAndBind"); -function setCurrentClient(client) { - getCurrentScope$1().setClient(client); -} -__name(setCurrentClient, "setCurrentClient"); -function makePromiseBuffer(limit) { - const buffer2 = []; - function isReady() { - return limit === void 0 || buffer2.length < limit; - } - __name(isReady, "isReady"); - function remove4(task) { - return buffer2.splice(buffer2.indexOf(task), 1)[0] || Promise.resolve(void 0); - } - __name(remove4, "remove"); - function add3(taskProducer) { - if (!isReady()) { - return rejectedSyncPromise(new SentryError("Not adding Promise because buffer limit was reached.")); - } - const task = taskProducer(); - if (buffer2.indexOf(task) === -1) { - buffer2.push(task); - } - void task.then(() => remove4(task)).then( - null, - () => remove4(task).then(null, () => { - }) - ); - return task; - } - __name(add3, "add"); - function drain(timeout) { - return new SyncPromise((resolve2, reject3) => { - let counter = buffer2.length; - if (!counter) { - return resolve2(true); - } - const capturedSetTimeout = setTimeout(() => { - if (timeout && timeout > 0) { - resolve2(false); - } - }, timeout); - buffer2.forEach((item3) => { - void resolvedSyncPromise(item3).then(() => { - if (!--counter) { - clearTimeout(capturedSetTimeout); - resolve2(true); - } - }, reject3); - }); - }); - } - __name(drain, "drain"); - return { - $: buffer2, - add: add3, - drain - }; -} -__name(makePromiseBuffer, "makePromiseBuffer"); -const DEFAULT_RETRY_AFTER = 60 * 1e3; -function parseRetryAfterHeader(header3, now2 = Date.now()) { - const headerDelay = parseInt(`${header3}`, 10); - if (!isNaN(headerDelay)) { - return headerDelay * 1e3; - } - const headerDate = Date.parse(`${header3}`); - if (!isNaN(headerDate)) { - return headerDate - now2; - } - return DEFAULT_RETRY_AFTER; -} -__name(parseRetryAfterHeader, "parseRetryAfterHeader"); -function disabledUntil(limits, dataCategory) { - return limits[dataCategory] || limits.all || 0; -} -__name(disabledUntil, "disabledUntil"); -function isRateLimited(limits, dataCategory, now2 = Date.now()) { - return disabledUntil(limits, dataCategory) > now2; -} -__name(isRateLimited, "isRateLimited"); -function updateRateLimits(limits, { statusCode, headers }, now2 = Date.now()) { - const updatedRateLimits = { - ...limits - }; - const rateLimitHeader = headers && headers["x-sentry-rate-limits"]; - const retryAfterHeader = headers && headers["retry-after"]; - if (rateLimitHeader) { - for (const limit of rateLimitHeader.trim().split(",")) { - const [retryAfter, categories, , , namespaces] = limit.split(":", 5); - const headerDelay = parseInt(retryAfter, 10); - const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1e3; - if (!categories) { - updatedRateLimits.all = now2 + delay; - } else { - for (const category of categories.split(";")) { - if (category === "metric_bucket") { - if (!namespaces || namespaces.split(";").includes("custom")) { - updatedRateLimits[category] = now2 + delay; - } - } else { - updatedRateLimits[category] = now2 + delay; - } - } - } - } - } else if (retryAfterHeader) { - updatedRateLimits.all = now2 + parseRetryAfterHeader(retryAfterHeader, now2); - } else if (statusCode === 429) { - updatedRateLimits.all = now2 + 60 * 1e3; - } - return updatedRateLimits; -} -__name(updateRateLimits, "updateRateLimits"); -const DEFAULT_TRANSPORT_BUFFER_SIZE = 64; -function createTransport(options4, makeRequest, buffer2 = makePromiseBuffer( - options4.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE -)) { - let rateLimits = {}; - const flush2 = /* @__PURE__ */ __name((timeout) => buffer2.drain(timeout), "flush"); - function send(envelope) { - const filteredEnvelopeItems = []; - forEachEnvelopeItem(envelope, (item3, type) => { - const dataCategory = envelopeItemTypeToDataCategory(type); - if (isRateLimited(rateLimits, dataCategory)) { - const event = getEventForEnvelopeItem(item3, type); - options4.recordDroppedEvent("ratelimit_backoff", dataCategory, event); - } else { - filteredEnvelopeItems.push(item3); - } - }); - if (filteredEnvelopeItems.length === 0) { - return resolvedSyncPromise({}); - } - const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems); - const recordEnvelopeLoss = /* @__PURE__ */ __name((reason) => { - forEachEnvelopeItem(filteredEnvelope, (item3, type) => { - const event = getEventForEnvelopeItem(item3, type); - options4.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event); - }); - }, "recordEnvelopeLoss"); - const requestTask = /* @__PURE__ */ __name(() => makeRequest({ body: serializeEnvelope(filteredEnvelope) }).then( - (response) => { - if (response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300)) { - DEBUG_BUILD$6 && logger$2.warn(`Sentry responded with status code ${response.statusCode} to sent event.`); - } - rateLimits = updateRateLimits(rateLimits, response); - return response; - }, - (error2) => { - recordEnvelopeLoss("network_error"); - throw error2; - } - ), "requestTask"); - return buffer2.add(requestTask).then( - (result) => result, - (error2) => { - if (error2 instanceof SentryError) { - DEBUG_BUILD$6 && logger$2.error("Skipped sending event because buffer is full."); - recordEnvelopeLoss("queue_overflow"); - return resolvedSyncPromise({}); - } else { - throw error2; - } - } - ); - } - __name(send, "send"); - return { - send, - flush: flush2 - }; -} -__name(createTransport, "createTransport"); -function getEventForEnvelopeItem(item3, type) { - if (type !== "event" && type !== "transaction") { - return void 0; - } - return Array.isArray(item3) ? item3[1] : void 0; -} -__name(getEventForEnvelopeItem, "getEventForEnvelopeItem"); -const MIN_DELAY = 100; -const START_DELAY = 5e3; -const MAX_DELAY = 36e5; -function makeOfflineTransport(createTransport2) { - function log2(...args) { - DEBUG_BUILD$6 && logger$2.info("[Offline]:", ...args); - } - __name(log2, "log"); - return (options4) => { - const transport = createTransport2(options4); - if (!options4.createStore) { - throw new Error("No `createStore` function was provided"); - } - const store = options4.createStore(options4); - let retryDelay = START_DELAY; - let flushTimer; - function shouldQueue(env, error2, retryDelay2) { - if (envelopeContainsItemType(env, ["client_report"])) { - return false; - } - if (options4.shouldStore) { - return options4.shouldStore(env, error2, retryDelay2); - } - return true; - } - __name(shouldQueue, "shouldQueue"); - function flushIn(delay) { - if (flushTimer) { - clearTimeout(flushTimer); - } - flushTimer = setTimeout(async () => { - flushTimer = void 0; - const found2 = await store.shift(); - if (found2) { - log2("Attempting to send previously queued event"); - found2[0].sent_at = (/* @__PURE__ */ new Date()).toISOString(); - void send(found2, true).catch((e2) => { - log2("Failed to retry sending", e2); - }); - } - }, delay); - if (typeof flushTimer !== "number" && flushTimer.unref) { - flushTimer.unref(); - } - } - __name(flushIn, "flushIn"); - function flushWithBackOff() { - if (flushTimer) { - return; - } - flushIn(retryDelay); - retryDelay = Math.min(retryDelay * 2, MAX_DELAY); - } - __name(flushWithBackOff, "flushWithBackOff"); - async function send(envelope, isRetry = false) { - if (!isRetry && envelopeContainsItemType(envelope, ["replay_event", "replay_recording"])) { - await store.push(envelope); - flushIn(MIN_DELAY); - return {}; - } - try { - const result = await transport.send(envelope); - let delay = MIN_DELAY; - if (result) { - if (result.headers && result.headers["retry-after"]) { - delay = parseRetryAfterHeader(result.headers["retry-after"]); - } else if (result.headers && result.headers["x-sentry-rate-limits"]) { - delay = 6e4; - } else if ((result.statusCode || 0) >= 400) { - return result; - } - } - flushIn(delay); - retryDelay = START_DELAY; - return result; - } catch (e2) { - if (await shouldQueue(envelope, e2, retryDelay)) { - if (isRetry) { - await store.unshift(envelope); - } else { - await store.push(envelope); - } - flushWithBackOff(); - log2("Error sending. Event queued.", e2); - return {}; - } else { - throw e2; - } - } - } - __name(send, "send"); - if (options4.flushAtStartup) { - flushWithBackOff(); - } - return { - send, - flush: /* @__PURE__ */ __name((t2) => transport.flush(t2), "flush") - }; - }; -} -__name(makeOfflineTransport, "makeOfflineTransport"); -function eventFromEnvelope(env, types) { - let event; - forEachEnvelopeItem(env, (item3, type) => { - if (types.includes(type)) { - event = Array.isArray(item3) ? item3[1] : void 0; - } - return !!event; - }); - return event; -} -__name(eventFromEnvelope, "eventFromEnvelope"); -function makeOverrideReleaseTransport(createTransport2, release) { - return (options4) => { - const transport = createTransport2(options4); - return { - ...transport, - send: /* @__PURE__ */ __name(async (envelope) => { - const event = eventFromEnvelope(envelope, ["event", "transaction", "profile", "replay_event"]); - if (event) { - event.release = release; - } - return transport.send(envelope); - }, "send") - }; - }; -} -__name(makeOverrideReleaseTransport, "makeOverrideReleaseTransport"); -function overrideDsn(envelope, dsn) { - return createEnvelope( - dsn ? { - ...envelope[0], - dsn - } : envelope[0], - envelope[1] - ); -} -__name(overrideDsn, "overrideDsn"); -function makeMultiplexedTransport(createTransport2, matcher) { - return (options4) => { - const fallbackTransport = createTransport2(options4); - const otherTransports = /* @__PURE__ */ new Map(); - function getTransport(dsn, release) { - const key = release ? `${dsn}:${release}` : dsn; - let transport = otherTransports.get(key); - if (!transport) { - const validatedDsn = dsnFromString(dsn); - if (!validatedDsn) { - return void 0; - } - const url = getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options4.tunnel); - transport = release ? makeOverrideReleaseTransport(createTransport2, release)({ ...options4, url }) : createTransport2({ ...options4, url }); - otherTransports.set(key, transport); - } - return [dsn, transport]; - } - __name(getTransport, "getTransport"); - async function send(envelope) { - function getEvent(types) { - const eventTypes = types && types.length ? types : ["event"]; - return eventFromEnvelope(envelope, eventTypes); - } - __name(getEvent, "getEvent"); - const transports = matcher({ envelope, getEvent }).map((result) => { - if (typeof result === "string") { - return getTransport(result, void 0); - } else { - return getTransport(result.dsn, result.release); - } - }).filter((t2) => !!t2); - const transportsWithFallback = transports.length ? transports : [["", fallbackTransport]]; - const results = await Promise.all( - transportsWithFallback.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))) - ); - return results[0]; - } - __name(send, "send"); - async function flush2(timeout) { - const allTransports = [...otherTransports.values(), fallbackTransport]; - const results = await Promise.all(allTransports.map((transport) => transport.flush(timeout))); - return results.every((r2) => r2); - } - __name(flush2, "flush"); - return { - send, - flush: flush2 - }; - }; -} -__name(makeMultiplexedTransport, "makeMultiplexedTransport"); -function isSentryRequestUrl(url, client) { - const dsn = client && client.getDsn(); - const tunnel = client && client.getOptions().tunnel; - return checkDsn(url, dsn) || checkTunnel(url, tunnel); -} -__name(isSentryRequestUrl, "isSentryRequestUrl"); -function checkTunnel(url, tunnel) { - if (!tunnel) { - return false; - } - return removeTrailingSlash$1(url) === removeTrailingSlash$1(tunnel); -} -__name(checkTunnel, "checkTunnel"); -function checkDsn(url, dsn) { - return dsn ? url.includes(dsn.host) : false; -} -__name(checkDsn, "checkDsn"); -function removeTrailingSlash$1(str) { - return str[str.length - 1] === "/" ? str.slice(0, -1) : str; -} -__name(removeTrailingSlash$1, "removeTrailingSlash$1"); -function parameterize(strings, ...values) { - const formatted = new String(String.raw(strings, ...values)); - formatted.__sentry_template_string__ = strings.join("\0").replace(/%/g, "%%").replace(/\0/g, "%s"); - formatted.__sentry_template_values__ = values; - return formatted; -} -__name(parameterize, "parameterize"); -function applySdkMetadata(options4, name2, names = [name2], source = "npm") { - const metadata = options4._metadata || {}; - if (!metadata.sdk) { - metadata.sdk = { - name: `sentry.javascript.${name2}`, - packages: names.map((name3) => ({ - name: `${source}:@sentry/${name3}`, - version: SDK_VERSION - })), - version: SDK_VERSION - }; - } - options4._metadata = metadata; -} -__name(applySdkMetadata, "applySdkMetadata"); -function getTraceData(options4 = {}) { - const client = getClient(); - if (!isEnabled() || !client) { - return {}; - } - const carrier = getMainCarrier(); - const acs = getAsyncContextStrategy(carrier); - if (acs.getTraceData) { - return acs.getTraceData(options4); - } - const scope = getCurrentScope$1(); - const span = options4.span || getActiveSpan(); - const sentryTrace = span ? spanToTraceHeader(span) : scopeToTraceHeader(scope); - const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope); - const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc); - const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace); - if (!isValidSentryTraceHeader) { - logger$2.warn("Invalid sentry-trace data. Cannot generate trace data"); - return {}; - } - return { - "sentry-trace": sentryTrace, - baggage - }; -} -__name(getTraceData, "getTraceData"); -function scopeToTraceHeader(scope) { - const { traceId, sampled, spanId } = scope.getPropagationContext(); - return generateSentryTraceHeader(traceId, spanId, sampled); -} -__name(scopeToTraceHeader, "scopeToTraceHeader"); -function getTraceMetaTags() { - return Object.entries(getTraceData()).map(([key, value4]) => ``).join("\n"); -} -__name(getTraceMetaTags, "getTraceMetaTags"); -const DEFAULT_BREADCRUMBS = 100; -function addBreadcrumb(breadcrumb, hint) { - const client = getClient(); - const isolationScope = getIsolationScope(); - if (!client) return; - const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions(); - if (maxBreadcrumbs <= 0) return; - const timestamp2 = dateTimestampInSeconds(); - const mergedBreadcrumb = { timestamp: timestamp2, ...breadcrumb }; - const finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb; - if (finalBreadcrumb === null) return; - if (client.emit) { - client.emit("beforeAddBreadcrumb", finalBreadcrumb, hint); - } - isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs); -} -__name(addBreadcrumb, "addBreadcrumb"); -let originalFunctionToString; -const INTEGRATION_NAME$l = "FunctionToString"; -const SETUP_CLIENTS$1 = /* @__PURE__ */ new WeakMap(); -const _functionToStringIntegration = /* @__PURE__ */ __name(() => { - return { - name: INTEGRATION_NAME$l, - setupOnce() { - originalFunctionToString = Function.prototype.toString; - try { - Function.prototype.toString = function(...args) { - const originalFunction = getOriginalFunction(this); - const context = SETUP_CLIENTS$1.has(getClient()) && originalFunction !== void 0 ? originalFunction : this; - return originalFunctionToString.apply(context, args); - }; - } catch (e2) { - } - }, - setup(client) { - SETUP_CLIENTS$1.set(client, true); - } - }; -}, "_functionToStringIntegration"); -const functionToStringIntegration = defineIntegration(_functionToStringIntegration); -const DEFAULT_IGNORE_ERRORS = [ - /^Script error\.?$/, - /^Javascript error: Script error\.? on line 0$/, - /^ResizeObserver loop completed with undelivered notifications.$/, - // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness. - /^Cannot redefine property: googletag$/, - // This is thrown when google tag manager is used in combination with an ad blocker - "undefined is not an object (evaluating 'a.L')", - // Random error that happens but not actionable or noticeable to end-users. - `can't redefine non-configurable property "solana"`, - // Probably a browser extension or custom browser (Brave) throwing this error - "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", - // Error thrown by GTM, seemingly not affecting end-users - "Can't find variable: _AutofillCallbackHandler", - // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/ - /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/ - // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps -]; -const INTEGRATION_NAME$k = "InboundFilters"; -const _inboundFiltersIntegration = /* @__PURE__ */ __name((options4 = {}) => { - return { - name: INTEGRATION_NAME$k, - processEvent(event, _hint, client) { - const clientOptions = client.getOptions(); - const mergedOptions = _mergeOptions(options4, clientOptions); - return _shouldDropEvent$1(event, mergedOptions) ? null : event; - } - }; -}, "_inboundFiltersIntegration"); -const inboundFiltersIntegration = defineIntegration(_inboundFiltersIntegration); -function _mergeOptions(internalOptions = {}, clientOptions = {}) { - return { - allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []], - denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []], - ignoreErrors: [ - ...internalOptions.ignoreErrors || [], - ...clientOptions.ignoreErrors || [], - ...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS - ], - ignoreTransactions: [...internalOptions.ignoreTransactions || [], ...clientOptions.ignoreTransactions || []], - ignoreInternal: internalOptions.ignoreInternal !== void 0 ? internalOptions.ignoreInternal : true - }; -} -__name(_mergeOptions, "_mergeOptions"); -function _shouldDropEvent$1(event, options4) { - if (options4.ignoreInternal && _isSentryError(event)) { - DEBUG_BUILD$6 && logger$2.warn(`Event dropped due to being internal Sentry Error. -Event: ${getEventDescription(event)}`); - return true; - } - if (_isIgnoredError(event, options4.ignoreErrors)) { - DEBUG_BUILD$6 && logger$2.warn( - `Event dropped due to being matched by \`ignoreErrors\` option. -Event: ${getEventDescription(event)}` - ); - return true; - } - if (_isUselessError(event)) { - DEBUG_BUILD$6 && logger$2.warn( - `Event dropped due to not having an error message, error type or stacktrace. -Event: ${getEventDescription( - event - )}` - ); - return true; - } - if (_isIgnoredTransaction(event, options4.ignoreTransactions)) { - DEBUG_BUILD$6 && logger$2.warn( - `Event dropped due to being matched by \`ignoreTransactions\` option. -Event: ${getEventDescription(event)}` - ); - return true; - } - if (_isDeniedUrl(event, options4.denyUrls)) { - DEBUG_BUILD$6 && logger$2.warn( - `Event dropped due to being matched by \`denyUrls\` option. -Event: ${getEventDescription( - event - )}. -Url: ${_getEventFilterUrl(event)}` - ); - return true; - } - if (!_isAllowedUrl(event, options4.allowUrls)) { - DEBUG_BUILD$6 && logger$2.warn( - `Event dropped due to not being matched by \`allowUrls\` option. -Event: ${getEventDescription( - event - )}. -Url: ${_getEventFilterUrl(event)}` - ); - return true; - } - return false; -} -__name(_shouldDropEvent$1, "_shouldDropEvent$1"); -function _isIgnoredError(event, ignoreErrors) { - if (event.type || !ignoreErrors || !ignoreErrors.length) { - return false; - } - return _getPossibleEventMessages(event).some((message3) => stringMatchesSomePattern(message3, ignoreErrors)); -} -__name(_isIgnoredError, "_isIgnoredError"); -function _isIgnoredTransaction(event, ignoreTransactions) { - if (event.type !== "transaction" || !ignoreTransactions || !ignoreTransactions.length) { - return false; - } - const name2 = event.transaction; - return name2 ? stringMatchesSomePattern(name2, ignoreTransactions) : false; -} -__name(_isIgnoredTransaction, "_isIgnoredTransaction"); -function _isDeniedUrl(event, denyUrls) { - if (!denyUrls || !denyUrls.length) { - return false; - } - const url = _getEventFilterUrl(event); - return !url ? false : stringMatchesSomePattern(url, denyUrls); -} -__name(_isDeniedUrl, "_isDeniedUrl"); -function _isAllowedUrl(event, allowUrls) { - if (!allowUrls || !allowUrls.length) { - return true; - } - const url = _getEventFilterUrl(event); - return !url ? true : stringMatchesSomePattern(url, allowUrls); -} -__name(_isAllowedUrl, "_isAllowedUrl"); -function _getPossibleEventMessages(event) { - const possibleMessages = []; - if (event.message) { - possibleMessages.push(event.message); - } - let lastException; - try { - lastException = event.exception.values[event.exception.values.length - 1]; - } catch (e2) { - } - if (lastException) { - if (lastException.value) { - possibleMessages.push(lastException.value); - if (lastException.type) { - possibleMessages.push(`${lastException.type}: ${lastException.value}`); - } - } - } - return possibleMessages; -} -__name(_getPossibleEventMessages, "_getPossibleEventMessages"); -function _isSentryError(event) { - try { - return event.exception.values[0].type === "SentryError"; - } catch (e2) { - } - return false; -} -__name(_isSentryError, "_isSentryError"); -function _getLastValidUrl(frames = []) { - for (let i2 = frames.length - 1; i2 >= 0; i2--) { - const frame = frames[i2]; - if (frame && frame.filename !== "" && frame.filename !== "[native code]") { - return frame.filename || null; - } - } - return null; -} -__name(_getLastValidUrl, "_getLastValidUrl"); -function _getEventFilterUrl(event) { - try { - let frames; - try { - frames = event.exception.values[0].stacktrace.frames; - } catch (e2) { - } - return frames ? _getLastValidUrl(frames) : null; - } catch (oO) { - DEBUG_BUILD$6 && logger$2.error(`Cannot extract url for event ${getEventDescription(event)}`); - return null; - } -} -__name(_getEventFilterUrl, "_getEventFilterUrl"); -function _isUselessError(event) { - if (event.type) { - return false; - } - if (!event.exception || !event.exception.values || event.exception.values.length === 0) { - return false; - } - return ( - // No top-level message - !event.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value - !event.exception.values.some((value4) => value4.stacktrace || value4.type && value4.type !== "Error" || value4.value) - ); -} -__name(_isUselessError, "_isUselessError"); -function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, maxValueLimit = 250, key, limit, event, hint) { - if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) { - return; - } - const originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0; - if (originalException) { - event.exception.values = truncateAggregateExceptions( - aggregateExceptionsFromError( - exceptionFromErrorImplementation, - parser, - limit, - hint.originalException, - key, - event.exception.values, - originalException, - 0 - ), - maxValueLimit - ); - } -} -__name(applyAggregateErrorsToEvent, "applyAggregateErrorsToEvent"); -function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser, limit, error2, key, prevExceptions, exception, exceptionId) { - if (prevExceptions.length >= limit + 1) { - return prevExceptions; - } - let newExceptions = [...prevExceptions]; - if (isInstanceOf(error2[key], Error)) { - applyExceptionGroupFieldsForParentException(exception, exceptionId); - const newException = exceptionFromErrorImplementation(parser, error2[key]); - const newExceptionId = newExceptions.length; - applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId); - newExceptions = aggregateExceptionsFromError( - exceptionFromErrorImplementation, - parser, - limit, - error2[key], - key, - [newException, ...newExceptions], - newException, - newExceptionId - ); - } - if (Array.isArray(error2.errors)) { - error2.errors.forEach((childError, i2) => { - if (isInstanceOf(childError, Error)) { - applyExceptionGroupFieldsForParentException(exception, exceptionId); - const newException = exceptionFromErrorImplementation(parser, childError); - const newExceptionId = newExceptions.length; - applyExceptionGroupFieldsForChildException(newException, `errors[${i2}]`, newExceptionId, exceptionId); - newExceptions = aggregateExceptionsFromError( - exceptionFromErrorImplementation, - parser, - limit, - childError, - key, - [newException, ...newExceptions], - newException, - newExceptionId - ); - } - }); - } - return newExceptions; -} -__name(aggregateExceptionsFromError, "aggregateExceptionsFromError"); -function applyExceptionGroupFieldsForParentException(exception, exceptionId) { - exception.mechanism = exception.mechanism || { type: "generic", handled: true }; - exception.mechanism = { - ...exception.mechanism, - ...exception.type === "AggregateError" && { is_exception_group: true }, - exception_id: exceptionId - }; -} -__name(applyExceptionGroupFieldsForParentException, "applyExceptionGroupFieldsForParentException"); -function applyExceptionGroupFieldsForChildException(exception, source, exceptionId, parentId) { - exception.mechanism = exception.mechanism || { type: "generic", handled: true }; - exception.mechanism = { - ...exception.mechanism, - type: "chained", - source, - exception_id: exceptionId, - parent_id: parentId - }; -} -__name(applyExceptionGroupFieldsForChildException, "applyExceptionGroupFieldsForChildException"); -function truncateAggregateExceptions(exceptions, maxValueLength) { - return exceptions.map((exception) => { - if (exception.value) { - exception.value = truncate(exception.value, maxValueLength); - } - return exception; - }); -} -__name(truncateAggregateExceptions, "truncateAggregateExceptions"); -const DEFAULT_KEY$1 = "cause"; -const DEFAULT_LIMIT$2 = 5; -const INTEGRATION_NAME$j = "LinkedErrors"; -const _linkedErrorsIntegration$1 = /* @__PURE__ */ __name((options4 = {}) => { - const limit = options4.limit || DEFAULT_LIMIT$2; - const key = options4.key || DEFAULT_KEY$1; - return { - name: INTEGRATION_NAME$j, - preprocessEvent(event, hint, client) { - const options5 = client.getOptions(); - applyAggregateErrorsToEvent( - exceptionFromError$1, - options5.stackParser, - options5.maxValueLength, - key, - limit, - event, - hint - ); - } - }; -}, "_linkedErrorsIntegration$1"); -const linkedErrorsIntegration$1 = defineIntegration(_linkedErrorsIntegration$1); -const filenameMetadataMap = /* @__PURE__ */ new Map(); -const parsedStacks = /* @__PURE__ */ new Set(); -function ensureMetadataStacksAreParsed(parser) { - if (!GLOBAL_OBJ._sentryModuleMetadata) { - return; - } - for (const stack2 of Object.keys(GLOBAL_OBJ._sentryModuleMetadata)) { - const metadata = GLOBAL_OBJ._sentryModuleMetadata[stack2]; - if (parsedStacks.has(stack2)) { - continue; - } - parsedStacks.add(stack2); - const frames = parser(stack2); - for (const frame of frames.reverse()) { - if (frame.filename) { - filenameMetadataMap.set(frame.filename, metadata); - break; - } - } - } -} -__name(ensureMetadataStacksAreParsed, "ensureMetadataStacksAreParsed"); -function getMetadataForUrl(parser, filename) { - ensureMetadataStacksAreParsed(parser); - return filenameMetadataMap.get(filename); -} -__name(getMetadataForUrl, "getMetadataForUrl"); -function addMetadataToStackFrames(parser, event) { - try { - event.exception.values.forEach((exception) => { - if (!exception.stacktrace) { - return; - } - for (const frame of exception.stacktrace.frames || []) { - if (!frame.filename || frame.module_metadata) { - continue; - } - const metadata = getMetadataForUrl(parser, frame.filename); - if (metadata) { - frame.module_metadata = metadata; - } - } - }); - } catch (_2) { - } -} -__name(addMetadataToStackFrames, "addMetadataToStackFrames"); -function stripMetadataFromStackFrames(event) { - try { - event.exception.values.forEach((exception) => { - if (!exception.stacktrace) { - return; - } - for (const frame of exception.stacktrace.frames || []) { - delete frame.module_metadata; - } - }); - } catch (_2) { - } -} -__name(stripMetadataFromStackFrames, "stripMetadataFromStackFrames"); -const moduleMetadataIntegration = defineIntegration(() => { - return { - name: "ModuleMetadata", - setup(client) { - client.on("beforeEnvelope", (envelope) => { - forEachEnvelopeItem(envelope, (item3, type) => { - if (type === "event") { - const event = Array.isArray(item3) ? item3[1] : void 0; - if (event) { - stripMetadataFromStackFrames(event); - item3[1] = event; - } - } - }); - }); - client.on("applyFrameMetadata", (event) => { - if (event.type) { - return; - } - const stackParser = client.getOptions().stackParser; - addMetadataToStackFrames(stackParser, event); - }); - } - }; -}); -function parseCookie(str) { - const obj = {}; - let index2 = 0; - while (index2 < str.length) { - const eqIdx = str.indexOf("=", index2); - if (eqIdx === -1) { - break; - } - let endIdx = str.indexOf(";", index2); - if (endIdx === -1) { - endIdx = str.length; - } else if (endIdx < eqIdx) { - index2 = str.lastIndexOf(";", eqIdx - 1) + 1; - continue; - } - const key = str.slice(index2, eqIdx).trim(); - if (void 0 === obj[key]) { - let val = str.slice(eqIdx + 1, endIdx).trim(); - if (val.charCodeAt(0) === 34) { - val = val.slice(1, -1); - } - try { - obj[key] = val.indexOf("%") !== -1 ? decodeURIComponent(val) : val; - } catch (e2) { - obj[key] = val; - } - } - index2 = endIdx + 1; - } - return obj; -} -__name(parseCookie, "parseCookie"); -function parseUrl$1(url) { - if (!url) { - return {}; - } - const match2 = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); - if (!match2) { - return {}; - } - const query = match2[6] || ""; - const fragment = match2[8] || ""; - return { - host: match2[4], - path: match2[5], - protocol: match2[2], - search: query, - hash: fragment, - relative: match2[5] + query + fragment - // everything minus origin - }; -} -__name(parseUrl$1, "parseUrl$1"); -function stripUrlQueryAndFragment(urlPath) { - return urlPath.split(/[?#]/, 1)[0]; -} -__name(stripUrlQueryAndFragment, "stripUrlQueryAndFragment"); -function getNumberOfUrlSegments(url) { - return url.split(/\\?\//).filter((s2) => s2.length > 0 && s2 !== ",").length; -} -__name(getNumberOfUrlSegments, "getNumberOfUrlSegments"); -function getSanitizedUrlString(url) { - const { protocol, host, path } = url; - const filteredHost = host && host.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || ""; - return `${protocol ? `${protocol}://` : ""}${filteredHost}${path}`; -} -__name(getSanitizedUrlString, "getSanitizedUrlString"); -const ipHeaderNames = [ - "X-Client-IP", - "X-Forwarded-For", - "Fly-Client-IP", - "CF-Connecting-IP", - "Fastly-Client-Ip", - "True-Client-Ip", - "X-Real-IP", - "X-Cluster-Client-IP", - "X-Forwarded", - "Forwarded-For", - "Forwarded", - "X-Vercel-Forwarded-For" -]; -function getClientIPAddress(headers) { - const headerValues = ipHeaderNames.map((headerName) => { - const rawValue = headers[headerName]; - const value4 = Array.isArray(rawValue) ? rawValue.join(";") : rawValue; - if (headerName === "Forwarded") { - return parseForwardedHeader(value4); - } - return value4 && value4.split(",").map((v2) => v2.trim()); - }); - const flattenedHeaderValues = headerValues.reduce((acc, val) => { - if (!val) { - return acc; - } - return acc.concat(val); - }, []); - const ipAddress = flattenedHeaderValues.find((ip) => ip !== null && isIP(ip)); - return ipAddress || null; -} -__name(getClientIPAddress, "getClientIPAddress"); -function parseForwardedHeader(value4) { - if (!value4) { - return null; - } - for (const part of value4.split(";")) { - if (part.startsWith("for=")) { - return part.slice(4); - } - } - return null; -} -__name(parseForwardedHeader, "parseForwardedHeader"); -function isIP(str) { - const regex2 = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/; - return regex2.test(str); -} -__name(isIP, "isIP"); -const DEFAULT_INCLUDES = { - ip: false, - request: true, - user: true -}; -const DEFAULT_REQUEST_INCLUDES = ["cookies", "data", "headers", "method", "query_string", "url"]; -const DEFAULT_USER_INCLUDES = ["id", "username", "email"]; -function extractPathForTransaction(req, options4 = {}) { - const method = req.method && req.method.toUpperCase(); - let path = ""; - let source = "url"; - if (options4.customRoute || req.route) { - path = options4.customRoute || `${req.baseUrl || ""}${req.route && req.route.path}`; - source = "route"; - } else if (req.originalUrl || req.url) { - path = stripUrlQueryAndFragment(req.originalUrl || req.url || ""); - } - let name2 = ""; - if (options4.method && method) { - name2 += method; - } - if (options4.method && options4.path) { - name2 += " "; - } - if (options4.path && path) { - name2 += path; - } - return [name2, source]; -} -__name(extractPathForTransaction, "extractPathForTransaction"); -function extractUserData(user, keys2) { - const extractedUser = {}; - const attributes = Array.isArray(keys2) ? keys2 : DEFAULT_USER_INCLUDES; - attributes.forEach((key) => { - if (user && key in user) { - extractedUser[key] = user[key]; - } - }); - return extractedUser; -} -__name(extractUserData, "extractUserData"); -function extractRequestData(req, options4 = {}) { - const { include = DEFAULT_REQUEST_INCLUDES } = options4; - const requestData = {}; - const headers = req.headers || {}; - const method = req.method; - const host = headers.host || req.hostname || req.host || ""; - const protocol = req.protocol === "https" || req.socket && req.socket.encrypted ? "https" : "http"; - const originalUrl = req.originalUrl || req.url || ""; - const absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; - include.forEach((key) => { - switch (key) { - case "headers": { - requestData.headers = headers; - if (!include.includes("cookies")) { - delete requestData.headers.cookie; - } - if (!include.includes("ip")) { - ipHeaderNames.forEach((ipHeaderName) => { - delete requestData.headers[ipHeaderName]; - }); - } - break; - } - case "method": { - requestData.method = method; - break; - } - case "url": { - requestData.url = absoluteUrl; - break; - } - case "cookies": { - requestData.cookies = // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can - // come off in v8 - req.cookies || headers.cookie && parseCookie(headers.cookie) || {}; - break; - } - case "query_string": { - requestData.query_string = extractQueryParams(req); - break; - } - case "data": { - if (method === "GET" || method === "HEAD") { - break; - } - const body = req.body; - if (body !== void 0) { - const stringBody = isString$8(body) ? body : isPlainObject$5(body) ? JSON.stringify(normalize$2(body)) : truncate(`${body}`, 1024); - if (stringBody) { - requestData.data = stringBody; - } - } - break; - } - default: { - if ({}.hasOwnProperty.call(req, key)) { - requestData[key] = req[key]; - } - } - } - }); - return requestData; -} -__name(extractRequestData, "extractRequestData"); -function addNormalizedRequestDataToEvent(event, req, additionalData, options4) { - const include = { - ...DEFAULT_INCLUDES, - ...options4 && options4.include - }; - if (include.request) { - const includeRequest = Array.isArray(include.request) ? [...include.request] : [...DEFAULT_REQUEST_INCLUDES]; - if (include.ip) { - includeRequest.push("ip"); - } - const extractedRequestData = extractNormalizedRequestData(req, { include: includeRequest }); - event.request = { - ...event.request, - ...extractedRequestData - }; - } - if (include.user) { - const extractedUser = additionalData.user && isPlainObject$5(additionalData.user) ? extractUserData(additionalData.user, include.user) : {}; - if (Object.keys(extractedUser).length) { - event.user = { - ...extractedUser, - ...event.user - }; - } - } - if (include.ip) { - const ip = req.headers && getClientIPAddress(req.headers) || additionalData.ipAddress; - if (ip) { - event.user = { - ...event.user, - ip_address: ip - }; - } - } -} -__name(addNormalizedRequestDataToEvent, "addNormalizedRequestDataToEvent"); -function addRequestDataToEvent(event, req, options4) { - const include = { - ...DEFAULT_INCLUDES, - ...options4 && options4.include - }; - if (include.request) { - const includeRequest = Array.isArray(include.request) ? [...include.request] : [...DEFAULT_REQUEST_INCLUDES]; - if (include.ip) { - includeRequest.push("ip"); - } - const extractedRequestData = extractRequestData(req, { include: includeRequest }); - event.request = { - ...event.request, - ...extractedRequestData - }; - } - if (include.user) { - const extractedUser = req.user && isPlainObject$5(req.user) ? extractUserData(req.user, include.user) : {}; - if (Object.keys(extractedUser).length) { - event.user = { - ...event.user, - ...extractedUser - }; - } - } - if (include.ip) { - const ip = req.headers && getClientIPAddress(req.headers) || req.ip || req.socket && req.socket.remoteAddress; - if (ip) { - event.user = { - ...event.user, - ip_address: ip - }; - } - } - return event; -} -__name(addRequestDataToEvent, "addRequestDataToEvent"); -function extractQueryParams(req) { - let originalUrl = req.originalUrl || req.url || ""; - if (!originalUrl) { - return; - } - if (originalUrl.startsWith("/")) { - originalUrl = `http://dogs.are.great${originalUrl}`; - } - try { - const queryParams = req.query || new URL(originalUrl).search.slice(1); - return queryParams.length ? queryParams : void 0; - } catch (e2) { - return void 0; - } -} -__name(extractQueryParams, "extractQueryParams"); -function winterCGHeadersToDict(winterCGHeaders) { - const headers = {}; - try { - winterCGHeaders.forEach((value4, key) => { - if (typeof value4 === "string") { - headers[key] = value4; - } - }); - } catch (e2) { - DEBUG_BUILD$5 && logger$2.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue."); - } - return headers; -} -__name(winterCGHeadersToDict, "winterCGHeadersToDict"); -function headersToDict(reqHeaders) { - const headers = /* @__PURE__ */ Object.create(null); - try { - Object.entries(reqHeaders).forEach(([key, value4]) => { - if (typeof value4 === "string") { - headers[key] = value4; - } - }); - } catch (e2) { - DEBUG_BUILD$5 && logger$2.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue."); - } - return headers; -} -__name(headersToDict, "headersToDict"); -function winterCGRequestToRequestData(req) { - const headers = winterCGHeadersToDict(req.headers); - return { - method: req.method, - url: req.url, - query_string: extractQueryParamsFromUrl(req.url), - headers - // TODO: Can we extract body data from the request? - }; -} -__name(winterCGRequestToRequestData, "winterCGRequestToRequestData"); -function httpRequestToRequestData(request) { - const headers = request.headers || {}; - const host = headers.host || ""; - const protocol = request.socket && request.socket.encrypted ? "https" : "http"; - const originalUrl = request.url || ""; - const absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; - const data25 = request.body || void 0; - const cookies2 = request.cookies; - return dropUndefinedKeys({ - url: absoluteUrl, - method: request.method, - query_string: extractQueryParamsFromUrl(originalUrl), - headers: headersToDict(headers), - cookies: cookies2, - data: data25 - }); -} -__name(httpRequestToRequestData, "httpRequestToRequestData"); -function extractQueryParamsFromUrl(url) { - if (!url) { - return; - } - try { - const queryParams = new URL(url, "http://dogs.are.great").search.slice(1); - return queryParams.length ? queryParams : void 0; - } catch (e3) { - return void 0; - } -} -__name(extractQueryParamsFromUrl, "extractQueryParamsFromUrl"); -function extractNormalizedRequestData(normalizedRequest, { include }) { - const includeKeys = include ? Array.isArray(include) ? include : DEFAULT_REQUEST_INCLUDES : []; - const requestData = {}; - const headers = { ...normalizedRequest.headers }; - if (includeKeys.includes("headers")) { - requestData.headers = headers; - if (!include.includes("cookies")) { - delete headers.cookie; - } - if (!include.includes("ip")) { - ipHeaderNames.forEach((ipHeaderName) => { - delete headers[ipHeaderName]; - }); - } - } - if (includeKeys.includes("method")) { - requestData.method = normalizedRequest.method; - } - if (includeKeys.includes("url")) { - requestData.url = normalizedRequest.url; - } - if (includeKeys.includes("cookies")) { - const cookies2 = normalizedRequest.cookies || (headers && headers.cookie ? parseCookie(headers.cookie) : void 0); - requestData.cookies = cookies2 || {}; - } - if (includeKeys.includes("query_string")) { - requestData.query_string = normalizedRequest.query_string; - } - if (includeKeys.includes("data")) { - requestData.data = normalizedRequest.data; - } - return requestData; -} -__name(extractNormalizedRequestData, "extractNormalizedRequestData"); -const DEFAULT_OPTIONS$1 = { - include: { - cookies: true, - data: true, - headers: true, - ip: false, - query_string: true, - url: true, - user: { - id: true, - username: true, - email: true - } - }, - transactionNamingScheme: "methodPath" -}; -const INTEGRATION_NAME$i = "RequestData"; -const _requestDataIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const _options = { - ...DEFAULT_OPTIONS$1, - ...options4, - include: { - ...DEFAULT_OPTIONS$1.include, - ...options4.include, - user: options4.include && typeof options4.include.user === "boolean" ? options4.include.user : { - ...DEFAULT_OPTIONS$1.include.user, - // Unclear why TS still thinks `options.include.user` could be a boolean at this point - ...(options4.include || {}).user - } - } - }; - return { - name: INTEGRATION_NAME$i, - processEvent(event) { - const { sdkProcessingMetadata = {} } = event; - const { request, normalizedRequest } = sdkProcessingMetadata; - const addRequestDataOptions = convertReqDataIntegrationOptsToAddReqDataOpts(_options); - if (normalizedRequest) { - const ipAddress = request ? request.ip || request.socket && request.socket.remoteAddress : void 0; - const user = request ? request.user : void 0; - addNormalizedRequestDataToEvent(event, normalizedRequest, { ipAddress, user }, addRequestDataOptions); - return event; - } - if (!request) { - return event; - } - return addRequestDataToEvent(event, request, addRequestDataOptions); - } - }; -}, "_requestDataIntegration"); -const requestDataIntegration = defineIntegration(_requestDataIntegration); -function convertReqDataIntegrationOptsToAddReqDataOpts(integrationOptions) { - const { - // eslint-disable-next-line deprecation/deprecation - transactionNamingScheme, - include: { ip, user, ...requestOptions } - } = integrationOptions; - const requestIncludeKeys = ["method"]; - for (const [key, value4] of Object.entries(requestOptions)) { - if (value4) { - requestIncludeKeys.push(key); - } - } - let addReqDataUserOpt; - if (user === void 0) { - addReqDataUserOpt = true; - } else if (typeof user === "boolean") { - addReqDataUserOpt = user; - } else { - const userIncludeKeys = []; - for (const [key, value4] of Object.entries(user)) { - if (value4) { - userIncludeKeys.push(key); - } - } - addReqDataUserOpt = userIncludeKeys; - } - return { - include: { - ip, - user: addReqDataUserOpt, - request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : void 0, - transaction: transactionNamingScheme - } - }; -} -__name(convertReqDataIntegrationOptsToAddReqDataOpts, "convertReqDataIntegrationOptsToAddReqDataOpts"); -function addConsoleInstrumentationHandler(handler6) { - const type = "console"; - addHandler$1(type, handler6); - maybeInstrument(type, instrumentConsole); -} -__name(addConsoleInstrumentationHandler, "addConsoleInstrumentationHandler"); -function instrumentConsole() { - if (!("console" in GLOBAL_OBJ)) { - return; - } - CONSOLE_LEVELS$1.forEach(function(level) { - if (!(level in GLOBAL_OBJ.console)) { - return; - } - fill(GLOBAL_OBJ.console, level, function(originalConsoleMethod) { - originalConsoleMethods[level] = originalConsoleMethod; - return function(...args) { - const handlerData = { args, level }; - triggerHandlers$1("console", handlerData); - const log2 = originalConsoleMethods[level]; - log2 && log2.apply(GLOBAL_OBJ.console, args); - }; - }); - }); -} -__name(instrumentConsole, "instrumentConsole"); -const validSeverityLevels = ["fatal", "error", "warning", "log", "info", "debug"]; -function severityLevelFromString(level) { - return level === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(level) ? level : "log"; -} -__name(severityLevelFromString, "severityLevelFromString"); -const INTEGRATION_NAME$h = "CaptureConsole"; -const _captureConsoleIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const levels = options4.levels || CONSOLE_LEVELS$1; - const handled = !!options4.handled; - return { - name: INTEGRATION_NAME$h, - setup(client) { - if (!("console" in GLOBAL_OBJ)) { - return; - } - addConsoleInstrumentationHandler(({ args, level }) => { - if (getClient() !== client || !levels.includes(level)) { - return; - } - consoleHandler(args, level, handled); - }); - } - }; -}, "_captureConsoleIntegration"); -const captureConsoleIntegration = defineIntegration(_captureConsoleIntegration); -function consoleHandler(args, level, handled) { - const captureContext = { - level: severityLevelFromString(level), - extra: { - arguments: args - } - }; - withScope((scope) => { - scope.addEventProcessor((event) => { - event.logger = "console"; - addExceptionMechanism(event, { - handled, - type: "console" - }); - return event; - }); - if (level === "assert") { - if (!args[0]) { - const message4 = `Assertion failed: ${safeJoin(args.slice(1), " ") || "console.assert"}`; - scope.setExtra("arguments", args.slice(1)); - captureMessage(message4, captureContext); - } - return; - } - const error2 = args.find((arg) => arg instanceof Error); - if (error2) { - captureException(error2, captureContext); - return; - } - const message3 = safeJoin(args, " "); - captureMessage(message3, captureContext); - }); -} -__name(consoleHandler, "consoleHandler"); -const INTEGRATION_NAME$g = "Debug"; -const _debugIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const _options = { - debugger: false, - stringify: false, - ...options4 - }; - return { - name: INTEGRATION_NAME$g, - setup(client) { - client.on("beforeSendEvent", (event, hint) => { - if (_options.debugger) { - debugger; - } - consoleSandbox(() => { - if (_options.stringify) { - console.log(JSON.stringify(event, null, 2)); - if (hint && Object.keys(hint).length) { - console.log(JSON.stringify(hint, null, 2)); - } - } else { - console.log(event); - if (hint && Object.keys(hint).length) { - console.log(hint); - } - } - }); - }); - } - }; -}, "_debugIntegration"); -const debugIntegration = defineIntegration(_debugIntegration); -const INTEGRATION_NAME$f = "Dedupe"; -const _dedupeIntegration = /* @__PURE__ */ __name(() => { - let previousEvent; - return { - name: INTEGRATION_NAME$f, - processEvent(currentEvent) { - if (currentEvent.type) { - return currentEvent; - } - try { - if (_shouldDropEvent(currentEvent, previousEvent)) { - DEBUG_BUILD$6 && logger$2.warn("Event dropped due to being a duplicate of previously captured event."); - return null; - } - } catch (_oO) { - } - return previousEvent = currentEvent; - } - }; -}, "_dedupeIntegration"); -const dedupeIntegration = defineIntegration(_dedupeIntegration); -function _shouldDropEvent(currentEvent, previousEvent) { - if (!previousEvent) { - return false; - } - if (_isSameMessageEvent(currentEvent, previousEvent)) { - return true; - } - if (_isSameExceptionEvent(currentEvent, previousEvent)) { - return true; - } - return false; -} -__name(_shouldDropEvent, "_shouldDropEvent"); -function _isSameMessageEvent(currentEvent, previousEvent) { - const currentMessage = currentEvent.message; - const previousMessage = previousEvent.message; - if (!currentMessage && !previousMessage) { - return false; - } - if (currentMessage && !previousMessage || !currentMessage && previousMessage) { - return false; - } - if (currentMessage !== previousMessage) { - return false; - } - if (!_isSameFingerprint(currentEvent, previousEvent)) { - return false; - } - if (!_isSameStacktrace(currentEvent, previousEvent)) { - return false; - } - return true; -} -__name(_isSameMessageEvent, "_isSameMessageEvent"); -function _isSameExceptionEvent(currentEvent, previousEvent) { - const previousException = _getExceptionFromEvent(previousEvent); - const currentException = _getExceptionFromEvent(currentEvent); - if (!previousException || !currentException) { - return false; - } - if (previousException.type !== currentException.type || previousException.value !== currentException.value) { - return false; - } - if (!_isSameFingerprint(currentEvent, previousEvent)) { - return false; - } - if (!_isSameStacktrace(currentEvent, previousEvent)) { - return false; - } - return true; -} -__name(_isSameExceptionEvent, "_isSameExceptionEvent"); -function _isSameStacktrace(currentEvent, previousEvent) { - let currentFrames = getFramesFromEvent(currentEvent); - let previousFrames = getFramesFromEvent(previousEvent); - if (!currentFrames && !previousFrames) { - return true; - } - if (currentFrames && !previousFrames || !currentFrames && previousFrames) { - return false; - } - currentFrames = currentFrames; - previousFrames = previousFrames; - if (previousFrames.length !== currentFrames.length) { - return false; - } - for (let i2 = 0; i2 < previousFrames.length; i2++) { - const frameA = previousFrames[i2]; - const frameB = currentFrames[i2]; - if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) { - return false; - } - } - return true; -} -__name(_isSameStacktrace, "_isSameStacktrace"); -function _isSameFingerprint(currentEvent, previousEvent) { - let currentFingerprint = currentEvent.fingerprint; - let previousFingerprint = previousEvent.fingerprint; - if (!currentFingerprint && !previousFingerprint) { - return true; - } - if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) { - return false; - } - currentFingerprint = currentFingerprint; - previousFingerprint = previousFingerprint; - try { - return !!(currentFingerprint.join("") === previousFingerprint.join("")); - } catch (_oO) { - return false; - } -} -__name(_isSameFingerprint, "_isSameFingerprint"); -function _getExceptionFromEvent(event) { - return event.exception && event.exception.values && event.exception.values[0]; -} -__name(_getExceptionFromEvent, "_getExceptionFromEvent"); -const INTEGRATION_NAME$e = "ExtraErrorData"; -const _extraErrorDataIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const { depth = 3, captureErrorCause = true } = options4; - return { - name: INTEGRATION_NAME$e, - processEvent(event, hint, client) { - const { maxValueLength = 250 } = client.getOptions(); - return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause, maxValueLength); - } - }; -}, "_extraErrorDataIntegration"); -const extraErrorDataIntegration = defineIntegration(_extraErrorDataIntegration); -function _enhanceEventWithErrorData(event, hint = {}, depth, captureErrorCause, maxValueLength) { - if (!hint.originalException || !isError(hint.originalException)) { - return event; - } - const exceptionName = hint.originalException.name || hint.originalException.constructor.name; - const errorData = _extractErrorData(hint.originalException, captureErrorCause, maxValueLength); - if (errorData) { - const contexts = { - ...event.contexts - }; - const normalizedErrorData = normalize$2(errorData, depth); - if (isPlainObject$5(normalizedErrorData)) { - addNonEnumerableProperty(normalizedErrorData, "__sentry_skip_normalization__", true); - contexts[exceptionName] = normalizedErrorData; - } - return { - ...event, - contexts - }; - } - return event; -} -__name(_enhanceEventWithErrorData, "_enhanceEventWithErrorData"); -function _extractErrorData(error2, captureErrorCause, maxValueLength) { - try { - const nativeKeys2 = [ - "name", - "message", - "stack", - "line", - "column", - "fileName", - "lineNumber", - "columnNumber", - "toJSON" - ]; - const extraErrorInfo = {}; - for (const key of Object.keys(error2)) { - if (nativeKeys2.indexOf(key) !== -1) { - continue; - } - const value4 = error2[key]; - extraErrorInfo[key] = isError(value4) || typeof value4 === "string" ? truncate(`${value4}`, maxValueLength) : value4; - } - if (captureErrorCause && error2.cause !== void 0) { - extraErrorInfo.cause = isError(error2.cause) ? error2.cause.toString() : error2.cause; - } - if (typeof error2.toJSON === "function") { - const serializedError = error2.toJSON(); - for (const key of Object.keys(serializedError)) { - const value4 = serializedError[key]; - extraErrorInfo[key] = isError(value4) ? value4.toString() : value4; - } - } - return extraErrorInfo; - } catch (oO) { - DEBUG_BUILD$6 && logger$2.error("Unable to extract extra data from the Error object:", oO); - } - return null; -} -__name(_extractErrorData, "_extractErrorData"); -function normalizeArray(parts2, allowAboveRoot) { - let up = 0; - for (let i2 = parts2.length - 1; i2 >= 0; i2--) { - const last = parts2[i2]; - if (last === ".") { - parts2.splice(i2, 1); - } else if (last === "..") { - parts2.splice(i2, 1); - up++; - } else if (up) { - parts2.splice(i2, 1); - up--; - } - } - if (allowAboveRoot) { - for (; up--; up) { - parts2.unshift(".."); - } - } - return parts2; -} -__name(normalizeArray, "normalizeArray"); -const splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; -function splitPath(filename) { - const truncated = filename.length > 1024 ? `${filename.slice(-1024)}` : filename; - const parts2 = splitPathRe.exec(truncated); - return parts2 ? parts2.slice(1) : []; -} -__name(splitPath, "splitPath"); -function resolve$1(...args) { - let resolvedPath = ""; - let resolvedAbsolute = false; - for (let i2 = args.length - 1; i2 >= -1 && !resolvedAbsolute; i2--) { - const path = i2 >= 0 ? args[i2] : "/"; - if (!path) { - continue; - } - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charAt(0) === "/"; - } - resolvedPath = normalizeArray( - resolvedPath.split("/").filter((p2) => !!p2), - !resolvedAbsolute - ).join("/"); - return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; -} -__name(resolve$1, "resolve$1"); -function trim$1(arr) { - let start2 = 0; - for (; start2 < arr.length; start2++) { - if (arr[start2] !== "") { - break; - } - } - let end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== "") { - break; - } - } - if (start2 > end) { - return []; - } - return arr.slice(start2, end - start2 + 1); -} -__name(trim$1, "trim$1"); -function relative(from2, to) { - from2 = resolve$1(from2).slice(1); - to = resolve$1(to).slice(1); - const fromParts = trim$1(from2.split("/")); - const toParts = trim$1(to.split("/")); - const length = Math.min(fromParts.length, toParts.length); - let samePartsLength = length; - for (let i2 = 0; i2 < length; i2++) { - if (fromParts[i2] !== toParts[i2]) { - samePartsLength = i2; - break; - } - } - let outputParts = []; - for (let i2 = samePartsLength; i2 < fromParts.length; i2++) { - outputParts.push(".."); - } - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - return outputParts.join("/"); -} -__name(relative, "relative"); -function normalizePath(path) { - const isPathAbsolute = isAbsolute(path); - const trailingSlash = path.slice(-1) === "/"; - let normalizedPath = normalizeArray( - path.split("/").filter((p2) => !!p2), - !isPathAbsolute - ).join("/"); - if (!normalizedPath && !isPathAbsolute) { - normalizedPath = "."; - } - if (normalizedPath && trailingSlash) { - normalizedPath += "/"; - } - return (isPathAbsolute ? "/" : "") + normalizedPath; -} -__name(normalizePath, "normalizePath"); -function isAbsolute(path) { - return path.charAt(0) === "/"; -} -__name(isAbsolute, "isAbsolute"); -function join$3(...args) { - return normalizePath(args.join("/")); -} -__name(join$3, "join$3"); -function dirname(path) { - const result = splitPath(path); - const root27 = result[0] || ""; - let dir = result[1]; - if (!root27 && !dir) { - return "."; - } - if (dir) { - dir = dir.slice(0, dir.length - 1); - } - return root27 + dir; -} -__name(dirname, "dirname"); -function basename(path, ext) { - let f2 = splitPath(path)[2] || ""; - if (ext && f2.slice(ext.length * -1) === ext) { - f2 = f2.slice(0, f2.length - ext.length); - } - return f2; -} -__name(basename, "basename"); -const INTEGRATION_NAME$d = "RewriteFrames"; -const rewriteFramesIntegration = defineIntegration((options4 = {}) => { - const root27 = options4.root; - const prefix2 = options4.prefix || "app:///"; - const isBrowser2 = "window" in GLOBAL_OBJ && GLOBAL_OBJ.window !== void 0; - const iteratee = options4.iteratee || generateIteratee({ isBrowser: isBrowser2, root: root27, prefix: prefix2 }); - function _processExceptionsEvent(event) { - try { - return { - ...event, - exception: { - ...event.exception, - // The check for this is performed inside `process` call itself, safe to skip here - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - values: event.exception.values.map((value4) => ({ - ...value4, - ...value4.stacktrace && { stacktrace: _processStacktrace(value4.stacktrace) } - })) - } - }; - } catch (_oO) { - return event; - } - } - __name(_processExceptionsEvent, "_processExceptionsEvent"); - function _processStacktrace(stacktrace) { - return { - ...stacktrace, - frames: stacktrace && stacktrace.frames && stacktrace.frames.map((f2) => iteratee(f2)) - }; - } - __name(_processStacktrace, "_processStacktrace"); - return { - name: INTEGRATION_NAME$d, - processEvent(originalEvent) { - let processedEvent = originalEvent; - if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) { - processedEvent = _processExceptionsEvent(processedEvent); - } - return processedEvent; - } - }; -}); -function generateIteratee({ - isBrowser: isBrowser2, - root: root27, - prefix: prefix2 -}) { - return (frame) => { - if (!frame.filename) { - return frame; - } - const isWindowsFrame = /^[a-zA-Z]:\\/.test(frame.filename) || // or the presence of a backslash without a forward slash (which are not allowed on Windows) - frame.filename.includes("\\") && !frame.filename.includes("/"); - const startsWithSlash = /^\//.test(frame.filename); - if (isBrowser2) { - if (root27) { - const oldFilename = frame.filename; - if (oldFilename.indexOf(root27) === 0) { - frame.filename = oldFilename.replace(root27, prefix2); - } - } - } else { - if (isWindowsFrame || startsWithSlash) { - const filename = isWindowsFrame ? frame.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : frame.filename; - const base2 = root27 ? relative(root27, filename) : basename(filename); - frame.filename = `${prefix2}${base2}`; - } - } - return frame; - }; -} -__name(generateIteratee, "generateIteratee"); -const INTEGRATION_NAME$c = "SessionTiming"; -const _sessionTimingIntegration = /* @__PURE__ */ __name(() => { - const startTime = timestampInSeconds() * 1e3; - return { - name: INTEGRATION_NAME$c, - processEvent(event) { - const now2 = timestampInSeconds() * 1e3; - return { - ...event, - extra: { - ...event.extra, - ["session:start"]: startTime, - ["session:duration"]: now2 - startTime, - ["session:end"]: now2 - } - }; - } - }; -}, "_sessionTimingIntegration"); -const sessionTimingIntegration = defineIntegration(_sessionTimingIntegration); -const DEFAULT_LIMIT$1 = 10; -const INTEGRATION_NAME$b = "ZodErrors"; -function originalExceptionIsZodError(originalException) { - return isError(originalException) && originalException.name === "ZodError" && Array.isArray(originalException.errors); -} -__name(originalExceptionIsZodError, "originalExceptionIsZodError"); -function formatIssueTitle(issue) { - return { - ...issue, - path: "path" in issue && Array.isArray(issue.path) ? issue.path.join(".") : void 0, - keys: "keys" in issue ? JSON.stringify(issue.keys) : void 0, - unionErrors: "unionErrors" in issue ? JSON.stringify(issue.unionErrors) : void 0 - }; -} -__name(formatIssueTitle, "formatIssueTitle"); -function formatIssueMessage(zodError) { - const errorKeyMap = /* @__PURE__ */ new Set(); - for (const iss of zodError.issues) { - if (iss.path && iss.path[0]) { - errorKeyMap.add(iss.path[0]); - } - } - const errorKeys = Array.from(errorKeyMap); - return `Failed to validate keys: ${truncate(errorKeys.join(", "), 100)}`; -} -__name(formatIssueMessage, "formatIssueMessage"); -function applyZodErrorsToEvent(limit, event, hint) { - if (!event.exception || !event.exception.values || !hint || !hint.originalException || !originalExceptionIsZodError(hint.originalException) || hint.originalException.issues.length === 0) { - return event; - } - return { - ...event, - exception: { - ...event.exception, - values: [ - { - ...event.exception.values[0], - value: formatIssueMessage(hint.originalException) - }, - ...event.exception.values.slice(1) - ] - }, - extra: { - ...event.extra, - "zoderror.issues": hint.originalException.errors.slice(0, limit).map(formatIssueTitle) - } - }; -} -__name(applyZodErrorsToEvent, "applyZodErrorsToEvent"); -const _zodErrorsIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const limit = options4.limit || DEFAULT_LIMIT$1; - return { - name: INTEGRATION_NAME$b, - processEvent(originalEvent, hint) { - const processedEvent = applyZodErrorsToEvent(limit, originalEvent, hint); - return processedEvent; - } - }; -}, "_zodErrorsIntegration"); -const zodErrorsIntegration = defineIntegration(_zodErrorsIntegration); -const thirdPartyErrorFilterIntegration = defineIntegration((options4) => { - return { - name: "ThirdPartyErrorsFilter", - setup(client) { - client.on("beforeEnvelope", (envelope) => { - forEachEnvelopeItem(envelope, (item3, type) => { - if (type === "event") { - const event = Array.isArray(item3) ? item3[1] : void 0; - if (event) { - stripMetadataFromStackFrames(event); - item3[1] = event; - } - } - }); - }); - client.on("applyFrameMetadata", (event) => { - if (event.type) { - return; - } - const stackParser = client.getOptions().stackParser; - addMetadataToStackFrames(stackParser, event); - }); - }, - processEvent(event) { - const frameKeys = getBundleKeysForAllFramesWithFilenames(event); - if (frameKeys) { - const arrayMethod = options4.behaviour === "drop-error-if-contains-third-party-frames" || options4.behaviour === "apply-tag-if-contains-third-party-frames" ? "some" : "every"; - const behaviourApplies = frameKeys[arrayMethod]((keys2) => !keys2.some((key) => options4.filterKeys.includes(key))); - if (behaviourApplies) { - const shouldDrop = options4.behaviour === "drop-error-if-contains-third-party-frames" || options4.behaviour === "drop-error-if-exclusively-contains-third-party-frames"; - if (shouldDrop) { - return null; - } else { - event.tags = { - ...event.tags, - third_party_code: true - }; - } - } - } - return event; - } - }; -}); -function getBundleKeysForAllFramesWithFilenames(event) { - const frames = getFramesFromEvent(event); - if (!frames) { - return void 0; - } - return frames.filter((frame) => !!frame.filename).map((frame) => { - if (frame.module_metadata) { - return Object.keys(frame.module_metadata).filter((key) => key.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX)).map((key) => key.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length)); - } - return []; - }); -} -__name(getBundleKeysForAllFramesWithFilenames, "getBundleKeysForAllFramesWithFilenames"); -const BUNDLER_PLUGIN_APP_KEY_PREFIX = "_sentryBundlerPluginAppKey:"; -const COUNTER_METRIC_TYPE = "c"; -const GAUGE_METRIC_TYPE = "g"; -const SET_METRIC_TYPE = "s"; -const DISTRIBUTION_METRIC_TYPE = "d"; -const DEFAULT_BROWSER_FLUSH_INTERVAL = 5e3; -const DEFAULT_FLUSH_INTERVAL = 1e4; -const MAX_WEIGHT = 1e4; -function getMetricsAggregatorForClient$1(client, Aggregator) { - const globalMetricsAggregators = getGlobalSingleton( - "globalMetricsAggregators", - () => /* @__PURE__ */ new WeakMap() - ); - const aggregator = globalMetricsAggregators.get(client); - if (aggregator) { - return aggregator; - } - const newAggregator = new Aggregator(client); - client.on("flush", () => newAggregator.flush()); - client.on("close", () => newAggregator.close()); - globalMetricsAggregators.set(client, newAggregator); - return newAggregator; -} -__name(getMetricsAggregatorForClient$1, "getMetricsAggregatorForClient$1"); -function addToMetricsAggregator(Aggregator, metricType, name2, value4, data25 = {}) { - const client = data25.client || getClient(); - if (!client) { - return; - } - const span = getActiveSpan(); - const rootSpan = span ? getRootSpan(span) : void 0; - const transactionName = rootSpan && spanToJSON(rootSpan).description; - const { unit, tags, timestamp: timestamp2 } = data25; - const { release, environment } = client.getOptions(); - const metricTags = {}; - if (release) { - metricTags.release = release; - } - if (environment) { - metricTags.environment = environment; - } - if (transactionName) { - metricTags.transaction = transactionName; - } - DEBUG_BUILD$6 && logger$2.log(`Adding value of ${value4} to ${metricType} metric ${name2}`); - const aggregator = getMetricsAggregatorForClient$1(client, Aggregator); - aggregator.add(metricType, name2, value4, unit, { ...metricTags, ...tags }, timestamp2); -} -__name(addToMetricsAggregator, "addToMetricsAggregator"); -function increment$2(aggregator, name2, value4 = 1, data25) { - addToMetricsAggregator(aggregator, COUNTER_METRIC_TYPE, name2, ensureNumber(value4), data25); -} -__name(increment$2, "increment$2"); -function distribution$2(aggregator, name2, value4, data25) { - addToMetricsAggregator(aggregator, DISTRIBUTION_METRIC_TYPE, name2, ensureNumber(value4), data25); -} -__name(distribution$2, "distribution$2"); -function timing$2(aggregator, name2, value4, unit = "second", data25) { - if (typeof value4 === "function") { - const startTime = timestampInSeconds(); - return startSpanManual( - { - op: "metrics.timing", - name: name2, - startTime, - onlyIfParent: true - }, - (span) => { - return handleCallbackErrors( - () => value4(), - () => { - }, - () => { - const endTime = timestampInSeconds(); - const timeDiff = endTime - startTime; - distribution$2(aggregator, name2, timeDiff, { ...data25, unit: "second" }); - span.end(endTime); - } - ); - } - ); - } - distribution$2(aggregator, name2, value4, { ...data25, unit }); -} -__name(timing$2, "timing$2"); -function set$7(aggregator, name2, value4, data25) { - addToMetricsAggregator(aggregator, SET_METRIC_TYPE, name2, value4, data25); -} -__name(set$7, "set$7"); -function gauge$2(aggregator, name2, value4, data25) { - addToMetricsAggregator(aggregator, GAUGE_METRIC_TYPE, name2, ensureNumber(value4), data25); -} -__name(gauge$2, "gauge$2"); -const metrics$1 = { - increment: increment$2, - distribution: distribution$2, - set: set$7, - gauge: gauge$2, - timing: timing$2, - /** - * @ignore This is for internal use only. - */ - getMetricsAggregatorForClient: getMetricsAggregatorForClient$1 -}; -function ensureNumber(number2) { - return typeof number2 === "string" ? parseInt(number2) : number2; -} -__name(ensureNumber, "ensureNumber"); -function isProfilingIntegrationWithProfiler(integration) { - return !!integration && typeof integration["_profiler"] !== "undefined" && typeof integration["_profiler"]["start"] === "function" && typeof integration["_profiler"]["stop"] === "function"; -} -__name(isProfilingIntegrationWithProfiler, "isProfilingIntegrationWithProfiler"); -function startProfiler() { - const client = getClient(); - if (!client) { - DEBUG_BUILD$6 && logger$2.warn("No Sentry client available, profiling is not started"); - return; - } - const integration = client.getIntegrationByName("ProfilingIntegration"); - if (!integration) { - DEBUG_BUILD$6 && logger$2.warn("ProfilingIntegration is not available"); - return; - } - if (!isProfilingIntegrationWithProfiler(integration)) { - DEBUG_BUILD$6 && logger$2.warn("Profiler is not available on profiling integration."); - return; - } - integration._profiler.start(); -} -__name(startProfiler, "startProfiler"); -function stopProfiler() { - const client = getClient(); - if (!client) { - DEBUG_BUILD$6 && logger$2.warn("No Sentry client available, profiling is not started"); - return; - } - const integration = client.getIntegrationByName("ProfilingIntegration"); - if (!integration) { - DEBUG_BUILD$6 && logger$2.warn("ProfilingIntegration is not available"); - return; - } - if (!isProfilingIntegrationWithProfiler(integration)) { - DEBUG_BUILD$6 && logger$2.warn("Profiler is not available on profiling integration."); - return; - } - integration._profiler.stop(); -} -__name(stopProfiler, "stopProfiler"); -const profiler = { - startProfiler, - stopProfiler -}; -function getBucketKey(metricType, name2, unit, tags) { - const stringifiedTags = Object.entries(dropUndefinedKeys(tags)).sort((a2, b2) => a2[0].localeCompare(b2[0])); - return `${metricType}${name2}${unit}${stringifiedTags}`; -} -__name(getBucketKey, "getBucketKey"); -function simpleHash(s2) { - let rv = 0; - for (let i2 = 0; i2 < s2.length; i2++) { - const c2 = s2.charCodeAt(i2); - rv = (rv << 5) - rv + c2; - rv &= rv; - } - return rv >>> 0; -} -__name(simpleHash, "simpleHash"); -function serializeMetricBuckets(metricBucketItems) { - let out = ""; - for (const item3 of metricBucketItems) { - const tagEntries = Object.entries(item3.tags); - const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value4]) => `${key}:${value4}`).join(",")}` : ""; - out += `${item3.name}@${item3.unit}:${item3.metric}|${item3.metricType}${maybeTags}|T${item3.timestamp} -`; - } - return out; -} -__name(serializeMetricBuckets, "serializeMetricBuckets"); -function sanitizeUnit(unit) { - return unit.replace(/[^\w]+/gi, "_"); -} -__name(sanitizeUnit, "sanitizeUnit"); -function sanitizeMetricKey(key) { - return key.replace(/[^\w\-.]+/gi, "_"); -} -__name(sanitizeMetricKey, "sanitizeMetricKey"); -function sanitizeTagKey(key) { - return key.replace(/[^\w\-./]+/gi, ""); -} -__name(sanitizeTagKey, "sanitizeTagKey"); -const tagValueReplacements = [ - ["\n", "\\n"], - ["\r", "\\r"], - [" ", "\\t"], - ["\\", "\\\\"], - ["|", "\\u{7c}"], - [",", "\\u{2c}"] -]; -function getCharOrReplacement(input) { - for (const [search2, replacement] of tagValueReplacements) { - if (input === search2) { - return replacement; - } - } - return input; -} -__name(getCharOrReplacement, "getCharOrReplacement"); -function sanitizeTagValue(value4) { - return [...value4].reduce((acc, char) => acc + getCharOrReplacement(char), ""); -} -__name(sanitizeTagValue, "sanitizeTagValue"); -function sanitizeTags(unsanitizedTags) { - const tags = {}; - for (const key in unsanitizedTags) { - if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) { - const sanitizedKey = sanitizeTagKey(key); - tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key])); - } - } - return tags; -} -__name(sanitizeTags, "sanitizeTags"); -function captureAggregateMetrics(client, metricBucketItems) { - logger$2.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`); - const dsn = client.getDsn(); - const metadata = client.getSdkMetadata(); - const tunnel = client.getOptions().tunnel; - const metricsEnvelope = createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel); - client.sendEnvelope(metricsEnvelope); -} -__name(captureAggregateMetrics, "captureAggregateMetrics"); -function createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) { - const headers = { - sent_at: (/* @__PURE__ */ new Date()).toISOString() - }; - if (metadata && metadata.sdk) { - headers.sdk = { - name: metadata.sdk.name, - version: metadata.sdk.version - }; - } - if (!!tunnel && dsn) { - headers.dsn = dsnToString(dsn); - } - const item3 = createMetricEnvelopeItem(metricBucketItems); - return createEnvelope(headers, [item3]); -} -__name(createMetricEnvelope, "createMetricEnvelope"); -function createMetricEnvelopeItem(metricBucketItems) { - const payload = serializeMetricBuckets(metricBucketItems); - const metricHeaders = { - type: "statsd", - length: payload.length - }; - return [metricHeaders, payload]; -} -__name(createMetricEnvelopeItem, "createMetricEnvelopeItem"); -class CounterMetric { - static { - __name(this, "CounterMetric"); - } - constructor(_value) { - this._value = _value; - } - /** @inheritDoc */ - get weight() { - return 1; - } - /** @inheritdoc */ - add(value4) { - this._value += value4; - } - /** @inheritdoc */ - toString() { - return `${this._value}`; - } -} -class GaugeMetric { - static { - __name(this, "GaugeMetric"); - } - constructor(value4) { - this._last = value4; - this._min = value4; - this._max = value4; - this._sum = value4; - this._count = 1; - } - /** @inheritDoc */ - get weight() { - return 5; - } - /** @inheritdoc */ - add(value4) { - this._last = value4; - if (value4 < this._min) { - this._min = value4; - } - if (value4 > this._max) { - this._max = value4; - } - this._sum += value4; - this._count++; - } - /** @inheritdoc */ - toString() { - return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; - } -} -class DistributionMetric { - static { - __name(this, "DistributionMetric"); - } - constructor(first2) { - this._value = [first2]; - } - /** @inheritDoc */ - get weight() { - return this._value.length; - } - /** @inheritdoc */ - add(value4) { - this._value.push(value4); - } - /** @inheritdoc */ - toString() { - return this._value.join(":"); - } -} -class SetMetric { - static { - __name(this, "SetMetric"); - } - constructor(first2) { - this.first = first2; - this._value = /* @__PURE__ */ new Set([first2]); - } - /** @inheritDoc */ - get weight() { - return this._value.size; - } - /** @inheritdoc */ - add(value4) { - this._value.add(value4); - } - /** @inheritdoc */ - toString() { - return Array.from(this._value).map((val) => typeof val === "string" ? simpleHash(val) : val).join(":"); - } -} -const METRIC_MAP = { - [COUNTER_METRIC_TYPE]: CounterMetric, - [GAUGE_METRIC_TYPE]: GaugeMetric, - [DISTRIBUTION_METRIC_TYPE]: DistributionMetric, - [SET_METRIC_TYPE]: SetMetric -}; -class MetricsAggregator { - static { - __name(this, "MetricsAggregator"); - } - // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets - // when the aggregator is garbage collected. - // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - // Different metrics have different weights. We use this to limit the number of metrics - // that we store in memory. - // We adjust the type here to add the `unref()` part, as setInterval can technically return a number or a NodeJS.Timer - // SDKs are required to shift the flush interval by random() * rollup_in_seconds. - // That shift is determined once per startup to create jittering. - // An SDK is required to perform force flushing ahead of scheduled time if the memory - // pressure is too high. There is no rule for this other than that SDKs should be tracking - // abstract aggregation complexity (eg: a counter only carries a single float, whereas a - // distribution is a float per emission). - // - // Force flush is used on either shutdown, flush() or when we exceed the max weight. - constructor(_client) { - this._client = _client; - this._buckets = /* @__PURE__ */ new Map(); - this._bucketsTotalWeight = 0; - this._interval = setInterval(() => this._flush(), DEFAULT_FLUSH_INTERVAL); - if (this._interval.unref) { - this._interval.unref(); - } - this._flushShift = Math.floor(Math.random() * DEFAULT_FLUSH_INTERVAL / 1e3); - this._forceFlush = false; - } - /** - * @inheritDoc - */ - add(metricType, unsanitizedName, value4, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = timestampInSeconds()) { - const timestamp2 = Math.floor(maybeFloatTimestamp); - const name2 = sanitizeMetricKey(unsanitizedName); - const tags = sanitizeTags(unsanitizedTags); - const unit = sanitizeUnit(unsanitizedUnit); - const bucketKey = getBucketKey(metricType, name2, unit, tags); - let bucketItem = this._buckets.get(bucketKey); - const previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0; - if (bucketItem) { - bucketItem.metric.add(value4); - if (bucketItem.timestamp < timestamp2) { - bucketItem.timestamp = timestamp2; - } - } else { - bucketItem = { - // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. - metric: new METRIC_MAP[metricType](value4), - timestamp: timestamp2, - metricType, - name: name2, - unit, - tags - }; - this._buckets.set(bucketKey, bucketItem); - } - const val = typeof value4 === "string" ? bucketItem.metric.weight - previousWeight : value4; - updateMetricSummaryOnActiveSpan(metricType, name2, val, unit, unsanitizedTags, bucketKey); - this._bucketsTotalWeight += bucketItem.metric.weight; - if (this._bucketsTotalWeight >= MAX_WEIGHT) { - this.flush(); - } - } - /** - * Flushes the current metrics to the transport via the transport. - */ - flush() { - this._forceFlush = true; - this._flush(); - } - /** - * Shuts down metrics aggregator and clears all metrics. - */ - close() { - this._forceFlush = true; - clearInterval(this._interval); - this._flush(); - } - /** - * Flushes the buckets according to the internal state of the aggregator. - * If it is a force flush, which happens on shutdown, it will flush all buckets. - * Otherwise, it will only flush buckets that are older than the flush interval, - * and according to the flush shift. - * - * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties. - */ - _flush() { - if (this._forceFlush) { - this._forceFlush = false; - this._bucketsTotalWeight = 0; - this._captureMetrics(this._buckets); - this._buckets.clear(); - return; - } - const cutoffSeconds = Math.floor(timestampInSeconds()) - DEFAULT_FLUSH_INTERVAL / 1e3 - this._flushShift; - const flushedBuckets = /* @__PURE__ */ new Map(); - for (const [key, bucket] of this._buckets) { - if (bucket.timestamp <= cutoffSeconds) { - flushedBuckets.set(key, bucket); - this._bucketsTotalWeight -= bucket.metric.weight; - } - } - for (const [key] of flushedBuckets) { - this._buckets.delete(key); - } - this._captureMetrics(flushedBuckets); - } - /** - * Only captures a subset of the buckets passed to this function. - * @param flushedBuckets - */ - _captureMetrics(flushedBuckets) { - if (flushedBuckets.size > 0) { - const buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem); - captureAggregateMetrics(this._client, buckets); - } - } -} -function increment$1(name2, value4 = 1, data25) { - metrics$1.increment(MetricsAggregator, name2, value4, data25); -} -__name(increment$1, "increment$1"); -function distribution$1(name2, value4, data25) { - metrics$1.distribution(MetricsAggregator, name2, value4, data25); -} -__name(distribution$1, "distribution$1"); -function set$6(name2, value4, data25) { - metrics$1.set(MetricsAggregator, name2, value4, data25); -} -__name(set$6, "set$6"); -function gauge$1(name2, value4, data25) { - metrics$1.gauge(MetricsAggregator, name2, value4, data25); -} -__name(gauge$1, "gauge$1"); -function timing$1(name2, value4, unit = "second", data25) { - return metrics$1.timing(MetricsAggregator, name2, value4, unit, data25); -} -__name(timing$1, "timing$1"); -function getMetricsAggregatorForClient(client) { - return metrics$1.getMetricsAggregatorForClient(client, MetricsAggregator); -} -__name(getMetricsAggregatorForClient, "getMetricsAggregatorForClient"); -const metricsDefault = { - increment: increment$1, - distribution: distribution$1, - set: set$6, - gauge: gauge$1, - timing: timing$1, - /** - * @ignore This is for internal use only. - */ - getMetricsAggregatorForClient -}; -class BrowserMetricsAggregator { - static { - __name(this, "BrowserMetricsAggregator"); - } - // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets - // when the aggregator is garbage collected. - // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - constructor(_client) { - this._client = _client; - this._buckets = /* @__PURE__ */ new Map(); - this._interval = setInterval(() => this.flush(), DEFAULT_BROWSER_FLUSH_INTERVAL); - } - /** - * @inheritDoc - */ - add(metricType, unsanitizedName, value4, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = timestampInSeconds()) { - const timestamp2 = Math.floor(maybeFloatTimestamp); - const name2 = sanitizeMetricKey(unsanitizedName); - const tags = sanitizeTags(unsanitizedTags); - const unit = sanitizeUnit(unsanitizedUnit); - const bucketKey = getBucketKey(metricType, name2, unit, tags); - let bucketItem = this._buckets.get(bucketKey); - const previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0; - if (bucketItem) { - bucketItem.metric.add(value4); - if (bucketItem.timestamp < timestamp2) { - bucketItem.timestamp = timestamp2; - } - } else { - bucketItem = { - // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. - metric: new METRIC_MAP[metricType](value4), - timestamp: timestamp2, - metricType, - name: name2, - unit, - tags - }; - this._buckets.set(bucketKey, bucketItem); - } - const val = typeof value4 === "string" ? bucketItem.metric.weight - previousWeight : value4; - updateMetricSummaryOnActiveSpan(metricType, name2, val, unit, unsanitizedTags, bucketKey); - } - /** - * @inheritDoc - */ - flush() { - if (this._buckets.size === 0) { - return; - } - const metricBuckets = Array.from(this._buckets.values()); - captureAggregateMetrics(this._client, metricBuckets); - this._buckets.clear(); - } - /** - * @inheritDoc - */ - close() { - clearInterval(this._interval); - this.flush(); - } -} -function instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeaders2, spans, spanOrigin = "auto.http.browser") { - if (!handlerData.fetchData) { - return void 0; - } - const shouldCreateSpanResult = hasTracingEnabled() && shouldCreateSpan(handlerData.fetchData.url); - if (handlerData.endTimestamp && shouldCreateSpanResult) { - const spanId = handlerData.fetchData.__span; - if (!spanId) return; - const span2 = spans[spanId]; - if (span2) { - endSpan(span2, handlerData); - delete spans[spanId]; - } - return void 0; - } - const { method, url } = handlerData.fetchData; - const fullUrl = getFullURL$1(url); - const host = fullUrl ? parseUrl$1(fullUrl).host : void 0; - const hasParent = !!getActiveSpan(); - const span = shouldCreateSpanResult && hasParent ? startInactiveSpan({ - name: `${method} ${url}`, - attributes: { - url, - type: "fetch", - "http.method": method, - "http.url": fullUrl, - "server.address": host, - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, - [SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.client" - } - }) : new SentryNonRecordingSpan(); - handlerData.fetchData.__span = span.spanContext().spanId; - spans[span.spanContext().spanId] = span; - if (shouldAttachHeaders2(handlerData.fetchData.url)) { - const request = handlerData.args[0]; - const options4 = handlerData.args[1] || {}; - const headers = _addTracingHeadersToFetchRequest( - request, - options4, - // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction), - // we do not want to use the span as base for the trace headers, - // which means that the headers will be generated from the scope and the sampling decision is deferred - hasTracingEnabled() && hasParent ? span : void 0 - ); - if (headers) { - handlerData.args[1] = options4; - options4.headers = headers; - } - } - return span; -} -__name(instrumentFetchRequest, "instrumentFetchRequest"); -function _addTracingHeadersToFetchRequest(request, fetchOptionsObj, span) { - const traceHeaders = getTraceData({ span }); - const sentryTrace = traceHeaders["sentry-trace"]; - const baggage = traceHeaders.baggage; - if (!sentryTrace) { - return void 0; - } - const headers = fetchOptionsObj.headers || (isRequest$1(request) ? request.headers : void 0); - if (!headers) { - return { ...traceHeaders }; - } else if (isHeaders$1(headers)) { - const newHeaders = new Headers(headers); - newHeaders.set("sentry-trace", sentryTrace); - if (baggage) { - const prevBaggageHeader = newHeaders.get("baggage"); - if (prevBaggageHeader) { - const prevHeaderStrippedFromSentryBaggage = stripBaggageHeaderOfSentryBaggageValues(prevBaggageHeader); - newHeaders.set( - "baggage", - // If there are non-sentry entries (i.e. if the stripped string is non-empty/truthy) combine the stripped header and sentry baggage header - // otherwise just set the sentry baggage header - prevHeaderStrippedFromSentryBaggage ? `${prevHeaderStrippedFromSentryBaggage},${baggage}` : baggage - ); - } else { - newHeaders.set("baggage", baggage); - } - } - return newHeaders; - } else if (Array.isArray(headers)) { - const newHeaders = [ - ...headers.filter((header3) => { - return !(Array.isArray(header3) && header3[0] === "sentry-trace"); - }).map((header3) => { - if (Array.isArray(header3) && header3[0] === "baggage" && typeof header3[1] === "string") { - const [headerName, headerValue, ...rest] = header3; - return [headerName, stripBaggageHeaderOfSentryBaggageValues(headerValue), ...rest]; - } else { - return header3; - } - }), - // Attach the new sentry-trace header - ["sentry-trace", sentryTrace] - ]; - if (baggage) { - newHeaders.push(["baggage", baggage]); - } - return newHeaders; - } else { - const existingBaggageHeader = "baggage" in headers ? headers.baggage : void 0; - let newBaggageHeaders = []; - if (Array.isArray(existingBaggageHeader)) { - newBaggageHeaders = existingBaggageHeader.map( - (headerItem) => typeof headerItem === "string" ? stripBaggageHeaderOfSentryBaggageValues(headerItem) : headerItem - ).filter((headerItem) => headerItem === ""); - } else if (existingBaggageHeader) { - newBaggageHeaders.push(stripBaggageHeaderOfSentryBaggageValues(existingBaggageHeader)); - } - if (baggage) { - newBaggageHeaders.push(baggage); - } - return { - ...headers, - "sentry-trace": sentryTrace, - baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(",") : void 0 - }; - } -} -__name(_addTracingHeadersToFetchRequest, "_addTracingHeadersToFetchRequest"); -function addTracingHeadersToFetchRequest(request, _client, _scope, fetchOptionsObj, span) { - return _addTracingHeadersToFetchRequest(request, fetchOptionsObj, span); -} -__name(addTracingHeadersToFetchRequest, "addTracingHeadersToFetchRequest"); -function getFullURL$1(url) { - try { - const parsed = new URL(url); - return parsed.href; - } catch (e2) { - return void 0; - } -} -__name(getFullURL$1, "getFullURL$1"); -function endSpan(span, handlerData) { - if (handlerData.response) { - setHttpStatus(span, handlerData.response.status); - const contentLength = handlerData.response && handlerData.response.headers && handlerData.response.headers.get("content-length"); - if (contentLength) { - const contentLengthNum = parseInt(contentLength); - if (contentLengthNum > 0) { - span.setAttribute("http.response_content_length", contentLengthNum); - } - } - } else if (handlerData.error) { - span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" }); - } - span.end(); -} -__name(endSpan, "endSpan"); -function stripBaggageHeaderOfSentryBaggageValues(baggageHeader) { - return baggageHeader.split(",").filter((baggageEntry) => !baggageEntry.split("=")[0].startsWith(SENTRY_BAGGAGE_KEY_PREFIX)).join(","); -} -__name(stripBaggageHeaderOfSentryBaggageValues, "stripBaggageHeaderOfSentryBaggageValues"); -function isRequest$1(request) { - return typeof Request !== "undefined" && isInstanceOf(request, Request); -} -__name(isRequest$1, "isRequest$1"); -function isHeaders$1(headers) { - return typeof Headers !== "undefined" && isInstanceOf(headers, Headers); -} -__name(isHeaders$1, "isHeaders$1"); -const trpcCaptureContext = { mechanism: { handled: false, data: { function: "trpcMiddleware" } } }; -function captureIfError(nextResult) { - if (typeof nextResult === "object" && nextResult !== null && "ok" in nextResult && !nextResult.ok && "error" in nextResult) { - captureException(nextResult.error, trpcCaptureContext); - } -} -__name(captureIfError, "captureIfError"); -function trpcMiddleware(options4 = {}) { - return async function(opts) { - const { path, type, next: next2, rawInput, getRawInput } = opts; - const client = getClient(); - const clientOptions = client && client.getOptions(); - const trpcContext = { - procedure_path: path, - procedure_type: type - }; - if (options4.attachRpcInput !== void 0 ? options4.attachRpcInput : clientOptions && clientOptions.sendDefaultPii) { - if (rawInput !== void 0) { - trpcContext.input = normalize$2(rawInput); - } - if (getRawInput !== void 0 && typeof getRawInput === "function") { - try { - const rawRes = await getRawInput(); - trpcContext.input = normalize$2(rawRes); - } catch (err) { - } - } - } - return withScope((scope) => { - scope.setContext("trpc", trpcContext); - return startSpanManual( - { - name: `trpc/${path}`, - op: "rpc.server", - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "route", - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.rpc.trpc" - } - }, - async (span) => { - try { - const nextResult = await next2(); - captureIfError(nextResult); - span.end(); - return nextResult; - } catch (e2) { - captureException(e2, trpcCaptureContext); - span.end(); - throw e2; - } - } - ); - }); - }; -} -__name(trpcMiddleware, "trpcMiddleware"); -function captureFeedback(params, hint = {}, scope = getCurrentScope$1()) { - const { message: message3, name: name2, email, url, source, associatedEventId, tags } = params; - const feedbackEvent = { - contexts: { - feedback: dropUndefinedKeys({ - contact_email: email, - name: name2, - message: message3, - url, - source, - associated_event_id: associatedEventId - }) - }, - type: "feedback", - level: "info", - tags - }; - const client = scope && scope.getClient() || getClient(); - if (client) { - client.emit("beforeSendFeedback", feedbackEvent, hint); - } - const eventId = scope.captureEvent(feedbackEvent, hint); - return eventId; -} -__name(captureFeedback, "captureFeedback"); -function getCurrentHubShim() { - return { - bindClient(client) { - const scope = getCurrentScope$1(); - scope.setClient(client); - }, - withScope, - getClient: /* @__PURE__ */ __name(() => getClient(), "getClient"), - getScope: getCurrentScope$1, - getIsolationScope, - captureException: /* @__PURE__ */ __name((exception, hint) => { - return getCurrentScope$1().captureException(exception, hint); - }, "captureException"), - captureMessage: /* @__PURE__ */ __name((message3, level, hint) => { - return getCurrentScope$1().captureMessage(message3, level, hint); - }, "captureMessage"), - captureEvent, - addBreadcrumb, - setUser, - setTags, - setTag: setTag$5, - setExtra, - setExtras, - setContext, - getIntegration(integration) { - const client = getClient(); - return client && client.getIntegrationByName(integration.id) || null; - }, - startSession, - endSession, - captureSession(end) { - if (end) { - return endSession(); - } - _sendSessionUpdate(); - } - }; -} -__name(getCurrentHubShim, "getCurrentHubShim"); -const getCurrentHub = getCurrentHubShim; -function _sendSessionUpdate() { - const scope = getCurrentScope$1(); - const client = getClient(); - const session = scope.getSession(); - if (client && session) { - client.captureSession(session); - } -} -__name(_sendSessionUpdate, "_sendSessionUpdate"); -function flatten(input) { - const result = []; - const flattenHelper = /* @__PURE__ */ __name((input2) => { - input2.forEach((el) => { - if (Array.isArray(el)) { - flattenHelper(el); - } else { - result.push(el); - } - }); - }, "flattenHelper"); - flattenHelper(input); - return result; -} -__name(flatten, "flatten"); -function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) { - if (statusCode === void 0) { - return void 0; - } else if (statusCode >= 400 && statusCode < 500) { - return "warning"; - } else if (statusCode >= 500) { - return "error"; - } else { - return void 0; - } -} -__name(getBreadcrumbLogLevelFromHttpStatusCode, "getBreadcrumbLogLevelFromHttpStatusCode"); -const WINDOW$7 = GLOBAL_OBJ; -function supportsErrorEvent() { - try { - new ErrorEvent(""); - return true; - } catch (e2) { - return false; - } -} -__name(supportsErrorEvent, "supportsErrorEvent"); -function supportsDOMError() { - try { - new DOMError(""); - return true; - } catch (e2) { - return false; - } -} -__name(supportsDOMError, "supportsDOMError"); -function supportsDOMException() { - try { - new DOMException(""); - return true; - } catch (e2) { - return false; - } -} -__name(supportsDOMException, "supportsDOMException"); -function supportsFetch() { - if (!("fetch" in WINDOW$7)) { - return false; - } - try { - new Headers(); - new Request("http://www.example.com"); - new Response(); - return true; - } catch (e2) { - return false; - } -} -__name(supportsFetch, "supportsFetch"); -function isNativeFunction(func) { - return func && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); -} -__name(isNativeFunction, "isNativeFunction"); -function supportsNativeFetch() { - if (typeof EdgeRuntime === "string") { - return true; - } - if (!supportsFetch()) { - return false; - } - if (isNativeFunction(WINDOW$7.fetch)) { - return true; - } - let result = false; - const doc2 = WINDOW$7.document; - if (doc2 && typeof doc2.createElement === "function") { - try { - const sandbox = doc2.createElement("iframe"); - sandbox.hidden = true; - doc2.head.appendChild(sandbox); - if (sandbox.contentWindow && sandbox.contentWindow.fetch) { - result = isNativeFunction(sandbox.contentWindow.fetch); - } - doc2.head.removeChild(sandbox); - } catch (err) { - DEBUG_BUILD$5 && logger$2.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", err); - } - } - return result; -} -__name(supportsNativeFetch, "supportsNativeFetch"); -function supportsReportingObserver() { - return "ReportingObserver" in WINDOW$7; -} -__name(supportsReportingObserver, "supportsReportingObserver"); -function supportsReferrerPolicy() { - if (!supportsFetch()) { - return false; - } - try { - new Request("_", { - referrerPolicy: "origin" - }); - return true; - } catch (e2) { - return false; - } -} -__name(supportsReferrerPolicy, "supportsReferrerPolicy"); -function addFetchInstrumentationHandler(handler6, skipNativeFetchCheck) { - const type = "fetch"; - addHandler$1(type, handler6); - maybeInstrument(type, () => instrumentFetch(void 0, skipNativeFetchCheck)); -} -__name(addFetchInstrumentationHandler, "addFetchInstrumentationHandler"); -function addFetchEndInstrumentationHandler(handler6) { - const type = "fetch-body-resolved"; - addHandler$1(type, handler6); - maybeInstrument(type, () => instrumentFetch(streamHandler)); -} -__name(addFetchEndInstrumentationHandler, "addFetchEndInstrumentationHandler"); -function instrumentFetch(onFetchResolved, skipNativeFetchCheck = false) { - if (skipNativeFetchCheck && !supportsNativeFetch()) { - return; - } - fill(GLOBAL_OBJ, "fetch", function(originalFetch) { - return function(...args) { - const virtualError = new Error(); - const { method, url } = parseFetchArgs(args); - const handlerData = { - args, - fetchData: { - method, - url - }, - startTimestamp: timestampInSeconds() * 1e3, - // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation - virtualError - }; - if (!onFetchResolved) { - triggerHandlers$1("fetch", { - ...handlerData - }); - } - return originalFetch.apply(GLOBAL_OBJ, args).then( - async (response) => { - if (onFetchResolved) { - onFetchResolved(response); - } else { - triggerHandlers$1("fetch", { - ...handlerData, - endTimestamp: timestampInSeconds() * 1e3, - response - }); - } - return response; - }, - (error2) => { - triggerHandlers$1("fetch", { - ...handlerData, - endTimestamp: timestampInSeconds() * 1e3, - error: error2 - }); - if (isError(error2) && error2.stack === void 0) { - error2.stack = virtualError.stack; - addNonEnumerableProperty(error2, "framesToPop", 1); - } - throw error2; - } - ); - }; - }); -} -__name(instrumentFetch, "instrumentFetch"); -async function resolveResponse(res, onFinishedResolving) { - if (res && res.body) { - const body = res.body; - const responseReader = body.getReader(); - const maxFetchDurationTimeout = setTimeout( - () => { - body.cancel().then(null, () => { - }); - }, - 90 * 1e3 - // 90s - ); - let readingActive = true; - while (readingActive) { - let chunkTimeout; - try { - chunkTimeout = setTimeout(() => { - body.cancel().then(null, () => { - }); - }, 5e3); - const { done } = await responseReader.read(); - clearTimeout(chunkTimeout); - if (done) { - onFinishedResolving(); - readingActive = false; - } - } catch (error2) { - readingActive = false; - } finally { - clearTimeout(chunkTimeout); - } - } - clearTimeout(maxFetchDurationTimeout); - responseReader.releaseLock(); - body.cancel().then(null, () => { - }); - } -} -__name(resolveResponse, "resolveResponse"); -function streamHandler(response) { - let clonedResponseForResolving; - try { - clonedResponseForResolving = response.clone(); - } catch (e2) { - return; - } - resolveResponse(clonedResponseForResolving, () => { - triggerHandlers$1("fetch-body-resolved", { - endTimestamp: timestampInSeconds() * 1e3, - response - }); - }); -} -__name(streamHandler, "streamHandler"); -function hasProp(obj, prop2) { - return !!obj && typeof obj === "object" && !!obj[prop2]; -} -__name(hasProp, "hasProp"); -function getUrlFromResource(resource) { - if (typeof resource === "string") { - return resource; - } - if (!resource) { - return ""; - } - if (hasProp(resource, "url")) { - return resource.url; - } - if (resource.toString) { - return resource.toString(); - } - return ""; -} -__name(getUrlFromResource, "getUrlFromResource"); -function parseFetchArgs(fetchArgs) { - if (fetchArgs.length === 0) { - return { method: "GET", url: "" }; - } - if (fetchArgs.length === 2) { - const [url, options4] = fetchArgs; - return { - url: getUrlFromResource(url), - method: hasProp(options4, "method") ? String(options4.method).toUpperCase() : "GET" - }; - } - const arg = fetchArgs[0]; - return { - url: getUrlFromResource(arg), - method: hasProp(arg, "method") ? String(arg.method).toUpperCase() : "GET" - }; -} -__name(parseFetchArgs, "parseFetchArgs"); -function isBrowserBundle() { - return typeof __SENTRY_BROWSER_BUNDLE__ !== "undefined" && !!__SENTRY_BROWSER_BUNDLE__; -} -__name(isBrowserBundle, "isBrowserBundle"); -function getSDKSource() { - return "npm"; -} -__name(getSDKSource, "getSDKSource"); -function isNodeEnv() { - return !isBrowserBundle() && Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]"; -} -__name(isNodeEnv, "isNodeEnv"); -function dynamicRequire(mod, request) { - return mod.require(request); -} -__name(dynamicRequire, "dynamicRequire"); -function loadModule(moduleName) { - let mod; - try { - mod = dynamicRequire(module, moduleName); - } catch (e2) { - } - if (!mod) { - try { - const { cwd } = dynamicRequire(module, "process"); - mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`); - } catch (e2) { - } - } - return mod; -} -__name(loadModule, "loadModule"); -function isBrowser$1() { - return typeof window !== "undefined" && (!isNodeEnv() || isElectronNodeRenderer()); -} -__name(isBrowser$1, "isBrowser$1"); -function isElectronNodeRenderer() { - const process2 = GLOBAL_OBJ.process; - return !!process2 && process2.type === "renderer"; -} -__name(isElectronNodeRenderer, "isElectronNodeRenderer"); -function filenameIsInApp(filename, isNative = false) { - const isInternal = isNative || filename && // It's not internal if it's an absolute linux path - !filename.startsWith("/") && // It's not internal if it's an absolute windows path - !filename.match(/^[A-Z]:/) && // It's not internal if the path is starting with a dot - !filename.startsWith(".") && // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack - !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//); - return !isInternal && filename !== void 0 && !filename.includes("node_modules/"); -} -__name(filenameIsInApp, "filenameIsInApp"); -function node(getModule) { - const FILENAME_MATCH = /^\s*[-]{4,}$/; - const FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; - return (line) => { - const lineMatch = line.match(FULL_MATCH); - if (lineMatch) { - let object; - let method; - let functionName; - let typeName; - let methodName; - if (lineMatch[1]) { - functionName = lineMatch[1]; - let methodStart = functionName.lastIndexOf("."); - if (functionName[methodStart - 1] === ".") { - methodStart--; - } - if (methodStart > 0) { - object = functionName.slice(0, methodStart); - method = functionName.slice(methodStart + 1); - const objectEnd = object.indexOf(".Module"); - if (objectEnd > 0) { - functionName = functionName.slice(objectEnd + 1); - object = object.slice(0, objectEnd); - } - } - typeName = void 0; - } - if (method) { - typeName = object; - methodName = method; - } - if (method === "") { - methodName = void 0; - functionName = void 0; - } - if (functionName === void 0) { - methodName = methodName || UNKNOWN_FUNCTION; - functionName = typeName ? `${typeName}.${methodName}` : methodName; - } - let filename = lineMatch[2] && lineMatch[2].startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2]; - const isNative = lineMatch[5] === "native"; - if (filename && filename.match(/\/[A-Z]:/)) { - filename = filename.slice(1); - } - if (!filename && lineMatch[5] && !isNative) { - filename = lineMatch[5]; - } - return { - filename: filename ? decodeURI(filename) : void 0, - module: getModule ? getModule(filename) : void 0, - function: functionName, - lineno: _parseIntOrUndefined(lineMatch[3]), - colno: _parseIntOrUndefined(lineMatch[4]), - in_app: filenameIsInApp(filename || "", isNative) - }; - } - if (line.match(FILENAME_MATCH)) { - return { - filename: line - }; - } - return void 0; - }; -} -__name(node, "node"); -function nodeStackLineParser(getModule) { - return [90, node(getModule)]; -} -__name(nodeStackLineParser, "nodeStackLineParser"); -function _parseIntOrUndefined(input) { - return parseInt(input || "", 10) || void 0; -} -__name(_parseIntOrUndefined, "_parseIntOrUndefined"); -function makeFifoCache(size2) { - let evictionOrder = []; - let cache2 = {}; - return { - add(key, value4) { - while (evictionOrder.length >= size2) { - const evictCandidate = evictionOrder.shift(); - if (evictCandidate !== void 0) { - delete cache2[evictCandidate]; - } - } - if (cache2[key]) { - this.delete(key); - } - evictionOrder.push(key); - cache2[key] = value4; - }, - clear() { - cache2 = {}; - evictionOrder = []; - }, - get(key) { - return cache2[key]; - }, - size() { - return evictionOrder.length; - }, - // Delete cache key and return true if it existed, false otherwise. - delete(key) { - if (!cache2[key]) { - return false; - } - delete cache2[key]; - for (let i2 = 0; i2 < evictionOrder.length; i2++) { - if (evictionOrder[i2] === key) { - evictionOrder.splice(i2, 1); - break; - } - } - return true; - } - }; -} -__name(makeFifoCache, "makeFifoCache"); -function watchdogTimer(createTimer, pollInterval, anrThreshold, callback) { - const timer = createTimer(); - let triggered = false; - let enabled = true; - setInterval(() => { - const diffMs = timer.getTimeMs(); - if (triggered === false && diffMs > pollInterval + anrThreshold) { - triggered = true; - if (enabled) { - callback(); - } - } - if (diffMs < pollInterval + anrThreshold) { - triggered = false; - } - }, 20); - return { - poll: /* @__PURE__ */ __name(() => { - timer.reset(); - }, "poll"), - enabled: /* @__PURE__ */ __name((state) => { - enabled = state; - }, "enabled") - }; -} -__name(watchdogTimer, "watchdogTimer"); -function callFrameToStackFrame(frame, url, getModuleFromFilename) { - const filename = url ? url.replace(/^file:\/\//, "") : void 0; - const colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : void 0; - const lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : void 0; - return dropUndefinedKeys({ - filename, - module: getModuleFromFilename(filename), - function: frame.functionName || UNKNOWN_FUNCTION, - colno, - lineno, - in_app: filename ? filenameIsInApp(filename) : void 0 - }); -} -__name(callFrameToStackFrame, "callFrameToStackFrame"); -class LRUMap { - static { - __name(this, "LRUMap"); - } - constructor(_maxSize) { - this._maxSize = _maxSize; - this._cache = /* @__PURE__ */ new Map(); - } - /** Get the current size of the cache */ - get size() { - return this._cache.size; - } - /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */ - get(key) { - const value4 = this._cache.get(key); - if (value4 === void 0) { - return void 0; - } - this._cache.delete(key); - this._cache.set(key, value4); - return value4; - } - /** Insert an entry and evict an older entry if we've reached maxSize */ - set(key, value4) { - if (this._cache.size >= this._maxSize) { - this._cache.delete(this._cache.keys().next().value); - } - this._cache.set(key, value4); - } - /** Remove an entry and return the entry if it was in the cache */ - remove(key) { - const value4 = this._cache.get(key); - if (value4) { - this._cache.delete(key); - } - return value4; - } - /** Clear all entries */ - clear() { - this._cache.clear(); - } - /** Get all the keys */ - keys() { - return Array.from(this._cache.keys()); - } - /** Get all the values */ - values() { - const values = []; - this._cache.forEach((value4) => values.push(value4)); - return values; - } -} -function vercelWaitUntil(task) { - const vercelRequestContextGlobal = ( - // @ts-expect-error This is not typed - GLOBAL_OBJ[Symbol.for("@vercel/request-context")] - ); - const ctx = vercelRequestContextGlobal && vercelRequestContextGlobal.get && vercelRequestContextGlobal.get() ? vercelRequestContextGlobal.get() : {}; - if (ctx && ctx.waitUntil) { - ctx.waitUntil(task); - } -} -__name(vercelWaitUntil, "vercelWaitUntil"); -function escapeStringForRegex(regexString) { - return regexString.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d"); -} -__name(escapeStringForRegex, "escapeStringForRegex"); -const WINDOW$6 = GLOBAL_OBJ; -function supportsHistory() { - const chromeVar = WINDOW$6.chrome; - const isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime; - const hasHistoryApi = "history" in WINDOW$6 && !!WINDOW$6.history.pushState && !!WINDOW$6.history.replaceState; - return !isChromePackagedApp && hasHistoryApi; -} -__name(supportsHistory, "supportsHistory"); -function _nullishCoalesce(lhs, rhsFn) { - return lhs != null ? lhs : rhsFn(); -} -__name(_nullishCoalesce, "_nullishCoalesce"); -async function _asyncNullishCoalesce(lhs, rhsFn) { - return _nullishCoalesce(lhs, rhsFn); -} -__name(_asyncNullishCoalesce, "_asyncNullishCoalesce"); -async function _asyncOptionalChain(ops) { - let lastAccessLHS = void 0; - let value4 = ops[0]; - let i2 = 1; - while (i2 < ops.length) { - const op = ops[i2]; - const fn = ops[i2 + 1]; - i2 += 2; - if ((op === "optionalAccess" || op === "optionalCall") && value4 == null) { - return; - } - if (op === "access" || op === "optionalAccess") { - lastAccessLHS = value4; - value4 = await fn(value4); - } else if (op === "call" || op === "optionalCall") { - value4 = await fn((...args) => value4.call(lastAccessLHS, ...args)); - lastAccessLHS = void 0; - } - } - return value4; -} -__name(_asyncOptionalChain, "_asyncOptionalChain"); -async function _asyncOptionalChainDelete(ops) { - const result = await _asyncOptionalChain(ops); - return result == null ? true : result; -} -__name(_asyncOptionalChainDelete, "_asyncOptionalChainDelete"); -function _optionalChain(ops) { - let lastAccessLHS = void 0; - let value4 = ops[0]; - let i2 = 1; - while (i2 < ops.length) { - const op = ops[i2]; - const fn = ops[i2 + 1]; - i2 += 2; - if ((op === "optionalAccess" || op === "optionalCall") && value4 == null) { - return; - } - if (op === "access" || op === "optionalAccess") { - lastAccessLHS = value4; - value4 = fn(value4); - } else if (op === "call" || op === "optionalCall") { - value4 = fn((...args) => value4.call(lastAccessLHS, ...args)); - lastAccessLHS = void 0; - } - } - return value4; -} -__name(_optionalChain, "_optionalChain"); -function _optionalChainDelete(ops) { - const result = _optionalChain(ops); - return result == null ? true : result; -} -__name(_optionalChainDelete, "_optionalChainDelete"); -const WINDOW$5 = GLOBAL_OBJ; -let ignoreOnError = 0; -function shouldIgnoreOnError() { - return ignoreOnError > 0; -} -__name(shouldIgnoreOnError, "shouldIgnoreOnError"); -function ignoreNextOnError() { - ignoreOnError++; - setTimeout(() => { - ignoreOnError--; - }); -} -__name(ignoreNextOnError, "ignoreNextOnError"); -function wrap$1(fn, options4 = {}) { - function isFunction2(fn2) { - return typeof fn2 === "function"; - } - __name(isFunction2, "isFunction"); - if (!isFunction2(fn)) { - return fn; - } - try { - const wrapper = fn.__sentry_wrapped__; - if (wrapper) { - if (typeof wrapper === "function") { - return wrapper; - } else { - return fn; - } - } - if (getOriginalFunction(fn)) { - return fn; - } - } catch (e2) { - return fn; - } - const sentryWrapped = /* @__PURE__ */ __name(function(...args) { - try { - const wrappedArguments = args.map((arg) => wrap$1(arg, options4)); - return fn.apply(this, wrappedArguments); - } catch (ex) { - ignoreNextOnError(); - withScope((scope) => { - scope.addEventProcessor((event) => { - if (options4.mechanism) { - addExceptionTypeValue(event, void 0, void 0); - addExceptionMechanism(event, options4.mechanism); - } - event.extra = { - ...event.extra, - arguments: args - }; - return event; - }); - captureException(ex); - }); - throw ex; - } - }, "sentryWrapped"); - try { - for (const property in fn) { - if (Object.prototype.hasOwnProperty.call(fn, property)) { - sentryWrapped[property] = fn[property]; - } - } - } catch (e2) { - } - markFunctionWrapped(sentryWrapped, fn); - addNonEnumerableProperty(fn, "__sentry_wrapped__", sentryWrapped); - try { - const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, "name"); - if (descriptor.configurable) { - Object.defineProperty(sentryWrapped, "name", { - get() { - return fn.name; - } - }); - } - } catch (e3) { - } - return sentryWrapped; -} -__name(wrap$1, "wrap$1"); -const DEBUG_BUILD$4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; -function exceptionFromError(stackParser, ex) { - const frames = parseStackFrames(stackParser, ex); - const exception = { - type: extractType(ex), - value: extractMessage(ex) - }; - if (frames.length) { - exception.stacktrace = { frames }; - } - if (exception.type === void 0 && exception.value === "") { - exception.value = "Unrecoverable error caught"; - } - return exception; -} -__name(exceptionFromError, "exceptionFromError"); -function eventFromPlainObject(stackParser, exception, syntheticException, isUnhandledRejection) { - const client = getClient(); - const normalizeDepth = client && client.getOptions().normalizeDepth; - const errorFromProp = getErrorPropertyFromObject(exception); - const extra = { - __serialized__: normalizeToSize(exception, normalizeDepth) - }; - if (errorFromProp) { - return { - exception: { - values: [exceptionFromError(stackParser, errorFromProp)] - }, - extra - }; - } - const event = { - exception: { - values: [ - { - type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? "UnhandledRejection" : "Error", - value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }) - } - ] - }, - extra - }; - if (syntheticException) { - const frames = parseStackFrames(stackParser, syntheticException); - if (frames.length) { - event.exception.values[0].stacktrace = { frames }; - } - } - return event; -} -__name(eventFromPlainObject, "eventFromPlainObject"); -function eventFromError(stackParser, ex) { - return { - exception: { - values: [exceptionFromError(stackParser, ex)] - } - }; -} -__name(eventFromError, "eventFromError"); -function parseStackFrames(stackParser, ex) { - const stacktrace = ex.stacktrace || ex.stack || ""; - const skipLines = getSkipFirstStackStringLines(ex); - const framesToPop = getPopFirstTopFrames(ex); - try { - return stackParser(stacktrace, skipLines, framesToPop); - } catch (e2) { - } - return []; -} -__name(parseStackFrames, "parseStackFrames"); -const reactMinifiedRegexp = /Minified React error #\d+;/i; -function getSkipFirstStackStringLines(ex) { - if (ex && reactMinifiedRegexp.test(ex.message)) { - return 1; - } - return 0; -} -__name(getSkipFirstStackStringLines, "getSkipFirstStackStringLines"); -function getPopFirstTopFrames(ex) { - if (typeof ex.framesToPop === "number") { - return ex.framesToPop; - } - return 0; -} -__name(getPopFirstTopFrames, "getPopFirstTopFrames"); -function isWebAssemblyException(exception) { - if (typeof WebAssembly !== "undefined" && typeof WebAssembly.Exception !== "undefined") { - return exception instanceof WebAssembly.Exception; - } else { - return false; - } -} -__name(isWebAssemblyException, "isWebAssemblyException"); -function extractType(ex) { - const name2 = ex && ex.name; - if (!name2 && isWebAssemblyException(ex)) { - const hasTypeInMessage = ex.message && Array.isArray(ex.message) && ex.message.length == 2; - return hasTypeInMessage ? ex.message[0] : "WebAssembly.Exception"; - } - return name2; -} -__name(extractType, "extractType"); -function extractMessage(ex) { - const message3 = ex && ex.message; - if (!message3) { - return "No error message"; - } - if (message3.error && typeof message3.error.message === "string") { - return message3.error.message; - } - if (isWebAssemblyException(ex) && Array.isArray(ex.message) && ex.message.length == 2) { - return ex.message[1]; - } - return message3; -} -__name(extractMessage, "extractMessage"); -function eventFromException(stackParser, exception, hint, attachStacktrace) { - const syntheticException = hint && hint.syntheticException || void 0; - const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace); - addExceptionMechanism(event); - event.level = "error"; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return resolvedSyncPromise(event); -} -__name(eventFromException, "eventFromException"); -function eventFromMessage(stackParser, message3, level = "info", hint, attachStacktrace) { - const syntheticException = hint && hint.syntheticException || void 0; - const event = eventFromString(stackParser, message3, syntheticException, attachStacktrace); - event.level = level; - if (hint && hint.event_id) { - event.event_id = hint.event_id; - } - return resolvedSyncPromise(event); -} -__name(eventFromMessage, "eventFromMessage"); -function eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace, isUnhandledRejection) { - let event; - if (isErrorEvent$2(exception) && exception.error) { - const errorEvent = exception; - return eventFromError(stackParser, errorEvent.error); - } - if (isDOMError(exception) || isDOMException(exception)) { - const domException = exception; - if ("stack" in exception) { - event = eventFromError(stackParser, exception); - } else { - const name2 = domException.name || (isDOMError(domException) ? "DOMError" : "DOMException"); - const message3 = domException.message ? `${name2}: ${domException.message}` : name2; - event = eventFromString(stackParser, message3, syntheticException, attachStacktrace); - addExceptionTypeValue(event, message3); - } - if ("code" in domException) { - event.tags = { ...event.tags, "DOMException.code": `${domException.code}` }; - } - return event; - } - if (isError(exception)) { - return eventFromError(stackParser, exception); - } - if (isPlainObject$5(exception) || isEvent(exception)) { - const objectException = exception; - event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection); - addExceptionMechanism(event, { - synthetic: true - }); - return event; - } - event = eventFromString(stackParser, exception, syntheticException, attachStacktrace); - addExceptionTypeValue(event, `${exception}`, void 0); - addExceptionMechanism(event, { - synthetic: true - }); - return event; -} -__name(eventFromUnknownInput, "eventFromUnknownInput"); -function eventFromString(stackParser, message3, syntheticException, attachStacktrace) { - const event = {}; - if (attachStacktrace && syntheticException) { - const frames = parseStackFrames(stackParser, syntheticException); - if (frames.length) { - event.exception = { - values: [{ value: message3, stacktrace: { frames } }] - }; - } - addExceptionMechanism(event, { synthetic: true }); - } - if (isParameterizedString(message3)) { - const { __sentry_template_string__, __sentry_template_values__ } = message3; - event.logentry = { - message: __sentry_template_string__, - params: __sentry_template_values__ - }; - return event; - } - event.message = message3; - return event; -} -__name(eventFromString, "eventFromString"); -function getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }) { - const keys2 = extractExceptionKeysForMessage(exception); - const captureType = isUnhandledRejection ? "promise rejection" : "exception"; - if (isErrorEvent$2(exception)) { - return `Event \`ErrorEvent\` captured as ${captureType} with message \`${exception.message}\``; - } - if (isEvent(exception)) { - const className = getObjectClassName(exception); - return `Event \`${className}\` (type=${exception.type}) captured as ${captureType}`; - } - return `Object captured as ${captureType} with keys: ${keys2}`; -} -__name(getNonErrorObjectExceptionValue, "getNonErrorObjectExceptionValue"); -function getObjectClassName(obj) { - try { - const prototype2 = Object.getPrototypeOf(obj); - return prototype2 ? prototype2.constructor.name : void 0; - } catch (e2) { - } -} -__name(getObjectClassName, "getObjectClassName"); -function getErrorPropertyFromObject(obj) { - for (const prop2 in obj) { - if (Object.prototype.hasOwnProperty.call(obj, prop2)) { - const value4 = obj[prop2]; - if (value4 instanceof Error) { - return value4; - } - } - } - return void 0; -} -__name(getErrorPropertyFromObject, "getErrorPropertyFromObject"); -function createUserFeedbackEnvelope(feedback, { - metadata, - tunnel, - dsn -}) { - const headers = { - event_id: feedback.event_id, - sent_at: (/* @__PURE__ */ new Date()).toISOString(), - ...metadata && metadata.sdk && { - sdk: { - name: metadata.sdk.name, - version: metadata.sdk.version - } - }, - ...!!tunnel && !!dsn && { dsn: dsnToString(dsn) } - }; - const item3 = createUserFeedbackEnvelopeItem(feedback); - return createEnvelope(headers, [item3]); -} -__name(createUserFeedbackEnvelope, "createUserFeedbackEnvelope"); -function createUserFeedbackEnvelopeItem(feedback) { - const feedbackHeaders = { - type: "user_report" - }; - return [feedbackHeaders, feedback]; -} -__name(createUserFeedbackEnvelopeItem, "createUserFeedbackEnvelopeItem"); -class BrowserClient extends BaseClient { - static { - __name(this, "BrowserClient"); - } - /** - * Creates a new Browser SDK instance. - * - * @param options Configuration options for this SDK. - */ - constructor(options4) { - const opts = { - // We default this to true, as it is the safer scenario - parentSpanIsAlwaysRootSpan: true, - ...options4 - }; - const sdkSource = WINDOW$5.SENTRY_SDK_SOURCE || getSDKSource(); - applySdkMetadata(opts, "browser", ["browser"], sdkSource); - super(opts); - if (opts.sendClientReports && WINDOW$5.document) { - WINDOW$5.document.addEventListener("visibilitychange", () => { - if (WINDOW$5.document.visibilityState === "hidden") { - this._flushOutcomes(); - } - }); - } - } - /** - * @inheritDoc - */ - eventFromException(exception, hint) { - return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace); - } - /** - * @inheritDoc - */ - eventFromMessage(message3, level = "info", hint) { - return eventFromMessage(this._options.stackParser, message3, level, hint, this._options.attachStacktrace); - } - /** - * Sends user feedback to Sentry. - * - * @deprecated Use `captureFeedback` instead. - */ - captureUserFeedback(feedback) { - if (!this._isEnabled()) { - DEBUG_BUILD$4 && logger$2.warn("SDK not enabled, will not capture user feedback."); - return; - } - const envelope = createUserFeedbackEnvelope(feedback, { - metadata: this.getSdkMetadata(), - dsn: this.getDsn(), - tunnel: this.getOptions().tunnel - }); - this.sendEnvelope(envelope); - } - /** - * @inheritDoc - */ - _prepareEvent(event, hint, scope) { - event.platform = event.platform || "javascript"; - return super._prepareEvent(event, hint, scope); - } -} -const DEBUG_BUILD$3 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; -const getRating = /* @__PURE__ */ __name((value4, thresholds) => { - if (value4 > thresholds[1]) { - return "poor"; - } - if (value4 > thresholds[0]) { - return "needs-improvement"; - } - return "good"; -}, "getRating"); -const bindReporter = /* @__PURE__ */ __name((callback, metric, thresholds, reportAllChanges) => { - let prevValue; - let delta2; - return (forceReport) => { - if (metric.value >= 0) { - if (forceReport || reportAllChanges) { - delta2 = metric.value - (prevValue || 0); - if (delta2 || prevValue === void 0) { - prevValue = metric.value; - metric.delta = delta2; - metric.rating = getRating(metric.value, thresholds); - callback(metric); - } - } - } - }; -}, "bindReporter"); -const WINDOW$4 = GLOBAL_OBJ; -const generateUniqueID = /* @__PURE__ */ __name(() => { - return `v4-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`; -}, "generateUniqueID"); -const getNavigationEntry = /* @__PURE__ */ __name((checkResponseStart = true) => { - const navigationEntry = WINDOW$4.performance && WINDOW$4.performance.getEntriesByType && WINDOW$4.performance.getEntriesByType("navigation")[0]; - if ( - // sentry-specific change: - // We don't want to check for responseStart for our own use of `getNavigationEntry` - !checkResponseStart || navigationEntry && navigationEntry.responseStart > 0 && navigationEntry.responseStart < performance.now() - ) { - return navigationEntry; - } -}, "getNavigationEntry"); -const getActivationStart = /* @__PURE__ */ __name(() => { - const navEntry = getNavigationEntry(); - return navEntry && navEntry.activationStart || 0; -}, "getActivationStart"); -const initMetric = /* @__PURE__ */ __name((name2, value4) => { - const navEntry = getNavigationEntry(); - let navigationType = "navigate"; - if (navEntry) { - if (WINDOW$4.document && WINDOW$4.document.prerendering || getActivationStart() > 0) { - navigationType = "prerender"; - } else if (WINDOW$4.document && WINDOW$4.document.wasDiscarded) { - navigationType = "restore"; - } else if (navEntry.type) { - navigationType = navEntry.type.replace(/_/g, "-"); - } - } - const entries = []; - return { - name: name2, - value: typeof value4 === "undefined" ? -1 : value4, - rating: "good", - // If needed, will be updated when reported. `const` to keep the type from widening to `string`. - delta: 0, - entries, - id: generateUniqueID(), - navigationType - }; -}, "initMetric"); -const observe = /* @__PURE__ */ __name((type, callback, opts) => { - try { - if (PerformanceObserver.supportedEntryTypes.includes(type)) { - const po2 = new PerformanceObserver((list2) => { - Promise.resolve().then(() => { - callback(list2.getEntries()); - }); - }); - po2.observe( - Object.assign( - { - type, - buffered: true - }, - opts || {} - ) - ); - return po2; - } - } catch (e2) { - } - return; -}, "observe"); -const onHidden = /* @__PURE__ */ __name((cb) => { - const onHiddenOrPageHide = /* @__PURE__ */ __name((event) => { - if (event.type === "pagehide" || WINDOW$4.document && WINDOW$4.document.visibilityState === "hidden") { - cb(event); - } - }, "onHiddenOrPageHide"); - if (WINDOW$4.document) { - addEventListener("visibilitychange", onHiddenOrPageHide, true); - addEventListener("pagehide", onHiddenOrPageHide, true); - } -}, "onHidden"); -const runOnce = /* @__PURE__ */ __name((cb) => { - let called = false; - return () => { - if (!called) { - cb(); - called = true; - } - }; -}, "runOnce"); -let firstHiddenTime = -1; -const initHiddenTime = /* @__PURE__ */ __name(() => { - return WINDOW$4.document.visibilityState === "hidden" && !WINDOW$4.document.prerendering ? 0 : Infinity; -}, "initHiddenTime"); -const onVisibilityUpdate = /* @__PURE__ */ __name((event) => { - if (WINDOW$4.document.visibilityState === "hidden" && firstHiddenTime > -1) { - firstHiddenTime = event.type === "visibilitychange" ? event.timeStamp : 0; - removeChangeListeners(); - } -}, "onVisibilityUpdate"); -const addChangeListeners = /* @__PURE__ */ __name(() => { - addEventListener("visibilitychange", onVisibilityUpdate, true); - addEventListener("prerenderingchange", onVisibilityUpdate, true); -}, "addChangeListeners"); -const removeChangeListeners = /* @__PURE__ */ __name(() => { - removeEventListener("visibilitychange", onVisibilityUpdate, true); - removeEventListener("prerenderingchange", onVisibilityUpdate, true); -}, "removeChangeListeners"); -const getVisibilityWatcher = /* @__PURE__ */ __name(() => { - if (WINDOW$4.document && firstHiddenTime < 0) { - firstHiddenTime = initHiddenTime(); - addChangeListeners(); - } - return { - get firstHiddenTime() { - return firstHiddenTime; - } - }; -}, "getVisibilityWatcher"); -const whenActivated = /* @__PURE__ */ __name((callback) => { - if (WINDOW$4.document && WINDOW$4.document.prerendering) { - addEventListener("prerenderingchange", () => callback(), true); - } else { - callback(); - } -}, "whenActivated"); -const FCPThresholds = [1800, 3e3]; -const onFCP = /* @__PURE__ */ __name((onReport, opts = {}) => { - whenActivated(() => { - const visibilityWatcher = getVisibilityWatcher(); - const metric = initMetric("FCP"); - let report; - const handleEntries = /* @__PURE__ */ __name((entries) => { - entries.forEach((entry) => { - if (entry.name === "first-contentful-paint") { - po2.disconnect(); - if (entry.startTime < visibilityWatcher.firstHiddenTime) { - metric.value = Math.max(entry.startTime - getActivationStart(), 0); - metric.entries.push(entry); - report(true); - } - } - }); - }, "handleEntries"); - const po2 = observe("paint", handleEntries); - if (po2) { - report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges); - } - }); -}, "onFCP"); -const CLSThresholds = [0.1, 0.25]; -const onCLS = /* @__PURE__ */ __name((onReport, opts = {}) => { - onFCP( - runOnce(() => { - const metric = initMetric("CLS", 0); - let report; - let sessionValue = 0; - let sessionEntries = []; - const handleEntries = /* @__PURE__ */ __name((entries) => { - entries.forEach((entry) => { - if (!entry.hadRecentInput) { - const firstSessionEntry = sessionEntries[0]; - const lastSessionEntry = sessionEntries[sessionEntries.length - 1]; - if (sessionValue && firstSessionEntry && lastSessionEntry && entry.startTime - lastSessionEntry.startTime < 1e3 && entry.startTime - firstSessionEntry.startTime < 5e3) { - sessionValue += entry.value; - sessionEntries.push(entry); - } else { - sessionValue = entry.value; - sessionEntries = [entry]; - } - } - }); - if (sessionValue > metric.value) { - metric.value = sessionValue; - metric.entries = sessionEntries; - report(); - } - }, "handleEntries"); - const po2 = observe("layout-shift", handleEntries); - if (po2) { - report = bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges); - onHidden(() => { - handleEntries(po2.takeRecords()); - report(true); - }); - setTimeout(report, 0); - } - }) - ); -}, "onCLS"); -const FIDThresholds = [100, 300]; -const onFID = /* @__PURE__ */ __name((onReport, opts = {}) => { - whenActivated(() => { - const visibilityWatcher = getVisibilityWatcher(); - const metric = initMetric("FID"); - let report; - const handleEntry = /* @__PURE__ */ __name((entry) => { - if (entry.startTime < visibilityWatcher.firstHiddenTime) { - metric.value = entry.processingStart - entry.startTime; - metric.entries.push(entry); - report(true); - } - }, "handleEntry"); - const handleEntries = /* @__PURE__ */ __name((entries) => { - entries.forEach(handleEntry); - }, "handleEntries"); - const po2 = observe("first-input", handleEntries); - report = bindReporter(onReport, metric, FIDThresholds, opts.reportAllChanges); - if (po2) { - onHidden( - runOnce(() => { - handleEntries(po2.takeRecords()); - po2.disconnect(); - }) - ); - } - }); -}, "onFID"); -let interactionCountEstimate = 0; -let minKnownInteractionId = Infinity; -let maxKnownInteractionId = 0; -const updateEstimate = /* @__PURE__ */ __name((entries) => { - entries.forEach((e2) => { - if (e2.interactionId) { - minKnownInteractionId = Math.min(minKnownInteractionId, e2.interactionId); - maxKnownInteractionId = Math.max(maxKnownInteractionId, e2.interactionId); - interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0; - } - }); -}, "updateEstimate"); -let po; -const getInteractionCount = /* @__PURE__ */ __name(() => { - return po ? interactionCountEstimate : performance.interactionCount || 0; -}, "getInteractionCount"); -const initInteractionCountPolyfill = /* @__PURE__ */ __name(() => { - if ("interactionCount" in performance || po) return; - po = observe("event", updateEstimate, { - type: "event", - buffered: true, - durationThreshold: 0 - }); -}, "initInteractionCountPolyfill"); -const longestInteractionList = []; -const longestInteractionMap = /* @__PURE__ */ new Map(); -const DEFAULT_DURATION_THRESHOLD = 40; -let prevInteractionCount = 0; -const getInteractionCountForNavigation = /* @__PURE__ */ __name(() => { - return getInteractionCount() - prevInteractionCount; -}, "getInteractionCountForNavigation"); -const estimateP98LongestInteraction = /* @__PURE__ */ __name(() => { - const candidateInteractionIndex = Math.min( - longestInteractionList.length - 1, - Math.floor(getInteractionCountForNavigation() / 50) - ); - return longestInteractionList[candidateInteractionIndex]; -}, "estimateP98LongestInteraction"); -const MAX_INTERACTIONS_TO_CONSIDER = 10; -const entryPreProcessingCallbacks = []; -const processInteractionEntry = /* @__PURE__ */ __name((entry) => { - entryPreProcessingCallbacks.forEach((cb) => cb(entry)); - if (!(entry.interactionId || entry.entryType === "first-input")) return; - const minLongestInteraction = longestInteractionList[longestInteractionList.length - 1]; - const existingInteraction = longestInteractionMap.get(entry.interactionId); - if (existingInteraction || longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER || minLongestInteraction && entry.duration > minLongestInteraction.latency) { - if (existingInteraction) { - if (entry.duration > existingInteraction.latency) { - existingInteraction.entries = [entry]; - existingInteraction.latency = entry.duration; - } else if (entry.duration === existingInteraction.latency && entry.startTime === (existingInteraction.entries[0] && existingInteraction.entries[0].startTime)) { - existingInteraction.entries.push(entry); - } - } else { - const interaction = { - id: entry.interactionId, - latency: entry.duration, - entries: [entry] - }; - longestInteractionMap.set(interaction.id, interaction); - longestInteractionList.push(interaction); - } - longestInteractionList.sort((a2, b2) => b2.latency - a2.latency); - if (longestInteractionList.length > MAX_INTERACTIONS_TO_CONSIDER) { - longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach((i2) => longestInteractionMap.delete(i2.id)); - } - } -}, "processInteractionEntry"); -const whenIdle = /* @__PURE__ */ __name((cb) => { - const rIC = WINDOW$4.requestIdleCallback || WINDOW$4.setTimeout; - let handle = -1; - cb = runOnce(cb); - if (WINDOW$4.document && WINDOW$4.document.visibilityState === "hidden") { - cb(); - } else { - handle = rIC(cb); - onHidden(cb); - } - return handle; -}, "whenIdle"); -const INPThresholds = [200, 500]; -const onINP = /* @__PURE__ */ __name((onReport, opts = {}) => { - if (!("PerformanceEventTiming" in WINDOW$4 && "interactionId" in PerformanceEventTiming.prototype)) { - return; - } - whenActivated(() => { - initInteractionCountPolyfill(); - const metric = initMetric("INP"); - let report; - const handleEntries = /* @__PURE__ */ __name((entries) => { - whenIdle(() => { - entries.forEach(processInteractionEntry); - const inp = estimateP98LongestInteraction(); - if (inp && inp.latency !== metric.value) { - metric.value = inp.latency; - metric.entries = inp.entries; - report(); - } - }); - }, "handleEntries"); - const po2 = observe("event", handleEntries, { - // Event Timing entries have their durations rounded to the nearest 8ms, - // so a duration of 40ms would be any event that spans 2.5 or more frames - // at 60Hz. This threshold is chosen to strike a balance between usefulness - // and performance. Running this callback for any interaction that spans - // just one or two frames is likely not worth the insight that could be - // gained. - durationThreshold: opts.durationThreshold != null ? opts.durationThreshold : DEFAULT_DURATION_THRESHOLD - }); - report = bindReporter(onReport, metric, INPThresholds, opts.reportAllChanges); - if (po2) { - po2.observe({ type: "first-input", buffered: true }); - onHidden(() => { - handleEntries(po2.takeRecords()); - report(true); - }); - } - }); -}, "onINP"); -const LCPThresholds = [2500, 4e3]; -const reportedMetricIDs = {}; -const onLCP = /* @__PURE__ */ __name((onReport, opts = {}) => { - whenActivated(() => { - const visibilityWatcher = getVisibilityWatcher(); - const metric = initMetric("LCP"); - let report; - const handleEntries = /* @__PURE__ */ __name((entries) => { - if (!opts.reportAllChanges) { - entries = entries.slice(-1); - } - entries.forEach((entry) => { - if (entry.startTime < visibilityWatcher.firstHiddenTime) { - metric.value = Math.max(entry.startTime - getActivationStart(), 0); - metric.entries = [entry]; - report(); - } - }); - }, "handleEntries"); - const po2 = observe("largest-contentful-paint", handleEntries); - if (po2) { - report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges); - const stopListening = runOnce(() => { - if (!reportedMetricIDs[metric.id]) { - handleEntries(po2.takeRecords()); - po2.disconnect(); - reportedMetricIDs[metric.id] = true; - report(true); - } - }); - ["keydown", "click"].forEach((type) => { - if (WINDOW$4.document) { - addEventListener(type, () => whenIdle(stopListening), { - once: true, - capture: true - }); - } - }); - onHidden(stopListening); - } - }); -}, "onLCP"); -const TTFBThresholds = [800, 1800]; -const whenReady = /* @__PURE__ */ __name((callback) => { - if (WINDOW$4.document && WINDOW$4.document.prerendering) { - whenActivated(() => whenReady(callback)); - } else if (WINDOW$4.document && WINDOW$4.document.readyState !== "complete") { - addEventListener("load", () => whenReady(callback), true); - } else { - setTimeout(callback, 0); - } -}, "whenReady"); -const onTTFB = /* @__PURE__ */ __name((onReport, opts = {}) => { - const metric = initMetric("TTFB"); - const report = bindReporter(onReport, metric, TTFBThresholds, opts.reportAllChanges); - whenReady(() => { - const navigationEntry = getNavigationEntry(); - if (navigationEntry) { - metric.value = Math.max(navigationEntry.responseStart - getActivationStart(), 0); - metric.entries = [navigationEntry]; - report(true); - } - }); -}, "onTTFB"); -const handlers$3 = {}; -const instrumented = {}; -let _previousCls; -let _previousFid; -let _previousLcp; -let _previousTtfb; -let _previousInp; -function addClsInstrumentationHandler(callback, stopOnCallback = false) { - return addMetricObserver("cls", callback, instrumentCls, _previousCls, stopOnCallback); -} -__name(addClsInstrumentationHandler, "addClsInstrumentationHandler"); -function addLcpInstrumentationHandler(callback, stopOnCallback = false) { - return addMetricObserver("lcp", callback, instrumentLcp, _previousLcp, stopOnCallback); -} -__name(addLcpInstrumentationHandler, "addLcpInstrumentationHandler"); -function addFidInstrumentationHandler(callback) { - return addMetricObserver("fid", callback, instrumentFid, _previousFid); -} -__name(addFidInstrumentationHandler, "addFidInstrumentationHandler"); -function addTtfbInstrumentationHandler(callback) { - return addMetricObserver("ttfb", callback, instrumentTtfb, _previousTtfb); -} -__name(addTtfbInstrumentationHandler, "addTtfbInstrumentationHandler"); -function addInpInstrumentationHandler(callback) { - return addMetricObserver("inp", callback, instrumentInp, _previousInp); -} -__name(addInpInstrumentationHandler, "addInpInstrumentationHandler"); -function addPerformanceInstrumentationHandler(type, callback) { - addHandler(type, callback); - if (!instrumented[type]) { - instrumentPerformanceObserver(type); - instrumented[type] = true; - } - return getCleanupCallback(type, callback); -} -__name(addPerformanceInstrumentationHandler, "addPerformanceInstrumentationHandler"); -function triggerHandlers(type, data25) { - const typeHandlers = handlers$3[type]; - if (!typeHandlers || !typeHandlers.length) { - return; - } - for (const handler6 of typeHandlers) { - try { - handler6(data25); - } catch (e2) { - DEBUG_BUILD$3 && logger$2.error( - `Error while triggering instrumentation handler. -Type: ${type} -Name: ${getFunctionName(handler6)} -Error:`, - e2 - ); - } - } -} -__name(triggerHandlers, "triggerHandlers"); -function instrumentCls() { - return onCLS( - (metric) => { - triggerHandlers("cls", { - metric - }); - _previousCls = metric; - }, - // We want the callback to be called whenever the CLS value updates. - // By default, the callback is only called when the tab goes to the background. - { reportAllChanges: true } - ); -} -__name(instrumentCls, "instrumentCls"); -function instrumentFid() { - return onFID((metric) => { - triggerHandlers("fid", { - metric - }); - _previousFid = metric; - }); -} -__name(instrumentFid, "instrumentFid"); -function instrumentLcp() { - return onLCP( - (metric) => { - triggerHandlers("lcp", { - metric - }); - _previousLcp = metric; - }, - // We want the callback to be called whenever the LCP value updates. - // By default, the callback is only called when the tab goes to the background. - { reportAllChanges: true } - ); -} -__name(instrumentLcp, "instrumentLcp"); -function instrumentTtfb() { - return onTTFB((metric) => { - triggerHandlers("ttfb", { - metric - }); - _previousTtfb = metric; - }); -} -__name(instrumentTtfb, "instrumentTtfb"); -function instrumentInp() { - return onINP((metric) => { - triggerHandlers("inp", { - metric - }); - _previousInp = metric; - }); -} -__name(instrumentInp, "instrumentInp"); -function addMetricObserver(type, callback, instrumentFn, previousValue, stopOnCallback = false) { - addHandler(type, callback); - let stopListening; - if (!instrumented[type]) { - stopListening = instrumentFn(); - instrumented[type] = true; - } - if (previousValue) { - callback({ metric: previousValue }); - } - return getCleanupCallback(type, callback, stopOnCallback ? stopListening : void 0); -} -__name(addMetricObserver, "addMetricObserver"); -function instrumentPerformanceObserver(type) { - const options4 = {}; - if (type === "event") { - options4.durationThreshold = 0; - } - observe( - type, - (entries) => { - triggerHandlers(type, { entries }); - }, - options4 - ); -} -__name(instrumentPerformanceObserver, "instrumentPerformanceObserver"); -function addHandler(type, handler6) { - handlers$3[type] = handlers$3[type] || []; - handlers$3[type].push(handler6); -} -__name(addHandler, "addHandler"); -function getCleanupCallback(type, callback, stopListening) { - return () => { - if (stopListening) { - stopListening(); - } - const typeHandlers = handlers$3[type]; - if (!typeHandlers) { - return; - } - const index2 = typeHandlers.indexOf(callback); - if (index2 !== -1) { - typeHandlers.splice(index2, 1); - } - }; -} -__name(getCleanupCallback, "getCleanupCallback"); -function isPerformanceEventTiming(entry) { - return "duration" in entry; -} -__name(isPerformanceEventTiming, "isPerformanceEventTiming"); -function isMeasurementValue(value4) { - return typeof value4 === "number" && isFinite(value4); -} -__name(isMeasurementValue, "isMeasurementValue"); -function startAndEndSpan(parentSpan, startTimeInSeconds, endTime, { ...ctx }) { - const parentStartTime = spanToJSON(parentSpan).start_timestamp; - if (parentStartTime && parentStartTime > startTimeInSeconds) { - if (typeof parentSpan.updateStartTime === "function") { - parentSpan.updateStartTime(startTimeInSeconds); - } - } - return withActiveSpan(parentSpan, () => { - const span = startInactiveSpan({ - startTime: startTimeInSeconds, - ...ctx - }); - if (span) { - span.end(endTime); - } - return span; - }); -} -__name(startAndEndSpan, "startAndEndSpan"); -function startStandaloneWebVitalSpan(options4) { - const client = getClient(); - if (!client) { - return; - } - const { name: name2, transaction, attributes: passedAttributes, startTime } = options4; - const { release, environment } = client.getOptions(); - const replay = client.getIntegrationByName("Replay"); - const replayId = replay && replay.getReplayId(); - const scope = getCurrentScope$1(); - const user = scope.getUser(); - const userDisplay = user !== void 0 ? user.email || user.id || user.ip_address : void 0; - let profileId; - try { - profileId = scope.getScopeData().contexts.profile.profile_id; - } catch (e2) { - } - const attributes = { - release, - environment, - user: userDisplay || void 0, - profile_id: profileId || void 0, - replay_id: replayId || void 0, - transaction, - // Web vital score calculation relies on the user agent to account for different - // browsers setting different thresholds for what is considered a good/meh/bad value. - // For example: Chrome vs. Chrome Mobile - "user_agent.original": WINDOW$4.navigator && WINDOW$4.navigator.userAgent, - ...passedAttributes - }; - return startInactiveSpan({ - name: name2, - attributes, - startTime, - experimental: { - standalone: true - } - }); -} -__name(startStandaloneWebVitalSpan, "startStandaloneWebVitalSpan"); -function getBrowserPerformanceAPI() { - return WINDOW$4 && WINDOW$4.addEventListener && WINDOW$4.performance; -} -__name(getBrowserPerformanceAPI, "getBrowserPerformanceAPI"); -function msToSec(time) { - return time / 1e3; -} -__name(msToSec, "msToSec"); -function trackClsAsStandaloneSpan() { - let standaloneCLsValue = 0; - let standaloneClsEntry; - let pageloadSpanId; - if (!supportsLayoutShift()) { - return; - } - let sentSpan = false; - function _collectClsOnce() { - if (sentSpan) { - return; - } - sentSpan = true; - if (pageloadSpanId) { - sendStandaloneClsSpan(standaloneCLsValue, standaloneClsEntry, pageloadSpanId); - } - cleanupClsHandler(); - } - __name(_collectClsOnce, "_collectClsOnce"); - const cleanupClsHandler = addClsInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - standaloneCLsValue = metric.value; - standaloneClsEntry = entry; - }, true); - onHidden(() => { - _collectClsOnce(); - }); - setTimeout(() => { - const client = getClient(); - if (!client) { - return; - } - const unsubscribeStartNavigation = client.on("startNavigationSpan", () => { - _collectClsOnce(); - unsubscribeStartNavigation && unsubscribeStartNavigation(); - }); - const activeSpan = getActiveSpan(); - const rootSpan = activeSpan && getRootSpan(activeSpan); - const spanJSON = rootSpan && spanToJSON(rootSpan); - if (spanJSON && spanJSON.op === "pageload") { - pageloadSpanId = rootSpan.spanContext().spanId; - } - }, 0); -} -__name(trackClsAsStandaloneSpan, "trackClsAsStandaloneSpan"); -function sendStandaloneClsSpan(clsValue, entry, pageloadSpanId) { - DEBUG_BUILD$3 && logger$2.log(`Sending CLS span (${clsValue})`); - const startTime = msToSec((browserPerformanceTimeOrigin || 0) + (entry && entry.startTime || 0)); - const routeName = getCurrentScope$1().getScopeData().transactionName; - const name2 = entry ? htmlTreeAsString(entry.sources[0] && entry.sources[0].node) : "Layout shift"; - const attributes = dropUndefinedKeys({ - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.browser.cls", - [SEMANTIC_ATTRIBUTE_SENTRY_OP]: "ui.webvital.cls", - [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry && entry.duration || 0, - // attach the pageload span id to the CLS span so that we can link them in the UI - "sentry.pageload.span_id": pageloadSpanId - }); - const span = startStandaloneWebVitalSpan({ - name: name2, - transaction: routeName, - attributes, - startTime - }); - if (span) { - span.addEvent("cls", { - [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: "", - [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: clsValue - }); - span.end(startTime); - } -} -__name(sendStandaloneClsSpan, "sendStandaloneClsSpan"); -function supportsLayoutShift() { - try { - return PerformanceObserver.supportedEntryTypes.includes("layout-shift"); - } catch (e2) { - return false; - } -} -__name(supportsLayoutShift, "supportsLayoutShift"); -const MAX_INT_AS_BYTES = 2147483647; -let _performanceCursor = 0; -let _measurements = {}; -let _lcpEntry; -let _clsEntry; -function startTrackingWebVitals({ recordClsStandaloneSpans }) { - const performance2 = getBrowserPerformanceAPI(); - if (performance2 && browserPerformanceTimeOrigin) { - if (performance2.mark) { - WINDOW$4.performance.mark("sentry-tracing-init"); - } - const fidCleanupCallback = _trackFID(); - const lcpCleanupCallback = _trackLCP(); - const ttfbCleanupCallback = _trackTtfb(); - const clsCleanupCallback = recordClsStandaloneSpans ? trackClsAsStandaloneSpan() : _trackCLS(); - return () => { - fidCleanupCallback(); - lcpCleanupCallback(); - ttfbCleanupCallback(); - clsCleanupCallback && clsCleanupCallback(); - }; - } - return () => void 0; -} -__name(startTrackingWebVitals, "startTrackingWebVitals"); -function startTrackingLongTasks() { - addPerformanceInstrumentationHandler("longtask", ({ entries }) => { - const parent = getActiveSpan(); - if (!parent) { - return; - } - const { op: parentOp, start_timestamp: parentStartTimestamp } = spanToJSON(parent); - for (const entry of entries) { - const startTime = msToSec(browserPerformanceTimeOrigin + entry.startTime); - const duration = msToSec(entry.duration); - if (parentOp === "navigation" && parentStartTimestamp && startTime < parentStartTimestamp) { - continue; - } - startAndEndSpan(parent, startTime, startTime + duration, { - name: "Main UI thread blocked", - op: "ui.long-task", - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.browser.metrics" - } - }); - } - }); -} -__name(startTrackingLongTasks, "startTrackingLongTasks"); -function startTrackingLongAnimationFrames() { - const observer = new PerformanceObserver((list2) => { - const parent = getActiveSpan(); - if (!parent) { - return; - } - for (const entry of list2.getEntries()) { - if (!entry.scripts[0]) { - continue; - } - const startTime = msToSec(browserPerformanceTimeOrigin + entry.startTime); - const { start_timestamp: parentStartTimestamp, op: parentOp } = spanToJSON(parent); - if (parentOp === "navigation" && parentStartTimestamp && startTime < parentStartTimestamp) { - continue; - } - const duration = msToSec(entry.duration); - const attributes = { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.browser.metrics" - }; - const initialScript = entry.scripts[0]; - const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript; - attributes["browser.script.invoker"] = invoker; - attributes["browser.script.invoker_type"] = invokerType; - if (sourceURL) { - attributes["code.filepath"] = sourceURL; - } - if (sourceFunctionName) { - attributes["code.function"] = sourceFunctionName; - } - if (sourceCharPosition !== -1) { - attributes["browser.script.source_char_position"] = sourceCharPosition; - } - startAndEndSpan(parent, startTime, startTime + duration, { - name: "Main UI thread blocked", - op: "ui.long-animation-frame", - attributes - }); - } - }); - observer.observe({ type: "long-animation-frame", buffered: true }); -} -__name(startTrackingLongAnimationFrames, "startTrackingLongAnimationFrames"); -function startTrackingInteractions() { - addPerformanceInstrumentationHandler("event", ({ entries }) => { - const parent = getActiveSpan(); - if (!parent) { - return; - } - for (const entry of entries) { - if (entry.name === "click") { - const startTime = msToSec(browserPerformanceTimeOrigin + entry.startTime); - const duration = msToSec(entry.duration); - const spanOptions = { - name: htmlTreeAsString(entry.target), - op: `ui.interaction.${entry.name}`, - startTime, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.browser.metrics" - } - }; - const componentName = getComponentName$1(entry.target); - if (componentName) { - spanOptions.attributes["ui.component_name"] = componentName; - } - startAndEndSpan(parent, startTime, startTime + duration, spanOptions); - } - } - }); -} -__name(startTrackingInteractions, "startTrackingInteractions"); -function _trackCLS() { - return addClsInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - _measurements["cls"] = { value: metric.value, unit: "" }; - _clsEntry = entry; - }, true); -} -__name(_trackCLS, "_trackCLS"); -function _trackLCP() { - return addLcpInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - _measurements["lcp"] = { value: metric.value, unit: "millisecond" }; - _lcpEntry = entry; - }, true); -} -__name(_trackLCP, "_trackLCP"); -function _trackFID() { - return addFidInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - const timeOrigin = msToSec(browserPerformanceTimeOrigin); - const startTime = msToSec(entry.startTime); - _measurements["fid"] = { value: metric.value, unit: "millisecond" }; - _measurements["mark.fid"] = { value: timeOrigin + startTime, unit: "second" }; - }); -} -__name(_trackFID, "_trackFID"); -function _trackTtfb() { - return addTtfbInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - _measurements["ttfb"] = { value: metric.value, unit: "millisecond" }; - }); -} -__name(_trackTtfb, "_trackTtfb"); -function addPerformanceEntries(span, options4) { - const performance2 = getBrowserPerformanceAPI(); - if (!performance2 || !performance2.getEntries || !browserPerformanceTimeOrigin) { - return; - } - const timeOrigin = msToSec(browserPerformanceTimeOrigin); - const performanceEntries = performance2.getEntries(); - const { op, start_timestamp: transactionStartTime } = spanToJSON(span); - performanceEntries.slice(_performanceCursor).forEach((entry) => { - const startTime = msToSec(entry.startTime); - const duration = msToSec( - // Inexplicably, Chrome sometimes emits a negative duration. We need to work around this. - // There is a SO post attempting to explain this, but it leaves one with open questions: https://stackoverflow.com/questions/23191918/peformance-getentries-and-negative-duration-display - // The way we clamp the value is probably not accurate, since we have observed this happen for things that may take a while to load, like for example the replay worker. - // TODO: Investigate why this happens and how to properly mitigate. For now, this is a workaround to prevent transactions being dropped due to negative duration spans. - Math.max(0, entry.duration) - ); - if (op === "navigation" && transactionStartTime && timeOrigin + startTime < transactionStartTime) { - return; - } - switch (entry.entryType) { - case "navigation": { - _addNavigationSpans(span, entry, timeOrigin); - break; - } - case "mark": - case "paint": - case "measure": { - _addMeasureSpans(span, entry, startTime, duration, timeOrigin); - const firstHidden = getVisibilityWatcher(); - const shouldRecord = entry.startTime < firstHidden.firstHiddenTime; - if (entry.name === "first-paint" && shouldRecord) { - _measurements["fp"] = { value: entry.startTime, unit: "millisecond" }; - } - if (entry.name === "first-contentful-paint" && shouldRecord) { - _measurements["fcp"] = { value: entry.startTime, unit: "millisecond" }; - } - break; - } - case "resource": { - _addResourceSpans(span, entry, entry.name, startTime, duration, timeOrigin); - break; - } - } - }); - _performanceCursor = Math.max(performanceEntries.length - 1, 0); - _trackNavigator(span); - if (op === "pageload") { - _addTtfbRequestTimeToMeasurements(_measurements); - const fidMark = _measurements["mark.fid"]; - if (fidMark && _measurements["fid"]) { - startAndEndSpan(span, fidMark.value, fidMark.value + msToSec(_measurements["fid"].value), { - name: "first input delay", - op: "ui.action", - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.browser.metrics" - } - }); - delete _measurements["mark.fid"]; - } - if (!("fcp" in _measurements) || !options4.recordClsOnPageloadSpan) { - delete _measurements.cls; - } - Object.entries(_measurements).forEach(([measurementName, measurement]) => { - setMeasurement(measurementName, measurement.value, measurement.unit); - }); - span.setAttribute("performance.timeOrigin", timeOrigin); - span.setAttribute("performance.activationStart", getActivationStart()); - _setWebVitalAttributes(span); - } - _lcpEntry = void 0; - _clsEntry = void 0; - _measurements = {}; -} -__name(addPerformanceEntries, "addPerformanceEntries"); -function _addMeasureSpans(span, entry, startTime, duration, timeOrigin) { - const navEntry = getNavigationEntry(false); - const requestTime = msToSec(navEntry ? navEntry.requestStart : 0); - const measureStartTimestamp = timeOrigin + Math.max(startTime, requestTime); - const startTimeStamp = timeOrigin + startTime; - const measureEndTimestamp = startTimeStamp + duration; - const attributes = { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.resource.browser.metrics" - }; - if (measureStartTimestamp !== startTimeStamp) { - attributes["sentry.browser.measure_happened_before_request"] = true; - attributes["sentry.browser.measure_start_time"] = measureStartTimestamp; - } - startAndEndSpan(span, measureStartTimestamp, measureEndTimestamp, { - name: entry.name, - op: entry.entryType, - attributes - }); - return measureStartTimestamp; -} -__name(_addMeasureSpans, "_addMeasureSpans"); -function _addNavigationSpans(span, entry, timeOrigin) { - ["unloadEvent", "redirect", "domContentLoadedEvent", "loadEvent", "connect"].forEach((event) => { - _addPerformanceNavigationTiming(span, entry, event, timeOrigin); - }); - _addPerformanceNavigationTiming(span, entry, "secureConnection", timeOrigin, "TLS/SSL"); - _addPerformanceNavigationTiming(span, entry, "fetch", timeOrigin, "cache"); - _addPerformanceNavigationTiming(span, entry, "domainLookup", timeOrigin, "DNS"); - _addRequest(span, entry, timeOrigin); -} -__name(_addNavigationSpans, "_addNavigationSpans"); -function _addPerformanceNavigationTiming(span, entry, event, timeOrigin, name2 = event) { - const eventEnd = _getEndPropertyNameForNavigationTiming(event); - const end = entry[eventEnd]; - const start2 = entry[`${event}Start`]; - if (!start2 || !end) { - return; - } - startAndEndSpan(span, timeOrigin + msToSec(start2), timeOrigin + msToSec(end), { - op: `browser.${name2}`, - name: entry.name, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.browser.metrics" - } - }); -} -__name(_addPerformanceNavigationTiming, "_addPerformanceNavigationTiming"); -function _getEndPropertyNameForNavigationTiming(event) { - if (event === "secureConnection") { - return "connectEnd"; - } - if (event === "fetch") { - return "domainLookupStart"; - } - return `${event}End`; -} -__name(_getEndPropertyNameForNavigationTiming, "_getEndPropertyNameForNavigationTiming"); -function _addRequest(span, entry, timeOrigin) { - const requestStartTimestamp = timeOrigin + msToSec(entry.requestStart); - const responseEndTimestamp = timeOrigin + msToSec(entry.responseEnd); - const responseStartTimestamp = timeOrigin + msToSec(entry.responseStart); - if (entry.responseEnd) { - startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, { - op: "browser.request", - name: entry.name, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.browser.metrics" - } - }); - startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, { - op: "browser.response", - name: entry.name, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.browser.metrics" - } - }); - } -} -__name(_addRequest, "_addRequest"); -function _addResourceSpans(span, entry, resourceUrl, startTime, duration, timeOrigin) { - if (entry.initiatorType === "xmlhttprequest" || entry.initiatorType === "fetch") { - return; - } - const parsedUrl = parseUrl$1(resourceUrl); - const attributes = { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.resource.browser.metrics" - }; - setResourceEntrySizeData(attributes, entry, "transferSize", "http.response_transfer_size"); - setResourceEntrySizeData(attributes, entry, "encodedBodySize", "http.response_content_length"); - setResourceEntrySizeData(attributes, entry, "decodedBodySize", "http.decoded_response_content_length"); - const deliveryType = entry.deliveryType; - if (deliveryType != null) { - attributes["http.response_delivery_type"] = deliveryType; - } - const renderBlockingStatus = entry.renderBlockingStatus; - if (renderBlockingStatus) { - attributes["resource.render_blocking_status"] = renderBlockingStatus; - } - if (parsedUrl.protocol) { - attributes["url.scheme"] = parsedUrl.protocol.split(":").pop(); - } - if (parsedUrl.host) { - attributes["server.address"] = parsedUrl.host; - } - attributes["url.same_origin"] = resourceUrl.includes(WINDOW$4.location.origin); - const startTimestamp = timeOrigin + startTime; - const endTimestamp = startTimestamp + duration; - startAndEndSpan(span, startTimestamp, endTimestamp, { - name: resourceUrl.replace(WINDOW$4.location.origin, ""), - op: entry.initiatorType ? `resource.${entry.initiatorType}` : "resource.other", - attributes - }); -} -__name(_addResourceSpans, "_addResourceSpans"); -function _trackNavigator(span) { - const navigator2 = WINDOW$4.navigator; - if (!navigator2) { - return; - } - const connection = navigator2.connection; - if (connection) { - if (connection.effectiveType) { - span.setAttribute("effectiveConnectionType", connection.effectiveType); - } - if (connection.type) { - span.setAttribute("connectionType", connection.type); - } - if (isMeasurementValue(connection.rtt)) { - _measurements["connection.rtt"] = { value: connection.rtt, unit: "millisecond" }; - } - } - if (isMeasurementValue(navigator2.deviceMemory)) { - span.setAttribute("deviceMemory", `${navigator2.deviceMemory} GB`); - } - if (isMeasurementValue(navigator2.hardwareConcurrency)) { - span.setAttribute("hardwareConcurrency", String(navigator2.hardwareConcurrency)); - } -} -__name(_trackNavigator, "_trackNavigator"); -function _setWebVitalAttributes(span) { - if (_lcpEntry) { - if (_lcpEntry.element) { - span.setAttribute("lcp.element", htmlTreeAsString(_lcpEntry.element)); - } - if (_lcpEntry.id) { - span.setAttribute("lcp.id", _lcpEntry.id); - } - if (_lcpEntry.url) { - span.setAttribute("lcp.url", _lcpEntry.url.trim().slice(0, 200)); - } - if (_lcpEntry.loadTime != null) { - span.setAttribute("lcp.loadTime", _lcpEntry.loadTime); - } - if (_lcpEntry.renderTime != null) { - span.setAttribute("lcp.renderTime", _lcpEntry.renderTime); - } - span.setAttribute("lcp.size", _lcpEntry.size); - } - if (_clsEntry && _clsEntry.sources) { - _clsEntry.sources.forEach( - (source, index2) => span.setAttribute(`cls.source.${index2 + 1}`, htmlTreeAsString(source.node)) - ); - } -} -__name(_setWebVitalAttributes, "_setWebVitalAttributes"); -function setResourceEntrySizeData(attributes, entry, key, dataKey) { - const entryVal = entry[key]; - if (entryVal != null && entryVal < MAX_INT_AS_BYTES) { - attributes[dataKey] = entryVal; - } -} -__name(setResourceEntrySizeData, "setResourceEntrySizeData"); -function _addTtfbRequestTimeToMeasurements(_measurements2) { - const navEntry = getNavigationEntry(false); - if (!navEntry) { - return; - } - const { responseStart, requestStart } = navEntry; - if (requestStart <= responseStart) { - _measurements2["ttfb.requestTime"] = { - value: responseStart - requestStart, - unit: "millisecond" - }; - } -} -__name(_addTtfbRequestTimeToMeasurements, "_addTtfbRequestTimeToMeasurements"); -const DEBOUNCE_DURATION = 1e3; -let debounceTimerID; -let lastCapturedEventType; -let lastCapturedEventTargetId; -function addClickKeypressInstrumentationHandler(handler6) { - const type = "dom"; - addHandler$1(type, handler6); - maybeInstrument(type, instrumentDOM); -} -__name(addClickKeypressInstrumentationHandler, "addClickKeypressInstrumentationHandler"); -function instrumentDOM() { - if (!WINDOW$4.document) { - return; - } - const triggerDOMHandler = triggerHandlers$1.bind(null, "dom"); - const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true); - WINDOW$4.document.addEventListener("click", globalDOMEventHandler, false); - WINDOW$4.document.addEventListener("keypress", globalDOMEventHandler, false); - ["EventTarget", "Node"].forEach((target) => { - const globalObject = WINDOW$4; - const targetObj = globalObject[target]; - const proto = targetObj && targetObj.prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty("addEventListener")) { - return; - } - fill(proto, "addEventListener", function(originalAddEventListener) { - return function(type, listener, options4) { - if (type === "click" || type == "keypress") { - try { - const handlers2 = this.__sentry_instrumentation_handlers__ = this.__sentry_instrumentation_handlers__ || {}; - const handlerForType = handlers2[type] = handlers2[type] || { refCount: 0 }; - if (!handlerForType.handler) { - const handler6 = makeDOMEventHandler(triggerDOMHandler); - handlerForType.handler = handler6; - originalAddEventListener.call(this, type, handler6, options4); - } - handlerForType.refCount++; - } catch (e2) { - } - } - return originalAddEventListener.call(this, type, listener, options4); - }; - }); - fill( - proto, - "removeEventListener", - function(originalRemoveEventListener) { - return function(type, listener, options4) { - if (type === "click" || type == "keypress") { - try { - const handlers2 = this.__sentry_instrumentation_handlers__ || {}; - const handlerForType = handlers2[type]; - if (handlerForType) { - handlerForType.refCount--; - if (handlerForType.refCount <= 0) { - originalRemoveEventListener.call(this, type, handlerForType.handler, options4); - handlerForType.handler = void 0; - delete handlers2[type]; - } - if (Object.keys(handlers2).length === 0) { - delete this.__sentry_instrumentation_handlers__; - } - } - } catch (e2) { - } - } - return originalRemoveEventListener.call(this, type, listener, options4); - }; - } - ); - }); -} -__name(instrumentDOM, "instrumentDOM"); -function isSimilarToLastCapturedEvent(event) { - if (event.type !== lastCapturedEventType) { - return false; - } - try { - if (!event.target || event.target._sentryId !== lastCapturedEventTargetId) { - return false; - } - } catch (e2) { - } - return true; -} -__name(isSimilarToLastCapturedEvent, "isSimilarToLastCapturedEvent"); -function shouldSkipDOMEvent(eventType, target) { - if (eventType !== "keypress") { - return false; - } - if (!target || !target.tagName) { - return true; - } - if (target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable) { - return false; - } - return true; -} -__name(shouldSkipDOMEvent, "shouldSkipDOMEvent"); -function makeDOMEventHandler(handler6, globalListener = false) { - return (event) => { - if (!event || event["_sentryCaptured"]) { - return; - } - const target = getEventTarget$1(event); - if (shouldSkipDOMEvent(event.type, target)) { - return; - } - addNonEnumerableProperty(event, "_sentryCaptured", true); - if (target && !target._sentryId) { - addNonEnumerableProperty(target, "_sentryId", uuid4()); - } - const name2 = event.type === "keypress" ? "input" : event.type; - if (!isSimilarToLastCapturedEvent(event)) { - const handlerData = { event, name: name2, global: globalListener }; - handler6(handlerData); - lastCapturedEventType = event.type; - lastCapturedEventTargetId = target ? target._sentryId : void 0; - } - clearTimeout(debounceTimerID); - debounceTimerID = WINDOW$4.setTimeout(() => { - lastCapturedEventTargetId = void 0; - lastCapturedEventType = void 0; - }, DEBOUNCE_DURATION); - }; -} -__name(makeDOMEventHandler, "makeDOMEventHandler"); -function getEventTarget$1(event) { - try { - return event.target; - } catch (e2) { - return null; - } -} -__name(getEventTarget$1, "getEventTarget$1"); -let lastHref; -function addHistoryInstrumentationHandler(handler6) { - const type = "history"; - addHandler$1(type, handler6); - maybeInstrument(type, instrumentHistory); -} -__name(addHistoryInstrumentationHandler, "addHistoryInstrumentationHandler"); -function instrumentHistory() { - if (!supportsHistory()) { - return; - } - const oldOnPopState = WINDOW$4.onpopstate; - WINDOW$4.onpopstate = function(...args) { - const to = WINDOW$4.location.href; - const from2 = lastHref; - lastHref = to; - const handlerData = { from: from2, to }; - triggerHandlers$1("history", handlerData); - if (oldOnPopState) { - try { - return oldOnPopState.apply(this, args); - } catch (_oO) { - } - } - }; - function historyReplacementFunction(originalHistoryFunction) { - return function(...args) { - const url = args.length > 2 ? args[2] : void 0; - if (url) { - const from2 = lastHref; - const to = String(url); - lastHref = to; - const handlerData = { from: from2, to }; - triggerHandlers$1("history", handlerData); - } - return originalHistoryFunction.apply(this, args); - }; - } - __name(historyReplacementFunction, "historyReplacementFunction"); - fill(WINDOW$4.history, "pushState", historyReplacementFunction); - fill(WINDOW$4.history, "replaceState", historyReplacementFunction); -} -__name(instrumentHistory, "instrumentHistory"); -const cachedImplementations$3 = {}; -function getNativeImplementation(name2) { - const cached = cachedImplementations$3[name2]; - if (cached) { - return cached; - } - let impl = WINDOW$4[name2]; - if (isNativeFunction(impl)) { - return cachedImplementations$3[name2] = impl.bind(WINDOW$4); - } - const document2 = WINDOW$4.document; - if (document2 && typeof document2.createElement === "function") { - try { - const sandbox = document2.createElement("iframe"); - sandbox.hidden = true; - document2.head.appendChild(sandbox); - const contentWindow = sandbox.contentWindow; - if (contentWindow && contentWindow[name2]) { - impl = contentWindow[name2]; - } - document2.head.removeChild(sandbox); - } catch (e2) { - DEBUG_BUILD$3 && logger$2.warn(`Could not create sandbox iframe for ${name2} check, bailing to window.${name2}: `, e2); - } - } - if (!impl) { - return impl; - } - return cachedImplementations$3[name2] = impl.bind(WINDOW$4); -} -__name(getNativeImplementation, "getNativeImplementation"); -function clearCachedImplementation(name2) { - cachedImplementations$3[name2] = void 0; -} -__name(clearCachedImplementation, "clearCachedImplementation"); -function fetch$1(...rest) { - return getNativeImplementation("fetch")(...rest); -} -__name(fetch$1, "fetch$1"); -function setTimeout$3(...rest) { - return getNativeImplementation("setTimeout")(...rest); -} -__name(setTimeout$3, "setTimeout$3"); -const SENTRY_XHR_DATA_KEY = "__sentry_xhr_v3__"; -function addXhrInstrumentationHandler(handler6) { - const type = "xhr"; - addHandler$1(type, handler6); - maybeInstrument(type, instrumentXHR); -} -__name(addXhrInstrumentationHandler, "addXhrInstrumentationHandler"); -function instrumentXHR() { - if (!WINDOW$4.XMLHttpRequest) { - return; - } - const xhrproto = XMLHttpRequest.prototype; - xhrproto.open = new Proxy(xhrproto.open, { - apply(originalOpen, xhrOpenThisArg, xhrOpenArgArray) { - const virtualError = new Error(); - const startTimestamp = timestampInSeconds() * 1e3; - const method = isString$8(xhrOpenArgArray[0]) ? xhrOpenArgArray[0].toUpperCase() : void 0; - const url = parseUrl(xhrOpenArgArray[1]); - if (!method || !url) { - return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray); - } - xhrOpenThisArg[SENTRY_XHR_DATA_KEY] = { - method, - url, - request_headers: {} - }; - if (method === "POST" && url.match(/sentry_key/)) { - xhrOpenThisArg.__sentry_own_request__ = true; - } - const onreadystatechangeHandler = /* @__PURE__ */ __name(() => { - const xhrInfo = xhrOpenThisArg[SENTRY_XHR_DATA_KEY]; - if (!xhrInfo) { - return; - } - if (xhrOpenThisArg.readyState === 4) { - try { - xhrInfo.status_code = xhrOpenThisArg.status; - } catch (e2) { - } - const handlerData = { - endTimestamp: timestampInSeconds() * 1e3, - startTimestamp, - xhr: xhrOpenThisArg, - virtualError - }; - triggerHandlers$1("xhr", handlerData); - } - }, "onreadystatechangeHandler"); - if ("onreadystatechange" in xhrOpenThisArg && typeof xhrOpenThisArg.onreadystatechange === "function") { - xhrOpenThisArg.onreadystatechange = new Proxy(xhrOpenThisArg.onreadystatechange, { - apply(originalOnreadystatechange, onreadystatechangeThisArg, onreadystatechangeArgArray) { - onreadystatechangeHandler(); - return originalOnreadystatechange.apply(onreadystatechangeThisArg, onreadystatechangeArgArray); - } - }); - } else { - xhrOpenThisArg.addEventListener("readystatechange", onreadystatechangeHandler); - } - xhrOpenThisArg.setRequestHeader = new Proxy(xhrOpenThisArg.setRequestHeader, { - apply(originalSetRequestHeader, setRequestHeaderThisArg, setRequestHeaderArgArray) { - const [header3, value4] = setRequestHeaderArgArray; - const xhrInfo = setRequestHeaderThisArg[SENTRY_XHR_DATA_KEY]; - if (xhrInfo && isString$8(header3) && isString$8(value4)) { - xhrInfo.request_headers[header3.toLowerCase()] = value4; - } - return originalSetRequestHeader.apply(setRequestHeaderThisArg, setRequestHeaderArgArray); - } - }); - return originalOpen.apply(xhrOpenThisArg, xhrOpenArgArray); - } - }); - xhrproto.send = new Proxy(xhrproto.send, { - apply(originalSend, sendThisArg, sendArgArray) { - const sentryXhrData = sendThisArg[SENTRY_XHR_DATA_KEY]; - if (!sentryXhrData) { - return originalSend.apply(sendThisArg, sendArgArray); - } - if (sendArgArray[0] !== void 0) { - sentryXhrData.body = sendArgArray[0]; - } - const handlerData = { - startTimestamp: timestampInSeconds() * 1e3, - xhr: sendThisArg - }; - triggerHandlers$1("xhr", handlerData); - return originalSend.apply(sendThisArg, sendArgArray); - } - }); -} -__name(instrumentXHR, "instrumentXHR"); -function parseUrl(url) { - if (isString$8(url)) { - return url; - } - try { - return url.toString(); - } catch (e2) { - } - return void 0; -} -__name(parseUrl, "parseUrl"); -const LAST_INTERACTIONS = []; -const INTERACTIONS_SPAN_MAP = /* @__PURE__ */ new Map(); -function startTrackingINP() { - const performance2 = getBrowserPerformanceAPI(); - if (performance2 && browserPerformanceTimeOrigin) { - const inpCallback = _trackINP(); - return () => { - inpCallback(); - }; - } - return () => void 0; -} -__name(startTrackingINP, "startTrackingINP"); -const INP_ENTRY_MAP = { - click: "click", - pointerdown: "click", - pointerup: "click", - mousedown: "click", - mouseup: "click", - touchstart: "click", - touchend: "click", - mouseover: "hover", - mouseout: "hover", - mouseenter: "hover", - mouseleave: "hover", - pointerover: "hover", - pointerout: "hover", - pointerenter: "hover", - pointerleave: "hover", - dragstart: "drag", - dragend: "drag", - drag: "drag", - dragenter: "drag", - dragleave: "drag", - dragover: "drag", - drop: "drag", - keydown: "press", - keyup: "press", - keypress: "press", - input: "press" -}; -function _trackINP() { - return addInpInstrumentationHandler(({ metric }) => { - if (metric.value == void 0) { - return; - } - const entry = metric.entries.find((entry2) => entry2.duration === metric.value && INP_ENTRY_MAP[entry2.name]); - if (!entry) { - return; - } - const { interactionId } = entry; - const interactionType = INP_ENTRY_MAP[entry.name]; - const startTime = msToSec(browserPerformanceTimeOrigin + entry.startTime); - const duration = msToSec(metric.value); - const activeSpan = getActiveSpan(); - const rootSpan = activeSpan ? getRootSpan(activeSpan) : void 0; - const cachedSpan = interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : void 0; - const spanToUse = cachedSpan || rootSpan; - const routeName = spanToUse ? spanToJSON(spanToUse).description : getCurrentScope$1().getScopeData().transactionName; - const name2 = htmlTreeAsString(entry.target); - const attributes = dropUndefinedKeys({ - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.browser.inp", - [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `ui.interaction.${interactionType}`, - [SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration - }); - const span = startStandaloneWebVitalSpan({ - name: name2, - transaction: routeName, - attributes, - startTime - }); - if (span) { - span.addEvent("inp", { - [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: "millisecond", - [SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: metric.value - }); - span.end(startTime + duration); - } - }); -} -__name(_trackINP, "_trackINP"); -function registerInpInteractionListener(_latestRoute) { - const handleEntries = /* @__PURE__ */ __name(({ entries }) => { - const activeSpan = getActiveSpan(); - const activeRootSpan = activeSpan && getRootSpan(activeSpan); - entries.forEach((entry) => { - if (!isPerformanceEventTiming(entry) || !activeRootSpan) { - return; - } - const interactionId = entry.interactionId; - if (interactionId == null) { - return; - } - if (INTERACTIONS_SPAN_MAP.has(interactionId)) { - return; - } - if (LAST_INTERACTIONS.length > 10) { - const last = LAST_INTERACTIONS.shift(); - INTERACTIONS_SPAN_MAP.delete(last); - } - LAST_INTERACTIONS.push(interactionId); - INTERACTIONS_SPAN_MAP.set(interactionId, activeRootSpan); - }); - }, "handleEntries"); - addPerformanceInstrumentationHandler("event", handleEntries); - addPerformanceInstrumentationHandler("first-input", handleEntries); -} -__name(registerInpInteractionListener, "registerInpInteractionListener"); -function makeFetchTransport(options4, nativeFetch = getNativeImplementation("fetch")) { - let pendingBodySize = 0; - let pendingCount = 0; - function makeRequest(request) { - const requestSize = request.body.length; - pendingBodySize += requestSize; - pendingCount++; - const requestOptions = { - body: request.body, - method: "POST", - referrerPolicy: "origin", - headers: options4.headers, - // Outgoing requests are usually cancelled when navigating to a different page, causing a "TypeError: Failed to - // fetch" error and sending a "network_error" client-outcome - in Chrome, the request status shows "(cancelled)". - // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're - // frequently sending events right before the user is switching pages (eg. when finishing navigation transactions). - // Gotchas: - // - `keepalive` isn't supported by Firefox - // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch): - // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error. - // We will therefore only activate the flag when we're below that limit. - // There is also a limit of requests that can be open at the same time, so we also limit this to 15 - // See https://github.com/getsentry/sentry-javascript/pull/7553 for details - keepalive: pendingBodySize <= 6e4 && pendingCount < 15, - ...options4.fetchOptions - }; - if (!nativeFetch) { - clearCachedImplementation("fetch"); - return rejectedSyncPromise("No fetch implementation available"); - } - try { - return nativeFetch(options4.url, requestOptions).then((response) => { - pendingBodySize -= requestSize; - pendingCount--; - return { - statusCode: response.status, - headers: { - "x-sentry-rate-limits": response.headers.get("X-Sentry-Rate-Limits"), - "retry-after": response.headers.get("Retry-After") - } - }; - }); - } catch (e2) { - clearCachedImplementation("fetch"); - pendingBodySize -= requestSize; - pendingCount--; - return rejectedSyncPromise(e2); - } - } - __name(makeRequest, "makeRequest"); - return createTransport(options4, makeRequest); -} -__name(makeFetchTransport, "makeFetchTransport"); -const OPERA10_PRIORITY = 10; -const OPERA11_PRIORITY = 20; -const CHROME_PRIORITY = 30; -const WINJS_PRIORITY = 40; -const GECKO_PRIORITY = 50; -function createFrame(filename, func, lineno, colno) { - const frame = { - filename, - function: func === "" ? UNKNOWN_FUNCTION : func, - in_app: true - // All browser frames are considered in_app - }; - if (lineno !== void 0) { - frame.lineno = lineno; - } - if (colno !== void 0) { - frame.colno = colno; - } - return frame; -} -__name(createFrame, "createFrame"); -const chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i; -const chromeRegex = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i; -const chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/; -const chromeStackParserFn = /* @__PURE__ */ __name((line) => { - const noFnParts = chromeRegexNoFnName.exec(line); - if (noFnParts) { - const [, filename, line2, col] = noFnParts; - return createFrame(filename, UNKNOWN_FUNCTION, +line2, +col); - } - const parts2 = chromeRegex.exec(line); - if (parts2) { - const isEval = parts2[2] && parts2[2].indexOf("eval") === 0; - if (isEval) { - const subMatch = chromeEvalRegex.exec(parts2[2]); - if (subMatch) { - parts2[2] = subMatch[1]; - parts2[3] = subMatch[2]; - parts2[4] = subMatch[3]; - } - } - const [func, filename] = extractSafariExtensionDetails(parts2[1] || UNKNOWN_FUNCTION, parts2[2]); - return createFrame(filename, func, parts2[3] ? +parts2[3] : void 0, parts2[4] ? +parts2[4] : void 0); - } - return; -}, "chromeStackParserFn"); -const chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn]; -const geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i; -const geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i; -const gecko$1 = /* @__PURE__ */ __name((line) => { - const parts2 = geckoREgex.exec(line); - if (parts2) { - const isEval = parts2[3] && parts2[3].indexOf(" > eval") > -1; - if (isEval) { - const subMatch = geckoEvalRegex.exec(parts2[3]); - if (subMatch) { - parts2[1] = parts2[1] || "eval"; - parts2[3] = subMatch[1]; - parts2[4] = subMatch[2]; - parts2[5] = ""; - } - } - let filename = parts2[3]; - let func = parts2[1] || UNKNOWN_FUNCTION; - [func, filename] = extractSafariExtensionDetails(func, filename); - return createFrame(filename, func, parts2[4] ? +parts2[4] : void 0, parts2[5] ? +parts2[5] : void 0); - } - return; -}, "gecko$1"); -const geckoStackLineParser = [GECKO_PRIORITY, gecko$1]; -const winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i; -const winjs = /* @__PURE__ */ __name((line) => { - const parts2 = winjsRegex.exec(line); - return parts2 ? createFrame(parts2[2], parts2[1] || UNKNOWN_FUNCTION, +parts2[3], parts2[4] ? +parts2[4] : void 0) : void 0; -}, "winjs"); -const winjsStackLineParser = [WINJS_PRIORITY, winjs]; -const opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i; -const opera10 = /* @__PURE__ */ __name((line) => { - const parts2 = opera10Regex.exec(line); - return parts2 ? createFrame(parts2[2], parts2[3] || UNKNOWN_FUNCTION, +parts2[1]) : void 0; -}, "opera10"); -const opera10StackLineParser = [OPERA10_PRIORITY, opera10]; -const opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i; -const opera11 = /* @__PURE__ */ __name((line) => { - const parts2 = opera11Regex.exec(line); - return parts2 ? createFrame(parts2[5], parts2[3] || parts2[4] || UNKNOWN_FUNCTION, +parts2[1], +parts2[2]) : void 0; -}, "opera11"); -const opera11StackLineParser = [OPERA11_PRIORITY, opera11]; -const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser]; -const defaultStackParser = createStackParser(...defaultStackLineParsers); -const extractSafariExtensionDetails = /* @__PURE__ */ __name((func, filename) => { - const isSafariExtension = func.indexOf("safari-extension") !== -1; - const isSafariWebExtension = func.indexOf("safari-web-extension") !== -1; - return isSafariExtension || isSafariWebExtension ? [ - func.indexOf("@") !== -1 ? func.split("@")[0] : UNKNOWN_FUNCTION, - isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}` - ] : [func, filename]; -}, "extractSafariExtensionDetails"); -const MAX_ALLOWED_STRING_LENGTH = 1024; -const INTEGRATION_NAME$a = "Breadcrumbs"; -const _breadcrumbsIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const _options = { - console: true, - dom: true, - fetch: true, - history: true, - sentry: true, - xhr: true, - ...options4 - }; - return { - name: INTEGRATION_NAME$a, - setup(client) { - if (_options.console) { - addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(client)); - } - if (_options.dom) { - addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(client, _options.dom)); - } - if (_options.xhr) { - addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(client)); - } - if (_options.fetch) { - addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(client)); - } - if (_options.history) { - addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(client)); - } - if (_options.sentry) { - client.on("beforeSendEvent", _getSentryBreadcrumbHandler(client)); - } - } - }; -}, "_breadcrumbsIntegration"); -const breadcrumbsIntegration = defineIntegration(_breadcrumbsIntegration); -function _getSentryBreadcrumbHandler(client) { - return /* @__PURE__ */ __name(function addSentryBreadcrumb(event) { - if (getClient() !== client) { - return; - } - addBreadcrumb( - { - category: `sentry.${event.type === "transaction" ? "transaction" : "event"}`, - event_id: event.event_id, - level: event.level, - message: getEventDescription(event) - }, - { - event - } - ); - }, "addSentryBreadcrumb"); -} -__name(_getSentryBreadcrumbHandler, "_getSentryBreadcrumbHandler"); -function _getDomBreadcrumbHandler(client, dom) { - return /* @__PURE__ */ __name(function _innerDomBreadcrumb(handlerData) { - if (getClient() !== client) { - return; - } - let target; - let componentName; - let keyAttrs = typeof dom === "object" ? dom.serializeAttribute : void 0; - let maxStringLength = typeof dom === "object" && typeof dom.maxStringLength === "number" ? dom.maxStringLength : void 0; - if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) { - DEBUG_BUILD$4 && logger$2.warn( - `\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.` - ); - maxStringLength = MAX_ALLOWED_STRING_LENGTH; - } - if (typeof keyAttrs === "string") { - keyAttrs = [keyAttrs]; - } - try { - const event = handlerData.event; - const element = _isEvent(event) ? event.target : event; - target = htmlTreeAsString(element, { keyAttrs, maxStringLength }); - componentName = getComponentName$1(element); - } catch (e2) { - target = ""; - } - if (target.length === 0) { - return; - } - const breadcrumb = { - category: `ui.${handlerData.name}`, - message: target - }; - if (componentName) { - breadcrumb.data = { "ui.component_name": componentName }; - } - addBreadcrumb(breadcrumb, { - event: handlerData.event, - name: handlerData.name, - global: handlerData.global - }); - }, "_innerDomBreadcrumb"); -} -__name(_getDomBreadcrumbHandler, "_getDomBreadcrumbHandler"); -function _getConsoleBreadcrumbHandler(client) { - return /* @__PURE__ */ __name(function _consoleBreadcrumb(handlerData) { - if (getClient() !== client) { - return; - } - const breadcrumb = { - category: "console", - data: { - arguments: handlerData.args, - logger: "console" - }, - level: severityLevelFromString(handlerData.level), - message: safeJoin(handlerData.args, " ") - }; - if (handlerData.level === "assert") { - if (handlerData.args[0] === false) { - breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), " ") || "console.assert"}`; - breadcrumb.data.arguments = handlerData.args.slice(1); - } else { - return; - } - } - addBreadcrumb(breadcrumb, { - input: handlerData.args, - level: handlerData.level - }); - }, "_consoleBreadcrumb"); -} -__name(_getConsoleBreadcrumbHandler, "_getConsoleBreadcrumbHandler"); -function _getXhrBreadcrumbHandler(client) { - return /* @__PURE__ */ __name(function _xhrBreadcrumb(handlerData) { - if (getClient() !== client) { - return; - } - const { startTimestamp, endTimestamp } = handlerData; - const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY]; - if (!startTimestamp || !endTimestamp || !sentryXhrData) { - return; - } - const { method, url, status_code, body } = sentryXhrData; - const data25 = { - method, - url, - status_code - }; - const hint = { - xhr: handlerData.xhr, - input: body, - startTimestamp, - endTimestamp - }; - const level = getBreadcrumbLogLevelFromHttpStatusCode(status_code); - addBreadcrumb( - { - category: "xhr", - data: data25, - type: "http", - level - }, - hint - ); - }, "_xhrBreadcrumb"); -} -__name(_getXhrBreadcrumbHandler, "_getXhrBreadcrumbHandler"); -function _getFetchBreadcrumbHandler(client) { - return /* @__PURE__ */ __name(function _fetchBreadcrumb(handlerData) { - if (getClient() !== client) { - return; - } - const { startTimestamp, endTimestamp } = handlerData; - if (!endTimestamp) { - return; - } - if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === "POST") { - return; - } - if (handlerData.error) { - const data25 = handlerData.fetchData; - const hint = { - data: handlerData.error, - input: handlerData.args, - startTimestamp, - endTimestamp - }; - addBreadcrumb( - { - category: "fetch", - data: data25, - level: "error", - type: "http" - }, - hint - ); - } else { - const response = handlerData.response; - const data25 = { - ...handlerData.fetchData, - status_code: response && response.status - }; - const hint = { - input: handlerData.args, - response, - startTimestamp, - endTimestamp - }; - const level = getBreadcrumbLogLevelFromHttpStatusCode(data25.status_code); - addBreadcrumb( - { - category: "fetch", - data: data25, - type: "http", - level - }, - hint - ); - } - }, "_fetchBreadcrumb"); -} -__name(_getFetchBreadcrumbHandler, "_getFetchBreadcrumbHandler"); -function _getHistoryBreadcrumbHandler(client) { - return /* @__PURE__ */ __name(function _historyBreadcrumb(handlerData) { - if (getClient() !== client) { - return; - } - let from2 = handlerData.from; - let to = handlerData.to; - const parsedLoc = parseUrl$1(WINDOW$5.location.href); - let parsedFrom = from2 ? parseUrl$1(from2) : void 0; - const parsedTo = parseUrl$1(to); - if (!parsedFrom || !parsedFrom.path) { - parsedFrom = parsedLoc; - } - if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) { - to = parsedTo.relative; - } - if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) { - from2 = parsedFrom.relative; - } - addBreadcrumb({ - category: "navigation", - data: { - from: from2, - to - } - }); - }, "_historyBreadcrumb"); -} -__name(_getHistoryBreadcrumbHandler, "_getHistoryBreadcrumbHandler"); -function _isEvent(event) { - return !!event && !!event.target; -} -__name(_isEvent, "_isEvent"); -const DEFAULT_EVENT_TARGET = [ - "EventTarget", - "Window", - "Node", - "ApplicationCache", - "AudioTrackList", - "BroadcastChannel", - "ChannelMergerNode", - "CryptoOperation", - "EventSource", - "FileReader", - "HTMLUnknownElement", - "IDBDatabase", - "IDBRequest", - "IDBTransaction", - "KeyOperation", - "MediaController", - "MessagePort", - "ModalWindow", - "Notification", - "SVGElementInstance", - "Screen", - "SharedWorker", - "TextTrack", - "TextTrackCue", - "TextTrackList", - "WebSocket", - "WebSocketWorker", - "Worker", - "XMLHttpRequest", - "XMLHttpRequestEventTarget", - "XMLHttpRequestUpload" -]; -const INTEGRATION_NAME$9 = "BrowserApiErrors"; -const _browserApiErrorsIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const _options = { - XMLHttpRequest: true, - eventTarget: true, - requestAnimationFrame: true, - setInterval: true, - setTimeout: true, - ...options4 - }; - return { - name: INTEGRATION_NAME$9, - // TODO: This currently only works for the first client this is setup - // We may want to adjust this to check for client etc. - setupOnce() { - if (_options.setTimeout) { - fill(WINDOW$5, "setTimeout", _wrapTimeFunction); - } - if (_options.setInterval) { - fill(WINDOW$5, "setInterval", _wrapTimeFunction); - } - if (_options.requestAnimationFrame) { - fill(WINDOW$5, "requestAnimationFrame", _wrapRAF); - } - if (_options.XMLHttpRequest && "XMLHttpRequest" in WINDOW$5) { - fill(XMLHttpRequest.prototype, "send", _wrapXHR$1); - } - const eventTargetOption = _options.eventTarget; - if (eventTargetOption) { - const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET; - eventTarget.forEach(_wrapEventTarget); - } - } - }; -}, "_browserApiErrorsIntegration"); -const browserApiErrorsIntegration = defineIntegration(_browserApiErrorsIntegration); -function _wrapTimeFunction(original) { - return function(...args) { - const originalCallback = args[0]; - args[0] = wrap$1(originalCallback, { - mechanism: { - data: { function: getFunctionName(original) }, - handled: false, - type: "instrument" - } - }); - return original.apply(this, args); - }; -} -__name(_wrapTimeFunction, "_wrapTimeFunction"); -function _wrapRAF(original) { - return function(callback) { - return original.apply(this, [ - wrap$1(callback, { - mechanism: { - data: { - function: "requestAnimationFrame", - handler: getFunctionName(original) - }, - handled: false, - type: "instrument" - } - }) - ]); - }; -} -__name(_wrapRAF, "_wrapRAF"); -function _wrapXHR$1(originalSend) { - return function(...args) { - const xhr = this; - const xmlHttpRequestProps = ["onload", "onerror", "onprogress", "onreadystatechange"]; - xmlHttpRequestProps.forEach((prop2) => { - if (prop2 in xhr && typeof xhr[prop2] === "function") { - fill(xhr, prop2, function(original) { - const wrapOptions = { - mechanism: { - data: { - function: prop2, - handler: getFunctionName(original) - }, - handled: false, - type: "instrument" - } - }; - const originalFunction = getOriginalFunction(original); - if (originalFunction) { - wrapOptions.mechanism.data.handler = getFunctionName(originalFunction); - } - return wrap$1(original, wrapOptions); - }); - } - }); - return originalSend.apply(this, args); - }; -} -__name(_wrapXHR$1, "_wrapXHR$1"); -function _wrapEventTarget(target) { - const globalObject = WINDOW$5; - const targetObj = globalObject[target]; - const proto = targetObj && targetObj.prototype; - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty("addEventListener")) { - return; - } - fill(proto, "addEventListener", function(original) { - return function(eventName, fn, options4) { - try { - if (isEventListenerObject(fn)) { - fn.handleEvent = wrap$1(fn.handleEvent, { - mechanism: { - data: { - function: "handleEvent", - handler: getFunctionName(fn), - target - }, - handled: false, - type: "instrument" - } - }); - } - } catch (e2) { - } - return original.apply(this, [ - eventName, - wrap$1(fn, { - mechanism: { - data: { - function: "addEventListener", - handler: getFunctionName(fn), - target - }, - handled: false, - type: "instrument" - } - }), - options4 - ]); - }; - }); - fill(proto, "removeEventListener", function(originalRemoveEventListener) { - return function(eventName, fn, options4) { - try { - const originalEventHandler = fn.__sentry_wrapped__; - if (originalEventHandler) { - originalRemoveEventListener.call(this, eventName, originalEventHandler, options4); - } - } catch (e2) { - } - return originalRemoveEventListener.call(this, eventName, fn, options4); - }; - }); -} -__name(_wrapEventTarget, "_wrapEventTarget"); -function isEventListenerObject(obj) { - return typeof obj.handleEvent === "function"; -} -__name(isEventListenerObject, "isEventListenerObject"); -const browserSessionIntegration = defineIntegration(() => { - return { - name: "BrowserSession", - setupOnce() { - if (typeof WINDOW$5.document === "undefined") { - DEBUG_BUILD$4 && logger$2.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."); - return; - } - startSession({ ignoreDuration: true }); - captureSession(); - addHistoryInstrumentationHandler(({ from: from2, to }) => { - if (from2 !== void 0 && from2 !== to) { - startSession({ ignoreDuration: true }); - captureSession(); - } - }); - } - }; -}); -const INTEGRATION_NAME$8 = "GlobalHandlers"; -const _globalHandlersIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const _options = { - onerror: true, - onunhandledrejection: true, - ...options4 - }; - return { - name: INTEGRATION_NAME$8, - setupOnce() { - Error.stackTraceLimit = 50; - }, - setup(client) { - if (_options.onerror) { - _installGlobalOnErrorHandler(client); - globalHandlerLog("onerror"); - } - if (_options.onunhandledrejection) { - _installGlobalOnUnhandledRejectionHandler(client); - globalHandlerLog("onunhandledrejection"); - } - } - }; -}, "_globalHandlersIntegration"); -const globalHandlersIntegration = defineIntegration(_globalHandlersIntegration); -function _installGlobalOnErrorHandler(client) { - addGlobalErrorInstrumentationHandler((data25) => { - const { stackParser, attachStacktrace } = getOptions(); - if (getClient() !== client || shouldIgnoreOnError()) { - return; - } - const { msg, url, line, column, error: error2 } = data25; - const event = _enhanceEventWithInitialFrame( - eventFromUnknownInput(stackParser, error2 || msg, void 0, attachStacktrace, false), - url, - line, - column - ); - event.level = "error"; - captureEvent(event, { - originalException: error2, - mechanism: { - handled: false, - type: "onerror" - } - }); - }); -} -__name(_installGlobalOnErrorHandler, "_installGlobalOnErrorHandler"); -function _installGlobalOnUnhandledRejectionHandler(client) { - addGlobalUnhandledRejectionInstrumentationHandler((e2) => { - const { stackParser, attachStacktrace } = getOptions(); - if (getClient() !== client || shouldIgnoreOnError()) { - return; - } - const error2 = _getUnhandledRejectionError(e2); - const event = isPrimitive(error2) ? _eventFromRejectionWithPrimitive(error2) : eventFromUnknownInput(stackParser, error2, void 0, attachStacktrace, true); - event.level = "error"; - captureEvent(event, { - originalException: error2, - mechanism: { - handled: false, - type: "onunhandledrejection" - } - }); - }); -} -__name(_installGlobalOnUnhandledRejectionHandler, "_installGlobalOnUnhandledRejectionHandler"); -function _getUnhandledRejectionError(error2) { - if (isPrimitive(error2)) { - return error2; - } - try { - if ("reason" in error2) { - return error2.reason; - } - if ("detail" in error2 && "reason" in error2.detail) { - return error2.detail.reason; - } - } catch (e2) { - } - return error2; -} -__name(_getUnhandledRejectionError, "_getUnhandledRejectionError"); -function _eventFromRejectionWithPrimitive(reason) { - return { - exception: { - values: [ - { - type: "UnhandledRejection", - // String() is needed because the Primitive type includes symbols (which can't be automatically stringified) - value: `Non-Error promise rejection captured with value: ${String(reason)}` - } - ] - } - }; -} -__name(_eventFromRejectionWithPrimitive, "_eventFromRejectionWithPrimitive"); -function _enhanceEventWithInitialFrame(event, url, line, column) { - const e2 = event.exception = event.exception || {}; - const ev = e2.values = e2.values || []; - const ev0 = ev[0] = ev[0] || {}; - const ev0s = ev0.stacktrace = ev0.stacktrace || {}; - const ev0sf = ev0s.frames = ev0s.frames || []; - const colno = column; - const lineno = line; - const filename = isString$8(url) && url.length > 0 ? url : getLocationHref(); - if (ev0sf.length === 0) { - ev0sf.push({ - colno, - filename, - function: UNKNOWN_FUNCTION, - in_app: true, - lineno - }); - } - return event; -} -__name(_enhanceEventWithInitialFrame, "_enhanceEventWithInitialFrame"); -function globalHandlerLog(type) { - DEBUG_BUILD$4 && logger$2.log(`Global Handler attached: ${type}`); -} -__name(globalHandlerLog, "globalHandlerLog"); -function getOptions() { - const client = getClient(); - const options4 = client && client.getOptions() || { - stackParser: /* @__PURE__ */ __name(() => [], "stackParser"), - attachStacktrace: false - }; - return options4; -} -__name(getOptions, "getOptions"); -const httpContextIntegration = defineIntegration(() => { - return { - name: "HttpContext", - preprocessEvent(event) { - if (!WINDOW$5.navigator && !WINDOW$5.location && !WINDOW$5.document) { - return; - } - const url = event.request && event.request.url || WINDOW$5.location && WINDOW$5.location.href; - const { referrer } = WINDOW$5.document || {}; - const { userAgent } = WINDOW$5.navigator || {}; - const headers = { - ...event.request && event.request.headers, - ...referrer && { Referer: referrer }, - ...userAgent && { "User-Agent": userAgent } - }; - const request = { ...event.request, ...url && { url }, headers }; - event.request = request; - } - }; -}); -const DEFAULT_KEY = "cause"; -const DEFAULT_LIMIT = 5; -const INTEGRATION_NAME$7 = "LinkedErrors"; -const _linkedErrorsIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const limit = options4.limit || DEFAULT_LIMIT; - const key = options4.key || DEFAULT_KEY; - return { - name: INTEGRATION_NAME$7, - preprocessEvent(event, hint, client) { - const options5 = client.getOptions(); - applyAggregateErrorsToEvent( - // This differs from the LinkedErrors integration in core by using a different exceptionFromError function - exceptionFromError, - options5.stackParser, - options5.maxValueLength, - key, - limit, - event, - hint - ); - } - }; -}, "_linkedErrorsIntegration"); -const linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration); -function getDefaultIntegrations(options4) { - const integrations = [ - inboundFiltersIntegration(), - functionToStringIntegration(), - browserApiErrorsIntegration(), - breadcrumbsIntegration(), - globalHandlersIntegration(), - linkedErrorsIntegration(), - dedupeIntegration(), - httpContextIntegration() - ]; - if (options4.autoSessionTracking !== false) { - integrations.push(browserSessionIntegration()); - } - return integrations; -} -__name(getDefaultIntegrations, "getDefaultIntegrations"); -function applyDefaultOptions(optionsArg = {}) { - const defaultOptions2 = { - defaultIntegrations: getDefaultIntegrations(optionsArg), - release: typeof __SENTRY_RELEASE__ === "string" ? __SENTRY_RELEASE__ : WINDOW$5.SENTRY_RELEASE && WINDOW$5.SENTRY_RELEASE.id ? WINDOW$5.SENTRY_RELEASE.id : void 0, - autoSessionTracking: true, - sendClientReports: true - }; - if (optionsArg.defaultIntegrations == null) { - delete optionsArg.defaultIntegrations; - } - return { ...defaultOptions2, ...optionsArg }; -} -__name(applyDefaultOptions, "applyDefaultOptions"); -function shouldShowBrowserExtensionError() { - const windowWithMaybeExtension = typeof WINDOW$5.window !== "undefined" && WINDOW$5; - if (!windowWithMaybeExtension) { - return false; - } - const extensionKey = windowWithMaybeExtension.chrome ? "chrome" : "browser"; - const extensionObject = windowWithMaybeExtension[extensionKey]; - const runtimeId = extensionObject && extensionObject.runtime && extensionObject.runtime.id; - const href = WINDOW$5.location && WINDOW$5.location.href || ""; - const extensionProtocols = ["chrome-extension:", "moz-extension:", "ms-browser-extension:", "safari-web-extension:"]; - const isDedicatedExtensionPage = !!runtimeId && WINDOW$5 === WINDOW$5.top && extensionProtocols.some((protocol) => href.startsWith(`${protocol}//`)); - const isNWjs = typeof windowWithMaybeExtension.nw !== "undefined"; - return !!runtimeId && !isDedicatedExtensionPage && !isNWjs; -} -__name(shouldShowBrowserExtensionError, "shouldShowBrowserExtensionError"); -function init$4(browserOptions = {}) { - const options4 = applyDefaultOptions(browserOptions); - if (!options4.skipBrowserExtensionCheck && shouldShowBrowserExtensionError()) { - consoleSandbox(() => { - console.error( - "[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/" - ); - }); - return; - } - if (DEBUG_BUILD$4) { - if (!supportsFetch()) { - logger$2.warn( - "No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill." - ); - } - } - const clientOptions = { - ...options4, - stackParser: stackParserFromStackParserOptions(options4.stackParser || defaultStackParser), - integrations: getIntegrationsToSetup(options4), - transport: options4.transport || makeFetchTransport - }; - return initAndBind(BrowserClient, clientOptions); -} -__name(init$4, "init$4"); -function showReportDialog(options4 = {}) { - if (!WINDOW$5.document) { - DEBUG_BUILD$4 && logger$2.error("Global document not defined in showReportDialog call"); - return; - } - const scope = getCurrentScope$1(); - const client = scope.getClient(); - const dsn = client && client.getDsn(); - if (!dsn) { - DEBUG_BUILD$4 && logger$2.error("DSN not configured for showReportDialog call"); - return; - } - if (scope) { - options4.user = { - ...scope.getUser(), - ...options4.user - }; - } - if (!options4.eventId) { - const eventId = lastEventId(); - if (eventId) { - options4.eventId = eventId; - } - } - const script2 = WINDOW$5.document.createElement("script"); - script2.async = true; - script2.crossOrigin = "anonymous"; - script2.src = getReportDialogEndpoint(dsn, options4); - if (options4.onLoad) { - script2.onload = options4.onLoad; - } - const { onClose } = options4; - if (onClose) { - const reportDialogClosedMessageHandler = /* @__PURE__ */ __name((event) => { - if (event.data === "__sentry_reportdialog_closed__") { - try { - onClose(); - } finally { - WINDOW$5.removeEventListener("message", reportDialogClosedMessageHandler); - } - } - }, "reportDialogClosedMessageHandler"); - WINDOW$5.addEventListener("message", reportDialogClosedMessageHandler); - } - const injectionPoint = WINDOW$5.document.head || WINDOW$5.document.body; - if (injectionPoint) { - injectionPoint.appendChild(script2); - } else { - DEBUG_BUILD$4 && logger$2.error("Not injecting report dialog. No injection point found in HTML"); - } -} -__name(showReportDialog, "showReportDialog"); -function forceLoad() { -} -__name(forceLoad, "forceLoad"); -function onLoad(callback) { - callback(); -} -__name(onLoad, "onLoad"); -function captureUserFeedback(feedback) { - const client = getClient(); - if (client) { - client.captureUserFeedback(feedback); - } -} -__name(captureUserFeedback, "captureUserFeedback"); -const LazyLoadableIntegrations = { - replayIntegration: "replay", - replayCanvasIntegration: "replay-canvas", - feedbackIntegration: "feedback", - feedbackModalIntegration: "feedback-modal", - feedbackScreenshotIntegration: "feedback-screenshot", - captureConsoleIntegration: "captureconsole", - contextLinesIntegration: "contextlines", - linkedErrorsIntegration: "linkederrors", - debugIntegration: "debug", - dedupeIntegration: "dedupe", - extraErrorDataIntegration: "extraerrordata", - httpClientIntegration: "httpclient", - reportingObserverIntegration: "reportingobserver", - rewriteFramesIntegration: "rewriteframes", - sessionTimingIntegration: "sessiontiming", - browserProfilingIntegration: "browserprofiling", - moduleMetadataIntegration: "modulemetadata" -}; -const WindowWithMaybeIntegration = WINDOW$5; -async function lazyLoadIntegration(name2, scriptNonce) { - const bundle = LazyLoadableIntegrations[name2]; - const sentryOnWindow = WindowWithMaybeIntegration.Sentry = WindowWithMaybeIntegration.Sentry || {}; - if (!bundle) { - throw new Error(`Cannot lazy load integration: ${name2}`); - } - const existing = sentryOnWindow[name2]; - if (typeof existing === "function" && !("_isShim" in existing)) { - return existing; - } - const url = getScriptURL(bundle); - const script2 = WINDOW$5.document.createElement("script"); - script2.src = url; - script2.crossOrigin = "anonymous"; - script2.referrerPolicy = "origin"; - if (scriptNonce) { - script2.setAttribute("nonce", scriptNonce); - } - const waitForLoad = new Promise((resolve2, reject3) => { - script2.addEventListener("load", () => resolve2()); - script2.addEventListener("error", reject3); - }); - const currentScript = WINDOW$5.document.currentScript; - const parent = WINDOW$5.document.body || WINDOW$5.document.head || currentScript && currentScript.parentElement; - if (parent) { - parent.appendChild(script2); - } else { - throw new Error(`Could not find parent element to insert lazy-loaded ${name2} script`); - } - try { - await waitForLoad; - } catch (e2) { - throw new Error(`Error when loading integration: ${name2}`); - } - const integrationFn = sentryOnWindow[name2]; - if (typeof integrationFn !== "function") { - throw new Error(`Could not load integration: ${name2}`); - } - return integrationFn; -} -__name(lazyLoadIntegration, "lazyLoadIntegration"); -function getScriptURL(bundle) { - const client = getClient(); - const options4 = client && client.getOptions(); - const baseURL = options4 && options4.cdnBaseUrl || "https://browser.sentry-cdn.com"; - return new URL(`/${SDK_VERSION}/${bundle}.min.js`, baseURL).toString(); -} -__name(getScriptURL, "getScriptURL"); -const WINDOW$3 = GLOBAL_OBJ; -const INTEGRATION_NAME$6 = "ReportingObserver"; -const SETUP_CLIENTS = /* @__PURE__ */ new WeakMap(); -const _reportingObserverIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const types = options4.types || ["crash", "deprecation", "intervention"]; - function handler6(reports) { - if (!SETUP_CLIENTS.has(getClient())) { - return; - } - for (const report of reports) { - withScope((scope) => { - scope.setExtra("url", report.url); - const label5 = `ReportingObserver [${report.type}]`; - let details = "No details available"; - if (report.body) { - const plainBody = {}; - for (const prop2 in report.body) { - plainBody[prop2] = report.body[prop2]; - } - scope.setExtra("body", plainBody); - if (report.type === "crash") { - const body = report.body; - details = [body.crashId || "", body.reason || ""].join(" ").trim() || details; - } else { - const body = report.body; - details = body.message || details; - } - } - captureMessage(`${label5}: ${details}`); - }); - } - } - __name(handler6, "handler"); - return { - name: INTEGRATION_NAME$6, - setupOnce() { - if (!supportsReportingObserver()) { - return; - } - const observer = new WINDOW$3.ReportingObserver( - handler6, - { - buffered: true, - types - } - ); - observer.observe(); - }, - setup(client) { - SETUP_CLIENTS.set(client, true); - } - }; -}, "_reportingObserverIntegration"); -const reportingObserverIntegration = defineIntegration(_reportingObserverIntegration); -const INTEGRATION_NAME$5 = "HttpClient"; -const _httpClientIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const _options = { - failedRequestStatusCodes: [[500, 599]], - failedRequestTargets: [/.*/], - ...options4 - }; - return { - name: INTEGRATION_NAME$5, - setup(client) { - _wrapFetch(client, _options); - _wrapXHR(client, _options); - } - }; -}, "_httpClientIntegration"); -const httpClientIntegration = defineIntegration(_httpClientIntegration); -function _fetchResponseHandler(options4, requestInfo, response, requestInit, error2) { - if (_shouldCaptureResponse(options4, response.status, response.url)) { - const request = _getRequest(requestInfo, requestInit); - let requestHeaders, responseHeaders, requestCookies, responseCookies; - if (_shouldSendDefaultPii()) { - [requestHeaders, requestCookies] = _parseCookieHeaders("Cookie", request); - [responseHeaders, responseCookies] = _parseCookieHeaders("Set-Cookie", response); - } - const event = _createEvent({ - url: request.url, - method: request.method, - status: response.status, - requestHeaders, - responseHeaders, - requestCookies, - responseCookies, - error: error2 - }); - captureEvent(event); - } -} -__name(_fetchResponseHandler, "_fetchResponseHandler"); -function _parseCookieHeaders(cookieHeader, obj) { - const headers = _extractFetchHeaders(obj.headers); - let cookies2; - try { - const cookieString = headers[cookieHeader] || headers[cookieHeader.toLowerCase()] || void 0; - if (cookieString) { - cookies2 = _parseCookieString(cookieString); - } - } catch (e2) { - } - return [headers, cookies2]; -} -__name(_parseCookieHeaders, "_parseCookieHeaders"); -function _xhrResponseHandler(options4, xhr, method, headers, error2) { - if (_shouldCaptureResponse(options4, xhr.status, xhr.responseURL)) { - let requestHeaders, responseCookies, responseHeaders; - if (_shouldSendDefaultPii()) { - try { - const cookieString = xhr.getResponseHeader("Set-Cookie") || xhr.getResponseHeader("set-cookie") || void 0; - if (cookieString) { - responseCookies = _parseCookieString(cookieString); - } - } catch (e3) { - } - try { - responseHeaders = _getXHRResponseHeaders(xhr); - } catch (e4) { - } - requestHeaders = headers; - } - const event = _createEvent({ - url: xhr.responseURL, - method, - status: xhr.status, - requestHeaders, - // Can't access request cookies from XHR - responseHeaders, - responseCookies, - error: error2 - }); - captureEvent(event); - } -} -__name(_xhrResponseHandler, "_xhrResponseHandler"); -function _getResponseSizeFromHeaders(headers) { - if (headers) { - const contentLength = headers["Content-Length"] || headers["content-length"]; - if (contentLength) { - return parseInt(contentLength, 10); - } - } - return void 0; -} -__name(_getResponseSizeFromHeaders, "_getResponseSizeFromHeaders"); -function _parseCookieString(cookieString) { - return cookieString.split("; ").reduce((acc, cookie) => { - const [key, value4] = cookie.split("="); - if (key && value4) { - acc[key] = value4; - } - return acc; - }, {}); -} -__name(_parseCookieString, "_parseCookieString"); -function _extractFetchHeaders(headers) { - const result = {}; - headers.forEach((value4, key) => { - result[key] = value4; - }); - return result; -} -__name(_extractFetchHeaders, "_extractFetchHeaders"); -function _getXHRResponseHeaders(xhr) { - const headers = xhr.getAllResponseHeaders(); - if (!headers) { - return {}; - } - return headers.split("\r\n").reduce((acc, line) => { - const [key, value4] = line.split(": "); - if (key && value4) { - acc[key] = value4; - } - return acc; - }, {}); -} -__name(_getXHRResponseHeaders, "_getXHRResponseHeaders"); -function _isInGivenRequestTargets(failedRequestTargets, target) { - return failedRequestTargets.some((givenRequestTarget) => { - if (typeof givenRequestTarget === "string") { - return target.includes(givenRequestTarget); - } - return givenRequestTarget.test(target); - }); -} -__name(_isInGivenRequestTargets, "_isInGivenRequestTargets"); -function _isInGivenStatusRanges(failedRequestStatusCodes, status) { - return failedRequestStatusCodes.some((range2) => { - if (typeof range2 === "number") { - return range2 === status; - } - return status >= range2[0] && status <= range2[1]; - }); -} -__name(_isInGivenStatusRanges, "_isInGivenStatusRanges"); -function _wrapFetch(client, options4) { - if (!supportsNativeFetch()) { - return; - } - addFetchInstrumentationHandler((handlerData) => { - if (getClient() !== client) { - return; - } - const { response, args, error: error2, virtualError } = handlerData; - const [requestInfo, requestInit] = args; - if (!response) { - return; - } - _fetchResponseHandler(options4, requestInfo, response, requestInit, error2 || virtualError); - }, false); -} -__name(_wrapFetch, "_wrapFetch"); -function _wrapXHR(client, options4) { - if (!("XMLHttpRequest" in GLOBAL_OBJ)) { - return; - } - addXhrInstrumentationHandler((handlerData) => { - if (getClient() !== client) { - return; - } - const { error: error2, virtualError } = handlerData; - const xhr = handlerData.xhr; - const sentryXhrData = xhr[SENTRY_XHR_DATA_KEY]; - if (!sentryXhrData) { - return; - } - const { method, request_headers: headers } = sentryXhrData; - try { - _xhrResponseHandler(options4, xhr, method, headers, error2 || virtualError); - } catch (e2) { - DEBUG_BUILD$4 && logger$2.warn("Error while extracting response event form XHR response", e2); - } - }); -} -__name(_wrapXHR, "_wrapXHR"); -function _shouldCaptureResponse(options4, status, url) { - return _isInGivenStatusRanges(options4.failedRequestStatusCodes, status) && _isInGivenRequestTargets(options4.failedRequestTargets, url) && !isSentryRequestUrl(url, getClient()); -} -__name(_shouldCaptureResponse, "_shouldCaptureResponse"); -function _createEvent(data25) { - const client = getClient(); - const virtualStackTrace = client && data25.error && data25.error instanceof Error ? data25.error.stack : void 0; - const stack2 = virtualStackTrace && client ? client.getOptions().stackParser(virtualStackTrace, 0, 1) : void 0; - const message3 = `HTTP Client Error with status code: ${data25.status}`; - const event = { - message: message3, - exception: { - values: [ - { - type: "Error", - value: message3, - stacktrace: stack2 ? { frames: stack2 } : void 0 - } - ] - }, - request: { - url: data25.url, - method: data25.method, - headers: data25.requestHeaders, - cookies: data25.requestCookies - }, - contexts: { - response: { - status_code: data25.status, - headers: data25.responseHeaders, - cookies: data25.responseCookies, - body_size: _getResponseSizeFromHeaders(data25.responseHeaders) - } - } - }; - addExceptionMechanism(event, { - type: "http.client", - handled: false - }); - return event; -} -__name(_createEvent, "_createEvent"); -function _getRequest(requestInfo, requestInit) { - if (!requestInit && requestInfo instanceof Request) { - return requestInfo; - } - if (requestInfo instanceof Request && requestInfo.bodyUsed) { - return requestInfo; - } - return new Request(requestInfo, requestInit); -} -__name(_getRequest, "_getRequest"); -function _shouldSendDefaultPii() { - const client = getClient(); - return client ? Boolean(client.getOptions().sendDefaultPii) : false; -} -__name(_shouldSendDefaultPii, "_shouldSendDefaultPii"); -const WINDOW$2 = GLOBAL_OBJ; -const DEFAULT_LINES_OF_CONTEXT = 7; -const INTEGRATION_NAME$4 = "ContextLines"; -const _contextLinesIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const contextLines = options4.frameContextLines != null ? options4.frameContextLines : DEFAULT_LINES_OF_CONTEXT; - return { - name: INTEGRATION_NAME$4, - processEvent(event) { - return addSourceContext(event, contextLines); - } - }; -}, "_contextLinesIntegration"); -const contextLinesIntegration = defineIntegration(_contextLinesIntegration); -function addSourceContext(event, contextLines) { - const doc2 = WINDOW$2.document; - const htmlFilename = WINDOW$2.location && stripUrlQueryAndFragment(WINDOW$2.location.href); - if (!doc2 || !htmlFilename) { - return event; - } - const exceptions = event.exception && event.exception.values; - if (!exceptions || !exceptions.length) { - return event; - } - const html = doc2.documentElement.innerHTML; - if (!html) { - return event; - } - const htmlLines = ["", "", ...html.split("\n"), ""]; - exceptions.forEach((exception) => { - const stacktrace = exception.stacktrace; - if (stacktrace && stacktrace.frames) { - stacktrace.frames = stacktrace.frames.map( - (frame) => applySourceContextToFrame(frame, htmlLines, htmlFilename, contextLines) - ); - } - }); - return event; -} -__name(addSourceContext, "addSourceContext"); -function applySourceContextToFrame(frame, htmlLines, htmlFilename, linesOfContext) { - if (frame.filename !== htmlFilename || !frame.lineno || !htmlLines.length) { - return frame; - } - addContextToFrame(htmlLines, frame, linesOfContext); - return frame; -} -__name(applySourceContextToFrame, "applySourceContextToFrame"); -const WINDOW$1 = GLOBAL_OBJ; -const REPLAY_SESSION_KEY = "sentryReplaySession"; -const REPLAY_EVENT_NAME = "replay_event"; -const UNABLE_TO_SEND_REPLAY = "Unable to send Replay"; -const SESSION_IDLE_PAUSE_DURATION = 3e5; -const SESSION_IDLE_EXPIRE_DURATION = 9e5; -const DEFAULT_FLUSH_MIN_DELAY = 5e3; -const DEFAULT_FLUSH_MAX_DELAY = 5500; -const BUFFER_CHECKOUT_TIME = 6e4; -const RETRY_BASE_INTERVAL = 5e3; -const RETRY_MAX_COUNT = 3; -const NETWORK_BODY_MAX_SIZE = 15e4; -const CONSOLE_ARG_MAX_SIZE = 5e3; -const SLOW_CLICK_THRESHOLD = 3e3; -const SLOW_CLICK_SCROLL_TIMEOUT = 300; -const REPLAY_MAX_EVENT_BUFFER_SIZE = 2e7; -const MIN_REPLAY_DURATION = 4999; -const MIN_REPLAY_DURATION_LIMIT = 15e3; -const MAX_REPLAY_DURATION = 36e5; -function _nullishCoalesce$1(lhs, rhsFn) { - if (lhs != null) { - return lhs; - } else { - return rhsFn(); - } -} -__name(_nullishCoalesce$1, "_nullishCoalesce$1"); -function _optionalChain$5(ops) { - let lastAccessLHS = void 0; - let value4 = ops[0]; - let i2 = 1; - while (i2 < ops.length) { - const op = ops[i2]; - const fn = ops[i2 + 1]; - i2 += 2; - if ((op === "optionalAccess" || op === "optionalCall") && value4 == null) { - return void 0; - } - if (op === "access" || op === "optionalAccess") { - lastAccessLHS = value4; - value4 = fn(value4); - } else if (op === "call" || op === "optionalCall") { - value4 = fn((...args) => value4.call(lastAccessLHS, ...args)); - lastAccessLHS = void 0; - } - } - return value4; -} -__name(_optionalChain$5, "_optionalChain$5"); -var NodeType$3; -(function(NodeType3) { - NodeType3[NodeType3["Document"] = 0] = "Document"; - NodeType3[NodeType3["DocumentType"] = 1] = "DocumentType"; - NodeType3[NodeType3["Element"] = 2] = "Element"; - NodeType3[NodeType3["Text"] = 3] = "Text"; - NodeType3[NodeType3["CDATA"] = 4] = "CDATA"; - NodeType3[NodeType3["Comment"] = 5] = "Comment"; -})(NodeType$3 || (NodeType$3 = {})); -function isElement$1(n2) { - return n2.nodeType === n2.ELEMENT_NODE; -} -__name(isElement$1, "isElement$1"); -function isShadowRoot(n2) { - const host = _optionalChain$5([n2, "optionalAccess", (_2) => _2.host]); - return Boolean(_optionalChain$5([host, "optionalAccess", (_2) => _2.shadowRoot]) === n2); -} -__name(isShadowRoot, "isShadowRoot"); -function isNativeShadowDom(shadowRoot) { - return Object.prototype.toString.call(shadowRoot) === "[object ShadowRoot]"; -} -__name(isNativeShadowDom, "isNativeShadowDom"); -function fixBrowserCompatibilityIssuesInCSS(cssText) { - if (cssText.includes(" background-clip: text;") && !cssText.includes(" -webkit-background-clip: text;")) { - cssText = cssText.replace(/\sbackground-clip:\s*text;/g, " -webkit-background-clip: text; background-clip: text;"); - } - return cssText; -} -__name(fixBrowserCompatibilityIssuesInCSS, "fixBrowserCompatibilityIssuesInCSS"); -function escapeImportStatement(rule) { - const { cssText } = rule; - if (cssText.split('"').length < 3) - return cssText; - const statement = ["@import", `url(${JSON.stringify(rule.href)})`]; - if (rule.layerName === "") { - statement.push(`layer`); - } else if (rule.layerName) { - statement.push(`layer(${rule.layerName})`); - } - if (rule.supportsText) { - statement.push(`supports(${rule.supportsText})`); - } - if (rule.media.length) { - statement.push(rule.media.mediaText); - } - return statement.join(" ") + ";"; -} -__name(escapeImportStatement, "escapeImportStatement"); -function stringifyStylesheet(s2) { - try { - const rules = s2.rules || s2.cssRules; - return rules ? fixBrowserCompatibilityIssuesInCSS(Array.from(rules, stringifyRule).join("")) : null; - } catch (error2) { - return null; - } -} -__name(stringifyStylesheet, "stringifyStylesheet"); -function fixAllCssProperty(rule) { - let styles = ""; - for (let i2 = 0; i2 < rule.style.length; i2++) { - const styleDeclaration = rule.style; - const attribute2 = styleDeclaration[i2]; - const isImportant = styleDeclaration.getPropertyPriority(attribute2); - styles += `${attribute2}:${styleDeclaration.getPropertyValue(attribute2)}${isImportant ? ` !important` : ""};`; - } - return `${rule.selectorText} { ${styles} }`; -} -__name(fixAllCssProperty, "fixAllCssProperty"); -function stringifyRule(rule) { - let importStringified; - if (isCSSImportRule(rule)) { - try { - importStringified = stringifyStylesheet(rule.styleSheet) || escapeImportStatement(rule); - } catch (error2) { - } - } else if (isCSSStyleRule(rule)) { - let cssText = rule.cssText; - const needsSafariColonFix = rule.selectorText.includes(":"); - const needsAllFix = typeof rule.style["all"] === "string" && rule.style["all"]; - if (needsAllFix) { - cssText = fixAllCssProperty(rule); - } - if (needsSafariColonFix) { - cssText = fixSafariColons(cssText); - } - if (needsSafariColonFix || needsAllFix) { - return cssText; - } - } - return importStringified || rule.cssText; -} -__name(stringifyRule, "stringifyRule"); -function fixSafariColons(cssStringified) { - const regex2 = /(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm; - return cssStringified.replace(regex2, "$1\\$2"); -} -__name(fixSafariColons, "fixSafariColons"); -function isCSSImportRule(rule) { - return "styleSheet" in rule; -} -__name(isCSSImportRule, "isCSSImportRule"); -function isCSSStyleRule(rule) { - return "selectorText" in rule; -} -__name(isCSSStyleRule, "isCSSStyleRule"); -class Mirror { - static { - __name(this, "Mirror"); - } - constructor() { - this.idNodeMap = /* @__PURE__ */ new Map(); - this.nodeMetaMap = /* @__PURE__ */ new WeakMap(); - } - getId(n2) { - if (!n2) - return -1; - const id3 = _optionalChain$5([this, "access", (_3) => _3.getMeta, "call", (_4) => _4(n2), "optionalAccess", (_5) => _5.id]); - return _nullishCoalesce$1(id3, () => -1); - } - getNode(id3) { - return this.idNodeMap.get(id3) || null; - } - getIds() { - return Array.from(this.idNodeMap.keys()); - } - getMeta(n2) { - return this.nodeMetaMap.get(n2) || null; - } - removeNodeFromMap(n2) { - const id3 = this.getId(n2); - this.idNodeMap.delete(id3); - if (n2.childNodes) { - n2.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode)); - } - } - has(id3) { - return this.idNodeMap.has(id3); - } - hasNode(node3) { - return this.nodeMetaMap.has(node3); - } - add(n2, meta) { - const id3 = meta.id; - this.idNodeMap.set(id3, n2); - this.nodeMetaMap.set(n2, meta); - } - replace(id3, n2) { - const oldNode = this.getNode(id3); - if (oldNode) { - const meta = this.nodeMetaMap.get(oldNode); - if (meta) - this.nodeMetaMap.set(n2, meta); - } - this.idNodeMap.set(id3, n2); - } - reset() { - this.idNodeMap = /* @__PURE__ */ new Map(); - this.nodeMetaMap = /* @__PURE__ */ new WeakMap(); - } -} -function createMirror() { - return new Mirror(); -} -__name(createMirror, "createMirror"); -function shouldMaskInput({ maskInputOptions, tagName, type }) { - if (tagName === "OPTION") { - tagName = "SELECT"; - } - return Boolean(maskInputOptions[tagName.toLowerCase()] || type && maskInputOptions[type] || type === "password" || tagName === "INPUT" && !type && maskInputOptions["text"]); -} -__name(shouldMaskInput, "shouldMaskInput"); -function maskInputValue({ isMasked: isMasked2, element, value: value4, maskInputFn }) { - let text2 = value4 || ""; - if (!isMasked2) { - return text2; - } - if (maskInputFn) { - text2 = maskInputFn(text2, element); - } - return "*".repeat(text2.length); -} -__name(maskInputValue, "maskInputValue"); -function toLowerCase(str) { - return str.toLowerCase(); -} -__name(toLowerCase, "toLowerCase"); -function toUpperCase(str) { - return str.toUpperCase(); -} -__name(toUpperCase, "toUpperCase"); -const ORIGINAL_ATTRIBUTE_NAME = "__rrweb_original__"; -function is2DCanvasBlank(canvas) { - const ctx = canvas.getContext("2d"); - if (!ctx) - return true; - const chunkSize = 50; - for (let x2 = 0; x2 < canvas.width; x2 += chunkSize) { - for (let y2 = 0; y2 < canvas.height; y2 += chunkSize) { - const getImageData = ctx.getImageData; - const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData; - const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x2, y2, Math.min(chunkSize, canvas.width - x2), Math.min(chunkSize, canvas.height - y2)).data.buffer); - if (pixelBuffer.some((pixel) => pixel !== 0)) - return false; - } - } - return true; -} -__name(is2DCanvasBlank, "is2DCanvasBlank"); -function getInputType(element) { - const type = element.type; - return element.hasAttribute("data-rr-is-password") ? "password" : type ? toLowerCase(type) : null; -} -__name(getInputType, "getInputType"); -function getInputValue(el, tagName, type) { - if (tagName === "INPUT" && (type === "radio" || type === "checkbox")) { - return el.getAttribute("value") || ""; - } - return el.value; -} -__name(getInputValue, "getInputValue"); -function extractFileExtension(path, baseURL) { - let url; - try { - url = new URL(path, _nullishCoalesce$1(baseURL, () => window.location.href)); - } catch (err) { - return null; - } - const regex2 = /\.([0-9a-z]+)(?:$)/i; - const match2 = url.pathname.match(regex2); - return _nullishCoalesce$1(_optionalChain$5([match2, "optionalAccess", (_6) => _6[1]]), () => null); -} -__name(extractFileExtension, "extractFileExtension"); -const cachedImplementations$1 = {}; -function getImplementation$1(name2) { - const cached = cachedImplementations$1[name2]; - if (cached) { - return cached; - } - const document2 = window.document; - let impl = window[name2]; - if (document2 && typeof document2.createElement === "function") { - try { - const sandbox = document2.createElement("iframe"); - sandbox.hidden = true; - document2.head.appendChild(sandbox); - const contentWindow = sandbox.contentWindow; - if (contentWindow && contentWindow[name2]) { - impl = contentWindow[name2]; - } - document2.head.removeChild(sandbox); - } catch (e2) { - } - } - return cachedImplementations$1[name2] = impl.bind(window); -} -__name(getImplementation$1, "getImplementation$1"); -function setTimeout$2(...rest) { - return getImplementation$1("setTimeout")(...rest); -} -__name(setTimeout$2, "setTimeout$2"); -function clearTimeout$2(...rest) { - return getImplementation$1("clearTimeout")(...rest); -} -__name(clearTimeout$2, "clearTimeout$2"); -function getIframeContentDocument(iframe) { - try { - return iframe.contentDocument; - } catch (e2) { - } -} -__name(getIframeContentDocument, "getIframeContentDocument"); -let _id$2 = 1; -const tagNameRegex = new RegExp("[^a-z0-9-_:]"); -const IGNORED_NODE = -2; -function genId() { - return _id$2++; -} -__name(genId, "genId"); -function getValidTagName(element) { - if (element instanceof HTMLFormElement) { - return "form"; - } - const processedTagName = toLowerCase(element.tagName); - if (tagNameRegex.test(processedTagName)) { - return "div"; - } - return processedTagName; -} -__name(getValidTagName, "getValidTagName"); -function extractOrigin(url) { - let origin2 = ""; - if (url.indexOf("//") > -1) { - origin2 = url.split("/").slice(0, 3).join("/"); - } else { - origin2 = url.split("/")[0]; - } - origin2 = origin2.split("?")[0]; - return origin2; -} -__name(extractOrigin, "extractOrigin"); -let canvasService; -let canvasCtx; -const URL_IN_CSS_REF = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm; -const URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\/\//i; -const URL_WWW_MATCH = /^www\..*/i; -const DATA_URI = /^(data:)([^,]*),(.*)/i; -function absoluteToStylesheet(cssText, href) { - return (cssText || "").replace(URL_IN_CSS_REF, (origin2, quote1, path1, quote2, path2, path3) => { - const filePath = path1 || path2 || path3; - const maybeQuote = quote1 || quote2 || ""; - if (!filePath) { - return origin2; - } - if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) { - return `url(${maybeQuote}${filePath}${maybeQuote})`; - } - if (DATA_URI.test(filePath)) { - return `url(${maybeQuote}${filePath}${maybeQuote})`; - } - if (filePath[0] === "/") { - return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`; - } - const stack2 = href.split("/"); - const parts2 = filePath.split("/"); - stack2.pop(); - for (const part of parts2) { - if (part === ".") { - continue; - } else if (part === "..") { - stack2.pop(); - } else { - stack2.push(part); - } - } - return `url(${maybeQuote}${stack2.join("/")}${maybeQuote})`; - }); -} -__name(absoluteToStylesheet, "absoluteToStylesheet"); -const SRCSET_NOT_SPACES = /^[^ \t\n\r\u000c]+/; -const SRCSET_COMMAS_OR_SPACES = /^[, \t\n\r\u000c]+/; -function getAbsoluteSrcsetString(doc2, attributeValue) { - if (attributeValue.trim() === "") { - return attributeValue; - } - let pos2 = 0; - function collectCharacters(regEx) { - let chars2; - const match2 = regEx.exec(attributeValue.substring(pos2)); - if (match2) { - chars2 = match2[0]; - pos2 += chars2.length; - return chars2; - } - return ""; - } - __name(collectCharacters, "collectCharacters"); - const output = []; - while (true) { - collectCharacters(SRCSET_COMMAS_OR_SPACES); - if (pos2 >= attributeValue.length) { - break; - } - let url = collectCharacters(SRCSET_NOT_SPACES); - if (url.slice(-1) === ",") { - url = absoluteToDoc(doc2, url.substring(0, url.length - 1)); - output.push(url); - } else { - let descriptorsStr = ""; - url = absoluteToDoc(doc2, url); - let inParens = false; - while (true) { - const c2 = attributeValue.charAt(pos2); - if (c2 === "") { - output.push((url + descriptorsStr).trim()); - break; - } else if (!inParens) { - if (c2 === ",") { - pos2 += 1; - output.push((url + descriptorsStr).trim()); - break; - } else if (c2 === "(") { - inParens = true; - } - } else { - if (c2 === ")") { - inParens = false; - } - } - descriptorsStr += c2; - pos2 += 1; - } - } - } - return output.join(", "); -} -__name(getAbsoluteSrcsetString, "getAbsoluteSrcsetString"); -const cachedDocument = /* @__PURE__ */ new WeakMap(); -function absoluteToDoc(doc2, attributeValue) { - if (!attributeValue || attributeValue.trim() === "") { - return attributeValue; - } - return getHref(doc2, attributeValue); -} -__name(absoluteToDoc, "absoluteToDoc"); -function isSVGElement(el) { - return Boolean(el.tagName === "svg" || el.ownerSVGElement); -} -__name(isSVGElement, "isSVGElement"); -function getHref(doc2, customHref) { - let a2 = cachedDocument.get(doc2); - if (!a2) { - a2 = doc2.createElement("a"); - cachedDocument.set(doc2, a2); - } - if (!customHref) { - customHref = ""; - } else if (customHref.startsWith("blob:") || customHref.startsWith("data:")) { - return customHref; - } - a2.setAttribute("href", customHref); - return a2.href; -} -__name(getHref, "getHref"); -function transformAttribute(doc2, tagName, name2, value4, element, maskAttributeFn) { - if (!value4) { - return value4; - } - if (name2 === "src" || name2 === "href" && !(tagName === "use" && value4[0] === "#")) { - return absoluteToDoc(doc2, value4); - } else if (name2 === "xlink:href" && value4[0] !== "#") { - return absoluteToDoc(doc2, value4); - } else if (name2 === "background" && (tagName === "table" || tagName === "td" || tagName === "th")) { - return absoluteToDoc(doc2, value4); - } else if (name2 === "srcset") { - return getAbsoluteSrcsetString(doc2, value4); - } else if (name2 === "style") { - return absoluteToStylesheet(value4, getHref(doc2)); - } else if (tagName === "object" && name2 === "data") { - return absoluteToDoc(doc2, value4); - } - if (typeof maskAttributeFn === "function") { - return maskAttributeFn(name2, value4, element); - } - return value4; -} -__name(transformAttribute, "transformAttribute"); -function ignoreAttribute(tagName, name2, _value) { - return (tagName === "video" || tagName === "audio") && name2 === "autoplay"; -} -__name(ignoreAttribute, "ignoreAttribute"); -function _isBlockedElement(element, blockClass, blockSelector, unblockSelector) { - try { - if (unblockSelector && element.matches(unblockSelector)) { - return false; - } - if (typeof blockClass === "string") { - if (element.classList.contains(blockClass)) { - return true; - } - } else { - for (let eIndex = element.classList.length; eIndex--; ) { - const className = element.classList[eIndex]; - if (blockClass.test(className)) { - return true; - } - } - } - if (blockSelector) { - return element.matches(blockSelector); - } - } catch (e2) { - } - return false; -} -__name(_isBlockedElement, "_isBlockedElement"); -function elementClassMatchesRegex$1(el, regex2) { - for (let eIndex = el.classList.length; eIndex--; ) { - const className = el.classList[eIndex]; - if (regex2.test(className)) { - return true; - } - } - return false; -} -__name(elementClassMatchesRegex$1, "elementClassMatchesRegex$1"); -function distanceToMatch$1(node3, matchPredicate, limit = Infinity, distance2 = 0) { - if (!node3) - return -1; - if (node3.nodeType !== node3.ELEMENT_NODE) - return -1; - if (distance2 > limit) - return -1; - if (matchPredicate(node3)) - return distance2; - return distanceToMatch$1(node3.parentNode, matchPredicate, limit, distance2 + 1); -} -__name(distanceToMatch$1, "distanceToMatch$1"); -function createMatchPredicate$1(className, selector) { - return (node3) => { - const el = node3; - if (el === null) - return false; - try { - if (className) { - if (typeof className === "string") { - if (el.matches(`.${className}`)) - return true; - } else if (elementClassMatchesRegex$1(el, className)) { - return true; - } - } - if (selector && el.matches(selector)) - return true; - return false; - } catch (e2) { - return false; - } - }; -} -__name(createMatchPredicate$1, "createMatchPredicate$1"); -function needMaskingText(node3, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) { - try { - const el = node3.nodeType === node3.ELEMENT_NODE ? node3 : node3.parentElement; - if (el === null) - return false; - if (el.tagName === "INPUT") { - const autocomplete = el.getAttribute("autocomplete"); - const disallowedAutocompleteValues = [ - "current-password", - "new-password", - "cc-number", - "cc-exp", - "cc-exp-month", - "cc-exp-year", - "cc-csc" - ]; - if (disallowedAutocompleteValues.includes(autocomplete)) { - return true; - } - } - let maskDistance = -1; - let unmaskDistance = -1; - if (maskAllText) { - unmaskDistance = distanceToMatch$1(el, createMatchPredicate$1(unmaskTextClass, unmaskTextSelector)); - if (unmaskDistance < 0) { - return true; - } - maskDistance = distanceToMatch$1(el, createMatchPredicate$1(maskTextClass, maskTextSelector), unmaskDistance >= 0 ? unmaskDistance : Infinity); - } else { - maskDistance = distanceToMatch$1(el, createMatchPredicate$1(maskTextClass, maskTextSelector)); - if (maskDistance < 0) { - return false; - } - unmaskDistance = distanceToMatch$1(el, createMatchPredicate$1(unmaskTextClass, unmaskTextSelector), maskDistance >= 0 ? maskDistance : Infinity); - } - return maskDistance >= 0 ? unmaskDistance >= 0 ? maskDistance <= unmaskDistance : true : unmaskDistance >= 0 ? false : !!maskAllText; - } catch (e2) { - } - return !!maskAllText; -} -__name(needMaskingText, "needMaskingText"); -function onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) { - const win = iframeEl.contentWindow; - if (!win) { - return; - } - let fired = false; - let readyState; - try { - readyState = win.document.readyState; - } catch (error2) { - return; - } - if (readyState !== "complete") { - const timer = setTimeout$2(() => { - if (!fired) { - listener(); - fired = true; - } - }, iframeLoadTimeout); - iframeEl.addEventListener("load", () => { - clearTimeout$2(timer); - fired = true; - listener(); - }); - return; - } - const blankUrl = "about:blank"; - if (win.location.href !== blankUrl || iframeEl.src === blankUrl || iframeEl.src === "") { - setTimeout$2(listener, 0); - return iframeEl.addEventListener("load", listener); - } - iframeEl.addEventListener("load", listener); -} -__name(onceIframeLoaded, "onceIframeLoaded"); -function onceStylesheetLoaded(link2, listener, styleSheetLoadTimeout) { - let fired = false; - let styleSheetLoaded; - try { - styleSheetLoaded = link2.sheet; - } catch (error2) { - return; - } - if (styleSheetLoaded) - return; - const timer = setTimeout$2(() => { - if (!fired) { - listener(); - fired = true; - } - }, styleSheetLoadTimeout); - link2.addEventListener("load", () => { - clearTimeout$2(timer); - fired = true; - listener(); - }); -} -__name(onceStylesheetLoaded, "onceStylesheetLoaded"); -function serializeNode(n2, options4) { - const { doc: doc2, mirror: mirror2, blockClass, blockSelector, unblockSelector, maskAllText, maskAttributeFn, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, inlineStylesheet, maskInputOptions = {}, maskTextFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false } = options4; - const rootId = getRootId(doc2, mirror2); - switch (n2.nodeType) { - case n2.DOCUMENT_NODE: - if (n2.compatMode !== "CSS1Compat") { - return { - type: NodeType$3.Document, - childNodes: [], - compatMode: n2.compatMode - }; - } else { - return { - type: NodeType$3.Document, - childNodes: [] - }; - } - case n2.DOCUMENT_TYPE_NODE: - return { - type: NodeType$3.DocumentType, - name: n2.name, - publicId: n2.publicId, - systemId: n2.systemId, - rootId - }; - case n2.ELEMENT_NODE: - return serializeElementNode(n2, { - doc: doc2, - blockClass, - blockSelector, - unblockSelector, - inlineStylesheet, - maskAttributeFn, - maskInputOptions, - maskInputFn, - dataURLOptions, - inlineImages, - recordCanvas, - keepIframeSrcFn, - newlyAddedElement, - rootId, - maskAllText, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector - }); - case n2.TEXT_NODE: - return serializeTextNode(n2, { - doc: doc2, - maskAllText, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - maskTextFn, - maskInputOptions, - maskInputFn, - rootId - }); - case n2.CDATA_SECTION_NODE: - return { - type: NodeType$3.CDATA, - textContent: "", - rootId - }; - case n2.COMMENT_NODE: - return { - type: NodeType$3.Comment, - textContent: n2.textContent || "", - rootId - }; - default: - return false; - } -} -__name(serializeNode, "serializeNode"); -function getRootId(doc2, mirror2) { - if (!mirror2.hasNode(doc2)) - return void 0; - const docId = mirror2.getId(doc2); - return docId === 1 ? void 0 : docId; -} -__name(getRootId, "getRootId"); -function serializeTextNode(n2, options4) { - const { maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, maskTextFn, maskInputOptions, maskInputFn, rootId } = options4; - const parentTagName = n2.parentNode && n2.parentNode.tagName; - let textContent = n2.textContent; - const isStyle = parentTagName === "STYLE" ? true : void 0; - const isScript = parentTagName === "SCRIPT" ? true : void 0; - const isTextarea = parentTagName === "TEXTAREA" ? true : void 0; - if (isStyle && textContent) { - try { - if (n2.nextSibling || n2.previousSibling) { - } else if (_optionalChain$5([n2, "access", (_7) => _7.parentNode, "access", (_8) => _8.sheet, "optionalAccess", (_9) => _9.cssRules])) { - textContent = stringifyStylesheet(n2.parentNode.sheet); - } - } catch (err) { - console.warn(`Cannot get CSS styles from text's parentNode. Error: ${err}`, n2); - } - textContent = absoluteToStylesheet(textContent, getHref(options4.doc)); - } - if (isScript) { - textContent = "SCRIPT_PLACEHOLDER"; - } - const forceMask = needMaskingText(n2, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText); - if (!isStyle && !isScript && !isTextarea && textContent && forceMask) { - textContent = maskTextFn ? maskTextFn(textContent, n2.parentElement) : textContent.replace(/[\S]/g, "*"); - } - if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) { - textContent = maskInputFn ? maskInputFn(textContent, n2.parentNode) : textContent.replace(/[\S]/g, "*"); - } - if (parentTagName === "OPTION" && textContent) { - const isInputMasked = shouldMaskInput({ - type: null, - tagName: parentTagName, - maskInputOptions - }); - textContent = maskInputValue({ - isMasked: needMaskingText(n2, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked), - element: n2, - value: textContent, - maskInputFn - }); - } - return { - type: NodeType$3.Text, - textContent: textContent || "", - isStyle, - rootId - }; -} -__name(serializeTextNode, "serializeTextNode"); -function serializeElementNode(n2, options4) { - const { doc: doc2, blockClass, blockSelector, unblockSelector, inlineStylesheet, maskInputOptions = {}, maskAttributeFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, rootId, maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector } = options4; - const needBlock = _isBlockedElement(n2, blockClass, blockSelector, unblockSelector); - const tagName = getValidTagName(n2); - let attributes = {}; - const len = n2.attributes.length; - for (let i2 = 0; i2 < len; i2++) { - const attr = n2.attributes[i2]; - if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) { - attributes[attr.name] = transformAttribute(doc2, tagName, toLowerCase(attr.name), attr.value, n2, maskAttributeFn); - } - } - if (tagName === "link" && inlineStylesheet) { - const stylesheet = Array.from(doc2.styleSheets).find((s2) => { - return s2.href === n2.href; - }); - let cssText = null; - if (stylesheet) { - cssText = stringifyStylesheet(stylesheet); - } - if (cssText) { - attributes.rel = null; - attributes.href = null; - attributes.crossorigin = null; - attributes._cssText = absoluteToStylesheet(cssText, stylesheet.href); - } - } - if (tagName === "style" && n2.sheet && !(n2.innerText || n2.textContent || "").trim().length) { - const cssText = stringifyStylesheet(n2.sheet); - if (cssText) { - attributes._cssText = absoluteToStylesheet(cssText, getHref(doc2)); - } - } - if (tagName === "input" || tagName === "textarea" || tagName === "select" || tagName === "option") { - const el = n2; - const type = getInputType(el); - const value4 = getInputValue(el, toUpperCase(tagName), type); - const checked4 = el.checked; - if (type !== "submit" && type !== "button" && value4) { - const forceMask = needMaskingText(el, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, shouldMaskInput({ - type, - tagName: toUpperCase(tagName), - maskInputOptions - })); - attributes.value = maskInputValue({ - isMasked: forceMask, - element: el, - value: value4, - maskInputFn - }); - } - if (checked4) { - attributes.checked = checked4; - } - } - if (tagName === "option") { - if (n2.selected && !maskInputOptions["select"]) { - attributes.selected = true; - } else { - delete attributes.selected; - } - } - if (tagName === "canvas" && recordCanvas) { - if (n2.__context === "2d") { - if (!is2DCanvasBlank(n2)) { - attributes.rr_dataURL = n2.toDataURL(dataURLOptions.type, dataURLOptions.quality); - } - } else if (!("__context" in n2)) { - const canvasDataURL = n2.toDataURL(dataURLOptions.type, dataURLOptions.quality); - const blankCanvas = doc2.createElement("canvas"); - blankCanvas.width = n2.width; - blankCanvas.height = n2.height; - const blankCanvasDataURL = blankCanvas.toDataURL(dataURLOptions.type, dataURLOptions.quality); - if (canvasDataURL !== blankCanvasDataURL) { - attributes.rr_dataURL = canvasDataURL; - } - } - } - if (tagName === "img" && inlineImages) { - if (!canvasService) { - canvasService = doc2.createElement("canvas"); - canvasCtx = canvasService.getContext("2d"); - } - const image2 = n2; - const imageSrc = image2.currentSrc || image2.getAttribute("src") || ""; - const priorCrossOrigin = image2.crossOrigin; - const recordInlineImage = /* @__PURE__ */ __name(() => { - image2.removeEventListener("load", recordInlineImage); - try { - canvasService.width = image2.naturalWidth; - canvasService.height = image2.naturalHeight; - canvasCtx.drawImage(image2, 0, 0); - attributes.rr_dataURL = canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality); - } catch (err) { - if (image2.crossOrigin !== "anonymous") { - image2.crossOrigin = "anonymous"; - if (image2.complete && image2.naturalWidth !== 0) - recordInlineImage(); - else - image2.addEventListener("load", recordInlineImage); - return; - } else { - console.warn(`Cannot inline img src=${imageSrc}! Error: ${err}`); - } - } - if (image2.crossOrigin === "anonymous") { - priorCrossOrigin ? attributes.crossOrigin = priorCrossOrigin : image2.removeAttribute("crossorigin"); - } - }, "recordInlineImage"); - if (image2.complete && image2.naturalWidth !== 0) - recordInlineImage(); - else - image2.addEventListener("load", recordInlineImage); - } - if (tagName === "audio" || tagName === "video") { - attributes.rr_mediaState = n2.paused ? "paused" : "played"; - attributes.rr_mediaCurrentTime = n2.currentTime; - } - if (!newlyAddedElement) { - if (n2.scrollLeft) { - attributes.rr_scrollLeft = n2.scrollLeft; - } - if (n2.scrollTop) { - attributes.rr_scrollTop = n2.scrollTop; - } - } - if (needBlock) { - const { width: width2, height } = n2.getBoundingClientRect(); - attributes = { - class: attributes.class, - rr_width: `${width2}px`, - rr_height: `${height}px` - }; - } - if (tagName === "iframe" && !keepIframeSrcFn(attributes.src)) { - if (!needBlock && !getIframeContentDocument(n2)) { - attributes.rr_src = attributes.src; - } - delete attributes.src; - } - let isCustomElement; - try { - if (customElements.get(tagName)) - isCustomElement = true; - } catch (e2) { - } - return { - type: NodeType$3.Element, - tagName, - attributes, - childNodes: [], - isSVG: isSVGElement(n2) || void 0, - needBlock, - rootId, - isCustom: isCustomElement - }; -} -__name(serializeElementNode, "serializeElementNode"); -function lowerIfExists(maybeAttr) { - if (maybeAttr === void 0 || maybeAttr === null) { - return ""; - } else { - return maybeAttr.toLowerCase(); - } -} -__name(lowerIfExists, "lowerIfExists"); -function slimDOMExcluded(sn, slimDOMOptions) { - if (slimDOMOptions.comment && sn.type === NodeType$3.Comment) { - return true; - } else if (sn.type === NodeType$3.Element) { - if (slimDOMOptions.script && (sn.tagName === "script" || sn.tagName === "link" && (sn.attributes.rel === "preload" || sn.attributes.rel === "modulepreload") || sn.tagName === "link" && sn.attributes.rel === "prefetch" && typeof sn.attributes.href === "string" && extractFileExtension(sn.attributes.href) === "js")) { - return true; - } else if (slimDOMOptions.headFavicon && (sn.tagName === "link" && sn.attributes.rel === "shortcut icon" || sn.tagName === "meta" && (lowerIfExists(sn.attributes.name).match(/^msapplication-tile(image|color)$/) || lowerIfExists(sn.attributes.name) === "application-name" || lowerIfExists(sn.attributes.rel) === "icon" || lowerIfExists(sn.attributes.rel) === "apple-touch-icon" || lowerIfExists(sn.attributes.rel) === "shortcut icon"))) { - return true; - } else if (sn.tagName === "meta") { - if (slimDOMOptions.headMetaDescKeywords && lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) { - return true; - } else if (slimDOMOptions.headMetaSocial && (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) || lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) || lowerIfExists(sn.attributes.name) === "pinterest")) { - return true; - } else if (slimDOMOptions.headMetaRobots && (lowerIfExists(sn.attributes.name) === "robots" || lowerIfExists(sn.attributes.name) === "googlebot" || lowerIfExists(sn.attributes.name) === "bingbot")) { - return true; - } else if (slimDOMOptions.headMetaHttpEquiv && sn.attributes["http-equiv"] !== void 0) { - return true; - } else if (slimDOMOptions.headMetaAuthorship && (lowerIfExists(sn.attributes.name) === "author" || lowerIfExists(sn.attributes.name) === "generator" || lowerIfExists(sn.attributes.name) === "framework" || lowerIfExists(sn.attributes.name) === "publisher" || lowerIfExists(sn.attributes.name) === "progid" || lowerIfExists(sn.attributes.property).match(/^article:/) || lowerIfExists(sn.attributes.property).match(/^product:/))) { - return true; - } else if (slimDOMOptions.headMetaVerification && (lowerIfExists(sn.attributes.name) === "google-site-verification" || lowerIfExists(sn.attributes.name) === "yandex-verification" || lowerIfExists(sn.attributes.name) === "csrf-token" || lowerIfExists(sn.attributes.name) === "p:domain_verify" || lowerIfExists(sn.attributes.name) === "verify-v1" || lowerIfExists(sn.attributes.name) === "verification" || lowerIfExists(sn.attributes.name) === "shopify-checkout-api-token")) { - return true; - } - } - } - return false; -} -__name(slimDOMExcluded, "slimDOMExcluded"); -function serializeNodeWithId(n2, options4) { - const { doc: doc2, mirror: mirror2, blockClass, blockSelector, unblockSelector, maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, skipChild = false, inlineStylesheet = true, maskInputOptions = {}, maskAttributeFn, maskTextFn, maskInputFn, slimDOMOptions, dataURLOptions = {}, inlineImages = false, recordCanvas = false, onSerialize, onIframeLoad, iframeLoadTimeout = 5e3, onStylesheetLoad, stylesheetLoadTimeout = 5e3, keepIframeSrcFn = /* @__PURE__ */ __name(() => false, "keepIframeSrcFn"), newlyAddedElement = false } = options4; - let { preserveWhiteSpace = true } = options4; - const _serializedNode = serializeNode(n2, { - doc: doc2, - mirror: mirror2, - blockClass, - blockSelector, - maskAllText, - unblockSelector, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - inlineStylesheet, - maskInputOptions, - maskAttributeFn, - maskTextFn, - maskInputFn, - dataURLOptions, - inlineImages, - recordCanvas, - keepIframeSrcFn, - newlyAddedElement - }); - if (!_serializedNode) { - console.warn(n2, "not serialized"); - return null; - } - let id3; - if (mirror2.hasNode(n2)) { - id3 = mirror2.getId(n2); - } else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$3.Text && !_serializedNode.isStyle && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) { - id3 = IGNORED_NODE; - } else { - id3 = genId(); - } - const serializedNode = Object.assign(_serializedNode, { id: id3 }); - mirror2.add(n2, serializedNode); - if (id3 === IGNORED_NODE) { - return null; - } - if (onSerialize) { - onSerialize(n2); - } - let recordChild = !skipChild; - if (serializedNode.type === NodeType$3.Element) { - recordChild = recordChild && !serializedNode.needBlock; - delete serializedNode.needBlock; - const shadowRoot = n2.shadowRoot; - if (shadowRoot && isNativeShadowDom(shadowRoot)) - serializedNode.isShadowHost = true; - } - if ((serializedNode.type === NodeType$3.Document || serializedNode.type === NodeType$3.Element) && recordChild) { - if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$3.Element && serializedNode.tagName === "head") { - preserveWhiteSpace = false; - } - const bypassOptions = { - doc: doc2, - mirror: mirror2, - blockClass, - blockSelector, - maskAllText, - unblockSelector, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - skipChild, - inlineStylesheet, - maskInputOptions, - maskAttributeFn, - maskTextFn, - maskInputFn, - slimDOMOptions, - dataURLOptions, - inlineImages, - recordCanvas, - preserveWhiteSpace, - onSerialize, - onIframeLoad, - iframeLoadTimeout, - onStylesheetLoad, - stylesheetLoadTimeout, - keepIframeSrcFn - }; - for (const childN of Array.from(n2.childNodes)) { - const serializedChildNode = serializeNodeWithId(childN, bypassOptions); - if (serializedChildNode) { - serializedNode.childNodes.push(serializedChildNode); - } - } - if (isElement$1(n2) && n2.shadowRoot) { - for (const childN of Array.from(n2.shadowRoot.childNodes)) { - const serializedChildNode = serializeNodeWithId(childN, bypassOptions); - if (serializedChildNode) { - isNativeShadowDom(n2.shadowRoot) && (serializedChildNode.isShadow = true); - serializedNode.childNodes.push(serializedChildNode); - } - } - } - } - if (n2.parentNode && isShadowRoot(n2.parentNode) && isNativeShadowDom(n2.parentNode)) { - serializedNode.isShadow = true; - } - if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "iframe") { - onceIframeLoaded(n2, () => { - const iframeDoc = getIframeContentDocument(n2); - if (iframeDoc && onIframeLoad) { - const serializedIframeNode = serializeNodeWithId(iframeDoc, { - doc: iframeDoc, - mirror: mirror2, - blockClass, - blockSelector, - unblockSelector, - maskAllText, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - skipChild: false, - inlineStylesheet, - maskInputOptions, - maskAttributeFn, - maskTextFn, - maskInputFn, - slimDOMOptions, - dataURLOptions, - inlineImages, - recordCanvas, - preserveWhiteSpace, - onSerialize, - onIframeLoad, - iframeLoadTimeout, - onStylesheetLoad, - stylesheetLoadTimeout, - keepIframeSrcFn - }); - if (serializedIframeNode) { - onIframeLoad(n2, serializedIframeNode); - } - } - }, iframeLoadTimeout); - } - if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "link" && typeof serializedNode.attributes.rel === "string" && (serializedNode.attributes.rel === "stylesheet" || serializedNode.attributes.rel === "preload" && typeof serializedNode.attributes.href === "string" && extractFileExtension(serializedNode.attributes.href) === "css")) { - onceStylesheetLoaded(n2, () => { - if (onStylesheetLoad) { - const serializedLinkNode = serializeNodeWithId(n2, { - doc: doc2, - mirror: mirror2, - blockClass, - blockSelector, - unblockSelector, - maskAllText, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - skipChild: false, - inlineStylesheet, - maskInputOptions, - maskAttributeFn, - maskTextFn, - maskInputFn, - slimDOMOptions, - dataURLOptions, - inlineImages, - recordCanvas, - preserveWhiteSpace, - onSerialize, - onIframeLoad, - iframeLoadTimeout, - onStylesheetLoad, - stylesheetLoadTimeout, - keepIframeSrcFn - }); - if (serializedLinkNode) { - onStylesheetLoad(n2, serializedLinkNode); - } - } - }, stylesheetLoadTimeout); - } - return serializedNode; -} -__name(serializeNodeWithId, "serializeNodeWithId"); -function snapshot(n2, options4) { - const { mirror: mirror2 = new Mirror(), blockClass = "rr-block", blockSelector = null, unblockSelector = null, maskAllText = false, maskTextClass = "rr-mask", unmaskTextClass = null, maskTextSelector = null, unmaskTextSelector = null, inlineStylesheet = true, inlineImages = false, recordCanvas = false, maskAllInputs = false, maskAttributeFn, maskTextFn, maskInputFn, slimDOM = false, dataURLOptions, preserveWhiteSpace, onSerialize, onIframeLoad, iframeLoadTimeout, onStylesheetLoad, stylesheetLoadTimeout, keepIframeSrcFn = /* @__PURE__ */ __name(() => false, "keepIframeSrcFn") } = options4 || {}; - const maskInputOptions = maskAllInputs === true ? { - color: true, - date: true, - "datetime-local": true, - email: true, - month: true, - number: true, - range: true, - search: true, - tel: true, - text: true, - time: true, - url: true, - week: true, - textarea: true, - select: true - } : maskAllInputs === false ? {} : maskAllInputs; - const slimDOMOptions = slimDOM === true || slimDOM === "all" ? { - script: true, - comment: true, - headFavicon: true, - headWhitespace: true, - headMetaDescKeywords: slimDOM === "all", - headMetaSocial: true, - headMetaRobots: true, - headMetaHttpEquiv: true, - headMetaAuthorship: true, - headMetaVerification: true - } : slimDOM === false ? {} : slimDOM; - return serializeNodeWithId(n2, { - doc: n2, - mirror: mirror2, - blockClass, - blockSelector, - unblockSelector, - maskAllText, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - skipChild: false, - inlineStylesheet, - maskInputOptions, - maskAttributeFn, - maskTextFn, - maskInputFn, - slimDOMOptions, - dataURLOptions, - inlineImages, - recordCanvas, - preserveWhiteSpace, - onSerialize, - onIframeLoad, - iframeLoadTimeout, - onStylesheetLoad, - stylesheetLoadTimeout, - keepIframeSrcFn, - newlyAddedElement: false - }); -} -__name(snapshot, "snapshot"); -function _optionalChain$4(ops) { - let lastAccessLHS = void 0; - let value4 = ops[0]; - let i2 = 1; - while (i2 < ops.length) { - const op = ops[i2]; - const fn = ops[i2 + 1]; - i2 += 2; - if ((op === "optionalAccess" || op === "optionalCall") && value4 == null) { - return void 0; - } - if (op === "access" || op === "optionalAccess") { - lastAccessLHS = value4; - value4 = fn(value4); - } else if (op === "call" || op === "optionalCall") { - value4 = fn((...args) => value4.call(lastAccessLHS, ...args)); - lastAccessLHS = void 0; - } - } - return value4; -} -__name(_optionalChain$4, "_optionalChain$4"); -function on(type, fn, target = document) { - const options4 = { capture: true, passive: true }; - target.addEventListener(type, fn, options4); - return () => target.removeEventListener(type, fn, options4); -} -__name(on, "on"); -const DEPARTED_MIRROR_ACCESS_WARNING$1 = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording."; -let _mirror$1 = { - map: {}, - getId() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING$1); - return -1; - }, - getNode() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING$1); - return null; - }, - removeNodeFromMap() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING$1); - }, - has() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING$1); - return false; - }, - reset() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING$1); - } -}; -if (typeof window !== "undefined" && window.Proxy && window.Reflect) { - _mirror$1 = new Proxy(_mirror$1, { - get(target, prop2, receiver) { - if (prop2 === "map") { - console.error(DEPARTED_MIRROR_ACCESS_WARNING$1); - } - return Reflect.get(target, prop2, receiver); - } - }); -} -function throttle$1(func, wait, options4 = {}) { - let timeout = null; - let previous = 0; - return function(...args) { - const now2 = Date.now(); - if (!previous && options4.leading === false) { - previous = now2; - } - const remaining = wait - (now2 - previous); - const context = this; - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout$1(timeout); - timeout = null; - } - previous = now2; - func.apply(context, args); - } else if (!timeout && options4.trailing !== false) { - timeout = setTimeout$1$1(() => { - previous = options4.leading === false ? 0 : Date.now(); - timeout = null; - func.apply(context, args); - }, remaining); - } - }; -} -__name(throttle$1, "throttle$1"); -function hookSetter$1(target, key, d2, isRevoked, win = window) { - const original = win.Object.getOwnPropertyDescriptor(target, key); - win.Object.defineProperty(target, key, isRevoked ? d2 : { - set(value4) { - setTimeout$1$1(() => { - d2.set.call(this, value4); - }, 0); - if (original && original.set) { - original.set.call(this, value4); - } - } - }); - return () => hookSetter$1(target, key, original || {}, true); -} -__name(hookSetter$1, "hookSetter$1"); -function patch$2(source, name2, replacement) { - try { - if (!(name2 in source)) { - return () => { - }; - } - const original = source[name2]; - const wrapped = replacement(original); - if (typeof wrapped === "function") { - wrapped.prototype = wrapped.prototype || {}; - Object.defineProperties(wrapped, { - __rrweb_original__: { - enumerable: false, - value: original - } - }); - } - source[name2] = wrapped; - return () => { - source[name2] = original; - }; - } catch (e2) { - return () => { - }; - } -} -__name(patch$2, "patch$2"); -let nowTimestamp = Date.now; -if (!/[1-9][0-9]{12}/.test(Date.now().toString())) { - nowTimestamp = /* @__PURE__ */ __name(() => (/* @__PURE__ */ new Date()).getTime(), "nowTimestamp"); -} -function getWindowScroll(win) { - const doc2 = win.document; - return { - left: doc2.scrollingElement ? doc2.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : _optionalChain$4([doc2, "optionalAccess", (_2) => _2.documentElement, "access", (_2) => _2.scrollLeft]) || _optionalChain$4([doc2, "optionalAccess", (_3) => _3.body, "optionalAccess", (_4) => _4.parentElement, "optionalAccess", (_5) => _5.scrollLeft]) || _optionalChain$4([doc2, "optionalAccess", (_6) => _6.body, "optionalAccess", (_7) => _7.scrollLeft]) || 0, - top: doc2.scrollingElement ? doc2.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : _optionalChain$4([doc2, "optionalAccess", (_8) => _8.documentElement, "access", (_9) => _9.scrollTop]) || _optionalChain$4([doc2, "optionalAccess", (_10) => _10.body, "optionalAccess", (_11) => _11.parentElement, "optionalAccess", (_12) => _12.scrollTop]) || _optionalChain$4([doc2, "optionalAccess", (_13) => _13.body, "optionalAccess", (_14) => _14.scrollTop]) || 0 - }; -} -__name(getWindowScroll, "getWindowScroll"); -function getWindowHeight() { - return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight; -} -__name(getWindowHeight, "getWindowHeight"); -function getWindowWidth() { - return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth; -} -__name(getWindowWidth, "getWindowWidth"); -function closestElementOfNode$1(node3) { - if (!node3) { - return null; - } - const el = node3.nodeType === node3.ELEMENT_NODE ? node3 : node3.parentElement; - return el; -} -__name(closestElementOfNode$1, "closestElementOfNode$1"); -function isBlocked$1(node3, blockClass, blockSelector, unblockSelector, checkAncestors) { - if (!node3) { - return false; - } - const el = closestElementOfNode$1(node3); - if (!el) { - return false; - } - const blockedPredicate = createMatchPredicate$1(blockClass, blockSelector); - if (!checkAncestors) { - const isUnblocked = unblockSelector && el.matches(unblockSelector); - return blockedPredicate(el) && !isUnblocked; - } - const blockDistance = distanceToMatch$1(el, blockedPredicate); - let unblockDistance = -1; - if (blockDistance < 0) { - return false; - } - if (unblockSelector) { - unblockDistance = distanceToMatch$1(el, createMatchPredicate$1(null, unblockSelector)); - } - if (blockDistance > -1 && unblockDistance < 0) { - return true; - } - return blockDistance < unblockDistance; -} -__name(isBlocked$1, "isBlocked$1"); -function isSerialized(n2, mirror2) { - return mirror2.getId(n2) !== -1; -} -__name(isSerialized, "isSerialized"); -function isIgnored(n2, mirror2) { - return mirror2.getId(n2) === IGNORED_NODE; -} -__name(isIgnored, "isIgnored"); -function isAncestorRemoved(target, mirror2) { - if (isShadowRoot(target)) { - return false; - } - const id3 = mirror2.getId(target); - if (!mirror2.has(id3)) { - return true; - } - if (target.parentNode && target.parentNode.nodeType === target.DOCUMENT_NODE) { - return false; - } - if (!target.parentNode) { - return true; - } - return isAncestorRemoved(target.parentNode, mirror2); -} -__name(isAncestorRemoved, "isAncestorRemoved"); -function legacy_isTouchEvent(event) { - return Boolean(event.changedTouches); -} -__name(legacy_isTouchEvent, "legacy_isTouchEvent"); -function polyfill(win = window) { - if ("NodeList" in win && !win.NodeList.prototype.forEach) { - win.NodeList.prototype.forEach = Array.prototype.forEach; - } - if ("DOMTokenList" in win && !win.DOMTokenList.prototype.forEach) { - win.DOMTokenList.prototype.forEach = Array.prototype.forEach; - } - if (!Node.prototype.contains) { - Node.prototype.contains = (...args) => { - let node3 = args[0]; - if (!(0 in args)) { - throw new TypeError("1 argument is required"); - } - do { - if (this === node3) { - return true; - } - } while (node3 = node3 && node3.parentNode); - return false; - }; - } -} -__name(polyfill, "polyfill"); -function isSerializedIframe(n2, mirror2) { - return Boolean(n2.nodeName === "IFRAME" && mirror2.getMeta(n2)); -} -__name(isSerializedIframe, "isSerializedIframe"); -function isSerializedStylesheet(n2, mirror2) { - return Boolean(n2.nodeName === "LINK" && n2.nodeType === n2.ELEMENT_NODE && n2.getAttribute && n2.getAttribute("rel") === "stylesheet" && mirror2.getMeta(n2)); -} -__name(isSerializedStylesheet, "isSerializedStylesheet"); -function hasShadowRoot(n2) { - return Boolean(_optionalChain$4([n2, "optionalAccess", (_18) => _18.shadowRoot])); -} -__name(hasShadowRoot, "hasShadowRoot"); -class StyleSheetMirror { - static { - __name(this, "StyleSheetMirror"); - } - constructor() { - this.id = 1; - this.styleIDMap = /* @__PURE__ */ new WeakMap(); - this.idStyleMap = /* @__PURE__ */ new Map(); - } - getId(stylesheet) { - return _nullishCoalesce(this.styleIDMap.get(stylesheet), () => -1); - } - has(stylesheet) { - return this.styleIDMap.has(stylesheet); - } - add(stylesheet, id3) { - if (this.has(stylesheet)) - return this.getId(stylesheet); - let newId; - if (id3 === void 0) { - newId = this.id++; - } else - newId = id3; - this.styleIDMap.set(stylesheet, newId); - this.idStyleMap.set(newId, stylesheet); - return newId; - } - getStyle(id3) { - return this.idStyleMap.get(id3) || null; - } - reset() { - this.styleIDMap = /* @__PURE__ */ new WeakMap(); - this.idStyleMap = /* @__PURE__ */ new Map(); - this.id = 1; - } - generateId() { - return this.id++; - } -} -function getShadowHost(n2) { - let shadowHost = null; - if (_optionalChain$4([n2, "access", (_19) => _19.getRootNode, "optionalCall", (_20) => _20(), "optionalAccess", (_21) => _21.nodeType]) === Node.DOCUMENT_FRAGMENT_NODE && n2.getRootNode().host) - shadowHost = n2.getRootNode().host; - return shadowHost; -} -__name(getShadowHost, "getShadowHost"); -function getRootShadowHost(n2) { - let rootShadowHost = n2; - let shadowHost; - while (shadowHost = getShadowHost(rootShadowHost)) - rootShadowHost = shadowHost; - return rootShadowHost; -} -__name(getRootShadowHost, "getRootShadowHost"); -function shadowHostInDom(n2) { - const doc2 = n2.ownerDocument; - if (!doc2) - return false; - const shadowHost = getRootShadowHost(n2); - return doc2.contains(shadowHost); -} -__name(shadowHostInDom, "shadowHostInDom"); -function inDom(n2) { - const doc2 = n2.ownerDocument; - if (!doc2) - return false; - return doc2.contains(n2) || shadowHostInDom(n2); -} -__name(inDom, "inDom"); -const cachedImplementations$2 = {}; -function getImplementation$2(name2) { - const cached = cachedImplementations$2[name2]; - if (cached) { - return cached; - } - const document2 = window.document; - let impl = window[name2]; - if (document2 && typeof document2.createElement === "function") { - try { - const sandbox = document2.createElement("iframe"); - sandbox.hidden = true; - document2.head.appendChild(sandbox); - const contentWindow = sandbox.contentWindow; - if (contentWindow && contentWindow[name2]) { - impl = contentWindow[name2]; - } - document2.head.removeChild(sandbox); - } catch (e2) { - } - } - return cachedImplementations$2[name2] = impl.bind(window); -} -__name(getImplementation$2, "getImplementation$2"); -function onRequestAnimationFrame$1(...rest) { - return getImplementation$2("requestAnimationFrame")(...rest); -} -__name(onRequestAnimationFrame$1, "onRequestAnimationFrame$1"); -function setTimeout$1$1(...rest) { - return getImplementation$2("setTimeout")(...rest); -} -__name(setTimeout$1$1, "setTimeout$1$1"); -function clearTimeout$1(...rest) { - return getImplementation$2("clearTimeout")(...rest); -} -__name(clearTimeout$1, "clearTimeout$1"); -var EventType = /* @__PURE__ */ ((EventType2) => { - EventType2[EventType2["DomContentLoaded"] = 0] = "DomContentLoaded"; - EventType2[EventType2["Load"] = 1] = "Load"; - EventType2[EventType2["FullSnapshot"] = 2] = "FullSnapshot"; - EventType2[EventType2["IncrementalSnapshot"] = 3] = "IncrementalSnapshot"; - EventType2[EventType2["Meta"] = 4] = "Meta"; - EventType2[EventType2["Custom"] = 5] = "Custom"; - EventType2[EventType2["Plugin"] = 6] = "Plugin"; - return EventType2; -})(EventType || {}); -var IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => { - IncrementalSource2[IncrementalSource2["Mutation"] = 0] = "Mutation"; - IncrementalSource2[IncrementalSource2["MouseMove"] = 1] = "MouseMove"; - IncrementalSource2[IncrementalSource2["MouseInteraction"] = 2] = "MouseInteraction"; - IncrementalSource2[IncrementalSource2["Scroll"] = 3] = "Scroll"; - IncrementalSource2[IncrementalSource2["ViewportResize"] = 4] = "ViewportResize"; - IncrementalSource2[IncrementalSource2["Input"] = 5] = "Input"; - IncrementalSource2[IncrementalSource2["TouchMove"] = 6] = "TouchMove"; - IncrementalSource2[IncrementalSource2["MediaInteraction"] = 7] = "MediaInteraction"; - IncrementalSource2[IncrementalSource2["StyleSheetRule"] = 8] = "StyleSheetRule"; - IncrementalSource2[IncrementalSource2["CanvasMutation"] = 9] = "CanvasMutation"; - IncrementalSource2[IncrementalSource2["Font"] = 10] = "Font"; - IncrementalSource2[IncrementalSource2["Log"] = 11] = "Log"; - IncrementalSource2[IncrementalSource2["Drag"] = 12] = "Drag"; - IncrementalSource2[IncrementalSource2["StyleDeclaration"] = 13] = "StyleDeclaration"; - IncrementalSource2[IncrementalSource2["Selection"] = 14] = "Selection"; - IncrementalSource2[IncrementalSource2["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet"; - IncrementalSource2[IncrementalSource2["CustomElement"] = 16] = "CustomElement"; - return IncrementalSource2; -})(IncrementalSource || {}); -var MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => { - MouseInteractions2[MouseInteractions2["MouseUp"] = 0] = "MouseUp"; - MouseInteractions2[MouseInteractions2["MouseDown"] = 1] = "MouseDown"; - MouseInteractions2[MouseInteractions2["Click"] = 2] = "Click"; - MouseInteractions2[MouseInteractions2["ContextMenu"] = 3] = "ContextMenu"; - MouseInteractions2[MouseInteractions2["DblClick"] = 4] = "DblClick"; - MouseInteractions2[MouseInteractions2["Focus"] = 5] = "Focus"; - MouseInteractions2[MouseInteractions2["Blur"] = 6] = "Blur"; - MouseInteractions2[MouseInteractions2["TouchStart"] = 7] = "TouchStart"; - MouseInteractions2[MouseInteractions2["TouchMove_Departed"] = 8] = "TouchMove_Departed"; - MouseInteractions2[MouseInteractions2["TouchEnd"] = 9] = "TouchEnd"; - MouseInteractions2[MouseInteractions2["TouchCancel"] = 10] = "TouchCancel"; - return MouseInteractions2; -})(MouseInteractions || {}); -var PointerTypes = /* @__PURE__ */ ((PointerTypes2) => { - PointerTypes2[PointerTypes2["Mouse"] = 0] = "Mouse"; - PointerTypes2[PointerTypes2["Pen"] = 1] = "Pen"; - PointerTypes2[PointerTypes2["Touch"] = 2] = "Touch"; - return PointerTypes2; -})(PointerTypes || {}); -var NodeType$1$1; -(function(NodeType3) { - NodeType3[NodeType3["Document"] = 0] = "Document"; - NodeType3[NodeType3["DocumentType"] = 1] = "DocumentType"; - NodeType3[NodeType3["Element"] = 2] = "Element"; - NodeType3[NodeType3["Text"] = 3] = "Text"; - NodeType3[NodeType3["CDATA"] = 4] = "CDATA"; - NodeType3[NodeType3["Comment"] = 5] = "Comment"; -})(NodeType$1$1 || (NodeType$1$1 = {})); -var NodeType$2$1; -(function(NodeType3) { - NodeType3[NodeType3["PLACEHOLDER"] = 0] = "PLACEHOLDER"; - NodeType3[NodeType3["ELEMENT_NODE"] = 1] = "ELEMENT_NODE"; - NodeType3[NodeType3["ATTRIBUTE_NODE"] = 2] = "ATTRIBUTE_NODE"; - NodeType3[NodeType3["TEXT_NODE"] = 3] = "TEXT_NODE"; - NodeType3[NodeType3["CDATA_SECTION_NODE"] = 4] = "CDATA_SECTION_NODE"; - NodeType3[NodeType3["ENTITY_REFERENCE_NODE"] = 5] = "ENTITY_REFERENCE_NODE"; - NodeType3[NodeType3["ENTITY_NODE"] = 6] = "ENTITY_NODE"; - NodeType3[NodeType3["PROCESSING_INSTRUCTION_NODE"] = 7] = "PROCESSING_INSTRUCTION_NODE"; - NodeType3[NodeType3["COMMENT_NODE"] = 8] = "COMMENT_NODE"; - NodeType3[NodeType3["DOCUMENT_NODE"] = 9] = "DOCUMENT_NODE"; - NodeType3[NodeType3["DOCUMENT_TYPE_NODE"] = 10] = "DOCUMENT_TYPE_NODE"; - NodeType3[NodeType3["DOCUMENT_FRAGMENT_NODE"] = 11] = "DOCUMENT_FRAGMENT_NODE"; -})(NodeType$2$1 || (NodeType$2$1 = {})); -function getIFrameContentDocument(iframe) { - try { - return iframe.contentDocument; - } catch (e2) { - } -} -__name(getIFrameContentDocument, "getIFrameContentDocument"); -function getIFrameContentWindow(iframe) { - try { - return iframe.contentWindow; - } catch (e2) { - } -} -__name(getIFrameContentWindow, "getIFrameContentWindow"); -function _optionalChain$3(ops) { - let lastAccessLHS = void 0; - let value4 = ops[0]; - let i2 = 1; - while (i2 < ops.length) { - const op = ops[i2]; - const fn = ops[i2 + 1]; - i2 += 2; - if ((op === "optionalAccess" || op === "optionalCall") && value4 == null) { - return void 0; - } - if (op === "access" || op === "optionalAccess") { - lastAccessLHS = value4; - value4 = fn(value4); - } else if (op === "call" || op === "optionalCall") { - value4 = fn((...args) => value4.call(lastAccessLHS, ...args)); - lastAccessLHS = void 0; - } - } - return value4; -} -__name(_optionalChain$3, "_optionalChain$3"); -function isNodeInLinkedList(n2) { - return "__ln" in n2; -} -__name(isNodeInLinkedList, "isNodeInLinkedList"); -class DoubleLinkedList { - static { - __name(this, "DoubleLinkedList"); - } - constructor() { - this.length = 0; - this.head = null; - this.tail = null; - } - get(position3) { - if (position3 >= this.length) { - throw new Error("Position outside of list range"); - } - let current = this.head; - for (let index2 = 0; index2 < position3; index2++) { - current = _optionalChain$3([current, "optionalAccess", (_2) => _2.next]) || null; - } - return current; - } - addNode(n2) { - const node3 = { - value: n2, - previous: null, - next: null - }; - n2.__ln = node3; - if (n2.previousSibling && isNodeInLinkedList(n2.previousSibling)) { - const current = n2.previousSibling.__ln.next; - node3.next = current; - node3.previous = n2.previousSibling.__ln; - n2.previousSibling.__ln.next = node3; - if (current) { - current.previous = node3; - } - } else if (n2.nextSibling && isNodeInLinkedList(n2.nextSibling) && n2.nextSibling.__ln.previous) { - const current = n2.nextSibling.__ln.previous; - node3.previous = current; - node3.next = n2.nextSibling.__ln; - n2.nextSibling.__ln.previous = node3; - if (current) { - current.next = node3; - } - } else { - if (this.head) { - this.head.previous = node3; - } - node3.next = this.head; - this.head = node3; - } - if (node3.next === null) { - this.tail = node3; - } - this.length++; - } - removeNode(n2) { - const current = n2.__ln; - if (!this.head) { - return; - } - if (!current.previous) { - this.head = current.next; - if (this.head) { - this.head.previous = null; - } else { - this.tail = null; - } - } else { - current.previous.next = current.next; - if (current.next) { - current.next.previous = current.previous; - } else { - this.tail = current.previous; - } - } - if (n2.__ln) { - delete n2.__ln; - } - this.length--; - } -} -const moveKey = /* @__PURE__ */ __name((id3, parentId) => `${id3}@${parentId}`, "moveKey"); -class MutationBuffer { - static { - __name(this, "MutationBuffer"); - } - constructor() { - this.frozen = false; - this.locked = false; - this.texts = []; - this.attributes = []; - this.attributeMap = /* @__PURE__ */ new WeakMap(); - this.removes = []; - this.mapRemoves = []; - this.movedMap = {}; - this.addedSet = /* @__PURE__ */ new Set(); - this.movedSet = /* @__PURE__ */ new Set(); - this.droppedSet = /* @__PURE__ */ new Set(); - this.processMutations = (mutations) => { - mutations.forEach(this.processMutation); - this.emit(); - }; - this.emit = () => { - if (this.frozen || this.locked) { - return; - } - const adds = []; - const addedIds = /* @__PURE__ */ new Set(); - const addList = new DoubleLinkedList(); - const getNextId = /* @__PURE__ */ __name((n2) => { - let ns = n2; - let nextId = IGNORED_NODE; - while (nextId === IGNORED_NODE) { - ns = ns && ns.nextSibling; - nextId = ns && this.mirror.getId(ns); - } - return nextId; - }, "getNextId"); - const pushAdd = /* @__PURE__ */ __name((n2) => { - if (!n2.parentNode || !inDom(n2)) { - return; - } - const parentId = isShadowRoot(n2.parentNode) ? this.mirror.getId(getShadowHost(n2)) : this.mirror.getId(n2.parentNode); - const nextId = getNextId(n2); - if (parentId === -1 || nextId === -1) { - return addList.addNode(n2); - } - const sn = serializeNodeWithId(n2, { - doc: this.doc, - mirror: this.mirror, - blockClass: this.blockClass, - blockSelector: this.blockSelector, - maskAllText: this.maskAllText, - unblockSelector: this.unblockSelector, - maskTextClass: this.maskTextClass, - unmaskTextClass: this.unmaskTextClass, - maskTextSelector: this.maskTextSelector, - unmaskTextSelector: this.unmaskTextSelector, - skipChild: true, - newlyAddedElement: true, - inlineStylesheet: this.inlineStylesheet, - maskInputOptions: this.maskInputOptions, - maskAttributeFn: this.maskAttributeFn, - maskTextFn: this.maskTextFn, - maskInputFn: this.maskInputFn, - slimDOMOptions: this.slimDOMOptions, - dataURLOptions: this.dataURLOptions, - recordCanvas: this.recordCanvas, - inlineImages: this.inlineImages, - onSerialize: /* @__PURE__ */ __name((currentN) => { - if (isSerializedIframe(currentN, this.mirror) && !isBlocked$1(currentN, this.blockClass, this.blockSelector, this.unblockSelector, false)) { - this.iframeManager.addIframe(currentN); - } - if (isSerializedStylesheet(currentN, this.mirror)) { - this.stylesheetManager.trackLinkElement(currentN); - } - if (hasShadowRoot(n2)) { - this.shadowDomManager.addShadowRoot(n2.shadowRoot, this.doc); - } - }, "onSerialize"), - onIframeLoad: /* @__PURE__ */ __name((iframe, childSn) => { - if (isBlocked$1(iframe, this.blockClass, this.blockSelector, this.unblockSelector, false)) { - return; - } - this.iframeManager.attachIframe(iframe, childSn); - if (iframe.contentWindow) { - this.canvasManager.addWindow(iframe.contentWindow); - } - this.shadowDomManager.observeAttachShadow(iframe); - }, "onIframeLoad"), - onStylesheetLoad: /* @__PURE__ */ __name((link2, childSn) => { - this.stylesheetManager.attachLinkElement(link2, childSn); - }, "onStylesheetLoad") - }); - if (sn) { - adds.push({ - parentId, - nextId, - node: sn - }); - addedIds.add(sn.id); - } - }, "pushAdd"); - while (this.mapRemoves.length) { - this.mirror.removeNodeFromMap(this.mapRemoves.shift()); - } - for (const n2 of this.movedSet) { - if (isParentRemoved(this.removes, n2, this.mirror) && !this.movedSet.has(n2.parentNode)) { - continue; - } - pushAdd(n2); - } - for (const n2 of this.addedSet) { - if (!isAncestorInSet(this.droppedSet, n2) && !isParentRemoved(this.removes, n2, this.mirror)) { - pushAdd(n2); - } else if (isAncestorInSet(this.movedSet, n2)) { - pushAdd(n2); - } else { - this.droppedSet.add(n2); - } - } - let candidate = null; - while (addList.length) { - let node3 = null; - if (candidate) { - const parentId = this.mirror.getId(candidate.value.parentNode); - const nextId = getNextId(candidate.value); - if (parentId !== -1 && nextId !== -1) { - node3 = candidate; - } - } - if (!node3) { - let tailNode = addList.tail; - while (tailNode) { - const _node = tailNode; - tailNode = tailNode.previous; - if (_node) { - const parentId = this.mirror.getId(_node.value.parentNode); - const nextId = getNextId(_node.value); - if (nextId === -1) - continue; - else if (parentId !== -1) { - node3 = _node; - break; - } else { - const unhandledNode = _node.value; - if (unhandledNode.parentNode && unhandledNode.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { - const shadowHost = unhandledNode.parentNode.host; - const parentId2 = this.mirror.getId(shadowHost); - if (parentId2 !== -1) { - node3 = _node; - break; - } - } - } - } - } - } - if (!node3) { - while (addList.head) { - addList.removeNode(addList.head.value); - } - break; - } - candidate = node3.previous; - addList.removeNode(node3.value); - pushAdd(node3.value); - } - const payload = { - texts: this.texts.map((text2) => ({ - id: this.mirror.getId(text2.node), - value: text2.value - })).filter((text2) => !addedIds.has(text2.id)).filter((text2) => this.mirror.has(text2.id)), - attributes: this.attributes.map((attribute2) => { - const { attributes } = attribute2; - if (typeof attributes.style === "string") { - const diffAsStr = JSON.stringify(attribute2.styleDiff); - const unchangedAsStr = JSON.stringify(attribute2._unchangedStyles); - if (diffAsStr.length < attributes.style.length) { - if ((diffAsStr + unchangedAsStr).split("var(").length === attributes.style.split("var(").length) { - attributes.style = attribute2.styleDiff; - } - } - } - return { - id: this.mirror.getId(attribute2.node), - attributes - }; - }).filter((attribute2) => !addedIds.has(attribute2.id)).filter((attribute2) => this.mirror.has(attribute2.id)), - removes: this.removes, - adds - }; - if (!payload.texts.length && !payload.attributes.length && !payload.removes.length && !payload.adds.length) { - return; - } - this.texts = []; - this.attributes = []; - this.attributeMap = /* @__PURE__ */ new WeakMap(); - this.removes = []; - this.addedSet = /* @__PURE__ */ new Set(); - this.movedSet = /* @__PURE__ */ new Set(); - this.droppedSet = /* @__PURE__ */ new Set(); - this.movedMap = {}; - this.mutationCb(payload); - }; - this.processMutation = (m2) => { - if (isIgnored(m2.target, this.mirror)) { - return; - } - switch (m2.type) { - case "characterData": { - const value4 = m2.target.textContent; - if (!isBlocked$1(m2.target, this.blockClass, this.blockSelector, this.unblockSelector, false) && value4 !== m2.oldValue) { - this.texts.push({ - value: needMaskingText(m2.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, this.maskAllText) && value4 ? this.maskTextFn ? this.maskTextFn(value4, closestElementOfNode$1(m2.target)) : value4.replace(/[\S]/g, "*") : value4, - node: m2.target - }); - } - break; - } - case "attributes": { - const target = m2.target; - let attributeName = m2.attributeName; - let value4 = m2.target.getAttribute(attributeName); - if (attributeName === "value") { - const type = getInputType(target); - const tagName = target.tagName; - value4 = getInputValue(target, tagName, type); - const isInputMasked = shouldMaskInput({ - maskInputOptions: this.maskInputOptions, - tagName, - type - }); - const forceMask = needMaskingText(m2.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, isInputMasked); - value4 = maskInputValue({ - isMasked: forceMask, - element: target, - value: value4, - maskInputFn: this.maskInputFn - }); - } - if (isBlocked$1(m2.target, this.blockClass, this.blockSelector, this.unblockSelector, false) || value4 === m2.oldValue) { - return; - } - let item3 = this.attributeMap.get(m2.target); - if (target.tagName === "IFRAME" && attributeName === "src" && !this.keepIframeSrcFn(value4)) { - const iframeDoc = getIFrameContentDocument(target); - if (!iframeDoc) { - attributeName = "rr_src"; - } else { - return; - } - } - if (!item3) { - item3 = { - node: m2.target, - attributes: {}, - styleDiff: {}, - _unchangedStyles: {} - }; - this.attributes.push(item3); - this.attributeMap.set(m2.target, item3); - } - if (attributeName === "type" && target.tagName === "INPUT" && (m2.oldValue || "").toLowerCase() === "password") { - target.setAttribute("data-rr-is-password", "true"); - } - if (!ignoreAttribute(target.tagName, attributeName)) { - item3.attributes[attributeName] = transformAttribute(this.doc, toLowerCase(target.tagName), toLowerCase(attributeName), value4, target, this.maskAttributeFn); - if (attributeName === "style") { - if (!this.unattachedDoc) { - try { - this.unattachedDoc = document.implementation.createHTMLDocument(); - } catch (e2) { - this.unattachedDoc = this.doc; - } - } - const old = this.unattachedDoc.createElement("span"); - if (m2.oldValue) { - old.setAttribute("style", m2.oldValue); - } - for (const pname of Array.from(target.style)) { - const newValue2 = target.style.getPropertyValue(pname); - const newPriority = target.style.getPropertyPriority(pname); - if (newValue2 !== old.style.getPropertyValue(pname) || newPriority !== old.style.getPropertyPriority(pname)) { - if (newPriority === "") { - item3.styleDiff[pname] = newValue2; - } else { - item3.styleDiff[pname] = [newValue2, newPriority]; - } - } else { - item3._unchangedStyles[pname] = [newValue2, newPriority]; - } - } - for (const pname of Array.from(old.style)) { - if (target.style.getPropertyValue(pname) === "") { - item3.styleDiff[pname] = false; - } - } - } - } - break; - } - case "childList": { - if (isBlocked$1(m2.target, this.blockClass, this.blockSelector, this.unblockSelector, true)) { - return; - } - m2.addedNodes.forEach((n2) => this.genAdds(n2, m2.target)); - m2.removedNodes.forEach((n2) => { - const nodeId = this.mirror.getId(n2); - const parentId = isShadowRoot(m2.target) ? this.mirror.getId(m2.target.host) : this.mirror.getId(m2.target); - if (isBlocked$1(m2.target, this.blockClass, this.blockSelector, this.unblockSelector, false) || isIgnored(n2, this.mirror) || !isSerialized(n2, this.mirror)) { - return; - } - if (this.addedSet.has(n2)) { - deepDelete(this.addedSet, n2); - this.droppedSet.add(n2); - } else if (this.addedSet.has(m2.target) && nodeId === -1) ; - else if (isAncestorRemoved(m2.target, this.mirror)) ; - else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) { - deepDelete(this.movedSet, n2); - } else { - this.removes.push({ - parentId, - id: nodeId, - isShadow: isShadowRoot(m2.target) && isNativeShadowDom(m2.target) ? true : void 0 - }); - } - this.mapRemoves.push(n2); - }); - break; - } - } - }; - this.genAdds = (n2, target) => { - if (this.processedNodeManager.inOtherBuffer(n2, this)) - return; - if (this.addedSet.has(n2) || this.movedSet.has(n2)) - return; - if (this.mirror.hasNode(n2)) { - if (isIgnored(n2, this.mirror)) { - return; - } - this.movedSet.add(n2); - let targetId = null; - if (target && this.mirror.hasNode(target)) { - targetId = this.mirror.getId(target); - } - if (targetId && targetId !== -1) { - this.movedMap[moveKey(this.mirror.getId(n2), targetId)] = true; - } - } else { - this.addedSet.add(n2); - this.droppedSet.delete(n2); - } - if (!isBlocked$1(n2, this.blockClass, this.blockSelector, this.unblockSelector, false)) { - n2.childNodes.forEach((childN) => this.genAdds(childN)); - if (hasShadowRoot(n2)) { - n2.shadowRoot.childNodes.forEach((childN) => { - this.processedNodeManager.add(childN, this); - this.genAdds(childN, n2); - }); - } - } - }; - } - init(options4) { - [ - "mutationCb", - "blockClass", - "blockSelector", - "unblockSelector", - "maskAllText", - "maskTextClass", - "unmaskTextClass", - "maskTextSelector", - "unmaskTextSelector", - "inlineStylesheet", - "maskInputOptions", - "maskAttributeFn", - "maskTextFn", - "maskInputFn", - "keepIframeSrcFn", - "recordCanvas", - "inlineImages", - "slimDOMOptions", - "dataURLOptions", - "doc", - "mirror", - "iframeManager", - "stylesheetManager", - "shadowDomManager", - "canvasManager", - "processedNodeManager" - ].forEach((key) => { - this[key] = options4[key]; - }); - } - freeze() { - this.frozen = true; - this.canvasManager.freeze(); - } - unfreeze() { - this.frozen = false; - this.canvasManager.unfreeze(); - this.emit(); - } - isFrozen() { - return this.frozen; - } - lock() { - this.locked = true; - this.canvasManager.lock(); - } - unlock() { - this.locked = false; - this.canvasManager.unlock(); - this.emit(); - } - reset() { - this.shadowDomManager.reset(); - this.canvasManager.reset(); - } -} -function deepDelete(addsSet, n2) { - addsSet.delete(n2); - n2.childNodes.forEach((childN) => deepDelete(addsSet, childN)); -} -__name(deepDelete, "deepDelete"); -function isParentRemoved(removes, n2, mirror2) { - if (removes.length === 0) - return false; - return _isParentRemoved(removes, n2, mirror2); -} -__name(isParentRemoved, "isParentRemoved"); -function _isParentRemoved(removes, n2, mirror2) { - let node3 = n2.parentNode; - while (node3) { - const parentId = mirror2.getId(node3); - if (removes.some((r2) => r2.id === parentId)) { - return true; - } - node3 = node3.parentNode; - } - return false; -} -__name(_isParentRemoved, "_isParentRemoved"); -function isAncestorInSet(set3, n2) { - if (set3.size === 0) - return false; - return _isAncestorInSet(set3, n2); -} -__name(isAncestorInSet, "isAncestorInSet"); -function _isAncestorInSet(set3, n2) { - const { parentNode: parentNode2 } = n2; - if (!parentNode2) { - return false; - } - if (set3.has(parentNode2)) { - return true; - } - return _isAncestorInSet(set3, parentNode2); -} -__name(_isAncestorInSet, "_isAncestorInSet"); -let errorHandler$1; -function registerErrorHandler$1(handler6) { - errorHandler$1 = handler6; -} -__name(registerErrorHandler$1, "registerErrorHandler$1"); -function unregisterErrorHandler() { - errorHandler$1 = void 0; -} -__name(unregisterErrorHandler, "unregisterErrorHandler"); -const callbackWrapper$1 = /* @__PURE__ */ __name((cb) => { - if (!errorHandler$1) { - return cb; - } - const rrwebWrapped = /* @__PURE__ */ __name((...rest) => { - try { - return cb(...rest); - } catch (error2) { - if (errorHandler$1 && errorHandler$1(error2) === true) { - return () => { - }; - } - throw error2; - } - }, "rrwebWrapped"); - return rrwebWrapped; -}, "callbackWrapper$1"); -function _optionalChain$2(ops) { - let lastAccessLHS = void 0; - let value4 = ops[0]; - let i2 = 1; - while (i2 < ops.length) { - const op = ops[i2]; - const fn = ops[i2 + 1]; - i2 += 2; - if ((op === "optionalAccess" || op === "optionalCall") && value4 == null) { - return void 0; - } - if (op === "access" || op === "optionalAccess") { - lastAccessLHS = value4; - value4 = fn(value4); - } else if (op === "call" || op === "optionalCall") { - value4 = fn((...args) => value4.call(lastAccessLHS, ...args)); - lastAccessLHS = void 0; - } - } - return value4; -} -__name(_optionalChain$2, "_optionalChain$2"); -const mutationBuffers = []; -function getEventTarget(event) { - try { - if ("composedPath" in event) { - const path = event.composedPath(); - if (path.length) { - return path[0]; - } - } else if ("path" in event && event.path.length) { - return event.path[0]; - } - } catch (e2) { - } - return event && event.target; -} -__name(getEventTarget, "getEventTarget"); -function initMutationObserver(options4, rootEl) { - const mutationBuffer = new MutationBuffer(); - mutationBuffers.push(mutationBuffer); - mutationBuffer.init(options4); - let mutationObserverCtor = window.MutationObserver || window.__rrMutationObserver; - const angularZoneSymbol = _optionalChain$2([window, "optionalAccess", (_2) => _2.Zone, "optionalAccess", (_2) => _2.__symbol__, "optionalCall", (_3) => _3("MutationObserver")]); - if (angularZoneSymbol && window[angularZoneSymbol]) { - mutationObserverCtor = window[angularZoneSymbol]; - } - const observer = new mutationObserverCtor(callbackWrapper$1((mutations) => { - if (options4.onMutation && options4.onMutation(mutations) === false) { - return; - } - mutationBuffer.processMutations.bind(mutationBuffer)(mutations); - })); - observer.observe(rootEl, { - attributes: true, - attributeOldValue: true, - characterData: true, - characterDataOldValue: true, - childList: true, - subtree: true - }); - return observer; -} -__name(initMutationObserver, "initMutationObserver"); -function initMoveObserver({ mousemoveCb, sampling, doc: doc2, mirror: mirror2 }) { - if (sampling.mousemove === false) { - return () => { - }; - } - const threshold = typeof sampling.mousemove === "number" ? sampling.mousemove : 50; - const callbackThreshold = typeof sampling.mousemoveCallback === "number" ? sampling.mousemoveCallback : 500; - let positions = []; - let timeBaseline; - const wrappedCb = throttle$1(callbackWrapper$1((source) => { - const totalOffset = Date.now() - timeBaseline; - mousemoveCb(positions.map((p2) => { - p2.timeOffset -= totalOffset; - return p2; - }), source); - positions = []; - timeBaseline = null; - }), callbackThreshold); - const updatePosition = callbackWrapper$1(throttle$1(callbackWrapper$1((evt) => { - const target = getEventTarget(evt); - const { clientX, clientY } = legacy_isTouchEvent(evt) ? evt.changedTouches[0] : evt; - if (!timeBaseline) { - timeBaseline = nowTimestamp(); - } - positions.push({ - x: clientX, - y: clientY, - id: mirror2.getId(target), - timeOffset: nowTimestamp() - timeBaseline - }); - wrappedCb(typeof DragEvent !== "undefined" && evt instanceof DragEvent ? IncrementalSource.Drag : evt instanceof MouseEvent ? IncrementalSource.MouseMove : IncrementalSource.TouchMove); - }), threshold, { - trailing: false - })); - const handlers2 = [ - on("mousemove", updatePosition, doc2), - on("touchmove", updatePosition, doc2), - on("drag", updatePosition, doc2) - ]; - return callbackWrapper$1(() => { - handlers2.forEach((h2) => h2()); - }); -} -__name(initMoveObserver, "initMoveObserver"); -function initMouseInteractionObserver({ mouseInteractionCb, doc: doc2, mirror: mirror2, blockClass, blockSelector, unblockSelector, sampling }) { - if (sampling.mouseInteraction === false) { - return () => { - }; - } - const disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === void 0 ? {} : sampling.mouseInteraction; - const handlers2 = []; - let currentPointerType = null; - const getHandler = /* @__PURE__ */ __name((eventKey) => { - return (event) => { - const target = getEventTarget(event); - if (isBlocked$1(target, blockClass, blockSelector, unblockSelector, true)) { - return; - } - let pointerType = null; - let thisEventKey = eventKey; - if ("pointerType" in event) { - switch (event.pointerType) { - case "mouse": - pointerType = PointerTypes.Mouse; - break; - case "touch": - pointerType = PointerTypes.Touch; - break; - case "pen": - pointerType = PointerTypes.Pen; - break; - } - if (pointerType === PointerTypes.Touch) { - if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) { - thisEventKey = "TouchStart"; - } else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) { - thisEventKey = "TouchEnd"; - } - } else if (pointerType === PointerTypes.Pen) ; - } else if (legacy_isTouchEvent(event)) { - pointerType = PointerTypes.Touch; - } - if (pointerType !== null) { - currentPointerType = pointerType; - if (thisEventKey.startsWith("Touch") && pointerType === PointerTypes.Touch || thisEventKey.startsWith("Mouse") && pointerType === PointerTypes.Mouse) { - pointerType = null; - } - } else if (MouseInteractions[eventKey] === MouseInteractions.Click) { - pointerType = currentPointerType; - currentPointerType = null; - } - const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event; - if (!e2) { - return; - } - const id3 = mirror2.getId(target); - const { clientX, clientY } = e2; - callbackWrapper$1(mouseInteractionCb)({ - type: MouseInteractions[thisEventKey], - id: id3, - x: clientX, - y: clientY, - ...pointerType !== null && { pointerType } - }); - }; - }, "getHandler"); - Object.keys(MouseInteractions).filter((key) => Number.isNaN(Number(key)) && !key.endsWith("_Departed") && disableMap[key] !== false).forEach((eventKey) => { - let eventName = toLowerCase(eventKey); - const handler6 = getHandler(eventKey); - if (window.PointerEvent) { - switch (MouseInteractions[eventKey]) { - case MouseInteractions.MouseDown: - case MouseInteractions.MouseUp: - eventName = eventName.replace("mouse", "pointer"); - break; - case MouseInteractions.TouchStart: - case MouseInteractions.TouchEnd: - return; - } - } - handlers2.push(on(eventName, handler6, doc2)); - }); - return callbackWrapper$1(() => { - handlers2.forEach((h2) => h2()); - }); -} -__name(initMouseInteractionObserver, "initMouseInteractionObserver"); -function initScrollObserver({ scrollCb, doc: doc2, mirror: mirror2, blockClass, blockSelector, unblockSelector, sampling }) { - const updatePosition = callbackWrapper$1(throttle$1(callbackWrapper$1((evt) => { - const target = getEventTarget(evt); - if (!target || isBlocked$1(target, blockClass, blockSelector, unblockSelector, true)) { - return; - } - const id3 = mirror2.getId(target); - if (target === doc2 && doc2.defaultView) { - const scrollLeftTop = getWindowScroll(doc2.defaultView); - scrollCb({ - id: id3, - x: scrollLeftTop.left, - y: scrollLeftTop.top - }); - } else { - scrollCb({ - id: id3, - x: target.scrollLeft, - y: target.scrollTop - }); - } - }), sampling.scroll || 100)); - return on("scroll", updatePosition, doc2); -} -__name(initScrollObserver, "initScrollObserver"); -function initViewportResizeObserver({ viewportResizeCb }, { win }) { - let lastH = -1; - let lastW = -1; - const updateDimension = callbackWrapper$1(throttle$1(callbackWrapper$1(() => { - const height = getWindowHeight(); - const width2 = getWindowWidth(); - if (lastH !== height || lastW !== width2) { - viewportResizeCb({ - width: Number(width2), - height: Number(height) - }); - lastH = height; - lastW = width2; - } - }), 200)); - return on("resize", updateDimension, win); -} -__name(initViewportResizeObserver, "initViewportResizeObserver"); -const INPUT_TAGS = ["INPUT", "TEXTAREA", "SELECT"]; -const lastInputValueMap = /* @__PURE__ */ new WeakMap(); -function initInputObserver({ inputCb, doc: doc2, mirror: mirror2, blockClass, blockSelector, unblockSelector, ignoreClass, ignoreSelector, maskInputOptions, maskInputFn, sampling, userTriggeredOnInput, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector }) { - function eventHandler(event) { - let target = getEventTarget(event); - const userTriggered = event.isTrusted; - const tagName = target && toUpperCase(target.tagName); - if (tagName === "OPTION") - target = target.parentElement; - if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked$1(target, blockClass, blockSelector, unblockSelector, true)) { - return; - } - const el = target; - if (el.classList.contains(ignoreClass) || ignoreSelector && el.matches(ignoreSelector)) { - return; - } - const type = getInputType(target); - let text2 = getInputValue(el, tagName, type); - let isChecked2 = false; - const isInputMasked = shouldMaskInput({ - maskInputOptions, - tagName, - type - }); - const forceMask = needMaskingText(target, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked); - if (type === "radio" || type === "checkbox") { - isChecked2 = target.checked; - } - text2 = maskInputValue({ - isMasked: forceMask, - element: target, - value: text2, - maskInputFn - }); - cbWithDedup(target, userTriggeredOnInput ? { text: text2, isChecked: isChecked2, userTriggered } : { text: text2, isChecked: isChecked2 }); - const name2 = target.name; - if (type === "radio" && name2 && isChecked2) { - doc2.querySelectorAll(`input[type="radio"][name="${name2}"]`).forEach((el2) => { - if (el2 !== target) { - const text3 = maskInputValue({ - isMasked: forceMask, - element: el2, - value: getInputValue(el2, tagName, type), - maskInputFn - }); - cbWithDedup(el2, userTriggeredOnInput ? { text: text3, isChecked: !isChecked2, userTriggered: false } : { text: text3, isChecked: !isChecked2 }); - } - }); - } - } - __name(eventHandler, "eventHandler"); - function cbWithDedup(target, v2) { - const lastInputValue = lastInputValueMap.get(target); - if (!lastInputValue || lastInputValue.text !== v2.text || lastInputValue.isChecked !== v2.isChecked) { - lastInputValueMap.set(target, v2); - const id3 = mirror2.getId(target); - callbackWrapper$1(inputCb)({ - ...v2, - id: id3 - }); - } - } - __name(cbWithDedup, "cbWithDedup"); - const events2 = sampling.input === "last" ? ["change"] : ["input", "change"]; - const handlers2 = events2.map((eventName) => on(eventName, callbackWrapper$1(eventHandler), doc2)); - const currentWindow = doc2.defaultView; - if (!currentWindow) { - return () => { - handlers2.forEach((h2) => h2()); - }; - } - const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(currentWindow.HTMLInputElement.prototype, "value"); - const hookProperties = [ - [currentWindow.HTMLInputElement.prototype, "value"], - [currentWindow.HTMLInputElement.prototype, "checked"], - [currentWindow.HTMLSelectElement.prototype, "value"], - [currentWindow.HTMLTextAreaElement.prototype, "value"], - [currentWindow.HTMLSelectElement.prototype, "selectedIndex"], - [currentWindow.HTMLOptionElement.prototype, "selected"] - ]; - if (propertyDescriptor && propertyDescriptor.set) { - handlers2.push(...hookProperties.map((p2) => hookSetter$1(p2[0], p2[1], { - set() { - callbackWrapper$1(eventHandler)({ - target: this, - isTrusted: false - }); - } - }, false, currentWindow))); - } - return callbackWrapper$1(() => { - handlers2.forEach((h2) => h2()); - }); -} -__name(initInputObserver, "initInputObserver"); -function getNestedCSSRulePositions(rule) { - const positions = []; - function recurse(childRule, pos2) { - if (hasNestedCSSRule("CSSGroupingRule") && childRule.parentRule instanceof CSSGroupingRule || hasNestedCSSRule("CSSMediaRule") && childRule.parentRule instanceof CSSMediaRule || hasNestedCSSRule("CSSSupportsRule") && childRule.parentRule instanceof CSSSupportsRule || hasNestedCSSRule("CSSConditionRule") && childRule.parentRule instanceof CSSConditionRule) { - const rules = Array.from(childRule.parentRule.cssRules); - const index2 = rules.indexOf(childRule); - pos2.unshift(index2); - } else if (childRule.parentStyleSheet) { - const rules = Array.from(childRule.parentStyleSheet.cssRules); - const index2 = rules.indexOf(childRule); - pos2.unshift(index2); - } - return pos2; - } - __name(recurse, "recurse"); - return recurse(rule, positions); -} -__name(getNestedCSSRulePositions, "getNestedCSSRulePositions"); -function getIdAndStyleId(sheet, mirror2, styleMirror) { - let id3, styleId; - if (!sheet) - return {}; - if (sheet.ownerNode) - id3 = mirror2.getId(sheet.ownerNode); - else - styleId = styleMirror.getId(sheet); - return { - styleId, - id: id3 - }; -} -__name(getIdAndStyleId, "getIdAndStyleId"); -function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetManager }, { win }) { - if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) { - return () => { - }; - } - const insertRule = win.CSSStyleSheet.prototype.insertRule; - win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { - const [rule, index2] = argumentsList; - const { id: id3, styleId } = getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror); - if (id3 && id3 !== -1 || styleId && styleId !== -1) { - styleSheetRuleCb({ - id: id3, - styleId, - adds: [{ rule, index: index2 }] - }); - } - return target.apply(thisArg, argumentsList); - }) - }); - const deleteRule = win.CSSStyleSheet.prototype.deleteRule; - win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { - const [index2] = argumentsList; - const { id: id3, styleId } = getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror); - if (id3 && id3 !== -1 || styleId && styleId !== -1) { - styleSheetRuleCb({ - id: id3, - styleId, - removes: [{ index: index2 }] - }); - } - return target.apply(thisArg, argumentsList); - }) - }); - let replace2; - if (win.CSSStyleSheet.prototype.replace) { - replace2 = win.CSSStyleSheet.prototype.replace; - win.CSSStyleSheet.prototype.replace = new Proxy(replace2, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { - const [text2] = argumentsList; - const { id: id3, styleId } = getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror); - if (id3 && id3 !== -1 || styleId && styleId !== -1) { - styleSheetRuleCb({ - id: id3, - styleId, - replace: text2 - }); - } - return target.apply(thisArg, argumentsList); - }) - }); - } - let replaceSync; - if (win.CSSStyleSheet.prototype.replaceSync) { - replaceSync = win.CSSStyleSheet.prototype.replaceSync; - win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { - const [text2] = argumentsList; - const { id: id3, styleId } = getIdAndStyleId(thisArg, mirror2, stylesheetManager.styleMirror); - if (id3 && id3 !== -1 || styleId && styleId !== -1) { - styleSheetRuleCb({ - id: id3, - styleId, - replaceSync: text2 - }); - } - return target.apply(thisArg, argumentsList); - }) - }); - } - const supportedNestedCSSRuleTypes = {}; - if (canMonkeyPatchNestedCSSRule("CSSGroupingRule")) { - supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule; - } else { - if (canMonkeyPatchNestedCSSRule("CSSMediaRule")) { - supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule; - } - if (canMonkeyPatchNestedCSSRule("CSSConditionRule")) { - supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule; - } - if (canMonkeyPatchNestedCSSRule("CSSSupportsRule")) { - supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule; - } - } - const unmodifiedFunctions = {}; - Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => { - unmodifiedFunctions[typeKey] = { - insertRule: type.prototype.insertRule, - deleteRule: type.prototype.deleteRule - }; - type.prototype.insertRule = new Proxy(unmodifiedFunctions[typeKey].insertRule, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { - const [rule, index2] = argumentsList; - const { id: id3, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror2, stylesheetManager.styleMirror); - if (id3 && id3 !== -1 || styleId && styleId !== -1) { - styleSheetRuleCb({ - id: id3, - styleId, - adds: [ - { - rule, - index: [ - ...getNestedCSSRulePositions(thisArg), - index2 || 0 - ] - } - ] - }); - } - return target.apply(thisArg, argumentsList); - }) - }); - type.prototype.deleteRule = new Proxy(unmodifiedFunctions[typeKey].deleteRule, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { - const [index2] = argumentsList; - const { id: id3, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror2, stylesheetManager.styleMirror); - if (id3 && id3 !== -1 || styleId && styleId !== -1) { - styleSheetRuleCb({ - id: id3, - styleId, - removes: [ - { index: [...getNestedCSSRulePositions(thisArg), index2] } - ] - }); - } - return target.apply(thisArg, argumentsList); - }) - }); - }); - return callbackWrapper$1(() => { - win.CSSStyleSheet.prototype.insertRule = insertRule; - win.CSSStyleSheet.prototype.deleteRule = deleteRule; - replace2 && (win.CSSStyleSheet.prototype.replace = replace2); - replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync); - Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => { - type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule; - type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule; - }); - }); -} -__name(initStyleSheetObserver, "initStyleSheetObserver"); -function initAdoptedStyleSheetObserver({ mirror: mirror2, stylesheetManager }, host) { - let hostId = null; - if (host.nodeName === "#document") - hostId = mirror2.getId(host); - else - hostId = mirror2.getId(host.host); - const patchTarget = host.nodeName === "#document" ? _optionalChain$2([host, "access", (_4) => _4.defaultView, "optionalAccess", (_5) => _5.Document]) : _optionalChain$2([host, "access", (_6) => _6.ownerDocument, "optionalAccess", (_7) => _7.defaultView, "optionalAccess", (_8) => _8.ShadowRoot]); - const originalPropertyDescriptor = _optionalChain$2([patchTarget, "optionalAccess", (_9) => _9.prototype]) ? Object.getOwnPropertyDescriptor(_optionalChain$2([patchTarget, "optionalAccess", (_10) => _10.prototype]), "adoptedStyleSheets") : void 0; - if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor) - return () => { - }; - Object.defineProperty(host, "adoptedStyleSheets", { - configurable: originalPropertyDescriptor.configurable, - enumerable: originalPropertyDescriptor.enumerable, - get() { - return _optionalChain$2([originalPropertyDescriptor, "access", (_11) => _11.get, "optionalAccess", (_12) => _12.call, "call", (_13) => _13(this)]); - }, - set(sheets) { - const result = _optionalChain$2([originalPropertyDescriptor, "access", (_14) => _14.set, "optionalAccess", (_15) => _15.call, "call", (_16) => _16(this, sheets)]); - if (hostId !== null && hostId !== -1) { - try { - stylesheetManager.adoptStyleSheets(sheets, hostId); - } catch (e2) { - } - } - return result; - } - }); - return callbackWrapper$1(() => { - Object.defineProperty(host, "adoptedStyleSheets", { - configurable: originalPropertyDescriptor.configurable, - enumerable: originalPropertyDescriptor.enumerable, - get: originalPropertyDescriptor.get, - set: originalPropertyDescriptor.set - }); - }); -} -__name(initAdoptedStyleSheetObserver, "initAdoptedStyleSheetObserver"); -function initStyleDeclarationObserver({ styleDeclarationCb, mirror: mirror2, ignoreCSSAttributes, stylesheetManager }, { win }) { - const setProperty2 = win.CSSStyleDeclaration.prototype.setProperty; - win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty2, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { - const [property, value4, priority] = argumentsList; - if (ignoreCSSAttributes.has(property)) { - return setProperty2.apply(thisArg, [property, value4, priority]); - } - const { id: id3, styleId } = getIdAndStyleId(_optionalChain$2([thisArg, "access", (_17) => _17.parentRule, "optionalAccess", (_18) => _18.parentStyleSheet]), mirror2, stylesheetManager.styleMirror); - if (id3 && id3 !== -1 || styleId && styleId !== -1) { - styleDeclarationCb({ - id: id3, - styleId, - set: { - property, - value: value4, - priority - }, - index: getNestedCSSRulePositions(thisArg.parentRule) - }); - } - return target.apply(thisArg, argumentsList); - }) - }); - const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty; - win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, { - apply: callbackWrapper$1((target, thisArg, argumentsList) => { - const [property] = argumentsList; - if (ignoreCSSAttributes.has(property)) { - return removeProperty.apply(thisArg, [property]); - } - const { id: id3, styleId } = getIdAndStyleId(_optionalChain$2([thisArg, "access", (_19) => _19.parentRule, "optionalAccess", (_20) => _20.parentStyleSheet]), mirror2, stylesheetManager.styleMirror); - if (id3 && id3 !== -1 || styleId && styleId !== -1) { - styleDeclarationCb({ - id: id3, - styleId, - remove: { - property - }, - index: getNestedCSSRulePositions(thisArg.parentRule) - }); - } - return target.apply(thisArg, argumentsList); - }) - }); - return callbackWrapper$1(() => { - win.CSSStyleDeclaration.prototype.setProperty = setProperty2; - win.CSSStyleDeclaration.prototype.removeProperty = removeProperty; - }); -} -__name(initStyleDeclarationObserver, "initStyleDeclarationObserver"); -function initMediaInteractionObserver({ mediaInteractionCb, blockClass, blockSelector, unblockSelector, mirror: mirror2, sampling, doc: doc2 }) { - const handler6 = callbackWrapper$1((type) => throttle$1(callbackWrapper$1((event) => { - const target = getEventTarget(event); - if (!target || isBlocked$1(target, blockClass, blockSelector, unblockSelector, true)) { - return; - } - const { currentTime, volume, muted, playbackRate } = target; - mediaInteractionCb({ - type, - id: mirror2.getId(target), - currentTime, - volume, - muted, - playbackRate - }); - }), sampling.media || 500)); - const handlers2 = [ - on("play", handler6(0), doc2), - on("pause", handler6(1), doc2), - on("seeked", handler6(2), doc2), - on("volumechange", handler6(3), doc2), - on("ratechange", handler6(4), doc2) - ]; - return callbackWrapper$1(() => { - handlers2.forEach((h2) => h2()); - }); -} -__name(initMediaInteractionObserver, "initMediaInteractionObserver"); -function initFontObserver({ fontCb, doc: doc2 }) { - const win = doc2.defaultView; - if (!win) { - return () => { - }; - } - const handlers2 = []; - const fontMap = /* @__PURE__ */ new WeakMap(); - const originalFontFace = win.FontFace; - win.FontFace = /* @__PURE__ */ __name(function FontFace(family, source, descriptors2) { - const fontFace = new originalFontFace(family, source, descriptors2); - fontMap.set(fontFace, { - family, - buffer: typeof source !== "string", - descriptors: descriptors2, - fontSource: typeof source === "string" ? source : JSON.stringify(Array.from(new Uint8Array(source))) - }); - return fontFace; - }, "FontFace"); - const restoreHandler = patch$2(doc2.fonts, "add", function(original) { - return function(fontFace) { - setTimeout$1$1(callbackWrapper$1(() => { - const p2 = fontMap.get(fontFace); - if (p2) { - fontCb(p2); - fontMap.delete(fontFace); - } - }), 0); - return original.apply(this, [fontFace]); - }; - }); - handlers2.push(() => { - win.FontFace = originalFontFace; - }); - handlers2.push(restoreHandler); - return callbackWrapper$1(() => { - handlers2.forEach((h2) => h2()); - }); -} -__name(initFontObserver, "initFontObserver"); -function initSelectionObserver(param) { - const { doc: doc2, mirror: mirror2, blockClass, blockSelector, unblockSelector, selectionCb } = param; - let collapsed2 = true; - const updateSelection2 = callbackWrapper$1(() => { - const selection = doc2.getSelection(); - if (!selection || collapsed2 && _optionalChain$2([selection, "optionalAccess", (_21) => _21.isCollapsed])) - return; - collapsed2 = selection.isCollapsed || false; - const ranges = []; - const count = selection.rangeCount || 0; - for (let i2 = 0; i2 < count; i2++) { - const range2 = selection.getRangeAt(i2); - const { startContainer, startOffset, endContainer, endOffset } = range2; - const blocked2 = isBlocked$1(startContainer, blockClass, blockSelector, unblockSelector, true) || isBlocked$1(endContainer, blockClass, blockSelector, unblockSelector, true); - if (blocked2) - continue; - ranges.push({ - start: mirror2.getId(startContainer), - startOffset, - end: mirror2.getId(endContainer), - endOffset - }); - } - selectionCb({ ranges }); - }); - updateSelection2(); - return on("selectionchange", updateSelection2); -} -__name(initSelectionObserver, "initSelectionObserver"); -function initCustomElementObserver({ doc: doc2, customElementCb }) { - const win = doc2.defaultView; - if (!win || !win.customElements) - return () => { - }; - const restoreHandler = patch$2(win.customElements, "define", function(original) { - return function(name2, constructor, options4) { - try { - customElementCb({ - define: { - name: name2 - } - }); - } catch (e2) { - } - return original.apply(this, [name2, constructor, options4]); - }; - }); - return restoreHandler; -} -__name(initCustomElementObserver, "initCustomElementObserver"); -function initObservers(o2, _hooks = {}) { - const currentWindow = o2.doc.defaultView; - if (!currentWindow) { - return () => { - }; - } - let mutationObserver; - if (o2.recordDOM) { - mutationObserver = initMutationObserver(o2, o2.doc); - } - const mousemoveHandler = initMoveObserver(o2); - const mouseInteractionHandler = initMouseInteractionObserver(o2); - const scrollHandler = initScrollObserver(o2); - const viewportResizeHandler = initViewportResizeObserver(o2, { - win: currentWindow - }); - const inputHandler = initInputObserver(o2); - const mediaInteractionHandler = initMediaInteractionObserver(o2); - let styleSheetObserver = /* @__PURE__ */ __name(() => { - }, "styleSheetObserver"); - let adoptedStyleSheetObserver = /* @__PURE__ */ __name(() => { - }, "adoptedStyleSheetObserver"); - let styleDeclarationObserver = /* @__PURE__ */ __name(() => { - }, "styleDeclarationObserver"); - let fontObserver = /* @__PURE__ */ __name(() => { - }, "fontObserver"); - if (o2.recordDOM) { - styleSheetObserver = initStyleSheetObserver(o2, { win: currentWindow }); - adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o2, o2.doc); - styleDeclarationObserver = initStyleDeclarationObserver(o2, { - win: currentWindow - }); - if (o2.collectFonts) { - fontObserver = initFontObserver(o2); - } - } - const selectionObserver = initSelectionObserver(o2); - const customElementObserver = initCustomElementObserver(o2); - const pluginHandlers = []; - for (const plugin of o2.plugins) { - pluginHandlers.push(plugin.observer(plugin.callback, currentWindow, plugin.options)); - } - return callbackWrapper$1(() => { - mutationBuffers.forEach((b2) => b2.reset()); - _optionalChain$2([mutationObserver, "optionalAccess", (_22) => _22.disconnect, "call", (_23) => _23()]); - mousemoveHandler(); - mouseInteractionHandler(); - scrollHandler(); - viewportResizeHandler(); - inputHandler(); - mediaInteractionHandler(); - styleSheetObserver(); - adoptedStyleSheetObserver(); - styleDeclarationObserver(); - fontObserver(); - selectionObserver(); - customElementObserver(); - pluginHandlers.forEach((h2) => h2()); - }); -} -__name(initObservers, "initObservers"); -function hasNestedCSSRule(prop2) { - return typeof window[prop2] !== "undefined"; -} -__name(hasNestedCSSRule, "hasNestedCSSRule"); -function canMonkeyPatchNestedCSSRule(prop2) { - return Boolean(typeof window[prop2] !== "undefined" && window[prop2].prototype && "insertRule" in window[prop2].prototype && "deleteRule" in window[prop2].prototype); -} -__name(canMonkeyPatchNestedCSSRule, "canMonkeyPatchNestedCSSRule"); -class CrossOriginIframeMirror { - static { - __name(this, "CrossOriginIframeMirror"); - } - constructor(generateIdFn) { - this.generateIdFn = generateIdFn; - this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap(); - this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap(); - } - getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) { - const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe); - const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe); - let id3 = idToRemoteIdMap.get(remoteId); - if (!id3) { - id3 = this.generateIdFn(); - idToRemoteIdMap.set(remoteId, id3); - remoteIdToIdMap.set(id3, remoteId); - } - return id3; - } - getIds(iframe, remoteId) { - const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe); - const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe); - return remoteId.map((id3) => this.getId(iframe, id3, idToRemoteIdMap, remoteIdToIdMap)); - } - getRemoteId(iframe, id3, map3) { - const remoteIdToIdMap = map3 || this.getRemoteIdToIdMap(iframe); - if (typeof id3 !== "number") - return id3; - const remoteId = remoteIdToIdMap.get(id3); - if (!remoteId) - return -1; - return remoteId; - } - getRemoteIds(iframe, ids) { - const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe); - return ids.map((id3) => this.getRemoteId(iframe, id3, remoteIdToIdMap)); - } - reset(iframe) { - if (!iframe) { - this.iframeIdToRemoteIdMap = /* @__PURE__ */ new WeakMap(); - this.iframeRemoteIdToIdMap = /* @__PURE__ */ new WeakMap(); - return; - } - this.iframeIdToRemoteIdMap.delete(iframe); - this.iframeRemoteIdToIdMap.delete(iframe); - } - getIdToRemoteIdMap(iframe) { - let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe); - if (!idToRemoteIdMap) { - idToRemoteIdMap = /* @__PURE__ */ new Map(); - this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap); - } - return idToRemoteIdMap; - } - getRemoteIdToIdMap(iframe) { - let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe); - if (!remoteIdToIdMap) { - remoteIdToIdMap = /* @__PURE__ */ new Map(); - this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap); - } - return remoteIdToIdMap; - } -} -function _optionalChain$1(ops) { - let lastAccessLHS = void 0; - let value4 = ops[0]; - let i2 = 1; - while (i2 < ops.length) { - const op = ops[i2]; - const fn = ops[i2 + 1]; - i2 += 2; - if ((op === "optionalAccess" || op === "optionalCall") && value4 == null) { - return void 0; - } - if (op === "access" || op === "optionalAccess") { - lastAccessLHS = value4; - value4 = fn(value4); - } else if (op === "call" || op === "optionalCall") { - value4 = fn((...args) => value4.call(lastAccessLHS, ...args)); - lastAccessLHS = void 0; - } - } - return value4; -} -__name(_optionalChain$1, "_optionalChain$1"); -class IframeManagerNoop { - static { - __name(this, "IframeManagerNoop"); - } - constructor() { - this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId); - this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap(); - } - addIframe() { - } - addLoadListener() { - } - attachIframe() { - } -} -class IframeManager { - static { - __name(this, "IframeManager"); - } - constructor(options4) { - this.iframes = /* @__PURE__ */ new WeakMap(); - this.crossOriginIframeMap = /* @__PURE__ */ new WeakMap(); - this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId); - this.crossOriginIframeRootIdMap = /* @__PURE__ */ new WeakMap(); - this.mutationCb = options4.mutationCb; - this.wrappedEmit = options4.wrappedEmit; - this.stylesheetManager = options4.stylesheetManager; - this.recordCrossOriginIframes = options4.recordCrossOriginIframes; - this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)); - this.mirror = options4.mirror; - if (this.recordCrossOriginIframes) { - window.addEventListener("message", this.handleMessage.bind(this)); - } - } - addIframe(iframeEl) { - this.iframes.set(iframeEl, true); - if (iframeEl.contentWindow) - this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl); - } - addLoadListener(cb) { - this.loadListener = cb; - } - attachIframe(iframeEl, childSn) { - this.mutationCb({ - adds: [ - { - parentId: this.mirror.getId(iframeEl), - nextId: null, - node: childSn - } - ], - removes: [], - texts: [], - attributes: [], - isAttachIframe: true - }); - _optionalChain$1([this, "access", (_2) => _2.loadListener, "optionalCall", (_2) => _2(iframeEl)]); - const iframeDoc = getIFrameContentDocument(iframeEl); - if (iframeDoc && iframeDoc.adoptedStyleSheets && iframeDoc.adoptedStyleSheets.length > 0) - this.stylesheetManager.adoptStyleSheets(iframeDoc.adoptedStyleSheets, this.mirror.getId(iframeDoc)); - } - handleMessage(message3) { - const crossOriginMessageEvent = message3; - if (crossOriginMessageEvent.data.type !== "rrweb" || crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin) - return; - const iframeSourceWindow = message3.source; - if (!iframeSourceWindow) - return; - const iframeEl = this.crossOriginIframeMap.get(message3.source); - if (!iframeEl) - return; - const transformedEvent = this.transformCrossOriginEvent(iframeEl, crossOriginMessageEvent.data.event); - if (transformedEvent) - this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout); - } - transformCrossOriginEvent(iframeEl, e2) { - switch (e2.type) { - case EventType.FullSnapshot: { - this.crossOriginIframeMirror.reset(iframeEl); - this.crossOriginIframeStyleMirror.reset(iframeEl); - this.replaceIdOnNode(e2.data.node, iframeEl); - const rootId = e2.data.node.id; - this.crossOriginIframeRootIdMap.set(iframeEl, rootId); - this.patchRootIdOnNode(e2.data.node, rootId); - return { - timestamp: e2.timestamp, - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.Mutation, - adds: [ - { - parentId: this.mirror.getId(iframeEl), - nextId: null, - node: e2.data.node - } - ], - removes: [], - texts: [], - attributes: [], - isAttachIframe: true - } - }; - } - case EventType.Meta: - case EventType.Load: - case EventType.DomContentLoaded: { - return false; - } - case EventType.Plugin: { - return e2; - } - case EventType.Custom: { - this.replaceIds(e2.data.payload, iframeEl, ["id", "parentId", "previousId", "nextId"]); - return e2; - } - case EventType.IncrementalSnapshot: { - switch (e2.data.source) { - case IncrementalSource.Mutation: { - e2.data.adds.forEach((n2) => { - this.replaceIds(n2, iframeEl, [ - "parentId", - "nextId", - "previousId" - ]); - this.replaceIdOnNode(n2.node, iframeEl); - const rootId = this.crossOriginIframeRootIdMap.get(iframeEl); - rootId && this.patchRootIdOnNode(n2.node, rootId); - }); - e2.data.removes.forEach((n2) => { - this.replaceIds(n2, iframeEl, ["parentId", "id"]); - }); - e2.data.attributes.forEach((n2) => { - this.replaceIds(n2, iframeEl, ["id"]); - }); - e2.data.texts.forEach((n2) => { - this.replaceIds(n2, iframeEl, ["id"]); - }); - return e2; - } - case IncrementalSource.Drag: - case IncrementalSource.TouchMove: - case IncrementalSource.MouseMove: { - e2.data.positions.forEach((p2) => { - this.replaceIds(p2, iframeEl, ["id"]); - }); - return e2; - } - case IncrementalSource.ViewportResize: { - return false; - } - case IncrementalSource.MediaInteraction: - case IncrementalSource.MouseInteraction: - case IncrementalSource.Scroll: - case IncrementalSource.CanvasMutation: - case IncrementalSource.Input: { - this.replaceIds(e2.data, iframeEl, ["id"]); - return e2; - } - case IncrementalSource.StyleSheetRule: - case IncrementalSource.StyleDeclaration: { - this.replaceIds(e2.data, iframeEl, ["id"]); - this.replaceStyleIds(e2.data, iframeEl, ["styleId"]); - return e2; - } - case IncrementalSource.Font: { - return e2; - } - case IncrementalSource.Selection: { - e2.data.ranges.forEach((range2) => { - this.replaceIds(range2, iframeEl, ["start", "end"]); - }); - return e2; - } - case IncrementalSource.AdoptedStyleSheet: { - this.replaceIds(e2.data, iframeEl, ["id"]); - this.replaceStyleIds(e2.data, iframeEl, ["styleIds"]); - _optionalChain$1([e2, "access", (_3) => _3.data, "access", (_4) => _4.styles, "optionalAccess", (_5) => _5.forEach, "call", (_6) => _6((style2) => { - this.replaceStyleIds(style2, iframeEl, ["styleId"]); - })]); - return e2; - } - } - } - } - return false; - } - replace(iframeMirror, obj, iframeEl, keys2) { - for (const key of keys2) { - if (!Array.isArray(obj[key]) && typeof obj[key] !== "number") - continue; - if (Array.isArray(obj[key])) { - obj[key] = iframeMirror.getIds(iframeEl, obj[key]); - } else { - obj[key] = iframeMirror.getId(iframeEl, obj[key]); - } - } - return obj; - } - replaceIds(obj, iframeEl, keys2) { - return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys2); - } - replaceStyleIds(obj, iframeEl, keys2) { - return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys2); - } - replaceIdOnNode(node3, iframeEl) { - this.replaceIds(node3, iframeEl, ["id", "rootId"]); - if ("childNodes" in node3) { - node3.childNodes.forEach((child) => { - this.replaceIdOnNode(child, iframeEl); - }); - } - } - patchRootIdOnNode(node3, rootId) { - if (node3.type !== NodeType$3.Document && !node3.rootId) - node3.rootId = rootId; - if ("childNodes" in node3) { - node3.childNodes.forEach((child) => { - this.patchRootIdOnNode(child, rootId); - }); - } - } -} -class ShadowDomManagerNoop { - static { - __name(this, "ShadowDomManagerNoop"); - } - init() { - } - addShadowRoot() { - } - observeAttachShadow() { - } - reset() { - } -} -class ShadowDomManager { - static { - __name(this, "ShadowDomManager"); - } - constructor(options4) { - this.shadowDoms = /* @__PURE__ */ new WeakSet(); - this.restoreHandlers = []; - this.mutationCb = options4.mutationCb; - this.scrollCb = options4.scrollCb; - this.bypassOptions = options4.bypassOptions; - this.mirror = options4.mirror; - this.init(); - } - init() { - this.reset(); - this.patchAttachShadow(Element, document); - } - addShadowRoot(shadowRoot, doc2) { - if (!isNativeShadowDom(shadowRoot)) - return; - if (this.shadowDoms.has(shadowRoot)) - return; - this.shadowDoms.add(shadowRoot); - this.bypassOptions.canvasManager.addShadowRoot(shadowRoot); - const observer = initMutationObserver({ - ...this.bypassOptions, - doc: doc2, - mutationCb: this.mutationCb, - mirror: this.mirror, - shadowDomManager: this - }, shadowRoot); - this.restoreHandlers.push(() => observer.disconnect()); - this.restoreHandlers.push(initScrollObserver({ - ...this.bypassOptions, - scrollCb: this.scrollCb, - doc: shadowRoot, - mirror: this.mirror - })); - setTimeout$1$1(() => { - if (shadowRoot.adoptedStyleSheets && shadowRoot.adoptedStyleSheets.length > 0) - this.bypassOptions.stylesheetManager.adoptStyleSheets(shadowRoot.adoptedStyleSheets, this.mirror.getId(shadowRoot.host)); - this.restoreHandlers.push(initAdoptedStyleSheetObserver({ - mirror: this.mirror, - stylesheetManager: this.bypassOptions.stylesheetManager - }, shadowRoot)); - }, 0); - } - observeAttachShadow(iframeElement) { - const iframeDoc = getIFrameContentDocument(iframeElement); - const iframeWindow = getIFrameContentWindow(iframeElement); - if (!iframeDoc || !iframeWindow) - return; - this.patchAttachShadow(iframeWindow.Element, iframeDoc); - } - patchAttachShadow(element, doc2) { - const manager = this; - this.restoreHandlers.push(patch$2(element.prototype, "attachShadow", function(original) { - return function(option3) { - const shadowRoot = original.call(this, option3); - if (this.shadowRoot && inDom(this)) - manager.addShadowRoot(this.shadowRoot, doc2); - return shadowRoot; - }; - })); - } - reset() { - this.restoreHandlers.forEach((handler6) => { - try { - handler6(); - } catch (e2) { - } - }); - this.restoreHandlers = []; - this.shadowDoms = /* @__PURE__ */ new WeakSet(); - this.bypassOptions.canvasManager.resetShadowRoots(); - } -} -class CanvasManagerNoop { - static { - __name(this, "CanvasManagerNoop"); - } - reset() { - } - freeze() { - } - unfreeze() { - } - lock() { - } - unlock() { - } - snapshot() { - } - addWindow() { - } - addShadowRoot() { - } - resetShadowRoots() { - } -} -class StylesheetManager { - static { - __name(this, "StylesheetManager"); - } - constructor(options4) { - this.trackedLinkElements = /* @__PURE__ */ new WeakSet(); - this.styleMirror = new StyleSheetMirror(); - this.mutationCb = options4.mutationCb; - this.adoptedStyleSheetCb = options4.adoptedStyleSheetCb; - } - attachLinkElement(linkEl, childSn) { - if ("_cssText" in childSn.attributes) - this.mutationCb({ - adds: [], - removes: [], - texts: [], - attributes: [ - { - id: childSn.id, - attributes: childSn.attributes - } - ] - }); - this.trackLinkElement(linkEl); - } - trackLinkElement(linkEl) { - if (this.trackedLinkElements.has(linkEl)) - return; - this.trackedLinkElements.add(linkEl); - this.trackStylesheetInLinkElement(linkEl); - } - adoptStyleSheets(sheets, hostId) { - if (sheets.length === 0) - return; - const adoptedStyleSheetData = { - id: hostId, - styleIds: [] - }; - const styles = []; - for (const sheet of sheets) { - let styleId; - if (!this.styleMirror.has(sheet)) { - styleId = this.styleMirror.add(sheet); - styles.push({ - styleId, - rules: Array.from(sheet.rules || CSSRule, (r2, index2) => ({ - rule: stringifyRule(r2), - index: index2 - })) - }); - } else - styleId = this.styleMirror.getId(sheet); - adoptedStyleSheetData.styleIds.push(styleId); - } - if (styles.length > 0) - adoptedStyleSheetData.styles = styles; - this.adoptedStyleSheetCb(adoptedStyleSheetData); - } - reset() { - this.styleMirror.reset(); - this.trackedLinkElements = /* @__PURE__ */ new WeakSet(); - } - trackStylesheetInLinkElement(linkEl) { - } -} -class ProcessedNodeManager { - static { - __name(this, "ProcessedNodeManager"); - } - constructor() { - this.nodeMap = /* @__PURE__ */ new WeakMap(); - this.active = false; - } - inOtherBuffer(node3, thisBuffer) { - const buffers = this.nodeMap.get(node3); - return buffers && Array.from(buffers).some((buffer2) => buffer2 !== thisBuffer); - } - add(node3, buffer2) { - if (!this.active) { - this.active = true; - onRequestAnimationFrame$1(() => { - this.nodeMap = /* @__PURE__ */ new WeakMap(); - this.active = false; - }); - } - this.nodeMap.set(node3, (this.nodeMap.get(node3) || /* @__PURE__ */ new Set()).add(buffer2)); - } - destroy() { - } -} -let wrappedEmit; -let _takeFullSnapshot; -try { - if (Array.from([1], (x2) => x2 * 2)[0] !== 2) { - const cleanFrame = document.createElement("iframe"); - document.body.appendChild(cleanFrame); - Array.from = _optionalChain([cleanFrame, "access", (_2) => _2.contentWindow, "optionalAccess", (_2) => _2.Array, "access", (_3) => _3.from]) || Array.from; - document.body.removeChild(cleanFrame); - } -} catch (err) { - console.debug("Unable to override Array.from", err); -} -const mirror = createMirror(); -function record(options4 = {}) { - const { emit: emit2, checkoutEveryNms, checkoutEveryNth, blockClass = "rr-block", blockSelector = null, unblockSelector = null, ignoreClass = "rr-ignore", ignoreSelector = null, maskAllText = false, maskTextClass = "rr-mask", unmaskTextClass = null, maskTextSelector = null, unmaskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskAttributeFn, maskInputFn, maskTextFn, maxCanvasSize = null, packFn, sampling = {}, dataURLOptions = {}, mousemoveWait, recordDOM = true, recordCanvas = false, recordCrossOriginIframes = false, recordAfter = options4.recordAfter === "DOMContentLoaded" ? options4.recordAfter : "load", userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = /* @__PURE__ */ __name(() => false, "keepIframeSrcFn"), ignoreCSSAttributes = /* @__PURE__ */ new Set([]), errorHandler: errorHandler2, onMutation, getCanvasManager } = options4; - registerErrorHandler$1(errorHandler2); - const inEmittingFrame = recordCrossOriginIframes ? window.parent === window : true; - let passEmitsToParent = false; - if (!inEmittingFrame) { - try { - if (window.parent.document) { - passEmitsToParent = false; - } - } catch (e2) { - passEmitsToParent = true; - } - } - if (inEmittingFrame && !emit2) { - throw new Error("emit function is required"); - } - if (!inEmittingFrame && !passEmitsToParent) { - return () => { - }; - } - if (mousemoveWait !== void 0 && sampling.mousemove === void 0) { - sampling.mousemove = mousemoveWait; - } - mirror.reset(); - const maskInputOptions = maskAllInputs === true ? { - color: true, - date: true, - "datetime-local": true, - email: true, - month: true, - number: true, - range: true, - search: true, - tel: true, - text: true, - time: true, - url: true, - week: true, - textarea: true, - select: true, - radio: true, - checkbox: true - } : _maskInputOptions !== void 0 ? _maskInputOptions : {}; - const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === "all" ? { - script: true, - comment: true, - headFavicon: true, - headWhitespace: true, - headMetaSocial: true, - headMetaRobots: true, - headMetaHttpEquiv: true, - headMetaVerification: true, - headMetaAuthorship: _slimDOMOptions === "all", - headMetaDescKeywords: _slimDOMOptions === "all" - } : _slimDOMOptions ? _slimDOMOptions : {}; - polyfill(); - let lastFullSnapshotEvent; - let incrementalSnapshotCount = 0; - const eventProcessor = /* @__PURE__ */ __name((e2) => { - for (const plugin of plugins || []) { - if (plugin.eventProcessor) { - e2 = plugin.eventProcessor(e2); - } - } - if (packFn && !passEmitsToParent) { - e2 = packFn(e2); - } - return e2; - }, "eventProcessor"); - wrappedEmit = /* @__PURE__ */ __name((r2, isCheckout) => { - const e2 = r2; - e2.timestamp = nowTimestamp(); - if (_optionalChain([mutationBuffers, "access", (_4) => _4[0], "optionalAccess", (_5) => _5.isFrozen, "call", (_6) => _6()]) && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) { - mutationBuffers.forEach((buf) => buf.unfreeze()); - } - if (inEmittingFrame) { - _optionalChain([emit2, "optionalCall", (_7) => _7(eventProcessor(e2), isCheckout)]); - } else if (passEmitsToParent) { - const message3 = { - type: "rrweb", - event: eventProcessor(e2), - origin: window.location.origin, - isCheckout - }; - window.parent.postMessage(message3, "*"); - } - if (e2.type === EventType.FullSnapshot) { - lastFullSnapshotEvent = e2; - incrementalSnapshotCount = 0; - } else if (e2.type === EventType.IncrementalSnapshot) { - if (e2.data.source === IncrementalSource.Mutation && e2.data.isAttachIframe) { - return; - } - incrementalSnapshotCount++; - const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth; - const exceedTime = checkoutEveryNms && lastFullSnapshotEvent && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms; - if (exceedCount || exceedTime) { - takeFullSnapshot2(true); - } - } - }, "wrappedEmit"); - const wrappedMutationEmit = /* @__PURE__ */ __name((m2) => { - wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.Mutation, - ...m2 - } - }); - }, "wrappedMutationEmit"); - const wrappedScrollEmit = /* @__PURE__ */ __name((p2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.Scroll, - ...p2 - } - }), "wrappedScrollEmit"); - const wrappedCanvasMutationEmit = /* @__PURE__ */ __name((p2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.CanvasMutation, - ...p2 - } - }), "wrappedCanvasMutationEmit"); - const wrappedAdoptedStyleSheetEmit = /* @__PURE__ */ __name((a2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.AdoptedStyleSheet, - ...a2 - } - }), "wrappedAdoptedStyleSheetEmit"); - const stylesheetManager = new StylesheetManager({ - mutationCb: wrappedMutationEmit, - adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit - }); - const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === "boolean" && __RRWEB_EXCLUDE_IFRAME__ ? new IframeManagerNoop() : new IframeManager({ - mirror, - mutationCb: wrappedMutationEmit, - stylesheetManager, - recordCrossOriginIframes, - wrappedEmit - }); - for (const plugin of plugins || []) { - if (plugin.getMirror) - plugin.getMirror({ - nodeMirror: mirror, - crossOriginIframeMirror: iframeManager.crossOriginIframeMirror, - crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror - }); - } - const processedNodeManager = new ProcessedNodeManager(); - const canvasManager = _getCanvasManager(getCanvasManager, { - mirror, - win: window, - mutationCb: /* @__PURE__ */ __name((p2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.CanvasMutation, - ...p2 - } - }), "mutationCb"), - recordCanvas, - blockClass, - blockSelector, - unblockSelector, - maxCanvasSize, - sampling: sampling["canvas"], - dataURLOptions, - errorHandler: errorHandler2 - }); - const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === "boolean" && __RRWEB_EXCLUDE_SHADOW_DOM__ ? new ShadowDomManagerNoop() : new ShadowDomManager({ - mutationCb: wrappedMutationEmit, - scrollCb: wrappedScrollEmit, - bypassOptions: { - onMutation, - blockClass, - blockSelector, - unblockSelector, - maskAllText, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - inlineStylesheet, - maskInputOptions, - dataURLOptions, - maskAttributeFn, - maskTextFn, - maskInputFn, - recordCanvas, - inlineImages, - sampling, - slimDOMOptions, - iframeManager, - stylesheetManager, - canvasManager, - keepIframeSrcFn, - processedNodeManager - }, - mirror - }); - const takeFullSnapshot2 = /* @__PURE__ */ __name((isCheckout = false) => { - if (!recordDOM) { - return; - } - wrappedEmit({ - type: EventType.Meta, - data: { - href: window.location.href, - width: getWindowWidth(), - height: getWindowHeight() - } - }, isCheckout); - stylesheetManager.reset(); - shadowDomManager.init(); - mutationBuffers.forEach((buf) => buf.lock()); - const node3 = snapshot(document, { - mirror, - blockClass, - blockSelector, - unblockSelector, - maskAllText, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - inlineStylesheet, - maskAllInputs: maskInputOptions, - maskAttributeFn, - maskInputFn, - maskTextFn, - slimDOM: slimDOMOptions, - dataURLOptions, - recordCanvas, - inlineImages, - onSerialize: /* @__PURE__ */ __name((n2) => { - if (isSerializedIframe(n2, mirror)) { - iframeManager.addIframe(n2); - } - if (isSerializedStylesheet(n2, mirror)) { - stylesheetManager.trackLinkElement(n2); - } - if (hasShadowRoot(n2)) { - shadowDomManager.addShadowRoot(n2.shadowRoot, document); - } - }, "onSerialize"), - onIframeLoad: /* @__PURE__ */ __name((iframe, childSn) => { - iframeManager.attachIframe(iframe, childSn); - if (iframe.contentWindow) { - canvasManager.addWindow(iframe.contentWindow); - } - shadowDomManager.observeAttachShadow(iframe); - }, "onIframeLoad"), - onStylesheetLoad: /* @__PURE__ */ __name((linkEl, childSn) => { - stylesheetManager.attachLinkElement(linkEl, childSn); - }, "onStylesheetLoad"), - keepIframeSrcFn - }); - if (!node3) { - return console.warn("Failed to snapshot the document"); - } - wrappedEmit({ - type: EventType.FullSnapshot, - data: { - node: node3, - initialOffset: getWindowScroll(window) - } - }); - mutationBuffers.forEach((buf) => buf.unlock()); - if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0) - stylesheetManager.adoptStyleSheets(document.adoptedStyleSheets, mirror.getId(document)); - }, "takeFullSnapshot"); - _takeFullSnapshot = takeFullSnapshot2; - try { - const handlers2 = []; - const observe2 = /* @__PURE__ */ __name((doc2) => { - return callbackWrapper$1(initObservers)({ - onMutation, - mutationCb: wrappedMutationEmit, - mousemoveCb: /* @__PURE__ */ __name((positions, source) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source, - positions - } - }), "mousemoveCb"), - mouseInteractionCb: /* @__PURE__ */ __name((d2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.MouseInteraction, - ...d2 - } - }), "mouseInteractionCb"), - scrollCb: wrappedScrollEmit, - viewportResizeCb: /* @__PURE__ */ __name((d2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.ViewportResize, - ...d2 - } - }), "viewportResizeCb"), - inputCb: /* @__PURE__ */ __name((v2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.Input, - ...v2 - } - }), "inputCb"), - mediaInteractionCb: /* @__PURE__ */ __name((p2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.MediaInteraction, - ...p2 - } - }), "mediaInteractionCb"), - styleSheetRuleCb: /* @__PURE__ */ __name((r2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.StyleSheetRule, - ...r2 - } - }), "styleSheetRuleCb"), - styleDeclarationCb: /* @__PURE__ */ __name((r2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.StyleDeclaration, - ...r2 - } - }), "styleDeclarationCb"), - canvasMutationCb: wrappedCanvasMutationEmit, - fontCb: /* @__PURE__ */ __name((p2) => wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.Font, - ...p2 - } - }), "fontCb"), - selectionCb: /* @__PURE__ */ __name((p2) => { - wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.Selection, - ...p2 - } - }); - }, "selectionCb"), - customElementCb: /* @__PURE__ */ __name((c2) => { - wrappedEmit({ - type: EventType.IncrementalSnapshot, - data: { - source: IncrementalSource.CustomElement, - ...c2 - } - }); - }, "customElementCb"), - blockClass, - ignoreClass, - ignoreSelector, - maskAllText, - maskTextClass, - unmaskTextClass, - maskTextSelector, - unmaskTextSelector, - maskInputOptions, - inlineStylesheet, - sampling, - recordDOM, - recordCanvas, - inlineImages, - userTriggeredOnInput, - collectFonts, - doc: doc2, - maskAttributeFn, - maskInputFn, - maskTextFn, - keepIframeSrcFn, - blockSelector, - unblockSelector, - slimDOMOptions, - dataURLOptions, - mirror, - iframeManager, - stylesheetManager, - shadowDomManager, - processedNodeManager, - canvasManager, - ignoreCSSAttributes, - plugins: _optionalChain([ - plugins, - "optionalAccess", - (_8) => _8.filter, - "call", - (_9) => _9((p2) => p2.observer), - "optionalAccess", - (_10) => _10.map, - "call", - (_11) => _11((p2) => ({ - observer: p2.observer, - options: p2.options, - callback: /* @__PURE__ */ __name((payload) => wrappedEmit({ - type: EventType.Plugin, - data: { - plugin: p2.name, - payload - } - }), "callback") - })) - ]) || [] - }, {}); - }, "observe"); - iframeManager.addLoadListener((iframeEl) => { - try { - handlers2.push(observe2(iframeEl.contentDocument)); - } catch (error2) { - console.warn(error2); - } - }); - const init3 = /* @__PURE__ */ __name(() => { - takeFullSnapshot2(); - handlers2.push(observe2(document)); - }, "init"); - if (document.readyState === "interactive" || document.readyState === "complete") { - init3(); - } else { - handlers2.push(on("DOMContentLoaded", () => { - wrappedEmit({ - type: EventType.DomContentLoaded, - data: {} - }); - if (recordAfter === "DOMContentLoaded") - init3(); - })); - handlers2.push(on("load", () => { - wrappedEmit({ - type: EventType.Load, - data: {} - }); - if (recordAfter === "load") - init3(); - }, window)); - } - return () => { - handlers2.forEach((h2) => h2()); - processedNodeManager.destroy(); - _takeFullSnapshot = void 0; - unregisterErrorHandler(); - }; - } catch (error2) { - console.warn(error2); - } -} -__name(record, "record"); -function takeFullSnapshot(isCheckout) { - if (!_takeFullSnapshot) { - throw new Error("please take full snapshot after start recording"); - } - _takeFullSnapshot(isCheckout); -} -__name(takeFullSnapshot, "takeFullSnapshot"); -record.mirror = mirror; -record.takeFullSnapshot = takeFullSnapshot; -function _getCanvasManager(getCanvasManagerFn, options4) { - try { - return getCanvasManagerFn ? getCanvasManagerFn(options4) : new CanvasManagerNoop(); - } catch (e2) { - console.warn("Unable to initialize CanvasManager"); - return new CanvasManagerNoop(); - } -} -__name(_getCanvasManager, "_getCanvasManager"); -const ReplayEventTypeIncrementalSnapshot = 3; -const ReplayEventTypeCustom = 5; -function timestampToMs(timestamp2) { - const isMs = timestamp2 > 9999999999; - return isMs ? timestamp2 : timestamp2 * 1e3; -} -__name(timestampToMs, "timestampToMs"); -function timestampToS(timestamp2) { - const isMs = timestamp2 > 9999999999; - return isMs ? timestamp2 / 1e3 : timestamp2; -} -__name(timestampToS, "timestampToS"); -function addBreadcrumbEvent(replay, breadcrumb) { - if (breadcrumb.category === "sentry.transaction") { - return; - } - if (["ui.click", "ui.input"].includes(breadcrumb.category)) { - replay.triggerUserActivity(); - } else { - replay.checkAndHandleExpiredSession(); - } - replay.addUpdate(() => { - replay.throttledAddEvent({ - type: EventType.Custom, - // TODO: We were converting from ms to seconds for breadcrumbs, spans, - // but maybe we should just keep them as milliseconds - timestamp: (breadcrumb.timestamp || 0) * 1e3, - data: { - tag: "breadcrumb", - // normalize to max. 10 depth and 1_000 properties per object - payload: normalize$2(breadcrumb, 10, 1e3) - } - }); - return breadcrumb.category === "console"; - }); -} -__name(addBreadcrumbEvent, "addBreadcrumbEvent"); -const INTERACTIVE_SELECTOR = "button,a"; -function getClosestInteractive(element) { - const closestInteractive = element.closest(INTERACTIVE_SELECTOR); - return closestInteractive || element; -} -__name(getClosestInteractive, "getClosestInteractive"); -function getClickTargetNode(event) { - const target = getTargetNode(event); - if (!target || !(target instanceof Element)) { - return target; - } - return getClosestInteractive(target); -} -__name(getClickTargetNode, "getClickTargetNode"); -function getTargetNode(event) { - if (isEventWithTarget(event)) { - return event.target; - } - return event; -} -__name(getTargetNode, "getTargetNode"); -function isEventWithTarget(event) { - return typeof event === "object" && !!event && "target" in event; -} -__name(isEventWithTarget, "isEventWithTarget"); -let handlers$2; -function onWindowOpen(cb) { - if (!handlers$2) { - handlers$2 = []; - monkeyPatchWindowOpen(); - } - handlers$2.push(cb); - return () => { - const pos2 = handlers$2 ? handlers$2.indexOf(cb) : -1; - if (pos2 > -1) { - handlers$2.splice(pos2, 1); - } - }; -} -__name(onWindowOpen, "onWindowOpen"); -function monkeyPatchWindowOpen() { - fill(WINDOW$1, "open", function(originalWindowOpen) { - return function(...args) { - if (handlers$2) { - try { - handlers$2.forEach((handler6) => handler6()); - } catch (e2) { - } - } - return originalWindowOpen.apply(WINDOW$1, args); - }; - }); -} -__name(monkeyPatchWindowOpen, "monkeyPatchWindowOpen"); -const IncrementalMutationSources = /* @__PURE__ */ new Set([ - IncrementalSource.Mutation, - IncrementalSource.StyleSheetRule, - IncrementalSource.StyleDeclaration, - IncrementalSource.AdoptedStyleSheet, - IncrementalSource.CanvasMutation, - IncrementalSource.Selection, - IncrementalSource.MediaInteraction -]); -function handleClick$1(clickDetector, clickBreadcrumb, node3) { - clickDetector.handleClick(clickBreadcrumb, node3); -} -__name(handleClick$1, "handleClick$1"); -class ClickDetector { - static { - __name(this, "ClickDetector"); - } - // protected for testing - constructor(replay, slowClickConfig, _addBreadcrumbEvent = addBreadcrumbEvent) { - this._lastMutation = 0; - this._lastScroll = 0; - this._clicks = []; - this._timeout = slowClickConfig.timeout / 1e3; - this._threshold = slowClickConfig.threshold / 1e3; - this._scrollTimeout = slowClickConfig.scrollTimeout / 1e3; - this._replay = replay; - this._ignoreSelector = slowClickConfig.ignoreSelector; - this._addBreadcrumbEvent = _addBreadcrumbEvent; - } - /** Register click detection handlers on mutation or scroll. */ - addListeners() { - const cleanupWindowOpen = onWindowOpen(() => { - this._lastMutation = nowInSeconds(); - }); - this._teardown = () => { - cleanupWindowOpen(); - this._clicks = []; - this._lastMutation = 0; - this._lastScroll = 0; - }; - } - /** Clean up listeners. */ - removeListeners() { - if (this._teardown) { - this._teardown(); - } - if (this._checkClickTimeout) { - clearTimeout(this._checkClickTimeout); - } - } - /** @inheritDoc */ - handleClick(breadcrumb, node3) { - if (ignoreElement(node3, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) { - return; - } - const newClick = { - timestamp: timestampToS(breadcrumb.timestamp), - clickBreadcrumb: breadcrumb, - // Set this to 0 so we know it originates from the click breadcrumb - clickCount: 0, - node: node3 - }; - if (this._clicks.some((click2) => click2.node === newClick.node && Math.abs(click2.timestamp - newClick.timestamp) < 1)) { - return; - } - this._clicks.push(newClick); - if (this._clicks.length === 1) { - this._scheduleCheckClicks(); - } - } - /** @inheritDoc */ - registerMutation(timestamp2 = Date.now()) { - this._lastMutation = timestampToS(timestamp2); - } - /** @inheritDoc */ - registerScroll(timestamp2 = Date.now()) { - this._lastScroll = timestampToS(timestamp2); - } - /** @inheritDoc */ - registerClick(element) { - const node3 = getClosestInteractive(element); - this._handleMultiClick(node3); - } - /** Count multiple clicks on elements. */ - _handleMultiClick(node3) { - this._getClicks(node3).forEach((click2) => { - click2.clickCount++; - }); - } - /** Get all pending clicks for a given node. */ - _getClicks(node3) { - return this._clicks.filter((click2) => click2.node === node3); - } - /** Check the clicks that happened. */ - _checkClicks() { - const timedOutClicks = []; - const now2 = nowInSeconds(); - this._clicks.forEach((click2) => { - if (!click2.mutationAfter && this._lastMutation) { - click2.mutationAfter = click2.timestamp <= this._lastMutation ? this._lastMutation - click2.timestamp : void 0; - } - if (!click2.scrollAfter && this._lastScroll) { - click2.scrollAfter = click2.timestamp <= this._lastScroll ? this._lastScroll - click2.timestamp : void 0; - } - if (click2.timestamp + this._timeout <= now2) { - timedOutClicks.push(click2); - } - }); - for (const click2 of timedOutClicks) { - const pos2 = this._clicks.indexOf(click2); - if (pos2 > -1) { - this._generateBreadcrumbs(click2); - this._clicks.splice(pos2, 1); - } - } - if (this._clicks.length) { - this._scheduleCheckClicks(); - } - } - /** Generate matching breadcrumb(s) for the click. */ - _generateBreadcrumbs(click2) { - const replay = this._replay; - const hadScroll = click2.scrollAfter && click2.scrollAfter <= this._scrollTimeout; - const hadMutation = click2.mutationAfter && click2.mutationAfter <= this._threshold; - const isSlowClick = !hadScroll && !hadMutation; - const { clickCount, clickBreadcrumb } = click2; - if (isSlowClick) { - const timeAfterClickMs = Math.min(click2.mutationAfter || this._timeout, this._timeout) * 1e3; - const endReason = timeAfterClickMs < this._timeout * 1e3 ? "mutation" : "timeout"; - const breadcrumb = { - type: "default", - message: clickBreadcrumb.message, - timestamp: clickBreadcrumb.timestamp, - category: "ui.slowClickDetected", - data: { - ...clickBreadcrumb.data, - url: WINDOW$1.location.href, - route: replay.getCurrentRoute(), - timeAfterClickMs, - endReason, - // If clickCount === 0, it means multiClick was not correctly captured here - // - we still want to send 1 in this case - clickCount: clickCount || 1 - } - }; - this._addBreadcrumbEvent(replay, breadcrumb); - return; - } - if (clickCount > 1) { - const breadcrumb = { - type: "default", - message: clickBreadcrumb.message, - timestamp: clickBreadcrumb.timestamp, - category: "ui.multiClick", - data: { - ...clickBreadcrumb.data, - url: WINDOW$1.location.href, - route: replay.getCurrentRoute(), - clickCount, - metric: true - } - }; - this._addBreadcrumbEvent(replay, breadcrumb); - } - } - /** Schedule to check current clicks. */ - _scheduleCheckClicks() { - if (this._checkClickTimeout) { - clearTimeout(this._checkClickTimeout); - } - this._checkClickTimeout = setTimeout$3(() => this._checkClicks(), 1e3); - } -} -const SLOW_CLICK_TAGS = ["A", "BUTTON", "INPUT"]; -function ignoreElement(node3, ignoreSelector) { - if (!SLOW_CLICK_TAGS.includes(node3.tagName)) { - return true; - } - if (node3.tagName === "INPUT" && !["submit", "button"].includes(node3.getAttribute("type") || "")) { - return true; - } - if (node3.tagName === "A" && (node3.hasAttribute("download") || node3.hasAttribute("target") && node3.getAttribute("target") !== "_self")) { - return true; - } - if (ignoreSelector && node3.matches(ignoreSelector)) { - return true; - } - return false; -} -__name(ignoreElement, "ignoreElement"); -function isClickBreadcrumb(breadcrumb) { - return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === "number" && breadcrumb.timestamp); -} -__name(isClickBreadcrumb, "isClickBreadcrumb"); -function nowInSeconds() { - return Date.now() / 1e3; -} -__name(nowInSeconds, "nowInSeconds"); -function updateClickDetectorForRecordingEvent(clickDetector, event) { - try { - if (!isIncrementalEvent(event)) { - return; - } - const { source } = event.data; - if (IncrementalMutationSources.has(source)) { - clickDetector.registerMutation(event.timestamp); - } - if (source === IncrementalSource.Scroll) { - clickDetector.registerScroll(event.timestamp); - } - if (isIncrementalMouseInteraction(event)) { - const { type, id: id3 } = event.data; - const node3 = record.mirror.getNode(id3); - if (node3 instanceof HTMLElement && type === MouseInteractions.Click) { - clickDetector.registerClick(node3); - } - } - } catch (e2) { - } -} -__name(updateClickDetectorForRecordingEvent, "updateClickDetectorForRecordingEvent"); -function isIncrementalEvent(event) { - return event.type === ReplayEventTypeIncrementalSnapshot; -} -__name(isIncrementalEvent, "isIncrementalEvent"); -function isIncrementalMouseInteraction(event) { - return event.data.source === IncrementalSource.MouseInteraction; -} -__name(isIncrementalMouseInteraction, "isIncrementalMouseInteraction"); -function createBreadcrumb(breadcrumb) { - return { - timestamp: Date.now() / 1e3, - type: "default", - ...breadcrumb - }; -} -__name(createBreadcrumb, "createBreadcrumb"); -var NodeType$4; -(function(NodeType3) { - NodeType3[NodeType3["Document"] = 0] = "Document"; - NodeType3[NodeType3["DocumentType"] = 1] = "DocumentType"; - NodeType3[NodeType3["Element"] = 2] = "Element"; - NodeType3[NodeType3["Text"] = 3] = "Text"; - NodeType3[NodeType3["CDATA"] = 4] = "CDATA"; - NodeType3[NodeType3["Comment"] = 5] = "Comment"; -})(NodeType$4 || (NodeType$4 = {})); -const ATTRIBUTES_TO_RECORD = /* @__PURE__ */ new Set([ - "id", - "class", - "aria-label", - "role", - "name", - "alt", - "title", - "data-test-id", - "data-testid", - "disabled", - "aria-disabled", - "data-sentry-component" -]); -function getAttributesToRecord(attributes) { - const obj = {}; - if (!attributes["data-sentry-component"] && attributes["data-sentry-element"]) { - attributes["data-sentry-component"] = attributes["data-sentry-element"]; - } - for (const key in attributes) { - if (ATTRIBUTES_TO_RECORD.has(key)) { - let normalizedKey = key; - if (key === "data-testid" || key === "data-test-id") { - normalizedKey = "testId"; - } - obj[normalizedKey] = attributes[key]; - } - } - return obj; -} -__name(getAttributesToRecord, "getAttributesToRecord"); -const handleDomListener = /* @__PURE__ */ __name((replay) => { - return (handlerData) => { - if (!replay.isEnabled()) { - return; - } - const result = handleDom(handlerData); - if (!result) { - return; - } - const isClick = handlerData.name === "click"; - const event = isClick ? handlerData.event : void 0; - if (isClick && replay.clickDetector && event && event.target && !event.altKey && !event.metaKey && !event.ctrlKey && !event.shiftKey) { - handleClick$1( - replay.clickDetector, - result, - getClickTargetNode(handlerData.event) - ); - } - addBreadcrumbEvent(replay, result); - }; -}, "handleDomListener"); -function getBaseDomBreadcrumb(target, message3) { - const nodeId = record.mirror.getId(target); - const node3 = nodeId && record.mirror.getNode(nodeId); - const meta = node3 && record.mirror.getMeta(node3); - const element = meta && isElement$2(meta) ? meta : null; - return { - message: message3, - data: element ? { - nodeId, - node: { - id: nodeId, - tagName: element.tagName, - textContent: Array.from(element.childNodes).map((node4) => node4.type === NodeType$4.Text && node4.textContent).filter(Boolean).map((text2) => text2.trim()).join(""), - attributes: getAttributesToRecord(element.attributes) - } - } : {} - }; -} -__name(getBaseDomBreadcrumb, "getBaseDomBreadcrumb"); -function handleDom(handlerData) { - const { target, message: message3 } = getDomTarget(handlerData); - return createBreadcrumb({ - category: `ui.${handlerData.name}`, - ...getBaseDomBreadcrumb(target, message3) - }); -} -__name(handleDom, "handleDom"); -function getDomTarget(handlerData) { - const isClick = handlerData.name === "click"; - let message3; - let target = null; - try { - target = isClick ? getClickTargetNode(handlerData.event) : getTargetNode(handlerData.event); - message3 = htmlTreeAsString(target, { maxStringLength: 200 }) || ""; - } catch (e2) { - message3 = ""; - } - return { target, message: message3 }; -} -__name(getDomTarget, "getDomTarget"); -function isElement$2(node3) { - return node3.type === NodeType$4.Element; -} -__name(isElement$2, "isElement$2"); -function handleKeyboardEvent(replay, event) { - if (!replay.isEnabled()) { - return; - } - replay.updateUserActivity(); - const breadcrumb = getKeyboardBreadcrumb(event); - if (!breadcrumb) { - return; - } - addBreadcrumbEvent(replay, breadcrumb); -} -__name(handleKeyboardEvent, "handleKeyboardEvent"); -function getKeyboardBreadcrumb(event) { - const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event; - if (!target || isInputElement(target) || !key) { - return null; - } - const hasModifierKey = metaKey || ctrlKey || altKey; - const isCharacterKey = key.length === 1; - if (!hasModifierKey && isCharacterKey) { - return null; - } - const message3 = htmlTreeAsString(target, { maxStringLength: 200 }) || ""; - const baseBreadcrumb = getBaseDomBreadcrumb(target, message3); - return createBreadcrumb({ - category: "ui.keyDown", - message: message3, - data: { - ...baseBreadcrumb.data, - metaKey, - shiftKey, - ctrlKey, - altKey, - key - } - }); -} -__name(getKeyboardBreadcrumb, "getKeyboardBreadcrumb"); -function isInputElement(target) { - return target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.isContentEditable; -} -__name(isInputElement, "isInputElement"); -const ENTRY_TYPES = { - // @ts-expect-error TODO: entry type does not fit the create* functions entry type - resource: createResourceEntry, - paint: createPaintEntry, - // @ts-expect-error TODO: entry type does not fit the create* functions entry type - navigation: createNavigationEntry -}; -function webVitalHandler(getter, replay) { - return ({ metric }) => void replay.replayPerformanceEntries.push(getter(metric)); -} -__name(webVitalHandler, "webVitalHandler"); -function createPerformanceEntries(entries) { - return entries.map(createPerformanceEntry).filter(Boolean); -} -__name(createPerformanceEntries, "createPerformanceEntries"); -function createPerformanceEntry(entry) { - const entryType = ENTRY_TYPES[entry.entryType]; - if (!entryType) { - return null; - } - return entryType(entry); -} -__name(createPerformanceEntry, "createPerformanceEntry"); -function getAbsoluteTime$1(time) { - return ((browserPerformanceTimeOrigin || WINDOW$1.performance.timeOrigin) + time) / 1e3; -} -__name(getAbsoluteTime$1, "getAbsoluteTime$1"); -function createPaintEntry(entry) { - const { duration, entryType, name: name2, startTime } = entry; - const start2 = getAbsoluteTime$1(startTime); - return { - type: entryType, - name: name2, - start: start2, - end: start2 + duration, - data: void 0 - }; -} -__name(createPaintEntry, "createPaintEntry"); -function createNavigationEntry(entry) { - const { - entryType, - name: name2, - decodedBodySize, - duration, - domComplete, - encodedBodySize, - domContentLoadedEventStart, - domContentLoadedEventEnd, - domInteractive, - loadEventStart, - loadEventEnd, - redirectCount, - startTime, - transferSize, - type - } = entry; - if (duration === 0) { - return null; - } - return { - type: `${entryType}.${type}`, - start: getAbsoluteTime$1(startTime), - end: getAbsoluteTime$1(domComplete), - name: name2, - data: { - size: transferSize, - decodedBodySize, - encodedBodySize, - duration, - domInteractive, - domContentLoadedEventStart, - domContentLoadedEventEnd, - loadEventStart, - loadEventEnd, - domComplete, - redirectCount - } - }; -} -__name(createNavigationEntry, "createNavigationEntry"); -function createResourceEntry(entry) { - const { - entryType, - initiatorType, - name: name2, - responseEnd, - startTime, - decodedBodySize, - encodedBodySize, - responseStatus, - transferSize - } = entry; - if (["fetch", "xmlhttprequest"].includes(initiatorType)) { - return null; - } - return { - type: `${entryType}.${initiatorType}`, - start: getAbsoluteTime$1(startTime), - end: getAbsoluteTime$1(responseEnd), - name: name2, - data: { - size: transferSize, - statusCode: responseStatus, - decodedBodySize, - encodedBodySize - } - }; -} -__name(createResourceEntry, "createResourceEntry"); -function getLargestContentfulPaint(metric) { - const lastEntry = metric.entries[metric.entries.length - 1]; - const node3 = lastEntry && lastEntry.element ? [lastEntry.element] : void 0; - return getWebVital(metric, "largest-contentful-paint", node3); -} -__name(getLargestContentfulPaint, "getLargestContentfulPaint"); -function isLayoutShift(entry) { - return entry.sources !== void 0; -} -__name(isLayoutShift, "isLayoutShift"); -function getCumulativeLayoutShift(metric) { - const layoutShifts = []; - const nodes = []; - for (const entry of metric.entries) { - if (isLayoutShift(entry)) { - const nodeIds = []; - for (const source of entry.sources) { - if (source.node) { - nodes.push(source.node); - const nodeId = record.mirror.getId(source.node); - if (nodeId) { - nodeIds.push(nodeId); - } - } - } - layoutShifts.push({ value: entry.value, nodeIds: nodeIds.length ? nodeIds : void 0 }); - } - } - return getWebVital(metric, "cumulative-layout-shift", nodes, layoutShifts); -} -__name(getCumulativeLayoutShift, "getCumulativeLayoutShift"); -function getFirstInputDelay(metric) { - const lastEntry = metric.entries[metric.entries.length - 1]; - const node3 = lastEntry && lastEntry.target ? [lastEntry.target] : void 0; - return getWebVital(metric, "first-input-delay", node3); -} -__name(getFirstInputDelay, "getFirstInputDelay"); -function getInteractionToNextPaint(metric) { - const lastEntry = metric.entries[metric.entries.length - 1]; - const node3 = lastEntry && lastEntry.target ? [lastEntry.target] : void 0; - return getWebVital(metric, "interaction-to-next-paint", node3); -} -__name(getInteractionToNextPaint, "getInteractionToNextPaint"); -function getWebVital(metric, name2, nodes, attributions) { - const value4 = metric.value; - const rating = metric.rating; - const end = getAbsoluteTime$1(value4); - return { - type: "web-vital", - name: name2, - start: end, - end, - data: { - value: value4, - size: value4, - rating, - nodeIds: nodes ? nodes.map((node3) => record.mirror.getId(node3)) : void 0, - attributions - } - }; -} -__name(getWebVital, "getWebVital"); -function setupPerformanceObserver(replay) { - function addPerformanceEntry(entry) { - if (!replay.performanceEntries.includes(entry)) { - replay.performanceEntries.push(entry); - } - } - __name(addPerformanceEntry, "addPerformanceEntry"); - function onEntries({ entries }) { - entries.forEach(addPerformanceEntry); - } - __name(onEntries, "onEntries"); - const clearCallbacks = []; - ["navigation", "paint", "resource"].forEach((type) => { - clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries)); - }); - clearCallbacks.push( - addLcpInstrumentationHandler(webVitalHandler(getLargestContentfulPaint, replay)), - addClsInstrumentationHandler(webVitalHandler(getCumulativeLayoutShift, replay)), - addFidInstrumentationHandler(webVitalHandler(getFirstInputDelay, replay)), - addInpInstrumentationHandler(webVitalHandler(getInteractionToNextPaint, replay)) - ); - return () => { - clearCallbacks.forEach((clearCallback) => clearCallback()); - }; -} -__name(setupPerformanceObserver, "setupPerformanceObserver"); -const DEBUG_BUILD$2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; -const r$3 = `var t=Uint8Array,n=Uint16Array,r=Int32Array,e=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]),i=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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a>h]=l}else for(o=new n(i),a=0;a>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["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"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;ad&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;oi.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});`; -function e$1() { - const e2 = new Blob([r$3]); - return URL.createObjectURL(e2); -} -__name(e$1, "e$1"); -const CONSOLE_LEVELS = ["info", "warn", "error", "log"]; -const PREFIX$1 = "[Replay] "; -function _addBreadcrumb(message3, level = "info") { - addBreadcrumb( - { - category: "console", - data: { - logger: "replay" - }, - level, - message: `${PREFIX$1}${message3}` - }, - { level } - ); -} -__name(_addBreadcrumb, "_addBreadcrumb"); -function makeReplayLogger() { - let _capture = false; - let _trace = false; - const _logger = { - exception: /* @__PURE__ */ __name(() => void 0, "exception"), - infoTick: /* @__PURE__ */ __name(() => void 0, "infoTick"), - setConfig: /* @__PURE__ */ __name((opts) => { - _capture = opts.captureExceptions; - _trace = opts.traceInternals; - }, "setConfig") - }; - if (DEBUG_BUILD$2) { - CONSOLE_LEVELS.forEach((name2) => { - _logger[name2] = (...args) => { - logger$2[name2](PREFIX$1, ...args); - if (_trace) { - _addBreadcrumb(args.join(""), severityLevelFromString(name2)); - } - }; - }); - _logger.exception = (error2, ...message3) => { - if (message3.length && _logger.error) { - _logger.error(...message3); - } - logger$2.error(PREFIX$1, error2); - if (_capture) { - captureException(error2); - } else if (_trace) { - _addBreadcrumb(error2, "error"); - } - }; - _logger.infoTick = (...args) => { - logger$2.info(PREFIX$1, ...args); - if (_trace) { - setTimeout(() => _addBreadcrumb(args[0]), 0); - } - }; - } else { - CONSOLE_LEVELS.forEach((name2) => { - _logger[name2] = () => void 0; - }); - } - return _logger; -} -__name(makeReplayLogger, "makeReplayLogger"); -const logger$1 = makeReplayLogger(); -class EventBufferSizeExceededError extends Error { - static { - __name(this, "EventBufferSizeExceededError"); - } - constructor() { - super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`); - } -} -class EventBufferArray { - static { - __name(this, "EventBufferArray"); - } - /** All the events that are buffered to be sent. */ - /** @inheritdoc */ - /** @inheritdoc */ - constructor() { - this.events = []; - this._totalSize = 0; - this.hasCheckout = false; - this.waitForCheckout = false; - } - /** @inheritdoc */ - get hasEvents() { - return this.events.length > 0; - } - /** @inheritdoc */ - get type() { - return "sync"; - } - /** @inheritdoc */ - destroy() { - this.events = []; - } - /** @inheritdoc */ - async addEvent(event) { - const eventSize = JSON.stringify(event).length; - this._totalSize += eventSize; - if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) { - throw new EventBufferSizeExceededError(); - } - this.events.push(event); - } - /** @inheritdoc */ - finish() { - return new Promise((resolve2) => { - const eventsRet = this.events; - this.clear(); - resolve2(JSON.stringify(eventsRet)); - }); - } - /** @inheritdoc */ - clear() { - this.events = []; - this._totalSize = 0; - this.hasCheckout = false; - } - /** @inheritdoc */ - getEarliestTimestamp() { - const timestamp2 = this.events.map((event) => event.timestamp).sort()[0]; - if (!timestamp2) { - return null; - } - return timestampToMs(timestamp2); - } -} -class WorkerHandler { - static { - __name(this, "WorkerHandler"); - } - constructor(worker) { - this._worker = worker; - this._id = 0; - } - /** - * Ensure the worker is ready (or not). - * This will either resolve when the worker is ready, or reject if an error occurred. - */ - ensureReady() { - if (this._ensureReadyPromise) { - return this._ensureReadyPromise; - } - this._ensureReadyPromise = new Promise((resolve2, reject3) => { - this._worker.addEventListener( - "message", - ({ data: data25 }) => { - if (data25.success) { - resolve2(); - } else { - reject3(); - } - }, - { once: true } - ); - this._worker.addEventListener( - "error", - (error2) => { - reject3(error2); - }, - { once: true } - ); - }); - return this._ensureReadyPromise; - } - /** - * Destroy the worker. - */ - destroy() { - DEBUG_BUILD$2 && logger$1.info("Destroying compression worker"); - this._worker.terminate(); - } - /** - * Post message to worker and wait for response before resolving promise. - */ - postMessage(method, arg) { - const id3 = this._getAndIncrementId(); - return new Promise((resolve2, reject3) => { - const listener = /* @__PURE__ */ __name(({ data: data25 }) => { - const response = data25; - if (response.method !== method) { - return; - } - if (response.id !== id3) { - return; - } - this._worker.removeEventListener("message", listener); - if (!response.success) { - DEBUG_BUILD$2 && logger$1.error("Error in compression worker: ", response.response); - reject3(new Error("Error in compression worker")); - return; - } - resolve2(response.response); - }, "listener"); - this._worker.addEventListener("message", listener); - this._worker.postMessage({ id: id3, method, arg }); - }); - } - /** Get the current ID and increment it for the next call. */ - _getAndIncrementId() { - return this._id++; - } -} -class EventBufferCompressionWorker { - static { - __name(this, "EventBufferCompressionWorker"); - } - /** @inheritdoc */ - /** @inheritdoc */ - constructor(worker) { - this._worker = new WorkerHandler(worker); - this._earliestTimestamp = null; - this._totalSize = 0; - this.hasCheckout = false; - this.waitForCheckout = false; - } - /** @inheritdoc */ - get hasEvents() { - return !!this._earliestTimestamp; - } - /** @inheritdoc */ - get type() { - return "worker"; - } - /** - * Ensure the worker is ready (or not). - * This will either resolve when the worker is ready, or reject if an error occurred. - */ - ensureReady() { - return this._worker.ensureReady(); - } - /** - * Destroy the event buffer. - */ - destroy() { - this._worker.destroy(); - } - /** - * Add an event to the event buffer. - * - * Returns true if event was successfully received and processed by worker. - */ - addEvent(event) { - const timestamp2 = timestampToMs(event.timestamp); - if (!this._earliestTimestamp || timestamp2 < this._earliestTimestamp) { - this._earliestTimestamp = timestamp2; - } - const data25 = JSON.stringify(event); - this._totalSize += data25.length; - if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) { - return Promise.reject(new EventBufferSizeExceededError()); - } - return this._sendEventToWorker(data25); - } - /** - * Finish the event buffer and return the compressed data. - */ - finish() { - return this._finishRequest(); - } - /** @inheritdoc */ - clear() { - this._earliestTimestamp = null; - this._totalSize = 0; - this.hasCheckout = false; - this._worker.postMessage("clear").then(null, (e2) => { - DEBUG_BUILD$2 && logger$1.exception(e2, 'Sending "clear" message to worker failed', e2); - }); - } - /** @inheritdoc */ - getEarliestTimestamp() { - return this._earliestTimestamp; - } - /** - * Send the event to the worker. - */ - _sendEventToWorker(data25) { - return this._worker.postMessage("addEvent", data25); - } - /** - * Finish the request and return the compressed data from the worker. - */ - async _finishRequest() { - const response = await this._worker.postMessage("finish"); - this._earliestTimestamp = null; - this._totalSize = 0; - return response; - } -} -class EventBufferProxy { - static { - __name(this, "EventBufferProxy"); - } - constructor(worker) { - this._fallback = new EventBufferArray(); - this._compression = new EventBufferCompressionWorker(worker); - this._used = this._fallback; - this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded(); - } - /** @inheritdoc */ - get waitForCheckout() { - return this._used.waitForCheckout; - } - /** @inheritdoc */ - get type() { - return this._used.type; - } - /** @inheritDoc */ - get hasEvents() { - return this._used.hasEvents; - } - /** @inheritdoc */ - get hasCheckout() { - return this._used.hasCheckout; - } - /** @inheritdoc */ - set hasCheckout(value4) { - this._used.hasCheckout = value4; - } - /** @inheritdoc */ - // eslint-disable-next-line @typescript-eslint/adjacent-overload-signatures - set waitForCheckout(value4) { - this._used.waitForCheckout = value4; - } - /** @inheritDoc */ - destroy() { - this._fallback.destroy(); - this._compression.destroy(); - } - /** @inheritdoc */ - clear() { - return this._used.clear(); - } - /** @inheritdoc */ - getEarliestTimestamp() { - return this._used.getEarliestTimestamp(); - } - /** - * Add an event to the event buffer. - * - * Returns true if event was successfully added. - */ - addEvent(event) { - return this._used.addEvent(event); - } - /** @inheritDoc */ - async finish() { - await this.ensureWorkerIsLoaded(); - return this._used.finish(); - } - /** Ensure the worker has loaded. */ - ensureWorkerIsLoaded() { - return this._ensureWorkerIsLoadedPromise; - } - /** Actually check if the worker has been loaded. */ - async _ensureWorkerIsLoaded() { - try { - await this._compression.ensureReady(); - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to load the compression worker, falling back to simple buffer"); - return; - } - await this._switchToCompressionWorker(); - } - /** Switch the used buffer to the compression worker. */ - async _switchToCompressionWorker() { - const { events: events2, hasCheckout, waitForCheckout } = this._fallback; - const addEventPromises = []; - for (const event of events2) { - addEventPromises.push(this._compression.addEvent(event)); - } - this._compression.hasCheckout = hasCheckout; - this._compression.waitForCheckout = waitForCheckout; - this._used = this._compression; - try { - await Promise.all(addEventPromises); - this._fallback.clear(); - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to add events when switching buffers."); - } - } -} -function createEventBuffer({ - useCompression, - workerUrl: customWorkerUrl -}) { - if (useCompression && // eslint-disable-next-line no-restricted-globals - window.Worker) { - const worker = _loadWorker(customWorkerUrl); - if (worker) { - return worker; - } - } - DEBUG_BUILD$2 && logger$1.info("Using simple buffer"); - return new EventBufferArray(); -} -__name(createEventBuffer, "createEventBuffer"); -function _loadWorker(customWorkerUrl) { - try { - const workerUrl = customWorkerUrl || _getWorkerUrl(); - if (!workerUrl) { - return; - } - DEBUG_BUILD$2 && logger$1.info(`Using compression worker${customWorkerUrl ? ` from ${customWorkerUrl}` : ""}`); - const worker = new Worker(workerUrl); - return new EventBufferProxy(worker); - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to create compression worker"); - } -} -__name(_loadWorker, "_loadWorker"); -function _getWorkerUrl() { - if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === "undefined" || !__SENTRY_EXCLUDE_REPLAY_WORKER__) { - return e$1(); - } - return ""; -} -__name(_getWorkerUrl, "_getWorkerUrl"); -function hasSessionStorage() { - try { - return "sessionStorage" in WINDOW$1 && !!WINDOW$1.sessionStorage; - } catch (e2) { - return false; - } -} -__name(hasSessionStorage, "hasSessionStorage"); -function clearSession(replay) { - deleteSession(); - replay.session = void 0; -} -__name(clearSession, "clearSession"); -function deleteSession() { - if (!hasSessionStorage()) { - return; - } - try { - WINDOW$1.sessionStorage.removeItem(REPLAY_SESSION_KEY); - } catch (e2) { - } -} -__name(deleteSession, "deleteSession"); -function isSampled(sampleRate) { - if (sampleRate === void 0) { - return false; - } - return Math.random() < sampleRate; -} -__name(isSampled, "isSampled"); -function makeSession(session) { - const now2 = Date.now(); - const id3 = session.id || uuid4(); - const started = session.started || now2; - const lastActivity = session.lastActivity || now2; - const segmentId = session.segmentId || 0; - const sampled = session.sampled; - const previousSessionId = session.previousSessionId; - return { - id: id3, - started, - lastActivity, - segmentId, - sampled, - previousSessionId - }; -} -__name(makeSession, "makeSession"); -function saveSession(session) { - if (!hasSessionStorage()) { - return; - } - try { - WINDOW$1.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session)); - } catch (e2) { - } -} -__name(saveSession, "saveSession"); -function getSessionSampleType(sessionSampleRate, allowBuffering) { - return isSampled(sessionSampleRate) ? "session" : allowBuffering ? "buffer" : false; -} -__name(getSessionSampleType, "getSessionSampleType"); -function createSession({ sessionSampleRate, allowBuffering, stickySession = false }, { previousSessionId } = {}) { - const sampled = getSessionSampleType(sessionSampleRate, allowBuffering); - const session = makeSession({ - sampled, - previousSessionId - }); - if (stickySession) { - saveSession(session); - } - return session; -} -__name(createSession, "createSession"); -function fetchSession() { - if (!hasSessionStorage()) { - return null; - } - try { - const sessionStringFromStorage = WINDOW$1.sessionStorage.getItem(REPLAY_SESSION_KEY); - if (!sessionStringFromStorage) { - return null; - } - const sessionObj = JSON.parse(sessionStringFromStorage); - DEBUG_BUILD$2 && logger$1.infoTick("Loading existing session"); - return makeSession(sessionObj); - } catch (e2) { - return null; - } -} -__name(fetchSession, "fetchSession"); -function isExpired(initialTime, expiry, targetTime = +/* @__PURE__ */ new Date()) { - if (initialTime === null || expiry === void 0 || expiry < 0) { - return true; - } - if (expiry === 0) { - return false; - } - return initialTime + expiry <= targetTime; -} -__name(isExpired, "isExpired"); -function isSessionExpired(session, { - maxReplayDuration, - sessionIdleExpire, - targetTime = Date.now() -}) { - return ( - // First, check that maximum session length has not been exceeded - isExpired(session.started, maxReplayDuration, targetTime) || // check that the idle timeout has not been exceeded (i.e. user has - // performed an action within the last `sessionIdleExpire` ms) - isExpired(session.lastActivity, sessionIdleExpire, targetTime) - ); -} -__name(isSessionExpired, "isSessionExpired"); -function shouldRefreshSession(session, { sessionIdleExpire, maxReplayDuration }) { - if (!isSessionExpired(session, { sessionIdleExpire, maxReplayDuration })) { - return false; - } - if (session.sampled === "buffer" && session.segmentId === 0) { - return false; - } - return true; -} -__name(shouldRefreshSession, "shouldRefreshSession"); -function loadOrCreateSession({ - sessionIdleExpire, - maxReplayDuration, - previousSessionId -}, sessionOptions) { - const existingSession = sessionOptions.stickySession && fetchSession(); - if (!existingSession) { - DEBUG_BUILD$2 && logger$1.infoTick("Creating new session"); - return createSession(sessionOptions, { previousSessionId }); - } - if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) { - return existingSession; - } - DEBUG_BUILD$2 && logger$1.infoTick("Session in sessionStorage is expired, creating new one..."); - return createSession(sessionOptions, { previousSessionId: existingSession.id }); -} -__name(loadOrCreateSession, "loadOrCreateSession"); -function isCustomEvent(event) { - return event.type === EventType.Custom; -} -__name(isCustomEvent, "isCustomEvent"); -function addEventSync(replay, event, isCheckout) { - if (!shouldAddEvent(replay, event)) { - return false; - } - _addEvent(replay, event, isCheckout); - return true; -} -__name(addEventSync, "addEventSync"); -function addEvent(replay, event, isCheckout) { - if (!shouldAddEvent(replay, event)) { - return Promise.resolve(null); - } - return _addEvent(replay, event, isCheckout); -} -__name(addEvent, "addEvent"); -async function _addEvent(replay, event, isCheckout) { - const { eventBuffer } = replay; - if (!eventBuffer || eventBuffer.waitForCheckout && !isCheckout) { - return null; - } - const isBufferMode = replay.recordingMode === "buffer"; - try { - if (isCheckout && isBufferMode) { - eventBuffer.clear(); - } - if (isCheckout) { - eventBuffer.hasCheckout = true; - eventBuffer.waitForCheckout = false; - } - const replayOptions = replay.getOptions(); - const eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent); - if (!eventAfterPossibleCallback) { - return; - } - return await eventBuffer.addEvent(eventAfterPossibleCallback); - } catch (error2) { - const isExceeded = error2 && error2 instanceof EventBufferSizeExceededError; - const reason = isExceeded ? "addEventSizeExceeded" : "addEvent"; - if (isExceeded && isBufferMode) { - eventBuffer.clear(); - eventBuffer.waitForCheckout = true; - return null; - } - replay.handleException(error2); - await replay.stop({ reason }); - const client = getClient(); - if (client) { - client.recordDroppedEvent("internal_sdk_error", "replay"); - } - } -} -__name(_addEvent, "_addEvent"); -function shouldAddEvent(replay, event) { - if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) { - return false; - } - const timestampInMs = timestampToMs(event.timestamp); - if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) { - return false; - } - if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) { - DEBUG_BUILD$2 && logger$1.infoTick(`Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`); - return false; - } - return true; -} -__name(shouldAddEvent, "shouldAddEvent"); -function maybeApplyCallback(event, callback) { - try { - if (typeof callback === "function" && isCustomEvent(event)) { - return callback(event); - } - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."); - return null; - } - return event; -} -__name(maybeApplyCallback, "maybeApplyCallback"); -function isErrorEvent(event) { - return !event.type; -} -__name(isErrorEvent, "isErrorEvent"); -function isTransactionEvent(event) { - return event.type === "transaction"; -} -__name(isTransactionEvent, "isTransactionEvent"); -function isReplayEvent(event) { - return event.type === "replay_event"; -} -__name(isReplayEvent, "isReplayEvent"); -function isFeedbackEvent(event) { - return event.type === "feedback"; -} -__name(isFeedbackEvent, "isFeedbackEvent"); -function handleAfterSendEvent(replay) { - return (event, sendResponse) => { - if (!replay.isEnabled() || !isErrorEvent(event) && !isTransactionEvent(event)) { - return; - } - const statusCode = sendResponse && sendResponse.statusCode; - if (!statusCode || statusCode < 200 || statusCode >= 300) { - return; - } - if (isTransactionEvent(event)) { - handleTransactionEvent(replay, event); - return; - } - handleErrorEvent(replay, event); - }; -} -__name(handleAfterSendEvent, "handleAfterSendEvent"); -function handleTransactionEvent(replay, event) { - const replayContext = replay.getContext(); - if (event.contexts && event.contexts.trace && event.contexts.trace.trace_id && replayContext.traceIds.size < 100) { - replayContext.traceIds.add(event.contexts.trace.trace_id); - } -} -__name(handleTransactionEvent, "handleTransactionEvent"); -function handleErrorEvent(replay, event) { - const replayContext = replay.getContext(); - if (event.event_id && replayContext.errorIds.size < 100) { - replayContext.errorIds.add(event.event_id); - } - if (replay.recordingMode !== "buffer" || !event.tags || !event.tags.replayId) { - return; - } - const { beforeErrorSampling } = replay.getOptions(); - if (typeof beforeErrorSampling === "function" && !beforeErrorSampling(event)) { - return; - } - setTimeout$3(async () => { - try { - await replay.sendBufferedReplayOrFlush(); - } catch (err) { - replay.handleException(err); - } - }); -} -__name(handleErrorEvent, "handleErrorEvent"); -function handleBeforeSendEvent(replay) { - return (event) => { - if (!replay.isEnabled() || !isErrorEvent(event)) { - return; - } - handleHydrationError(replay, event); - }; -} -__name(handleBeforeSendEvent, "handleBeforeSendEvent"); -function handleHydrationError(replay, event) { - const exceptionValue = event.exception && event.exception.values && event.exception.values[0] && event.exception.values[0].value; - if (typeof exceptionValue !== "string") { - return; - } - if ( - // Only matches errors in production builds of react-dom - // Example https://reactjs.org/docs/error-decoder.html?invariant=423 - // With newer React versions, the messages changed to a different website https://react.dev/errors/418 - exceptionValue.match( - /(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/ - ) || // Development builds of react-dom - // Error 1: Hydration failed because the initial UI does not match what was rendered on the server. - // Error 2: Text content does not match server-rendered HTML. Warning: Text content did not match. - exceptionValue.match(/(does not match server-rendered HTML|Hydration failed because)/i) - ) { - const breadcrumb = createBreadcrumb({ - category: "replay.hydrate-error", - data: { - url: getLocationHref() - } - }); - addBreadcrumbEvent(replay, breadcrumb); - } -} -__name(handleHydrationError, "handleHydrationError"); -function handleBreadcrumbs(replay) { - const client = getClient(); - if (!client) { - return; - } - client.on("beforeAddBreadcrumb", (breadcrumb) => beforeAddBreadcrumb(replay, breadcrumb)); -} -__name(handleBreadcrumbs, "handleBreadcrumbs"); -function beforeAddBreadcrumb(replay, breadcrumb) { - if (!replay.isEnabled() || !isBreadcrumbWithCategory(breadcrumb)) { - return; - } - const result = normalizeBreadcrumb(breadcrumb); - if (result) { - addBreadcrumbEvent(replay, result); - } -} -__name(beforeAddBreadcrumb, "beforeAddBreadcrumb"); -function normalizeBreadcrumb(breadcrumb) { - if (!isBreadcrumbWithCategory(breadcrumb) || [ - // fetch & xhr are handled separately,in handleNetworkBreadcrumbs - "fetch", - "xhr", - // These two are breadcrumbs for emitted sentry events, we don't care about them - "sentry.event", - "sentry.transaction" - ].includes(breadcrumb.category) || // We capture UI breadcrumbs separately - breadcrumb.category.startsWith("ui.")) { - return null; - } - if (breadcrumb.category === "console") { - return normalizeConsoleBreadcrumb(breadcrumb); - } - return createBreadcrumb(breadcrumb); -} -__name(normalizeBreadcrumb, "normalizeBreadcrumb"); -function normalizeConsoleBreadcrumb(breadcrumb) { - const args = breadcrumb.data && breadcrumb.data.arguments; - if (!Array.isArray(args) || args.length === 0) { - return createBreadcrumb(breadcrumb); - } - let isTruncated = false; - const normalizedArgs = args.map((arg) => { - if (!arg) { - return arg; - } - if (typeof arg === "string") { - if (arg.length > CONSOLE_ARG_MAX_SIZE) { - isTruncated = true; - return `${arg.slice(0, CONSOLE_ARG_MAX_SIZE)}…`; - } - return arg; - } - if (typeof arg === "object") { - try { - const normalizedArg = normalize$2(arg, 7); - const stringified = JSON.stringify(normalizedArg); - if (stringified.length > CONSOLE_ARG_MAX_SIZE) { - isTruncated = true; - return `${JSON.stringify(normalizedArg, null, 2).slice(0, CONSOLE_ARG_MAX_SIZE)}…`; - } - return normalizedArg; - } catch (e2) { - } - } - return arg; - }); - return createBreadcrumb({ - ...breadcrumb, - data: { - ...breadcrumb.data, - arguments: normalizedArgs, - ...isTruncated ? { _meta: { warnings: ["CONSOLE_ARG_TRUNCATED"] } } : {} - } - }); -} -__name(normalizeConsoleBreadcrumb, "normalizeConsoleBreadcrumb"); -function isBreadcrumbWithCategory(breadcrumb) { - return !!breadcrumb.category; -} -__name(isBreadcrumbWithCategory, "isBreadcrumbWithCategory"); -function isRrwebError(event, hint) { - if (event.type || !event.exception || !event.exception.values || !event.exception.values.length) { - return false; - } - if (hint.originalException && hint.originalException.__rrweb__) { - return true; - } - return false; -} -__name(isRrwebError, "isRrwebError"); -function resetReplayIdOnDynamicSamplingContext() { - const dsc = getCurrentScope$1().getPropagationContext().dsc; - if (dsc) { - delete dsc.replay_id; - } - const activeSpan = getActiveSpan(); - if (activeSpan) { - const dsc2 = getDynamicSamplingContextFromSpan(activeSpan); - delete dsc2.replay_id; - } -} -__name(resetReplayIdOnDynamicSamplingContext, "resetReplayIdOnDynamicSamplingContext"); -function addFeedbackBreadcrumb(replay, event) { - replay.triggerUserActivity(); - replay.addUpdate(() => { - if (!event.timestamp) { - return true; - } - replay.throttledAddEvent({ - type: EventType.Custom, - timestamp: event.timestamp * 1e3, - data: { - tag: "breadcrumb", - payload: { - timestamp: event.timestamp, - type: "default", - category: "sentry.feedback", - data: { - feedbackId: event.event_id - } - } - } - }); - return false; - }); -} -__name(addFeedbackBreadcrumb, "addFeedbackBreadcrumb"); -function shouldSampleForBufferEvent(replay, event) { - if (replay.recordingMode !== "buffer") { - return false; - } - if (event.message === UNABLE_TO_SEND_REPLAY) { - return false; - } - if (!event.exception || event.type) { - return false; - } - return isSampled(replay.getOptions().errorSampleRate); -} -__name(shouldSampleForBufferEvent, "shouldSampleForBufferEvent"); -function handleGlobalEventListener(replay) { - return Object.assign( - (event, hint) => { - if (!replay.isEnabled() || replay.isPaused()) { - return event; - } - if (isReplayEvent(event)) { - delete event.breadcrumbs; - return event; - } - if (!isErrorEvent(event) && !isTransactionEvent(event) && !isFeedbackEvent(event)) { - return event; - } - const isSessionActive = replay.checkAndHandleExpiredSession(); - if (!isSessionActive) { - resetReplayIdOnDynamicSamplingContext(); - return event; - } - if (isFeedbackEvent(event)) { - replay.flush(); - event.contexts.feedback.replay_id = replay.getSessionId(); - addFeedbackBreadcrumb(replay, event); - return event; - } - if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) { - DEBUG_BUILD$2 && logger$1.log("Ignoring error from rrweb internals", event); - return null; - } - const isErrorEventSampled = shouldSampleForBufferEvent(replay, event); - const shouldTagReplayId = isErrorEventSampled || replay.recordingMode === "session"; - if (shouldTagReplayId) { - event.tags = { ...event.tags, replayId: replay.getSessionId() }; - } - return event; - }, - { id: "Replay" } - ); -} -__name(handleGlobalEventListener, "handleGlobalEventListener"); -function createPerformanceSpans(replay, entries) { - return entries.map(({ type, start: start2, end, name: name2, data: data25 }) => { - const response = replay.throttledAddEvent({ - type: EventType.Custom, - timestamp: start2, - data: { - tag: "performanceSpan", - payload: { - op: type, - description: name2, - startTimestamp: start2, - endTimestamp: end, - data: data25 - } - } - }); - return typeof response === "string" ? Promise.resolve(null) : response; - }); -} -__name(createPerformanceSpans, "createPerformanceSpans"); -function handleHistory(handlerData) { - const { from: from2, to } = handlerData; - const now2 = Date.now() / 1e3; - return { - type: "navigation.push", - start: now2, - end: now2, - name: to, - data: { - previous: from2 - } - }; -} -__name(handleHistory, "handleHistory"); -function handleHistorySpanListener(replay) { - return (handlerData) => { - if (!replay.isEnabled()) { - return; - } - const result = handleHistory(handlerData); - if (result === null) { - return; - } - replay.getContext().urls.push(result.name); - replay.triggerUserActivity(); - replay.addUpdate(() => { - createPerformanceSpans(replay, [result]); - return false; - }); - }; -} -__name(handleHistorySpanListener, "handleHistorySpanListener"); -function shouldFilterRequest(replay, url) { - if (DEBUG_BUILD$2 && replay.getOptions()._experiments.traceInternals) { - return false; - } - return isSentryRequestUrl(url, getClient()); -} -__name(shouldFilterRequest, "shouldFilterRequest"); -function addNetworkBreadcrumb(replay, result) { - if (!replay.isEnabled()) { - return; - } - if (result === null) { - return; - } - if (shouldFilterRequest(replay, result.name)) { - return; - } - replay.addUpdate(() => { - createPerformanceSpans(replay, [result]); - return true; - }); -} -__name(addNetworkBreadcrumb, "addNetworkBreadcrumb"); -function getBodySize(body) { - if (!body) { - return void 0; - } - const textEncoder = new TextEncoder(); - try { - if (typeof body === "string") { - return textEncoder.encode(body).length; - } - if (body instanceof URLSearchParams) { - return textEncoder.encode(body.toString()).length; - } - if (body instanceof FormData) { - const formDataStr = _serializeFormData(body); - return textEncoder.encode(formDataStr).length; - } - if (body instanceof Blob) { - return body.size; - } - if (body instanceof ArrayBuffer) { - return body.byteLength; - } - } catch (e2) { - } - return void 0; -} -__name(getBodySize, "getBodySize"); -function parseContentLengthHeader(header3) { - if (!header3) { - return void 0; - } - const size2 = parseInt(header3, 10); - return isNaN(size2) ? void 0 : size2; -} -__name(parseContentLengthHeader, "parseContentLengthHeader"); -function getBodyString(body) { - try { - if (typeof body === "string") { - return [body]; - } - if (body instanceof URLSearchParams) { - return [body.toString()]; - } - if (body instanceof FormData) { - return [_serializeFormData(body)]; - } - if (!body) { - return [void 0]; - } - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to serialize body", body); - return [void 0, "BODY_PARSE_ERROR"]; - } - DEBUG_BUILD$2 && logger$1.info("Skipping network body because of body type", body); - return [void 0, "UNPARSEABLE_BODY_TYPE"]; -} -__name(getBodyString, "getBodyString"); -function mergeWarning(info, warning) { - if (!info) { - return { - headers: {}, - size: void 0, - _meta: { - warnings: [warning] - } - }; - } - const newMeta = { ...info._meta }; - const existingWarnings = newMeta.warnings || []; - newMeta.warnings = [...existingWarnings, warning]; - info._meta = newMeta; - return info; -} -__name(mergeWarning, "mergeWarning"); -function makeNetworkReplayBreadcrumb(type, data25) { - if (!data25) { - return null; - } - const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data25; - const result = { - type, - start: startTimestamp / 1e3, - end: endTimestamp / 1e3, - name: url, - data: dropUndefinedKeys({ - method, - statusCode, - request, - response - }) - }; - return result; -} -__name(makeNetworkReplayBreadcrumb, "makeNetworkReplayBreadcrumb"); -function buildSkippedNetworkRequestOrResponse(bodySize) { - return { - headers: {}, - size: bodySize, - _meta: { - warnings: ["URL_SKIPPED"] - } - }; -} -__name(buildSkippedNetworkRequestOrResponse, "buildSkippedNetworkRequestOrResponse"); -function buildNetworkRequestOrResponse(headers, bodySize, body) { - if (!bodySize && Object.keys(headers).length === 0) { - return void 0; - } - if (!bodySize) { - return { - headers - }; - } - if (!body) { - return { - headers, - size: bodySize - }; - } - const info = { - headers, - size: bodySize - }; - const { body: normalizedBody, warnings } = normalizeNetworkBody(body); - info.body = normalizedBody; - if (warnings && warnings.length > 0) { - info._meta = { - warnings - }; - } - return info; -} -__name(buildNetworkRequestOrResponse, "buildNetworkRequestOrResponse"); -function getAllowedHeaders(headers, allowedHeaders) { - return Object.entries(headers).reduce((filteredHeaders, [key, value4]) => { - const normalizedKey = key.toLowerCase(); - if (allowedHeaders.includes(normalizedKey) && headers[key]) { - filteredHeaders[normalizedKey] = value4; - } - return filteredHeaders; - }, {}); -} -__name(getAllowedHeaders, "getAllowedHeaders"); -function _serializeFormData(formData) { - return new URLSearchParams(formData).toString(); -} -__name(_serializeFormData, "_serializeFormData"); -function normalizeNetworkBody(body) { - if (!body || typeof body !== "string") { - return { - body - }; - } - const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE; - const isProbablyJson = _strIsProbablyJson(body); - if (exceedsSizeLimit) { - const truncatedBody = body.slice(0, NETWORK_BODY_MAX_SIZE); - if (isProbablyJson) { - return { - body: truncatedBody, - warnings: ["MAYBE_JSON_TRUNCATED"] - }; - } - return { - body: `${truncatedBody}…`, - warnings: ["TEXT_TRUNCATED"] - }; - } - if (isProbablyJson) { - try { - const jsonBody = JSON.parse(body); - return { - body: jsonBody - }; - } catch (e2) { - } - } - return { - body - }; -} -__name(normalizeNetworkBody, "normalizeNetworkBody"); -function _strIsProbablyJson(str) { - const first2 = str[0]; - const last = str[str.length - 1]; - return first2 === "[" && last === "]" || first2 === "{" && last === "}"; -} -__name(_strIsProbablyJson, "_strIsProbablyJson"); -function urlMatches(url, urls) { - const fullUrl = getFullUrl(url); - return stringMatchesSomePattern(fullUrl, urls); -} -__name(urlMatches, "urlMatches"); -function getFullUrl(url, baseURI = WINDOW$1.document.baseURI) { - if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith(WINDOW$1.location.origin)) { - return url; - } - const fixedUrl = new URL(url, baseURI); - if (fixedUrl.origin !== new URL(baseURI).origin) { - return url; - } - const fullUrl = fixedUrl.href; - if (!url.endsWith("/") && fullUrl.endsWith("/")) { - return fullUrl.slice(0, -1); - } - return fullUrl; -} -__name(getFullUrl, "getFullUrl"); -async function captureFetchBreadcrumbToReplay(breadcrumb, hint, options4) { - try { - const data25 = await _prepareFetchData(breadcrumb, hint, options4); - const result = makeNetworkReplayBreadcrumb("resource.fetch", data25); - addNetworkBreadcrumb(options4.replay, result); - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to capture fetch breadcrumb"); - } -} -__name(captureFetchBreadcrumbToReplay, "captureFetchBreadcrumbToReplay"); -function enrichFetchBreadcrumb(breadcrumb, hint) { - const { input, response } = hint; - const body = input ? _getFetchRequestArgBody(input) : void 0; - const reqSize = getBodySize(body); - const resSize = response ? parseContentLengthHeader(response.headers.get("content-length")) : void 0; - if (reqSize !== void 0) { - breadcrumb.data.request_body_size = reqSize; - } - if (resSize !== void 0) { - breadcrumb.data.response_body_size = resSize; - } -} -__name(enrichFetchBreadcrumb, "enrichFetchBreadcrumb"); -async function _prepareFetchData(breadcrumb, hint, options4) { - const now2 = Date.now(); - const { startTimestamp = now2, endTimestamp = now2 } = hint; - const { - url, - method, - status_code: statusCode = 0, - request_body_size: requestBodySize, - response_body_size: responseBodySize - } = breadcrumb.data; - const captureDetails = urlMatches(url, options4.networkDetailAllowUrls) && !urlMatches(url, options4.networkDetailDenyUrls); - const request = captureDetails ? _getRequestInfo(options4, hint.input, requestBodySize) : buildSkippedNetworkRequestOrResponse(requestBodySize); - const response = await _getResponseInfo(captureDetails, options4, hint.response, responseBodySize); - return { - startTimestamp, - endTimestamp, - url, - method, - statusCode, - request, - response - }; -} -__name(_prepareFetchData, "_prepareFetchData"); -function _getRequestInfo({ networkCaptureBodies, networkRequestHeaders }, input, requestBodySize) { - const headers = input ? getRequestHeaders(input, networkRequestHeaders) : {}; - if (!networkCaptureBodies) { - return buildNetworkRequestOrResponse(headers, requestBodySize, void 0); - } - const requestBody = _getFetchRequestArgBody(input); - const [bodyStr, warning] = getBodyString(requestBody); - const data25 = buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr); - if (warning) { - return mergeWarning(data25, warning); - } - return data25; -} -__name(_getRequestInfo, "_getRequestInfo"); -async function _getResponseInfo(captureDetails, { - networkCaptureBodies, - networkResponseHeaders -}, response, responseBodySize) { - if (!captureDetails && responseBodySize !== void 0) { - return buildSkippedNetworkRequestOrResponse(responseBodySize); - } - const headers = response ? getAllHeaders(response.headers, networkResponseHeaders) : {}; - if (!response || !networkCaptureBodies && responseBodySize !== void 0) { - return buildNetworkRequestOrResponse(headers, responseBodySize, void 0); - } - const [bodyText, warning] = await _parseFetchResponseBody(response); - const result = getResponseData(bodyText, { - networkCaptureBodies, - responseBodySize, - captureDetails, - headers - }); - if (warning) { - return mergeWarning(result, warning); - } - return result; -} -__name(_getResponseInfo, "_getResponseInfo"); -function getResponseData(bodyText, { - networkCaptureBodies, - responseBodySize, - captureDetails, - headers -}) { - try { - const size2 = bodyText && bodyText.length && responseBodySize === void 0 ? getBodySize(bodyText) : responseBodySize; - if (!captureDetails) { - return buildSkippedNetworkRequestOrResponse(size2); - } - if (networkCaptureBodies) { - return buildNetworkRequestOrResponse(headers, size2, bodyText); - } - return buildNetworkRequestOrResponse(headers, size2, void 0); - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to serialize response body"); - return buildNetworkRequestOrResponse(headers, responseBodySize, void 0); - } -} -__name(getResponseData, "getResponseData"); -async function _parseFetchResponseBody(response) { - const res = _tryCloneResponse(response); - if (!res) { - return [void 0, "BODY_PARSE_ERROR"]; - } - try { - const text2 = await _tryGetResponseText(res); - return [text2]; - } catch (error2) { - if (error2 instanceof Error && error2.message.indexOf("Timeout") > -1) { - DEBUG_BUILD$2 && logger$1.warn("Parsing text body from response timed out"); - return [void 0, "BODY_PARSE_TIMEOUT"]; - } - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to get text body from response"); - return [void 0, "BODY_PARSE_ERROR"]; - } -} -__name(_parseFetchResponseBody, "_parseFetchResponseBody"); -function _getFetchRequestArgBody(fetchArgs = []) { - if (fetchArgs.length !== 2 || typeof fetchArgs[1] !== "object") { - return void 0; - } - return fetchArgs[1].body; -} -__name(_getFetchRequestArgBody, "_getFetchRequestArgBody"); -function getAllHeaders(headers, allowedHeaders) { - const allHeaders = {}; - allowedHeaders.forEach((header3) => { - if (headers.get(header3)) { - allHeaders[header3] = headers.get(header3); - } - }); - return allHeaders; -} -__name(getAllHeaders, "getAllHeaders"); -function getRequestHeaders(fetchArgs, allowedHeaders) { - if (fetchArgs.length === 1 && typeof fetchArgs[0] !== "string") { - return getHeadersFromOptions(fetchArgs[0], allowedHeaders); - } - if (fetchArgs.length === 2) { - return getHeadersFromOptions(fetchArgs[1], allowedHeaders); - } - return {}; -} -__name(getRequestHeaders, "getRequestHeaders"); -function getHeadersFromOptions(input, allowedHeaders) { - if (!input) { - return {}; - } - const headers = input.headers; - if (!headers) { - return {}; - } - if (headers instanceof Headers) { - return getAllHeaders(headers, allowedHeaders); - } - if (Array.isArray(headers)) { - return {}; - } - return getAllowedHeaders(headers, allowedHeaders); -} -__name(getHeadersFromOptions, "getHeadersFromOptions"); -function _tryCloneResponse(response) { - try { - return response.clone(); - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to clone response body"); - } -} -__name(_tryCloneResponse, "_tryCloneResponse"); -function _tryGetResponseText(response) { - return new Promise((resolve2, reject3) => { - const timeout = setTimeout$3(() => reject3(new Error("Timeout while trying to read response body")), 500); - _getResponseText(response).then( - (txt) => resolve2(txt), - (reason) => reject3(reason) - ).finally(() => clearTimeout(timeout)); - }); -} -__name(_tryGetResponseText, "_tryGetResponseText"); -async function _getResponseText(response) { - return await response.text(); -} -__name(_getResponseText, "_getResponseText"); -async function captureXhrBreadcrumbToReplay(breadcrumb, hint, options4) { - try { - const data25 = _prepareXhrData(breadcrumb, hint, options4); - const result = makeNetworkReplayBreadcrumb("resource.xhr", data25); - addNetworkBreadcrumb(options4.replay, result); - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to capture xhr breadcrumb"); - } -} -__name(captureXhrBreadcrumbToReplay, "captureXhrBreadcrumbToReplay"); -function enrichXhrBreadcrumb(breadcrumb, hint) { - const { xhr, input } = hint; - if (!xhr) { - return; - } - const reqSize = getBodySize(input); - const resSize = xhr.getResponseHeader("content-length") ? parseContentLengthHeader(xhr.getResponseHeader("content-length")) : _getBodySize(xhr.response, xhr.responseType); - if (reqSize !== void 0) { - breadcrumb.data.request_body_size = reqSize; - } - if (resSize !== void 0) { - breadcrumb.data.response_body_size = resSize; - } -} -__name(enrichXhrBreadcrumb, "enrichXhrBreadcrumb"); -function _prepareXhrData(breadcrumb, hint, options4) { - const now2 = Date.now(); - const { startTimestamp = now2, endTimestamp = now2, input, xhr } = hint; - const { - url, - method, - status_code: statusCode = 0, - request_body_size: requestBodySize, - response_body_size: responseBodySize - } = breadcrumb.data; - if (!url) { - return null; - } - if (!xhr || !urlMatches(url, options4.networkDetailAllowUrls) || urlMatches(url, options4.networkDetailDenyUrls)) { - const request2 = buildSkippedNetworkRequestOrResponse(requestBodySize); - const response2 = buildSkippedNetworkRequestOrResponse(responseBodySize); - return { - startTimestamp, - endTimestamp, - url, - method, - statusCode, - request: request2, - response: response2 - }; - } - const xhrInfo = xhr[SENTRY_XHR_DATA_KEY]; - const networkRequestHeaders = xhrInfo ? getAllowedHeaders(xhrInfo.request_headers, options4.networkRequestHeaders) : {}; - const networkResponseHeaders = getAllowedHeaders(getResponseHeaders(xhr), options4.networkResponseHeaders); - const [requestBody, requestWarning] = options4.networkCaptureBodies ? getBodyString(input) : [void 0]; - const [responseBody, responseWarning] = options4.networkCaptureBodies ? _getXhrResponseBody(xhr) : [void 0]; - const request = buildNetworkRequestOrResponse(networkRequestHeaders, requestBodySize, requestBody); - const response = buildNetworkRequestOrResponse(networkResponseHeaders, responseBodySize, responseBody); - return { - startTimestamp, - endTimestamp, - url, - method, - statusCode, - request: requestWarning ? mergeWarning(request, requestWarning) : request, - response: responseWarning ? mergeWarning(response, responseWarning) : response - }; -} -__name(_prepareXhrData, "_prepareXhrData"); -function getResponseHeaders(xhr) { - const headers = xhr.getAllResponseHeaders(); - if (!headers) { - return {}; - } - return headers.split("\r\n").reduce((acc, line) => { - const [key, value4] = line.split(": "); - if (value4) { - acc[key.toLowerCase()] = value4; - } - return acc; - }, {}); -} -__name(getResponseHeaders, "getResponseHeaders"); -function _getXhrResponseBody(xhr) { - const errors2 = []; - try { - return [xhr.responseText]; - } catch (e2) { - errors2.push(e2); - } - try { - return _parseXhrResponse(xhr.response, xhr.responseType); - } catch (e2) { - errors2.push(e2); - } - DEBUG_BUILD$2 && logger$1.warn("Failed to get xhr response body", ...errors2); - return [void 0]; -} -__name(_getXhrResponseBody, "_getXhrResponseBody"); -function _parseXhrResponse(body, responseType) { - try { - if (typeof body === "string") { - return [body]; - } - if (body instanceof Document) { - return [body.body.outerHTML]; - } - if (responseType === "json" && body && typeof body === "object") { - return [JSON.stringify(body)]; - } - if (!body) { - return [void 0]; - } - } catch (error2) { - DEBUG_BUILD$2 && logger$1.exception(error2, "Failed to serialize body", body); - return [void 0, "BODY_PARSE_ERROR"]; - } - DEBUG_BUILD$2 && logger$1.info("Skipping network body because of body type", body); - return [void 0, "UNPARSEABLE_BODY_TYPE"]; -} -__name(_parseXhrResponse, "_parseXhrResponse"); -function _getBodySize(body, responseType) { - try { - const bodyStr = responseType === "json" && body && typeof body === "object" ? JSON.stringify(body) : body; - return getBodySize(bodyStr); - } catch (e2) { - return void 0; - } -} -__name(_getBodySize, "_getBodySize"); -function handleNetworkBreadcrumbs(replay) { - const client = getClient(); - try { - const { - networkDetailAllowUrls, - networkDetailDenyUrls, - networkCaptureBodies, - networkRequestHeaders, - networkResponseHeaders - } = replay.getOptions(); - const options4 = { - replay, - networkDetailAllowUrls, - networkDetailDenyUrls, - networkCaptureBodies, - networkRequestHeaders, - networkResponseHeaders - }; - if (client) { - client.on("beforeAddBreadcrumb", (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options4, breadcrumb, hint)); - } - } catch (e2) { - } -} -__name(handleNetworkBreadcrumbs, "handleNetworkBreadcrumbs"); -function beforeAddNetworkBreadcrumb(options4, breadcrumb, hint) { - if (!breadcrumb.data) { - return; - } - try { - if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) { - enrichXhrBreadcrumb(breadcrumb, hint); - captureXhrBreadcrumbToReplay(breadcrumb, hint, options4); - } - if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) { - enrichFetchBreadcrumb(breadcrumb, hint); - captureFetchBreadcrumbToReplay(breadcrumb, hint, options4); - } - } catch (e2) { - DEBUG_BUILD$2 && logger$1.exception(e2, "Error when enriching network breadcrumb"); - } -} -__name(beforeAddNetworkBreadcrumb, "beforeAddNetworkBreadcrumb"); -function _isXhrBreadcrumb(breadcrumb) { - return breadcrumb.category === "xhr"; -} -__name(_isXhrBreadcrumb, "_isXhrBreadcrumb"); -function _isFetchBreadcrumb(breadcrumb) { - return breadcrumb.category === "fetch"; -} -__name(_isFetchBreadcrumb, "_isFetchBreadcrumb"); -function _isXhrHint(hint) { - return hint && hint.xhr; -} -__name(_isXhrHint, "_isXhrHint"); -function _isFetchHint(hint) { - return hint && hint.response; -} -__name(_isFetchHint, "_isFetchHint"); -function addGlobalListeners(replay) { - const client = getClient(); - addClickKeypressInstrumentationHandler(handleDomListener(replay)); - addHistoryInstrumentationHandler(handleHistorySpanListener(replay)); - handleBreadcrumbs(replay); - handleNetworkBreadcrumbs(replay); - const eventProcessor = handleGlobalEventListener(replay); - addEventProcessor(eventProcessor); - if (client) { - client.on("beforeSendEvent", handleBeforeSendEvent(replay)); - client.on("afterSendEvent", handleAfterSendEvent(replay)); - client.on("createDsc", (dsc) => { - const replayId = replay.getSessionId(); - if (replayId && replay.isEnabled() && replay.recordingMode === "session") { - const isSessionActive = replay.checkAndHandleExpiredSession(); - if (isSessionActive) { - dsc.replay_id = replayId; - } - } - }); - client.on("spanStart", (span) => { - replay.lastActiveSpan = span; - }); - client.on("spanEnd", (span) => { - replay.lastActiveSpan = span; - }); - client.on("beforeSendFeedback", (feedbackEvent, options4) => { - const replayId = replay.getSessionId(); - if (options4 && options4.includeReplay && replay.isEnabled() && replayId) { - if (feedbackEvent.contexts && feedbackEvent.contexts.feedback) { - feedbackEvent.contexts.feedback.replay_id = replayId; - } - } - }); - } -} -__name(addGlobalListeners, "addGlobalListeners"); -async function addMemoryEntry(replay) { - try { - return Promise.all( - createPerformanceSpans(replay, [ - // @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above) - createMemoryEntry(WINDOW$1.performance.memory) - ]) - ); - } catch (error2) { - return []; - } -} -__name(addMemoryEntry, "addMemoryEntry"); -function createMemoryEntry(memoryEntry) { - const { jsHeapSizeLimit, totalJSHeapSize, usedJSHeapSize } = memoryEntry; - const time = Date.now() / 1e3; - return { - type: "memory", - name: "memory", - start: time, - end: time, - data: { - memory: { - jsHeapSizeLimit, - totalJSHeapSize, - usedJSHeapSize - } - } - }; -} -__name(createMemoryEntry, "createMemoryEntry"); -function debounce(func, wait, options4) { - let callbackReturnValue; - let timerId; - let maxTimerId; - const maxWait = options4 && options4.maxWait ? Math.max(options4.maxWait, wait) : 0; - function invokeFunc() { - cancelTimers(); - callbackReturnValue = func(); - return callbackReturnValue; - } - __name(invokeFunc, "invokeFunc"); - function cancelTimers() { - timerId !== void 0 && clearTimeout(timerId); - maxTimerId !== void 0 && clearTimeout(maxTimerId); - timerId = maxTimerId = void 0; - } - __name(cancelTimers, "cancelTimers"); - function flush2() { - if (timerId !== void 0 || maxTimerId !== void 0) { - return invokeFunc(); - } - return callbackReturnValue; - } - __name(flush2, "flush"); - function debounced() { - if (timerId) { - clearTimeout(timerId); - } - timerId = setTimeout$3(invokeFunc, wait); - if (maxWait && maxTimerId === void 0) { - maxTimerId = setTimeout$3(invokeFunc, maxWait); - } - return callbackReturnValue; - } - __name(debounced, "debounced"); - debounced.cancel = cancelTimers; - debounced.flush = flush2; - return debounced; -} -__name(debounce, "debounce"); -function getHandleRecordingEmit(replay) { - let hadFirstEvent = false; - return (event, _isCheckout) => { - if (!replay.checkAndHandleExpiredSession()) { - DEBUG_BUILD$2 && logger$1.warn("Received replay event after session expired."); - return; - } - const isCheckout = _isCheckout || !hadFirstEvent; - hadFirstEvent = true; - if (replay.clickDetector) { - updateClickDetectorForRecordingEvent(replay.clickDetector, event); - } - replay.addUpdate(() => { - if (replay.recordingMode === "buffer" && isCheckout) { - replay.setInitialState(); - } - if (!addEventSync(replay, event, isCheckout)) { - return true; - } - if (!isCheckout) { - return false; - } - const session = replay.session; - addSettingsEvent(replay, isCheckout); - if (replay.recordingMode === "buffer" && session && replay.eventBuffer) { - const earliestEvent = replay.eventBuffer.getEarliestTimestamp(); - if (earliestEvent) { - DEBUG_BUILD$2 && logger$1.info(`Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`); - session.started = earliestEvent; - if (replay.getOptions().stickySession) { - saveSession(session); - } - } - } - if (session && session.previousSessionId) { - return true; - } - if (replay.recordingMode === "session") { - void replay.flush(); - } - return true; - }); - }; -} -__name(getHandleRecordingEmit, "getHandleRecordingEmit"); -function createOptionsEvent(replay) { - const options4 = replay.getOptions(); - return { - type: EventType.Custom, - timestamp: Date.now(), - data: { - tag: "options", - payload: { - shouldRecordCanvas: replay.isRecordingCanvas(), - sessionSampleRate: options4.sessionSampleRate, - errorSampleRate: options4.errorSampleRate, - useCompressionOption: options4.useCompression, - blockAllMedia: options4.blockAllMedia, - maskAllText: options4.maskAllText, - maskAllInputs: options4.maskAllInputs, - useCompression: replay.eventBuffer ? replay.eventBuffer.type === "worker" : false, - networkDetailHasUrls: options4.networkDetailAllowUrls.length > 0, - networkCaptureBodies: options4.networkCaptureBodies, - networkRequestHasHeaders: options4.networkRequestHeaders.length > 0, - networkResponseHasHeaders: options4.networkResponseHeaders.length > 0 - } - } - }; -} -__name(createOptionsEvent, "createOptionsEvent"); -function addSettingsEvent(replay, isCheckout) { - if (!isCheckout || !replay.session || replay.session.segmentId !== 0) { - return; - } - addEventSync(replay, createOptionsEvent(replay), false); -} -__name(addSettingsEvent, "addSettingsEvent"); -function createReplayEnvelope(replayEvent, recordingData, dsn, tunnel) { - return createEnvelope( - createEventEnvelopeHeaders(replayEvent, getSdkMetadataForEnvelopeHeader(replayEvent), tunnel, dsn), - [ - [{ type: "replay_event" }, replayEvent], - [ - { - type: "replay_recording", - // If string then we need to encode to UTF8, otherwise will have - // wrong size. TextEncoder has similar browser support to - // MutationObserver, although it does not accept IE11. - length: typeof recordingData === "string" ? new TextEncoder().encode(recordingData).length : recordingData.length - }, - recordingData - ] - ] - ); -} -__name(createReplayEnvelope, "createReplayEnvelope"); -function prepareRecordingData({ - recordingData, - headers -}) { - let payloadWithSequence; - const replayHeaders = `${JSON.stringify(headers)} -`; - if (typeof recordingData === "string") { - payloadWithSequence = `${replayHeaders}${recordingData}`; - } else { - const enc = new TextEncoder(); - const sequence = enc.encode(replayHeaders); - payloadWithSequence = new Uint8Array(sequence.length + recordingData.length); - payloadWithSequence.set(sequence); - payloadWithSequence.set(recordingData, sequence.length); - } - return payloadWithSequence; -} -__name(prepareRecordingData, "prepareRecordingData"); -async function prepareReplayEvent({ - client, - scope, - replayId: event_id, - event -}) { - const integrations = typeof client._integrations === "object" && client._integrations !== null && !Array.isArray(client._integrations) ? Object.keys(client._integrations) : void 0; - const eventHint = { event_id, integrations }; - client.emit("preprocessEvent", event, eventHint); - const preparedEvent = await prepareEvent( - client.getOptions(), - event, - eventHint, - scope, - client, - getIsolationScope() - ); - if (!preparedEvent) { - return null; - } - preparedEvent.platform = preparedEvent.platform || "javascript"; - const metadata = client.getSdkMetadata(); - const { name: name2, version: version2 } = metadata && metadata.sdk || {}; - preparedEvent.sdk = { - ...preparedEvent.sdk, - name: name2 || "sentry.javascript.unknown", - version: version2 || "0.0.0" - }; - return preparedEvent; -} -__name(prepareReplayEvent, "prepareReplayEvent"); -async function sendReplayRequest({ - recordingData, - replayId, - segmentId: segment_id, - eventContext, - timestamp: timestamp2, - session -}) { - const preparedRecordingData = prepareRecordingData({ - recordingData, - headers: { - segment_id - } - }); - const { urls, errorIds, traceIds, initialTimestamp } = eventContext; - const client = getClient(); - const scope = getCurrentScope$1(); - const transport = client && client.getTransport(); - const dsn = client && client.getDsn(); - if (!client || !transport || !dsn || !session.sampled) { - return resolvedSyncPromise({}); - } - const baseEvent = { - type: REPLAY_EVENT_NAME, - replay_start_timestamp: initialTimestamp / 1e3, - timestamp: timestamp2 / 1e3, - error_ids: errorIds, - trace_ids: traceIds, - urls, - replay_id: replayId, - segment_id, - replay_type: session.sampled - }; - const replayEvent = await prepareReplayEvent({ scope, client, replayId, event: baseEvent }); - if (!replayEvent) { - client.recordDroppedEvent("event_processor", "replay", baseEvent); - DEBUG_BUILD$2 && logger$1.info("An event processor returned `null`, will not send event."); - return resolvedSyncPromise({}); - } - delete replayEvent.sdkProcessingMetadata; - const envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel); - let response; - try { - response = await transport.send(envelope); - } catch (err) { - const error2 = new Error(UNABLE_TO_SEND_REPLAY); - try { - error2.cause = err; - } catch (e2) { - } - throw error2; - } - if (typeof response.statusCode === "number" && (response.statusCode < 200 || response.statusCode >= 300)) { - throw new TransportStatusCodeError(response.statusCode); - } - const rateLimits = updateRateLimits({}, response); - if (isRateLimited(rateLimits, "replay")) { - throw new RateLimitError(rateLimits); - } - return response; -} -__name(sendReplayRequest, "sendReplayRequest"); -class TransportStatusCodeError extends Error { - static { - __name(this, "TransportStatusCodeError"); - } - constructor(statusCode) { - super(`Transport returned status code ${statusCode}`); - } -} -class RateLimitError extends Error { - static { - __name(this, "RateLimitError"); - } - constructor(rateLimits) { - super("Rate limit hit"); - this.rateLimits = rateLimits; - } -} -async function sendReplay(replayData, retryConfig = { - count: 0, - interval: RETRY_BASE_INTERVAL -}) { - const { recordingData, onError } = replayData; - if (!recordingData.length) { - return; - } - try { - await sendReplayRequest(replayData); - return true; - } catch (err) { - if (err instanceof TransportStatusCodeError || err instanceof RateLimitError) { - throw err; - } - setContext("Replays", { - _retryCount: retryConfig.count - }); - if (onError) { - onError(err); - } - if (retryConfig.count >= RETRY_MAX_COUNT) { - const error2 = new Error(`${UNABLE_TO_SEND_REPLAY} - max retries exceeded`); - try { - error2.cause = err; - } catch (e2) { - } - throw error2; - } - retryConfig.interval *= ++retryConfig.count; - return new Promise((resolve2, reject3) => { - setTimeout$3(async () => { - try { - await sendReplay(replayData, retryConfig); - resolve2(true); - } catch (err2) { - reject3(err2); - } - }, retryConfig.interval); - }); - } -} -__name(sendReplay, "sendReplay"); -const THROTTLED = "__THROTTLED"; -const SKIPPED = "__SKIPPED"; -function throttle$2(fn, maxCount, durationSeconds) { - const counter = /* @__PURE__ */ new Map(); - const _cleanup = /* @__PURE__ */ __name((now2) => { - const threshold = now2 - durationSeconds; - counter.forEach((_value, key) => { - if (key < threshold) { - counter.delete(key); - } - }); - }, "_cleanup"); - const _getTotalCount = /* @__PURE__ */ __name(() => { - return [...counter.values()].reduce((a2, b2) => a2 + b2, 0); - }, "_getTotalCount"); - let isThrottled = false; - return (...rest) => { - const now2 = Math.floor(Date.now() / 1e3); - _cleanup(now2); - if (_getTotalCount() >= maxCount) { - const wasThrottled = isThrottled; - isThrottled = true; - return wasThrottled ? SKIPPED : THROTTLED; - } - isThrottled = false; - const count = counter.get(now2) || 0; - counter.set(now2, count + 1); - return fn(...rest); - }; -} -__name(throttle$2, "throttle$2"); -class ReplayContainer { - static { - __name(this, "ReplayContainer"); - } - /** - * Recording can happen in one of two modes: - * - session: Record the whole session, sending it continuously - * - buffer: Always keep the last 60s of recording, requires: - * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs - * - or calling `flush()` to send the replay - */ - /** - * The current or last active span. - * This is only available when performance is enabled. - */ - /** - * These are here so we can overwrite them in tests etc. - * @hidden - */ - /** The replay has to be manually started, because no sample rate (neither session or error) was provided. */ - /** - * Options to pass to `rrweb.record()` - */ - /** - * Timestamp of the last user activity. This lives across sessions. - */ - /** - * Is the integration currently active? - */ - /** - * Paused is a state where: - * - DOM Recording is not listening at all - * - Nothing will be added to event buffer (e.g. core SDK events) - */ - /** - * Have we attached listeners to the core SDK? - * Note we have to track this as there is no way to remove instrumentation handlers. - */ - /** - * Function to stop recording - */ - /** - * Internal use for canvas recording options - */ - constructor({ - options: options4, - recordingOptions - }) { - ReplayContainer.prototype.__init.call(this); - ReplayContainer.prototype.__init2.call(this); - ReplayContainer.prototype.__init3.call(this); - ReplayContainer.prototype.__init4.call(this); - ReplayContainer.prototype.__init5.call(this); - ReplayContainer.prototype.__init6.call(this); - this.eventBuffer = null; - this.performanceEntries = []; - this.replayPerformanceEntries = []; - this.recordingMode = "session"; - this.timeouts = { - sessionIdlePause: SESSION_IDLE_PAUSE_DURATION, - sessionIdleExpire: SESSION_IDLE_EXPIRE_DURATION - }; - this._lastActivity = Date.now(); - this._isEnabled = false; - this._isPaused = false; - this._requiresManualStart = false; - this._hasInitializedCoreListeners = false; - this._context = { - errorIds: /* @__PURE__ */ new Set(), - traceIds: /* @__PURE__ */ new Set(), - urls: [], - initialTimestamp: Date.now(), - initialUrl: "" - }; - this._recordingOptions = recordingOptions; - this._options = options4; - this._debouncedFlush = debounce(() => this._flush(), this._options.flushMinDelay, { - maxWait: this._options.flushMaxDelay - }); - this._throttledAddEvent = throttle$2( - (event, isCheckout) => addEvent(this, event, isCheckout), - // Max 300 events... - 300, - // ... per 5s - 5 - ); - const { slowClickTimeout, slowClickIgnoreSelectors } = this.getOptions(); - const slowClickConfig = slowClickTimeout ? { - threshold: Math.min(SLOW_CLICK_THRESHOLD, slowClickTimeout), - timeout: slowClickTimeout, - scrollTimeout: SLOW_CLICK_SCROLL_TIMEOUT, - ignoreSelector: slowClickIgnoreSelectors ? slowClickIgnoreSelectors.join(",") : "" - } : void 0; - if (slowClickConfig) { - this.clickDetector = new ClickDetector(this, slowClickConfig); - } - if (DEBUG_BUILD$2) { - const experiments = options4._experiments; - logger$1.setConfig({ - captureExceptions: !!experiments.captureExceptions, - traceInternals: !!experiments.traceInternals - }); - } - } - /** Get the event context. */ - getContext() { - return this._context; - } - /** If recording is currently enabled. */ - isEnabled() { - return this._isEnabled; - } - /** If recording is currently paused. */ - isPaused() { - return this._isPaused; - } - /** - * Determine if canvas recording is enabled - */ - isRecordingCanvas() { - return Boolean(this._canvas); - } - /** Get the replay integration options. */ - getOptions() { - return this._options; - } - /** A wrapper to conditionally capture exceptions. */ - handleException(error2) { - DEBUG_BUILD$2 && logger$1.exception(error2); - if (this._options.onError) { - this._options.onError(error2); - } - } - /** - * Initializes the plugin based on sampling configuration. Should not be - * called outside of constructor. - */ - initializeSampling(previousSessionId) { - const { errorSampleRate, sessionSampleRate } = this._options; - const requiresManualStart = errorSampleRate <= 0 && sessionSampleRate <= 0; - this._requiresManualStart = requiresManualStart; - if (requiresManualStart) { - return; - } - this._initializeSessionForSampling(previousSessionId); - if (!this.session) { - DEBUG_BUILD$2 && logger$1.exception(new Error("Unable to initialize and create session")); - return; - } - if (this.session.sampled === false) { - return; - } - this.recordingMode = this.session.sampled === "buffer" && this.session.segmentId === 0 ? "buffer" : "session"; - DEBUG_BUILD$2 && logger$1.infoTick(`Starting replay in ${this.recordingMode} mode`); - this._initializeRecording(); - } - /** - * Start a replay regardless of sampling rate. Calling this will always - * create a new session. Will log a message if replay is already in progress. - * - * Creates or loads a session, attaches listeners to varying events (DOM, - * _performanceObserver, Recording, Sentry SDK, etc) - */ - start() { - if (this._isEnabled && this.recordingMode === "session") { - DEBUG_BUILD$2 && logger$1.info("Recording is already in progress"); - return; - } - if (this._isEnabled && this.recordingMode === "buffer") { - DEBUG_BUILD$2 && logger$1.info("Buffering is in progress, call `flush()` to save the replay"); - return; - } - DEBUG_BUILD$2 && logger$1.infoTick("Starting replay in session mode"); - this._updateUserActivity(); - const session = loadOrCreateSession( - { - maxReplayDuration: this._options.maxReplayDuration, - sessionIdleExpire: this.timeouts.sessionIdleExpire - }, - { - stickySession: this._options.stickySession, - // This is intentional: create a new session-based replay when calling `start()` - sessionSampleRate: 1, - allowBuffering: false - } - ); - this.session = session; - this._initializeRecording(); - } - /** - * Start replay buffering. Buffers until `flush()` is called or, if - * `replaysOnErrorSampleRate` > 0, an error occurs. - */ - startBuffering() { - if (this._isEnabled) { - DEBUG_BUILD$2 && logger$1.info("Buffering is in progress, call `flush()` to save the replay"); - return; - } - DEBUG_BUILD$2 && logger$1.infoTick("Starting replay in buffer mode"); - const session = loadOrCreateSession( - { - sessionIdleExpire: this.timeouts.sessionIdleExpire, - maxReplayDuration: this._options.maxReplayDuration - }, - { - stickySession: this._options.stickySession, - sessionSampleRate: 0, - allowBuffering: true - } - ); - this.session = session; - this.recordingMode = "buffer"; - this._initializeRecording(); - } - /** - * Start recording. - * - * Note that this will cause a new DOM checkout - */ - startRecording() { - try { - const canvasOptions = this._canvas; - this._stopRecording = record({ - ...this._recordingOptions, - // When running in error sampling mode, we need to overwrite `checkoutEveryNms` - // Without this, it would record forever, until an error happens, which we don't want - // instead, we'll always keep the last 60 seconds of replay before an error happened - ...this.recordingMode === "buffer" ? { checkoutEveryNms: BUFFER_CHECKOUT_TIME } : ( - // Otherwise, use experimental option w/ min checkout time of 6 minutes - // This is to improve playback seeking as there could potentially be - // less mutations to process in the worse cases. - // - // checkout by "N" events is probably ideal, but means we have less - // control about the number of checkouts we make (which generally - // increases replay size) - this._options._experiments.continuousCheckout && { - // Minimum checkout time is 6 minutes - checkoutEveryNms: Math.max(36e4, this._options._experiments.continuousCheckout) - } - ), - emit: getHandleRecordingEmit(this), - onMutation: this._onMutationHandler, - ...canvasOptions ? { - recordCanvas: canvasOptions.recordCanvas, - getCanvasManager: canvasOptions.getCanvasManager, - sampling: canvasOptions.sampling, - dataURLOptions: canvasOptions.dataURLOptions - } : {} - }); - } catch (err) { - this.handleException(err); - } - } - /** - * Stops the recording, if it was running. - * - * Returns true if it was previously stopped, or is now stopped, - * otherwise false. - */ - stopRecording() { - try { - if (this._stopRecording) { - this._stopRecording(); - this._stopRecording = void 0; - } - return true; - } catch (err) { - this.handleException(err); - return false; - } - } - /** - * Currently, this needs to be manually called (e.g. for tests). Sentry SDK - * does not support a teardown - */ - async stop({ forceFlush = false, reason } = {}) { - if (!this._isEnabled) { - return; - } - this._isEnabled = false; - try { - DEBUG_BUILD$2 && logger$1.info(`Stopping Replay${reason ? ` triggered by ${reason}` : ""}`); - resetReplayIdOnDynamicSamplingContext(); - this._removeListeners(); - this.stopRecording(); - this._debouncedFlush.cancel(); - if (forceFlush) { - await this._flush({ force: true }); - } - this.eventBuffer && this.eventBuffer.destroy(); - this.eventBuffer = null; - clearSession(this); - } catch (err) { - this.handleException(err); - } - } - /** - * Pause some replay functionality. See comments for `_isPaused`. - * This differs from stop as this only stops DOM recording, it is - * not as thorough of a shutdown as `stop()`. - */ - pause() { - if (this._isPaused) { - return; - } - this._isPaused = true; - this.stopRecording(); - DEBUG_BUILD$2 && logger$1.info("Pausing replay"); - } - /** - * Resumes recording, see notes for `pause(). - * - * Note that calling `startRecording()` here will cause a - * new DOM checkout.` - */ - resume() { - if (!this._isPaused || !this._checkSession()) { - return; - } - this._isPaused = false; - this.startRecording(); - DEBUG_BUILD$2 && logger$1.info("Resuming replay"); - } - /** - * If not in "session" recording mode, flush event buffer which will create a new replay. - * Unless `continueRecording` is false, the replay will continue to record and - * behave as a "session"-based replay. - * - * Otherwise, queue up a flush. - */ - async sendBufferedReplayOrFlush({ continueRecording = true } = {}) { - if (this.recordingMode === "session") { - return this.flushImmediate(); - } - const activityTime = Date.now(); - DEBUG_BUILD$2 && logger$1.info("Converting buffer to session"); - await this.flushImmediate(); - const hasStoppedRecording = this.stopRecording(); - if (!continueRecording || !hasStoppedRecording) { - return; - } - if (this.recordingMode === "session") { - return; - } - this.recordingMode = "session"; - if (this.session) { - this._updateUserActivity(activityTime); - this._updateSessionActivity(activityTime); - this._maybeSaveSession(); - } - this.startRecording(); - } - /** - * We want to batch uploads of replay events. Save events only if - * `` milliseconds have elapsed since the last event - * *OR* if `` milliseconds have elapsed. - * - * Accepts a callback to perform side-effects and returns true to stop batch - * processing and hand back control to caller. - */ - addUpdate(cb) { - const cbResult = cb(); - if (this.recordingMode === "buffer") { - return; - } - if (cbResult === true) { - return; - } - this._debouncedFlush(); - } - /** - * Updates the user activity timestamp and resumes recording. This should be - * called in an event handler for a user action that we consider as the user - * being "active" (e.g. a mouse click). - */ - triggerUserActivity() { - this._updateUserActivity(); - if (!this._stopRecording) { - if (!this._checkSession()) { - return; - } - this.resume(); - return; - } - this.checkAndHandleExpiredSession(); - this._updateSessionActivity(); - } - /** - * Updates the user activity timestamp *without* resuming - * recording. Some user events (e.g. keydown) can be create - * low-value replays that only contain the keypress as a - * breadcrumb. Instead this would require other events to - * create a new replay after a session has expired. - */ - updateUserActivity() { - this._updateUserActivity(); - this._updateSessionActivity(); - } - /** - * Only flush if `this.recordingMode === 'session'` - */ - conditionalFlush() { - if (this.recordingMode === "buffer") { - return Promise.resolve(); - } - return this.flushImmediate(); - } - /** - * Flush using debounce flush - */ - flush() { - return this._debouncedFlush(); - } - /** - * Always flush via `_debouncedFlush` so that we do not have flushes triggered - * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be - * cases of multiple flushes happening closely together. - */ - flushImmediate() { - this._debouncedFlush(); - return this._debouncedFlush.flush(); - } - /** - * Cancels queued up flushes. - */ - cancelFlush() { - this._debouncedFlush.cancel(); - } - /** Get the current session (=replay) ID */ - getSessionId() { - return this.session && this.session.id; - } - /** - * Checks if recording should be stopped due to user inactivity. Otherwise - * check if session is expired and create a new session if so. Triggers a new - * full snapshot on new session. - * - * Returns true if session is not expired, false otherwise. - * @hidden - */ - checkAndHandleExpiredSession() { - if (this._lastActivity && isExpired(this._lastActivity, this.timeouts.sessionIdlePause) && this.session && this.session.sampled === "session") { - this.pause(); - return; - } - if (!this._checkSession()) { - return false; - } - return true; - } - /** - * Capture some initial state that can change throughout the lifespan of the - * replay. This is required because otherwise they would be captured at the - * first flush. - */ - setInitialState() { - const urlPath = `${WINDOW$1.location.pathname}${WINDOW$1.location.hash}${WINDOW$1.location.search}`; - const url = `${WINDOW$1.location.origin}${urlPath}`; - this.performanceEntries = []; - this.replayPerformanceEntries = []; - this._clearContext(); - this._context.initialUrl = url; - this._context.initialTimestamp = Date.now(); - this._context.urls.push(url); - } - /** - * Add a breadcrumb event, that may be throttled. - * If it was throttled, we add a custom breadcrumb to indicate that. - */ - throttledAddEvent(event, isCheckout) { - const res = this._throttledAddEvent(event, isCheckout); - if (res === THROTTLED) { - const breadcrumb = createBreadcrumb({ - category: "replay.throttled" - }); - this.addUpdate(() => { - return !addEventSync(this, { - type: ReplayEventTypeCustom, - timestamp: breadcrumb.timestamp || 0, - data: { - tag: "breadcrumb", - payload: breadcrumb, - metric: true - } - }); - }); - } - return res; - } - /** - * This will get the parametrized route name of the current page. - * This is only available if performance is enabled, and if an instrumented router is used. - */ - getCurrentRoute() { - const lastActiveSpan = this.lastActiveSpan || getActiveSpan(); - const lastRootSpan = lastActiveSpan && getRootSpan(lastActiveSpan); - const attributes = lastRootSpan && spanToJSON(lastRootSpan).data || {}; - const source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; - if (!lastRootSpan || !source || !["route", "custom"].includes(source)) { - return void 0; - } - return spanToJSON(lastRootSpan).description; - } - /** - * Initialize and start all listeners to varying events (DOM, - * Performance Observer, Recording, Sentry SDK, etc) - */ - _initializeRecording() { - this.setInitialState(); - this._updateSessionActivity(); - this.eventBuffer = createEventBuffer({ - useCompression: this._options.useCompression, - workerUrl: this._options.workerUrl - }); - this._removeListeners(); - this._addListeners(); - this._isEnabled = true; - this._isPaused = false; - this.startRecording(); - } - /** - * Loads (or refreshes) the current session. - */ - _initializeSessionForSampling(previousSessionId) { - const allowBuffering = this._options.errorSampleRate > 0; - const session = loadOrCreateSession( - { - sessionIdleExpire: this.timeouts.sessionIdleExpire, - maxReplayDuration: this._options.maxReplayDuration, - previousSessionId - }, - { - stickySession: this._options.stickySession, - sessionSampleRate: this._options.sessionSampleRate, - allowBuffering - } - ); - this.session = session; - } - /** - * Checks and potentially refreshes the current session. - * Returns false if session is not recorded. - */ - _checkSession() { - if (!this.session) { - return false; - } - const currentSession = this.session; - if (shouldRefreshSession(currentSession, { - sessionIdleExpire: this.timeouts.sessionIdleExpire, - maxReplayDuration: this._options.maxReplayDuration - })) { - this._refreshSession(currentSession); - return false; - } - return true; - } - /** - * Refresh a session with a new one. - * This stops the current session (without forcing a flush, as that would never work since we are expired), - * and then does a new sampling based on the refreshed session. - */ - async _refreshSession(session) { - if (!this._isEnabled) { - return; - } - await this.stop({ reason: "refresh session" }); - this.initializeSampling(session.id); - } - /** - * Adds listeners to record events for the replay - */ - _addListeners() { - try { - WINDOW$1.document.addEventListener("visibilitychange", this._handleVisibilityChange); - WINDOW$1.addEventListener("blur", this._handleWindowBlur); - WINDOW$1.addEventListener("focus", this._handleWindowFocus); - WINDOW$1.addEventListener("keydown", this._handleKeyboardEvent); - if (this.clickDetector) { - this.clickDetector.addListeners(); - } - if (!this._hasInitializedCoreListeners) { - addGlobalListeners(this); - this._hasInitializedCoreListeners = true; - } - } catch (err) { - this.handleException(err); - } - this._performanceCleanupCallback = setupPerformanceObserver(this); - } - /** - * Cleans up listeners that were created in `_addListeners` - */ - _removeListeners() { - try { - WINDOW$1.document.removeEventListener("visibilitychange", this._handleVisibilityChange); - WINDOW$1.removeEventListener("blur", this._handleWindowBlur); - WINDOW$1.removeEventListener("focus", this._handleWindowFocus); - WINDOW$1.removeEventListener("keydown", this._handleKeyboardEvent); - if (this.clickDetector) { - this.clickDetector.removeListeners(); - } - if (this._performanceCleanupCallback) { - this._performanceCleanupCallback(); - } - } catch (err) { - this.handleException(err); - } - } - /** - * Handle when visibility of the page content changes. Opening a new tab will - * cause the state to change to hidden because of content of current page will - * be hidden. Likewise, moving a different window to cover the contents of the - * page will also trigger a change to a hidden state. - */ - __init() { - this._handleVisibilityChange = () => { - if (WINDOW$1.document.visibilityState === "visible") { - this._doChangeToForegroundTasks(); - } else { - this._doChangeToBackgroundTasks(); - } - }; - } - /** - * Handle when page is blurred - */ - __init2() { - this._handleWindowBlur = () => { - const breadcrumb = createBreadcrumb({ - category: "ui.blur" - }); - this._doChangeToBackgroundTasks(breadcrumb); - }; - } - /** - * Handle when page is focused - */ - __init3() { - this._handleWindowFocus = () => { - const breadcrumb = createBreadcrumb({ - category: "ui.focus" - }); - this._doChangeToForegroundTasks(breadcrumb); - }; - } - /** Ensure page remains active when a key is pressed. */ - __init4() { - this._handleKeyboardEvent = (event) => { - handleKeyboardEvent(this, event); - }; - } - /** - * Tasks to run when we consider a page to be hidden (via blurring and/or visibility) - */ - _doChangeToBackgroundTasks(breadcrumb) { - if (!this.session) { - return; - } - const expired = isSessionExpired(this.session, { - maxReplayDuration: this._options.maxReplayDuration, - sessionIdleExpire: this.timeouts.sessionIdleExpire - }); - if (expired) { - return; - } - if (breadcrumb) { - this._createCustomBreadcrumb(breadcrumb); - } - void this.conditionalFlush(); - } - /** - * Tasks to run when we consider a page to be visible (via focus and/or visibility) - */ - _doChangeToForegroundTasks(breadcrumb) { - if (!this.session) { - return; - } - const isSessionActive = this.checkAndHandleExpiredSession(); - if (!isSessionActive) { - DEBUG_BUILD$2 && logger$1.info("Document has become active, but session has expired"); - return; - } - if (breadcrumb) { - this._createCustomBreadcrumb(breadcrumb); - } - } - /** - * Update user activity (across session lifespans) - */ - _updateUserActivity(_lastActivity = Date.now()) { - this._lastActivity = _lastActivity; - } - /** - * Updates the session's last activity timestamp - */ - _updateSessionActivity(_lastActivity = Date.now()) { - if (this.session) { - this.session.lastActivity = _lastActivity; - this._maybeSaveSession(); - } - } - /** - * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb - */ - _createCustomBreadcrumb(breadcrumb) { - this.addUpdate(() => { - this.throttledAddEvent({ - type: EventType.Custom, - timestamp: breadcrumb.timestamp || 0, - data: { - tag: "breadcrumb", - payload: breadcrumb - } - }); - }); - } - /** - * Observed performance events are added to `this.performanceEntries`. These - * are included in the replay event before it is finished and sent to Sentry. - */ - _addPerformanceEntries() { - let performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries); - this.performanceEntries = []; - this.replayPerformanceEntries = []; - if (this._requiresManualStart) { - const initialTimestampInSeconds = this._context.initialTimestamp / 1e3; - performanceEntries = performanceEntries.filter((entry) => entry.start >= initialTimestampInSeconds); - } - return Promise.all(createPerformanceSpans(this, performanceEntries)); - } - /** - * Clear _context - */ - _clearContext() { - this._context.errorIds.clear(); - this._context.traceIds.clear(); - this._context.urls = []; - } - /** Update the initial timestamp based on the buffer content. */ - _updateInitialTimestampFromEventBuffer() { - const { session, eventBuffer } = this; - if (!session || !eventBuffer || this._requiresManualStart) { - return; - } - if (session.segmentId) { - return; - } - const earliestEvent = eventBuffer.getEarliestTimestamp(); - if (earliestEvent && earliestEvent < this._context.initialTimestamp) { - this._context.initialTimestamp = earliestEvent; - } - } - /** - * Return and clear _context - */ - _popEventContext() { - const _context = { - initialTimestamp: this._context.initialTimestamp, - initialUrl: this._context.initialUrl, - errorIds: Array.from(this._context.errorIds), - traceIds: Array.from(this._context.traceIds), - urls: this._context.urls - }; - this._clearContext(); - return _context; - } - /** - * Flushes replay event buffer to Sentry. - * - * Performance events are only added right before flushing - this is - * due to the buffered performance observer events. - * - * Should never be called directly, only by `flush` - */ - async _runFlush() { - const replayId = this.getSessionId(); - if (!this.session || !this.eventBuffer || !replayId) { - DEBUG_BUILD$2 && logger$1.error("No session or eventBuffer found to flush."); - return; - } - await this._addPerformanceEntries(); - if (!this.eventBuffer || !this.eventBuffer.hasEvents) { - return; - } - await addMemoryEntry(this); - if (!this.eventBuffer) { - return; - } - if (replayId !== this.getSessionId()) { - return; - } - try { - this._updateInitialTimestampFromEventBuffer(); - const timestamp2 = Date.now(); - if (timestamp2 - this._context.initialTimestamp > this._options.maxReplayDuration + 3e4) { - throw new Error("Session is too long, not sending replay"); - } - const eventContext = this._popEventContext(); - const segmentId = this.session.segmentId++; - this._maybeSaveSession(); - const recordingData = await this.eventBuffer.finish(); - await sendReplay({ - replayId, - recordingData, - segmentId, - eventContext, - session: this.session, - timestamp: timestamp2, - onError: /* @__PURE__ */ __name((err) => this.handleException(err), "onError") - }); - } catch (err) { - this.handleException(err); - this.stop({ reason: "sendReplay" }); - const client = getClient(); - if (client) { - const dropReason = err instanceof RateLimitError ? "ratelimit_backoff" : "send_error"; - client.recordDroppedEvent(dropReason, "replay"); - } - } - } - /** - * Flush recording data to Sentry. Creates a lock so that only a single flush - * can be active at a time. Do not call this directly. - */ - __init5() { - this._flush = async ({ - force = false - } = {}) => { - if (!this._isEnabled && !force) { - return; - } - if (!this.checkAndHandleExpiredSession()) { - DEBUG_BUILD$2 && logger$1.error("Attempting to finish replay event after session expired."); - return; - } - if (!this.session) { - return; - } - const start2 = this.session.started; - const now2 = Date.now(); - const duration = now2 - start2; - this._debouncedFlush.cancel(); - const tooShort = duration < this._options.minReplayDuration; - const tooLong = duration > this._options.maxReplayDuration + 5e3; - if (tooShort || tooLong) { - DEBUG_BUILD$2 && logger$1.info( - `Session duration (${Math.floor(duration / 1e3)}s) is too ${tooShort ? "short" : "long"}, not sending replay.` - ); - if (tooShort) { - this._debouncedFlush(); - } - return; - } - const eventBuffer = this.eventBuffer; - if (eventBuffer && this.session.segmentId === 0 && !eventBuffer.hasCheckout) { - DEBUG_BUILD$2 && logger$1.info("Flushing initial segment without checkout."); - } - const _flushInProgress = !!this._flushLock; - if (!this._flushLock) { - this._flushLock = this._runFlush(); - } - try { - await this._flushLock; - } catch (err) { - this.handleException(err); - } finally { - this._flushLock = void 0; - if (_flushInProgress) { - this._debouncedFlush(); - } - } - }; - } - /** Save the session, if it is sticky */ - _maybeSaveSession() { - if (this.session && this._options.stickySession) { - saveSession(this.session); - } - } - /** Handler for rrweb.record.onMutation */ - __init6() { - this._onMutationHandler = (mutations) => { - const count = mutations.length; - const mutationLimit = this._options.mutationLimit; - const mutationBreadcrumbLimit = this._options.mutationBreadcrumbLimit; - const overMutationLimit = mutationLimit && count > mutationLimit; - if (count > mutationBreadcrumbLimit || overMutationLimit) { - const breadcrumb = createBreadcrumb({ - category: "replay.mutations", - data: { - count, - limit: overMutationLimit - } - }); - this._createCustomBreadcrumb(breadcrumb); - } - if (overMutationLimit) { - this.stop({ reason: "mutationLimit", forceFlush: this.recordingMode === "session" }); - return false; - } - return true; - }; - } -} -function getOption(selectors, defaultSelectors) { - return [ - ...selectors, - // sentry defaults - ...defaultSelectors - ].join(","); -} -__name(getOption, "getOption"); -function getPrivacyOptions({ mask: mask3, unmask, block: block3, unblock: unblock2, ignore }) { - const defaultBlockedElements = ["base", "iframe[srcdoc]:not([src])"]; - const maskSelector = getOption(mask3, [".sentry-mask", "[data-sentry-mask]"]); - const unmaskSelector = getOption(unmask, []); - const options4 = { - // We are making the decision to make text and input selectors the same - maskTextSelector: maskSelector, - unmaskTextSelector: unmaskSelector, - blockSelector: getOption(block3, [".sentry-block", "[data-sentry-block]", ...defaultBlockedElements]), - unblockSelector: getOption(unblock2, []), - ignoreSelector: getOption(ignore, [".sentry-ignore", "[data-sentry-ignore]", 'input[type="file"]']) - }; - return options4; -} -__name(getPrivacyOptions, "getPrivacyOptions"); -function maskAttribute({ - el, - key, - maskAttributes, - maskAllText, - privacyOptions, - value: value4 -}) { - if (!maskAllText) { - return value4; - } - if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) { - return value4; - } - if (maskAttributes.includes(key) || // Need to mask `value` attribute for `` if it's a button-like - // type - key === "value" && el.tagName === "INPUT" && ["submit", "button"].includes(el.getAttribute("type") || "")) { - return value4.replace(/[\S]/g, "*"); - } - return value4; -} -__name(maskAttribute, "maskAttribute"); -const MEDIA_SELECTORS = 'img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]'; -const DEFAULT_NETWORK_HEADERS = ["content-length", "content-type", "accept"]; -let _initialized = false; -const replayIntegration = /* @__PURE__ */ __name((options4) => { - return new Replay(options4); -}, "replayIntegration"); -class Replay { - static { - __name(this, "Replay"); - } - /** - * @inheritDoc - */ - static __initStatic() { - this.id = "Replay"; - } - /** - * @inheritDoc - */ - /** - * Options to pass to `rrweb.record()` - */ - /** - * Initial options passed to the replay integration, merged with default values. - * Note: `sessionSampleRate` and `errorSampleRate` are not required here, as they - * can only be finally set when setupOnce() is called. - * - * @private - */ - constructor({ - flushMinDelay = DEFAULT_FLUSH_MIN_DELAY, - flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY, - minReplayDuration = MIN_REPLAY_DURATION, - maxReplayDuration = MAX_REPLAY_DURATION, - stickySession = true, - useCompression = true, - workerUrl, - _experiments = {}, - maskAllText = true, - maskAllInputs = true, - blockAllMedia = true, - mutationBreadcrumbLimit = 750, - mutationLimit = 1e4, - slowClickTimeout = 7e3, - slowClickIgnoreSelectors = [], - networkDetailAllowUrls = [], - networkDetailDenyUrls = [], - networkCaptureBodies = true, - networkRequestHeaders = [], - networkResponseHeaders = [], - mask: mask3 = [], - maskAttributes = ["title", "placeholder"], - unmask = [], - block: block3 = [], - unblock: unblock2 = [], - ignore = [], - maskFn, - beforeAddRecordingEvent, - beforeErrorSampling, - onError - } = {}) { - this.name = Replay.id; - const privacyOptions = getPrivacyOptions({ - mask: mask3, - unmask, - block: block3, - unblock: unblock2, - ignore - }); - this._recordingOptions = { - maskAllInputs, - maskAllText, - maskInputOptions: { password: true }, - maskTextFn: maskFn, - maskInputFn: maskFn, - maskAttributeFn: /* @__PURE__ */ __name((key, value4, el) => maskAttribute({ - maskAttributes, - maskAllText, - privacyOptions, - key, - value: value4, - el - }), "maskAttributeFn"), - ...privacyOptions, - // Our defaults - slimDOMOptions: "all", - inlineStylesheet: true, - // Disable inline images as it will increase segment/replay size - inlineImages: false, - // collect fonts, but be aware that `sentry.io` needs to be an allowed - // origin for playback - collectFonts: true, - errorHandler: /* @__PURE__ */ __name((err) => { - try { - err.__rrweb__ = true; - } catch (error2) { - } - }, "errorHandler") - }; - this._initialOptions = { - flushMinDelay, - flushMaxDelay, - minReplayDuration: Math.min(minReplayDuration, MIN_REPLAY_DURATION_LIMIT), - maxReplayDuration: Math.min(maxReplayDuration, MAX_REPLAY_DURATION), - stickySession, - useCompression, - workerUrl, - blockAllMedia, - maskAllInputs, - maskAllText, - mutationBreadcrumbLimit, - mutationLimit, - slowClickTimeout, - slowClickIgnoreSelectors, - networkDetailAllowUrls, - networkDetailDenyUrls, - networkCaptureBodies, - networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders), - networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders), - beforeAddRecordingEvent, - beforeErrorSampling, - onError, - _experiments - }; - if (this._initialOptions.blockAllMedia) { - this._recordingOptions.blockSelector = !this._recordingOptions.blockSelector ? MEDIA_SELECTORS : `${this._recordingOptions.blockSelector},${MEDIA_SELECTORS}`; - } - if (this._isInitialized && isBrowser$1()) { - throw new Error("Multiple Sentry Session Replay instances are not supported"); - } - this._isInitialized = true; - } - /** If replay has already been initialized */ - get _isInitialized() { - return _initialized; - } - /** Update _isInitialized */ - set _isInitialized(value4) { - _initialized = value4; - } - /** - * Setup and initialize replay container - */ - afterAllSetup(client) { - if (!isBrowser$1() || this._replay) { - return; - } - this._setup(client); - this._initialize(client); - } - /** - * Start a replay regardless of sampling rate. Calling this will always - * create a new session. Will log a message if replay is already in progress. - * - * Creates or loads a session, attaches listeners to varying events (DOM, - * PerformanceObserver, Recording, Sentry SDK, etc) - */ - start() { - if (!this._replay) { - return; - } - this._replay.start(); - } - /** - * Start replay buffering. Buffers until `flush()` is called or, if - * `replaysOnErrorSampleRate` > 0, until an error occurs. - */ - startBuffering() { - if (!this._replay) { - return; - } - this._replay.startBuffering(); - } - /** - * Currently, this needs to be manually called (e.g. for tests). Sentry SDK - * does not support a teardown - */ - stop() { - if (!this._replay) { - return Promise.resolve(); - } - return this._replay.stop({ forceFlush: this._replay.recordingMode === "session" }); - } - /** - * If not in "session" recording mode, flush event buffer which will create a new replay. - * If replay is not enabled, a new session replay is started. - * Unless `continueRecording` is false, the replay will continue to record and - * behave as a "session"-based replay. - * - * Otherwise, queue up a flush. - */ - flush(options4) { - if (!this._replay) { - return Promise.resolve(); - } - if (!this._replay.isEnabled()) { - this._replay.start(); - return Promise.resolve(); - } - return this._replay.sendBufferedReplayOrFlush(options4); - } - /** - * Get the current session ID. - */ - getReplayId() { - if (!this._replay || !this._replay.isEnabled()) { - return; - } - return this._replay.getSessionId(); - } - /** - * Get the current recording mode. This can be either `session` or `buffer`. - * - * `session`: Recording the whole session, sending it continuously - * `buffer`: Always keeping the last 60s of recording, requires: - * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs - * - or calling `flush()` to send the replay - */ - getRecordingMode() { - if (!this._replay || !this._replay.isEnabled()) { - return; - } - return this._replay.recordingMode; - } - /** - * Initializes replay. - */ - _initialize(client) { - if (!this._replay) { - return; - } - this._maybeLoadFromReplayCanvasIntegration(client); - this._replay.initializeSampling(); - } - /** Setup the integration. */ - _setup(client) { - const finalOptions = loadReplayOptionsFromClient(this._initialOptions, client); - this._replay = new ReplayContainer({ - options: finalOptions, - recordingOptions: this._recordingOptions - }); - } - /** Get canvas options from ReplayCanvas integration, if it is also added. */ - _maybeLoadFromReplayCanvasIntegration(client) { - try { - const canvasIntegration = client.getIntegrationByName("ReplayCanvas"); - if (!canvasIntegration) { - return; - } - this._replay["_canvas"] = canvasIntegration.getOptions(); - } catch (e2) { - } - } -} -Replay.__initStatic(); -function loadReplayOptionsFromClient(initialOptions, client) { - const opt = client.getOptions(); - const finalOptions = { - sessionSampleRate: 0, - errorSampleRate: 0, - ...dropUndefinedKeys(initialOptions) - }; - const replaysSessionSampleRate = parseSampleRate(opt.replaysSessionSampleRate); - const replaysOnErrorSampleRate = parseSampleRate(opt.replaysOnErrorSampleRate); - if (replaysSessionSampleRate == null && replaysOnErrorSampleRate == null) { - consoleSandbox(() => { - console.warn( - "Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set." - ); - }); - } - if (replaysSessionSampleRate != null) { - finalOptions.sessionSampleRate = replaysSessionSampleRate; - } - if (replaysOnErrorSampleRate != null) { - finalOptions.errorSampleRate = replaysOnErrorSampleRate; - } - return finalOptions; -} -__name(loadReplayOptionsFromClient, "loadReplayOptionsFromClient"); -function _getMergedNetworkHeaders(headers) { - return [...DEFAULT_NETWORK_HEADERS, ...headers.map((header3) => header3.toLowerCase())]; -} -__name(_getMergedNetworkHeaders, "_getMergedNetworkHeaders"); -function getReplay() { - const client = getClient(); - return client && client.getIntegrationByName("Replay"); -} -__name(getReplay, "getReplay"); -var NodeType$2; -(function(NodeType3) { - NodeType3[NodeType3["Document"] = 0] = "Document"; - NodeType3[NodeType3["DocumentType"] = 1] = "DocumentType"; - NodeType3[NodeType3["Element"] = 2] = "Element"; - NodeType3[NodeType3["Text"] = 3] = "Text"; - NodeType3[NodeType3["CDATA"] = 4] = "CDATA"; - NodeType3[NodeType3["Comment"] = 5] = "Comment"; -})(NodeType$2 || (NodeType$2 = {})); -function elementClassMatchesRegex(el, regex2) { - for (let eIndex = el.classList.length; eIndex--; ) { - const className = el.classList[eIndex]; - if (regex2.test(className)) { - return true; - } - } - return false; -} -__name(elementClassMatchesRegex, "elementClassMatchesRegex"); -function distanceToMatch(node3, matchPredicate, limit = Infinity, distance2 = 0) { - if (!node3) - return -1; - if (node3.nodeType !== node3.ELEMENT_NODE) - return -1; - if (distance2 > limit) - return -1; - if (matchPredicate(node3)) - return distance2; - return distanceToMatch(node3.parentNode, matchPredicate, limit, distance2 + 1); -} -__name(distanceToMatch, "distanceToMatch"); -function createMatchPredicate(className, selector) { - return (node3) => { - const el = node3; - if (el === null) - return false; - try { - if (className) { - if (typeof className === "string") { - if (el.matches(`.${className}`)) - return true; - } else if (elementClassMatchesRegex(el, className)) { - return true; - } - } - if (selector && el.matches(selector)) - return true; - return false; - } catch (e2) { - return false; - } - }; -} -__name(createMatchPredicate, "createMatchPredicate"); -const DEPARTED_MIRROR_ACCESS_WARNING = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording."; -let _mirror = { - map: {}, - getId() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING); - return -1; - }, - getNode() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING); - return null; - }, - removeNodeFromMap() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING); - }, - has() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING); - return false; - }, - reset() { - console.error(DEPARTED_MIRROR_ACCESS_WARNING); - } -}; -if (typeof window !== "undefined" && window.Proxy && window.Reflect) { - _mirror = new Proxy(_mirror, { - get(target, prop2, receiver) { - if (prop2 === "map") { - console.error(DEPARTED_MIRROR_ACCESS_WARNING); - } - return Reflect.get(target, prop2, receiver); - } - }); -} -function hookSetter(target, key, d2, isRevoked, win = window) { - const original = win.Object.getOwnPropertyDescriptor(target, key); - win.Object.defineProperty(target, key, isRevoked ? d2 : { - set(value4) { - setTimeout$1(() => { - d2.set.call(this, value4); - }, 0); - if (original && original.set) { - original.set.call(this, value4); - } - } - }); - return () => hookSetter(target, key, original || {}, true); -} -__name(hookSetter, "hookSetter"); -function patch$1(source, name2, replacement) { - try { - if (!(name2 in source)) { - return () => { - }; - } - const original = source[name2]; - const wrapped = replacement(original); - if (typeof wrapped === "function") { - wrapped.prototype = wrapped.prototype || {}; - Object.defineProperties(wrapped, { - __rrweb_original__: { - enumerable: false, - value: original - } - }); - } - source[name2] = wrapped; - return () => { - source[name2] = original; - }; - } catch (e2) { - return () => { - }; - } -} -__name(patch$1, "patch$1"); -if (!/[1-9][0-9]{12}/.test(Date.now().toString())) ; -function closestElementOfNode(node3) { - if (!node3) { - return null; - } - const el = node3.nodeType === node3.ELEMENT_NODE ? node3 : node3.parentElement; - return el; -} -__name(closestElementOfNode, "closestElementOfNode"); -function isBlocked(node3, blockClass, blockSelector, unblockSelector, checkAncestors) { - if (!node3) { - return false; - } - const el = closestElementOfNode(node3); - if (!el) { - return false; - } - const blockedPredicate = createMatchPredicate(blockClass, blockSelector); - const blockDistance = distanceToMatch(el, blockedPredicate); - let unblockDistance = -1; - if (blockDistance < 0) { - return false; - } - if (unblockSelector) { - unblockDistance = distanceToMatch(el, createMatchPredicate(null, unblockSelector)); - } - if (blockDistance > -1 && unblockDistance < 0) { - return true; - } - return blockDistance < unblockDistance; -} -__name(isBlocked, "isBlocked"); -const cachedImplementations = {}; -function getImplementation(name2) { - const cached = cachedImplementations[name2]; - if (cached) { - return cached; - } - const document2 = window.document; - let impl = window[name2]; - if (document2 && typeof document2.createElement === "function") { - try { - const sandbox = document2.createElement("iframe"); - sandbox.hidden = true; - document2.head.appendChild(sandbox); - const contentWindow = sandbox.contentWindow; - if (contentWindow && contentWindow[name2]) { - impl = contentWindow[name2]; - } - document2.head.removeChild(sandbox); - } catch (e2) { - } - } - return cachedImplementations[name2] = impl.bind(window); -} -__name(getImplementation, "getImplementation"); -function onRequestAnimationFrame(...rest) { - return getImplementation("requestAnimationFrame")(...rest); -} -__name(onRequestAnimationFrame, "onRequestAnimationFrame"); -function setTimeout$1(...rest) { - return getImplementation("setTimeout")(...rest); -} -__name(setTimeout$1, "setTimeout$1"); -var CanvasContext = /* @__PURE__ */ ((CanvasContext2) => { - CanvasContext2[CanvasContext2["2D"] = 0] = "2D"; - CanvasContext2[CanvasContext2["WebGL"] = 1] = "WebGL"; - CanvasContext2[CanvasContext2["WebGL2"] = 2] = "WebGL2"; - return CanvasContext2; -})(CanvasContext || {}); -let errorHandler; -function registerErrorHandler(handler6) { - errorHandler = handler6; -} -__name(registerErrorHandler, "registerErrorHandler"); -const callbackWrapper = /* @__PURE__ */ __name((cb) => { - if (!errorHandler) { - return cb; - } - const rrwebWrapped = /* @__PURE__ */ __name((...rest) => { - try { - return cb(...rest); - } catch (error2) { - if (errorHandler && errorHandler(error2) === true) { - return () => { - }; - } - throw error2; - } - }, "rrwebWrapped"); - return rrwebWrapped; -}, "callbackWrapper"); -var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256); -for (var i$3 = 0; i$3 < chars.length; i$3++) { - lookup[chars.charCodeAt(i$3)] = i$3; -} -var encode$5 = /* @__PURE__ */ __name(function(arraybuffer) { - var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = ""; - for (i2 = 0; i2 < len; i2 += 3) { - base64 += chars[bytes[i2] >> 2]; - base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4]; - base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6]; - base64 += chars[bytes[i2 + 2] & 63]; - } - if (len % 3 === 2) { - base64 = base64.substring(0, base64.length - 1) + "="; - } else if (len % 3 === 1) { - base64 = base64.substring(0, base64.length - 2) + "=="; - } - return base64; -}, "encode$5"); -const canvasVarMap = /* @__PURE__ */ new Map(); -function variableListFor(ctx, ctor) { - let contextMap = canvasVarMap.get(ctx); - if (!contextMap) { - contextMap = /* @__PURE__ */ new Map(); - canvasVarMap.set(ctx, contextMap); - } - if (!contextMap.has(ctor)) { - contextMap.set(ctor, []); - } - return contextMap.get(ctor); -} -__name(variableListFor, "variableListFor"); -const saveWebGLVar = /* @__PURE__ */ __name((value4, win, ctx) => { - if (!value4 || !(isInstanceOfWebGLObject(value4, win) || typeof value4 === "object")) - return; - const name2 = value4.constructor.name; - const list2 = variableListFor(ctx, name2); - let index2 = list2.indexOf(value4); - if (index2 === -1) { - index2 = list2.length; - list2.push(value4); - } - return index2; -}, "saveWebGLVar"); -function serializeArg(value4, win, ctx) { - if (value4 instanceof Array) { - return value4.map((arg) => serializeArg(arg, win, ctx)); - } else if (value4 === null) { - return value4; - } else if (value4 instanceof Float32Array || value4 instanceof Float64Array || value4 instanceof Int32Array || value4 instanceof Uint32Array || value4 instanceof Uint8Array || value4 instanceof Uint16Array || value4 instanceof Int16Array || value4 instanceof Int8Array || value4 instanceof Uint8ClampedArray) { - const name2 = value4.constructor.name; - return { - rr_type: name2, - args: [Object.values(value4)] - }; - } else if (value4 instanceof ArrayBuffer) { - const name2 = value4.constructor.name; - const base64 = encode$5(value4); - return { - rr_type: name2, - base64 - }; - } else if (value4 instanceof DataView) { - const name2 = value4.constructor.name; - return { - rr_type: name2, - args: [ - serializeArg(value4.buffer, win, ctx), - value4.byteOffset, - value4.byteLength - ] - }; - } else if (value4 instanceof HTMLImageElement) { - const name2 = value4.constructor.name; - const { src } = value4; - return { - rr_type: name2, - src - }; - } else if (value4 instanceof HTMLCanvasElement) { - const name2 = "HTMLImageElement"; - const src = value4.toDataURL(); - return { - rr_type: name2, - src - }; - } else if (value4 instanceof ImageData) { - const name2 = value4.constructor.name; - return { - rr_type: name2, - args: [serializeArg(value4.data, win, ctx), value4.width, value4.height] - }; - } else if (isInstanceOfWebGLObject(value4, win) || typeof value4 === "object") { - const name2 = value4.constructor.name; - const index2 = saveWebGLVar(value4, win, ctx); - return { - rr_type: name2, - index: index2 - }; - } - return value4; -} -__name(serializeArg, "serializeArg"); -const serializeArgs = /* @__PURE__ */ __name((args, win, ctx) => { - return args.map((arg) => serializeArg(arg, win, ctx)); -}, "serializeArgs"); -const isInstanceOfWebGLObject = /* @__PURE__ */ __name((value4, win) => { - const webGLConstructorNames = [ - "WebGLActiveInfo", - "WebGLBuffer", - "WebGLFramebuffer", - "WebGLProgram", - "WebGLRenderbuffer", - "WebGLShader", - "WebGLShaderPrecisionFormat", - "WebGLTexture", - "WebGLUniformLocation", - "WebGLVertexArrayObject", - "WebGLVertexArrayObjectOES" - ]; - const supportedWebGLConstructorNames = webGLConstructorNames.filter((name2) => typeof win[name2] === "function"); - return Boolean(supportedWebGLConstructorNames.find((name2) => value4 instanceof win[name2])); -}, "isInstanceOfWebGLObject"); -function initCanvas2DMutationObserver(cb, win, blockClass, blockSelector, unblockSelector) { - const handlers2 = []; - const props2D = Object.getOwnPropertyNames(win.CanvasRenderingContext2D.prototype); - for (const prop2 of props2D) { - try { - if (typeof win.CanvasRenderingContext2D.prototype[prop2] !== "function") { - continue; - } - const restoreHandler = patch$1(win.CanvasRenderingContext2D.prototype, prop2, function(original) { - return function(...args) { - if (!isBlocked(this.canvas, blockClass, blockSelector, unblockSelector, true)) { - setTimeout$1(() => { - const recordArgs = serializeArgs(args, win, this); - cb(this.canvas, { - type: CanvasContext["2D"], - property: prop2, - args: recordArgs - }); - }, 0); - } - return original.apply(this, args); - }; - }); - handlers2.push(restoreHandler); - } catch (e2) { - const hookHandler = hookSetter(win.CanvasRenderingContext2D.prototype, prop2, { - set(v2) { - cb(this.canvas, { - type: CanvasContext["2D"], - property: prop2, - args: [v2], - setter: true - }); - } - }); - handlers2.push(hookHandler); - } - } - return () => { - handlers2.forEach((h2) => h2()); - }; -} -__name(initCanvas2DMutationObserver, "initCanvas2DMutationObserver"); -function getNormalizedContextName(contextType) { - return contextType === "experimental-webgl" ? "webgl" : contextType; -} -__name(getNormalizedContextName, "getNormalizedContextName"); -function initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, setPreserveDrawingBufferToTrue) { - const handlers2 = []; - try { - const restoreHandler = patch$1(win.HTMLCanvasElement.prototype, "getContext", function(original) { - return function(contextType, ...args) { - if (!isBlocked(this, blockClass, blockSelector, unblockSelector, true)) { - const ctxName = getNormalizedContextName(contextType); - if (!("__context" in this)) - this.__context = ctxName; - if (setPreserveDrawingBufferToTrue && ["webgl", "webgl2"].includes(ctxName)) { - if (args[0] && typeof args[0] === "object") { - const contextAttributes = args[0]; - if (!contextAttributes.preserveDrawingBuffer) { - contextAttributes.preserveDrawingBuffer = true; - } - } else { - args.splice(0, 1, { - preserveDrawingBuffer: true - }); - } - } - } - return original.apply(this, [contextType, ...args]); - }; - }); - handlers2.push(restoreHandler); - } catch (e2) { - console.error("failed to patch HTMLCanvasElement.prototype.getContext"); - } - return () => { - handlers2.forEach((h2) => h2()); - }; -} -__name(initCanvasContextObserver, "initCanvasContextObserver"); -function patchGLPrototype(prototype2, type, cb, blockClass, blockSelector, unblockSelector, mirror2, win) { - const handlers2 = []; - const props = Object.getOwnPropertyNames(prototype2); - for (const prop2 of props) { - if ([ - "isContextLost", - "canvas", - "drawingBufferWidth", - "drawingBufferHeight" - ].includes(prop2)) { - continue; - } - try { - if (typeof prototype2[prop2] !== "function") { - continue; - } - const restoreHandler = patch$1(prototype2, prop2, function(original) { - return function(...args) { - const result = original.apply(this, args); - saveWebGLVar(result, win, this); - if ("tagName" in this.canvas && !isBlocked(this.canvas, blockClass, blockSelector, unblockSelector, true)) { - const recordArgs = serializeArgs(args, win, this); - const mutation = { - type, - property: prop2, - args: recordArgs - }; - cb(this.canvas, mutation); - } - return result; - }; - }); - handlers2.push(restoreHandler); - } catch (e2) { - const hookHandler = hookSetter(prototype2, prop2, { - set(v2) { - cb(this.canvas, { - type, - property: prop2, - args: [v2], - setter: true - }); - } - }); - handlers2.push(hookHandler); - } - } - return handlers2; -} -__name(patchGLPrototype, "patchGLPrototype"); -function initCanvasWebGLMutationObserver(cb, win, blockClass, blockSelector, unblockSelector, mirror2) { - const handlers2 = []; - handlers2.push(...patchGLPrototype(win.WebGLRenderingContext.prototype, CanvasContext.WebGL, cb, blockClass, blockSelector, unblockSelector, mirror2, win)); - if (typeof win.WebGL2RenderingContext !== "undefined") { - handlers2.push(...patchGLPrototype(win.WebGL2RenderingContext.prototype, CanvasContext.WebGL2, cb, blockClass, blockSelector, unblockSelector, mirror2, win)); - } - return () => { - handlers2.forEach((h2) => h2()); - }; -} -__name(initCanvasWebGLMutationObserver, "initCanvasWebGLMutationObserver"); -var r$2 = `for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`; -function t$2() { - const t2 = new Blob([r$2]); - return URL.createObjectURL(t2); -} -__name(t$2, "t$2"); -class CanvasManager { - static { - __name(this, "CanvasManager"); - } - reset() { - this.pendingCanvasMutations.clear(); - this.restoreHandlers.forEach((handler6) => { - try { - handler6(); - } catch (e2) { - } - }); - this.restoreHandlers = []; - this.windowsSet = /* @__PURE__ */ new WeakSet(); - this.windows = []; - this.shadowDoms = /* @__PURE__ */ new Set(); - _optionalChain([this, "access", (_2) => _2.worker, "optionalAccess", (_2) => _2.terminate, "call", (_3) => _3()]); - this.worker = null; - this.snapshotInProgressMap = /* @__PURE__ */ new Map(); - } - freeze() { - this.frozen = true; - } - unfreeze() { - this.frozen = false; - } - lock() { - this.locked = true; - } - unlock() { - this.locked = false; - } - constructor(options4) { - this.pendingCanvasMutations = /* @__PURE__ */ new Map(); - this.rafStamps = { latestId: 0, invokeId: null }; - this.shadowDoms = /* @__PURE__ */ new Set(); - this.windowsSet = /* @__PURE__ */ new WeakSet(); - this.windows = []; - this.restoreHandlers = []; - this.frozen = false; - this.locked = false; - this.snapshotInProgressMap = /* @__PURE__ */ new Map(); - this.worker = null; - this.processMutation = (target, mutation) => { - const newFrame = this.rafStamps.invokeId && this.rafStamps.latestId !== this.rafStamps.invokeId; - if (newFrame || !this.rafStamps.invokeId) - this.rafStamps.invokeId = this.rafStamps.latestId; - if (!this.pendingCanvasMutations.has(target)) { - this.pendingCanvasMutations.set(target, []); - } - this.pendingCanvasMutations.get(target).push(mutation); - }; - const { sampling = "all", win, blockClass, blockSelector, unblockSelector, maxCanvasSize, recordCanvas, dataURLOptions, errorHandler: errorHandler2 } = options4; - this.mutationCb = options4.mutationCb; - this.mirror = options4.mirror; - this.options = options4; - if (errorHandler2) { - registerErrorHandler(errorHandler2); - } - if (recordCanvas && typeof sampling === "number" || options4.enableManualSnapshot) { - this.worker = this.initFPSWorker(); - } - this.addWindow(win); - if (options4.enableManualSnapshot) { - return; - } - callbackWrapper(() => { - if (recordCanvas && sampling === "all") { - this.startRAFTimestamping(); - this.startPendingCanvasMutationFlusher(); - } - if (recordCanvas && typeof sampling === "number") { - this.initCanvasFPSObserver(sampling, blockClass, blockSelector, unblockSelector, maxCanvasSize, { - dataURLOptions - }); - } - })(); - } - addWindow(win) { - const { sampling = "all", blockClass, blockSelector, unblockSelector, recordCanvas, enableManualSnapshot } = this.options; - if (this.windowsSet.has(win)) - return; - if (enableManualSnapshot) { - this.windowsSet.add(win); - this.windows.push(new WeakRef(win)); - return; - } - callbackWrapper(() => { - if (recordCanvas && sampling === "all") { - this.initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector); - } - if (recordCanvas && typeof sampling === "number") { - const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, true); - this.restoreHandlers.push(() => { - canvasContextReset(); - }); - } - })(); - this.windowsSet.add(win); - this.windows.push(new WeakRef(win)); - } - addShadowRoot(shadowRoot) { - this.shadowDoms.add(new WeakRef(shadowRoot)); - } - resetShadowRoots() { - this.shadowDoms = /* @__PURE__ */ new Set(); - } - initFPSWorker() { - const worker = new Worker(t$2()); - worker.onmessage = (e2) => { - const data25 = e2.data; - const { id: id3 } = data25; - this.snapshotInProgressMap.set(id3, false); - if (!("base64" in data25)) - return; - const { base64, type, width: width2, height } = data25; - this.mutationCb({ - id: id3, - type: CanvasContext["2D"], - commands: [ - { - property: "clearRect", - args: [0, 0, width2, height] - }, - { - property: "drawImage", - args: [ - { - rr_type: "ImageBitmap", - args: [ - { - rr_type: "Blob", - data: [{ rr_type: "ArrayBuffer", base64 }], - type - } - ] - }, - 0, - 0, - width2, - height - ] - } - ] - }); - }; - return worker; - } - initCanvasFPSObserver(fps, blockClass, blockSelector, unblockSelector, maxCanvasSize, options4) { - const rafId = this.takeSnapshot(false, fps, blockClass, blockSelector, unblockSelector, maxCanvasSize, options4.dataURLOptions); - this.restoreHandlers.push(() => { - cancelAnimationFrame(rafId); - }); - } - initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector) { - const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, false); - const canvas2DReset = initCanvas2DMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, unblockSelector); - const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, unblockSelector, this.mirror); - this.restoreHandlers.push(() => { - canvasContextReset(); - canvas2DReset(); - canvasWebGL1and2Reset(); - }); - } - snapshot(canvasElement) { - const { options: options4 } = this; - const rafId = this.takeSnapshot(true, options4.sampling === "all" ? 2 : options4.sampling || 2, options4.blockClass, options4.blockSelector, options4.unblockSelector, options4.maxCanvasSize, options4.dataURLOptions, canvasElement); - this.restoreHandlers.push(() => { - cancelAnimationFrame(rafId); - }); - } - takeSnapshot(isManualSnapshot, fps, blockClass, blockSelector, unblockSelector, maxCanvasSize, dataURLOptions, canvasElement) { - const timeBetweenSnapshots = 1e3 / fps; - let lastSnapshotTime = 0; - let rafId; - const getCanvas = /* @__PURE__ */ __name((canvasElement2) => { - if (canvasElement2) { - return [canvasElement2]; - } - const matchedCanvas = []; - const searchCanvas = /* @__PURE__ */ __name((root27) => { - root27.querySelectorAll("canvas").forEach((canvas) => { - if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector)) { - matchedCanvas.push(canvas); - } - }); - }, "searchCanvas"); - for (const item3 of this.windows) { - const window2 = item3.deref(); - if (window2) { - searchCanvas(window2.document); - } - } - for (const item3 of this.shadowDoms) { - const shadowRoot = item3.deref(); - if (shadowRoot) { - searchCanvas(shadowRoot); - } - } - return matchedCanvas; - }, "getCanvas"); - const takeCanvasSnapshots = /* @__PURE__ */ __name((timestamp2) => { - if (!this.windows.length) { - return; - } - if (lastSnapshotTime && timestamp2 - lastSnapshotTime < timeBetweenSnapshots) { - rafId = onRequestAnimationFrame(takeCanvasSnapshots); - return; - } - lastSnapshotTime = timestamp2; - getCanvas(canvasElement).forEach((canvas) => { - if (!this.mirror.hasNode(canvas)) { - return; - } - const id3 = this.mirror.getId(canvas); - if (this.snapshotInProgressMap.get(id3)) - return; - if (!canvas.width || !canvas.height) - return; - this.snapshotInProgressMap.set(id3, true); - if (!isManualSnapshot && ["webgl", "webgl2"].includes(canvas.__context)) { - const context = canvas.getContext(canvas.__context); - if (_optionalChain([context, "optionalAccess", (_4) => _4.getContextAttributes, "call", (_5) => _5(), "optionalAccess", (_6) => _6.preserveDrawingBuffer]) === false) { - context.clear(context.COLOR_BUFFER_BIT); - } - } - createImageBitmap(canvas).then((bitmap) => { - _optionalChain([this, "access", (_7) => _7.worker, "optionalAccess", (_8) => _8.postMessage, "call", (_9) => _9({ - id: id3, - bitmap, - width: canvas.width, - height: canvas.height, - dataURLOptions, - maxCanvasSize - }, [bitmap])]); - }).catch((error2) => { - callbackWrapper(() => { - throw error2; - })(); - }); - }); - if (!isManualSnapshot) { - rafId = onRequestAnimationFrame(takeCanvasSnapshots); - } - }, "takeCanvasSnapshots"); - rafId = onRequestAnimationFrame(takeCanvasSnapshots); - return rafId; - } - startPendingCanvasMutationFlusher() { - onRequestAnimationFrame(() => this.flushPendingCanvasMutations()); - } - startRAFTimestamping() { - const setLatestRAFTimestamp = /* @__PURE__ */ __name((timestamp2) => { - this.rafStamps.latestId = timestamp2; - onRequestAnimationFrame(setLatestRAFTimestamp); - }, "setLatestRAFTimestamp"); - onRequestAnimationFrame(setLatestRAFTimestamp); - } - flushPendingCanvasMutations() { - this.pendingCanvasMutations.forEach((values, canvas) => { - const id3 = this.mirror.getId(canvas); - this.flushPendingCanvasMutationFor(canvas, id3); - }); - onRequestAnimationFrame(() => this.flushPendingCanvasMutations()); - } - flushPendingCanvasMutationFor(canvas, id3) { - if (this.frozen || this.locked) { - return; - } - const valuesWithType = this.pendingCanvasMutations.get(canvas); - if (!valuesWithType || id3 === -1) - return; - const values = valuesWithType.map((value4) => { - const { type: type2, ...rest } = value4; - return rest; - }); - const { type } = valuesWithType[0]; - this.mutationCb({ id: id3, type, commands: values }); - this.pendingCanvasMutations.delete(canvas); - } -} -const CANVAS_QUALITY = { - low: { - sampling: { - canvas: 1 - }, - dataURLOptions: { - type: "image/webp", - quality: 0.25 - } - }, - medium: { - sampling: { - canvas: 2 - }, - dataURLOptions: { - type: "image/webp", - quality: 0.4 - } - }, - high: { - sampling: { - canvas: 4 - }, - dataURLOptions: { - type: "image/webp", - quality: 0.5 - } - } -}; -const INTEGRATION_NAME$3 = "ReplayCanvas"; -const DEFAULT_MAX_CANVAS_SIZE = 1280; -const _replayCanvasIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const [maxCanvasWidth, maxCanvasHeight] = options4.maxCanvasSize || []; - const _canvasOptions = { - quality: options4.quality || "medium", - enableManualSnapshot: options4.enableManualSnapshot, - maxCanvasSize: [ - maxCanvasWidth ? Math.min(maxCanvasWidth, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE, - maxCanvasHeight ? Math.min(maxCanvasHeight, DEFAULT_MAX_CANVAS_SIZE) : DEFAULT_MAX_CANVAS_SIZE - ] - }; - let canvasManagerResolve; - const _canvasManager = new Promise((resolve2) => canvasManagerResolve = resolve2); - return { - name: INTEGRATION_NAME$3, - getOptions() { - const { quality, enableManualSnapshot, maxCanvasSize } = _canvasOptions; - return { - enableManualSnapshot, - recordCanvas: true, - getCanvasManager: /* @__PURE__ */ __name((getCanvasManagerOptions) => { - const manager = new CanvasManager({ - ...getCanvasManagerOptions, - enableManualSnapshot, - maxCanvasSize, - errorHandler: /* @__PURE__ */ __name((err) => { - try { - if (typeof err === "object") { - err.__rrweb__ = true; - } - } catch (error2) { - } - }, "errorHandler") - }); - canvasManagerResolve(manager); - return manager; - }, "getCanvasManager"), - ...CANVAS_QUALITY[quality || "medium"] || CANVAS_QUALITY.medium - }; - }, - async snapshot(canvasElement) { - const canvasManager = await _canvasManager; - canvasManager.snapshot(canvasElement); - } - }; -}, "_replayCanvasIntegration"); -const replayCanvasIntegration = defineIntegration( - _replayCanvasIntegration -); -const WINDOW = GLOBAL_OBJ; -const DOCUMENT = WINDOW.document; -const NAVIGATOR = WINDOW.navigator; -const TRIGGER_LABEL = "Report a Bug"; -const CANCEL_BUTTON_LABEL = "Cancel"; -const SUBMIT_BUTTON_LABEL = "Send Bug Report"; -const CONFIRM_BUTTON_LABEL = "Confirm"; -const FORM_TITLE = "Report a Bug"; -const EMAIL_PLACEHOLDER = "your.email@example.org"; -const EMAIL_LABEL = "Email"; -const MESSAGE_PLACEHOLDER = "What's the bug? What did you expect?"; -const MESSAGE_LABEL = "Description"; -const NAME_PLACEHOLDER = "Your Name"; -const NAME_LABEL = "Name"; -const SUCCESS_MESSAGE_TEXT = "Thank you for your report!"; -const IS_REQUIRED_LABEL = "(required)"; -const ADD_SCREENSHOT_LABEL = "Add a screenshot"; -const REMOVE_SCREENSHOT_LABEL = "Remove screenshot"; -const FEEDBACK_WIDGET_SOURCE = "widget"; -const FEEDBACK_API_SOURCE = "api"; -const SUCCESS_MESSAGE_TIMEOUT = 5e3; -const sendFeedback = /* @__PURE__ */ __name((params, hint = { includeReplay: true }) => { - if (!params.message) { - throw new Error("Unable to submit feedback with empty message"); - } - const client = getClient(); - if (!client) { - throw new Error("No client setup, cannot send feedback."); - } - if (params.tags && Object.keys(params.tags).length) { - getCurrentScope$1().setTags(params.tags); - } - const eventId = captureFeedback( - { - source: FEEDBACK_API_SOURCE, - url: getLocationHref(), - ...params - }, - hint - ); - return new Promise((resolve2, reject3) => { - const timeout = setTimeout(() => reject3("Unable to determine if Feedback was correctly sent."), 5e3); - const cleanup = client.on("afterSendEvent", (event, response) => { - if (event.event_id !== eventId) { - return; - } - clearTimeout(timeout); - cleanup(); - if (response && typeof response.statusCode === "number" && response.statusCode >= 200 && response.statusCode < 300) { - return resolve2(eventId); - } - if (response && typeof response.statusCode === "number" && response.statusCode === 0) { - return reject3( - "Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker." - ); - } - if (response && typeof response.statusCode === "number" && response.statusCode === 403) { - return reject3( - "Unable to send Feedback. This could be because this domain is not in your list of allowed domains." - ); - } - return reject3( - "Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker" - ); - }); - }); -}, "sendFeedback"); -const DEBUG_BUILD$1 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; -function isScreenshotSupported() { - if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(NAVIGATOR.userAgent)) { - return false; - } - if (/Macintosh/i.test(NAVIGATOR.userAgent) && NAVIGATOR.maxTouchPoints && NAVIGATOR.maxTouchPoints > 1) { - return false; - } - if (!isSecureContext) { - return false; - } - return true; -} -__name(isScreenshotSupported, "isScreenshotSupported"); -function mergeOptions$2(defaultOptions2, optionOverrides) { - return { - ...defaultOptions2, - ...optionOverrides, - tags: { - ...defaultOptions2.tags, - ...optionOverrides.tags - }, - onFormOpen: /* @__PURE__ */ __name(() => { - optionOverrides.onFormOpen && optionOverrides.onFormOpen(); - defaultOptions2.onFormOpen && defaultOptions2.onFormOpen(); - }, "onFormOpen"), - onFormClose: /* @__PURE__ */ __name(() => { - optionOverrides.onFormClose && optionOverrides.onFormClose(); - defaultOptions2.onFormClose && defaultOptions2.onFormClose(); - }, "onFormClose"), - onSubmitSuccess: /* @__PURE__ */ __name((data25) => { - optionOverrides.onSubmitSuccess && optionOverrides.onSubmitSuccess(data25); - defaultOptions2.onSubmitSuccess && defaultOptions2.onSubmitSuccess(data25); - }, "onSubmitSuccess"), - onSubmitError: /* @__PURE__ */ __name((error2) => { - optionOverrides.onSubmitError && optionOverrides.onSubmitError(error2); - defaultOptions2.onSubmitError && defaultOptions2.onSubmitError(error2); - }, "onSubmitError"), - onFormSubmitted: /* @__PURE__ */ __name(() => { - optionOverrides.onFormSubmitted && optionOverrides.onFormSubmitted(); - defaultOptions2.onFormSubmitted && defaultOptions2.onFormSubmitted(); - }, "onFormSubmitted"), - themeDark: { - ...defaultOptions2.themeDark, - ...optionOverrides.themeDark - }, - themeLight: { - ...defaultOptions2.themeLight, - ...optionOverrides.themeLight - } - }; -} -__name(mergeOptions$2, "mergeOptions$2"); -function createActorStyles(styleNonce) { - const style2 = DOCUMENT.createElement("style"); - style2.textContent = ` -.widget__actor { - position: fixed; - z-index: var(--z-index); - margin: var(--page-margin); - inset: var(--actor-inset); - - display: flex; - align-items: center; - gap: 8px; - padding: 16px; - - font-family: inherit; - font-size: var(--font-size); - font-weight: 600; - line-height: 1.14em; - text-decoration: none; - - background: var(--actor-background, var(--background)); - border-radius: var(--actor-border-radius, 1.7em/50%); - border: var(--actor-border, var(--border)); - box-shadow: var(--actor-box-shadow, var(--box-shadow)); - color: var(--actor-color, var(--foreground)); - fill: var(--actor-color, var(--foreground)); - cursor: pointer; - opacity: 1; - transition: transform 0.2s ease-in-out; - transform: translate(0, 0) scale(1); -} -.widget__actor[aria-hidden="true"] { - opacity: 0; - pointer-events: none; - visibility: hidden; - transform: translate(0, 16px) scale(0.98); -} - -.widget__actor:hover { - background: var(--actor-hover-background, var(--background)); - filter: var(--interactive-filter); -} - -.widget__actor svg { - width: 1.14em; - height: 1.14em; -} - -@media (max-width: 600px) { - .widget__actor span { - display: none; - } -} -`; - if (styleNonce) { - style2.setAttribute("nonce", styleNonce); - } - return style2; -} -__name(createActorStyles, "createActorStyles"); -function setAttributesNS(el, attributes) { - Object.entries(attributes).forEach(([key, val]) => { - el.setAttributeNS(null, key, val); - }); - return el; -} -__name(setAttributesNS, "setAttributesNS"); -const SIZE$1 = 20; -const XMLNS$2 = "http://www.w3.org/2000/svg"; -function FeedbackIcon() { - const createElementNS = /* @__PURE__ */ __name((tagName) => WINDOW.document.createElementNS(XMLNS$2, tagName), "createElementNS"); - const svg = setAttributesNS(createElementNS("svg"), { - width: `${SIZE$1}`, - height: `${SIZE$1}`, - viewBox: `0 0 ${SIZE$1} ${SIZE$1}`, - fill: "var(--actor-color, var(--foreground))" - }); - const g2 = setAttributesNS(createElementNS("g"), { - clipPath: "url(#clip0_57_80)" - }); - const path = setAttributesNS(createElementNS("path"), { - ["fill-rule"]: "evenodd", - ["clip-rule"]: "evenodd", - d: "M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z" - }); - svg.appendChild(g2).appendChild(path); - const speakerDefs = createElementNS("defs"); - const speakerClipPathDef = setAttributesNS(createElementNS("clipPath"), { - id: "clip0_57_80" - }); - const speakerRect = setAttributesNS(createElementNS("rect"), { - width: `${SIZE$1}`, - height: `${SIZE$1}`, - fill: "white" - }); - speakerClipPathDef.appendChild(speakerRect); - speakerDefs.appendChild(speakerClipPathDef); - svg.appendChild(speakerDefs).appendChild(speakerClipPathDef).appendChild(speakerRect); - return svg; -} -__name(FeedbackIcon, "FeedbackIcon"); -function Actor({ triggerLabel, triggerAriaLabel, shadow, styleNonce }) { - const el = DOCUMENT.createElement("button"); - el.type = "button"; - el.className = "widget__actor"; - el.ariaHidden = "false"; - el.ariaLabel = triggerAriaLabel || triggerLabel || TRIGGER_LABEL; - el.appendChild(FeedbackIcon()); - if (triggerLabel) { - const label5 = DOCUMENT.createElement("span"); - label5.appendChild(DOCUMENT.createTextNode(triggerLabel)); - el.appendChild(label5); - } - const style2 = createActorStyles(styleNonce); - return { - el, - appendToDom() { - shadow.appendChild(style2); - shadow.appendChild(el); - }, - removeFromDom() { - shadow.removeChild(el); - shadow.removeChild(style2); - }, - show() { - el.ariaHidden = "false"; - }, - hide() { - el.ariaHidden = "true"; - } - }; -} -__name(Actor, "Actor"); -const PURPLE = "rgba(88, 74, 192, 1)"; -const DEFAULT_LIGHT = { - foreground: "#2b2233", - background: "#ffffff", - accentForeground: "white", - accentBackground: PURPLE, - successColor: "#268d75", - errorColor: "#df3338", - border: "1.5px solid rgba(41, 35, 47, 0.13)", - boxShadow: "0px 4px 24px 0px rgba(43, 34, 51, 0.12)", - outline: "1px auto var(--accent-background)", - interactiveFilter: "brightness(95%)" -}; -const DEFAULT_DARK = { - foreground: "#ebe6ef", - background: "#29232f", - accentForeground: "white", - accentBackground: PURPLE, - successColor: "#2da98c", - errorColor: "#f55459", - border: "1.5px solid rgba(235, 230, 239, 0.15)", - boxShadow: "0px 4px 24px 0px rgba(43, 34, 51, 0.12)", - outline: "1px auto var(--accent-background)", - interactiveFilter: "brightness(150%)" -}; -function getThemedCssVariables(theme42) { - return ` - --foreground: ${theme42.foreground}; - --background: ${theme42.background}; - --accent-foreground: ${theme42.accentForeground}; - --accent-background: ${theme42.accentBackground}; - --success-color: ${theme42.successColor}; - --error-color: ${theme42.errorColor}; - --border: ${theme42.border}; - --box-shadow: ${theme42.boxShadow}; - --outline: ${theme42.outline}; - --interactive-filter: ${theme42.interactiveFilter}; - `; -} -__name(getThemedCssVariables, "getThemedCssVariables"); -function createMainStyles({ - colorScheme, - themeDark, - themeLight, - styleNonce -}) { - const style2 = DOCUMENT.createElement("style"); - style2.textContent = ` -:host { - --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif; - --font-size: 14px; - --z-index: 100000; - - --page-margin: 16px; - --inset: auto 0 0 auto; - --actor-inset: var(--inset); - - font-family: var(--font-family); - font-size: var(--font-size); - - ${colorScheme !== "system" ? "color-scheme: only light;" : ""} - - ${getThemedCssVariables( - colorScheme === "dark" ? { ...DEFAULT_DARK, ...themeDark } : { ...DEFAULT_LIGHT, ...themeLight } - )} -} - -${colorScheme === "system" ? ` -@media (prefers-color-scheme: dark) { - :host { - ${getThemedCssVariables({ ...DEFAULT_DARK, ...themeDark })} - } -}` : ""} -} -`; - if (styleNonce) { - style2.setAttribute("nonce", styleNonce); - } - return style2; -} -__name(createMainStyles, "createMainStyles"); -const buildFeedbackIntegration = /* @__PURE__ */ __name(({ - lazyLoadIntegration: lazyLoadIntegration2, - getModalIntegration, - getScreenshotIntegration -}) => { - const feedbackIntegration = /* @__PURE__ */ __name(({ - // FeedbackGeneralConfiguration - id: id3 = "sentry-feedback", - autoInject = true, - showBranding = true, - isEmailRequired = false, - isNameRequired = false, - showEmail = true, - showName = true, - enableScreenshot = true, - useSentryUser = { - email: "email", - name: "username" - }, - tags, - styleNonce, - scriptNonce, - // FeedbackThemeConfiguration - colorScheme = "system", - themeLight = {}, - themeDark = {}, - // FeedbackTextConfiguration - addScreenshotButtonLabel = ADD_SCREENSHOT_LABEL, - cancelButtonLabel = CANCEL_BUTTON_LABEL, - confirmButtonLabel = CONFIRM_BUTTON_LABEL, - emailLabel = EMAIL_LABEL, - emailPlaceholder = EMAIL_PLACEHOLDER, - formTitle = FORM_TITLE, - isRequiredLabel = IS_REQUIRED_LABEL, - messageLabel = MESSAGE_LABEL, - messagePlaceholder = MESSAGE_PLACEHOLDER, - nameLabel = NAME_LABEL, - namePlaceholder = NAME_PLACEHOLDER, - removeScreenshotButtonLabel = REMOVE_SCREENSHOT_LABEL, - submitButtonLabel = SUBMIT_BUTTON_LABEL, - successMessageText = SUCCESS_MESSAGE_TEXT, - triggerLabel = TRIGGER_LABEL, - triggerAriaLabel = "", - // FeedbackCallbacks - onFormOpen, - onFormClose, - onSubmitSuccess, - onSubmitError, - onFormSubmitted - } = {}) => { - const _options = { - id: id3, - autoInject, - showBranding, - isEmailRequired, - isNameRequired, - showEmail, - showName, - enableScreenshot, - useSentryUser, - tags, - styleNonce, - scriptNonce, - colorScheme, - themeDark, - themeLight, - triggerLabel, - triggerAriaLabel, - cancelButtonLabel, - submitButtonLabel, - confirmButtonLabel, - formTitle, - emailLabel, - emailPlaceholder, - messageLabel, - messagePlaceholder, - nameLabel, - namePlaceholder, - successMessageText, - isRequiredLabel, - addScreenshotButtonLabel, - removeScreenshotButtonLabel, - onFormClose, - onFormOpen, - onSubmitError, - onSubmitSuccess, - onFormSubmitted - }; - let _shadow = null; - let _subscriptions = []; - const _createShadow = /* @__PURE__ */ __name((options4) => { - if (!_shadow) { - const host = DOCUMENT.createElement("div"); - host.id = String(options4.id); - DOCUMENT.body.appendChild(host); - _shadow = host.attachShadow({ mode: "open" }); - _shadow.appendChild(createMainStyles(options4)); - } - return _shadow; - }, "_createShadow"); - const _loadAndRenderDialog = /* @__PURE__ */ __name(async (options4) => { - const screenshotRequired = options4.enableScreenshot && isScreenshotSupported(); - let modalIntegration; - let screenshotIntegration; - try { - const modalIntegrationFn = getModalIntegration ? getModalIntegration() : await lazyLoadIntegration2("feedbackModalIntegration", scriptNonce); - modalIntegration = modalIntegrationFn(); - addIntegration(modalIntegration); - } catch (e2) { - DEBUG_BUILD$1 && logger$2.error( - "[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`." - ); - throw new Error("[Feedback] Missing feedback modal integration!"); - } - try { - const screenshotIntegrationFn = screenshotRequired ? getScreenshotIntegration ? getScreenshotIntegration() : await lazyLoadIntegration2("feedbackScreenshotIntegration", scriptNonce) : void 0; - if (screenshotIntegrationFn) { - screenshotIntegration = screenshotIntegrationFn(); - addIntegration(screenshotIntegration); - } - } catch (e2) { - DEBUG_BUILD$1 && logger$2.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots."); - } - const dialog = modalIntegration.createDialog({ - options: { - ...options4, - onFormClose: /* @__PURE__ */ __name(() => { - dialog && dialog.close(); - options4.onFormClose && options4.onFormClose(); - }, "onFormClose"), - onFormSubmitted: /* @__PURE__ */ __name(() => { - dialog && dialog.close(); - options4.onFormSubmitted && options4.onFormSubmitted(); - }, "onFormSubmitted") - }, - screenshotIntegration, - sendFeedback, - shadow: _createShadow(options4) - }); - return dialog; - }, "_loadAndRenderDialog"); - const _attachTo = /* @__PURE__ */ __name((el, optionOverrides = {}) => { - const mergedOptions = mergeOptions$2(_options, optionOverrides); - const targetEl = typeof el === "string" ? DOCUMENT.querySelector(el) : typeof el.addEventListener === "function" ? el : null; - if (!targetEl) { - DEBUG_BUILD$1 && logger$2.error("[Feedback] Unable to attach to target element"); - throw new Error("Unable to attach to target element"); - } - let dialog = null; - const handleClick2 = /* @__PURE__ */ __name(async () => { - if (!dialog) { - dialog = await _loadAndRenderDialog({ - ...mergedOptions, - onFormSubmitted: /* @__PURE__ */ __name(() => { - dialog && dialog.removeFromDom(); - mergedOptions.onFormSubmitted && mergedOptions.onFormSubmitted(); - }, "onFormSubmitted") - }); - } - dialog.appendToDom(); - dialog.open(); - }, "handleClick"); - targetEl.addEventListener("click", handleClick2); - const unsubscribe = /* @__PURE__ */ __name(() => { - _subscriptions = _subscriptions.filter((sub) => sub !== unsubscribe); - dialog && dialog.removeFromDom(); - dialog = null; - targetEl.removeEventListener("click", handleClick2); - }, "unsubscribe"); - _subscriptions.push(unsubscribe); - return unsubscribe; - }, "_attachTo"); - const _createActor = /* @__PURE__ */ __name((optionOverrides = {}) => { - const mergedOptions = mergeOptions$2(_options, optionOverrides); - const shadow = _createShadow(mergedOptions); - const actor = Actor({ - triggerLabel: mergedOptions.triggerLabel, - triggerAriaLabel: mergedOptions.triggerAriaLabel, - shadow, - styleNonce - }); - _attachTo(actor.el, { - ...mergedOptions, - onFormOpen() { - actor.hide(); - }, - onFormClose() { - actor.show(); - }, - onFormSubmitted() { - actor.show(); - } - }); - return actor; - }, "_createActor"); - return { - name: "Feedback", - setupOnce() { - if (!isBrowser$1() || !_options.autoInject) { - return; - } - if (DOCUMENT.readyState === "loading") { - DOCUMENT.addEventListener("DOMContentLoaded", () => _createActor().appendToDom()); - } else { - _createActor().appendToDom(); - } - }, - /** - * Adds click listener to the element to open a feedback dialog - * - * The returned function can be used to remove the click listener - */ - attachTo: _attachTo, - /** - * Creates a new widget which is composed of a Button which triggers a Dialog. - * Accepts partial options to override any options passed to constructor. - */ - createWidget(optionOverrides = {}) { - const actor = _createActor(mergeOptions$2(_options, optionOverrides)); - actor.appendToDom(); - return actor; - }, - /** - * Creates a new Form which you can - * Accepts partial options to override any options passed to constructor. - */ - async createForm(optionOverrides = {}) { - return _loadAndRenderDialog(mergeOptions$2(_options, optionOverrides)); - }, - /** - * Removes the Feedback integration (including host, shadow DOM, and all widgets) - */ - remove() { - if (_shadow) { - _shadow.parentElement && _shadow.parentElement.remove(); - _shadow = null; - } - _subscriptions.forEach((sub) => sub()); - _subscriptions = []; - } - }; - }, "feedbackIntegration"); - return feedbackIntegration; -}, "buildFeedbackIntegration"); -function getFeedback() { - const client = getClient(); - return client && client.getIntegrationByName("Feedback"); -} -__name(getFeedback, "getFeedback"); -var n, l$1, u$1, i$1, o$1, r$1, f$1, c$1 = {}, s$1 = [], a$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, h$1 = Array.isArray; -function v$1(n2, l2) { - for (var u2 in l2) n2[u2] = l2[u2]; - return n2; -} -__name(v$1, "v$1"); -function p$1(n2) { - var l2 = n2.parentNode; - l2 && l2.removeChild(n2); -} -__name(p$1, "p$1"); -function y$1(l2, u2, t2) { - var i2, o2, r2, f2 = {}; - for (r2 in u2) "key" == r2 ? i2 = u2[r2] : "ref" == r2 ? o2 = u2[r2] : f2[r2] = u2[r2]; - if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps) for (r2 in l2.defaultProps) void 0 === f2[r2] && (f2[r2] = l2.defaultProps[r2]); - return d$1(l2, f2, i2, o2, null); -} -__name(y$1, "y$1"); -function d$1(n2, t2, i2, o2, r2) { - var f2 = { type: n2, props: t2, key: i2, ref: o2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: null == r2 ? ++u$1 : r2, __i: -1, __u: 0 }; - return null == r2 && null != l$1.vnode && l$1.vnode(f2), f2; -} -__name(d$1, "d$1"); -function g$1$1(n2) { - return n2.children; -} -__name(g$1$1, "g$1$1"); -function b$1(n2, l2) { - this.props = n2, this.context = l2; -} -__name(b$1, "b$1"); -function m$1(n2, l2) { - if (null == l2) return n2.__ ? m$1(n2.__, n2.__i + 1) : null; - for (var u2; l2 < n2.__k.length; l2++) if (null != (u2 = n2.__k[l2]) && null != u2.__e) return u2.__e; - return "function" == typeof n2.type ? m$1(n2) : null; -} -__name(m$1, "m$1"); -function w$1(n2, u2, t2) { - var i2, o2 = n2.__v, r2 = o2.__e, f2 = n2.__P; - if (f2) return (i2 = v$1({}, o2)).__v = o2.__v + 1, l$1.vnode && l$1.vnode(i2), M(f2, i2, o2, n2.__n, void 0 !== f2.ownerSVGElement, 32 & o2.__u ? [r2] : null, u2, null == r2 ? m$1(o2) : r2, !!(32 & o2.__u), t2), i2.__.__k[i2.__i] = i2, i2.__d = void 0, i2.__e != r2 && k$1(i2), i2; -} -__name(w$1, "w$1"); -function k$1(n2) { - var l2, u2; - if (null != (n2 = n2.__) && null != n2.__c) { - for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++) if (null != (u2 = n2.__k[l2]) && null != u2.__e) { - n2.__e = n2.__c.base = u2.__e; - break; - } - return k$1(n2); - } -} -__name(k$1, "k$1"); -function x$1(n2) { - (!n2.__d && (n2.__d = true) && i$1.push(n2) && !C$1.__r++ || o$1 !== l$1.debounceRendering) && ((o$1 = l$1.debounceRendering) || r$1)(C$1); -} -__name(x$1, "x$1"); -function C$1() { - var n2, u2, t2, o2 = [], r2 = []; - for (i$1.sort(f$1); n2 = i$1.shift(); ) n2.__d && (t2 = i$1.length, u2 = w$1(n2, o2, r2) || u2, 0 === t2 || i$1.length > t2 ? (j$1(o2, u2, r2), r2.length = o2.length = 0, u2 = void 0, i$1.sort(f$1)) : u2 && l$1.__c && l$1.__c(u2, s$1)); - u2 && j$1(o2, u2, r2), C$1.__r = 0; -} -__name(C$1, "C$1"); -function P$1(n2, l2, u2, t2, i2, o2, r2, f2, e2, a2, h2) { - var v2, p2, y2, d2, _2, g2 = t2 && t2.__k || s$1, b2 = l2.length; - for (u2.__d = e2, S(u2, l2, g2), e2 = u2.__d, v2 = 0; v2 < b2; v2++) null != (y2 = u2.__k[v2]) && "boolean" != typeof y2 && "function" != typeof y2 && (p2 = -1 === y2.__i ? c$1 : g2[y2.__i] || c$1, y2.__i = v2, M(n2, y2, p2, i2, o2, r2, f2, e2, a2, h2), d2 = y2.__e, y2.ref && p2.ref != y2.ref && (p2.ref && N(p2.ref, null, y2), h2.push(y2.ref, y2.__c || d2, y2)), null == _2 && null != d2 && (_2 = d2), 65536 & y2.__u || p2.__k === y2.__k ? e2 = $(y2, e2, n2) : "function" == typeof y2.type && void 0 !== y2.__d ? e2 = y2.__d : d2 && (e2 = d2.nextSibling), y2.__d = void 0, y2.__u &= -196609); - u2.__d = e2, u2.__e = _2; -} -__name(P$1, "P$1"); -function S(n2, l2, u2) { - var t2, i2, o2, r2, f2, e2 = l2.length, c2 = u2.length, s2 = c2, a2 = 0; - for (n2.__k = [], t2 = 0; t2 < e2; t2++) null != (i2 = n2.__k[t2] = null == (i2 = l2[t2]) || "boolean" == typeof i2 || "function" == typeof i2 ? null : "string" == typeof i2 || "number" == typeof i2 || "bigint" == typeof i2 || i2.constructor == String ? d$1(null, i2, null, null, i2) : h$1(i2) ? d$1(g$1$1, { children: i2 }, null, null, null) : void 0 === i2.constructor && i2.__b > 0 ? d$1(i2.type, i2.props, i2.key, i2.ref ? i2.ref : null, i2.__v) : i2) ? (i2.__ = n2, i2.__b = n2.__b + 1, f2 = I(i2, u2, r2 = t2 + a2, s2), i2.__i = f2, o2 = null, -1 !== f2 && (s2--, (o2 = u2[f2]) && (o2.__u |= 131072)), null == o2 || null === o2.__v ? (-1 == f2 && a2--, "function" != typeof i2.type && (i2.__u |= 65536)) : f2 !== r2 && (f2 === r2 + 1 ? a2++ : f2 > r2 ? s2 > e2 - r2 ? a2 += f2 - r2 : a2-- : a2 = f2 < r2 && f2 == r2 - 1 ? f2 - r2 : 0, f2 !== t2 + a2 && (i2.__u |= 65536))) : (o2 = u2[t2]) && null == o2.key && o2.__e && (o2.__e == n2.__d && (n2.__d = m$1(o2)), O(o2, o2, false), u2[t2] = null, s2--); - if (s2) for (t2 = 0; t2 < c2; t2++) null != (o2 = u2[t2]) && 0 == (131072 & o2.__u) && (o2.__e == n2.__d && (n2.__d = m$1(o2)), O(o2, o2)); -} -__name(S, "S"); -function $(n2, l2, u2) { - var t2, i2; - if ("function" == typeof n2.type) { - for (t2 = n2.__k, i2 = 0; t2 && i2 < t2.length; i2++) t2[i2] && (t2[i2].__ = n2, l2 = $(t2[i2], l2, u2)); - return l2; - } - n2.__e != l2 && (u2.insertBefore(n2.__e, l2 || null), l2 = n2.__e); - do { - l2 = l2 && l2.nextSibling; - } while (null != l2 && 8 === l2.nodeType); - return l2; -} -__name($, "$"); -function I(n2, l2, u2, t2) { - var i2 = n2.key, o2 = n2.type, r2 = u2 - 1, f2 = u2 + 1, e2 = l2[u2]; - if (null === e2 || e2 && i2 == e2.key && o2 === e2.type) return u2; - if (t2 > (null != e2 && 0 == (131072 & e2.__u) ? 1 : 0)) for (; r2 >= 0 || f2 < l2.length; ) { - if (r2 >= 0) { - if ((e2 = l2[r2]) && 0 == (131072 & e2.__u) && i2 == e2.key && o2 === e2.type) return r2; - r2--; - } - if (f2 < l2.length) { - if ((e2 = l2[f2]) && 0 == (131072 & e2.__u) && i2 == e2.key && o2 === e2.type) return f2; - f2++; - } - } - return -1; -} -__name(I, "I"); -function T$1(n2, l2, u2) { - "-" === l2[0] ? n2.setProperty(l2, null == u2 ? "" : u2) : n2[l2] = null == u2 ? "" : "number" != typeof u2 || a$1.test(l2) ? u2 : u2 + "px"; -} -__name(T$1, "T$1"); -function A$1(n2, l2, u2, t2, i2) { - var o2; - n: if ("style" === l2) if ("string" == typeof u2) n2.style.cssText = u2; - else { - if ("string" == typeof t2 && (n2.style.cssText = t2 = ""), t2) for (l2 in t2) u2 && l2 in u2 || T$1(n2.style, l2, ""); - if (u2) for (l2 in u2) t2 && u2[l2] === t2[l2] || T$1(n2.style, l2, u2[l2]); - } - else if ("o" === l2[0] && "n" === l2[1]) o2 = l2 !== (l2 = l2.replace(/(PointerCapture)$|Capture$/i, "$1")), l2 = l2.toLowerCase() in n2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o2] = u2, u2 ? t2 ? u2.u = t2.u : (u2.u = Date.now(), n2.addEventListener(l2, o2 ? L : D$1, o2)) : n2.removeEventListener(l2, o2 ? L : D$1, o2); - else { - if (i2) l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); - else if ("width" !== l2 && "height" !== l2 && "href" !== l2 && "list" !== l2 && "form" !== l2 && "tabIndex" !== l2 && "download" !== l2 && "rowSpan" !== l2 && "colSpan" !== l2 && "role" !== l2 && l2 in n2) try { - n2[l2] = null == u2 ? "" : u2; - break n; - } catch (n3) { - } - "function" == typeof u2 || (null == u2 || false === u2 && "-" !== l2[4] ? n2.removeAttribute(l2) : n2.setAttribute(l2, u2)); - } -} -__name(A$1, "A$1"); -function D$1(n2) { - if (this.l) { - var u2 = this.l[n2.type + false]; - if (n2.t) { - if (n2.t <= u2.u) return; - } else n2.t = Date.now(); - return u2(l$1.event ? l$1.event(n2) : n2); - } -} -__name(D$1, "D$1"); -function L(n2) { - if (this.l) return this.l[n2.type + true](l$1.event ? l$1.event(n2) : n2); -} -__name(L, "L"); -function M(n2, u2, t2, i2, o2, r2, f2, e2, c2, s2) { - var a2, p2, y2, d2, _2, m2, w2, k2, x2, C2, S2, $2, H, I2, T2, A2 = u2.type; - if (void 0 !== u2.constructor) return null; - 128 & t2.__u && (c2 = !!(32 & t2.__u), r2 = [e2 = u2.__e = t2.__e]), (a2 = l$1.__b) && a2(u2); - n: if ("function" == typeof A2) try { - if (k2 = u2.props, x2 = (a2 = A2.contextType) && i2[a2.__c], C2 = a2 ? x2 ? x2.props.value : a2.__ : i2, t2.__c ? w2 = (p2 = u2.__c = t2.__c).__ = p2.__E : ("prototype" in A2 && A2.prototype.render ? u2.__c = p2 = new A2(k2, C2) : (u2.__c = p2 = new b$1(k2, C2), p2.constructor = A2, p2.render = q$1), x2 && x2.sub(p2), p2.props = k2, p2.state || (p2.state = {}), p2.context = C2, p2.__n = i2, y2 = p2.__d = true, p2.__h = [], p2._sb = []), null == p2.__s && (p2.__s = p2.state), null != A2.getDerivedStateFromProps && (p2.__s == p2.state && (p2.__s = v$1({}, p2.__s)), v$1(p2.__s, A2.getDerivedStateFromProps(k2, p2.__s))), d2 = p2.props, _2 = p2.state, p2.__v = u2, y2) null == A2.getDerivedStateFromProps && null != p2.componentWillMount && p2.componentWillMount(), null != p2.componentDidMount && p2.__h.push(p2.componentDidMount); - else { - if (null == A2.getDerivedStateFromProps && k2 !== d2 && null != p2.componentWillReceiveProps && p2.componentWillReceiveProps(k2, C2), !p2.__e && (null != p2.shouldComponentUpdate && false === p2.shouldComponentUpdate(k2, p2.__s, C2) || u2.__v === t2.__v)) { - for (u2.__v !== t2.__v && (p2.props = k2, p2.state = p2.__s, p2.__d = false), u2.__e = t2.__e, u2.__k = t2.__k, u2.__k.forEach(function(n3) { - n3 && (n3.__ = u2); - }), S2 = 0; S2 < p2._sb.length; S2++) p2.__h.push(p2._sb[S2]); - p2._sb = [], p2.__h.length && f2.push(p2); - break n; - } - null != p2.componentWillUpdate && p2.componentWillUpdate(k2, p2.__s, C2), null != p2.componentDidUpdate && p2.__h.push(function() { - p2.componentDidUpdate(d2, _2, m2); - }); - } - if (p2.context = C2, p2.props = k2, p2.__P = n2, p2.__e = false, $2 = l$1.__r, H = 0, "prototype" in A2 && A2.prototype.render) { - for (p2.state = p2.__s, p2.__d = false, $2 && $2(u2), a2 = p2.render(p2.props, p2.state, p2.context), I2 = 0; I2 < p2._sb.length; I2++) p2.__h.push(p2._sb[I2]); - p2._sb = []; - } else do { - p2.__d = false, $2 && $2(u2), a2 = p2.render(p2.props, p2.state, p2.context), p2.state = p2.__s; - } while (p2.__d && ++H < 25); - p2.state = p2.__s, null != p2.getChildContext && (i2 = v$1(v$1({}, i2), p2.getChildContext())), y2 || null == p2.getSnapshotBeforeUpdate || (m2 = p2.getSnapshotBeforeUpdate(d2, _2)), P$1(n2, h$1(T2 = null != a2 && a2.type === g$1$1 && null == a2.key ? a2.props.children : a2) ? T2 : [T2], u2, t2, i2, o2, r2, f2, e2, c2, s2), p2.base = u2.__e, u2.__u &= -161, p2.__h.length && f2.push(p2), w2 && (p2.__E = p2.__ = null); - } catch (n3) { - u2.__v = null, c2 || null != r2 ? (u2.__e = e2, u2.__u |= c2 ? 160 : 32, r2[r2.indexOf(e2)] = null) : (u2.__e = t2.__e, u2.__k = t2.__k), l$1.__e(n3, u2, t2); - } - else null == r2 && u2.__v === t2.__v ? (u2.__k = t2.__k, u2.__e = t2.__e) : u2.__e = z$1(t2.__e, u2, t2, i2, o2, r2, f2, c2, s2); - (a2 = l$1.diffed) && a2(u2); -} -__name(M, "M"); -function j$1(n2, u2, t2) { - for (var i2 = 0; i2 < t2.length; i2++) N(t2[i2], t2[++i2], t2[++i2]); - l$1.__c && l$1.__c(u2, n2), n2.some(function(u3) { - try { - n2 = u3.__h, u3.__h = [], n2.some(function(n3) { - n3.call(u3); - }); - } catch (n3) { - l$1.__e(n3, u3.__v); - } - }); -} -__name(j$1, "j$1"); -function z$1(l2, u2, t2, i2, o2, r2, f2, e2, s2) { - var a2, v2, y2, d2, _2, g2, b2, w2 = t2.props, k2 = u2.props, x2 = u2.type; - if ("svg" === x2 && (o2 = true), null != r2) { - for (a2 = 0; a2 < r2.length; a2++) if ((_2 = r2[a2]) && "setAttribute" in _2 == !!x2 && (x2 ? _2.localName === x2 : 3 === _2.nodeType)) { - l2 = _2, r2[a2] = null; - break; - } - } - if (null == l2) { - if (null === x2) return document.createTextNode(k2); - l2 = o2 ? document.createElementNS("http://www.w3.org/2000/svg", x2) : document.createElement(x2, k2.is && k2), r2 = null, e2 = false; - } - if (null === x2) w2 === k2 || e2 && l2.data === k2 || (l2.data = k2); - else { - if (r2 = r2 && n.call(l2.childNodes), w2 = t2.props || c$1, !e2 && null != r2) for (w2 = {}, a2 = 0; a2 < l2.attributes.length; a2++) w2[(_2 = l2.attributes[a2]).name] = _2.value; - for (a2 in w2) _2 = w2[a2], "children" == a2 || ("dangerouslySetInnerHTML" == a2 ? y2 = _2 : "key" === a2 || a2 in k2 || A$1(l2, a2, null, _2, o2)); - for (a2 in k2) _2 = k2[a2], "children" == a2 ? d2 = _2 : "dangerouslySetInnerHTML" == a2 ? v2 = _2 : "value" == a2 ? g2 = _2 : "checked" == a2 ? b2 = _2 : "key" === a2 || e2 && "function" != typeof _2 || w2[a2] === _2 || A$1(l2, a2, _2, w2[a2], o2); - if (v2) e2 || y2 && (v2.__html === y2.__html || v2.__html === l2.innerHTML) || (l2.innerHTML = v2.__html), u2.__k = []; - else if (y2 && (l2.innerHTML = ""), P$1(l2, h$1(d2) ? d2 : [d2], u2, t2, i2, o2 && "foreignObject" !== x2, r2, f2, r2 ? r2[0] : t2.__k && m$1(t2, 0), e2, s2), null != r2) for (a2 = r2.length; a2--; ) null != r2[a2] && p$1(r2[a2]); - e2 || (a2 = "value", void 0 !== g2 && (g2 !== l2[a2] || "progress" === x2 && !g2 || "option" === x2 && g2 !== w2[a2]) && A$1(l2, a2, g2, w2[a2], false), a2 = "checked", void 0 !== b2 && b2 !== l2[a2] && A$1(l2, a2, b2, w2[a2], false)); - } - return l2; -} -__name(z$1, "z$1"); -function N(n2, u2, t2) { - try { - "function" == typeof n2 ? n2(u2) : n2.current = u2; - } catch (n3) { - l$1.__e(n3, t2); - } -} -__name(N, "N"); -function O(n2, u2, t2) { - var i2, o2; - if (l$1.unmount && l$1.unmount(n2), (i2 = n2.ref) && (i2.current && i2.current !== n2.__e || N(i2, null, u2)), null != (i2 = n2.__c)) { - if (i2.componentWillUnmount) try { - i2.componentWillUnmount(); - } catch (n3) { - l$1.__e(n3, u2); - } - i2.base = i2.__P = null, n2.__c = void 0; - } - if (i2 = n2.__k) for (o2 = 0; o2 < i2.length; o2++) i2[o2] && O(i2[o2], u2, t2 || "function" != typeof n2.type); - t2 || null == n2.__e || p$1(n2.__e), n2.__ = n2.__e = n2.__d = void 0; -} -__name(O, "O"); -function q$1(n2, l2, u2) { - return this.constructor(n2, u2); -} -__name(q$1, "q$1"); -function B$1(u2, t2, i2) { - var o2, r2, f2, e2; - l$1.__ && l$1.__(u2, t2), r2 = (o2 = "function" == typeof i2) ? null : t2.__k, f2 = [], e2 = [], M(t2, u2 = (!o2 && i2 || t2).__k = y$1(g$1$1, null, [u2]), r2 || c$1, c$1, void 0 !== t2.ownerSVGElement, !o2 && i2 ? [i2] : r2 ? null : t2.firstChild ? n.call(t2.childNodes) : null, f2, !o2 && i2 ? i2 : r2 ? r2.__e : t2.firstChild, o2, e2), u2.__d = void 0, j$1(f2, u2, e2); -} -__name(B$1, "B$1"); -n = s$1.slice, l$1 = { __e: /* @__PURE__ */ __name(function(n2, l2, u2, t2) { - for (var i2, o2, r2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try { - if ((o2 = i2.constructor) && null != o2.getDerivedStateFromError && (i2.setState(o2.getDerivedStateFromError(n2)), r2 = i2.__d), null != i2.componentDidCatch && (i2.componentDidCatch(n2, t2 || {}), r2 = i2.__d), r2) return i2.__E = i2; - } catch (l3) { - n2 = l3; - } - throw n2; -}, "__e") }, u$1 = 0, b$1.prototype.setState = function(n2, l2) { - var u2; - u2 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = v$1({}, this.state), "function" == typeof n2 && (n2 = n2(v$1({}, u2), this.props)), n2 && v$1(u2, n2), null != n2 && this.__v && (l2 && this._sb.push(l2), x$1(this)); -}, b$1.prototype.forceUpdate = function(n2) { - this.__v && (this.__e = true, n2 && this.__h.push(n2), x$1(this)); -}, b$1.prototype.render = g$1$1, i$1 = [], r$1 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, f$1 = /* @__PURE__ */ __name(function(n2, l2) { - return n2.__v.__b - l2.__v.__b; -}, "f$1"), C$1.__r = 0; -var t$1, r, u, i$2, o = 0, f = [], c = [], e = l$1, a = e.__b, v = e.__r, l = e.diffed, m = e.__c, s = e.unmount, d = e.__; -function h$2(n2, t2) { - e.__h && e.__h(r, n2, o || t2), o = 0; - var u2 = r.__H || (r.__H = { __: [], __h: [] }); - return n2 >= u2.__.length && u2.__.push({ __V: c }), u2.__[n2]; -} -__name(h$2, "h$2"); -function p$2(n2) { - return o = 1, y(D, n2); -} -__name(p$2, "p$2"); -function y(n2, u2, i2) { - var o2 = h$2(t$1++, 2); - if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : D(void 0, u2), function(n3) { - var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3); - t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({})); - }], o2.__c = r, !r.u)) { - var f2 = /* @__PURE__ */ __name(function(n3, t2, r2) { - if (!o2.__c.__H) return true; - var u3 = o2.__c.__H.__.filter(function(n4) { - return !!n4.__c; - }); - if (u3.every(function(n4) { - return !n4.__N; - })) return !c2 || c2.call(this, n3, t2, r2); - var i3 = false; - return u3.forEach(function(n4) { - if (n4.__N) { - var t3 = n4.__[0]; - n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = true); - } - }), !(!i3 && o2.__c.props === n3) && (!c2 || c2.call(this, n3, t2, r2)); - }, "f"); - r.u = true; - var c2 = r.shouldComponentUpdate, e2 = r.componentWillUpdate; - r.componentWillUpdate = function(n3, t2, r2) { - if (this.__e) { - var u3 = c2; - c2 = void 0, f2(n3, t2, r2), c2 = u3; - } - e2 && e2.call(this, n3, t2, r2); - }, r.shouldComponentUpdate = f2; - } - return o2.__N || o2.__; -} -__name(y, "y"); -function _$1(n2, u2) { - var i2 = h$2(t$1++, 3); - !e.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r.__H.__h.push(i2)); -} -__name(_$1, "_$1"); -function A(n2, u2) { - var i2 = h$2(t$1++, 4); - !e.__s && C(i2.__H, u2) && (i2.__ = n2, i2.i = u2, r.__h.push(i2)); -} -__name(A, "A"); -function F(n2) { - return o = 5, q(function() { - return { current: n2 }; - }, []); -} -__name(F, "F"); -function T(n2, t2, r2) { - o = 6, A(function() { - return "function" == typeof n2 ? (n2(t2()), function() { - return n2(null); - }) : n2 ? (n2.current = t2(), function() { - return n2.current = null; - }) : void 0; - }, null == r2 ? r2 : r2.concat(n2)); -} -__name(T, "T"); -function q(n2, r2) { - var u2 = h$2(t$1++, 7); - return C(u2.__H, r2) ? (u2.__V = n2(), u2.i = r2, u2.__h = n2, u2.__V) : u2.__; -} -__name(q, "q"); -function x(n2, t2) { - return o = 8, q(function() { - return n2; - }, t2); -} -__name(x, "x"); -function P$2(n2) { - var u2 = r.context[n2.__c], i2 = h$2(t$1++, 9); - return i2.c = n2, u2 ? (null == i2.__ && (i2.__ = true, u2.sub(r)), u2.props.value) : n2.__; -} -__name(P$2, "P$2"); -function V(n2, t2) { - e.useDebugValue && e.useDebugValue(t2 ? t2(n2) : n2); -} -__name(V, "V"); -function b(n2) { - var u2 = h$2(t$1++, 10), i2 = p$2(); - return u2.__ = n2, r.componentDidCatch || (r.componentDidCatch = function(n3, t2) { - u2.__ && u2.__(n3, t2), i2[1](n3); - }), [i2[0], function() { - i2[1](void 0); - }]; -} -__name(b, "b"); -function g$6() { - var n2 = h$2(t$1++, 11); - if (!n2.__) { - for (var u2 = r.__v; null !== u2 && !u2.__m && null !== u2.__; ) u2 = u2.__; - var i2 = u2.__m || (u2.__m = [0, 0]); - n2.__ = "P" + i2[0] + "-" + i2[1]++; - } - return n2.__; -} -__name(g$6, "g$6"); -function j() { - for (var n2; n2 = f.shift(); ) if (n2.__P && n2.__H) try { - n2.__H.__h.forEach(z$2), n2.__H.__h.forEach(B), n2.__H.__h = []; - } catch (t2) { - n2.__H.__h = [], e.__e(t2, n2.__v); - } -} -__name(j, "j"); -e.__b = function(n2) { - r = null, a && a(n2); -}, e.__ = function(n2, t2) { - t2.__k && t2.__k.__m && (n2.__m = t2.__k.__m), d && d(n2, t2); -}, e.__r = function(n2) { - v && v(n2), t$1 = 0; - var i2 = (r = n2.__c).__H; - i2 && (u === r ? (i2.__h = [], r.__h = [], i2.__.forEach(function(n3) { - n3.__N && (n3.__ = n3.__N), n3.__V = c, n3.__N = n3.i = void 0; - })) : (i2.__h.forEach(z$2), i2.__h.forEach(B), i2.__h = [], t$1 = 0)), u = r; -}, e.diffed = function(n2) { - l && l(n2); - var t2 = n2.__c; - t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i$2 === e.requestAnimationFrame || ((i$2 = e.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n3) { - n3.i && (n3.__H = n3.i), n3.__V !== c && (n3.__ = n3.__V), n3.i = void 0, n3.__V = c; - })), u = r = null; -}, e.__c = function(n2, t2) { - t2.some(function(n3) { - try { - n3.__h.forEach(z$2), n3.__h = n3.__h.filter(function(n4) { - return !n4.__ || B(n4); - }); - } catch (r2) { - t2.some(function(n4) { - n4.__h && (n4.__h = []); - }), t2 = [], e.__e(r2, n3.__v); - } - }), m && m(n2, t2); -}, e.unmount = function(n2) { - s && s(n2); - var t2, r2 = n2.__c; - r2 && r2.__H && (r2.__H.__.forEach(function(n3) { - try { - z$2(n3); - } catch (n4) { - t2 = n4; - } - }), r2.__H = void 0, t2 && e.__e(t2, r2.__v)); -}; -var k = "function" == typeof requestAnimationFrame; -function w(n2) { - var t2, r2 = /* @__PURE__ */ __name(function() { - clearTimeout(u2), k && cancelAnimationFrame(t2), setTimeout(n2); - }, "r"), u2 = setTimeout(r2, 100); - k && (t2 = requestAnimationFrame(r2)); -} -__name(w, "w"); -function z$2(n2) { - var t2 = r, u2 = n2.__c; - "function" == typeof u2 && (n2.__c = void 0, u2()), r = t2; -} -__name(z$2, "z$2"); -function B(n2) { - var t2 = r; - n2.__c = n2.__(), r = t2; -} -__name(B, "B"); -function C(n2, t2) { - return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) { - return t3 !== n2[r2]; - }); -} -__name(C, "C"); -function D(n2, t2) { - return "function" == typeof t2 ? t2(n2) : t2; -} -__name(D, "D"); -const hooks = { - __proto__: null, - useCallback: x, - useContext: P$2, - useDebugValue: V, - useEffect: _$1, - useErrorBoundary: b, - useId: g$6, - useImperativeHandle: T, - useLayoutEffect: A, - useMemo: q, - useReducer: y, - useRef: F, - useState: p$2 -}; -const XMLNS$1 = "http://www.w3.org/2000/svg"; -function SentryLogo() { - const createElementNS = /* @__PURE__ */ __name((tagName) => DOCUMENT.createElementNS(XMLNS$1, tagName), "createElementNS"); - const svg = setAttributesNS(createElementNS("svg"), { - width: "32", - height: "30", - viewBox: "0 0 72 66", - fill: "inherit" - }); - const path = setAttributesNS(createElementNS("path"), { - transform: "translate(11, 11)", - d: "M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z" - }); - svg.appendChild(path); - return svg; -} -__name(SentryLogo, "SentryLogo"); -function DialogHeader({ options: options4 }) { - const logoHtml = q(() => ({ __html: SentryLogo().outerHTML }), []); - return y$1( - "h2", - { class: "dialog__header" }, - y$1("span", { class: "dialog__title" }, options4.formTitle), - options4.showBranding ? y$1( - "a", - { - class: "brand-link", - target: "_blank", - href: "https://sentry.io/welcome/", - title: "Powered by Sentry", - rel: "noopener noreferrer", - dangerouslySetInnerHTML: logoHtml - } - ) : null - ); -} -__name(DialogHeader, "DialogHeader"); -function getMissingFields(feedback, props) { - const emptyFields = []; - if (props.isNameRequired && !feedback.name) { - emptyFields.push(props.nameLabel); - } - if (props.isEmailRequired && !feedback.email) { - emptyFields.push(props.emailLabel); - } - if (!feedback.message) { - emptyFields.push(props.messageLabel); - } - return emptyFields; -} -__name(getMissingFields, "getMissingFields"); -function retrieveStringValue(formData, key) { - const value4 = formData.get(key); - if (typeof value4 === "string") { - return value4.trim(); - } - return ""; -} -__name(retrieveStringValue, "retrieveStringValue"); -function Form({ - options: options4, - defaultEmail, - defaultName, - onFormClose, - onSubmit, - onSubmitSuccess, - onSubmitError, - showEmail, - showName, - screenshotInput -}) { - const { - tags, - addScreenshotButtonLabel, - removeScreenshotButtonLabel, - cancelButtonLabel, - emailLabel, - emailPlaceholder, - isEmailRequired, - isNameRequired, - messageLabel, - messagePlaceholder, - nameLabel, - namePlaceholder, - submitButtonLabel, - isRequiredLabel - } = options4; - const [error2, setError] = p$2(null); - const [showScreenshotInput, setShowScreenshotInput] = p$2(false); - const ScreenshotInputComponent = screenshotInput && screenshotInput.input; - const [screenshotError, setScreenshotError] = p$2(null); - const onScreenshotError = x((error3) => { - setScreenshotError(error3); - setShowScreenshotInput(false); - }, []); - const hasAllRequiredFields = x( - (data25) => { - const missingFields = getMissingFields(data25, { - emailLabel, - isEmailRequired, - isNameRequired, - messageLabel, - nameLabel - }); - if (missingFields.length > 0) { - setError(`Please enter in the following required fields: ${missingFields.join(", ")}`); - } else { - setError(null); - } - return missingFields.length === 0; - }, - [emailLabel, isEmailRequired, isNameRequired, messageLabel, nameLabel] - ); - const handleSubmit = x( - async (e2) => { - try { - e2.preventDefault(); - if (!(e2.target instanceof HTMLFormElement)) { - return; - } - const formData = new FormData(e2.target); - const attachment = await (screenshotInput && showScreenshotInput ? screenshotInput.value() : void 0); - const data25 = { - name: retrieveStringValue(formData, "name"), - email: retrieveStringValue(formData, "email"), - message: retrieveStringValue(formData, "message"), - attachments: attachment ? [attachment] : void 0 - }; - if (!hasAllRequiredFields(data25)) { - return; - } - try { - await onSubmit( - { - name: data25.name, - email: data25.email, - message: data25.message, - source: FEEDBACK_WIDGET_SOURCE, - tags - }, - { attachments: data25.attachments } - ); - onSubmitSuccess(data25); - } catch (error3) { - DEBUG_BUILD$1 && logger$2.error(error3); - setError(error3); - onSubmitError(error3); - } - } catch (e22) { - } - }, - [screenshotInput && showScreenshotInput, onSubmitSuccess, onSubmitError] - ); - return y$1( - "form", - { class: "form", onSubmit: handleSubmit }, - ScreenshotInputComponent && showScreenshotInput ? y$1(ScreenshotInputComponent, { onError: onScreenshotError }) : null, - y$1( - "div", - { class: "form__right", "data-sentry-feedback": true }, - y$1( - "div", - { class: "form__top" }, - error2 ? y$1("div", { class: "form__error-container" }, error2) : null, - showName ? y$1( - "label", - { for: "name", class: "form__label" }, - y$1(LabelText, { label: nameLabel, isRequiredLabel, isRequired: isNameRequired }), - y$1( - "input", - { - class: "form__input", - defaultValue: defaultName, - id: "name", - name: "name", - placeholder: namePlaceholder, - required: isNameRequired, - type: "text" - } - ) - ) : y$1("input", { "aria-hidden": true, value: defaultName, name: "name", type: "hidden" }), - showEmail ? y$1( - "label", - { for: "email", class: "form__label" }, - y$1(LabelText, { label: emailLabel, isRequiredLabel, isRequired: isEmailRequired }), - y$1( - "input", - { - class: "form__input", - defaultValue: defaultEmail, - id: "email", - name: "email", - placeholder: emailPlaceholder, - required: isEmailRequired, - type: "email" - } - ) - ) : y$1("input", { "aria-hidden": true, value: defaultEmail, name: "email", type: "hidden" }), - y$1( - "label", - { for: "message", class: "form__label" }, - y$1(LabelText, { label: messageLabel, isRequiredLabel, isRequired: true }), - y$1( - "textarea", - { - autoFocus: true, - class: "form__input form__input--textarea", - id: "message", - name: "message", - placeholder: messagePlaceholder, - required: true, - rows: 5 - } - ) - ), - ScreenshotInputComponent ? y$1( - "label", - { for: "screenshot", class: "form__label" }, - y$1( - "button", - { - class: "btn btn--default", - type: "button", - onClick: /* @__PURE__ */ __name(() => { - setScreenshotError(null); - setShowScreenshotInput((prev2) => !prev2); - }, "onClick") - }, - showScreenshotInput ? removeScreenshotButtonLabel : addScreenshotButtonLabel - ), - screenshotError ? y$1("div", { class: "form__error-container" }, screenshotError.message) : null - ) : null - ), - y$1( - "div", - { class: "btn-group" }, - y$1( - "button", - { class: "btn btn--primary", type: "submit" }, - submitButtonLabel - ), - y$1( - "button", - { class: "btn btn--default", type: "button", onClick: onFormClose }, - cancelButtonLabel - ) - ) - ) - ); -} -__name(Form, "Form"); -function LabelText({ - label: label5, - isRequired, - isRequiredLabel -}) { - return y$1( - "span", - { class: "form__label__text" }, - label5, - isRequired && y$1("span", { class: "form__label__text--required" }, isRequiredLabel) - ); -} -__name(LabelText, "LabelText"); -const WIDTH = 16; -const HEIGHT = 17; -const XMLNS = "http://www.w3.org/2000/svg"; -function SuccessIcon() { - const createElementNS = /* @__PURE__ */ __name((tagName) => WINDOW.document.createElementNS(XMLNS, tagName), "createElementNS"); - const svg = setAttributesNS(createElementNS("svg"), { - width: `${WIDTH}`, - height: `${HEIGHT}`, - viewBox: `0 0 ${WIDTH} ${HEIGHT}`, - fill: "inherit" - }); - const g2 = setAttributesNS(createElementNS("g"), { - clipPath: "url(#clip0_57_156)" - }); - const path2 = setAttributesNS(createElementNS("path"), { - ["fill-rule"]: "evenodd", - ["clip-rule"]: "evenodd", - d: "M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z" - }); - const path = setAttributesNS(createElementNS("path"), { - d: "M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z" - }); - svg.appendChild(g2).append(path, path2); - const speakerDefs = createElementNS("defs"); - const speakerClipPathDef = setAttributesNS(createElementNS("clipPath"), { - id: "clip0_57_156" - }); - const speakerRect = setAttributesNS(createElementNS("rect"), { - width: `${WIDTH}`, - height: `${WIDTH}`, - fill: "white", - transform: "translate(0 0.5)" - }); - speakerClipPathDef.appendChild(speakerRect); - speakerDefs.appendChild(speakerClipPathDef); - svg.appendChild(speakerDefs).appendChild(speakerClipPathDef).appendChild(speakerRect); - return svg; -} -__name(SuccessIcon, "SuccessIcon"); -function Dialog({ open: open2, onFormSubmitted, ...props }) { - const options4 = props.options; - const successIconHtml = q(() => ({ __html: SuccessIcon().outerHTML }), []); - const [timeoutId, setTimeoutId] = p$2(null); - const handleOnSuccessClick = x(() => { - if (timeoutId) { - clearTimeout(timeoutId); - setTimeoutId(null); - } - onFormSubmitted(); - }, [timeoutId]); - const onSubmitSuccess = x( - (data25) => { - props.onSubmitSuccess(data25); - setTimeoutId( - setTimeout(() => { - onFormSubmitted(); - setTimeoutId(null); - }, SUCCESS_MESSAGE_TIMEOUT) - ); - }, - [onFormSubmitted] - ); - return y$1( - g$1$1, - null, - timeoutId ? y$1( - "div", - { class: "success__position", onClick: handleOnSuccessClick }, - y$1( - "div", - { class: "success__content" }, - options4.successMessageText, - y$1("span", { class: "success__icon", dangerouslySetInnerHTML: successIconHtml }) - ) - ) : y$1( - "dialog", - { class: "dialog", onClick: options4.onFormClose, open: open2 }, - y$1( - "div", - { class: "dialog__position" }, - y$1( - "div", - { - class: "dialog__content", - onClick: /* @__PURE__ */ __name((e2) => { - e2.stopPropagation(); - }, "onClick") - }, - y$1(DialogHeader, { options: options4 }), - y$1(Form, { ...props, onSubmitSuccess }) - ) - ) - ) - ); -} -__name(Dialog, "Dialog"); -const DIALOG = ` -.dialog { - position: fixed; - z-index: var(--z-index); - margin: 0; - inset: 0; - - display: flex; - align-items: center; - justify-content: center; - padding: 0; - height: 100vh; - width: 100vw; - - color: var(--dialog-color, var(--foreground)); - fill: var(--dialog-color, var(--foreground)); - line-height: 1.75em; - - background-color: rgba(0, 0, 0, 0.05); - border: none; - inset: 0; - opacity: 1; - transition: opacity 0.2s ease-in-out; -} - -.dialog__position { - position: fixed; - z-index: var(--z-index); - inset: var(--dialog-inset); - padding: var(--page-margin); - display: flex; - max-height: calc(100vh - (2 * var(--page-margin))); -} -@media (max-width: 600px) { - .dialog__position { - inset: var(--page-margin); - padding: 0; - } -} - -.dialog__position:has(.editor) { - inset: var(--page-margin); - padding: 0; -} - -.dialog:not([open]) { - opacity: 0; - pointer-events: none; - visibility: hidden; -} -.dialog:not([open]) .dialog__content { - transform: translate(0, -16px) scale(0.98); -} - -.dialog__content { - display: flex; - flex-direction: column; - gap: 16px; - padding: var(--dialog-padding, 24px); - max-width: 100%; - width: 100%; - max-height: 100%; - overflow: auto; - - background: var(--dialog-background, var(--background)); - border-radius: var(--dialog-border-radius, 20px); - border: var(--dialog-border, var(--border)); - box-shadow: var(--dialog-box-shadow, var(--box-shadow)); - transform: translate(0, 0) scale(1); - transition: transform 0.2s ease-in-out; -} - -`; -const DIALOG_HEADER = ` -.dialog__header { - display: flex; - gap: 4px; - justify-content: space-between; - font-weight: var(--dialog-header-weight, 600); - margin: 0; -} -.dialog__title { - align-self: center; - width: var(--form-width, 272px); -} - -@media (max-width: 600px) { - .dialog__title { - width: auto; - } -} - -.dialog__position:has(.editor) .dialog__title { - width: auto; -} - - -.brand-link { - display: inline-flex; -} -.brand-link:focus-visible { - outline: var(--outline); -} -`; -const FORM = ` -.form { - display: flex; - overflow: auto; - flex-direction: row; - gap: 16px; - flex: 1 0; -} - -.form__right { - flex: 0 0 auto; - display: flex; - overflow: auto; - flex-direction: column; - justify-content: space-between; - gap: 20px; - width: var(--form-width, 100%); -} - -.dialog__position:has(.editor) .form__right { - width: var(--form-width, 272px); -} - -.form__top { - display: flex; - flex-direction: column; - gap: 8px; -} - -.form__error-container { - color: var(--error-color); - fill: var(--error-color); -} - -.form__label { - display: flex; - flex-direction: column; - gap: 4px; - margin: 0px; -} - -.form__label__text { - display: flex; - gap: 4px; - align-items: center; -} - -.form__label__text--required { - font-size: 0.85em; -} - -.form__input { - font-family: inherit; - line-height: inherit; - background: transparent; - box-sizing: border-box; - border: var(--input-border, var(--border)); - border-radius: var(--input-border-radius, 6px); - color: var(--input-color, inherit); - fill: var(--input-color, inherit); - font-size: var(--input-font-size, inherit); - font-weight: var(--input-font-weight, 500); - padding: 6px 12px; -} - -.form__input::placeholder { - opacity: 0.65; - color: var(--input-placeholder-color, inherit); - filter: var(--interactive-filter); -} - -.form__input:focus-visible { - outline: var(--input-focus-outline, var(--outline)); -} - -.form__input--textarea { - font-family: inherit; - resize: vertical; -} - -.error { - color: var(--error-color); - fill: var(--error-color); -} -`; -const BUTTON = ` -.btn-group { - display: grid; - gap: 8px; -} - -.btn { - line-height: inherit; - border: var(--button-border, var(--border)); - border-radius: var(--button-border-radius, 6px); - cursor: pointer; - font-family: inherit; - font-size: var(--button-font-size, inherit); - font-weight: var(--button-font-weight, 600); - padding: var(--button-padding, 6px 16px); -} -.btn[disabled] { - opacity: 0.6; - pointer-events: none; -} - -.btn--primary { - color: var(--button-primary-color, var(--accent-foreground)); - fill: var(--button-primary-color, var(--accent-foreground)); - background: var(--button-primary-background, var(--accent-background)); - border: var(--button-primary-border, var(--border)); - border-radius: var(--button-primary-border-radius, 6px); - font-weight: var(--button-primary-font-weight, 500); -} -.btn--primary:hover { - color: var(--button-primary-hover-color, var(--accent-foreground)); - fill: var(--button-primary-hover-color, var(--accent-foreground)); - background: var(--button-primary-hover-background, var(--accent-background)); - filter: var(--interactive-filter); -} -.btn--primary:focus-visible { - background: var(--button-primary-hover-background, var(--accent-background)); - filter: var(--interactive-filter); - outline: var(--button-primary-focus-outline, var(--outline)); -} - -.btn--default { - color: var(--button-color, var(--foreground)); - fill: var(--button-color, var(--foreground)); - background: var(--button-background, var(--background)); - border: var(--button-border, var(--border)); - border-radius: var(--button-border-radius, 6px); - font-weight: var(--button-font-weight, 500); -} -.btn--default:hover { - color: var(--button-color, var(--foreground)); - fill: var(--button-color, var(--foreground)); - background: var(--button-hover-background, var(--background)); - filter: var(--interactive-filter); -} -.btn--default:focus-visible { - background: var(--button-hover-background, var(--background)); - filter: var(--interactive-filter); - outline: var(--button-focus-outline, var(--outline)); -} -`; -const SUCCESS = ` -.success__position { - position: fixed; - inset: var(--dialog-inset); - padding: var(--page-margin); - z-index: var(--z-index); -} -.success__content { - background: var(--success-background, var(--background)); - border: var(--success-border, var(--border)); - border-radius: var(--success-border-radius, 1.7em/50%); - box-shadow: var(--success-box-shadow, var(--box-shadow)); - font-weight: var(--success-font-weight, 600); - color: var(--success-color); - fill: var(--success-color); - padding: 12px 24px; - line-height: 1.75em; - - display: grid; - align-items: center; - grid-auto-flow: column; - gap: 6px; - cursor: default; -} - -.success__icon { - display: flex; -} -`; -function createDialogStyles(styleNonce) { - const style2 = DOCUMENT.createElement("style"); - style2.textContent = ` -:host { - --dialog-inset: var(--inset); -} - -${DIALOG} -${DIALOG_HEADER} -${FORM} -${BUTTON} -${SUCCESS} -`; - if (styleNonce) { - style2.setAttribute("nonce", styleNonce); - } - return style2; -} -__name(createDialogStyles, "createDialogStyles"); -function getUser() { - const currentUser = getCurrentScope$1().getUser(); - const isolationUser = getIsolationScope().getUser(); - const globalUser = getGlobalScope().getUser(); - if (currentUser && Object.keys(currentUser).length) { - return currentUser; - } - if (isolationUser && Object.keys(isolationUser).length) { - return isolationUser; - } - return globalUser; -} -__name(getUser, "getUser"); -const feedbackModalIntegration = /* @__PURE__ */ __name(() => { - return { - name: "FeedbackModal", - // eslint-disable-next-line @typescript-eslint/no-empty-function - setupOnce() { - }, - createDialog: /* @__PURE__ */ __name(({ options: options4, screenshotIntegration, sendFeedback: sendFeedback2, shadow }) => { - const shadowRoot = shadow; - const userKey = options4.useSentryUser; - const user = getUser(); - const el = DOCUMENT.createElement("div"); - const style2 = createDialogStyles(options4.styleNonce); - let originalOverflow = ""; - const dialog = { - get el() { - return el; - }, - appendToDom() { - if (!shadowRoot.contains(style2) && !shadowRoot.contains(el)) { - shadowRoot.appendChild(style2); - shadowRoot.appendChild(el); - } - }, - removeFromDom() { - shadowRoot.removeChild(el); - shadowRoot.removeChild(style2); - DOCUMENT.body.style.overflow = originalOverflow; - }, - open() { - renderContent(true); - options4.onFormOpen && options4.onFormOpen(); - originalOverflow = DOCUMENT.body.style.overflow; - DOCUMENT.body.style.overflow = "hidden"; - }, - close() { - renderContent(false); - DOCUMENT.body.style.overflow = originalOverflow; - } - }; - const screenshotInput = screenshotIntegration && screenshotIntegration.createInput({ h: y$1, hooks, dialog, options: options4 }); - const renderContent = /* @__PURE__ */ __name((open2) => { - B$1( - y$1( - Dialog, - { - options: options4, - screenshotInput, - showName: options4.showName || options4.isNameRequired, - showEmail: options4.showEmail || options4.isEmailRequired, - defaultName: userKey && user && user[userKey.name] || "", - defaultEmail: userKey && user && user[userKey.email] || "", - onFormClose: /* @__PURE__ */ __name(() => { - renderContent(false); - options4.onFormClose && options4.onFormClose(); - }, "onFormClose"), - onSubmit: sendFeedback2, - onSubmitSuccess: /* @__PURE__ */ __name((data25) => { - renderContent(false); - options4.onSubmitSuccess && options4.onSubmitSuccess(data25); - }, "onSubmitSuccess"), - onSubmitError: /* @__PURE__ */ __name((error2) => { - options4.onSubmitError && options4.onSubmitError(error2); - }, "onSubmitError"), - onFormSubmitted: /* @__PURE__ */ __name(() => { - options4.onFormSubmitted && options4.onFormSubmitted(); - }, "onFormSubmitted"), - open: open2 - } - ), - el - ); - }, "renderContent"); - return dialog; - }, "createDialog") - }; -}, "feedbackModalIntegration"); -function CropCornerFactory({ - h: h2 - // eslint-disable-line @typescript-eslint/no-unused-vars -}) { - return /* @__PURE__ */ __name(function CropCorner({ - top, - left, - corner, - onGrabButton - }) { - return h2( - "button", - { - class: `editor__crop-corner editor__crop-corner--${corner} `, - style: { - top, - left - }, - onMouseDown: /* @__PURE__ */ __name((e2) => { - e2.preventDefault(); - onGrabButton(e2, corner); - }, "onMouseDown"), - onClick: /* @__PURE__ */ __name((e2) => { - e2.preventDefault(); - }, "onClick") - } - ); - }, "CropCorner"); -} -__name(CropCornerFactory, "CropCornerFactory"); -function createScreenshotInputStyles(styleNonce) { - const style2 = DOCUMENT.createElement("style"); - const surface200 = "#1A141F"; - const gray100 = "#302735"; - style2.textContent = ` -.editor { - padding: 10px; - padding-top: 65px; - padding-bottom: 65px; - flex-grow: 1; - - background-color: ${surface200}; - background-image: repeating-linear-gradient( - -145deg, - transparent, - transparent 8px, - ${surface200} 8px, - ${surface200} 11px - ), - repeating-linear-gradient( - -45deg, - transparent, - transparent 15px, - ${gray100} 15px, - ${gray100} 16px - ); -} - -.editor__canvas-container { - width: 100%; - height: 100%; - position: relative; - display: flex; - align-items: center; - justify-content: center; -} - -.editor__canvas-container canvas { - object-fit: contain; - position: relative; -} - -.editor__crop-btn-group { - padding: 8px; - gap: 8px; - border-radius: var(--menu-border-radius, 6px); - background: var(--button-primary-background, var(--background)); - width: 175px; - position: absolute; -} - -.editor__crop-corner { - width: 30px; - height: 30px; - position: absolute; - background: none; - border: 3px solid #ffffff; -} - -.editor__crop-corner--top-left { - cursor: nwse-resize; - border-right: none; - border-bottom: none; -} -.editor__crop-corner--top-right { - cursor: nesw-resize; - border-left: none; - border-bottom: none; -} -.editor__crop-corner--bottom-left { - cursor: nesw-resize; - border-right: none; - border-top: none; -} -.editor__crop-corner--bottom-right { - cursor: nwse-resize; - border-left: none; - border-top: none; -} -`; - if (styleNonce) { - style2.setAttribute("nonce", styleNonce); - } - return style2; -} -__name(createScreenshotInputStyles, "createScreenshotInputStyles"); -function useTakeScreenshotFactory({ hooks: hooks2 }) { - return /* @__PURE__ */ __name(function useTakeScreenshot({ onBeforeScreenshot, onScreenshot, onAfterScreenshot, onError }) { - hooks2.useEffect(() => { - const takeScreenshot = /* @__PURE__ */ __name(async () => { - onBeforeScreenshot(); - const stream = await NAVIGATOR.mediaDevices.getDisplayMedia({ - video: { - width: WINDOW.innerWidth * WINDOW.devicePixelRatio, - height: WINDOW.innerHeight * WINDOW.devicePixelRatio - }, - audio: false, - // @ts-expect-error experimental flags: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#prefercurrenttab - monitorTypeSurfaces: "exclude", - preferCurrentTab: true, - selfBrowserSurface: "include", - surfaceSwitching: "exclude" - }); - const video = DOCUMENT.createElement("video"); - await new Promise((resolve2, reject3) => { - video.srcObject = stream; - video.onloadedmetadata = () => { - onScreenshot(video); - stream.getTracks().forEach((track2) => track2.stop()); - resolve2(); - }; - video.play().catch(reject3); - }); - onAfterScreenshot(); - }, "takeScreenshot"); - takeScreenshot().catch(onError); - }, []); - }, "useTakeScreenshot"); -} -__name(useTakeScreenshotFactory, "useTakeScreenshotFactory"); -const CROP_BUTTON_SIZE = 30; -const CROP_BUTTON_BORDER = 3; -const CROP_BUTTON_OFFSET = CROP_BUTTON_SIZE + CROP_BUTTON_BORDER; -const DPI = WINDOW.devicePixelRatio; -const constructRect = /* @__PURE__ */ __name((box) => { - return { - x: Math.min(box.startX, box.endX), - y: Math.min(box.startY, box.endY), - width: Math.abs(box.startX - box.endX), - height: Math.abs(box.startY - box.endY) - }; -}, "constructRect"); -const getContainedSize = /* @__PURE__ */ __name((img) => { - const imgClientHeight = img.clientHeight; - const imgClientWidth = img.clientWidth; - const ratio = img.width / img.height; - let width2 = imgClientHeight * ratio; - let height = imgClientHeight; - if (width2 > imgClientWidth) { - width2 = imgClientWidth; - height = imgClientWidth / ratio; - } - const x2 = (imgClientWidth - width2) / 2; - const y2 = (imgClientHeight - height) / 2; - return { startX: x2, startY: y2, endX: width2 + x2, endY: height + y2 }; -}, "getContainedSize"); -function ScreenshotEditorFactory({ - h: h2, - hooks: hooks2, - imageBuffer, - dialog, - options: options4 -}) { - const useTakeScreenshot = useTakeScreenshotFactory({ hooks: hooks2 }); - return /* @__PURE__ */ __name(function ScreenshotEditor({ onError }) { - const styles = hooks2.useMemo(() => ({ __html: createScreenshotInputStyles(options4.styleNonce).innerText }), []); - const CropCorner = CropCornerFactory({ h: h2 }); - const canvasContainerRef = hooks2.useRef(null); - const cropContainerRef = hooks2.useRef(null); - const croppingRef = hooks2.useRef(null); - const [croppingRect, setCroppingRect] = hooks2.useState({ startX: 0, startY: 0, endX: 0, endY: 0 }); - const [confirmCrop, setConfirmCrop] = hooks2.useState(false); - const [isResizing, setIsResizing] = hooks2.useState(false); - hooks2.useEffect(() => { - WINDOW.addEventListener("resize", resizeCropper, false); - }, []); - function resizeCropper() { - const cropper = croppingRef.current; - const imageDimensions = constructRect(getContainedSize(imageBuffer)); - if (cropper) { - cropper.width = imageDimensions.width * DPI; - cropper.height = imageDimensions.height * DPI; - cropper.style.width = `${imageDimensions.width}px`; - cropper.style.height = `${imageDimensions.height}px`; - const ctx = cropper.getContext("2d"); - if (ctx) { - ctx.scale(DPI, DPI); - } - } - const cropButton = cropContainerRef.current; - if (cropButton) { - cropButton.style.width = `${imageDimensions.width}px`; - cropButton.style.height = `${imageDimensions.height}px`; - } - setCroppingRect({ startX: 0, startY: 0, endX: imageDimensions.width, endY: imageDimensions.height }); - } - __name(resizeCropper, "resizeCropper"); - hooks2.useEffect(() => { - const cropper = croppingRef.current; - if (!cropper) { - return; - } - const ctx = cropper.getContext("2d"); - if (!ctx) { - return; - } - const imageDimensions = constructRect(getContainedSize(imageBuffer)); - const croppingBox = constructRect(croppingRect); - ctx.clearRect(0, 0, imageDimensions.width, imageDimensions.height); - ctx.fillStyle = "rgba(0, 0, 0, 0.5)"; - ctx.fillRect(0, 0, imageDimensions.width, imageDimensions.height); - ctx.clearRect(croppingBox.x, croppingBox.y, croppingBox.width, croppingBox.height); - ctx.strokeStyle = "#ffffff"; - ctx.lineWidth = 3; - ctx.strokeRect(croppingBox.x + 1, croppingBox.y + 1, croppingBox.width - 2, croppingBox.height - 2); - ctx.strokeStyle = "#000000"; - ctx.lineWidth = 1; - ctx.strokeRect(croppingBox.x + 3, croppingBox.y + 3, croppingBox.width - 6, croppingBox.height - 6); - }, [croppingRect]); - function onGrabButton(e2, corner) { - setConfirmCrop(false); - setIsResizing(true); - const handleMouseMove2 = makeHandleMouseMove(corner); - const handleMouseUp = /* @__PURE__ */ __name(() => { - DOCUMENT.removeEventListener("mousemove", handleMouseMove2); - DOCUMENT.removeEventListener("mouseup", handleMouseUp); - setConfirmCrop(true); - setIsResizing(false); - }, "handleMouseUp"); - DOCUMENT.addEventListener("mouseup", handleMouseUp); - DOCUMENT.addEventListener("mousemove", handleMouseMove2); - } - __name(onGrabButton, "onGrabButton"); - const makeHandleMouseMove = hooks2.useCallback((corner) => { - return function(e2) { - if (!croppingRef.current) { - return; - } - const cropCanvas = croppingRef.current; - const cropBoundingRect = cropCanvas.getBoundingClientRect(); - const mouseX = e2.clientX - cropBoundingRect.x; - const mouseY = e2.clientY - cropBoundingRect.y; - switch (corner) { - case "top-left": - setCroppingRect((prev2) => ({ - ...prev2, - startX: Math.min(Math.max(0, mouseX), prev2.endX - CROP_BUTTON_OFFSET), - startY: Math.min(Math.max(0, mouseY), prev2.endY - CROP_BUTTON_OFFSET) - })); - break; - case "top-right": - setCroppingRect((prev2) => ({ - ...prev2, - endX: Math.max(Math.min(mouseX, cropCanvas.width / DPI), prev2.startX + CROP_BUTTON_OFFSET), - startY: Math.min(Math.max(0, mouseY), prev2.endY - CROP_BUTTON_OFFSET) - })); - break; - case "bottom-left": - setCroppingRect((prev2) => ({ - ...prev2, - startX: Math.min(Math.max(0, mouseX), prev2.endX - CROP_BUTTON_OFFSET), - endY: Math.max(Math.min(mouseY, cropCanvas.height / DPI), prev2.startY + CROP_BUTTON_OFFSET) - })); - break; - case "bottom-right": - setCroppingRect((prev2) => ({ - ...prev2, - endX: Math.max(Math.min(mouseX, cropCanvas.width / DPI), prev2.startX + CROP_BUTTON_OFFSET), - endY: Math.max(Math.min(mouseY, cropCanvas.height / DPI), prev2.startY + CROP_BUTTON_OFFSET) - })); - break; - } - }; - }, []); - const initialPositionRef = hooks2.useRef({ initialX: 0, initialY: 0 }); - function onDragStart2(e2) { - if (isResizing) return; - initialPositionRef.current = { initialX: e2.clientX, initialY: e2.clientY }; - const handleMouseMove2 = /* @__PURE__ */ __name((moveEvent) => { - const cropCanvas = croppingRef.current; - if (!cropCanvas) return; - const deltaX = moveEvent.clientX - initialPositionRef.current.initialX; - const deltaY = moveEvent.clientY - initialPositionRef.current.initialY; - setCroppingRect((prev2) => { - const newStartX = Math.max( - 0, - Math.min(prev2.startX + deltaX, cropCanvas.width / DPI - (prev2.endX - prev2.startX)) - ); - const newStartY = Math.max( - 0, - Math.min(prev2.startY + deltaY, cropCanvas.height / DPI - (prev2.endY - prev2.startY)) - ); - const newEndX = newStartX + (prev2.endX - prev2.startX); - const newEndY = newStartY + (prev2.endY - prev2.startY); - initialPositionRef.current.initialX = moveEvent.clientX; - initialPositionRef.current.initialY = moveEvent.clientY; - return { - startX: newStartX, - startY: newStartY, - endX: newEndX, - endY: newEndY - }; - }); - }, "handleMouseMove"); - const handleMouseUp = /* @__PURE__ */ __name(() => { - DOCUMENT.removeEventListener("mousemove", handleMouseMove2); - DOCUMENT.removeEventListener("mouseup", handleMouseUp); - }, "handleMouseUp"); - DOCUMENT.addEventListener("mousemove", handleMouseMove2); - DOCUMENT.addEventListener("mouseup", handleMouseUp); - } - __name(onDragStart2, "onDragStart"); - function submit() { - const cutoutCanvas = DOCUMENT.createElement("canvas"); - const imageBox = constructRect(getContainedSize(imageBuffer)); - const croppingBox = constructRect(croppingRect); - cutoutCanvas.width = croppingBox.width * DPI; - cutoutCanvas.height = croppingBox.height * DPI; - const cutoutCtx = cutoutCanvas.getContext("2d"); - if (cutoutCtx && imageBuffer) { - cutoutCtx.drawImage( - imageBuffer, - croppingBox.x / imageBox.width * imageBuffer.width, - croppingBox.y / imageBox.height * imageBuffer.height, - croppingBox.width / imageBox.width * imageBuffer.width, - croppingBox.height / imageBox.height * imageBuffer.height, - 0, - 0, - cutoutCanvas.width, - cutoutCanvas.height - ); - } - const ctx = imageBuffer.getContext("2d"); - if (ctx) { - ctx.clearRect(0, 0, imageBuffer.width, imageBuffer.height); - imageBuffer.width = cutoutCanvas.width; - imageBuffer.height = cutoutCanvas.height; - imageBuffer.style.width = `${croppingBox.width}px`; - imageBuffer.style.height = `${croppingBox.height}px`; - ctx.drawImage(cutoutCanvas, 0, 0); - resizeCropper(); - } - } - __name(submit, "submit"); - useTakeScreenshot({ - onBeforeScreenshot: hooks2.useCallback(() => { - dialog.el.style.display = "none"; - }, []), - onScreenshot: hooks2.useCallback( - (imageSource) => { - const context = imageBuffer.getContext("2d"); - if (!context) { - throw new Error("Could not get canvas context"); - } - imageBuffer.width = imageSource.videoWidth; - imageBuffer.height = imageSource.videoHeight; - imageBuffer.style.width = "100%"; - imageBuffer.style.height = "100%"; - context.drawImage(imageSource, 0, 0); - }, - [imageBuffer] - ), - onAfterScreenshot: hooks2.useCallback(() => { - dialog.el.style.display = "block"; - const container = canvasContainerRef.current; - container && container.appendChild(imageBuffer); - resizeCropper(); - }, []), - onError: hooks2.useCallback((error2) => { - dialog.el.style.display = "block"; - onError(error2); - }, []) - }); - return h2( - "div", - { class: "editor" }, - h2("style", { nonce: options4.styleNonce, dangerouslySetInnerHTML: styles }), - h2( - "div", - { class: "editor__canvas-container", ref: canvasContainerRef }, - h2( - "div", - { class: "editor__crop-container", style: { position: "absolute", zIndex: 1 }, ref: cropContainerRef }, - h2( - "canvas", - { - onMouseDown: onDragStart2, - style: { position: "absolute", cursor: confirmCrop ? "move" : "auto" }, - ref: croppingRef - } - ), - h2( - CropCorner, - { - left: croppingRect.startX - CROP_BUTTON_BORDER, - top: croppingRect.startY - CROP_BUTTON_BORDER, - onGrabButton, - corner: "top-left" - } - ), - h2( - CropCorner, - { - left: croppingRect.endX - CROP_BUTTON_SIZE + CROP_BUTTON_BORDER, - top: croppingRect.startY - CROP_BUTTON_BORDER, - onGrabButton, - corner: "top-right" - } - ), - h2( - CropCorner, - { - left: croppingRect.startX - CROP_BUTTON_BORDER, - top: croppingRect.endY - CROP_BUTTON_SIZE + CROP_BUTTON_BORDER, - onGrabButton, - corner: "bottom-left" - } - ), - h2( - CropCorner, - { - left: croppingRect.endX - CROP_BUTTON_SIZE + CROP_BUTTON_BORDER, - top: croppingRect.endY - CROP_BUTTON_SIZE + CROP_BUTTON_BORDER, - onGrabButton, - corner: "bottom-right" - } - ), - h2( - "div", - { - style: { - left: Math.max(0, croppingRect.endX - 191), - top: Math.max(0, croppingRect.endY + 8), - display: confirmCrop ? "flex" : "none" - }, - class: "editor__crop-btn-group" - }, - h2( - "button", - { - onClick: /* @__PURE__ */ __name((e2) => { - e2.preventDefault(); - if (croppingRef.current) { - setCroppingRect({ - startX: 0, - startY: 0, - endX: croppingRef.current.width / DPI, - endY: croppingRef.current.height / DPI - }); - } - setConfirmCrop(false); - }, "onClick"), - class: "btn btn--default" - }, - options4.cancelButtonLabel - ), - h2( - "button", - { - onClick: /* @__PURE__ */ __name((e2) => { - e2.preventDefault(); - submit(); - setConfirmCrop(false); - }, "onClick"), - class: "btn btn--primary" - }, - options4.confirmButtonLabel - ) - ) - ) - ) - ); - }, "ScreenshotEditor"); -} -__name(ScreenshotEditorFactory, "ScreenshotEditorFactory"); -const feedbackScreenshotIntegration = /* @__PURE__ */ __name(() => { - return { - name: "FeedbackScreenshot", - // eslint-disable-next-line @typescript-eslint/no-empty-function - setupOnce() { - }, - createInput: /* @__PURE__ */ __name(({ h: h2, hooks: hooks2, dialog, options: options4 }) => { - const imageBuffer = DOCUMENT.createElement("canvas"); - return { - input: ScreenshotEditorFactory({ - h: h2, - hooks: hooks2, - imageBuffer, - dialog, - options: options4 - }), - // eslint-disable-line @typescript-eslint/no-explicit-any - value: /* @__PURE__ */ __name(async () => { - const blob = await new Promise((resolve2) => { - imageBuffer.toBlob(resolve2, "image/png"); - }); - if (blob) { - const data25 = new Uint8Array(await blob.arrayBuffer()); - const attachment = { - data: data25, - filename: "screenshot.png", - contentType: "application/png" - // attachmentType?: string; - }; - return attachment; - } - return void 0; - }, "value") - }; - }, "createInput") - }; -}, "feedbackScreenshotIntegration"); -const feedbackAsyncIntegration = buildFeedbackIntegration({ - lazyLoadIntegration -}); -const feedbackSyncIntegration = buildFeedbackIntegration({ - getModalIntegration: /* @__PURE__ */ __name(() => feedbackModalIntegration, "getModalIntegration"), - getScreenshotIntegration: /* @__PURE__ */ __name(() => feedbackScreenshotIntegration, "getScreenshotIntegration") -}); -function increment(name2, value4 = 1, data25) { - metrics$1.increment(BrowserMetricsAggregator, name2, value4, data25); -} -__name(increment, "increment"); -function distribution(name2, value4, data25) { - metrics$1.distribution(BrowserMetricsAggregator, name2, value4, data25); -} -__name(distribution, "distribution"); -function set$5(name2, value4, data25) { - metrics$1.set(BrowserMetricsAggregator, name2, value4, data25); -} -__name(set$5, "set$5"); -function gauge(name2, value4, data25) { - metrics$1.gauge(BrowserMetricsAggregator, name2, value4, data25); -} -__name(gauge, "gauge"); -function timing(name2, value4, unit = "second", data25) { - return metrics$1.timing(BrowserMetricsAggregator, name2, value4, unit, data25); -} -__name(timing, "timing"); -const metrics = { - increment, - distribution, - set: set$5, - gauge, - timing -}; -const responseToSpanId = /* @__PURE__ */ new WeakMap(); -const spanIdToEndTimestamp = /* @__PURE__ */ new Map(); -const defaultRequestInstrumentationOptions = { - traceFetch: true, - traceXHR: true, - enableHTTPTimings: true, - trackFetchStreamPerformance: false -}; -function instrumentOutgoingRequests(client, _options) { - const { - traceFetch, - traceXHR, - trackFetchStreamPerformance, - shouldCreateSpanForRequest, - enableHTTPTimings, - tracePropagationTargets - } = { - traceFetch: defaultRequestInstrumentationOptions.traceFetch, - traceXHR: defaultRequestInstrumentationOptions.traceXHR, - trackFetchStreamPerformance: defaultRequestInstrumentationOptions.trackFetchStreamPerformance, - ..._options - }; - const shouldCreateSpan = typeof shouldCreateSpanForRequest === "function" ? shouldCreateSpanForRequest : (_2) => true; - const shouldAttachHeadersWithTargets = /* @__PURE__ */ __name((url) => shouldAttachHeaders(url, tracePropagationTargets), "shouldAttachHeadersWithTargets"); - const spans = {}; - if (traceFetch) { - client.addEventProcessor((event) => { - if (event.type === "transaction" && event.spans) { - event.spans.forEach((span) => { - if (span.op === "http.client") { - const updatedTimestamp = spanIdToEndTimestamp.get(span.span_id); - if (updatedTimestamp) { - span.timestamp = updatedTimestamp / 1e3; - spanIdToEndTimestamp.delete(span.span_id); - } - } - }); - } - return event; - }); - if (trackFetchStreamPerformance) { - addFetchEndInstrumentationHandler((handlerData) => { - if (handlerData.response) { - const span = responseToSpanId.get(handlerData.response); - if (span && handlerData.endTimestamp) { - spanIdToEndTimestamp.set(span, handlerData.endTimestamp); - } - } - }); - } - addFetchInstrumentationHandler((handlerData) => { - const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans); - if (handlerData.response && handlerData.fetchData.__span) { - responseToSpanId.set(handlerData.response, handlerData.fetchData.__span); - } - if (createdSpan) { - const fullUrl = getFullURL(handlerData.fetchData.url); - const host = fullUrl ? parseUrl$1(fullUrl).host : void 0; - createdSpan.setAttributes({ - "http.url": fullUrl, - "server.address": host - }); - } - if (enableHTTPTimings && createdSpan) { - addHTTPTimings(createdSpan); - } - }); - } - if (traceXHR) { - addXhrInstrumentationHandler((handlerData) => { - const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans); - if (enableHTTPTimings && createdSpan) { - addHTTPTimings(createdSpan); - } - }); - } -} -__name(instrumentOutgoingRequests, "instrumentOutgoingRequests"); -function isPerformanceResourceTiming(entry) { - return entry.entryType === "resource" && "initiatorType" in entry && typeof entry.nextHopProtocol === "string" && (entry.initiatorType === "fetch" || entry.initiatorType === "xmlhttprequest"); -} -__name(isPerformanceResourceTiming, "isPerformanceResourceTiming"); -function addHTTPTimings(span) { - const { url } = spanToJSON(span).data || {}; - if (!url || typeof url !== "string") { - return; - } - const cleanup = addPerformanceInstrumentationHandler("resource", ({ entries }) => { - entries.forEach((entry) => { - if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) { - const spanData = resourceTimingEntryToSpanData(entry); - spanData.forEach((data25) => span.setAttribute(...data25)); - setTimeout(cleanup); - } - }); - }); -} -__name(addHTTPTimings, "addHTTPTimings"); -function extractNetworkProtocol(nextHopProtocol) { - let name2 = "unknown"; - let version2 = "unknown"; - let _name = ""; - for (const char of nextHopProtocol) { - if (char === "/") { - [name2, version2] = nextHopProtocol.split("/"); - break; - } - if (!isNaN(Number(char))) { - name2 = _name === "h" ? "http" : _name; - version2 = nextHopProtocol.split(_name)[1]; - break; - } - _name += char; - } - if (_name === nextHopProtocol) { - name2 = _name; - } - return { name: name2, version: version2 }; -} -__name(extractNetworkProtocol, "extractNetworkProtocol"); -function getAbsoluteTime(time = 0) { - return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1e3; -} -__name(getAbsoluteTime, "getAbsoluteTime"); -function resourceTimingEntryToSpanData(resourceTiming) { - const { name: name2, version: version2 } = extractNetworkProtocol(resourceTiming.nextHopProtocol); - const timingSpanData = []; - timingSpanData.push(["network.protocol.version", version2], ["network.protocol.name", name2]); - if (!browserPerformanceTimeOrigin) { - return timingSpanData; - } - return [ - ...timingSpanData, - ["http.request.redirect_start", getAbsoluteTime(resourceTiming.redirectStart)], - ["http.request.fetch_start", getAbsoluteTime(resourceTiming.fetchStart)], - ["http.request.domain_lookup_start", getAbsoluteTime(resourceTiming.domainLookupStart)], - ["http.request.domain_lookup_end", getAbsoluteTime(resourceTiming.domainLookupEnd)], - ["http.request.connect_start", getAbsoluteTime(resourceTiming.connectStart)], - ["http.request.secure_connection_start", getAbsoluteTime(resourceTiming.secureConnectionStart)], - ["http.request.connection_end", getAbsoluteTime(resourceTiming.connectEnd)], - ["http.request.request_start", getAbsoluteTime(resourceTiming.requestStart)], - ["http.request.response_start", getAbsoluteTime(resourceTiming.responseStart)], - ["http.request.response_end", getAbsoluteTime(resourceTiming.responseEnd)] - ]; -} -__name(resourceTimingEntryToSpanData, "resourceTimingEntryToSpanData"); -function shouldAttachHeaders(targetUrl, tracePropagationTargets) { - const href = WINDOW$5.location && WINDOW$5.location.href; - if (!href) { - const isRelativeSameOriginRequest = !!targetUrl.match(/^\/(?!\/)/); - if (!tracePropagationTargets) { - return isRelativeSameOriginRequest; - } else { - return stringMatchesSomePattern(targetUrl, tracePropagationTargets); - } - } else { - let resolvedUrl; - let currentOrigin; - try { - resolvedUrl = new URL(targetUrl, href); - currentOrigin = new URL(href).origin; - } catch (e2) { - return false; - } - const isSameOriginRequest = resolvedUrl.origin === currentOrigin; - if (!tracePropagationTargets) { - return isSameOriginRequest; - } else { - return stringMatchesSomePattern(resolvedUrl.toString(), tracePropagationTargets) || isSameOriginRequest && stringMatchesSomePattern(resolvedUrl.pathname, tracePropagationTargets); - } - } -} -__name(shouldAttachHeaders, "shouldAttachHeaders"); -function xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeaders2, spans) { - const xhr = handlerData.xhr; - const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY]; - if (!xhr || xhr.__sentry_own_request__ || !sentryXhrData) { - return void 0; - } - const shouldCreateSpanResult = hasTracingEnabled() && shouldCreateSpan(sentryXhrData.url); - if (handlerData.endTimestamp && shouldCreateSpanResult) { - const spanId = xhr.__sentry_xhr_span_id__; - if (!spanId) return; - const span2 = spans[spanId]; - if (span2 && sentryXhrData.status_code !== void 0) { - setHttpStatus(span2, sentryXhrData.status_code); - span2.end(); - delete spans[spanId]; - } - return void 0; - } - const fullUrl = getFullURL(sentryXhrData.url); - const host = fullUrl ? parseUrl$1(fullUrl).host : void 0; - const hasParent = !!getActiveSpan(); - const span = shouldCreateSpanResult && hasParent ? startInactiveSpan({ - name: `${sentryXhrData.method} ${sentryXhrData.url}`, - attributes: { - type: "xhr", - "http.method": sentryXhrData.method, - "http.url": fullUrl, - url: sentryXhrData.url, - "server.address": host, - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.browser", - [SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.client" - } - }) : new SentryNonRecordingSpan(); - xhr.__sentry_xhr_span_id__ = span.spanContext().spanId; - spans[xhr.__sentry_xhr_span_id__] = span; - if (shouldAttachHeaders2(sentryXhrData.url)) { - addTracingHeadersToXhrRequest( - xhr, - // If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction), - // we do not want to use the span as base for the trace headers, - // which means that the headers will be generated from the scope and the sampling decision is deferred - hasTracingEnabled() && hasParent ? span : void 0 - ); - } - return span; -} -__name(xhrCallback, "xhrCallback"); -function addTracingHeadersToXhrRequest(xhr, span) { - const { "sentry-trace": sentryTrace, baggage } = getTraceData({ span }); - if (sentryTrace) { - setHeaderOnXhr(xhr, sentryTrace, baggage); - } -} -__name(addTracingHeadersToXhrRequest, "addTracingHeadersToXhrRequest"); -function setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader) { - try { - xhr.setRequestHeader("sentry-trace", sentryTraceHeader); - if (sentryBaggageHeader) { - xhr.setRequestHeader("baggage", sentryBaggageHeader); - } - } catch (_2) { - } -} -__name(setHeaderOnXhr, "setHeaderOnXhr"); -function getFullURL(url) { - try { - const parsed = new URL(url, WINDOW$5.location.origin); - return parsed.href; - } catch (e2) { - return void 0; - } -} -__name(getFullURL, "getFullURL"); -function registerBackgroundTabDetection() { - if (WINDOW$5 && WINDOW$5.document) { - WINDOW$5.document.addEventListener("visibilitychange", () => { - const activeSpan = getActiveSpan(); - if (!activeSpan) { - return; - } - const rootSpan = getRootSpan(activeSpan); - if (WINDOW$5.document.hidden && rootSpan) { - const cancelledStatus = "cancelled"; - const { op, status } = spanToJSON(rootSpan); - if (DEBUG_BUILD$4) { - logger$2.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`); - } - if (!status) { - rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus }); - } - rootSpan.setAttribute("sentry.cancellation_reason", "document.hidden"); - rootSpan.end(); - } - }); - } else { - DEBUG_BUILD$4 && logger$2.warn("[Tracing] Could not set up background tab detection due to lack of global document"); - } -} -__name(registerBackgroundTabDetection, "registerBackgroundTabDetection"); -const BROWSER_TRACING_INTEGRATION_ID = "BrowserTracing"; -const DEFAULT_BROWSER_TRACING_OPTIONS = { - ...TRACING_DEFAULTS, - instrumentNavigation: true, - instrumentPageLoad: true, - markBackgroundSpan: true, - enableLongTask: true, - enableLongAnimationFrame: true, - enableInp: true, - _experiments: {}, - ...defaultRequestInstrumentationOptions -}; -const browserTracingIntegration$1 = /* @__PURE__ */ __name((_options = {}) => { - registerSpanErrorInstrumentation(); - const { - enableInp, - enableLongTask, - enableLongAnimationFrame, - _experiments: { enableInteractions, enableStandaloneClsSpans }, - beforeStartSpan, - idleTimeout, - finalTimeout, - childSpanTimeout, - markBackgroundSpan, - traceFetch, - traceXHR, - trackFetchStreamPerformance, - shouldCreateSpanForRequest, - enableHTTPTimings, - instrumentPageLoad, - instrumentNavigation - } = { - ...DEFAULT_BROWSER_TRACING_OPTIONS, - ..._options - }; - const _collectWebVitals = startTrackingWebVitals({ recordClsStandaloneSpans: enableStandaloneClsSpans || false }); - if (enableInp) { - startTrackingINP(); - } - if (enableLongAnimationFrame && GLOBAL_OBJ.PerformanceObserver && PerformanceObserver.supportedEntryTypes && PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")) { - startTrackingLongAnimationFrames(); - } else if (enableLongTask) { - startTrackingLongTasks(); - } - if (enableInteractions) { - startTrackingInteractions(); - } - const latestRoute = { - name: void 0, - source: void 0 - }; - function _createRouteSpan(client, startSpanOptions) { - const isPageloadTransaction = startSpanOptions.op === "pageload"; - const finalStartSpanOptions = beforeStartSpan ? beforeStartSpan(startSpanOptions) : startSpanOptions; - const attributes = finalStartSpanOptions.attributes || {}; - if (startSpanOptions.name !== finalStartSpanOptions.name) { - attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = "custom"; - finalStartSpanOptions.attributes = attributes; - } - latestRoute.name = finalStartSpanOptions.name; - latestRoute.source = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; - const idleSpan = startIdleSpan(finalStartSpanOptions, { - idleTimeout, - finalTimeout, - childSpanTimeout, - // should wait for finish signal if it's a pageload transaction - disableAutoFinish: isPageloadTransaction, - beforeSpanEnd: /* @__PURE__ */ __name((span) => { - _collectWebVitals(); - addPerformanceEntries(span, { recordClsOnPageloadSpan: !enableStandaloneClsSpans }); - }, "beforeSpanEnd") - }); - function emitFinish() { - if (["interactive", "complete"].includes(WINDOW$5.document.readyState)) { - client.emit("idleSpanEnableAutoFinish", idleSpan); - } - } - __name(emitFinish, "emitFinish"); - if (isPageloadTransaction && WINDOW$5.document) { - WINDOW$5.document.addEventListener("readystatechange", () => { - emitFinish(); - }); - emitFinish(); - } - return idleSpan; - } - __name(_createRouteSpan, "_createRouteSpan"); - return { - name: BROWSER_TRACING_INTEGRATION_ID, - afterAllSetup(client) { - let activeSpan; - let startingUrl = WINDOW$5.location && WINDOW$5.location.href; - function maybeEndActiveSpan() { - if (activeSpan && !spanToJSON(activeSpan).timestamp) { - DEBUG_BUILD$4 && logger$2.log(`[Tracing] Finishing current active span with op: ${spanToJSON(activeSpan).op}`); - activeSpan.end(); - } - } - __name(maybeEndActiveSpan, "maybeEndActiveSpan"); - client.on("startNavigationSpan", (startSpanOptions) => { - if (getClient() !== client) { - return; - } - maybeEndActiveSpan(); - activeSpan = _createRouteSpan(client, { - op: "navigation", - ...startSpanOptions - }); - }); - client.on("startPageLoadSpan", (startSpanOptions, traceOptions = {}) => { - if (getClient() !== client) { - return; - } - maybeEndActiveSpan(); - const sentryTrace = traceOptions.sentryTrace || getMetaContent("sentry-trace"); - const baggage = traceOptions.baggage || getMetaContent("baggage"); - const propagationContext = propagationContextFromHeaders(sentryTrace, baggage); - getCurrentScope$1().setPropagationContext(propagationContext); - activeSpan = _createRouteSpan(client, { - op: "pageload", - ...startSpanOptions - }); - }); - client.on("spanEnd", (span) => { - const op = spanToJSON(span).op; - if (span !== getRootSpan(span) || op !== "navigation" && op !== "pageload") { - return; - } - const scope = getCurrentScope$1(); - const oldPropagationContext = scope.getPropagationContext(); - scope.setPropagationContext({ - ...oldPropagationContext, - sampled: oldPropagationContext.sampled !== void 0 ? oldPropagationContext.sampled : spanIsSampled(span), - dsc: oldPropagationContext.dsc || getDynamicSamplingContextFromSpan(span) - }); - }); - if (WINDOW$5.location) { - if (instrumentPageLoad) { - startBrowserTracingPageLoadSpan(client, { - name: WINDOW$5.location.pathname, - // pageload should always start at timeOrigin (and needs to be in s, not ms) - startTime: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1e3 : void 0, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "url", - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.pageload.browser" - } - }); - } - if (instrumentNavigation) { - addHistoryInstrumentationHandler(({ to, from: from2 }) => { - if (from2 === void 0 && startingUrl && startingUrl.indexOf(to) !== -1) { - startingUrl = void 0; - return; - } - if (from2 !== to) { - startingUrl = void 0; - startBrowserTracingNavigationSpan(client, { - name: WINDOW$5.location.pathname, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "url", - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.navigation.browser" - } - }); - } - }); - } - } - if (markBackgroundSpan) { - registerBackgroundTabDetection(); - } - if (enableInteractions) { - registerInteractionListener(idleTimeout, finalTimeout, childSpanTimeout, latestRoute); - } - if (enableInp) { - registerInpInteractionListener(); - } - instrumentOutgoingRequests(client, { - traceFetch, - traceXHR, - trackFetchStreamPerformance, - tracePropagationTargets: client.getOptions().tracePropagationTargets, - shouldCreateSpanForRequest, - enableHTTPTimings - }); - } - }; -}, "browserTracingIntegration$1"); -function startBrowserTracingPageLoadSpan(client, spanOptions, traceOptions) { - client.emit("startPageLoadSpan", spanOptions, traceOptions); - getCurrentScope$1().setTransactionName(spanOptions.name); - const span = getActiveSpan(); - const op = span && spanToJSON(span).op; - return op === "pageload" ? span : void 0; -} -__name(startBrowserTracingPageLoadSpan, "startBrowserTracingPageLoadSpan"); -function startBrowserTracingNavigationSpan(client, spanOptions) { - getIsolationScope().setPropagationContext({ traceId: generateTraceId() }); - getCurrentScope$1().setPropagationContext({ traceId: generateTraceId() }); - client.emit("startNavigationSpan", spanOptions); - getCurrentScope$1().setTransactionName(spanOptions.name); - const span = getActiveSpan(); - const op = span && spanToJSON(span).op; - return op === "navigation" ? span : void 0; -} -__name(startBrowserTracingNavigationSpan, "startBrowserTracingNavigationSpan"); -function getMetaContent(metaName) { - const metaTag = getDomElement(`meta[name=${metaName}]`); - return metaTag ? metaTag.getAttribute("content") : void 0; -} -__name(getMetaContent, "getMetaContent"); -function registerInteractionListener(idleTimeout, finalTimeout, childSpanTimeout, latestRoute) { - let inflightInteractionSpan; - const registerInteractionTransaction = /* @__PURE__ */ __name(() => { - const op = "ui.action.click"; - const activeSpan = getActiveSpan(); - const rootSpan = activeSpan && getRootSpan(activeSpan); - if (rootSpan) { - const currentRootSpanOp = spanToJSON(rootSpan).op; - if (["navigation", "pageload"].includes(currentRootSpanOp)) { - DEBUG_BUILD$4 && logger$2.warn(`[Tracing] Did not create ${op} span because a pageload or navigation span is in progress.`); - return void 0; - } - } - if (inflightInteractionSpan) { - inflightInteractionSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, "interactionInterrupted"); - inflightInteractionSpan.end(); - inflightInteractionSpan = void 0; - } - if (!latestRoute.name) { - DEBUG_BUILD$4 && logger$2.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`); - return void 0; - } - inflightInteractionSpan = startIdleSpan( - { - name: latestRoute.name, - op, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.source || "url" - } - }, - { - idleTimeout, - finalTimeout, - childSpanTimeout - } - ); - }, "registerInteractionTransaction"); - if (WINDOW$5.document) { - addEventListener("click", registerInteractionTransaction, { once: false, capture: true }); - } -} -__name(registerInteractionListener, "registerInteractionListener"); -function promisifyRequest(request) { - return new Promise((resolve2, reject3) => { - request.oncomplete = request.onsuccess = () => resolve2(request.result); - request.onabort = request.onerror = () => reject3(request.error); - }); -} -__name(promisifyRequest, "promisifyRequest"); -function createStore(dbName, storeName) { - const request = indexedDB.open(dbName); - request.onupgradeneeded = () => request.result.createObjectStore(storeName); - const dbp = promisifyRequest(request); - return (callback) => dbp.then((db) => callback(db.transaction(storeName, "readwrite").objectStore(storeName))); -} -__name(createStore, "createStore"); -function keys$7(store) { - return promisifyRequest(store.getAllKeys()); -} -__name(keys$7, "keys$7"); -function push(store, value4, maxQueueSize) { - return store((store2) => { - return keys$7(store2).then((keys2) => { - if (keys2.length >= maxQueueSize) { - return; - } - store2.put(value4, Math.max(...keys2, 0) + 1); - return promisifyRequest(store2.transaction); - }); - }); -} -__name(push, "push"); -function unshift(store, value4, maxQueueSize) { - return store((store2) => { - return keys$7(store2).then((keys2) => { - if (keys2.length >= maxQueueSize) { - return; - } - store2.put(value4, Math.min(...keys2, 0) - 1); - return promisifyRequest(store2.transaction); - }); - }); -} -__name(unshift, "unshift"); -function shift$1(store) { - return store((store2) => { - return keys$7(store2).then((keys2) => { - const firstKey = keys2[0]; - if (firstKey == null) { - return void 0; - } - return promisifyRequest(store2.get(firstKey)).then((value4) => { - store2.delete(firstKey); - return promisifyRequest(store2.transaction).then(() => value4); - }); - }); - }); -} -__name(shift$1, "shift$1"); -function createIndexedDbStore(options4) { - let store; - function getStore() { - if (store == void 0) { - store = createStore(options4.dbName || "sentry-offline", options4.storeName || "queue"); - } - return store; - } - __name(getStore, "getStore"); - return { - push: /* @__PURE__ */ __name(async (env) => { - try { - const serialized = await serializeEnvelope(env); - await push(getStore(), serialized, options4.maxQueueSize || 30); - } catch (_2) { - } - }, "push"), - unshift: /* @__PURE__ */ __name(async (env) => { - try { - const serialized = await serializeEnvelope(env); - await unshift(getStore(), serialized, options4.maxQueueSize || 30); - } catch (_2) { - } - }, "unshift"), - shift: /* @__PURE__ */ __name(async () => { - try { - const deserialized = await shift$1(getStore()); - if (deserialized) { - return parseEnvelope(deserialized); - } - } catch (_2) { - } - return void 0; - }, "shift") - }; -} -__name(createIndexedDbStore, "createIndexedDbStore"); -function makeIndexedDbOfflineTransport(createTransport2) { - return (options4) => createTransport2({ ...options4, createStore: createIndexedDbStore }); -} -__name(makeIndexedDbOfflineTransport, "makeIndexedDbOfflineTransport"); -function makeBrowserOfflineTransport(createTransport2 = makeFetchTransport) { - return makeIndexedDbOfflineTransport(makeOfflineTransport(createTransport2)); -} -__name(makeBrowserOfflineTransport, "makeBrowserOfflineTransport"); -const MS_TO_NS = 1e6; -const THREAD_ID_STRING = String(0); -const THREAD_NAME = "main"; -let OS_PLATFORM = ""; -let OS_PLATFORM_VERSION = ""; -let OS_ARCH = ""; -let OS_BROWSER = WINDOW$5.navigator && WINDOW$5.navigator.userAgent || ""; -let OS_MODEL = ""; -const OS_LOCALE = WINDOW$5.navigator && WINDOW$5.navigator.language || WINDOW$5.navigator && WINDOW$5.navigator.languages && WINDOW$5.navigator.languages[0] || ""; -function isUserAgentData(data25) { - return typeof data25 === "object" && data25 !== null && "getHighEntropyValues" in data25; -} -__name(isUserAgentData, "isUserAgentData"); -const userAgentData = WINDOW$5.navigator && WINDOW$5.navigator.userAgentData; -if (isUserAgentData(userAgentData)) { - userAgentData.getHighEntropyValues(["architecture", "model", "platform", "platformVersion", "fullVersionList"]).then((ua) => { - OS_PLATFORM = ua.platform || ""; - OS_ARCH = ua.architecture || ""; - OS_MODEL = ua.model || ""; - OS_PLATFORM_VERSION = ua.platformVersion || ""; - if (ua.fullVersionList && ua.fullVersionList.length > 0) { - const firstUa = ua.fullVersionList[ua.fullVersionList.length - 1]; - OS_BROWSER = `${firstUa.brand} ${firstUa.version}`; - } - }).catch((e2) => void 0); -} -function isProcessedJSSelfProfile(profile) { - return !("thread_metadata" in profile); -} -__name(isProcessedJSSelfProfile, "isProcessedJSSelfProfile"); -function enrichWithThreadInformation(profile) { - if (!isProcessedJSSelfProfile(profile)) { - return profile; - } - return convertJSSelfProfileToSampledFormat(profile); -} -__name(enrichWithThreadInformation, "enrichWithThreadInformation"); -function getTraceId(event) { - const traceId = event && event.contexts && event.contexts["trace"] && event.contexts["trace"]["trace_id"]; - if (typeof traceId === "string" && traceId.length !== 32) { - if (DEBUG_BUILD$4) { - logger$2.log(`[Profiling] Invalid traceId: ${traceId} on profiled event`); - } - } - if (typeof traceId !== "string") { - return ""; - } - return traceId; -} -__name(getTraceId, "getTraceId"); -function createProfilePayload(profile_id, start_timestamp, processed_profile, event) { - if (event.type !== "transaction") { - throw new TypeError("Profiling events may only be attached to transactions, this should never occur."); - } - if (processed_profile === void 0 || processed_profile === null) { - throw new TypeError( - `Cannot construct profiling event envelope without a valid profile. Got ${processed_profile} instead.` - ); - } - const traceId = getTraceId(event); - const enrichedThreadProfile = enrichWithThreadInformation(processed_profile); - const transactionStartMs = start_timestamp ? start_timestamp : typeof event.start_timestamp === "number" ? event.start_timestamp * 1e3 : timestampInSeconds() * 1e3; - const transactionEndMs = typeof event.timestamp === "number" ? event.timestamp * 1e3 : timestampInSeconds() * 1e3; - const profile = { - event_id: profile_id, - timestamp: new Date(transactionStartMs).toISOString(), - platform: "javascript", - version: "1", - release: event.release || "", - environment: event.environment || DEFAULT_ENVIRONMENT, - runtime: { - name: "javascript", - version: WINDOW$5.navigator.userAgent - }, - os: { - name: OS_PLATFORM, - version: OS_PLATFORM_VERSION, - build_number: OS_BROWSER - }, - device: { - locale: OS_LOCALE, - model: OS_MODEL, - manufacturer: OS_BROWSER, - architecture: OS_ARCH, - is_emulator: false - }, - debug_meta: { - images: applyDebugMetadata(processed_profile.resources) - }, - profile: enrichedThreadProfile, - transactions: [ - { - name: event.transaction || "", - id: event.event_id || uuid4(), - trace_id: traceId, - active_thread_id: THREAD_ID_STRING, - relative_start_ns: "0", - relative_end_ns: ((transactionEndMs - transactionStartMs) * 1e6).toFixed(0) - } - ] - }; - return profile; -} -__name(createProfilePayload, "createProfilePayload"); -function isAutomatedPageLoadSpan(span) { - return spanToJSON(span).op === "pageload"; -} -__name(isAutomatedPageLoadSpan, "isAutomatedPageLoadSpan"); -function convertJSSelfProfileToSampledFormat(input) { - let EMPTY_STACK_ID = void 0; - let STACK_ID = 0; - const profile = { - samples: [], - stacks: [], - frames: [], - thread_metadata: { - [THREAD_ID_STRING]: { name: THREAD_NAME } - } - }; - const firstSample = input.samples[0]; - if (!firstSample) { - return profile; - } - const start2 = firstSample.timestamp; - const origin2 = typeof performance.timeOrigin === "number" ? performance.timeOrigin : browserPerformanceTimeOrigin || 0; - const adjustForOriginChange = origin2 - (browserPerformanceTimeOrigin || origin2); - input.samples.forEach((jsSample, i2) => { - if (jsSample.stackId === void 0) { - if (EMPTY_STACK_ID === void 0) { - EMPTY_STACK_ID = STACK_ID; - profile.stacks[EMPTY_STACK_ID] = []; - STACK_ID++; - } - profile["samples"][i2] = { - // convert ms timestamp to ns - elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start2) * MS_TO_NS).toFixed(0), - stack_id: EMPTY_STACK_ID, - thread_id: THREAD_ID_STRING - }; - return; - } - let stackTop = input.stacks[jsSample.stackId]; - const stack2 = []; - while (stackTop) { - stack2.push(stackTop.frameId); - const frame = input.frames[stackTop.frameId]; - if (frame && profile.frames[stackTop.frameId] === void 0) { - profile.frames[stackTop.frameId] = { - function: frame.name, - abs_path: typeof frame.resourceId === "number" ? input.resources[frame.resourceId] : void 0, - lineno: frame.line, - colno: frame.column - }; - } - stackTop = stackTop.parentId === void 0 ? void 0 : input.stacks[stackTop.parentId]; - } - const sample = { - // convert ms timestamp to ns - elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start2) * MS_TO_NS).toFixed(0), - stack_id: STACK_ID, - thread_id: THREAD_ID_STRING - }; - profile["stacks"][STACK_ID] = stack2; - profile["samples"][i2] = sample; - STACK_ID++; - }); - return profile; -} -__name(convertJSSelfProfileToSampledFormat, "convertJSSelfProfileToSampledFormat"); -function addProfilesToEnvelope(envelope, profiles) { - if (!profiles.length) { - return envelope; - } - for (const profile of profiles) { - envelope[1].push([{ type: "profile" }, profile]); - } - return envelope; -} -__name(addProfilesToEnvelope, "addProfilesToEnvelope"); -function findProfiledTransactionsFromEnvelope(envelope) { - const events2 = []; - forEachEnvelopeItem(envelope, (item3, type) => { - if (type !== "transaction") { - return; - } - for (let j2 = 1; j2 < item3.length; j2++) { - const event = item3[j2]; - if (event && event.contexts && event.contexts["profile"] && event.contexts["profile"]["profile_id"]) { - events2.push(item3[j2]); - } - } - }); - return events2; -} -__name(findProfiledTransactionsFromEnvelope, "findProfiledTransactionsFromEnvelope"); -function applyDebugMetadata(resource_paths) { - const client = getClient(); - const options4 = client && client.getOptions(); - const stackParser = options4 && options4.stackParser; - if (!stackParser) { - return []; - } - return getDebugImagesForResources(stackParser, resource_paths); -} -__name(applyDebugMetadata, "applyDebugMetadata"); -function isValidSampleRate(rate) { - if (typeof rate !== "number" && typeof rate !== "boolean" || typeof rate === "number" && isNaN(rate)) { - DEBUG_BUILD$4 && logger$2.warn( - `[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( - rate - )} of type ${JSON.stringify(typeof rate)}.` - ); - return false; - } - if (rate === true || rate === false) { - return true; - } - if (rate < 0 || rate > 1) { - DEBUG_BUILD$4 && logger$2.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${rate}.`); - return false; - } - return true; -} -__name(isValidSampleRate, "isValidSampleRate"); -function isValidProfile(profile) { - if (profile.samples.length < 2) { - if (DEBUG_BUILD$4) { - logger$2.log("[Profiling] Discarding profile because it contains less than 2 samples"); - } - return false; - } - if (!profile.frames.length) { - if (DEBUG_BUILD$4) { - logger$2.log("[Profiling] Discarding profile because it contains no frames"); - } - return false; - } - return true; -} -__name(isValidProfile, "isValidProfile"); -let PROFILING_CONSTRUCTOR_FAILED = false; -const MAX_PROFILE_DURATION_MS = 3e4; -function isJSProfilerSupported(maybeProfiler) { - return typeof maybeProfiler === "function"; -} -__name(isJSProfilerSupported, "isJSProfilerSupported"); -function startJSSelfProfile() { - const JSProfilerConstructor = WINDOW$5.Profiler; - if (!isJSProfilerSupported(JSProfilerConstructor)) { - if (DEBUG_BUILD$4) { - logger$2.log( - "[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object." - ); - } - return; - } - const samplingIntervalMS = 10; - const maxSamples = Math.floor(MAX_PROFILE_DURATION_MS / samplingIntervalMS); - try { - return new JSProfilerConstructor({ sampleInterval: samplingIntervalMS, maxBufferSize: maxSamples }); - } catch (e2) { - if (DEBUG_BUILD$4) { - logger$2.log( - "[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header." - ); - logger$2.log("[Profiling] Disabling profiling for current user session."); - } - PROFILING_CONSTRUCTOR_FAILED = true; - } - return; -} -__name(startJSSelfProfile, "startJSSelfProfile"); -function shouldProfileSpan(span) { - if (PROFILING_CONSTRUCTOR_FAILED) { - if (DEBUG_BUILD$4) { - logger$2.log("[Profiling] Profiling has been disabled for the duration of the current user session."); - } - return false; - } - if (!span.isRecording()) { - if (DEBUG_BUILD$4) { - logger$2.log("[Profiling] Discarding profile because transaction was not sampled."); - } - return false; - } - const client = getClient(); - const options4 = client && client.getOptions(); - if (!options4) { - DEBUG_BUILD$4 && logger$2.log("[Profiling] Profiling disabled, no options found."); - return false; - } - const profilesSampleRate = options4.profilesSampleRate; - if (!isValidSampleRate(profilesSampleRate)) { - DEBUG_BUILD$4 && logger$2.warn("[Profiling] Discarding profile because of invalid sample rate."); - return false; - } - if (!profilesSampleRate) { - DEBUG_BUILD$4 && logger$2.log( - "[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0" - ); - return false; - } - const sampled = profilesSampleRate === true ? true : Math.random() < profilesSampleRate; - if (!sampled) { - DEBUG_BUILD$4 && logger$2.log( - `[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number( - profilesSampleRate - )})` - ); - return false; - } - return true; -} -__name(shouldProfileSpan, "shouldProfileSpan"); -function createProfilingEvent(profile_id, start_timestamp, profile, event) { - if (!isValidProfile(profile)) { - return null; - } - return createProfilePayload(profile_id, start_timestamp, profile, event); -} -__name(createProfilingEvent, "createProfilingEvent"); -const PROFILE_MAP = /* @__PURE__ */ new Map(); -function getActiveProfilesCount() { - return PROFILE_MAP.size; -} -__name(getActiveProfilesCount, "getActiveProfilesCount"); -function takeProfileFromGlobalCache(profile_id) { - const profile = PROFILE_MAP.get(profile_id); - if (profile) { - PROFILE_MAP.delete(profile_id); - } - return profile; -} -__name(takeProfileFromGlobalCache, "takeProfileFromGlobalCache"); -function addProfileToGlobalCache(profile_id, profile) { - PROFILE_MAP.set(profile_id, profile); - if (PROFILE_MAP.size > 30) { - const last = PROFILE_MAP.keys().next().value; - PROFILE_MAP.delete(last); - } -} -__name(addProfileToGlobalCache, "addProfileToGlobalCache"); -function startProfileForSpan(span) { - let startTimestamp; - if (isAutomatedPageLoadSpan(span)) { - startTimestamp = timestampInSeconds() * 1e3; - } - const profiler2 = startJSSelfProfile(); - if (!profiler2) { - return; - } - if (DEBUG_BUILD$4) { - logger$2.log(`[Profiling] started profiling span: ${spanToJSON(span).description}`); - } - const profileId = uuid4(); - getCurrentScope$1().setContext("profile", { - profile_id: profileId, - start_timestamp: startTimestamp - }); - async function onProfileHandler() { - if (!span) { - return; - } - if (!profiler2) { - return; - } - return profiler2.stop().then((profile) => { - if (maxDurationTimeoutID) { - WINDOW$5.clearTimeout(maxDurationTimeoutID); - maxDurationTimeoutID = void 0; - } - if (DEBUG_BUILD$4) { - logger$2.log(`[Profiling] stopped profiling of span: ${spanToJSON(span).description}`); - } - if (!profile) { - if (DEBUG_BUILD$4) { - logger$2.log( - `[Profiling] profiler returned null profile for: ${spanToJSON(span).description}`, - "this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started" - ); - } - return; - } - addProfileToGlobalCache(profileId, profile); - }).catch((error2) => { - if (DEBUG_BUILD$4) { - logger$2.log("[Profiling] error while stopping profiler:", error2); - } - }); - } - __name(onProfileHandler, "onProfileHandler"); - let maxDurationTimeoutID = WINDOW$5.setTimeout(() => { - if (DEBUG_BUILD$4) { - logger$2.log("[Profiling] max profile duration elapsed, stopping profiling for:", spanToJSON(span).description); - } - onProfileHandler(); - }, MAX_PROFILE_DURATION_MS); - const originalEnd = span.end.bind(span); - function profilingWrappedSpanEnd() { - if (!span) { - return originalEnd(); - } - void onProfileHandler().then( - () => { - originalEnd(); - }, - () => { - originalEnd(); - } - ); - return span; - } - __name(profilingWrappedSpanEnd, "profilingWrappedSpanEnd"); - span.end = profilingWrappedSpanEnd; -} -__name(startProfileForSpan, "startProfileForSpan"); -const INTEGRATION_NAME$2 = "BrowserProfiling"; -const _browserProfilingIntegration = /* @__PURE__ */ __name(() => { - return { - name: INTEGRATION_NAME$2, - setup(client) { - const activeSpan = getActiveSpan(); - const rootSpan = activeSpan && getRootSpan(activeSpan); - if (rootSpan && isAutomatedPageLoadSpan(rootSpan)) { - if (shouldProfileSpan(rootSpan)) { - startProfileForSpan(rootSpan); - } - } - client.on("spanStart", (span) => { - if (span === getRootSpan(span) && shouldProfileSpan(span)) { - startProfileForSpan(span); - } - }); - client.on("beforeEnvelope", (envelope) => { - if (!getActiveProfilesCount()) { - return; - } - const profiledTransactionEvents = findProfiledTransactionsFromEnvelope(envelope); - if (!profiledTransactionEvents.length) { - return; - } - const profilesToAddToEnvelope = []; - for (const profiledTransaction of profiledTransactionEvents) { - const context = profiledTransaction && profiledTransaction.contexts; - const profile_id = context && context["profile"] && context["profile"]["profile_id"]; - const start_timestamp = context && context["profile"] && context["profile"]["start_timestamp"]; - if (typeof profile_id !== "string") { - DEBUG_BUILD$4 && logger$2.log("[Profiling] cannot find profile for a span without a profile context"); - continue; - } - if (!profile_id) { - DEBUG_BUILD$4 && logger$2.log("[Profiling] cannot find profile for a span without a profile context"); - continue; - } - if (context && context["profile"]) { - delete context.profile; - } - const profile = takeProfileFromGlobalCache(profile_id); - if (!profile) { - DEBUG_BUILD$4 && logger$2.log(`[Profiling] Could not retrieve profile for span: ${profile_id}`); - continue; - } - const profileEvent = createProfilingEvent( - profile_id, - start_timestamp, - profile, - profiledTransaction - ); - if (profileEvent) { - profilesToAddToEnvelope.push(profileEvent); - } - } - addProfilesToEnvelope(envelope, profilesToAddToEnvelope); - }); - } - }; -}, "_browserProfilingIntegration"); -const browserProfilingIntegration = defineIntegration(_browserProfilingIntegration); -const INTEGRATION_NAME$1 = "SpotlightBrowser"; -const _spotlightIntegration = /* @__PURE__ */ __name((options4 = {}) => { - const sidecarUrl = options4.sidecarUrl || "http://localhost:8969/stream"; - return { - name: INTEGRATION_NAME$1, - setup: /* @__PURE__ */ __name(() => { - DEBUG_BUILD$4 && logger$2.log("Using Sidecar URL", sidecarUrl); - }, "setup"), - // We don't want to send interaction transactions/root spans created from - // clicks within Spotlight to Sentry. Neither do we want them to be sent to - // spotlight. - processEvent: /* @__PURE__ */ __name((event) => isSpotlightInteraction(event) ? null : event, "processEvent"), - afterAllSetup: /* @__PURE__ */ __name((client) => { - setupSidecarForwarding(client, sidecarUrl); - }, "afterAllSetup") - }; -}, "_spotlightIntegration"); -function setupSidecarForwarding(client, sidecarUrl) { - const makeFetch = getNativeImplementation("fetch"); - let failCount = 0; - client.on("beforeEnvelope", (envelope) => { - if (failCount > 3) { - logger$2.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:", failCount); - return; - } - makeFetch(sidecarUrl, { - method: "POST", - body: serializeEnvelope(envelope), - headers: { - "Content-Type": "application/x-sentry-envelope" - }, - mode: "cors" - }).then( - (res) => { - if (res.status >= 200 && res.status < 400) { - failCount = 0; - } - }, - (err) => { - failCount++; - logger$2.error( - "Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/", - err - ); - } - ); - }); -} -__name(setupSidecarForwarding, "setupSidecarForwarding"); -const spotlightBrowserIntegration = defineIntegration(_spotlightIntegration); -function isSpotlightInteraction(event) { - return Boolean( - event.type === "transaction" && event.spans && event.contexts && event.contexts.trace && event.contexts.trace.op === "ui.action.click" && event.spans.some(({ description }) => description && description.includes("#sentry-spotlight")) - ); -} -__name(isSpotlightInteraction, "isSpotlightInteraction"); -const FLAG_BUFFER_SIZE = 100; -function copyFlagsFromScopeToEvent(event) { - const scope = getCurrentScope$1(); - const flagContext = scope.getScopeData().contexts.flags; - const flagBuffer = flagContext ? flagContext.values : []; - if (!flagBuffer.length) { - return event; - } - if (event.contexts === void 0) { - event.contexts = {}; - } - event.contexts.flags = { values: [...flagBuffer] }; - return event; -} -__name(copyFlagsFromScopeToEvent, "copyFlagsFromScopeToEvent"); -function insertFlagToScope(name2, value4, maxSize = FLAG_BUFFER_SIZE) { - const scopeContexts = getCurrentScope$1().getScopeData().contexts; - if (!scopeContexts.flags) { - scopeContexts.flags = { values: [] }; - } - const flags = scopeContexts.flags.values; - insertToFlagBuffer(flags, name2, value4, maxSize); -} -__name(insertFlagToScope, "insertFlagToScope"); -function insertToFlagBuffer(flags, name2, value4, maxSize) { - if (typeof value4 !== "boolean") { - return; - } - if (flags.length > maxSize) { - DEBUG_BUILD$4 && logger$2.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${maxSize}`); - return; - } - const index2 = flags.findIndex((f2) => f2.flag === name2); - if (index2 !== -1) { - flags.splice(index2, 1); - } - if (flags.length === maxSize) { - flags.shift(); - } - flags.push({ - flag: name2, - result: value4 - }); -} -__name(insertToFlagBuffer, "insertToFlagBuffer"); -const featureFlagsIntegration = defineIntegration(() => { - return { - name: "FeatureFlags", - processEvent(event, _hint, _client) { - return copyFlagsFromScopeToEvent(event); - }, - addFeatureFlag(name2, value4) { - insertFlagToScope(name2, value4); - } - }; -}); -const launchDarklyIntegration = defineIntegration(() => { - return { - name: "LaunchDarkly", - processEvent(event, _hint, _client) { - return copyFlagsFromScopeToEvent(event); - } - }; -}); -function buildLaunchDarklyFlagUsedHandler() { - return { - name: "sentry-flag-auditor", - type: "flag-used", - synchronous: true, - /** - * Handle a flag evaluation by storing its name and value on the current scope. - */ - method: /* @__PURE__ */ __name((flagKey, flagDetail, _context) => { - insertFlagToScope(flagKey, flagDetail.value); - }, "method") - }; -} -__name(buildLaunchDarklyFlagUsedHandler, "buildLaunchDarklyFlagUsedHandler"); -const openFeatureIntegration = defineIntegration(() => { - return { - name: "OpenFeature", - processEvent(event, _hint, _client) { - return copyFlagsFromScopeToEvent(event); - } - }; -}); -class OpenFeatureIntegrationHook { - static { - __name(this, "OpenFeatureIntegrationHook"); - } - /** - * Successful evaluation result. - */ - after(_hookContext, evaluationDetails) { - insertFlagToScope(evaluationDetails.flagKey, evaluationDetails.value); - } - /** - * On error evaluation result. - */ - error(hookContext, _error, _hookHints) { - insertFlagToScope(hookContext.flagKey, hookContext.defaultValue); - } -} -const DEFAULT_HOOKS = ["activate", "mount", "update"]; -const DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; -const classifyRE$1 = /(?:^|[-_])(\w)/g; -const classify$1 = /* @__PURE__ */ __name((str) => str.replace(classifyRE$1, (c2) => c2.toUpperCase()).replace(/[-_]/g, ""), "classify$1"); -const ROOT_COMPONENT_NAME = ""; -const ANONYMOUS_COMPONENT_NAME = ""; -const repeat = /* @__PURE__ */ __name((str, n2) => { - return str.repeat(n2); -}, "repeat"); -const formatComponentName$1 = /* @__PURE__ */ __name((vm, includeFile) => { - if (!vm) { - return ANONYMOUS_COMPONENT_NAME; - } - if (vm.$root === vm) { - return ROOT_COMPONENT_NAME; - } - if (!vm.$options) { - return ANONYMOUS_COMPONENT_NAME; - } - const options4 = vm.$options; - let name2 = options4.name || options4._componentTag || options4.__name; - const file = options4.__file; - if (!name2 && file) { - const match2 = file.match(/([^/\\]+)\.vue$/); - if (match2) { - name2 = match2[1]; - } - } - return (name2 ? `<${classify$1(name2)}>` : ANONYMOUS_COMPONENT_NAME) + (file && includeFile !== false ? ` at ${file}` : ""); -}, "formatComponentName$1"); -const generateComponentTrace = /* @__PURE__ */ __name((vm) => { - if (vm && (vm._isVue || vm.__isVue) && vm.$parent) { - const tree = []; - let currentRecursiveSequence = 0; - while (vm) { - if (tree.length > 0) { - const last = tree[tree.length - 1]; - if (last.constructor === vm.constructor) { - currentRecursiveSequence++; - vm = vm.$parent; - continue; - } else if (currentRecursiveSequence > 0) { - tree[tree.length - 1] = [last, currentRecursiveSequence]; - currentRecursiveSequence = 0; - } - } - tree.push(vm); - vm = vm.$parent; - } - const formattedTree = tree.map( - (vm2, i2) => `${(i2 === 0 ? "---> " : repeat(" ", 5 + i2 * 2)) + (Array.isArray(vm2) ? `${formatComponentName$1(vm2[0])}... (${vm2[1]} recursive calls)` : formatComponentName$1(vm2))}` - ).join("\n"); - return ` - -found in - -${formattedTree}`; - } - return ` - -(found in ${formatComponentName$1(vm)})`; -}, "generateComponentTrace"); -const attachErrorHandler = /* @__PURE__ */ __name((app2, options4) => { - const { errorHandler: originalErrorHandler, warnHandler, silent } = app2.config; - app2.config.errorHandler = (error2, vm, lifecycleHook) => { - const componentName = formatComponentName$1(vm, false); - const trace = vm ? generateComponentTrace(vm) : ""; - const metadata = { - componentName, - lifecycleHook, - trace - }; - if (options4.attachProps && vm) { - if (vm.$options && vm.$options.propsData) { - metadata.propsData = vm.$options.propsData; - } else if (vm.$props) { - metadata.propsData = vm.$props; - } - } - setTimeout(() => { - captureException(error2, { - captureContext: { contexts: { vue: metadata } }, - mechanism: { handled: false } - }); - }); - if (typeof originalErrorHandler === "function" && app2.config.errorHandler) { - originalErrorHandler.call(app2, error2, vm, lifecycleHook); - } - if (options4.logErrors) { - const hasConsole = typeof console !== "undefined"; - const message3 = `Error in ${lifecycleHook}: "${error2 && error2.toString()}"`; - if (warnHandler) { - warnHandler.call(null, message3, vm, trace); - } else if (hasConsole && !silent) { - consoleSandbox(() => { - console.error(`[Vue warn]: ${message3}${trace}`); - }); - } - } - }; -}, "attachErrorHandler"); -const VUE_OP = "ui.vue"; -const HOOKS = { - activate: ["activated", "deactivated"], - create: ["beforeCreate", "created"], - // Vue 3 - unmount: ["beforeUnmount", "unmounted"], - // Vue 2 - destroy: ["beforeDestroy", "destroyed"], - mount: ["beforeMount", "mounted"], - update: ["beforeUpdate", "updated"] -}; -function finishRootSpan(vm, timestamp2, timeout) { - if (vm.$_sentryRootSpanTimer) { - clearTimeout(vm.$_sentryRootSpanTimer); - } - vm.$_sentryRootSpanTimer = setTimeout(() => { - if (vm.$root && vm.$root.$_sentryRootSpan) { - vm.$root.$_sentryRootSpan.end(timestamp2); - vm.$root.$_sentryRootSpan = void 0; - } - }, timeout); -} -__name(finishRootSpan, "finishRootSpan"); -function findTrackComponent(trackComponents, formattedName) { - function extractComponentName(name2) { - return name2.replace(/^<([^\s]*)>(?: at [^\s]*)?$/, "$1"); - } - __name(extractComponentName, "extractComponentName"); - const isMatched = trackComponents.some((compo) => { - return extractComponentName(formattedName) === extractComponentName(compo); - }); - return isMatched; -} -__name(findTrackComponent, "findTrackComponent"); -const createTracingMixins = /* @__PURE__ */ __name((options4) => { - const hooks2 = (options4.hooks || []).concat(DEFAULT_HOOKS).filter((value4, index2, self2) => self2.indexOf(value4) === index2); - const mixins = {}; - for (const operation of hooks2) { - const internalHooks = HOOKS[operation]; - if (!internalHooks) { - DEBUG_BUILD && logger$2.warn(`Unknown hook: ${operation}`); - continue; - } - for (const internalHook of internalHooks) { - mixins[internalHook] = function() { - const isRoot = this.$root === this; - if (isRoot) { - this.$_sentryRootSpan = this.$_sentryRootSpan || startInactiveSpan({ - name: "Application Render", - op: `${VUE_OP}.render`, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.vue" - }, - onlyIfParent: true - }); - } - const name2 = formatComponentName$1(this, false); - const shouldTrack2 = Array.isArray(options4.trackComponents) ? findTrackComponent(options4.trackComponents, name2) : options4.trackComponents; - if (!isRoot && !shouldTrack2) { - return; - } - this.$_sentrySpans = this.$_sentrySpans || {}; - if (internalHook == internalHooks[0]) { - const activeSpan = this.$root && this.$root.$_sentryRootSpan || getActiveSpan(); - if (activeSpan) { - const oldSpan = this.$_sentrySpans[operation]; - if (oldSpan) { - oldSpan.end(); - } - this.$_sentrySpans[operation] = startInactiveSpan({ - name: `Vue ${name2}`, - op: `${VUE_OP}.${operation}`, - attributes: { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.vue" - }, - // UI spans should only be created if there is an active root span (transaction) - onlyIfParent: true - }); - } - } else { - const span = this.$_sentrySpans[operation]; - if (!span) return; - span.end(); - finishRootSpan(this, timestampInSeconds(), options4.timeout); - } - }; - } - } - return mixins; -}, "createTracingMixins"); -const globalWithVue = GLOBAL_OBJ; -const DEFAULT_CONFIG = { - Vue: globalWithVue.Vue, - attachProps: true, - logErrors: true, - attachErrorHandler: true, - hooks: DEFAULT_HOOKS, - timeout: 2e3, - trackComponents: false -}; -const INTEGRATION_NAME = "Vue"; -const vueIntegration = defineIntegration((integrationOptions = {}) => { - return { - name: INTEGRATION_NAME, - setup(client) { - const options4 = { ...DEFAULT_CONFIG, ...client.getOptions(), ...integrationOptions }; - if (!options4.Vue && !options4.app) { - consoleSandbox(() => { - console.warn( - "[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2)." - ); - }); - return; - } - if (options4.app) { - const apps = Array.isArray(options4.app) ? options4.app : [options4.app]; - apps.forEach((app2) => vueInit(app2, options4)); - } else if (options4.Vue) { - vueInit(options4.Vue, options4); - } - } - }; -}); -const vueInit = /* @__PURE__ */ __name((app2, options4) => { - if (DEBUG_BUILD) { - const appWithInstance = app2; - const isMounted = appWithInstance._instance && appWithInstance._instance.isMounted; - if (isMounted === true) { - consoleSandbox(() => { - console.warn( - "[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`." - ); - }); - } - } - if (options4.attachErrorHandler) { - attachErrorHandler(app2, options4); - } - if (hasTracingEnabled(options4)) { - app2.mixin( - createTracingMixins({ - ...options4, - // eslint-disable-next-line deprecation/deprecation - ...options4.tracingOptions - }) - ); - } -}, "vueInit"); -function init$3(config2 = {}) { - const options4 = { - _metadata: { - sdk: { - name: "sentry.javascript.vue", - packages: [ - { - name: "npm:@sentry/vue", - version: SDK_VERSION - } - ], - version: SDK_VERSION - } - }, - defaultIntegrations: [...getDefaultIntegrations(config2), vueIntegration()], - ...config2 - }; - return init$4(options4); -} -__name(init$3, "init$3"); -function instrumentVueRouter(router2, options4, startNavigationSpanFn) { - let isFirstPageLoad = true; - router2.onError((error2) => captureException(error2, { mechanism: { handled: false } })); - router2.beforeEach((to, from2, next2) => { - const isPageLoadNavigation = from2.name == null && from2.matched.length === 0 || from2.name === void 0 && isFirstPageLoad; - if (isFirstPageLoad) { - isFirstPageLoad = false; - } - const attributes = { - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.navigation.vue" - }; - for (const key of Object.keys(to.params)) { - attributes[`params.${key}`] = to.params[key]; - } - for (const key of Object.keys(to.query)) { - const value4 = to.query[key]; - if (value4) { - attributes[`query.${key}`] = value4; - } - } - let spanName = to.path; - let transactionSource = "url"; - if (to.name && options4.routeLabel !== "path") { - spanName = to.name.toString(); - transactionSource = "custom"; - } else if (to.matched.length > 0) { - const lastIndex2 = to.matched.length - 1; - spanName = to.matched[lastIndex2].path; - transactionSource = "route"; - } - getCurrentScope$1().setTransactionName(spanName); - if (options4.instrumentPageLoad && isPageLoadNavigation) { - const activeRootSpan = getActiveRootSpan(); - if (activeRootSpan) { - const existingAttributes = spanToJSON(activeRootSpan).data || {}; - if (existingAttributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] !== "custom") { - activeRootSpan.updateName(spanName); - activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, transactionSource); - } - activeRootSpan.setAttributes({ - ...attributes, - [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.pageload.vue" - }); - } - } - if (options4.instrumentNavigation && !isPageLoadNavigation) { - attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = transactionSource; - attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = "auto.navigation.vue"; - startNavigationSpanFn({ - name: spanName, - op: "navigation", - attributes - }); - } - if (next2) { - next2(); - } - }); -} -__name(instrumentVueRouter, "instrumentVueRouter"); -function getActiveRootSpan() { - const span = getActiveSpan(); - const rootSpan = span && getRootSpan(span); - if (!rootSpan) { - return void 0; - } - const op = spanToJSON(rootSpan).op; - return op === "navigation" || op === "pageload" ? rootSpan : void 0; -} -__name(getActiveRootSpan, "getActiveRootSpan"); -function browserTracingIntegration(options4 = {}) { - if (!options4.router) { - return browserTracingIntegration$1(options4); - } - const integration = browserTracingIntegration$1({ - ...options4, - instrumentNavigation: false - }); - const { router: router2, instrumentNavigation = true, instrumentPageLoad = true, routeLabel = "name" } = options4; - return { - ...integration, - afterAllSetup(client) { - integration.afterAllSetup(client); - const startNavigationSpan = /* @__PURE__ */ __name((options5) => { - startBrowserTracingNavigationSpan(client, options5); - }, "startNavigationSpan"); - instrumentVueRouter(router2, { routeLabel, instrumentNavigation, instrumentPageLoad }, startNavigationSpan); - } - }; -} -__name(browserTracingIntegration, "browserTracingIntegration"); -const createSentryPiniaPlugin = /* @__PURE__ */ __name((options4 = { - attachPiniaState: true, - addBreadcrumbs: true, - actionTransformer: /* @__PURE__ */ __name((action) => action, "actionTransformer"), - stateTransformer: /* @__PURE__ */ __name((state) => state, "stateTransformer") -}) => { - const plugin = /* @__PURE__ */ __name(({ store }) => { - options4.attachPiniaState !== false && getGlobalScope().addEventProcessor((event, hint) => { - try { - const timestamp2 = (/* @__PURE__ */ new Date()).toTimeString().split(" ")[0]; - const filename = `pinia_state_${store.$id}_${timestamp2}.json`; - hint.attachments = [ - ...hint.attachments || [], - { - filename, - data: JSON.stringify(store.$state) - } - ]; - } catch (_2) { - } - return event; - }); - store.$onAction((context) => { - context.after(() => { - const transformedActionName = options4.actionTransformer ? options4.actionTransformer(context.name) : context.name; - if (typeof transformedActionName !== "undefined" && transformedActionName !== null && options4.addBreadcrumbs !== false) { - addBreadcrumb({ - category: "action", - message: transformedActionName, - level: "info" - }); - } - const transformedState = options4.stateTransformer ? options4.stateTransformer(store.$state) : store.$state; - const scope = getCurrentScope$1(); - const currentState = scope.getScopeData().contexts.state; - if (typeof transformedState !== "undefined" && transformedState !== null) { - const client = getClient(); - const options5 = client && client.getOptions(); - const normalizationDepth = options5 && options5.normalizeDepth || 3; - const piniaStateContext = { type: "pinia", value: transformedState }; - const newState = { - ...currentState || {}, - state: piniaStateContext - }; - addNonEnumerableProperty( - newState, - "__sentry_override_normalization_depth__", - 3 + // 3 layers for `state.value.transformedState - normalizationDepth - // rest for the actual state - ); - scope.setContext("state", newState); - } else { - scope.setContext("state", { - ...currentState || {}, - state: { type: "pinia", value: "undefined" } - }); - } - }); - }); - }, "plugin"); - return plugin; -}, "createSentryPiniaPlugin"); -/** -* @vue/shared v3.4.31 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function makeMap(str, expectsLowerCase) { - const set3 = new Set(str.split(",")); - return expectsLowerCase ? (val) => set3.has(val.toLowerCase()) : (val) => set3.has(val); -} -__name(makeMap, "makeMap"); -const EMPTY_OBJ = false ? Object.freeze({}) : {}; -const EMPTY_ARR = false ? Object.freeze([]) : []; -const NOOP = /* @__PURE__ */ __name(() => { -}, "NOOP"); -const NO = /* @__PURE__ */ __name(() => false, "NO"); -const isOn = /* @__PURE__ */ __name((key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97), "isOn"); -const isModelListener = /* @__PURE__ */ __name((key) => key.startsWith("onUpdate:"), "isModelListener"); -const extend$1 = Object.assign; -const remove$1 = /* @__PURE__ */ __name((arr, el) => { - const i2 = arr.indexOf(el); - if (i2 > -1) { - arr.splice(i2, 1); - } -}, "remove$1"); -const hasOwnProperty$d = Object.prototype.hasOwnProperty; -const hasOwn$3 = /* @__PURE__ */ __name((val, key) => hasOwnProperty$d.call(val, key), "hasOwn$3"); -const isArray$9 = Array.isArray; -const isMap$3 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Map]", "isMap$3"); -const isSet$3 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Set]", "isSet$3"); -const isDate$2 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Date]", "isDate$2"); -const isRegExp$4 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object RegExp]", "isRegExp$4"); -const isFunction$8 = /* @__PURE__ */ __name((val) => typeof val === "function", "isFunction$8"); -const isString$7 = /* @__PURE__ */ __name((val) => typeof val === "string", "isString$7"); -const isSymbol$1 = /* @__PURE__ */ __name((val) => typeof val === "symbol", "isSymbol$1"); -const isObject$d = /* @__PURE__ */ __name((val) => val !== null && typeof val === "object", "isObject$d"); -const isPromise$1 = /* @__PURE__ */ __name((val) => { - return (isObject$d(val) || isFunction$8(val)) && isFunction$8(val.then) && isFunction$8(val.catch); -}, "isPromise$1"); -const objectToString$3 = Object.prototype.toString; -const toTypeString$1 = /* @__PURE__ */ __name((value4) => objectToString$3.call(value4), "toTypeString$1"); -const toRawType = /* @__PURE__ */ __name((value4) => { - return toTypeString$1(value4).slice(8, -1); -}, "toRawType"); -const isPlainObject$4 = /* @__PURE__ */ __name((val) => toTypeString$1(val) === "[object Object]", "isPlainObject$4"); -const isIntegerKey = /* @__PURE__ */ __name((key) => isString$7(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key, "isIntegerKey"); -const isReservedProp = /* @__PURE__ */ makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -const isBuiltInDirective = /* @__PURE__ */ makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -const cacheStringFunction$1 = /* @__PURE__ */ __name((fn) => { - const cache2 = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache2[str]; - return hit || (cache2[str] = fn(str)); - }; -}, "cacheStringFunction$1"); -const camelizeRE$1 = /-(\w)/g; -const camelize$1 = cacheStringFunction$1((str) => { - return str.replace(camelizeRE$1, (_2, c2) => c2 ? c2.toUpperCase() : ""); -}); -const hyphenateRE$1 = /\B([A-Z])/g; -const hyphenate$1 = cacheStringFunction$1( - (str) => str.replace(hyphenateRE$1, "-$1").toLowerCase() -); -const capitalize$1 = cacheStringFunction$1((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -const toHandlerKey = cacheStringFunction$1((str) => { - const s2 = str ? `on${capitalize$1(str)}` : ``; - return s2; -}); -const hasChanged = /* @__PURE__ */ __name((value4, oldValue2) => !Object.is(value4, oldValue2), "hasChanged"); -const invokeArrayFns = /* @__PURE__ */ __name((fns, ...arg) => { - for (let i2 = 0; i2 < fns.length; i2++) { - fns[i2](...arg); - } -}, "invokeArrayFns"); -const def = /* @__PURE__ */ __name((obj, key, value4, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value: value4 - }); -}, "def"); -const looseToNumber = /* @__PURE__ */ __name((val) => { - const n2 = parseFloat(val); - return isNaN(n2) ? val : n2; -}, "looseToNumber"); -const toNumber = /* @__PURE__ */ __name((val) => { - const n2 = isString$7(val) ? Number(val) : NaN; - return isNaN(n2) ? val : n2; -}, "toNumber"); -let _globalThis$1; -const getGlobalThis$1 = /* @__PURE__ */ __name(() => { - return _globalThis$1 || (_globalThis$1 = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}, "getGlobalThis$1"); -const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; -function genPropsAccessExp(name2) { - return identRE.test(name2) ? `__props.${name2}` : `__props[${JSON.stringify(name2)}]`; -} -__name(genPropsAccessExp, "genPropsAccessExp"); -const PatchFlags = { - "TEXT": 1, - "1": "TEXT", - "CLASS": 2, - "2": "CLASS", - "STYLE": 4, - "4": "STYLE", - "PROPS": 8, - "8": "PROPS", - "FULL_PROPS": 16, - "16": "FULL_PROPS", - "NEED_HYDRATION": 32, - "32": "NEED_HYDRATION", - "STABLE_FRAGMENT": 64, - "64": "STABLE_FRAGMENT", - "KEYED_FRAGMENT": 128, - "128": "KEYED_FRAGMENT", - "UNKEYED_FRAGMENT": 256, - "256": "UNKEYED_FRAGMENT", - "NEED_PATCH": 512, - "512": "NEED_PATCH", - "DYNAMIC_SLOTS": 1024, - "1024": "DYNAMIC_SLOTS", - "DEV_ROOT_FRAGMENT": 2048, - "2048": "DEV_ROOT_FRAGMENT", - "HOISTED": -1, - "-1": "HOISTED", - "BAIL": -2, - "-2": "BAIL" -}; -const PatchFlagNames = { - [1]: `TEXT`, - [2]: `CLASS`, - [4]: `STYLE`, - [8]: `PROPS`, - [16]: `FULL_PROPS`, - [32]: `NEED_HYDRATION`, - [64]: `STABLE_FRAGMENT`, - [128]: `KEYED_FRAGMENT`, - [256]: `UNKEYED_FRAGMENT`, - [512]: `NEED_PATCH`, - [1024]: `DYNAMIC_SLOTS`, - [2048]: `DEV_ROOT_FRAGMENT`, - [-1]: `HOISTED`, - [-2]: `BAIL` -}; -const ShapeFlags = { - "ELEMENT": 1, - "1": "ELEMENT", - "FUNCTIONAL_COMPONENT": 2, - "2": "FUNCTIONAL_COMPONENT", - "STATEFUL_COMPONENT": 4, - "4": "STATEFUL_COMPONENT", - "TEXT_CHILDREN": 8, - "8": "TEXT_CHILDREN", - "ARRAY_CHILDREN": 16, - "16": "ARRAY_CHILDREN", - "SLOTS_CHILDREN": 32, - "32": "SLOTS_CHILDREN", - "TELEPORT": 64, - "64": "TELEPORT", - "SUSPENSE": 128, - "128": "SUSPENSE", - "COMPONENT_SHOULD_KEEP_ALIVE": 256, - "256": "COMPONENT_SHOULD_KEEP_ALIVE", - "COMPONENT_KEPT_ALIVE": 512, - "512": "COMPONENT_KEPT_ALIVE", - "COMPONENT": 6, - "6": "COMPONENT" -}; -const SlotFlags = { - "STABLE": 1, - "1": "STABLE", - "DYNAMIC": 2, - "2": "DYNAMIC", - "FORWARDED": 3, - "3": "FORWARDED" -}; -const slotFlagsText = { - [1]: "STABLE", - [2]: "DYNAMIC", - [3]: "FORWARDED" -}; -const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; -const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); -const isGloballyWhitelisted = isGloballyAllowed; -const range = 2; -function generateCodeFrame$1(source, start2 = 0, end = source.length) { - start2 = Math.max(0, Math.min(start2, source.length)); - end = Math.max(0, Math.min(end, source.length)); - if (start2 > end) return ""; - let lines = source.split(/(\r?\n)/); - const newlineSequences = lines.filter((_2, idx) => idx % 2 === 1); - lines = lines.filter((_2, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i2 = 0; i2 < lines.length; i2++) { - count += lines[i2].length + (newlineSequences[i2] && newlineSequences[i2].length || 0); - if (count >= start2) { - for (let j2 = i2 - range; j2 <= i2 + range || end > count; j2++) { - if (j2 < 0 || j2 >= lines.length) continue; - const line = j2 + 1; - res.push( - `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j2]}` - ); - const lineLength = lines[j2].length; - const newLineSeqLength = newlineSequences[j2] && newlineSequences[j2].length || 0; - if (j2 === i2) { - const pad = start2 - (count - (lineLength + newLineSeqLength)); - const length = Math.max( - 1, - end > count ? lineLength - pad : end - start2 - ); - res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); - } else if (j2 > i2) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + "^".repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join("\n"); -} -__name(generateCodeFrame$1, "generateCodeFrame$1"); -function normalizeStyle(value4) { - if (isArray$9(value4)) { - const res = {}; - for (let i2 = 0; i2 < value4.length; i2++) { - const item3 = value4[i2]; - const normalized = isString$7(item3) ? parseStringStyle(item3) : normalizeStyle(item3); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString$7(value4) || isObject$d(value4)) { - return value4; - } -} -__name(normalizeStyle, "normalizeStyle"); -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:([^]+)/; -const styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item3) => { - if (item3) { - const tmp = item3.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -__name(parseStringStyle, "parseStringStyle"); -function stringifyStyle(styles) { - let ret = ""; - if (!styles || isString$7(styles)) { - return ret; - } - for (const key in styles) { - const value4 = styles[key]; - if (isString$7(value4) || typeof value4 === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate$1(key); - ret += `${normalizedKey}:${value4};`; - } - } - return ret; -} -__name(stringifyStyle, "stringifyStyle"); -function normalizeClass(value4) { - let res = ""; - if (isString$7(value4)) { - res = value4; - } else if (isArray$9(value4)) { - for (let i2 = 0; i2 < value4.length; i2++) { - const normalized = normalizeClass(value4[i2]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject$d(value4)) { - for (const name2 in value4) { - if (value4[name2]) { - res += name2 + " "; - } - } - } - return res.trim(); -} -__name(normalizeClass, "normalizeClass"); -function normalizeProps(props) { - if (!props) return null; - let { class: klass, style: style2 } = props; - if (klass && !isString$7(klass)) { - props.class = normalizeClass(klass); - } - if (style2) { - props.style = normalizeStyle(style2); - } - return props; -} -__name(normalizeProps, "normalizeProps"); -const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); -const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); -const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); -const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); -const isBooleanAttr = /* @__PURE__ */ makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -function includeBooleanAttr(value4) { - return !!value4 || value4 === ""; -} -__name(includeBooleanAttr, "includeBooleanAttr"); -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name2) { - if (attrValidationCache.hasOwnProperty(name2)) { - return attrValidationCache[name2]; - } - const isUnsafe = unsafeAttrCharRE.test(name2); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name2}`); - } - return attrValidationCache[name2] = !isUnsafe; -} -__name(isSSRSafeAttrName, "isSSRSafeAttrName"); -const propsToAttrMap = { - acceptCharset: "accept-charset", - className: "class", - htmlFor: "for", - httpEquiv: "http-equiv" -}; -const isKnownHtmlAttr = /* @__PURE__ */ makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` -); -const isKnownSvgAttr = /* @__PURE__ */ makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` -); -function isRenderableAttrValue(value4) { - if (value4 == null) { - return false; - } - const type = typeof value4; - return type === "string" || type === "number" || type === "boolean"; -} -__name(isRenderableAttrValue, "isRenderableAttrValue"); -const escapeRE$2 = /["'&<>]/; -function escapeHtml$2(string) { - const str = "" + string; - const match2 = escapeRE$2.exec(str); - if (!match2) { - return str; - } - let html = ""; - let escaped; - let index2; - let lastIndex2 = 0; - for (index2 = match2.index; index2 < str.length; index2++) { - switch (str.charCodeAt(index2)) { - case 34: - escaped = """; - break; - case 38: - escaped = "&"; - break; - case 39: - escaped = "'"; - break; - case 60: - escaped = "<"; - break; - case 62: - escaped = ">"; - break; - default: - continue; - } - if (lastIndex2 !== index2) { - html += str.slice(lastIndex2, index2); - } - lastIndex2 = index2 + 1; - html += escaped; - } - return lastIndex2 !== index2 ? html + str.slice(lastIndex2, index2) : html; -} -__name(escapeHtml$2, "escapeHtml$2"); -const commentStripRE = /^-?>||--!>| looseEqual(item3, val)); -} -__name(looseIndexOf, "looseIndexOf"); -const isRef$1 = /* @__PURE__ */ __name((val) => { - return !!(val && val.__v_isRef === true); -}, "isRef$1"); -const toDisplayString$1 = /* @__PURE__ */ __name((val) => { - return isString$7(val) ? val : val == null ? "" : isArray$9(val) || isObject$d(val) && (val.toString === objectToString$3 || !isFunction$8(val.toString)) ? isRef$1(val) ? toDisplayString$1(val.value) : JSON.stringify(val, replacer, 2) : String(val); -}, "toDisplayString$1"); -const replacer = /* @__PURE__ */ __name((_key, val) => { - if (isRef$1(val)) { - return replacer(_key, val.value); - } else if (isMap$3(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i2) => { - entries[stringifySymbol(key, i2) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet$3(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v2) => stringifySymbol(v2)) - }; - } else if (isSymbol$1(val)) { - return stringifySymbol(val); - } else if (isObject$d(val) && !isArray$9(val) && !isPlainObject$4(val)) { - return String(val); - } - return val; -}, "replacer"); -const stringifySymbol = /* @__PURE__ */ __name((v2, i2 = "") => { - var _a2; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol$1(v2) ? `Symbol(${(_a2 = v2.description) != null ? _a2 : i2})` : v2 - ); -}, "stringifySymbol"); -/** -* @vue/reactivity v3.4.31 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -function warn$4(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); -} -__name(warn$4, "warn$4"); -let activeEffectScope; -class EffectScope { - static { - __name(this, "EffectScope"); - } - constructor(detached = false) { - this.detached = detached; - this._active = true; - this.effects = []; - this.cleanups = []; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else if (false) { - warn$4(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - let i2, l2; - for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) { - this.effects[i2].stop(); - } - for (i2 = 0, l2 = this.cleanups.length; i2 < l2; i2++) { - this.cleanups[i2](); - } - if (this.scopes) { - for (i2 = 0, l2 = this.scopes.length; i2 < l2; i2++) { - this.scopes[i2].stop(true); - } - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - this._active = false; - } - } -} -function effectScope(detached) { - return new EffectScope(detached); -} -__name(effectScope, "effectScope"); -function recordEffectScope(effect2, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect2); - } -} -__name(recordEffectScope, "recordEffectScope"); -function getCurrentScope() { - return activeEffectScope; -} -__name(getCurrentScope, "getCurrentScope"); -function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (false) { - warn$4( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } -} -__name(onScopeDispose, "onScopeDispose"); -let activeEffect; -class ReactiveEffect { - static { - __name(this, "ReactiveEffect"); - } - constructor(fn, trigger2, scheduler, scope) { - this.fn = fn; - this.trigger = trigger2; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this._dirtyLevel = 4; - this._trackId = 0; - this._runnings = 0; - this._shouldSchedule = false; - this._depsLength = 0; - recordEffectScope(this, scope); - } - get dirty() { - if (this._dirtyLevel === 2 || this._dirtyLevel === 3) { - this._dirtyLevel = 1; - pauseTracking(); - for (let i2 = 0; i2 < this._depsLength; i2++) { - const dep = this.deps[i2]; - if (dep.computed) { - triggerComputed(dep.computed); - if (this._dirtyLevel >= 4) { - break; - } - } - } - if (this._dirtyLevel === 1) { - this._dirtyLevel = 0; - } - resetTracking(); - } - return this._dirtyLevel >= 4; - } - set dirty(v2) { - this._dirtyLevel = v2 ? 4 : 0; - } - run() { - this._dirtyLevel = 0; - if (!this.active) { - return this.fn(); - } - let lastShouldTrack = shouldTrack; - let lastEffect = activeEffect; - try { - shouldTrack = true; - activeEffect = this; - this._runnings++; - preCleanupEffect(this); - return this.fn(); - } finally { - postCleanupEffect(this); - this._runnings--; - activeEffect = lastEffect; - shouldTrack = lastShouldTrack; - } - } - stop() { - if (this.active) { - preCleanupEffect(this); - postCleanupEffect(this); - this.onStop && this.onStop(); - this.active = false; - } - } -} -function triggerComputed(computed2) { - return computed2.value; -} -__name(triggerComputed, "triggerComputed"); -function preCleanupEffect(effect2) { - effect2._trackId++; - effect2._depsLength = 0; -} -__name(preCleanupEffect, "preCleanupEffect"); -function postCleanupEffect(effect2) { - if (effect2.deps.length > effect2._depsLength) { - for (let i2 = effect2._depsLength; i2 < effect2.deps.length; i2++) { - cleanupDepEffect(effect2.deps[i2], effect2); - } - effect2.deps.length = effect2._depsLength; - } -} -__name(postCleanupEffect, "postCleanupEffect"); -function cleanupDepEffect(dep, effect2) { - const trackId = dep.get(effect2); - if (trackId !== void 0 && effect2._trackId !== trackId) { - dep.delete(effect2); - if (dep.size === 0) { - dep.cleanup(); - } - } -} -__name(cleanupDepEffect, "cleanupDepEffect"); -function effect(fn, options4) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const _effect = new ReactiveEffect(fn, NOOP, () => { - if (_effect.dirty) { - _effect.run(); - } - }); - if (options4) { - extend$1(_effect, options4); - if (options4.scope) recordEffectScope(_effect, options4.scope); - } - if (!options4 || !options4.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; -} -__name(effect, "effect"); -function stop(runner) { - runner.effect.stop(); -} -__name(stop, "stop"); -let shouldTrack = true; -let pauseScheduleStack = 0; -const trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -__name(pauseTracking, "pauseTracking"); -function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; -} -__name(enableTracking, "enableTracking"); -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -__name(resetTracking, "resetTracking"); -function pauseScheduling() { - pauseScheduleStack++; -} -__name(pauseScheduling, "pauseScheduling"); -function resetScheduling() { - pauseScheduleStack--; - while (!pauseScheduleStack && queueEffectSchedulers.length) { - queueEffectSchedulers.shift()(); - } -} -__name(resetScheduling, "resetScheduling"); -function trackEffect(effect2, dep, debuggerEventExtraInfo) { - var _a2; - if (dep.get(effect2) !== effect2._trackId) { - dep.set(effect2, effect2._trackId); - const oldDep = effect2.deps[effect2._depsLength]; - if (oldDep !== dep) { - if (oldDep) { - cleanupDepEffect(oldDep, effect2); - } - effect2.deps[effect2._depsLength++] = dep; - } else { - effect2._depsLength++; - } - if (false) { - (_a2 = effect2.onTrack) == null ? void 0 : _a2.call(effect2, extend$1({ effect: effect2 }, debuggerEventExtraInfo)); - } - } -} -__name(trackEffect, "trackEffect"); -const queueEffectSchedulers = []; -function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { - var _a2; - pauseScheduling(); - for (const effect2 of dep.keys()) { - let tracking; - if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { - effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0); - effect2._dirtyLevel = dirtyLevel; - } - if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { - if (false) { - (_a2 = effect2.onTrigger) == null ? void 0 : _a2.call(effect2, extend$1({ effect: effect2 }, debuggerEventExtraInfo)); - } - effect2.trigger(); - if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) { - effect2._shouldSchedule = false; - if (effect2.scheduler) { - queueEffectSchedulers.push(effect2.scheduler); - } - } - } - } - resetScheduling(); -} -__name(triggerEffects, "triggerEffects"); -const createDep = /* @__PURE__ */ __name((cleanup, computed2) => { - const dep = /* @__PURE__ */ new Map(); - dep.cleanup = cleanup; - dep.computed = computed2; - return dep; -}, "createDep"); -const targetMap = /* @__PURE__ */ new WeakMap(); -const ITERATE_KEY = Symbol(false ? "iterate" : ""); -const MAP_KEY_ITERATE_KEY = Symbol(false ? "Map key iterate" : ""); -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = createDep(() => depsMap.delete(key))); - } - trackEffect( - activeEffect, - dep, - false ? { - target, - type, - key - } : void 0 - ); - } -} -__name(track, "track"); -function trigger(target, type, key, newValue2, oldValue2, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - return; - } - let deps = []; - if (type === "clear") { - deps = [...depsMap.values()]; - } else if (key === "length" && isArray$9(target)) { - const newLength = Number(newValue2); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || !isSymbol$1(key2) && key2 >= newLength) { - deps.push(dep); - } - }); - } else { - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - switch (type) { - case "add": - if (!isArray$9(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap$3(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isIntegerKey(key)) { - deps.push(depsMap.get("length")); - } - break; - case "delete": - if (!isArray$9(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap$3(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap$3(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - pauseScheduling(); - for (const dep of deps) { - if (dep) { - triggerEffects( - dep, - 4, - false ? { - target, - type, - key, - newValue: newValue2, - oldValue: oldValue2, - oldTarget - } : void 0 - ); - } - } - resetScheduling(); -} -__name(trigger, "trigger"); -function getDepFromReactive(object, key) { - const depsMap = targetMap.get(object); - return depsMap && depsMap.get(key); -} -__name(getDepFromReactive, "getDepFromReactive"); -const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol$1) -); -const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); -function createArrayInstrumentations() { - const instrumentations = {}; - ["includes", "indexOf", "lastIndexOf"].forEach((key) => { - instrumentations[key] = function(...args) { - const arr = toRaw(this); - for (let i2 = 0, l2 = this.length; i2 < l2; i2++) { - track(arr, "get", i2 + ""); - } - const res = arr[key](...args); - if (res === -1 || res === false) { - return arr[key](...args.map(toRaw)); - } else { - return res; - } - }; - }); - ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { - instrumentations[key] = function(...args) { - pauseTracking(); - pauseScheduling(); - const res = toRaw(this)[key].apply(this, args); - resetScheduling(); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -__name(createArrayInstrumentations, "createArrayInstrumentations"); -function hasOwnProperty$c(key) { - if (!isSymbol$1(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -__name(hasOwnProperty$c, "hasOwnProperty$c"); -class BaseReactiveHandler { - static { - __name(this, "BaseReactiveHandler"); - } - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the reciever is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray$9(target); - if (!isReadonly2) { - if (targetIsArray && hasOwn$3(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - if (key === "hasOwnProperty") { - return hasOwnProperty$c; - } - } - const res = Reflect.get(target, key, receiver); - if (isSymbol$1(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject$d(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -} -class MutableReactiveHandler extends BaseReactiveHandler { - static { - __name(this, "MutableReactiveHandler"); - } - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value4, receiver) { - let oldValue2 = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue2); - if (!isShallow(value4) && !isReadonly(value4)) { - oldValue2 = toRaw(oldValue2); - value4 = toRaw(value4); - } - if (!isArray$9(target) && isRef(oldValue2) && !isRef(value4)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue2.value = value4; - return true; - } - } - } - const hadKey = isArray$9(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn$3(target, key); - const result = Reflect.set(target, key, value4, receiver); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value4); - } else if (hasChanged(value4, oldValue2)) { - trigger(target, "set", key, value4, oldValue2); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn$3(target, key); - const oldValue2 = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue2); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol$1(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray$9(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -} -class ReadonlyReactiveHandler extends BaseReactiveHandler { - static { - __name(this, "ReadonlyReactiveHandler"); - } - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - if (false) { - warn$4( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - if (false) { - warn$4( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } -} -const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); -const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); -const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( - true -); -const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); -const toShallow = /* @__PURE__ */ __name((value4) => value4, "toShallow"); -const getProto = /* @__PURE__ */ __name((v2) => Reflect.getPrototypeOf(v2), "getProto"); -function get$3(target, key, isReadonly2 = false, isShallow2 = false) { - target = target["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has: has2 } = getProto(rawTarget); - const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1; - if (has2.call(rawTarget, key)) { - return wrap2(target.get(key)); - } else if (has2.call(rawTarget, rawKey)) { - return wrap2(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } -} -__name(get$3, "get$3"); -function has$1(key, isReadonly2 = false) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); -} -__name(has$1, "has$1"); -function size(target, isReadonly2 = false) { - target = target["__v_raw"]; - !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); -} -__name(size, "size"); -function add$1(value4) { - value4 = toRaw(value4); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value4); - if (!hadKey) { - target.add(value4); - trigger(target, "add", value4, value4); - } - return this; -} -__name(add$1, "add$1"); -function set$4(key, value4) { - value4 = toRaw(value4); - const target = toRaw(this); - const { has: has2, get: get22 } = getProto(target); - let hadKey = has2.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); - } else if (false) { - checkIdentityKeys(target, has2, key); - } - const oldValue2 = get22.call(target, key); - target.set(key, value4); - if (!hadKey) { - trigger(target, "add", key, value4); - } else if (hasChanged(value4, oldValue2)) { - trigger(target, "set", key, value4, oldValue2); - } - return this; -} -__name(set$4, "set$4"); -function deleteEntry(key) { - const target = toRaw(this); - const { has: has2, get: get22 } = getProto(target); - let hadKey = has2.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); - } else if (false) { - checkIdentityKeys(target, has2, key); - } - const oldValue2 = get22 ? get22.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue2); - } - return result; -} -__name(deleteEntry, "deleteEntry"); -function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = false ? isMap$3(target) ? new Map(target) : new Set(target) : void 0; - const result = target.clear(); - if (hadItems) { - trigger(target, "clear", void 0, void 0, oldTarget); - } - return result; -} -__name(clear, "clear"); -function createForEach(isReadonly2, isShallow2) { - return /* @__PURE__ */ __name(function forEach3(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1; - !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value4, key) => { - return callback.call(thisArg, wrap2(value4), wrap2(key), observed); - }); - }, "forEach"); -} -__name(createForEach, "createForEach"); -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap$3(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap2 = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive$1; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value: value4, done } = innerIterator.next(); - return done ? { value: value4, done } : { - value: isPair ? [wrap2(value4[0]), wrap2(value4[1])] : wrap2(value4), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -__name(createIterableMethod, "createIterableMethod"); -function createReadonlyMethod(type) { - return function(...args) { - if (false) { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn$4( - `${capitalize$1(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -__name(createReadonlyMethod, "createReadonlyMethod"); -function createInstrumentations() { - const mutableInstrumentations2 = { - get(key) { - return get$3(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add: add$1, - set: set$4, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations2 = { - get(key) { - return get$3(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add: add$1, - set: set$4, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations2 = { - get(key) { - return get$3(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear"), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations2 = { - get(key) { - return get$3(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear"), - forEach: createForEach(true, true) - }; - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - mutableInstrumentations2[method] = createIterableMethod(method, false, false); - readonlyInstrumentations2[method] = createIterableMethod(method, true, false); - shallowInstrumentations2[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations2[method] = createIterableMethod( - method, - true, - true - ); - }); - return [ - mutableInstrumentations2, - readonlyInstrumentations2, - shallowInstrumentations2, - shallowReadonlyInstrumentations2 - ]; -} -__name(createInstrumentations, "createInstrumentations"); -const [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations -] = /* @__PURE__ */ createInstrumentations(); -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn$3(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -__name(createInstrumentationGetter, "createInstrumentationGetter"); -const mutableCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, false) -}; -const shallowCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(false, true) -}; -const readonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, false) -}; -const shallowReadonlyCollectionHandlers = { - get: /* @__PURE__ */ createInstrumentationGetter(true, true) -}; -function checkIdentityKeys(target, has2, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has2.call(target, rawKey)) { - const type = toRawType(target); - warn$4( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } -} -__name(checkIdentityKeys, "checkIdentityKeys"); -const reactiveMap = /* @__PURE__ */ new WeakMap(); -const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -const readonlyMap = /* @__PURE__ */ new WeakMap(); -const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2; - default: - return 0; - } -} -__name(targetTypeMap, "targetTypeMap"); -function getTargetType(value4) { - return value4["__v_skip"] || !Object.isExtensible(value4) ? 0 : targetTypeMap(toRawType(value4)); -} -__name(getTargetType, "getTargetType"); -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -__name(reactive, "reactive"); -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -__name(shallowReactive, "shallowReactive"); -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -__name(readonly, "readonly"); -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -__name(shallowReadonly, "shallowReadonly"); -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject$d(target)) { - if (false) { - warn$4( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -__name(createReactiveObject, "createReactiveObject"); -function isReactive(value4) { - if (isReadonly(value4)) { - return isReactive(value4["__v_raw"]); - } - return !!(value4 && value4["__v_isReactive"]); -} -__name(isReactive, "isReactive"); -function isReadonly(value4) { - return !!(value4 && value4["__v_isReadonly"]); -} -__name(isReadonly, "isReadonly"); -function isShallow(value4) { - return !!(value4 && value4["__v_isShallow"]); -} -__name(isShallow, "isShallow"); -function isProxy(value4) { - return value4 ? !!value4["__v_raw"] : false; -} -__name(isProxy, "isProxy"); -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -__name(toRaw, "toRaw"); -function markRaw(value4) { - if (Object.isExtensible(value4)) { - def(value4, "__v_skip", true); - } - return value4; -} -__name(markRaw, "markRaw"); -const toReactive$1 = /* @__PURE__ */ __name((value4) => isObject$d(value4) ? reactive(value4) : value4, "toReactive$1"); -const toReadonly = /* @__PURE__ */ __name((value4) => isObject$d(value4) ? readonly(value4) : value4, "toReadonly"); -const COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`; -class ComputedRefImpl { - static { - __name(this, "ComputedRefImpl"); - } - constructor(getter, _setter, isReadonly2, isSSR) { - this.getter = getter; - this._setter = _setter; - this.dep = void 0; - this.__v_isRef = true; - this["__v_isReadonly"] = false; - this.effect = new ReactiveEffect( - () => getter(this._value), - () => triggerRefValue( - this, - this.effect._dirtyLevel === 2 ? 2 : 3 - ) - ); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly"] = isReadonly2; - } - get value() { - const self2 = toRaw(this); - if ((!self2._cacheable || self2.effect.dirty) && hasChanged(self2._value, self2._value = self2.effect.run())) { - triggerRefValue(self2, 4); - } - trackRefValue(self2); - if (self2.effect._dirtyLevel >= 2) { - if (false) { - warn$4(COMPUTED_SIDE_EFFECT_WARN, ` - -getter: `, this.getter); - } - triggerRefValue(self2, 2); - } - return self2._value; - } - set value(newValue2) { - this._setter(newValue2); - } - // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x - get _dirty() { - return this.effect.dirty; - } - set _dirty(v2) { - this.effect.dirty = v2; - } - // #endregion -} -function computed$1(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction$8(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = false ? () => { - warn$4("Write operation failed: computed value is readonly"); - } : NOOP; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (false) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; -} -__name(computed$1, "computed$1"); -function trackRefValue(ref2) { - var _a2; - if (shouldTrack && activeEffect) { - ref2 = toRaw(ref2); - trackEffect( - activeEffect, - (_a2 = ref2.dep) != null ? _a2 : ref2.dep = createDep( - () => ref2.dep = void 0, - ref2 instanceof ComputedRefImpl ? ref2 : void 0 - ), - false ? { - target: ref2, - type: "get", - key: "value" - } : void 0 - ); - } -} -__name(trackRefValue, "trackRefValue"); -function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) { - ref2 = toRaw(ref2); - const dep = ref2.dep; - if (dep) { - triggerEffects( - dep, - dirtyLevel, - false ? { - target: ref2, - type: "set", - key: "value", - newValue: newVal, - oldValue: oldVal - } : void 0 - ); - } -} -__name(triggerRefValue, "triggerRefValue"); -function isRef(r2) { - return !!(r2 && r2.__v_isRef === true); -} -__name(isRef, "isRef"); -function ref(value4) { - return createRef(value4, false); -} -__name(ref, "ref"); -function shallowRef(value4) { - return createRef(value4, true); -} -__name(shallowRef, "shallowRef"); -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -__name(createRef, "createRef"); -class RefImpl { - static { - __name(this, "RefImpl"); - } - constructor(value4, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = void 0; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value4 : toRaw(value4); - this._value = __v_isShallow ? value4 : toReactive$1(value4); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); - newVal = useDirectValue ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - const oldVal = this._rawValue; - this._rawValue = newVal; - this._value = useDirectValue ? newVal : toReactive$1(newVal); - triggerRefValue(this, 4, newVal, oldVal); - } - } -} -function triggerRef(ref2) { - triggerRefValue(ref2, 4, false ? ref2.value : void 0); -} -__name(triggerRef, "triggerRef"); -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -__name(unref, "unref"); -function toValue$1(source) { - return isFunction$8(source) ? source() : unref(source); -} -__name(toValue$1, "toValue$1"); -const shallowUnwrapHandlers = { - get: /* @__PURE__ */ __name((target, key, receiver) => unref(Reflect.get(target, key, receiver)), "get"), - set: /* @__PURE__ */ __name((target, key, value4, receiver) => { - const oldValue2 = target[key]; - if (isRef(oldValue2) && !isRef(value4)) { - oldValue2.value = value4; - return true; - } else { - return Reflect.set(target, key, value4, receiver); - } - }, "set") -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -__name(proxyRefs, "proxyRefs"); -class CustomRefImpl { - static { - __name(this, "CustomRefImpl"); - } - constructor(factory) { - this.dep = void 0; - this.__v_isRef = true; - const { get: get22, set: set22 } = factory( - () => trackRefValue(this), - () => triggerRefValue(this) - ); - this._get = get22; - this._set = set22; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -__name(customRef, "customRef"); -function toRefs$1(object) { - if (false) { - warn$4(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray$9(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -__name(toRefs$1, "toRefs$1"); -class ObjectRefImpl { - static { - __name(this, "ObjectRefImpl"); - } - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -} -class GetterRefImpl { - static { - __name(this, "GetterRefImpl"); - } - constructor(_getter) { - this._getter = _getter; - this.__v_isRef = true; - this.__v_isReadonly = true; - } - get value() { - return this._getter(); - } -} -function toRef$1(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction$8(source)) { - return new GetterRefImpl(source); - } else if (isObject$d(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -__name(toRef$1, "toRef$1"); -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} -__name(propertyToRef, "propertyToRef"); -const deferredComputed = computed$1; -const TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" -}; -const TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" -}; -const ReactiveFlags = { - "SKIP": "__v_skip", - "IS_REACTIVE": "__v_isReactive", - "IS_READONLY": "__v_isReadonly", - "IS_SHALLOW": "__v_isShallow", - "RAW": "__v_raw" -}; -/** -* @vue/runtime-core v3.4.31 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -const stack = []; -function pushWarningContext(vnode) { - stack.push(vnode); -} -__name(pushWarningContext, "pushWarningContext"); -function popWarningContext() { - stack.pop(); -} -__name(popWarningContext, "popWarningContext"); -function warn$1$1(msg, ...args) { - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a2) => { - var _a2, _b; - return (_b = (_a2 = a2.toString) == null ? void 0 : _a2.call(a2)) != null ? _b : JSON.stringify(a2); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); -} -__name(warn$1$1, "warn$1$1"); -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -__name(getComponentTrace, "getComponentTrace"); -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i2) => { - logs.push(...i2 === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -__name(formatTrace, "formatTrace"); -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open2 = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close5 = `>` + postfix; - return vnode.props ? [open2, ...formatProps(vnode.props), close5] : [open2 + close5]; -} -__name(formatTraceEntry, "formatTraceEntry"); -function formatProps(props) { - const res = []; - const keys2 = Object.keys(props); - keys2.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys2.length > 3) { - res.push(` ...`); - } - return res; -} -__name(formatProps, "formatProps"); -function formatProp(key, value4, raw) { - if (isString$7(value4)) { - value4 = JSON.stringify(value4); - return raw ? value4 : [`${key}=${value4}`]; - } else if (typeof value4 === "number" || typeof value4 === "boolean" || value4 == null) { - return raw ? value4 : [`${key}=${value4}`]; - } else if (isRef(value4)) { - value4 = formatProp(key, toRaw(value4.value), true); - return raw ? value4 : [`${key}=Ref<`, value4, `>`]; - } else if (isFunction$8(value4)) { - return [`${key}=fn${value4.name ? `<${value4.name}>` : ``}`]; - } else { - value4 = toRaw(value4); - return raw ? value4 : [`${key}=`, value4]; - } -} -__name(formatProp, "formatProp"); -function assertNumber(val, type) { - if (true) return; - if (val === void 0) { - return; - } else if (typeof val !== "number") { - warn$1$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); - } else if (isNaN(val)) { - warn$1$1(`${type} is NaN - the duration expression might be incorrect.`); - } -} -__name(assertNumber, "assertNumber"); -const ErrorCodes = { - "SETUP_FUNCTION": 0, - "0": "SETUP_FUNCTION", - "RENDER_FUNCTION": 1, - "1": "RENDER_FUNCTION", - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP", - "NATIVE_EVENT_HANDLER": 5, - "5": "NATIVE_EVENT_HANDLER", - "COMPONENT_EVENT_HANDLER": 6, - "6": "COMPONENT_EVENT_HANDLER", - "VNODE_HOOK": 7, - "7": "VNODE_HOOK", - "DIRECTIVE_HOOK": 8, - "8": "DIRECTIVE_HOOK", - "TRANSITION_HOOK": 9, - "9": "TRANSITION_HOOK", - "APP_ERROR_HANDLER": 10, - "10": "APP_ERROR_HANDLER", - "APP_WARN_HANDLER": 11, - "11": "APP_WARN_HANDLER", - "FUNCTION_REF": 12, - "12": "FUNCTION_REF", - "ASYNC_COMPONENT_LOADER": 13, - "13": "ASYNC_COMPONENT_LOADER", - "SCHEDULER": 14, - "14": "SCHEDULER" -}; -const ErrorTypeStrings$1 = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -__name(callWithErrorHandling, "callWithErrorHandling"); -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction$8(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise$1(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (isArray$9(fn)) { - const values = []; - for (let i2 = 0; i2 < fn.length; i2++) { - values.push(callWithAsyncErrorHandling(fn[i2], instance, type, args)); - } - return values; - } else if (false) { - warn$1$1( - `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` - ); - } -} -__name(callWithAsyncErrorHandling, "callWithAsyncErrorHandling"); -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = false ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i2 = 0; i2 < errorCapturedHooks.length; i2++) { - if (errorCapturedHooks[i2](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - pauseTracking(); - callWithErrorHandling( - appErrorHandler, - null, - 10, - [err, exposedInstance, errorInfo] - ); - resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev); -} -__name(handleError, "handleError"); -function logError(err, type, contextVNode, throwInDev = true) { - if (false) { - const info = ErrorTypeStrings$1[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } else { - console.error(err); - } -} -__name(logError, "logError"); -let isFlushing = false; -let isFlushPending = false; -const queue = []; -let flushIndex = 0; -const pendingPostFlushCbs = []; -let activePostFlushCbs = null; -let postFlushIndex = 0; -const resolvedPromise = /* @__PURE__ */ Promise.resolve(); -let currentFlushPromise = null; -const RECURSION_LIMIT = 100; -function nextTick(fn) { - const p2 = currentFlushPromise || resolvedPromise; - return fn ? p2.then(this ? fn.bind(this) : fn) : p2; -} -__name(nextTick, "nextTick"); -function findInsertionIndex$1(id3) { - let start2 = flushIndex + 1; - let end = queue.length; - while (start2 < end) { - const middle = start2 + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id3 || middleJobId === id3 && middleJob.pre) { - start2 = middle + 1; - } else { - end = middle; - } - } - return start2; -} -__name(findInsertionIndex$1, "findInsertionIndex$1"); -function queueJob(job) { - if (!queue.length || !queue.includes( - job, - isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex - )) { - if (job.id == null) { - queue.push(job); - } else { - queue.splice(findInsertionIndex$1(job.id), 0, job); - } - queueFlush(); - } -} -__name(queueJob, "queueJob"); -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -__name(queueFlush, "queueFlush"); -function invalidateJob(job) { - const i2 = queue.indexOf(job); - if (i2 > flushIndex) { - queue.splice(i2, 1); - } -} -__name(invalidateJob, "invalidateJob"); -function queuePostFlushCb(cb) { - if (!isArray$9(cb)) { - if (!activePostFlushCbs || !activePostFlushCbs.includes( - cb, - cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex - )) { - pendingPostFlushCbs.push(cb); - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -__name(queuePostFlushCb, "queuePostFlushCb"); -function flushPreFlushCbs(instance, seen2, i2 = isFlushing ? flushIndex + 1 : 0) { - if (false) { - seen2 = seen2 || /* @__PURE__ */ new Map(); - } - for (; i2 < queue.length; i2++) { - const cb = queue[i2]; - if (cb && cb.pre) { - if (instance && cb.id !== instance.uid) { - continue; - } - if (false) { - continue; - } - queue.splice(i2, 1); - i2--; - cb(); - } - } -} -__name(flushPreFlushCbs, "flushPreFlushCbs"); -function flushPostFlushCbs(seen2) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a2, b2) => getId(a2) - getId(b2) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - if (false) { - seen2 = seen2 || /* @__PURE__ */ new Map(); - } - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (false) { - continue; - } - if (cb.active !== false) cb(); - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -__name(flushPostFlushCbs, "flushPostFlushCbs"); -const getId = /* @__PURE__ */ __name((job) => job.id == null ? Infinity : job.id, "getId"); -const comparator = /* @__PURE__ */ __name((a2, b2) => { - const diff2 = getId(a2) - getId(b2); - if (diff2 === 0) { - if (a2.pre && !b2.pre) return -1; - if (b2.pre && !a2.pre) return 1; - } - return diff2; -}, "comparator"); -function flushJobs(seen2) { - isFlushPending = false; - isFlushing = true; - if (false) { - seen2 = seen2 || /* @__PURE__ */ new Map(); - } - queue.sort(comparator); - const check = false ? (job) => checkRecursiveUpdates(seen2, job) : NOOP; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (false) { - continue; - } - callWithErrorHandling(job, null, 14); - } - } - } finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen2); - isFlushing = false; - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(seen2); - } - } -} -__name(flushJobs, "flushJobs"); -function checkRecursiveUpdates(seen2, fn) { - if (!seen2.has(fn)) { - seen2.set(fn, 1); - } else { - const count = seen2.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } else { - seen2.set(fn, count + 1); - } - } -} -__name(checkRecursiveUpdates, "checkRecursiveUpdates"); -let isHmrUpdating = false; -const hmrDirtyComponents = /* @__PURE__ */ new Set(); -if (false) { - getGlobalThis$1().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; -} -const map$1 = /* @__PURE__ */ new Map(); -function registerHMR(instance) { - const id3 = instance.type.__hmrId; - let record2 = map$1.get(id3); - if (!record2) { - createRecord(id3, instance.type); - record2 = map$1.get(id3); - } - record2.instances.add(instance); -} -__name(registerHMR, "registerHMR"); -function unregisterHMR(instance) { - map$1.get(instance.type.__hmrId).instances.delete(instance); -} -__name(unregisterHMR, "unregisterHMR"); -function createRecord(id3, initialDef) { - if (map$1.has(id3)) { - return false; - } - map$1.set(id3, { - initialDef: normalizeClassComponent(initialDef), - instances: /* @__PURE__ */ new Set() - }); - return true; -} -__name(createRecord, "createRecord"); -function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; -} -__name(normalizeClassComponent, "normalizeClassComponent"); -function rerender(id3, newRender) { - const record2 = map$1.get(id3); - if (!record2) { - return; - } - record2.initialDef.render = newRender; - [...record2.instances].forEach((instance) => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - isHmrUpdating = true; - instance.effect.dirty = true; - instance.update(); - isHmrUpdating = false; - }); -} -__name(rerender, "rerender"); -function reload(id3, newComp) { - const record2 = map$1.get(id3); - if (!record2) return; - newComp = normalizeClassComponent(newComp); - updateComponentDef(record2.initialDef, newComp); - const instances = [...record2.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - if (oldComp !== record2.initialDef) { - updateComponentDef(oldComp, newComp); - } - hmrDirtyComponents.add(oldComp); - } - instance.appContext.propsCache.delete(instance.type); - instance.appContext.emitsCache.delete(instance.type); - instance.appContext.optionsCache.delete(instance.type); - if (instance.ceReload) { - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } else if (instance.parent) { - instance.parent.effect.dirty = true; - queueJob(() => { - instance.parent.update(); - hmrDirtyComponents.delete(oldComp); - }); - } else if (instance.appContext.reload) { - instance.appContext.reload(); - } else if (typeof window !== "undefined") { - window.location.reload(); - } else { - console.warn( - "[HMR] Root or manually mounted instance modified. Full reload required." - ); - } - } - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete( - normalizeClassComponent(instance.type) - ); - } - }); -} -__name(reload, "reload"); -function updateComponentDef(oldComp, newComp) { - extend$1(oldComp, newComp); - for (const key in oldComp) { - if (key !== "__file" && !(key in newComp)) { - delete oldComp[key]; - } - } -} -__name(updateComponentDef, "updateComponentDef"); -function tryWrap(fn) { - return (id3, arg) => { - try { - return fn(id3, arg); - } catch (e2) { - console.error(e2); - console.warn( - `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` - ); - } - }; -} -__name(tryWrap, "tryWrap"); -let devtools$1; -let buffer = []; -let devtoolsNotInstalled = false; -function emit$1(event, ...args) { - if (devtools$1) { - devtools$1.emit(event, ...args); - } else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } -} -__name(emit$1, "emit$1"); -function setDevtoolsHook$1(hook, target) { - var _a2, _b; - devtools$1 = hook; - if (devtools$1) { - devtools$1.enabled = true; - buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a2 = window.navigator) == null ? void 0 : _a2.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook$1(newHook, target); - }); - setTimeout(() => { - if (!devtools$1) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3e3); - } else { - devtoolsNotInstalled = true; - buffer = []; - } -} -__name(setDevtoolsHook$1, "setDevtoolsHook$1"); -function devtoolsInitApp(app2, version2) { - emit$1("app:init", app2, version2, { - Fragment: Fragment$1, - Text: Text$4, - Comment, - Static - }); -} -__name(devtoolsInitApp, "devtoolsInitApp"); -function devtoolsUnmountApp(app2) { - emit$1("app:unmount", app2); -} -__name(devtoolsUnmountApp, "devtoolsUnmountApp"); -const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( - "component:added" - /* COMPONENT_ADDED */ -); -const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook( - "component:updated" - /* COMPONENT_UPDATED */ -); -const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( - "component:removed" - /* COMPONENT_REMOVED */ -); -const devtoolsComponentRemoved = /* @__PURE__ */ __name((component) => { - if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools$1.cleanupBuffer(component)) { - _devtoolsComponentRemoved(component); - } -}, "devtoolsComponentRemoved"); -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function createDevtoolsComponentHook(hook) { - return (component) => { - emit$1( - hook, - component.appContext.app, - component.uid, - component.parent ? component.parent.uid : void 0, - component - ); - }; -} -__name(createDevtoolsComponentHook, "createDevtoolsComponentHook"); -const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( - "perf:start" - /* PERFORMANCE_START */ -); -const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( - "perf:end" - /* PERFORMANCE_END */ -); -function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit$1(hook, component.appContext.app, component.uid, component, type, time); - }; -} -__name(createDevtoolsPerformanceHook, "createDevtoolsPerformanceHook"); -function devtoolsComponentEmit(component, event, params) { - emit$1( - "component:emit", - component.appContext.app, - component, - event, - params - ); -} -__name(devtoolsComponentEmit, "devtoolsComponentEmit"); -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || EMPTY_OBJ; - if (false) { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` - ); - } - } else { - const validator3 = emitsOptions[event]; - if (isFunction$8(validator3)) { - const isValid2 = validator3(...rawArgs); - if (!isValid2) { - warn$1$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener2 = event.startsWith("update:"); - const modelArg = isModelListener2 && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; - const { number: number2, trim: trim2 } = props[modifiersKey] || EMPTY_OBJ; - if (trim2) { - args = rawArgs.map((a2) => isString$7(a2) ? a2.trim() : a2); - } - if (number2) { - args = rawArgs.map(looseToNumber); - } - } - if (false) { - devtoolsComponentEmit(instance, event, args); - } - if (false) { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate$1( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler6 = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize$1(event))]; - if (!handler6 && isModelListener2) { - handler6 = props[handlerName = toHandlerKey(hyphenate$1(event))]; - } - if (handler6) { - callWithAsyncErrorHandling( - handler6, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -__name(emit, "emit"); -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache2 = appContext.emitsCache; - const cached = cache2.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!isFunction$8(comp)) { - const extendEmits = /* @__PURE__ */ __name((raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend$1(normalized, normalizedFromExtend); - } - }, "extendEmits"); - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject$d(comp)) { - cache2.set(comp, null); - } - return null; - } - if (isArray$9(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend$1(normalized, raw); - } - if (isObject$d(comp)) { - cache2.set(comp, normalized); - } - return normalized; -} -__name(normalizeEmitsOptions, "normalizeEmitsOptions"); -function isEmitListener(options4, key) { - if (!options4 || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn$3(options4, key[0].toLowerCase() + key.slice(1)) || hasOwn$3(options4, hyphenate$1(key)) || hasOwn$3(options4, key); -} -__name(isEmitListener, "isEmitListener"); -let currentRenderingInstance = null; -let currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev2 = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev2; -} -__name(setCurrentRenderingInstance, "setCurrentRenderingInstance"); -function pushScopeId(id3) { - currentScopeId = id3; -} -__name(pushScopeId, "pushScopeId"); -function popScopeId() { - currentScopeId = null; -} -__name(popScopeId, "popScopeId"); -const withScopeId = /* @__PURE__ */ __name((_id2) => withCtx, "withScopeId"); -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = /* @__PURE__ */ __name((...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - if (false) { - devtoolsComponentUpdated(ctx); - } - return res; - }, "renderFnWithContext"); - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} -__name(withCtx, "withCtx"); -let accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -__name(markAttrsAccessed, "markAttrsAccessed"); -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs: attrs4, - emit: emit2, - render: render2, - renderCache, - props, - data: data25, - setupState, - ctx, - inheritAttrs - } = instance; - const prev2 = setCurrentRenderingInstance(instance); - let result; - let fallthroughAttrs; - if (false) { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = false ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render2.call( - thisProxy, - proxyToUse, - renderCache, - false ? shallowReadonly(props) : props, - setupState, - data25, - ctx - ) - ); - fallthroughAttrs = attrs4; - } else { - const render22 = Component; - if (false) { - markAttrsAccessed(); - } - result = normalizeVNode( - render22.length > 1 ? render22( - false ? shallowReadonly(props) : props, - false ? { - get attrs() { - markAttrsAccessed(); - return shallowReadonly(attrs4); - }, - slots, - emit: emit2 - } : { attrs: attrs4, slots, emit: emit2 } - ) : render22( - false ? shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs4 : getFunctionalFallthrough(attrs4); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root27 = result; - let setRoot = void 0; - if (false) { - [root27, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys2 = Object.keys(fallthroughAttrs); - const { shapeFlag } = root27; - if (keys2.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys2.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root27 = cloneVNode(root27, fallthroughAttrs, false, true); - } else if (false) { - const allAttrs = Object.keys(attrs4); - const eventAttrs = []; - const extraAttrs = []; - for (let i2 = 0, l2 = allAttrs.length; i2 < l2; i2++) { - const key = allAttrs[i2]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` - ); - } - if (eventAttrs.length) { - warn$1$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (false) { - warn$1$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root27 = cloneVNode(root27, null, false, true); - root27.dirs = root27.dirs ? root27.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (false) { - warn$1$1( - `Component inside renders non-element root node that cannot be animated.` - ); - } - root27.transition = vnode.transition; - } - if (false) { - setRoot(root27); - } else { - result = root27; - } - setCurrentRenderingInstance(prev2); - return result; -} -__name(renderComponentRoot, "renderComponentRoot"); -const getChildRoot = /* @__PURE__ */ __name((vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (false) { - return getChildRoot(childRoot); - } - const index2 = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = /* @__PURE__ */ __name((updatedRoot) => { - rawChildren[index2] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }, "setRoot"); - return [normalizeVNode(childRoot), setRoot]; -}, "getChildRoot"); -function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i2 = 0; i2 < children.length; i2++) { - const child = children[i2]; - if (isVNode$1(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (false) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; -} -__name(filterSingleRoot, "filterSingleRoot"); -const getFunctionalFallthrough = /* @__PURE__ */ __name((attrs4) => { - let res; - for (const key in attrs4) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs4[key]; - } - } - return res; -}, "getFunctionalFallthrough"); -const filterModelListeners = /* @__PURE__ */ __name((attrs4, props) => { - const res = {}; - for (const key in attrs4) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs4[key]; - } - } - return res; -}, "filterModelListeners"); -const isElementRoot = /* @__PURE__ */ __name((vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; -}, "isElementRoot"); -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if (false) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i2 = 0; i2 < dynamicProps.length; i2++) { - const key = dynamicProps[i2]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -__name(shouldUpdateComponent, "shouldUpdateComponent"); -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i2 = 0; i2 < nextKeys.length; i2++) { - const key = nextKeys[i2]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -__name(hasPropsChanged, "hasPropsChanged"); -function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root27 = parent.subTree; - if (root27.suspense && root27.suspense.activeBranch === vnode) { - root27.el = vnode.el; - } - if (root27 === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } -} -__name(updateHOCHostEl, "updateHOCHostEl"); -const COMPONENTS = "components"; -const DIRECTIVES = "directives"; -function resolveComponent(name2, maybeSelfReference) { - return resolveAsset(COMPONENTS, name2, true, maybeSelfReference) || name2; -} -__name(resolveComponent, "resolveComponent"); -const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (isString$7(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -__name(resolveDynamicComponent, "resolveDynamicComponent"); -function resolveDirective(name2) { - return resolveAsset(DIRECTIVES, name2); -} -__name(resolveDirective, "resolveDirective"); -function resolveAsset(type, name2, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name2 || selfName === camelize$1(name2) || selfName === capitalize$1(camelize$1(name2)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name2) || // global registration - resolve(instance.appContext[type], name2) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (false) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn$1$1(`Failed to resolve ${type.slice(0, -1)}: ${name2}${extra}`); - } - return res; - } else if (false) { - warn$1$1( - `resolve${capitalize$1(type.slice(0, -1))} can only be used in render() or setup().` - ); - } -} -__name(resolveAsset, "resolveAsset"); -function resolve(registry, name2) { - return registry && (registry[name2] || registry[camelize$1(name2)] || registry[capitalize$1(camelize$1(name2))]); -} -__name(resolve, "resolve"); -const isSuspense = /* @__PURE__ */ __name((type) => type.__isSuspense, "isSuspense"); -let suspenseId = 0; -const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - normalize: normalizeSuspenseChildren -}; -const Suspense = SuspenseImpl; -function triggerEvent(vnode, name2) { - const eventListener = vnode.props && vnode.props[name2]; - if (isFunction$8(eventListener)) { - eventListener(); - } -} -__name(triggerEvent, "triggerEvent"); -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch2, - o: { createElement: createElement2 } - } = rendererInternals; - const hiddenContainer = createElement2("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch2( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch2( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -__name(mountSuspense, "mountSuspense"); -function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch2, um: unmount, o: { createElement: createElement2 } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch2( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch2( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement2("div"); - if (isInFallback) { - patch2( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch2( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch2( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch2( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch2( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch2( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -__name(patchSuspense, "patchSuspense"); -let hasWarned$1 = false; -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (false) { - hasWarned$1 = true; - console[console.info ? "info" : "log"]( - ` is an experimental feature and its API will likely change.` - ); - } - const { - p: patch2, - m: move, - um: unmount, - n: next2, - o: { parentNode: parentNode2, remove: remove22 } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; - if (false) { - assertNumber(timeout, `Suspense timeout`); - } - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - if (false) { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next2(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode2(activeBranch.el) !== suspense.hiddenContainer) { - anchor = next2(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next2(activeBranch); - const mountFallback = /* @__PURE__ */ __name(() => { - if (!suspense.isInFallback) { - return; - } - patch2( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }, "mountFallback"); - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next2(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect, optimized2) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - if (false) { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode2(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next2(instance.subTree), - suspense, - namespace, - optimized2 - ); - if (placeholder) { - remove22(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - if (false) { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -__name(createSuspenseBoundary, "createSuspenseBoundary"); -function hydrateSuspense(node3, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node3.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node3, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -__name(hydrateSuspense, "hydrateSuspense"); -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -__name(normalizeSuspenseChildren, "normalizeSuspenseChildren"); -function normalizeSuspenseSlot(s2) { - let block3; - if (isFunction$8(s2)) { - const trackBlock = isBlockTreeEnabled && s2._c; - if (trackBlock) { - s2._d = false; - openBlock(); - } - s2 = s2(); - if (trackBlock) { - s2._d = true; - block3 = currentBlock; - closeBlock(); - } - } - if (isArray$9(s2)) { - const singleChild = filterSingleRoot(s2); - if (false) { - warn$1$1(` slots expect a single root node.`); - } - s2 = singleChild; - } - s2 = normalizeVNode(s2); - if (block3 && !s2.dynamicChildren) { - s2.dynamicChildren = block3.filter((c2) => c2 !== s2); - } - return s2; -} -__name(normalizeSuspenseSlot, "normalizeSuspenseSlot"); -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray$9(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} -__name(queueEffectWithSuspense, "queueEffectWithSuspense"); -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } -} -__name(setActiveBranch, "setActiveBranch"); -function isVNodeSuspensible(vnode) { - const suspensible = vnode.props && vnode.props.suspensible; - return suspensible != null && suspensible !== false; -} -__name(isVNodeSuspensible, "isVNodeSuspensible"); -function injectHook(type, hook, target = currentInstance, prepend2 = false) { - if (target) { - const hooks2 = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - pauseTracking(); - const reset2 = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset2(); - resetTracking(); - return res; - }); - if (prepend2) { - hooks2.unshift(wrappedHook); - } else { - hooks2.push(wrappedHook); - } - return wrappedHook; - } else if (false) { - const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); - warn$1$1( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` - ); - } -} -__name(injectHook, "injectHook"); -const createHook = /* @__PURE__ */ __name((lifecycle2) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle2 === "sp") { - injectHook(lifecycle2, (...args) => hook(...args), target); - } -}, "createHook"); -const onBeforeMount = createHook("bm"); -const onMounted = createHook("m"); -const onBeforeUpdate = createHook("bu"); -const onUpdated = createHook("u"); -const onBeforeUnmount = createHook("bum"); -const onUnmounted = createHook("um"); -const onServerPrefetch = createHook("sp"); -const onRenderTriggered = createHook( - "rtg" -); -const onRenderTracked = createHook( - "rtc" -); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} -__name(onErrorCaptured, "onErrorCaptured"); -function validateDirectiveName(name2) { - if (isBuiltInDirective(name2)) { - warn$1$1("Do not use built-in directive ids as custom directive id: " + name2); - } -} -__name(validateDirectiveName, "validateDirectiveName"); -function withDirectives(vnode, directives) { - if (currentRenderingInstance === null) { - return vnode; - } - const instance = getComponentPublicInstance(currentRenderingInstance); - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i2 = 0; i2 < directives.length; i2++) { - let [dir, value4, arg, modifiers2 = EMPTY_OBJ] = directives[i2]; - if (dir) { - if (isFunction$8(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value4); - } - bindings.push({ - dir, - instance, - value: value4, - oldValue: void 0, - arg, - modifiers: modifiers2 - }); - } - } - return vnode; -} -__name(withDirectives, "withDirectives"); -function invokeDirectiveHook(vnode, prevVNode, instance, name2) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i2 = 0; i2 < bindings.length; i2++) { - const binding = bindings[i2]; - if (oldBindings) { - binding.oldValue = oldBindings[i2].value; - } - let hook = binding.dir[name2]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} -__name(invokeDirectiveHook, "invokeDirectiveHook"); -function renderList(source, renderItem, cache2, index2) { - let ret; - const cached = cache2 && cache2[index2]; - if (isArray$9(source) || isString$7(source)) { - ret = new Array(source.length); - for (let i2 = 0, l2 = source.length; i2 < l2; i2++) { - ret[i2] = renderItem(source[i2], i2, void 0, cached && cached[i2]); - } - } else if (typeof source === "number") { - if (false) { - warn$1$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i2 = 0; i2 < source; i2++) { - ret[i2] = renderItem(i2 + 1, i2, void 0, cached && cached[i2]); - } - } else if (isObject$d(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item3, i2) => renderItem(item3, i2, void 0, cached && cached[i2]) - ); - } else { - const keys2 = Object.keys(source); - ret = new Array(keys2.length); - for (let i2 = 0, l2 = keys2.length; i2 < l2; i2++) { - const key = keys2[i2]; - ret[i2] = renderItem(source[key], key, i2, cached && cached[i2]); - } - } - } else { - ret = []; - } - if (cache2) { - cache2[index2] = ret; - } - return ret; -} -__name(renderList, "renderList"); -function createSlots(slots, dynamicSlots) { - for (let i2 = 0; i2 < dynamicSlots.length; i2++) { - const slot = dynamicSlots[i2]; - if (isArray$9(slot)) { - for (let j2 = 0; j2 < slot.length; j2++) { - slots[slot[j2].name] = slot[j2].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} -__name(createSlots, "createSlots"); -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineComponent(options4, extraOptions) { - return isFunction$8(options4) ? ( - // #8326: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - /* @__PURE__ */ (() => extend$1({ name: options4.name }, extraOptions, { setup: options4 }))() - ) : options4; -} -__name(defineComponent, "defineComponent"); -const isAsyncWrapper = /* @__PURE__ */ __name((i2) => !!i2.type.__asyncLoader, "isAsyncWrapper"); -/*! #__NO_SIDE_EFFECTS__ */ -// @__NO_SIDE_EFFECTS__ -function defineAsyncComponent(source) { - if (isFunction$8(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = /* @__PURE__ */ __name(() => { - retries++; - pendingRequest = null; - return load2(); - }, "retry"); - const load2 = /* @__PURE__ */ __name(() => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve2, reject3) => { - const userRetry = /* @__PURE__ */ __name(() => resolve2(retry()), "userRetry"); - const userFail = /* @__PURE__ */ __name(() => reject3(err), "userFail"); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (false) { - warn$1$1( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (false) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }, "load"); - return /* @__PURE__ */ defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load2, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = /* @__PURE__ */ __name((err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }, "onError"); - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load2().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error2 = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error2.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error2.value = err; - } - }, timeout); - } - load2().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.effect.dirty = true; - queueJob(instance.parent.update); - } - }).catch((err) => { - onError(err); - error2.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error2.value && errorComponent) { - return createVNode(errorComponent, { - error: error2.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -__name(defineAsyncComponent, "defineAsyncComponent"); -function createInnerComp(comp, parent) { - const { ref: ref22, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref22; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} -__name(createInnerComp, "createInnerComp"); -function renderSlot(slots, name2, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { - if (name2 !== "default") props.name = name2; - return createVNode("slot", props, fallback && fallback()); - } - let slot = slots[name2]; - if (false) { - warn$1$1( - `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` - ); - slot = /* @__PURE__ */ __name(() => [], "slot"); - } - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock( - Fragment$1, - { - key: props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key || `_${name2}` - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -__name(renderSlot, "renderSlot"); -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode$1(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment$1 && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} -__name(ensureValidVNode, "ensureValidVNode"); -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - if (false) { - warn$1$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; - } - return ret; -} -__name(toHandlers, "toHandlers"); -const getPublicInstance = /* @__PURE__ */ __name((i2) => { - if (!i2) return null; - if (isStatefulComponent(i2)) return getComponentPublicInstance(i2); - return getPublicInstance(i2.parent); -}, "getPublicInstance"); -const publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /* @__PURE__ */ extend$1(/* @__PURE__ */ Object.create(null), { - $: /* @__PURE__ */ __name((i2) => i2, "$"), - $el: /* @__PURE__ */ __name((i2) => i2.vnode.el, "$el"), - $data: /* @__PURE__ */ __name((i2) => i2.data, "$data"), - $props: /* @__PURE__ */ __name((i2) => false ? shallowReadonly(i2.props) : i2.props, "$props"), - $attrs: /* @__PURE__ */ __name((i2) => false ? shallowReadonly(i2.attrs) : i2.attrs, "$attrs"), - $slots: /* @__PURE__ */ __name((i2) => false ? shallowReadonly(i2.slots) : i2.slots, "$slots"), - $refs: /* @__PURE__ */ __name((i2) => false ? shallowReadonly(i2.refs) : i2.refs, "$refs"), - $parent: /* @__PURE__ */ __name((i2) => getPublicInstance(i2.parent), "$parent"), - $root: /* @__PURE__ */ __name((i2) => getPublicInstance(i2.root), "$root"), - $emit: /* @__PURE__ */ __name((i2) => i2.emit, "$emit"), - $options: /* @__PURE__ */ __name((i2) => true ? resolveMergedOptions(i2) : i2.type, "$options"), - $forceUpdate: /* @__PURE__ */ __name((i2) => i2.f || (i2.f = () => { - i2.effect.dirty = true; - queueJob(i2.update); - }), "$forceUpdate"), - $nextTick: /* @__PURE__ */ __name((i2) => i2.n || (i2.n = nextTick.bind(i2.proxy)), "$nextTick"), - $watch: /* @__PURE__ */ __name((i2) => true ? instanceWatch.bind(i2) : NOOP, "$watch") - }) -); -const isReservedPrefix = /* @__PURE__ */ __name((key) => key === "_" || key === "$", "isReservedPrefix"); -const hasSetupBinding = /* @__PURE__ */ __name((state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn$3(state, key), "hasSetupBinding"); -const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data: data25, props, accessCache, type, appContext } = instance; - if (false) { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n2 = accessCache[key]; - if (n2 !== void 0) { - switch (n2) { - case 1: - return setupState[key]; - case 2: - return data25[key]; - case 4: - return ctx[key]; - case 3: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1; - return setupState[key]; - } else if (data25 !== EMPTY_OBJ && hasOwn$3(data25, key)) { - accessCache[key] = 2; - return data25[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn$3(normalizedProps, key) - ) { - accessCache[key] = 3; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn$3(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if (shouldCacheAccess) { - accessCache[key] = 0; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance.attrs, "get", ""); - } else if (false) { - track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn$3(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn$3(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (false) { - if (data25 !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn$3(data25, key)) { - warn$1$1( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn$1$1( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value4) { - const { data: data25, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value4; - return true; - } else if (false) { - warn$1$1(`Cannot mutate - - - -
- - diff --git a/web/materialdesignicons.min.css b/web/materialdesignicons.min.css deleted file mode 100644 index e2ea8930c..000000000 --- a/web/materialdesignicons.min.css +++ /dev/null @@ -1,3 +0,0 @@ -@font-face{font-family:"Material Design Icons";src:url("fonts/materialdesignicons-webfont.eot?v=7.4.47");src:url("fonts/materialdesignicons-webfont.eot?#iefix&v=7.4.47") format("embedded-opentype"),url("fonts/materialdesignicons-webfont.woff2?v=7.4.47") format("woff2"),url("fonts/materialdesignicons-webfont.woff?v=7.4.47") format("woff"),url("fonts/materialdesignicons-webfont.ttf?v=7.4.47") format("truetype");font-weight:normal;font-style:normal}.mdi:before,.mdi-set{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mdi-ab-testing::before{content:"\F01C9"}.mdi-abacus::before{content:"\F16E0"}.mdi-abjad-arabic::before{content:"\F1328"}.mdi-abjad-hebrew::before{content:"\F1329"}.mdi-abugida-devanagari::before{content:"\F132A"}.mdi-abugida-thai::before{content:"\F132B"}.mdi-access-point::before{content:"\F0003"}.mdi-access-point-check::before{content:"\F1538"}.mdi-access-point-minus::before{content:"\F1539"}.mdi-access-point-network::before{content:"\F0002"}.mdi-access-point-network-off::before{content:"\F0BE1"}.mdi-access-point-off::before{content:"\F1511"}.mdi-access-point-plus::before{content:"\F153A"}.mdi-access-point-remove::before{content:"\F153B"}.mdi-account::before{content:"\F0004"}.mdi-account-alert::before{content:"\F0005"}.mdi-account-alert-outline::before{content:"\F0B50"}.mdi-account-arrow-down::before{content:"\F1868"}.mdi-account-arrow-down-outline::before{content:"\F1869"}.mdi-account-arrow-left::before{content:"\F0B51"}.mdi-account-arrow-left-outline::before{content:"\F0B52"}.mdi-account-arrow-right::before{content:"\F0B53"}.mdi-account-arrow-right-outline::before{content:"\F0B54"}.mdi-account-arrow-up::before{content:"\F1867"}.mdi-account-arrow-up-outline::before{content:"\F186A"}.mdi-account-badge::before{content:"\F1B0A"}.mdi-account-badge-outline::before{content:"\F1B0B"}.mdi-account-box::before{content:"\F0006"}.mdi-account-box-edit-outline::before{content:"\F1CC8"}.mdi-account-box-minus-outline::before{content:"\F1CC9"}.mdi-account-box-multiple::before{content:"\F0934"}.mdi-account-box-multiple-outline::before{content:"\F100A"}.mdi-account-box-outline::before{content:"\F0007"}.mdi-account-box-plus-outline::before{content:"\F1CCA"}.mdi-account-cancel::before{content:"\F12DF"}.mdi-account-cancel-outline::before{content:"\F12E0"}.mdi-account-card::before{content:"\F1BA4"}.mdi-account-card-outline::before{content:"\F1BA5"}.mdi-account-cash::before{content:"\F1097"}.mdi-account-cash-outline::before{content:"\F1098"}.mdi-account-check::before{content:"\F0008"}.mdi-account-check-outline::before{content:"\F0BE2"}.mdi-account-child::before{content:"\F0A89"}.mdi-account-child-circle::before{content:"\F0A8A"}.mdi-account-child-outline::before{content:"\F10C8"}.mdi-account-circle::before{content:"\F0009"}.mdi-account-circle-outline::before{content:"\F0B55"}.mdi-account-clock::before{content:"\F0B56"}.mdi-account-clock-outline::before{content:"\F0B57"}.mdi-account-cog::before{content:"\F1370"}.mdi-account-cog-outline::before{content:"\F1371"}.mdi-account-convert::before{content:"\F000A"}.mdi-account-convert-outline::before{content:"\F1301"}.mdi-account-cowboy-hat::before{content:"\F0E9B"}.mdi-account-cowboy-hat-outline::before{content:"\F17F3"}.mdi-account-credit-card::before{content:"\F1BA6"}.mdi-account-credit-card-outline::before{content:"\F1BA7"}.mdi-account-details::before{content:"\F0631"}.mdi-account-details-outline::before{content:"\F1372"}.mdi-account-edit::before{content:"\F06BC"}.mdi-account-edit-outline::before{content:"\F0FFB"}.mdi-account-eye::before{content:"\F0420"}.mdi-account-eye-outline::before{content:"\F127B"}.mdi-account-file::before{content:"\F1CA7"}.mdi-account-file-outline::before{content:"\F1CA8"}.mdi-account-file-text::before{content:"\F1CA9"}.mdi-account-file-text-outline::before{content:"\F1CAA"}.mdi-account-filter::before{content:"\F0936"}.mdi-account-filter-outline::before{content:"\F0F9D"}.mdi-account-group::before{content:"\F0849"}.mdi-account-group-outline::before{content:"\F0B58"}.mdi-account-hard-hat::before{content:"\F05B5"}.mdi-account-hard-hat-outline::before{content:"\F1A1F"}.mdi-account-heart::before{content:"\F0899"}.mdi-account-heart-outline::before{content:"\F0BE3"}.mdi-account-injury::before{content:"\F1815"}.mdi-account-injury-outline::before{content:"\F1816"}.mdi-account-key::before{content:"\F000B"}.mdi-account-key-outline::before{content:"\F0BE4"}.mdi-account-lock::before{content:"\F115E"}.mdi-account-lock-open::before{content:"\F1960"}.mdi-account-lock-open-outline::before{content:"\F1961"}.mdi-account-lock-outline::before{content:"\F115F"}.mdi-account-minus::before{content:"\F000D"}.mdi-account-minus-outline::before{content:"\F0AEC"}.mdi-account-multiple::before{content:"\F000E"}.mdi-account-multiple-check::before{content:"\F08C5"}.mdi-account-multiple-check-outline::before{content:"\F11FE"}.mdi-account-multiple-minus::before{content:"\F05D3"}.mdi-account-multiple-minus-outline::before{content:"\F0BE5"}.mdi-account-multiple-outline::before{content:"\F000F"}.mdi-account-multiple-plus::before{content:"\F0010"}.mdi-account-multiple-plus-outline::before{content:"\F0800"}.mdi-account-multiple-remove::before{content:"\F120A"}.mdi-account-multiple-remove-outline::before{content:"\F120B"}.mdi-account-music::before{content:"\F0803"}.mdi-account-music-outline::before{content:"\F0CE9"}.mdi-account-network::before{content:"\F0011"}.mdi-account-network-off::before{content:"\F1AF1"}.mdi-account-network-off-outline::before{content:"\F1AF2"}.mdi-account-network-outline::before{content:"\F0BE6"}.mdi-account-off::before{content:"\F0012"}.mdi-account-off-outline::before{content:"\F0BE7"}.mdi-account-outline::before{content:"\F0013"}.mdi-account-plus::before{content:"\F0014"}.mdi-account-plus-outline::before{content:"\F0801"}.mdi-account-question::before{content:"\F0B59"}.mdi-account-question-outline::before{content:"\F0B5A"}.mdi-account-reactivate::before{content:"\F152B"}.mdi-account-reactivate-outline::before{content:"\F152C"}.mdi-account-remove::before{content:"\F0015"}.mdi-account-remove-outline::before{content:"\F0AED"}.mdi-account-school::before{content:"\F1A20"}.mdi-account-school-outline::before{content:"\F1A21"}.mdi-account-search::before{content:"\F0016"}.mdi-account-search-outline::before{content:"\F0935"}.mdi-account-settings::before{content:"\F0630"}.mdi-account-settings-outline::before{content:"\F10C9"}.mdi-account-star::before{content:"\F0017"}.mdi-account-star-outline::before{content:"\F0BE8"}.mdi-account-supervisor::before{content:"\F0A8B"}.mdi-account-supervisor-circle::before{content:"\F0A8C"}.mdi-account-supervisor-circle-outline::before{content:"\F14EC"}.mdi-account-supervisor-outline::before{content:"\F112D"}.mdi-account-switch::before{content:"\F0019"}.mdi-account-switch-outline::before{content:"\F04CB"}.mdi-account-sync::before{content:"\F191B"}.mdi-account-sync-outline::before{content:"\F191C"}.mdi-account-tag::before{content:"\F1C1B"}.mdi-account-tag-outline::before{content:"\F1C1C"}.mdi-account-tie::before{content:"\F0CE3"}.mdi-account-tie-hat::before{content:"\F1898"}.mdi-account-tie-hat-outline::before{content:"\F1899"}.mdi-account-tie-outline::before{content:"\F10CA"}.mdi-account-tie-voice::before{content:"\F1308"}.mdi-account-tie-voice-off::before{content:"\F130A"}.mdi-account-tie-voice-off-outline::before{content:"\F130B"}.mdi-account-tie-voice-outline::before{content:"\F1309"}.mdi-account-tie-woman::before{content:"\F1A8C"}.mdi-account-voice::before{content:"\F05CB"}.mdi-account-voice-off::before{content:"\F0ED4"}.mdi-account-wrench::before{content:"\F189A"}.mdi-account-wrench-outline::before{content:"\F189B"}.mdi-adjust::before{content:"\F001A"}.mdi-advertisements::before{content:"\F192A"}.mdi-advertisements-off::before{content:"\F192B"}.mdi-air-conditioner::before{content:"\F001B"}.mdi-air-filter::before{content:"\F0D43"}.mdi-air-horn::before{content:"\F0DAC"}.mdi-air-humidifier::before{content:"\F1099"}.mdi-air-humidifier-off::before{content:"\F1466"}.mdi-air-purifier::before{content:"\F0D44"}.mdi-air-purifier-off::before{content:"\F1B57"}.mdi-airbag::before{content:"\F0BE9"}.mdi-airballoon::before{content:"\F001C"}.mdi-airballoon-outline::before{content:"\F100B"}.mdi-airplane::before{content:"\F001D"}.mdi-airplane-alert::before{content:"\F187A"}.mdi-airplane-check::before{content:"\F187B"}.mdi-airplane-clock::before{content:"\F187C"}.mdi-airplane-cog::before{content:"\F187D"}.mdi-airplane-edit::before{content:"\F187E"}.mdi-airplane-landing::before{content:"\F05D4"}.mdi-airplane-marker::before{content:"\F187F"}.mdi-airplane-minus::before{content:"\F1880"}.mdi-airplane-off::before{content:"\F001E"}.mdi-airplane-plus::before{content:"\F1881"}.mdi-airplane-remove::before{content:"\F1882"}.mdi-airplane-search::before{content:"\F1883"}.mdi-airplane-settings::before{content:"\F1884"}.mdi-airplane-takeoff::before{content:"\F05D5"}.mdi-airport::before{content:"\F084B"}.mdi-alarm::before{content:"\F0020"}.mdi-alarm-bell::before{content:"\F078E"}.mdi-alarm-check::before{content:"\F0021"}.mdi-alarm-light::before{content:"\F078F"}.mdi-alarm-light-off::before{content:"\F171E"}.mdi-alarm-light-off-outline::before{content:"\F171F"}.mdi-alarm-light-outline::before{content:"\F0BEA"}.mdi-alarm-multiple::before{content:"\F0022"}.mdi-alarm-note::before{content:"\F0E71"}.mdi-alarm-note-off::before{content:"\F0E72"}.mdi-alarm-off::before{content:"\F0023"}.mdi-alarm-panel::before{content:"\F15C4"}.mdi-alarm-panel-outline::before{content:"\F15C5"}.mdi-alarm-plus::before{content:"\F0024"}.mdi-alarm-snooze::before{content:"\F068E"}.mdi-album::before{content:"\F0025"}.mdi-alert::before{content:"\F0026"}.mdi-alert-box::before{content:"\F0027"}.mdi-alert-box-outline::before{content:"\F0CE4"}.mdi-alert-circle::before{content:"\F0028"}.mdi-alert-circle-check::before{content:"\F11ED"}.mdi-alert-circle-check-outline::before{content:"\F11EE"}.mdi-alert-circle-outline::before{content:"\F05D6"}.mdi-alert-decagram::before{content:"\F06BD"}.mdi-alert-decagram-outline::before{content:"\F0CE5"}.mdi-alert-minus::before{content:"\F14BB"}.mdi-alert-minus-outline::before{content:"\F14BE"}.mdi-alert-octagon::before{content:"\F0029"}.mdi-alert-octagon-outline::before{content:"\F0CE6"}.mdi-alert-octagram::before{content:"\F0767"}.mdi-alert-octagram-outline::before{content:"\F0CE7"}.mdi-alert-outline::before{content:"\F002A"}.mdi-alert-plus::before{content:"\F14BA"}.mdi-alert-plus-outline::before{content:"\F14BD"}.mdi-alert-remove::before{content:"\F14BC"}.mdi-alert-remove-outline::before{content:"\F14BF"}.mdi-alert-rhombus::before{content:"\F11CE"}.mdi-alert-rhombus-outline::before{content:"\F11CF"}.mdi-alien::before{content:"\F089A"}.mdi-alien-outline::before{content:"\F10CB"}.mdi-align-horizontal-center::before{content:"\F11C3"}.mdi-align-horizontal-distribute::before{content:"\F1962"}.mdi-align-horizontal-left::before{content:"\F11C2"}.mdi-align-horizontal-right::before{content:"\F11C4"}.mdi-align-vertical-bottom::before{content:"\F11C5"}.mdi-align-vertical-center::before{content:"\F11C6"}.mdi-align-vertical-distribute::before{content:"\F1963"}.mdi-align-vertical-top::before{content:"\F11C7"}.mdi-all-inclusive::before{content:"\F06BE"}.mdi-all-inclusive-box::before{content:"\F188D"}.mdi-all-inclusive-box-outline::before{content:"\F188E"}.mdi-allergy::before{content:"\F1258"}.mdi-alpha::before{content:"\F002B"}.mdi-alpha-a::before{content:"\F0AEE"}.mdi-alpha-a-box::before{content:"\F0B08"}.mdi-alpha-a-box-outline::before{content:"\F0BEB"}.mdi-alpha-a-circle::before{content:"\F0BEC"}.mdi-alpha-a-circle-outline::before{content:"\F0BED"}.mdi-alpha-b::before{content:"\F0AEF"}.mdi-alpha-b-box::before{content:"\F0B09"}.mdi-alpha-b-box-outline::before{content:"\F0BEE"}.mdi-alpha-b-circle::before{content:"\F0BEF"}.mdi-alpha-b-circle-outline::before{content:"\F0BF0"}.mdi-alpha-c::before{content:"\F0AF0"}.mdi-alpha-c-box::before{content:"\F0B0A"}.mdi-alpha-c-box-outline::before{content:"\F0BF1"}.mdi-alpha-c-circle::before{content:"\F0BF2"}.mdi-alpha-c-circle-outline::before{content:"\F0BF3"}.mdi-alpha-d::before{content:"\F0AF1"}.mdi-alpha-d-box::before{content:"\F0B0B"}.mdi-alpha-d-box-outline::before{content:"\F0BF4"}.mdi-alpha-d-circle::before{content:"\F0BF5"}.mdi-alpha-d-circle-outline::before{content:"\F0BF6"}.mdi-alpha-e::before{content:"\F0AF2"}.mdi-alpha-e-box::before{content:"\F0B0C"}.mdi-alpha-e-box-outline::before{content:"\F0BF7"}.mdi-alpha-e-circle::before{content:"\F0BF8"}.mdi-alpha-e-circle-outline::before{content:"\F0BF9"}.mdi-alpha-f::before{content:"\F0AF3"}.mdi-alpha-f-box::before{content:"\F0B0D"}.mdi-alpha-f-box-outline::before{content:"\F0BFA"}.mdi-alpha-f-circle::before{content:"\F0BFB"}.mdi-alpha-f-circle-outline::before{content:"\F0BFC"}.mdi-alpha-g::before{content:"\F0AF4"}.mdi-alpha-g-box::before{content:"\F0B0E"}.mdi-alpha-g-box-outline::before{content:"\F0BFD"}.mdi-alpha-g-circle::before{content:"\F0BFE"}.mdi-alpha-g-circle-outline::before{content:"\F0BFF"}.mdi-alpha-h::before{content:"\F0AF5"}.mdi-alpha-h-box::before{content:"\F0B0F"}.mdi-alpha-h-box-outline::before{content:"\F0C00"}.mdi-alpha-h-circle::before{content:"\F0C01"}.mdi-alpha-h-circle-outline::before{content:"\F0C02"}.mdi-alpha-i::before{content:"\F0AF6"}.mdi-alpha-i-box::before{content:"\F0B10"}.mdi-alpha-i-box-outline::before{content:"\F0C03"}.mdi-alpha-i-circle::before{content:"\F0C04"}.mdi-alpha-i-circle-outline::before{content:"\F0C05"}.mdi-alpha-j::before{content:"\F0AF7"}.mdi-alpha-j-box::before{content:"\F0B11"}.mdi-alpha-j-box-outline::before{content:"\F0C06"}.mdi-alpha-j-circle::before{content:"\F0C07"}.mdi-alpha-j-circle-outline::before{content:"\F0C08"}.mdi-alpha-k::before{content:"\F0AF8"}.mdi-alpha-k-box::before{content:"\F0B12"}.mdi-alpha-k-box-outline::before{content:"\F0C09"}.mdi-alpha-k-circle::before{content:"\F0C0A"}.mdi-alpha-k-circle-outline::before{content:"\F0C0B"}.mdi-alpha-l::before{content:"\F0AF9"}.mdi-alpha-l-box::before{content:"\F0B13"}.mdi-alpha-l-box-outline::before{content:"\F0C0C"}.mdi-alpha-l-circle::before{content:"\F0C0D"}.mdi-alpha-l-circle-outline::before{content:"\F0C0E"}.mdi-alpha-m::before{content:"\F0AFA"}.mdi-alpha-m-box::before{content:"\F0B14"}.mdi-alpha-m-box-outline::before{content:"\F0C0F"}.mdi-alpha-m-circle::before{content:"\F0C10"}.mdi-alpha-m-circle-outline::before{content:"\F0C11"}.mdi-alpha-n::before{content:"\F0AFB"}.mdi-alpha-n-box::before{content:"\F0B15"}.mdi-alpha-n-box-outline::before{content:"\F0C12"}.mdi-alpha-n-circle::before{content:"\F0C13"}.mdi-alpha-n-circle-outline::before{content:"\F0C14"}.mdi-alpha-o::before{content:"\F0AFC"}.mdi-alpha-o-box::before{content:"\F0B16"}.mdi-alpha-o-box-outline::before{content:"\F0C15"}.mdi-alpha-o-circle::before{content:"\F0C16"}.mdi-alpha-o-circle-outline::before{content:"\F0C17"}.mdi-alpha-p::before{content:"\F0AFD"}.mdi-alpha-p-box::before{content:"\F0B17"}.mdi-alpha-p-box-outline::before{content:"\F0C18"}.mdi-alpha-p-circle::before{content:"\F0C19"}.mdi-alpha-p-circle-outline::before{content:"\F0C1A"}.mdi-alpha-q::before{content:"\F0AFE"}.mdi-alpha-q-box::before{content:"\F0B18"}.mdi-alpha-q-box-outline::before{content:"\F0C1B"}.mdi-alpha-q-circle::before{content:"\F0C1C"}.mdi-alpha-q-circle-outline::before{content:"\F0C1D"}.mdi-alpha-r::before{content:"\F0AFF"}.mdi-alpha-r-box::before{content:"\F0B19"}.mdi-alpha-r-box-outline::before{content:"\F0C1E"}.mdi-alpha-r-circle::before{content:"\F0C1F"}.mdi-alpha-r-circle-outline::before{content:"\F0C20"}.mdi-alpha-s::before{content:"\F0B00"}.mdi-alpha-s-box::before{content:"\F0B1A"}.mdi-alpha-s-box-outline::before{content:"\F0C21"}.mdi-alpha-s-circle::before{content:"\F0C22"}.mdi-alpha-s-circle-outline::before{content:"\F0C23"}.mdi-alpha-t::before{content:"\F0B01"}.mdi-alpha-t-box::before{content:"\F0B1B"}.mdi-alpha-t-box-outline::before{content:"\F0C24"}.mdi-alpha-t-circle::before{content:"\F0C25"}.mdi-alpha-t-circle-outline::before{content:"\F0C26"}.mdi-alpha-u::before{content:"\F0B02"}.mdi-alpha-u-box::before{content:"\F0B1C"}.mdi-alpha-u-box-outline::before{content:"\F0C27"}.mdi-alpha-u-circle::before{content:"\F0C28"}.mdi-alpha-u-circle-outline::before{content:"\F0C29"}.mdi-alpha-v::before{content:"\F0B03"}.mdi-alpha-v-box::before{content:"\F0B1D"}.mdi-alpha-v-box-outline::before{content:"\F0C2A"}.mdi-alpha-v-circle::before{content:"\F0C2B"}.mdi-alpha-v-circle-outline::before{content:"\F0C2C"}.mdi-alpha-w::before{content:"\F0B04"}.mdi-alpha-w-box::before{content:"\F0B1E"}.mdi-alpha-w-box-outline::before{content:"\F0C2D"}.mdi-alpha-w-circle::before{content:"\F0C2E"}.mdi-alpha-w-circle-outline::before{content:"\F0C2F"}.mdi-alpha-x::before{content:"\F0B05"}.mdi-alpha-x-box::before{content:"\F0B1F"}.mdi-alpha-x-box-outline::before{content:"\F0C30"}.mdi-alpha-x-circle::before{content:"\F0C31"}.mdi-alpha-x-circle-outline::before{content:"\F0C32"}.mdi-alpha-y::before{content:"\F0B06"}.mdi-alpha-y-box::before{content:"\F0B20"}.mdi-alpha-y-box-outline::before{content:"\F0C33"}.mdi-alpha-y-circle::before{content:"\F0C34"}.mdi-alpha-y-circle-outline::before{content:"\F0C35"}.mdi-alpha-z::before{content:"\F0B07"}.mdi-alpha-z-box::before{content:"\F0B21"}.mdi-alpha-z-box-outline::before{content:"\F0C36"}.mdi-alpha-z-circle::before{content:"\F0C37"}.mdi-alpha-z-circle-outline::before{content:"\F0C38"}.mdi-alphabet-aurebesh::before{content:"\F132C"}.mdi-alphabet-cyrillic::before{content:"\F132D"}.mdi-alphabet-greek::before{content:"\F132E"}.mdi-alphabet-latin::before{content:"\F132F"}.mdi-alphabet-piqad::before{content:"\F1330"}.mdi-alphabet-tengwar::before{content:"\F1337"}.mdi-alphabetical::before{content:"\F002C"}.mdi-alphabetical-off::before{content:"\F100C"}.mdi-alphabetical-variant::before{content:"\F100D"}.mdi-alphabetical-variant-off::before{content:"\F100E"}.mdi-altimeter::before{content:"\F05D7"}.mdi-ambulance::before{content:"\F002F"}.mdi-ammunition::before{content:"\F0CE8"}.mdi-ampersand::before{content:"\F0A8D"}.mdi-amplifier::before{content:"\F0030"}.mdi-amplifier-off::before{content:"\F11B5"}.mdi-anchor::before{content:"\F0031"}.mdi-android::before{content:"\F0032"}.mdi-android-studio::before{content:"\F0034"}.mdi-angle-acute::before{content:"\F0937"}.mdi-angle-obtuse::before{content:"\F0938"}.mdi-angle-right::before{content:"\F0939"}.mdi-angular::before{content:"\F06B2"}.mdi-angularjs::before{content:"\F06BF"}.mdi-animation::before{content:"\F05D8"}.mdi-animation-outline::before{content:"\F0A8F"}.mdi-animation-play::before{content:"\F093A"}.mdi-animation-play-outline::before{content:"\F0A90"}.mdi-ansible::before{content:"\F109A"}.mdi-antenna::before{content:"\F1119"}.mdi-anvil::before{content:"\F089B"}.mdi-apache-kafka::before{content:"\F100F"}.mdi-api::before{content:"\F109B"}.mdi-api-off::before{content:"\F1257"}.mdi-apple::before{content:"\F0035"}.mdi-apple-finder::before{content:"\F0036"}.mdi-apple-icloud::before{content:"\F0038"}.mdi-apple-ios::before{content:"\F0037"}.mdi-apple-keyboard-caps::before{content:"\F0632"}.mdi-apple-keyboard-command::before{content:"\F0633"}.mdi-apple-keyboard-control::before{content:"\F0634"}.mdi-apple-keyboard-option::before{content:"\F0635"}.mdi-apple-keyboard-shift::before{content:"\F0636"}.mdi-apple-safari::before{content:"\F0039"}.mdi-application::before{content:"\F08C6"}.mdi-application-array::before{content:"\F10F5"}.mdi-application-array-outline::before{content:"\F10F6"}.mdi-application-braces::before{content:"\F10F7"}.mdi-application-braces-outline::before{content:"\F10F8"}.mdi-application-brackets::before{content:"\F0C8B"}.mdi-application-brackets-outline::before{content:"\F0C8C"}.mdi-application-cog::before{content:"\F0675"}.mdi-application-cog-outline::before{content:"\F1577"}.mdi-application-edit::before{content:"\F00AE"}.mdi-application-edit-outline::before{content:"\F0619"}.mdi-application-export::before{content:"\F0DAD"}.mdi-application-import::before{content:"\F0DAE"}.mdi-application-outline::before{content:"\F0614"}.mdi-application-parentheses::before{content:"\F10F9"}.mdi-application-parentheses-outline::before{content:"\F10FA"}.mdi-application-settings::before{content:"\F0B60"}.mdi-application-settings-outline::before{content:"\F1555"}.mdi-application-variable::before{content:"\F10FB"}.mdi-application-variable-outline::before{content:"\F10FC"}.mdi-approximately-equal::before{content:"\F0F9E"}.mdi-approximately-equal-box::before{content:"\F0F9F"}.mdi-apps::before{content:"\F003B"}.mdi-apps-box::before{content:"\F0D46"}.mdi-arch::before{content:"\F08C7"}.mdi-archive::before{content:"\F003C"}.mdi-archive-alert::before{content:"\F14FD"}.mdi-archive-alert-outline::before{content:"\F14FE"}.mdi-archive-arrow-down::before{content:"\F1259"}.mdi-archive-arrow-down-outline::before{content:"\F125A"}.mdi-archive-arrow-up::before{content:"\F125B"}.mdi-archive-arrow-up-outline::before{content:"\F125C"}.mdi-archive-cancel::before{content:"\F174B"}.mdi-archive-cancel-outline::before{content:"\F174C"}.mdi-archive-check::before{content:"\F174D"}.mdi-archive-check-outline::before{content:"\F174E"}.mdi-archive-clock::before{content:"\F174F"}.mdi-archive-clock-outline::before{content:"\F1750"}.mdi-archive-cog::before{content:"\F1751"}.mdi-archive-cog-outline::before{content:"\F1752"}.mdi-archive-edit::before{content:"\F1753"}.mdi-archive-edit-outline::before{content:"\F1754"}.mdi-archive-eye::before{content:"\F1755"}.mdi-archive-eye-outline::before{content:"\F1756"}.mdi-archive-lock::before{content:"\F1757"}.mdi-archive-lock-open::before{content:"\F1758"}.mdi-archive-lock-open-outline::before{content:"\F1759"}.mdi-archive-lock-outline::before{content:"\F175A"}.mdi-archive-marker::before{content:"\F175B"}.mdi-archive-marker-outline::before{content:"\F175C"}.mdi-archive-minus::before{content:"\F175D"}.mdi-archive-minus-outline::before{content:"\F175E"}.mdi-archive-music::before{content:"\F175F"}.mdi-archive-music-outline::before{content:"\F1760"}.mdi-archive-off::before{content:"\F1761"}.mdi-archive-off-outline::before{content:"\F1762"}.mdi-archive-outline::before{content:"\F120E"}.mdi-archive-plus::before{content:"\F1763"}.mdi-archive-plus-outline::before{content:"\F1764"}.mdi-archive-refresh::before{content:"\F1765"}.mdi-archive-refresh-outline::before{content:"\F1766"}.mdi-archive-remove::before{content:"\F1767"}.mdi-archive-remove-outline::before{content:"\F1768"}.mdi-archive-search::before{content:"\F1769"}.mdi-archive-search-outline::before{content:"\F176A"}.mdi-archive-settings::before{content:"\F176B"}.mdi-archive-settings-outline::before{content:"\F176C"}.mdi-archive-star::before{content:"\F176D"}.mdi-archive-star-outline::before{content:"\F176E"}.mdi-archive-sync::before{content:"\F176F"}.mdi-archive-sync-outline::before{content:"\F1770"}.mdi-arm-flex::before{content:"\F0FD7"}.mdi-arm-flex-outline::before{content:"\F0FD6"}.mdi-arrange-bring-forward::before{content:"\F003D"}.mdi-arrange-bring-to-front::before{content:"\F003E"}.mdi-arrange-send-backward::before{content:"\F003F"}.mdi-arrange-send-to-back::before{content:"\F0040"}.mdi-arrow-all::before{content:"\F0041"}.mdi-arrow-bottom-left::before{content:"\F0042"}.mdi-arrow-bottom-left-bold-box::before{content:"\F1964"}.mdi-arrow-bottom-left-bold-box-outline::before{content:"\F1965"}.mdi-arrow-bottom-left-bold-outline::before{content:"\F09B7"}.mdi-arrow-bottom-left-thick::before{content:"\F09B8"}.mdi-arrow-bottom-left-thin::before{content:"\F19B6"}.mdi-arrow-bottom-left-thin-circle-outline::before{content:"\F1596"}.mdi-arrow-bottom-right::before{content:"\F0043"}.mdi-arrow-bottom-right-bold-box::before{content:"\F1966"}.mdi-arrow-bottom-right-bold-box-outline::before{content:"\F1967"}.mdi-arrow-bottom-right-bold-outline::before{content:"\F09B9"}.mdi-arrow-bottom-right-thick::before{content:"\F09BA"}.mdi-arrow-bottom-right-thin::before{content:"\F19B7"}.mdi-arrow-bottom-right-thin-circle-outline::before{content:"\F1595"}.mdi-arrow-collapse::before{content:"\F0615"}.mdi-arrow-collapse-all::before{content:"\F0044"}.mdi-arrow-collapse-down::before{content:"\F0792"}.mdi-arrow-collapse-horizontal::before{content:"\F084C"}.mdi-arrow-collapse-left::before{content:"\F0793"}.mdi-arrow-collapse-right::before{content:"\F0794"}.mdi-arrow-collapse-up::before{content:"\F0795"}.mdi-arrow-collapse-vertical::before{content:"\F084D"}.mdi-arrow-decision::before{content:"\F09BB"}.mdi-arrow-decision-auto::before{content:"\F09BC"}.mdi-arrow-decision-auto-outline::before{content:"\F09BD"}.mdi-arrow-decision-outline::before{content:"\F09BE"}.mdi-arrow-down::before{content:"\F0045"}.mdi-arrow-down-bold::before{content:"\F072E"}.mdi-arrow-down-bold-box::before{content:"\F072F"}.mdi-arrow-down-bold-box-outline::before{content:"\F0730"}.mdi-arrow-down-bold-circle::before{content:"\F0047"}.mdi-arrow-down-bold-circle-outline::before{content:"\F0048"}.mdi-arrow-down-bold-hexagon-outline::before{content:"\F0049"}.mdi-arrow-down-bold-outline::before{content:"\F09BF"}.mdi-arrow-down-box::before{content:"\F06C0"}.mdi-arrow-down-circle::before{content:"\F0CDB"}.mdi-arrow-down-circle-outline::before{content:"\F0CDC"}.mdi-arrow-down-drop-circle::before{content:"\F004A"}.mdi-arrow-down-drop-circle-outline::before{content:"\F004B"}.mdi-arrow-down-left::before{content:"\F17A1"}.mdi-arrow-down-left-bold::before{content:"\F17A2"}.mdi-arrow-down-right::before{content:"\F17A3"}.mdi-arrow-down-right-bold::before{content:"\F17A4"}.mdi-arrow-down-thick::before{content:"\F0046"}.mdi-arrow-down-thin::before{content:"\F19B3"}.mdi-arrow-down-thin-circle-outline::before{content:"\F1599"}.mdi-arrow-expand::before{content:"\F0616"}.mdi-arrow-expand-all::before{content:"\F004C"}.mdi-arrow-expand-down::before{content:"\F0796"}.mdi-arrow-expand-horizontal::before{content:"\F084E"}.mdi-arrow-expand-left::before{content:"\F0797"}.mdi-arrow-expand-right::before{content:"\F0798"}.mdi-arrow-expand-up::before{content:"\F0799"}.mdi-arrow-expand-vertical::before{content:"\F084F"}.mdi-arrow-horizontal-lock::before{content:"\F115B"}.mdi-arrow-left::before{content:"\F004D"}.mdi-arrow-left-bold::before{content:"\F0731"}.mdi-arrow-left-bold-box::before{content:"\F0732"}.mdi-arrow-left-bold-box-outline::before{content:"\F0733"}.mdi-arrow-left-bold-circle::before{content:"\F004F"}.mdi-arrow-left-bold-circle-outline::before{content:"\F0050"}.mdi-arrow-left-bold-hexagon-outline::before{content:"\F0051"}.mdi-arrow-left-bold-outline::before{content:"\F09C0"}.mdi-arrow-left-bottom::before{content:"\F17A5"}.mdi-arrow-left-bottom-bold::before{content:"\F17A6"}.mdi-arrow-left-box::before{content:"\F06C1"}.mdi-arrow-left-circle::before{content:"\F0CDD"}.mdi-arrow-left-circle-outline::before{content:"\F0CDE"}.mdi-arrow-left-drop-circle::before{content:"\F0052"}.mdi-arrow-left-drop-circle-outline::before{content:"\F0053"}.mdi-arrow-left-right::before{content:"\F0E73"}.mdi-arrow-left-right-bold::before{content:"\F0E74"}.mdi-arrow-left-right-bold-outline::before{content:"\F09C1"}.mdi-arrow-left-thick::before{content:"\F004E"}.mdi-arrow-left-thin::before{content:"\F19B1"}.mdi-arrow-left-thin-circle-outline::before{content:"\F159A"}.mdi-arrow-left-top::before{content:"\F17A7"}.mdi-arrow-left-top-bold::before{content:"\F17A8"}.mdi-arrow-oscillating::before{content:"\F1C91"}.mdi-arrow-oscillating-off::before{content:"\F1C92"}.mdi-arrow-projectile::before{content:"\F1840"}.mdi-arrow-projectile-multiple::before{content:"\F183F"}.mdi-arrow-right::before{content:"\F0054"}.mdi-arrow-right-bold::before{content:"\F0734"}.mdi-arrow-right-bold-box::before{content:"\F0735"}.mdi-arrow-right-bold-box-outline::before{content:"\F0736"}.mdi-arrow-right-bold-circle::before{content:"\F0056"}.mdi-arrow-right-bold-circle-outline::before{content:"\F0057"}.mdi-arrow-right-bold-hexagon-outline::before{content:"\F0058"}.mdi-arrow-right-bold-outline::before{content:"\F09C2"}.mdi-arrow-right-bottom::before{content:"\F17A9"}.mdi-arrow-right-bottom-bold::before{content:"\F17AA"}.mdi-arrow-right-box::before{content:"\F06C2"}.mdi-arrow-right-circle::before{content:"\F0CDF"}.mdi-arrow-right-circle-outline::before{content:"\F0CE0"}.mdi-arrow-right-drop-circle::before{content:"\F0059"}.mdi-arrow-right-drop-circle-outline::before{content:"\F005A"}.mdi-arrow-right-thick::before{content:"\F0055"}.mdi-arrow-right-thin::before{content:"\F19B0"}.mdi-arrow-right-thin-circle-outline::before{content:"\F1598"}.mdi-arrow-right-top::before{content:"\F17AB"}.mdi-arrow-right-top-bold::before{content:"\F17AC"}.mdi-arrow-split-horizontal::before{content:"\F093B"}.mdi-arrow-split-vertical::before{content:"\F093C"}.mdi-arrow-top-left::before{content:"\F005B"}.mdi-arrow-top-left-bold-box::before{content:"\F1968"}.mdi-arrow-top-left-bold-box-outline::before{content:"\F1969"}.mdi-arrow-top-left-bold-outline::before{content:"\F09C3"}.mdi-arrow-top-left-bottom-right::before{content:"\F0E75"}.mdi-arrow-top-left-bottom-right-bold::before{content:"\F0E76"}.mdi-arrow-top-left-thick::before{content:"\F09C4"}.mdi-arrow-top-left-thin::before{content:"\F19B5"}.mdi-arrow-top-left-thin-circle-outline::before{content:"\F1593"}.mdi-arrow-top-right::before{content:"\F005C"}.mdi-arrow-top-right-bold-box::before{content:"\F196A"}.mdi-arrow-top-right-bold-box-outline::before{content:"\F196B"}.mdi-arrow-top-right-bold-outline::before{content:"\F09C5"}.mdi-arrow-top-right-bottom-left::before{content:"\F0E77"}.mdi-arrow-top-right-bottom-left-bold::before{content:"\F0E78"}.mdi-arrow-top-right-thick::before{content:"\F09C6"}.mdi-arrow-top-right-thin::before{content:"\F19B4"}.mdi-arrow-top-right-thin-circle-outline::before{content:"\F1594"}.mdi-arrow-u-down-left::before{content:"\F17AD"}.mdi-arrow-u-down-left-bold::before{content:"\F17AE"}.mdi-arrow-u-down-right::before{content:"\F17AF"}.mdi-arrow-u-down-right-bold::before{content:"\F17B0"}.mdi-arrow-u-left-bottom::before{content:"\F17B1"}.mdi-arrow-u-left-bottom-bold::before{content:"\F17B2"}.mdi-arrow-u-left-top::before{content:"\F17B3"}.mdi-arrow-u-left-top-bold::before{content:"\F17B4"}.mdi-arrow-u-right-bottom::before{content:"\F17B5"}.mdi-arrow-u-right-bottom-bold::before{content:"\F17B6"}.mdi-arrow-u-right-top::before{content:"\F17B7"}.mdi-arrow-u-right-top-bold::before{content:"\F17B8"}.mdi-arrow-u-up-left::before{content:"\F17B9"}.mdi-arrow-u-up-left-bold::before{content:"\F17BA"}.mdi-arrow-u-up-right::before{content:"\F17BB"}.mdi-arrow-u-up-right-bold::before{content:"\F17BC"}.mdi-arrow-up::before{content:"\F005D"}.mdi-arrow-up-bold::before{content:"\F0737"}.mdi-arrow-up-bold-box::before{content:"\F0738"}.mdi-arrow-up-bold-box-outline::before{content:"\F0739"}.mdi-arrow-up-bold-circle::before{content:"\F005F"}.mdi-arrow-up-bold-circle-outline::before{content:"\F0060"}.mdi-arrow-up-bold-hexagon-outline::before{content:"\F0061"}.mdi-arrow-up-bold-outline::before{content:"\F09C7"}.mdi-arrow-up-box::before{content:"\F06C3"}.mdi-arrow-up-circle::before{content:"\F0CE1"}.mdi-arrow-up-circle-outline::before{content:"\F0CE2"}.mdi-arrow-up-down::before{content:"\F0E79"}.mdi-arrow-up-down-bold::before{content:"\F0E7A"}.mdi-arrow-up-down-bold-outline::before{content:"\F09C8"}.mdi-arrow-up-drop-circle::before{content:"\F0062"}.mdi-arrow-up-drop-circle-outline::before{content:"\F0063"}.mdi-arrow-up-left::before{content:"\F17BD"}.mdi-arrow-up-left-bold::before{content:"\F17BE"}.mdi-arrow-up-right::before{content:"\F17BF"}.mdi-arrow-up-right-bold::before{content:"\F17C0"}.mdi-arrow-up-thick::before{content:"\F005E"}.mdi-arrow-up-thin::before{content:"\F19B2"}.mdi-arrow-up-thin-circle-outline::before{content:"\F1597"}.mdi-arrow-vertical-lock::before{content:"\F115C"}.mdi-artboard::before{content:"\F1B9A"}.mdi-artstation::before{content:"\F0B5B"}.mdi-aspect-ratio::before{content:"\F0A24"}.mdi-assistant::before{content:"\F0064"}.mdi-asterisk::before{content:"\F06C4"}.mdi-asterisk-circle-outline::before{content:"\F1A27"}.mdi-at::before{content:"\F0065"}.mdi-atlassian::before{content:"\F0804"}.mdi-atm::before{content:"\F0D47"}.mdi-atom::before{content:"\F0768"}.mdi-atom-variant::before{content:"\F0E7B"}.mdi-attachment::before{content:"\F0066"}.mdi-attachment-check::before{content:"\F1AC1"}.mdi-attachment-lock::before{content:"\F19C4"}.mdi-attachment-minus::before{content:"\F1AC2"}.mdi-attachment-off::before{content:"\F1AC3"}.mdi-attachment-plus::before{content:"\F1AC4"}.mdi-attachment-remove::before{content:"\F1AC5"}.mdi-atv::before{content:"\F1B70"}.mdi-audio-input-rca::before{content:"\F186B"}.mdi-audio-input-stereo-minijack::before{content:"\F186C"}.mdi-audio-input-xlr::before{content:"\F186D"}.mdi-audio-video::before{content:"\F093D"}.mdi-audio-video-off::before{content:"\F11B6"}.mdi-augmented-reality::before{content:"\F0850"}.mdi-aurora::before{content:"\F1BB9"}.mdi-auto-download::before{content:"\F137E"}.mdi-auto-fix::before{content:"\F0068"}.mdi-auto-mode::before{content:"\F1C20"}.mdi-auto-upload::before{content:"\F0069"}.mdi-autorenew::before{content:"\F006A"}.mdi-autorenew-off::before{content:"\F19E7"}.mdi-av-timer::before{content:"\F006B"}.mdi-awning::before{content:"\F1B87"}.mdi-awning-outline::before{content:"\F1B88"}.mdi-aws::before{content:"\F0E0F"}.mdi-axe::before{content:"\F08C8"}.mdi-axe-battle::before{content:"\F1842"}.mdi-axis::before{content:"\F0D48"}.mdi-axis-arrow::before{content:"\F0D49"}.mdi-axis-arrow-info::before{content:"\F140E"}.mdi-axis-arrow-lock::before{content:"\F0D4A"}.mdi-axis-lock::before{content:"\F0D4B"}.mdi-axis-x-arrow::before{content:"\F0D4C"}.mdi-axis-x-arrow-lock::before{content:"\F0D4D"}.mdi-axis-x-rotate-clockwise::before{content:"\F0D4E"}.mdi-axis-x-rotate-counterclockwise::before{content:"\F0D4F"}.mdi-axis-x-y-arrow-lock::before{content:"\F0D50"}.mdi-axis-y-arrow::before{content:"\F0D51"}.mdi-axis-y-arrow-lock::before{content:"\F0D52"}.mdi-axis-y-rotate-clockwise::before{content:"\F0D53"}.mdi-axis-y-rotate-counterclockwise::before{content:"\F0D54"}.mdi-axis-z-arrow::before{content:"\F0D55"}.mdi-axis-z-arrow-lock::before{content:"\F0D56"}.mdi-axis-z-rotate-clockwise::before{content:"\F0D57"}.mdi-axis-z-rotate-counterclockwise::before{content:"\F0D58"}.mdi-babel::before{content:"\F0A25"}.mdi-baby::before{content:"\F006C"}.mdi-baby-bottle::before{content:"\F0F39"}.mdi-baby-bottle-outline::before{content:"\F0F3A"}.mdi-baby-buggy::before{content:"\F13E0"}.mdi-baby-buggy-off::before{content:"\F1AF3"}.mdi-baby-carriage::before{content:"\F068F"}.mdi-baby-carriage-off::before{content:"\F0FA0"}.mdi-baby-face::before{content:"\F0E7C"}.mdi-baby-face-outline::before{content:"\F0E7D"}.mdi-backburger::before{content:"\F006D"}.mdi-backspace::before{content:"\F006E"}.mdi-backspace-outline::before{content:"\F0B5C"}.mdi-backspace-reverse::before{content:"\F0E7E"}.mdi-backspace-reverse-outline::before{content:"\F0E7F"}.mdi-backup-restore::before{content:"\F006F"}.mdi-bacteria::before{content:"\F0ED5"}.mdi-bacteria-outline::before{content:"\F0ED6"}.mdi-badge-account::before{content:"\F0DA7"}.mdi-badge-account-alert::before{content:"\F0DA8"}.mdi-badge-account-alert-outline::before{content:"\F0DA9"}.mdi-badge-account-horizontal::before{content:"\F0E0D"}.mdi-badge-account-horizontal-outline::before{content:"\F0E0E"}.mdi-badge-account-outline::before{content:"\F0DAA"}.mdi-badminton::before{content:"\F0851"}.mdi-bag-carry-on::before{content:"\F0F3B"}.mdi-bag-carry-on-check::before{content:"\F0D65"}.mdi-bag-carry-on-off::before{content:"\F0F3C"}.mdi-bag-checked::before{content:"\F0F3D"}.mdi-bag-personal::before{content:"\F0E10"}.mdi-bag-personal-off::before{content:"\F0E11"}.mdi-bag-personal-off-outline::before{content:"\F0E12"}.mdi-bag-personal-outline::before{content:"\F0E13"}.mdi-bag-personal-plus::before{content:"\F1CA4"}.mdi-bag-personal-plus-outline::before{content:"\F1CA5"}.mdi-bag-personal-tag::before{content:"\F1B0C"}.mdi-bag-personal-tag-outline::before{content:"\F1B0D"}.mdi-bag-suitcase::before{content:"\F158B"}.mdi-bag-suitcase-off::before{content:"\F158D"}.mdi-bag-suitcase-off-outline::before{content:"\F158E"}.mdi-bag-suitcase-outline::before{content:"\F158C"}.mdi-baguette::before{content:"\F0F3E"}.mdi-balcony::before{content:"\F1817"}.mdi-balloon::before{content:"\F0A26"}.mdi-ballot::before{content:"\F09C9"}.mdi-ballot-outline::before{content:"\F09CA"}.mdi-ballot-recount::before{content:"\F0C39"}.mdi-ballot-recount-outline::before{content:"\F0C3A"}.mdi-bandage::before{content:"\F0DAF"}.mdi-bank::before{content:"\F0070"}.mdi-bank-check::before{content:"\F1655"}.mdi-bank-circle::before{content:"\F1C03"}.mdi-bank-circle-outline::before{content:"\F1C04"}.mdi-bank-minus::before{content:"\F0DB0"}.mdi-bank-off::before{content:"\F1656"}.mdi-bank-off-outline::before{content:"\F1657"}.mdi-bank-outline::before{content:"\F0E80"}.mdi-bank-plus::before{content:"\F0DB1"}.mdi-bank-remove::before{content:"\F0DB2"}.mdi-bank-transfer::before{content:"\F0A27"}.mdi-bank-transfer-in::before{content:"\F0A28"}.mdi-bank-transfer-out::before{content:"\F0A29"}.mdi-barcode::before{content:"\F0071"}.mdi-barcode-off::before{content:"\F1236"}.mdi-barcode-scan::before{content:"\F0072"}.mdi-barley::before{content:"\F0073"}.mdi-barley-off::before{content:"\F0B5D"}.mdi-barn::before{content:"\F0B5E"}.mdi-barrel::before{content:"\F0074"}.mdi-barrel-outline::before{content:"\F1A28"}.mdi-baseball::before{content:"\F0852"}.mdi-baseball-bat::before{content:"\F0853"}.mdi-baseball-diamond::before{content:"\F15EC"}.mdi-baseball-diamond-outline::before{content:"\F15ED"}.mdi-baseball-outline::before{content:"\F1C5A"}.mdi-bash::before{content:"\F1183"}.mdi-basket::before{content:"\F0076"}.mdi-basket-check::before{content:"\F18E5"}.mdi-basket-check-outline::before{content:"\F18E6"}.mdi-basket-fill::before{content:"\F0077"}.mdi-basket-minus::before{content:"\F1523"}.mdi-basket-minus-outline::before{content:"\F1524"}.mdi-basket-off::before{content:"\F1525"}.mdi-basket-off-outline::before{content:"\F1526"}.mdi-basket-outline::before{content:"\F1181"}.mdi-basket-plus::before{content:"\F1527"}.mdi-basket-plus-outline::before{content:"\F1528"}.mdi-basket-remove::before{content:"\F1529"}.mdi-basket-remove-outline::before{content:"\F152A"}.mdi-basket-unfill::before{content:"\F0078"}.mdi-basketball::before{content:"\F0806"}.mdi-basketball-hoop::before{content:"\F0C3B"}.mdi-basketball-hoop-outline::before{content:"\F0C3C"}.mdi-bat::before{content:"\F0B5F"}.mdi-bathtub::before{content:"\F1818"}.mdi-bathtub-outline::before{content:"\F1819"}.mdi-battery::before{content:"\F0079"}.mdi-battery-10::before{content:"\F007A"}.mdi-battery-10-bluetooth::before{content:"\F093E"}.mdi-battery-20::before{content:"\F007B"}.mdi-battery-20-bluetooth::before{content:"\F093F"}.mdi-battery-30::before{content:"\F007C"}.mdi-battery-30-bluetooth::before{content:"\F0940"}.mdi-battery-40::before{content:"\F007D"}.mdi-battery-40-bluetooth::before{content:"\F0941"}.mdi-battery-50::before{content:"\F007E"}.mdi-battery-50-bluetooth::before{content:"\F0942"}.mdi-battery-60::before{content:"\F007F"}.mdi-battery-60-bluetooth::before{content:"\F0943"}.mdi-battery-70::before{content:"\F0080"}.mdi-battery-70-bluetooth::before{content:"\F0944"}.mdi-battery-80::before{content:"\F0081"}.mdi-battery-80-bluetooth::before{content:"\F0945"}.mdi-battery-90::before{content:"\F0082"}.mdi-battery-90-bluetooth::before{content:"\F0946"}.mdi-battery-alert::before{content:"\F0083"}.mdi-battery-alert-bluetooth::before{content:"\F0947"}.mdi-battery-alert-variant::before{content:"\F10CC"}.mdi-battery-alert-variant-outline::before{content:"\F10CD"}.mdi-battery-arrow-down::before{content:"\F17DE"}.mdi-battery-arrow-down-outline::before{content:"\F17DF"}.mdi-battery-arrow-up::before{content:"\F17E0"}.mdi-battery-arrow-up-outline::before{content:"\F17E1"}.mdi-battery-bluetooth::before{content:"\F0948"}.mdi-battery-bluetooth-variant::before{content:"\F0949"}.mdi-battery-charging::before{content:"\F0084"}.mdi-battery-charging-10::before{content:"\F089C"}.mdi-battery-charging-100::before{content:"\F0085"}.mdi-battery-charging-20::before{content:"\F0086"}.mdi-battery-charging-30::before{content:"\F0087"}.mdi-battery-charging-40::before{content:"\F0088"}.mdi-battery-charging-50::before{content:"\F089D"}.mdi-battery-charging-60::before{content:"\F0089"}.mdi-battery-charging-70::before{content:"\F089E"}.mdi-battery-charging-80::before{content:"\F008A"}.mdi-battery-charging-90::before{content:"\F008B"}.mdi-battery-charging-high::before{content:"\F12A6"}.mdi-battery-charging-low::before{content:"\F12A4"}.mdi-battery-charging-medium::before{content:"\F12A5"}.mdi-battery-charging-outline::before{content:"\F089F"}.mdi-battery-charging-wireless::before{content:"\F0807"}.mdi-battery-charging-wireless-10::before{content:"\F0808"}.mdi-battery-charging-wireless-20::before{content:"\F0809"}.mdi-battery-charging-wireless-30::before{content:"\F080A"}.mdi-battery-charging-wireless-40::before{content:"\F080B"}.mdi-battery-charging-wireless-50::before{content:"\F080C"}.mdi-battery-charging-wireless-60::before{content:"\F080D"}.mdi-battery-charging-wireless-70::before{content:"\F080E"}.mdi-battery-charging-wireless-80::before{content:"\F080F"}.mdi-battery-charging-wireless-90::before{content:"\F0810"}.mdi-battery-charging-wireless-alert::before{content:"\F0811"}.mdi-battery-charging-wireless-outline::before{content:"\F0812"}.mdi-battery-check::before{content:"\F17E2"}.mdi-battery-check-outline::before{content:"\F17E3"}.mdi-battery-clock::before{content:"\F19E5"}.mdi-battery-clock-outline::before{content:"\F19E6"}.mdi-battery-heart::before{content:"\F120F"}.mdi-battery-heart-outline::before{content:"\F1210"}.mdi-battery-heart-variant::before{content:"\F1211"}.mdi-battery-high::before{content:"\F12A3"}.mdi-battery-lock::before{content:"\F179C"}.mdi-battery-lock-open::before{content:"\F179D"}.mdi-battery-low::before{content:"\F12A1"}.mdi-battery-medium::before{content:"\F12A2"}.mdi-battery-minus::before{content:"\F17E4"}.mdi-battery-minus-outline::before{content:"\F17E5"}.mdi-battery-minus-variant::before{content:"\F008C"}.mdi-battery-negative::before{content:"\F008D"}.mdi-battery-off::before{content:"\F125D"}.mdi-battery-off-outline::before{content:"\F125E"}.mdi-battery-outline::before{content:"\F008E"}.mdi-battery-plus::before{content:"\F17E6"}.mdi-battery-plus-outline::before{content:"\F17E7"}.mdi-battery-plus-variant::before{content:"\F008F"}.mdi-battery-positive::before{content:"\F0090"}.mdi-battery-remove::before{content:"\F17E8"}.mdi-battery-remove-outline::before{content:"\F17E9"}.mdi-battery-sync::before{content:"\F1834"}.mdi-battery-sync-outline::before{content:"\F1835"}.mdi-battery-unknown::before{content:"\F0091"}.mdi-battery-unknown-bluetooth::before{content:"\F094A"}.mdi-beach::before{content:"\F0092"}.mdi-beaker::before{content:"\F0CEA"}.mdi-beaker-alert::before{content:"\F1229"}.mdi-beaker-alert-outline::before{content:"\F122A"}.mdi-beaker-check::before{content:"\F122B"}.mdi-beaker-check-outline::before{content:"\F122C"}.mdi-beaker-minus::before{content:"\F122D"}.mdi-beaker-minus-outline::before{content:"\F122E"}.mdi-beaker-outline::before{content:"\F0690"}.mdi-beaker-plus::before{content:"\F122F"}.mdi-beaker-plus-outline::before{content:"\F1230"}.mdi-beaker-question::before{content:"\F1231"}.mdi-beaker-question-outline::before{content:"\F1232"}.mdi-beaker-remove::before{content:"\F1233"}.mdi-beaker-remove-outline::before{content:"\F1234"}.mdi-bed::before{content:"\F02E3"}.mdi-bed-clock::before{content:"\F1B94"}.mdi-bed-double::before{content:"\F0FD4"}.mdi-bed-double-outline::before{content:"\F0FD3"}.mdi-bed-empty::before{content:"\F08A0"}.mdi-bed-king::before{content:"\F0FD2"}.mdi-bed-king-outline::before{content:"\F0FD1"}.mdi-bed-outline::before{content:"\F0099"}.mdi-bed-queen::before{content:"\F0FD0"}.mdi-bed-queen-outline::before{content:"\F0FDB"}.mdi-bed-single::before{content:"\F106D"}.mdi-bed-single-outline::before{content:"\F106E"}.mdi-bee::before{content:"\F0FA1"}.mdi-bee-flower::before{content:"\F0FA2"}.mdi-beehive-off-outline::before{content:"\F13ED"}.mdi-beehive-outline::before{content:"\F10CE"}.mdi-beekeeper::before{content:"\F14E2"}.mdi-beer::before{content:"\F0098"}.mdi-beer-outline::before{content:"\F130C"}.mdi-bell::before{content:"\F009A"}.mdi-bell-alert::before{content:"\F0D59"}.mdi-bell-alert-outline::before{content:"\F0E81"}.mdi-bell-badge::before{content:"\F116B"}.mdi-bell-badge-outline::before{content:"\F0178"}.mdi-bell-cancel::before{content:"\F13E7"}.mdi-bell-cancel-outline::before{content:"\F13E8"}.mdi-bell-check::before{content:"\F11E5"}.mdi-bell-check-outline::before{content:"\F11E6"}.mdi-bell-circle::before{content:"\F0D5A"}.mdi-bell-circle-outline::before{content:"\F0D5B"}.mdi-bell-cog::before{content:"\F1A29"}.mdi-bell-cog-outline::before{content:"\F1A2A"}.mdi-bell-minus::before{content:"\F13E9"}.mdi-bell-minus-outline::before{content:"\F13EA"}.mdi-bell-off::before{content:"\F009B"}.mdi-bell-off-outline::before{content:"\F0A91"}.mdi-bell-outline::before{content:"\F009C"}.mdi-bell-plus::before{content:"\F009D"}.mdi-bell-plus-outline::before{content:"\F0A92"}.mdi-bell-remove::before{content:"\F13EB"}.mdi-bell-remove-outline::before{content:"\F13EC"}.mdi-bell-ring::before{content:"\F009E"}.mdi-bell-ring-outline::before{content:"\F009F"}.mdi-bell-sleep::before{content:"\F00A0"}.mdi-bell-sleep-outline::before{content:"\F0A93"}.mdi-bench::before{content:"\F1C21"}.mdi-bench-back::before{content:"\F1C22"}.mdi-beta::before{content:"\F00A1"}.mdi-betamax::before{content:"\F09CB"}.mdi-biathlon::before{content:"\F0E14"}.mdi-bicycle::before{content:"\F109C"}.mdi-bicycle-basket::before{content:"\F1235"}.mdi-bicycle-cargo::before{content:"\F189C"}.mdi-bicycle-electric::before{content:"\F15B4"}.mdi-bicycle-penny-farthing::before{content:"\F15E9"}.mdi-bike::before{content:"\F00A3"}.mdi-bike-fast::before{content:"\F111F"}.mdi-bike-pedal::before{content:"\F1C23"}.mdi-bike-pedal-clipless::before{content:"\F1C24"}.mdi-bike-pedal-mountain::before{content:"\F1C25"}.mdi-billboard::before{content:"\F1010"}.mdi-billiards::before{content:"\F0B61"}.mdi-billiards-rack::before{content:"\F0B62"}.mdi-binoculars::before{content:"\F00A5"}.mdi-bio::before{content:"\F00A6"}.mdi-biohazard::before{content:"\F00A7"}.mdi-bird::before{content:"\F15C6"}.mdi-bitbucket::before{content:"\F00A8"}.mdi-bitcoin::before{content:"\F0813"}.mdi-black-mesa::before{content:"\F00A9"}.mdi-blender::before{content:"\F0CEB"}.mdi-blender-outline::before{content:"\F181A"}.mdi-blender-software::before{content:"\F00AB"}.mdi-blinds::before{content:"\F00AC"}.mdi-blinds-horizontal::before{content:"\F1A2B"}.mdi-blinds-horizontal-closed::before{content:"\F1A2C"}.mdi-blinds-open::before{content:"\F1011"}.mdi-blinds-vertical::before{content:"\F1A2D"}.mdi-blinds-vertical-closed::before{content:"\F1A2E"}.mdi-block-helper::before{content:"\F00AD"}.mdi-blood-bag::before{content:"\F0CEC"}.mdi-bluetooth::before{content:"\F00AF"}.mdi-bluetooth-audio::before{content:"\F00B0"}.mdi-bluetooth-connect::before{content:"\F00B1"}.mdi-bluetooth-off::before{content:"\F00B2"}.mdi-bluetooth-settings::before{content:"\F00B3"}.mdi-bluetooth-transfer::before{content:"\F00B4"}.mdi-blur::before{content:"\F00B5"}.mdi-blur-linear::before{content:"\F00B6"}.mdi-blur-off::before{content:"\F00B7"}.mdi-blur-radial::before{content:"\F00B8"}.mdi-bolt::before{content:"\F0DB3"}.mdi-bomb::before{content:"\F0691"}.mdi-bomb-off::before{content:"\F06C5"}.mdi-bone::before{content:"\F00B9"}.mdi-bone-off::before{content:"\F19E0"}.mdi-book::before{content:"\F00BA"}.mdi-book-account::before{content:"\F13AD"}.mdi-book-account-outline::before{content:"\F13AE"}.mdi-book-alert::before{content:"\F167C"}.mdi-book-alert-outline::before{content:"\F167D"}.mdi-book-alphabet::before{content:"\F061D"}.mdi-book-arrow-down::before{content:"\F167E"}.mdi-book-arrow-down-outline::before{content:"\F167F"}.mdi-book-arrow-left::before{content:"\F1680"}.mdi-book-arrow-left-outline::before{content:"\F1681"}.mdi-book-arrow-right::before{content:"\F1682"}.mdi-book-arrow-right-outline::before{content:"\F1683"}.mdi-book-arrow-up::before{content:"\F1684"}.mdi-book-arrow-up-outline::before{content:"\F1685"}.mdi-book-cancel::before{content:"\F1686"}.mdi-book-cancel-outline::before{content:"\F1687"}.mdi-book-check::before{content:"\F14F3"}.mdi-book-check-outline::before{content:"\F14F4"}.mdi-book-clock::before{content:"\F1688"}.mdi-book-clock-outline::before{content:"\F1689"}.mdi-book-cog::before{content:"\F168A"}.mdi-book-cog-outline::before{content:"\F168B"}.mdi-book-cross::before{content:"\F00A2"}.mdi-book-edit::before{content:"\F168C"}.mdi-book-edit-outline::before{content:"\F168D"}.mdi-book-education::before{content:"\F16C9"}.mdi-book-education-outline::before{content:"\F16CA"}.mdi-book-heart::before{content:"\F1A1D"}.mdi-book-heart-outline::before{content:"\F1A1E"}.mdi-book-information-variant::before{content:"\F106F"}.mdi-book-lock::before{content:"\F079A"}.mdi-book-lock-open::before{content:"\F079B"}.mdi-book-lock-open-outline::before{content:"\F168E"}.mdi-book-lock-outline::before{content:"\F168F"}.mdi-book-marker::before{content:"\F1690"}.mdi-book-marker-outline::before{content:"\F1691"}.mdi-book-minus::before{content:"\F05D9"}.mdi-book-minus-multiple::before{content:"\F0A94"}.mdi-book-minus-multiple-outline::before{content:"\F090B"}.mdi-book-minus-outline::before{content:"\F1692"}.mdi-book-multiple::before{content:"\F00BB"}.mdi-book-multiple-outline::before{content:"\F0436"}.mdi-book-music::before{content:"\F0067"}.mdi-book-music-outline::before{content:"\F1693"}.mdi-book-off::before{content:"\F1694"}.mdi-book-off-outline::before{content:"\F1695"}.mdi-book-open::before{content:"\F00BD"}.mdi-book-open-blank-variant::before{content:"\F00BE"}.mdi-book-open-blank-variant-outline::before{content:"\F1CCB"}.mdi-book-open-outline::before{content:"\F0B63"}.mdi-book-open-page-variant::before{content:"\F05DA"}.mdi-book-open-page-variant-outline::before{content:"\F15D6"}.mdi-book-open-variant::before{content:"\F14F7"}.mdi-book-open-variant-outline::before{content:"\F1CCC"}.mdi-book-outline::before{content:"\F0B64"}.mdi-book-play::before{content:"\F0E82"}.mdi-book-play-outline::before{content:"\F0E83"}.mdi-book-plus::before{content:"\F05DB"}.mdi-book-plus-multiple::before{content:"\F0A95"}.mdi-book-plus-multiple-outline::before{content:"\F0ADE"}.mdi-book-plus-outline::before{content:"\F1696"}.mdi-book-refresh::before{content:"\F1697"}.mdi-book-refresh-outline::before{content:"\F1698"}.mdi-book-remove::before{content:"\F0A97"}.mdi-book-remove-multiple::before{content:"\F0A96"}.mdi-book-remove-multiple-outline::before{content:"\F04CA"}.mdi-book-remove-outline::before{content:"\F1699"}.mdi-book-search::before{content:"\F0E84"}.mdi-book-search-outline::before{content:"\F0E85"}.mdi-book-settings::before{content:"\F169A"}.mdi-book-settings-outline::before{content:"\F169B"}.mdi-book-sync::before{content:"\F169C"}.mdi-book-sync-outline::before{content:"\F16C8"}.mdi-book-variant::before{content:"\F00BF"}.mdi-bookmark::before{content:"\F00C0"}.mdi-bookmark-box::before{content:"\F1B75"}.mdi-bookmark-box-multiple::before{content:"\F196C"}.mdi-bookmark-box-multiple-outline::before{content:"\F196D"}.mdi-bookmark-box-outline::before{content:"\F1B76"}.mdi-bookmark-check::before{content:"\F00C1"}.mdi-bookmark-check-outline::before{content:"\F137B"}.mdi-bookmark-minus::before{content:"\F09CC"}.mdi-bookmark-minus-outline::before{content:"\F09CD"}.mdi-bookmark-multiple::before{content:"\F0E15"}.mdi-bookmark-multiple-outline::before{content:"\F0E16"}.mdi-bookmark-music::before{content:"\F00C2"}.mdi-bookmark-music-outline::before{content:"\F1379"}.mdi-bookmark-off::before{content:"\F09CE"}.mdi-bookmark-off-outline::before{content:"\F09CF"}.mdi-bookmark-outline::before{content:"\F00C3"}.mdi-bookmark-plus::before{content:"\F00C5"}.mdi-bookmark-plus-outline::before{content:"\F00C4"}.mdi-bookmark-remove::before{content:"\F00C6"}.mdi-bookmark-remove-outline::before{content:"\F137A"}.mdi-bookshelf::before{content:"\F125F"}.mdi-boom-gate::before{content:"\F0E86"}.mdi-boom-gate-alert::before{content:"\F0E87"}.mdi-boom-gate-alert-outline::before{content:"\F0E88"}.mdi-boom-gate-arrow-down::before{content:"\F0E89"}.mdi-boom-gate-arrow-down-outline::before{content:"\F0E8A"}.mdi-boom-gate-arrow-up::before{content:"\F0E8C"}.mdi-boom-gate-arrow-up-outline::before{content:"\F0E8D"}.mdi-boom-gate-outline::before{content:"\F0E8B"}.mdi-boom-gate-up::before{content:"\F17F9"}.mdi-boom-gate-up-outline::before{content:"\F17FA"}.mdi-boombox::before{content:"\F05DC"}.mdi-boomerang::before{content:"\F10CF"}.mdi-bootstrap::before{content:"\F06C6"}.mdi-border-all::before{content:"\F00C7"}.mdi-border-all-variant::before{content:"\F08A1"}.mdi-border-bottom::before{content:"\F00C8"}.mdi-border-bottom-variant::before{content:"\F08A2"}.mdi-border-color::before{content:"\F00C9"}.mdi-border-horizontal::before{content:"\F00CA"}.mdi-border-inside::before{content:"\F00CB"}.mdi-border-left::before{content:"\F00CC"}.mdi-border-left-variant::before{content:"\F08A3"}.mdi-border-none::before{content:"\F00CD"}.mdi-border-none-variant::before{content:"\F08A4"}.mdi-border-outside::before{content:"\F00CE"}.mdi-border-radius::before{content:"\F1AF4"}.mdi-border-right::before{content:"\F00CF"}.mdi-border-right-variant::before{content:"\F08A5"}.mdi-border-style::before{content:"\F00D0"}.mdi-border-top::before{content:"\F00D1"}.mdi-border-top-variant::before{content:"\F08A6"}.mdi-border-vertical::before{content:"\F00D2"}.mdi-bottle-soda::before{content:"\F1070"}.mdi-bottle-soda-classic::before{content:"\F1071"}.mdi-bottle-soda-classic-outline::before{content:"\F1363"}.mdi-bottle-soda-outline::before{content:"\F1072"}.mdi-bottle-tonic::before{content:"\F112E"}.mdi-bottle-tonic-outline::before{content:"\F112F"}.mdi-bottle-tonic-plus::before{content:"\F1130"}.mdi-bottle-tonic-plus-outline::before{content:"\F1131"}.mdi-bottle-tonic-skull::before{content:"\F1132"}.mdi-bottle-tonic-skull-outline::before{content:"\F1133"}.mdi-bottle-wine::before{content:"\F0854"}.mdi-bottle-wine-outline::before{content:"\F1310"}.mdi-bow-arrow::before{content:"\F1841"}.mdi-bow-tie::before{content:"\F0678"}.mdi-bowl::before{content:"\F028E"}.mdi-bowl-mix::before{content:"\F0617"}.mdi-bowl-mix-outline::before{content:"\F02E4"}.mdi-bowl-outline::before{content:"\F02A9"}.mdi-bowling::before{content:"\F00D3"}.mdi-box::before{content:"\F00D4"}.mdi-box-cutter::before{content:"\F00D5"}.mdi-box-cutter-off::before{content:"\F0B4A"}.mdi-box-shadow::before{content:"\F0637"}.mdi-boxing-glove::before{content:"\F0B65"}.mdi-braille::before{content:"\F09D0"}.mdi-brain::before{content:"\F09D1"}.mdi-bread-slice::before{content:"\F0CEE"}.mdi-bread-slice-outline::before{content:"\F0CEF"}.mdi-bridge::before{content:"\F0618"}.mdi-briefcase::before{content:"\F00D6"}.mdi-briefcase-account::before{content:"\F0CF0"}.mdi-briefcase-account-outline::before{content:"\F0CF1"}.mdi-briefcase-arrow-left-right::before{content:"\F1A8D"}.mdi-briefcase-arrow-left-right-outline::before{content:"\F1A8E"}.mdi-briefcase-arrow-up-down::before{content:"\F1A8F"}.mdi-briefcase-arrow-up-down-outline::before{content:"\F1A90"}.mdi-briefcase-check::before{content:"\F00D7"}.mdi-briefcase-check-outline::before{content:"\F131E"}.mdi-briefcase-clock::before{content:"\F10D0"}.mdi-briefcase-clock-outline::before{content:"\F10D1"}.mdi-briefcase-download::before{content:"\F00D8"}.mdi-briefcase-download-outline::before{content:"\F0C3D"}.mdi-briefcase-edit::before{content:"\F0A98"}.mdi-briefcase-edit-outline::before{content:"\F0C3E"}.mdi-briefcase-eye::before{content:"\F17D9"}.mdi-briefcase-eye-outline::before{content:"\F17DA"}.mdi-briefcase-minus::before{content:"\F0A2A"}.mdi-briefcase-minus-outline::before{content:"\F0C3F"}.mdi-briefcase-off::before{content:"\F1658"}.mdi-briefcase-off-outline::before{content:"\F1659"}.mdi-briefcase-outline::before{content:"\F0814"}.mdi-briefcase-plus::before{content:"\F0A2B"}.mdi-briefcase-plus-outline::before{content:"\F0C40"}.mdi-briefcase-remove::before{content:"\F0A2C"}.mdi-briefcase-remove-outline::before{content:"\F0C41"}.mdi-briefcase-search::before{content:"\F0A2D"}.mdi-briefcase-search-outline::before{content:"\F0C42"}.mdi-briefcase-upload::before{content:"\F00D9"}.mdi-briefcase-upload-outline::before{content:"\F0C43"}.mdi-briefcase-variant::before{content:"\F1494"}.mdi-briefcase-variant-off::before{content:"\F165A"}.mdi-briefcase-variant-off-outline::before{content:"\F165B"}.mdi-briefcase-variant-outline::before{content:"\F1495"}.mdi-brightness-1::before{content:"\F00DA"}.mdi-brightness-2::before{content:"\F00DB"}.mdi-brightness-3::before{content:"\F00DC"}.mdi-brightness-4::before{content:"\F00DD"}.mdi-brightness-5::before{content:"\F00DE"}.mdi-brightness-6::before{content:"\F00DF"}.mdi-brightness-7::before{content:"\F00E0"}.mdi-brightness-auto::before{content:"\F00E1"}.mdi-brightness-percent::before{content:"\F0CF2"}.mdi-broadcast::before{content:"\F1720"}.mdi-broadcast-off::before{content:"\F1721"}.mdi-broom::before{content:"\F00E2"}.mdi-brush::before{content:"\F00E3"}.mdi-brush-off::before{content:"\F1771"}.mdi-brush-outline::before{content:"\F1A0D"}.mdi-brush-variant::before{content:"\F1813"}.mdi-bucket::before{content:"\F1415"}.mdi-bucket-outline::before{content:"\F1416"}.mdi-buffet::before{content:"\F0578"}.mdi-bug::before{content:"\F00E4"}.mdi-bug-check::before{content:"\F0A2E"}.mdi-bug-check-outline::before{content:"\F0A2F"}.mdi-bug-outline::before{content:"\F0A30"}.mdi-bug-pause::before{content:"\F1AF5"}.mdi-bug-pause-outline::before{content:"\F1AF6"}.mdi-bug-play::before{content:"\F1AF7"}.mdi-bug-play-outline::before{content:"\F1AF8"}.mdi-bug-stop::before{content:"\F1AF9"}.mdi-bug-stop-outline::before{content:"\F1AFA"}.mdi-bugle::before{content:"\F0DB4"}.mdi-bulkhead-light::before{content:"\F1A2F"}.mdi-bulldozer::before{content:"\F0B22"}.mdi-bullet::before{content:"\F0CF3"}.mdi-bulletin-board::before{content:"\F00E5"}.mdi-bullhorn::before{content:"\F00E6"}.mdi-bullhorn-outline::before{content:"\F0B23"}.mdi-bullhorn-variant::before{content:"\F196E"}.mdi-bullhorn-variant-outline::before{content:"\F196F"}.mdi-bullseye::before{content:"\F05DD"}.mdi-bullseye-arrow::before{content:"\F08C9"}.mdi-bulma::before{content:"\F12E7"}.mdi-bunk-bed::before{content:"\F1302"}.mdi-bunk-bed-outline::before{content:"\F0097"}.mdi-bus::before{content:"\F00E7"}.mdi-bus-alert::before{content:"\F0A99"}.mdi-bus-articulated-end::before{content:"\F079C"}.mdi-bus-articulated-front::before{content:"\F079D"}.mdi-bus-clock::before{content:"\F08CA"}.mdi-bus-double-decker::before{content:"\F079E"}.mdi-bus-electric::before{content:"\F191D"}.mdi-bus-marker::before{content:"\F1212"}.mdi-bus-multiple::before{content:"\F0F3F"}.mdi-bus-school::before{content:"\F079F"}.mdi-bus-side::before{content:"\F07A0"}.mdi-bus-sign::before{content:"\F1CC1"}.mdi-bus-stop::before{content:"\F1012"}.mdi-bus-stop-covered::before{content:"\F1013"}.mdi-bus-stop-uncovered::before{content:"\F1014"}.mdi-bus-wrench::before{content:"\F1CC2"}.mdi-butterfly::before{content:"\F1589"}.mdi-butterfly-outline::before{content:"\F158A"}.mdi-button-cursor::before{content:"\F1B4F"}.mdi-button-pointer::before{content:"\F1B50"}.mdi-cabin-a-frame::before{content:"\F188C"}.mdi-cable-data::before{content:"\F1394"}.mdi-cached::before{content:"\F00E8"}.mdi-cactus::before{content:"\F0DB5"}.mdi-cake::before{content:"\F00E9"}.mdi-cake-layered::before{content:"\F00EA"}.mdi-cake-variant::before{content:"\F00EB"}.mdi-cake-variant-outline::before{content:"\F17F0"}.mdi-calculator::before{content:"\F00EC"}.mdi-calculator-variant::before{content:"\F0A9A"}.mdi-calculator-variant-outline::before{content:"\F15A6"}.mdi-calendar::before{content:"\F00ED"}.mdi-calendar-account::before{content:"\F0ED7"}.mdi-calendar-account-outline::before{content:"\F0ED8"}.mdi-calendar-alert::before{content:"\F0A31"}.mdi-calendar-alert-outline::before{content:"\F1B62"}.mdi-calendar-arrow-left::before{content:"\F1134"}.mdi-calendar-arrow-right::before{content:"\F1135"}.mdi-calendar-badge::before{content:"\F1B9D"}.mdi-calendar-badge-outline::before{content:"\F1B9E"}.mdi-calendar-blank::before{content:"\F00EE"}.mdi-calendar-blank-multiple::before{content:"\F1073"}.mdi-calendar-blank-outline::before{content:"\F0B66"}.mdi-calendar-check::before{content:"\F00EF"}.mdi-calendar-check-outline::before{content:"\F0C44"}.mdi-calendar-clock::before{content:"\F00F0"}.mdi-calendar-clock-outline::before{content:"\F16E1"}.mdi-calendar-collapse-horizontal::before{content:"\F189D"}.mdi-calendar-collapse-horizontal-outline::before{content:"\F1B63"}.mdi-calendar-cursor::before{content:"\F157B"}.mdi-calendar-cursor-outline::before{content:"\F1B64"}.mdi-calendar-edit::before{content:"\F08A7"}.mdi-calendar-edit-outline::before{content:"\F1B65"}.mdi-calendar-end::before{content:"\F166C"}.mdi-calendar-end-outline::before{content:"\F1B66"}.mdi-calendar-expand-horizontal::before{content:"\F189E"}.mdi-calendar-expand-horizontal-outline::before{content:"\F1B67"}.mdi-calendar-export::before{content:"\F0B24"}.mdi-calendar-export-outline::before{content:"\F1B68"}.mdi-calendar-filter::before{content:"\F1A32"}.mdi-calendar-filter-outline::before{content:"\F1A33"}.mdi-calendar-heart::before{content:"\F09D2"}.mdi-calendar-heart-outline::before{content:"\F1B69"}.mdi-calendar-import::before{content:"\F0B25"}.mdi-calendar-import-outline::before{content:"\F1B6A"}.mdi-calendar-lock::before{content:"\F1641"}.mdi-calendar-lock-open::before{content:"\F1B5B"}.mdi-calendar-lock-open-outline::before{content:"\F1B5C"}.mdi-calendar-lock-outline::before{content:"\F1642"}.mdi-calendar-minus::before{content:"\F0D5C"}.mdi-calendar-minus-outline::before{content:"\F1B6B"}.mdi-calendar-month::before{content:"\F0E17"}.mdi-calendar-month-outline::before{content:"\F0E18"}.mdi-calendar-multiple::before{content:"\F00F1"}.mdi-calendar-multiple-check::before{content:"\F00F2"}.mdi-calendar-multiselect::before{content:"\F0A32"}.mdi-calendar-multiselect-outline::before{content:"\F1B55"}.mdi-calendar-outline::before{content:"\F0B67"}.mdi-calendar-plus::before{content:"\F00F3"}.mdi-calendar-plus-outline::before{content:"\F1B6C"}.mdi-calendar-question::before{content:"\F0692"}.mdi-calendar-question-outline::before{content:"\F1B6D"}.mdi-calendar-range::before{content:"\F0679"}.mdi-calendar-range-outline::before{content:"\F0B68"}.mdi-calendar-refresh::before{content:"\F01E1"}.mdi-calendar-refresh-outline::before{content:"\F0203"}.mdi-calendar-remove::before{content:"\F00F4"}.mdi-calendar-remove-outline::before{content:"\F0C45"}.mdi-calendar-search::before{content:"\F094C"}.mdi-calendar-search-outline::before{content:"\F1B6E"}.mdi-calendar-star::before{content:"\F09D3"}.mdi-calendar-star-four-points::before{content:"\F1C1F"}.mdi-calendar-star-outline::before{content:"\F1B53"}.mdi-calendar-start::before{content:"\F166D"}.mdi-calendar-start-outline::before{content:"\F1B6F"}.mdi-calendar-sync::before{content:"\F0E8E"}.mdi-calendar-sync-outline::before{content:"\F0E8F"}.mdi-calendar-text::before{content:"\F00F5"}.mdi-calendar-text-outline::before{content:"\F0C46"}.mdi-calendar-today::before{content:"\F00F6"}.mdi-calendar-today-outline::before{content:"\F1A30"}.mdi-calendar-week::before{content:"\F0A33"}.mdi-calendar-week-begin::before{content:"\F0A34"}.mdi-calendar-week-begin-outline::before{content:"\F1A31"}.mdi-calendar-week-outline::before{content:"\F1A34"}.mdi-calendar-weekend::before{content:"\F0ED9"}.mdi-calendar-weekend-outline::before{content:"\F0EDA"}.mdi-call-made::before{content:"\F00F7"}.mdi-call-merge::before{content:"\F00F8"}.mdi-call-missed::before{content:"\F00F9"}.mdi-call-received::before{content:"\F00FA"}.mdi-call-split::before{content:"\F00FB"}.mdi-camcorder::before{content:"\F00FC"}.mdi-camcorder-off::before{content:"\F00FF"}.mdi-camera::before{content:"\F0100"}.mdi-camera-account::before{content:"\F08CB"}.mdi-camera-burst::before{content:"\F0693"}.mdi-camera-control::before{content:"\F0B69"}.mdi-camera-document::before{content:"\F1871"}.mdi-camera-document-off::before{content:"\F1872"}.mdi-camera-enhance::before{content:"\F0101"}.mdi-camera-enhance-outline::before{content:"\F0B6A"}.mdi-camera-flip::before{content:"\F15D9"}.mdi-camera-flip-outline::before{content:"\F15DA"}.mdi-camera-front::before{content:"\F0102"}.mdi-camera-front-variant::before{content:"\F0103"}.mdi-camera-gopro::before{content:"\F07A1"}.mdi-camera-image::before{content:"\F08CC"}.mdi-camera-iris::before{content:"\F0104"}.mdi-camera-lock::before{content:"\F1A14"}.mdi-camera-lock-open::before{content:"\F1C0D"}.mdi-camera-lock-open-outline::before{content:"\F1C0E"}.mdi-camera-lock-outline::before{content:"\F1A15"}.mdi-camera-marker::before{content:"\F19A7"}.mdi-camera-marker-outline::before{content:"\F19A8"}.mdi-camera-metering-center::before{content:"\F07A2"}.mdi-camera-metering-matrix::before{content:"\F07A3"}.mdi-camera-metering-partial::before{content:"\F07A4"}.mdi-camera-metering-spot::before{content:"\F07A5"}.mdi-camera-off::before{content:"\F05DF"}.mdi-camera-off-outline::before{content:"\F19BF"}.mdi-camera-outline::before{content:"\F0D5D"}.mdi-camera-party-mode::before{content:"\F0105"}.mdi-camera-plus::before{content:"\F0EDB"}.mdi-camera-plus-outline::before{content:"\F0EDC"}.mdi-camera-rear::before{content:"\F0106"}.mdi-camera-rear-variant::before{content:"\F0107"}.mdi-camera-retake::before{content:"\F0E19"}.mdi-camera-retake-outline::before{content:"\F0E1A"}.mdi-camera-switch::before{content:"\F0108"}.mdi-camera-switch-outline::before{content:"\F084A"}.mdi-camera-timer::before{content:"\F0109"}.mdi-camera-wireless::before{content:"\F0DB6"}.mdi-camera-wireless-outline::before{content:"\F0DB7"}.mdi-campfire::before{content:"\F0EDD"}.mdi-cancel::before{content:"\F073A"}.mdi-candelabra::before{content:"\F17D2"}.mdi-candelabra-fire::before{content:"\F17D3"}.mdi-candle::before{content:"\F05E2"}.mdi-candy::before{content:"\F1970"}.mdi-candy-off::before{content:"\F1971"}.mdi-candy-off-outline::before{content:"\F1972"}.mdi-candy-outline::before{content:"\F1973"}.mdi-candycane::before{content:"\F010A"}.mdi-cannabis::before{content:"\F07A6"}.mdi-cannabis-off::before{content:"\F166E"}.mdi-caps-lock::before{content:"\F0A9B"}.mdi-car::before{content:"\F010B"}.mdi-car-2-plus::before{content:"\F1015"}.mdi-car-3-plus::before{content:"\F1016"}.mdi-car-arrow-left::before{content:"\F13B2"}.mdi-car-arrow-right::before{content:"\F13B3"}.mdi-car-back::before{content:"\F0E1B"}.mdi-car-battery::before{content:"\F010C"}.mdi-car-brake-abs::before{content:"\F0C47"}.mdi-car-brake-alert::before{content:"\F0C48"}.mdi-car-brake-fluid-level::before{content:"\F1909"}.mdi-car-brake-hold::before{content:"\F0D5E"}.mdi-car-brake-low-pressure::before{content:"\F190A"}.mdi-car-brake-parking::before{content:"\F0D5F"}.mdi-car-brake-retarder::before{content:"\F1017"}.mdi-car-brake-temperature::before{content:"\F190B"}.mdi-car-brake-worn-linings::before{content:"\F190C"}.mdi-car-child-seat::before{content:"\F0FA3"}.mdi-car-clock::before{content:"\F1974"}.mdi-car-clutch::before{content:"\F1018"}.mdi-car-cog::before{content:"\F13CC"}.mdi-car-connected::before{content:"\F010D"}.mdi-car-convertible::before{content:"\F07A7"}.mdi-car-coolant-level::before{content:"\F1019"}.mdi-car-cruise-control::before{content:"\F0D60"}.mdi-car-defrost-front::before{content:"\F0D61"}.mdi-car-defrost-rear::before{content:"\F0D62"}.mdi-car-door::before{content:"\F0B6B"}.mdi-car-door-lock::before{content:"\F109D"}.mdi-car-door-lock-open::before{content:"\F1C81"}.mdi-car-electric::before{content:"\F0B6C"}.mdi-car-electric-outline::before{content:"\F15B5"}.mdi-car-emergency::before{content:"\F160F"}.mdi-car-esp::before{content:"\F0C49"}.mdi-car-estate::before{content:"\F07A8"}.mdi-car-hatchback::before{content:"\F07A9"}.mdi-car-info::before{content:"\F11BE"}.mdi-car-key::before{content:"\F0B6D"}.mdi-car-lifted-pickup::before{content:"\F152D"}.mdi-car-light-alert::before{content:"\F190D"}.mdi-car-light-dimmed::before{content:"\F0C4A"}.mdi-car-light-fog::before{content:"\F0C4B"}.mdi-car-light-high::before{content:"\F0C4C"}.mdi-car-limousine::before{content:"\F08CD"}.mdi-car-multiple::before{content:"\F0B6E"}.mdi-car-off::before{content:"\F0E1C"}.mdi-car-outline::before{content:"\F14ED"}.mdi-car-parking-lights::before{content:"\F0D63"}.mdi-car-pickup::before{content:"\F07AA"}.mdi-car-search::before{content:"\F1B8D"}.mdi-car-search-outline::before{content:"\F1B8E"}.mdi-car-seat::before{content:"\F0FA4"}.mdi-car-seat-cooler::before{content:"\F0FA5"}.mdi-car-seat-heater::before{content:"\F0FA6"}.mdi-car-select::before{content:"\F1879"}.mdi-car-settings::before{content:"\F13CD"}.mdi-car-shift-pattern::before{content:"\F0F40"}.mdi-car-side::before{content:"\F07AB"}.mdi-car-speed-limiter::before{content:"\F190E"}.mdi-car-sports::before{content:"\F07AC"}.mdi-car-tire-alert::before{content:"\F0C4D"}.mdi-car-traction-control::before{content:"\F0D64"}.mdi-car-turbocharger::before{content:"\F101A"}.mdi-car-wash::before{content:"\F010E"}.mdi-car-windshield::before{content:"\F101B"}.mdi-car-windshield-outline::before{content:"\F101C"}.mdi-car-wireless::before{content:"\F1878"}.mdi-car-wrench::before{content:"\F1814"}.mdi-carabiner::before{content:"\F14C0"}.mdi-caravan::before{content:"\F07AD"}.mdi-card::before{content:"\F0B6F"}.mdi-card-account-details::before{content:"\F05D2"}.mdi-card-account-details-outline::before{content:"\F0DAB"}.mdi-card-account-details-star::before{content:"\F02A3"}.mdi-card-account-details-star-outline::before{content:"\F06DB"}.mdi-card-account-mail::before{content:"\F018E"}.mdi-card-account-mail-outline::before{content:"\F0E98"}.mdi-card-account-phone::before{content:"\F0E99"}.mdi-card-account-phone-outline::before{content:"\F0E9A"}.mdi-card-bulleted::before{content:"\F0B70"}.mdi-card-bulleted-off::before{content:"\F0B71"}.mdi-card-bulleted-off-outline::before{content:"\F0B72"}.mdi-card-bulleted-outline::before{content:"\F0B73"}.mdi-card-bulleted-settings::before{content:"\F0B74"}.mdi-card-bulleted-settings-outline::before{content:"\F0B75"}.mdi-card-minus::before{content:"\F1600"}.mdi-card-minus-outline::before{content:"\F1601"}.mdi-card-multiple::before{content:"\F17F1"}.mdi-card-multiple-outline::before{content:"\F17F2"}.mdi-card-off::before{content:"\F1602"}.mdi-card-off-outline::before{content:"\F1603"}.mdi-card-outline::before{content:"\F0B76"}.mdi-card-plus::before{content:"\F11FF"}.mdi-card-plus-outline::before{content:"\F1200"}.mdi-card-remove::before{content:"\F1604"}.mdi-card-remove-outline::before{content:"\F1605"}.mdi-card-search::before{content:"\F1074"}.mdi-card-search-outline::before{content:"\F1075"}.mdi-card-text::before{content:"\F0B77"}.mdi-card-text-outline::before{content:"\F0B78"}.mdi-cards::before{content:"\F0638"}.mdi-cards-club::before{content:"\F08CE"}.mdi-cards-club-outline::before{content:"\F189F"}.mdi-cards-diamond::before{content:"\F08CF"}.mdi-cards-diamond-outline::before{content:"\F101D"}.mdi-cards-heart::before{content:"\F08D0"}.mdi-cards-heart-outline::before{content:"\F18A0"}.mdi-cards-outline::before{content:"\F0639"}.mdi-cards-playing::before{content:"\F18A1"}.mdi-cards-playing-club::before{content:"\F18A2"}.mdi-cards-playing-club-multiple::before{content:"\F18A3"}.mdi-cards-playing-club-multiple-outline::before{content:"\F18A4"}.mdi-cards-playing-club-outline::before{content:"\F18A5"}.mdi-cards-playing-diamond::before{content:"\F18A6"}.mdi-cards-playing-diamond-multiple::before{content:"\F18A7"}.mdi-cards-playing-diamond-multiple-outline::before{content:"\F18A8"}.mdi-cards-playing-diamond-outline::before{content:"\F18A9"}.mdi-cards-playing-heart::before{content:"\F18AA"}.mdi-cards-playing-heart-multiple::before{content:"\F18AB"}.mdi-cards-playing-heart-multiple-outline::before{content:"\F18AC"}.mdi-cards-playing-heart-outline::before{content:"\F18AD"}.mdi-cards-playing-outline::before{content:"\F063A"}.mdi-cards-playing-spade::before{content:"\F18AE"}.mdi-cards-playing-spade-multiple::before{content:"\F18AF"}.mdi-cards-playing-spade-multiple-outline::before{content:"\F18B0"}.mdi-cards-playing-spade-outline::before{content:"\F18B1"}.mdi-cards-spade::before{content:"\F08D1"}.mdi-cards-spade-outline::before{content:"\F18B2"}.mdi-cards-variant::before{content:"\F06C7"}.mdi-carrot::before{content:"\F010F"}.mdi-cart::before{content:"\F0110"}.mdi-cart-arrow-down::before{content:"\F0D66"}.mdi-cart-arrow-right::before{content:"\F0C4E"}.mdi-cart-arrow-up::before{content:"\F0D67"}.mdi-cart-check::before{content:"\F15EA"}.mdi-cart-heart::before{content:"\F18E0"}.mdi-cart-minus::before{content:"\F0D68"}.mdi-cart-off::before{content:"\F066B"}.mdi-cart-outline::before{content:"\F0111"}.mdi-cart-percent::before{content:"\F1BAE"}.mdi-cart-plus::before{content:"\F0112"}.mdi-cart-remove::before{content:"\F0D69"}.mdi-cart-variant::before{content:"\F15EB"}.mdi-case-sensitive-alt::before{content:"\F0113"}.mdi-cash::before{content:"\F0114"}.mdi-cash-100::before{content:"\F0115"}.mdi-cash-check::before{content:"\F14EE"}.mdi-cash-clock::before{content:"\F1A91"}.mdi-cash-edit::before{content:"\F1CAB"}.mdi-cash-fast::before{content:"\F185C"}.mdi-cash-lock::before{content:"\F14EA"}.mdi-cash-lock-open::before{content:"\F14EB"}.mdi-cash-marker::before{content:"\F0DB8"}.mdi-cash-minus::before{content:"\F1260"}.mdi-cash-multiple::before{content:"\F0116"}.mdi-cash-off::before{content:"\F1C79"}.mdi-cash-plus::before{content:"\F1261"}.mdi-cash-refund::before{content:"\F0A9C"}.mdi-cash-register::before{content:"\F0CF4"}.mdi-cash-remove::before{content:"\F1262"}.mdi-cash-sync::before{content:"\F1A92"}.mdi-cassette::before{content:"\F09D4"}.mdi-cast::before{content:"\F0118"}.mdi-cast-audio::before{content:"\F101E"}.mdi-cast-audio-variant::before{content:"\F1749"}.mdi-cast-connected::before{content:"\F0119"}.mdi-cast-education::before{content:"\F0E1D"}.mdi-cast-off::before{content:"\F078A"}.mdi-cast-variant::before{content:"\F001F"}.mdi-castle::before{content:"\F011A"}.mdi-cat::before{content:"\F011B"}.mdi-cctv::before{content:"\F07AE"}.mdi-cctv-off::before{content:"\F185F"}.mdi-ceiling-fan::before{content:"\F1797"}.mdi-ceiling-fan-light::before{content:"\F1798"}.mdi-ceiling-light::before{content:"\F0769"}.mdi-ceiling-light-multiple::before{content:"\F18DD"}.mdi-ceiling-light-multiple-outline::before{content:"\F18DE"}.mdi-ceiling-light-outline::before{content:"\F17C7"}.mdi-cellphone::before{content:"\F011C"}.mdi-cellphone-arrow-down::before{content:"\F09D5"}.mdi-cellphone-arrow-down-variant::before{content:"\F19C5"}.mdi-cellphone-basic::before{content:"\F011E"}.mdi-cellphone-charging::before{content:"\F1397"}.mdi-cellphone-check::before{content:"\F17FD"}.mdi-cellphone-cog::before{content:"\F0951"}.mdi-cellphone-dock::before{content:"\F011F"}.mdi-cellphone-information::before{content:"\F0F41"}.mdi-cellphone-key::before{content:"\F094E"}.mdi-cellphone-link::before{content:"\F0121"}.mdi-cellphone-link-off::before{content:"\F0122"}.mdi-cellphone-lock::before{content:"\F094F"}.mdi-cellphone-marker::before{content:"\F183A"}.mdi-cellphone-message::before{content:"\F08D3"}.mdi-cellphone-message-off::before{content:"\F10D2"}.mdi-cellphone-nfc::before{content:"\F0E90"}.mdi-cellphone-nfc-off::before{content:"\F12D8"}.mdi-cellphone-off::before{content:"\F0950"}.mdi-cellphone-play::before{content:"\F101F"}.mdi-cellphone-remove::before{content:"\F094D"}.mdi-cellphone-screenshot::before{content:"\F0A35"}.mdi-cellphone-settings::before{content:"\F0123"}.mdi-cellphone-sound::before{content:"\F0952"}.mdi-cellphone-text::before{content:"\F08D2"}.mdi-cellphone-wireless::before{content:"\F0815"}.mdi-centos::before{content:"\F111A"}.mdi-certificate::before{content:"\F0124"}.mdi-certificate-outline::before{content:"\F1188"}.mdi-chair-rolling::before{content:"\F0F48"}.mdi-chair-school::before{content:"\F0125"}.mdi-chandelier::before{content:"\F1793"}.mdi-charity::before{content:"\F0C4F"}.mdi-charity-search::before{content:"\F1C82"}.mdi-chart-arc::before{content:"\F0126"}.mdi-chart-areaspline::before{content:"\F0127"}.mdi-chart-areaspline-variant::before{content:"\F0E91"}.mdi-chart-bar::before{content:"\F0128"}.mdi-chart-bar-stacked::before{content:"\F076A"}.mdi-chart-bell-curve::before{content:"\F0C50"}.mdi-chart-bell-curve-cumulative::before{content:"\F0FA7"}.mdi-chart-box::before{content:"\F154D"}.mdi-chart-box-multiple::before{content:"\F1CCD"}.mdi-chart-box-multiple-outline::before{content:"\F1CCE"}.mdi-chart-box-outline::before{content:"\F154E"}.mdi-chart-box-plus-outline::before{content:"\F154F"}.mdi-chart-bubble::before{content:"\F05E3"}.mdi-chart-donut::before{content:"\F07AF"}.mdi-chart-donut-variant::before{content:"\F07B0"}.mdi-chart-gantt::before{content:"\F066C"}.mdi-chart-histogram::before{content:"\F0129"}.mdi-chart-line::before{content:"\F012A"}.mdi-chart-line-stacked::before{content:"\F076B"}.mdi-chart-line-variant::before{content:"\F07B1"}.mdi-chart-multiline::before{content:"\F08D4"}.mdi-chart-multiple::before{content:"\F1213"}.mdi-chart-pie::before{content:"\F012B"}.mdi-chart-pie-outline::before{content:"\F1BDF"}.mdi-chart-ppf::before{content:"\F1380"}.mdi-chart-sankey::before{content:"\F11DF"}.mdi-chart-sankey-variant::before{content:"\F11E0"}.mdi-chart-scatter-plot::before{content:"\F0E92"}.mdi-chart-scatter-plot-hexbin::before{content:"\F066D"}.mdi-chart-timeline::before{content:"\F066E"}.mdi-chart-timeline-variant::before{content:"\F0E93"}.mdi-chart-timeline-variant-shimmer::before{content:"\F15B6"}.mdi-chart-tree::before{content:"\F0E94"}.mdi-chart-waterfall::before{content:"\F1918"}.mdi-chat::before{content:"\F0B79"}.mdi-chat-alert::before{content:"\F0B7A"}.mdi-chat-alert-outline::before{content:"\F12C9"}.mdi-chat-minus::before{content:"\F1410"}.mdi-chat-minus-outline::before{content:"\F1413"}.mdi-chat-outline::before{content:"\F0EDE"}.mdi-chat-plus::before{content:"\F140F"}.mdi-chat-plus-outline::before{content:"\F1412"}.mdi-chat-processing::before{content:"\F0B7B"}.mdi-chat-processing-outline::before{content:"\F12CA"}.mdi-chat-question::before{content:"\F1738"}.mdi-chat-question-outline::before{content:"\F1739"}.mdi-chat-remove::before{content:"\F1411"}.mdi-chat-remove-outline::before{content:"\F1414"}.mdi-chat-sleep::before{content:"\F12D1"}.mdi-chat-sleep-outline::before{content:"\F12D2"}.mdi-check::before{content:"\F012C"}.mdi-check-all::before{content:"\F012D"}.mdi-check-bold::before{content:"\F0E1E"}.mdi-check-circle::before{content:"\F05E0"}.mdi-check-circle-outline::before{content:"\F05E1"}.mdi-check-decagram::before{content:"\F0791"}.mdi-check-decagram-outline::before{content:"\F1740"}.mdi-check-network::before{content:"\F0C53"}.mdi-check-network-outline::before{content:"\F0C54"}.mdi-check-outline::before{content:"\F0855"}.mdi-check-underline::before{content:"\F0E1F"}.mdi-check-underline-circle::before{content:"\F0E20"}.mdi-check-underline-circle-outline::before{content:"\F0E21"}.mdi-checkbook::before{content:"\F0A9D"}.mdi-checkbook-arrow-left::before{content:"\F1C1D"}.mdi-checkbook-arrow-right::before{content:"\F1C1E"}.mdi-checkbox-blank::before{content:"\F012E"}.mdi-checkbox-blank-badge::before{content:"\F1176"}.mdi-checkbox-blank-badge-outline::before{content:"\F0117"}.mdi-checkbox-blank-circle::before{content:"\F012F"}.mdi-checkbox-blank-circle-outline::before{content:"\F0130"}.mdi-checkbox-blank-off::before{content:"\F12EC"}.mdi-checkbox-blank-off-outline::before{content:"\F12ED"}.mdi-checkbox-blank-outline::before{content:"\F0131"}.mdi-checkbox-intermediate::before{content:"\F0856"}.mdi-checkbox-intermediate-variant::before{content:"\F1B54"}.mdi-checkbox-marked::before{content:"\F0132"}.mdi-checkbox-marked-circle::before{content:"\F0133"}.mdi-checkbox-marked-circle-auto-outline::before{content:"\F1C26"}.mdi-checkbox-marked-circle-minus-outline::before{content:"\F1C27"}.mdi-checkbox-marked-circle-outline::before{content:"\F0134"}.mdi-checkbox-marked-circle-plus-outline::before{content:"\F1927"}.mdi-checkbox-marked-outline::before{content:"\F0135"}.mdi-checkbox-multiple-blank::before{content:"\F0136"}.mdi-checkbox-multiple-blank-circle::before{content:"\F063B"}.mdi-checkbox-multiple-blank-circle-outline::before{content:"\F063C"}.mdi-checkbox-multiple-blank-outline::before{content:"\F0137"}.mdi-checkbox-multiple-marked::before{content:"\F0138"}.mdi-checkbox-multiple-marked-circle::before{content:"\F063D"}.mdi-checkbox-multiple-marked-circle-outline::before{content:"\F063E"}.mdi-checkbox-multiple-marked-outline::before{content:"\F0139"}.mdi-checkbox-multiple-outline::before{content:"\F0C51"}.mdi-checkbox-outline::before{content:"\F0C52"}.mdi-checkerboard::before{content:"\F013A"}.mdi-checkerboard-minus::before{content:"\F1202"}.mdi-checkerboard-plus::before{content:"\F1201"}.mdi-checkerboard-remove::before{content:"\F1203"}.mdi-cheese::before{content:"\F12B9"}.mdi-cheese-off::before{content:"\F13EE"}.mdi-chef-hat::before{content:"\F0B7C"}.mdi-chemical-weapon::before{content:"\F013B"}.mdi-chess-bishop::before{content:"\F085C"}.mdi-chess-king::before{content:"\F0857"}.mdi-chess-knight::before{content:"\F0858"}.mdi-chess-pawn::before{content:"\F0859"}.mdi-chess-queen::before{content:"\F085A"}.mdi-chess-rook::before{content:"\F085B"}.mdi-chevron-double-down::before{content:"\F013C"}.mdi-chevron-double-left::before{content:"\F013D"}.mdi-chevron-double-right::before{content:"\F013E"}.mdi-chevron-double-up::before{content:"\F013F"}.mdi-chevron-down::before{content:"\F0140"}.mdi-chevron-down-box::before{content:"\F09D6"}.mdi-chevron-down-box-outline::before{content:"\F09D7"}.mdi-chevron-down-circle::before{content:"\F0B26"}.mdi-chevron-down-circle-outline::before{content:"\F0B27"}.mdi-chevron-left::before{content:"\F0141"}.mdi-chevron-left-box::before{content:"\F09D8"}.mdi-chevron-left-box-outline::before{content:"\F09D9"}.mdi-chevron-left-circle::before{content:"\F0B28"}.mdi-chevron-left-circle-outline::before{content:"\F0B29"}.mdi-chevron-right::before{content:"\F0142"}.mdi-chevron-right-box::before{content:"\F09DA"}.mdi-chevron-right-box-outline::before{content:"\F09DB"}.mdi-chevron-right-circle::before{content:"\F0B2A"}.mdi-chevron-right-circle-outline::before{content:"\F0B2B"}.mdi-chevron-triple-down::before{content:"\F0DB9"}.mdi-chevron-triple-left::before{content:"\F0DBA"}.mdi-chevron-triple-right::before{content:"\F0DBB"}.mdi-chevron-triple-up::before{content:"\F0DBC"}.mdi-chevron-up::before{content:"\F0143"}.mdi-chevron-up-box::before{content:"\F09DC"}.mdi-chevron-up-box-outline::before{content:"\F09DD"}.mdi-chevron-up-circle::before{content:"\F0B2C"}.mdi-chevron-up-circle-outline::before{content:"\F0B2D"}.mdi-chili-alert::before{content:"\F17EA"}.mdi-chili-alert-outline::before{content:"\F17EB"}.mdi-chili-hot::before{content:"\F07B2"}.mdi-chili-hot-outline::before{content:"\F17EC"}.mdi-chili-medium::before{content:"\F07B3"}.mdi-chili-medium-outline::before{content:"\F17ED"}.mdi-chili-mild::before{content:"\F07B4"}.mdi-chili-mild-outline::before{content:"\F17EE"}.mdi-chili-off::before{content:"\F1467"}.mdi-chili-off-outline::before{content:"\F17EF"}.mdi-chip::before{content:"\F061A"}.mdi-church::before{content:"\F0144"}.mdi-church-outline::before{content:"\F1B02"}.mdi-cigar::before{content:"\F1189"}.mdi-cigar-off::before{content:"\F141B"}.mdi-circle::before{content:"\F0765"}.mdi-circle-box::before{content:"\F15DC"}.mdi-circle-box-outline::before{content:"\F15DD"}.mdi-circle-double::before{content:"\F0E95"}.mdi-circle-edit-outline::before{content:"\F08D5"}.mdi-circle-expand::before{content:"\F0E96"}.mdi-circle-half::before{content:"\F1395"}.mdi-circle-half-full::before{content:"\F1396"}.mdi-circle-medium::before{content:"\F09DE"}.mdi-circle-multiple::before{content:"\F0B38"}.mdi-circle-multiple-outline::before{content:"\F0695"}.mdi-circle-off-outline::before{content:"\F10D3"}.mdi-circle-opacity::before{content:"\F1853"}.mdi-circle-outline::before{content:"\F0766"}.mdi-circle-slice-1::before{content:"\F0A9E"}.mdi-circle-slice-2::before{content:"\F0A9F"}.mdi-circle-slice-3::before{content:"\F0AA0"}.mdi-circle-slice-4::before{content:"\F0AA1"}.mdi-circle-slice-5::before{content:"\F0AA2"}.mdi-circle-slice-6::before{content:"\F0AA3"}.mdi-circle-slice-7::before{content:"\F0AA4"}.mdi-circle-slice-8::before{content:"\F0AA5"}.mdi-circle-small::before{content:"\F09DF"}.mdi-circular-saw::before{content:"\F0E22"}.mdi-city::before{content:"\F0146"}.mdi-city-switch::before{content:"\F1C28"}.mdi-city-variant::before{content:"\F0A36"}.mdi-city-variant-outline::before{content:"\F0A37"}.mdi-clipboard::before{content:"\F0147"}.mdi-clipboard-account::before{content:"\F0148"}.mdi-clipboard-account-outline::before{content:"\F0C55"}.mdi-clipboard-alert::before{content:"\F0149"}.mdi-clipboard-alert-outline::before{content:"\F0CF7"}.mdi-clipboard-arrow-down::before{content:"\F014A"}.mdi-clipboard-arrow-down-outline::before{content:"\F0C56"}.mdi-clipboard-arrow-left::before{content:"\F014B"}.mdi-clipboard-arrow-left-outline::before{content:"\F0CF8"}.mdi-clipboard-arrow-right::before{content:"\F0CF9"}.mdi-clipboard-arrow-right-outline::before{content:"\F0CFA"}.mdi-clipboard-arrow-up::before{content:"\F0C57"}.mdi-clipboard-arrow-up-outline::before{content:"\F0C58"}.mdi-clipboard-check::before{content:"\F014E"}.mdi-clipboard-check-multiple::before{content:"\F1263"}.mdi-clipboard-check-multiple-outline::before{content:"\F1264"}.mdi-clipboard-check-outline::before{content:"\F08A8"}.mdi-clipboard-clock::before{content:"\F16E2"}.mdi-clipboard-clock-outline::before{content:"\F16E3"}.mdi-clipboard-edit::before{content:"\F14E5"}.mdi-clipboard-edit-outline::before{content:"\F14E6"}.mdi-clipboard-file::before{content:"\F1265"}.mdi-clipboard-file-outline::before{content:"\F1266"}.mdi-clipboard-flow::before{content:"\F06C8"}.mdi-clipboard-flow-outline::before{content:"\F1117"}.mdi-clipboard-list::before{content:"\F10D4"}.mdi-clipboard-list-outline::before{content:"\F10D5"}.mdi-clipboard-minus::before{content:"\F1618"}.mdi-clipboard-minus-outline::before{content:"\F1619"}.mdi-clipboard-multiple::before{content:"\F1267"}.mdi-clipboard-multiple-outline::before{content:"\F1268"}.mdi-clipboard-off::before{content:"\F161A"}.mdi-clipboard-off-outline::before{content:"\F161B"}.mdi-clipboard-outline::before{content:"\F014C"}.mdi-clipboard-play::before{content:"\F0C59"}.mdi-clipboard-play-multiple::before{content:"\F1269"}.mdi-clipboard-play-multiple-outline::before{content:"\F126A"}.mdi-clipboard-play-outline::before{content:"\F0C5A"}.mdi-clipboard-plus::before{content:"\F0751"}.mdi-clipboard-plus-outline::before{content:"\F131F"}.mdi-clipboard-pulse::before{content:"\F085D"}.mdi-clipboard-pulse-outline::before{content:"\F085E"}.mdi-clipboard-remove::before{content:"\F161C"}.mdi-clipboard-remove-outline::before{content:"\F161D"}.mdi-clipboard-search::before{content:"\F161E"}.mdi-clipboard-search-outline::before{content:"\F161F"}.mdi-clipboard-text::before{content:"\F014D"}.mdi-clipboard-text-clock::before{content:"\F18F9"}.mdi-clipboard-text-clock-outline::before{content:"\F18FA"}.mdi-clipboard-text-multiple::before{content:"\F126B"}.mdi-clipboard-text-multiple-outline::before{content:"\F126C"}.mdi-clipboard-text-off::before{content:"\F1620"}.mdi-clipboard-text-off-outline::before{content:"\F1621"}.mdi-clipboard-text-outline::before{content:"\F0A38"}.mdi-clipboard-text-play::before{content:"\F0C5B"}.mdi-clipboard-text-play-outline::before{content:"\F0C5C"}.mdi-clipboard-text-search::before{content:"\F1622"}.mdi-clipboard-text-search-outline::before{content:"\F1623"}.mdi-clippy::before{content:"\F014F"}.mdi-clock::before{content:"\F0954"}.mdi-clock-alert::before{content:"\F0955"}.mdi-clock-alert-outline::before{content:"\F05CE"}.mdi-clock-check::before{content:"\F0FA8"}.mdi-clock-check-outline::before{content:"\F0FA9"}.mdi-clock-digital::before{content:"\F0E97"}.mdi-clock-edit::before{content:"\F19BA"}.mdi-clock-edit-outline::before{content:"\F19BB"}.mdi-clock-end::before{content:"\F0151"}.mdi-clock-fast::before{content:"\F0152"}.mdi-clock-in::before{content:"\F0153"}.mdi-clock-minus::before{content:"\F1863"}.mdi-clock-minus-outline::before{content:"\F1864"}.mdi-clock-out::before{content:"\F0154"}.mdi-clock-outline::before{content:"\F0150"}.mdi-clock-plus::before{content:"\F1861"}.mdi-clock-plus-outline::before{content:"\F1862"}.mdi-clock-remove::before{content:"\F1865"}.mdi-clock-remove-outline::before{content:"\F1866"}.mdi-clock-star-four-points::before{content:"\F1C29"}.mdi-clock-star-four-points-outline::before{content:"\F1C2A"}.mdi-clock-start::before{content:"\F0155"}.mdi-clock-time-eight::before{content:"\F1446"}.mdi-clock-time-eight-outline::before{content:"\F1452"}.mdi-clock-time-eleven::before{content:"\F1449"}.mdi-clock-time-eleven-outline::before{content:"\F1455"}.mdi-clock-time-five::before{content:"\F1443"}.mdi-clock-time-five-outline::before{content:"\F144F"}.mdi-clock-time-four::before{content:"\F1442"}.mdi-clock-time-four-outline::before{content:"\F144E"}.mdi-clock-time-nine::before{content:"\F1447"}.mdi-clock-time-nine-outline::before{content:"\F1453"}.mdi-clock-time-one::before{content:"\F143F"}.mdi-clock-time-one-outline::before{content:"\F144B"}.mdi-clock-time-seven::before{content:"\F1445"}.mdi-clock-time-seven-outline::before{content:"\F1451"}.mdi-clock-time-six::before{content:"\F1444"}.mdi-clock-time-six-outline::before{content:"\F1450"}.mdi-clock-time-ten::before{content:"\F1448"}.mdi-clock-time-ten-outline::before{content:"\F1454"}.mdi-clock-time-three::before{content:"\F1441"}.mdi-clock-time-three-outline::before{content:"\F144D"}.mdi-clock-time-twelve::before{content:"\F144A"}.mdi-clock-time-twelve-outline::before{content:"\F1456"}.mdi-clock-time-two::before{content:"\F1440"}.mdi-clock-time-two-outline::before{content:"\F144C"}.mdi-close::before{content:"\F0156"}.mdi-close-box::before{content:"\F0157"}.mdi-close-box-multiple::before{content:"\F0C5D"}.mdi-close-box-multiple-outline::before{content:"\F0C5E"}.mdi-close-box-outline::before{content:"\F0158"}.mdi-close-circle::before{content:"\F0159"}.mdi-close-circle-multiple::before{content:"\F062A"}.mdi-close-circle-multiple-outline::before{content:"\F0883"}.mdi-close-circle-outline::before{content:"\F015A"}.mdi-close-network::before{content:"\F015B"}.mdi-close-network-outline::before{content:"\F0C5F"}.mdi-close-octagon::before{content:"\F015C"}.mdi-close-octagon-outline::before{content:"\F015D"}.mdi-close-outline::before{content:"\F06C9"}.mdi-close-thick::before{content:"\F1398"}.mdi-closed-caption::before{content:"\F015E"}.mdi-closed-caption-outline::before{content:"\F0DBD"}.mdi-cloud::before{content:"\F015F"}.mdi-cloud-alert::before{content:"\F09E0"}.mdi-cloud-alert-outline::before{content:"\F1BE0"}.mdi-cloud-arrow-down::before{content:"\F1BE1"}.mdi-cloud-arrow-down-outline::before{content:"\F1BE2"}.mdi-cloud-arrow-left::before{content:"\F1BE3"}.mdi-cloud-arrow-left-outline::before{content:"\F1BE4"}.mdi-cloud-arrow-right::before{content:"\F1BE5"}.mdi-cloud-arrow-right-outline::before{content:"\F1BE6"}.mdi-cloud-arrow-up::before{content:"\F1BE7"}.mdi-cloud-arrow-up-outline::before{content:"\F1BE8"}.mdi-cloud-braces::before{content:"\F07B5"}.mdi-cloud-cancel::before{content:"\F1BE9"}.mdi-cloud-cancel-outline::before{content:"\F1BEA"}.mdi-cloud-check::before{content:"\F1BEB"}.mdi-cloud-check-outline::before{content:"\F1BEC"}.mdi-cloud-check-variant::before{content:"\F0160"}.mdi-cloud-check-variant-outline::before{content:"\F12CC"}.mdi-cloud-circle::before{content:"\F0161"}.mdi-cloud-circle-outline::before{content:"\F1BED"}.mdi-cloud-clock::before{content:"\F1BEE"}.mdi-cloud-clock-outline::before{content:"\F1BEF"}.mdi-cloud-cog::before{content:"\F1BF0"}.mdi-cloud-cog-outline::before{content:"\F1BF1"}.mdi-cloud-download::before{content:"\F0162"}.mdi-cloud-download-outline::before{content:"\F0B7D"}.mdi-cloud-key::before{content:"\F1CA1"}.mdi-cloud-key-outline::before{content:"\F1CA2"}.mdi-cloud-lock::before{content:"\F11F1"}.mdi-cloud-lock-open::before{content:"\F1BF2"}.mdi-cloud-lock-open-outline::before{content:"\F1BF3"}.mdi-cloud-lock-outline::before{content:"\F11F2"}.mdi-cloud-minus::before{content:"\F1BF4"}.mdi-cloud-minus-outline::before{content:"\F1BF5"}.mdi-cloud-off::before{content:"\F1BF6"}.mdi-cloud-off-outline::before{content:"\F0164"}.mdi-cloud-outline::before{content:"\F0163"}.mdi-cloud-percent::before{content:"\F1A35"}.mdi-cloud-percent-outline::before{content:"\F1A36"}.mdi-cloud-plus::before{content:"\F1BF7"}.mdi-cloud-plus-outline::before{content:"\F1BF8"}.mdi-cloud-print::before{content:"\F0165"}.mdi-cloud-print-outline::before{content:"\F0166"}.mdi-cloud-question::before{content:"\F0A39"}.mdi-cloud-question-outline::before{content:"\F1BF9"}.mdi-cloud-refresh::before{content:"\F1BFA"}.mdi-cloud-refresh-outline::before{content:"\F1BFB"}.mdi-cloud-refresh-variant::before{content:"\F052A"}.mdi-cloud-refresh-variant-outline::before{content:"\F1BFC"}.mdi-cloud-remove::before{content:"\F1BFD"}.mdi-cloud-remove-outline::before{content:"\F1BFE"}.mdi-cloud-search::before{content:"\F0956"}.mdi-cloud-search-outline::before{content:"\F0957"}.mdi-cloud-sync::before{content:"\F063F"}.mdi-cloud-sync-outline::before{content:"\F12D6"}.mdi-cloud-tags::before{content:"\F07B6"}.mdi-cloud-upload::before{content:"\F0167"}.mdi-cloud-upload-outline::before{content:"\F0B7E"}.mdi-clouds::before{content:"\F1B95"}.mdi-clover::before{content:"\F0816"}.mdi-clover-outline::before{content:"\F1C62"}.mdi-coach-lamp::before{content:"\F1020"}.mdi-coach-lamp-variant::before{content:"\F1A37"}.mdi-coat-rack::before{content:"\F109E"}.mdi-code-array::before{content:"\F0168"}.mdi-code-block-braces::before{content:"\F1C83"}.mdi-code-block-brackets::before{content:"\F1C84"}.mdi-code-block-parentheses::before{content:"\F1C85"}.mdi-code-block-tags::before{content:"\F1C86"}.mdi-code-braces::before{content:"\F0169"}.mdi-code-braces-box::before{content:"\F10D6"}.mdi-code-brackets::before{content:"\F016A"}.mdi-code-equal::before{content:"\F016B"}.mdi-code-greater-than::before{content:"\F016C"}.mdi-code-greater-than-or-equal::before{content:"\F016D"}.mdi-code-json::before{content:"\F0626"}.mdi-code-less-than::before{content:"\F016E"}.mdi-code-less-than-or-equal::before{content:"\F016F"}.mdi-code-not-equal::before{content:"\F0170"}.mdi-code-not-equal-variant::before{content:"\F0171"}.mdi-code-parentheses::before{content:"\F0172"}.mdi-code-parentheses-box::before{content:"\F10D7"}.mdi-code-string::before{content:"\F0173"}.mdi-code-tags::before{content:"\F0174"}.mdi-code-tags-check::before{content:"\F0694"}.mdi-codepen::before{content:"\F0175"}.mdi-coffee::before{content:"\F0176"}.mdi-coffee-maker::before{content:"\F109F"}.mdi-coffee-maker-check::before{content:"\F1931"}.mdi-coffee-maker-check-outline::before{content:"\F1932"}.mdi-coffee-maker-outline::before{content:"\F181B"}.mdi-coffee-off::before{content:"\F0FAA"}.mdi-coffee-off-outline::before{content:"\F0FAB"}.mdi-coffee-outline::before{content:"\F06CA"}.mdi-coffee-to-go::before{content:"\F0177"}.mdi-coffee-to-go-outline::before{content:"\F130E"}.mdi-coffin::before{content:"\F0B7F"}.mdi-cog::before{content:"\F0493"}.mdi-cog-box::before{content:"\F0494"}.mdi-cog-clockwise::before{content:"\F11DD"}.mdi-cog-counterclockwise::before{content:"\F11DE"}.mdi-cog-off::before{content:"\F13CE"}.mdi-cog-off-outline::before{content:"\F13CF"}.mdi-cog-outline::before{content:"\F08BB"}.mdi-cog-pause::before{content:"\F1933"}.mdi-cog-pause-outline::before{content:"\F1934"}.mdi-cog-play::before{content:"\F1935"}.mdi-cog-play-outline::before{content:"\F1936"}.mdi-cog-refresh::before{content:"\F145E"}.mdi-cog-refresh-outline::before{content:"\F145F"}.mdi-cog-stop::before{content:"\F1937"}.mdi-cog-stop-outline::before{content:"\F1938"}.mdi-cog-sync::before{content:"\F1460"}.mdi-cog-sync-outline::before{content:"\F1461"}.mdi-cog-transfer::before{content:"\F105B"}.mdi-cog-transfer-outline::before{content:"\F105C"}.mdi-cogs::before{content:"\F08D6"}.mdi-collage::before{content:"\F0640"}.mdi-collapse-all::before{content:"\F0AA6"}.mdi-collapse-all-outline::before{content:"\F0AA7"}.mdi-color-helper::before{content:"\F0179"}.mdi-comma::before{content:"\F0E23"}.mdi-comma-box::before{content:"\F0E2B"}.mdi-comma-box-outline::before{content:"\F0E24"}.mdi-comma-circle::before{content:"\F0E25"}.mdi-comma-circle-outline::before{content:"\F0E26"}.mdi-comment::before{content:"\F017A"}.mdi-comment-account::before{content:"\F017B"}.mdi-comment-account-outline::before{content:"\F017C"}.mdi-comment-alert::before{content:"\F017D"}.mdi-comment-alert-outline::before{content:"\F017E"}.mdi-comment-arrow-left::before{content:"\F09E1"}.mdi-comment-arrow-left-outline::before{content:"\F09E2"}.mdi-comment-arrow-right::before{content:"\F09E3"}.mdi-comment-arrow-right-outline::before{content:"\F09E4"}.mdi-comment-bookmark::before{content:"\F15AE"}.mdi-comment-bookmark-outline::before{content:"\F15AF"}.mdi-comment-check::before{content:"\F017F"}.mdi-comment-check-outline::before{content:"\F0180"}.mdi-comment-edit::before{content:"\F11BF"}.mdi-comment-edit-outline::before{content:"\F12C4"}.mdi-comment-eye::before{content:"\F0A3A"}.mdi-comment-eye-outline::before{content:"\F0A3B"}.mdi-comment-flash::before{content:"\F15B0"}.mdi-comment-flash-outline::before{content:"\F15B1"}.mdi-comment-minus::before{content:"\F15DF"}.mdi-comment-minus-outline::before{content:"\F15E0"}.mdi-comment-multiple::before{content:"\F085F"}.mdi-comment-multiple-outline::before{content:"\F0181"}.mdi-comment-off::before{content:"\F15E1"}.mdi-comment-off-outline::before{content:"\F15E2"}.mdi-comment-outline::before{content:"\F0182"}.mdi-comment-plus::before{content:"\F09E5"}.mdi-comment-plus-outline::before{content:"\F0183"}.mdi-comment-processing::before{content:"\F0184"}.mdi-comment-processing-outline::before{content:"\F0185"}.mdi-comment-question::before{content:"\F0817"}.mdi-comment-question-outline::before{content:"\F0186"}.mdi-comment-quote::before{content:"\F1021"}.mdi-comment-quote-outline::before{content:"\F1022"}.mdi-comment-remove::before{content:"\F05DE"}.mdi-comment-remove-outline::before{content:"\F0187"}.mdi-comment-search::before{content:"\F0A3C"}.mdi-comment-search-outline::before{content:"\F0A3D"}.mdi-comment-text::before{content:"\F0188"}.mdi-comment-text-multiple::before{content:"\F0860"}.mdi-comment-text-multiple-outline::before{content:"\F0861"}.mdi-comment-text-outline::before{content:"\F0189"}.mdi-compare::before{content:"\F018A"}.mdi-compare-horizontal::before{content:"\F1492"}.mdi-compare-remove::before{content:"\F18B3"}.mdi-compare-vertical::before{content:"\F1493"}.mdi-compass::before{content:"\F018B"}.mdi-compass-off::before{content:"\F0B80"}.mdi-compass-off-outline::before{content:"\F0B81"}.mdi-compass-outline::before{content:"\F018C"}.mdi-compass-rose::before{content:"\F1382"}.mdi-compost::before{content:"\F1A38"}.mdi-cone::before{content:"\F194C"}.mdi-cone-off::before{content:"\F194D"}.mdi-connection::before{content:"\F1616"}.mdi-console::before{content:"\F018D"}.mdi-console-line::before{content:"\F07B7"}.mdi-console-network::before{content:"\F08A9"}.mdi-console-network-outline::before{content:"\F0C60"}.mdi-consolidate::before{content:"\F10D8"}.mdi-contactless-payment::before{content:"\F0D6A"}.mdi-contactless-payment-circle::before{content:"\F0321"}.mdi-contactless-payment-circle-outline::before{content:"\F0408"}.mdi-contacts::before{content:"\F06CB"}.mdi-contacts-outline::before{content:"\F05B8"}.mdi-contain::before{content:"\F0A3E"}.mdi-contain-end::before{content:"\F0A3F"}.mdi-contain-start::before{content:"\F0A40"}.mdi-content-copy::before{content:"\F018F"}.mdi-content-cut::before{content:"\F0190"}.mdi-content-duplicate::before{content:"\F0191"}.mdi-content-paste::before{content:"\F0192"}.mdi-content-save::before{content:"\F0193"}.mdi-content-save-alert::before{content:"\F0F42"}.mdi-content-save-alert-outline::before{content:"\F0F43"}.mdi-content-save-all::before{content:"\F0194"}.mdi-content-save-all-outline::before{content:"\F0F44"}.mdi-content-save-check::before{content:"\F18EA"}.mdi-content-save-check-outline::before{content:"\F18EB"}.mdi-content-save-cog::before{content:"\F145B"}.mdi-content-save-cog-outline::before{content:"\F145C"}.mdi-content-save-edit::before{content:"\F0CFB"}.mdi-content-save-edit-outline::before{content:"\F0CFC"}.mdi-content-save-minus::before{content:"\F1B43"}.mdi-content-save-minus-outline::before{content:"\F1B44"}.mdi-content-save-move::before{content:"\F0E27"}.mdi-content-save-move-outline::before{content:"\F0E28"}.mdi-content-save-off::before{content:"\F1643"}.mdi-content-save-off-outline::before{content:"\F1644"}.mdi-content-save-outline::before{content:"\F0818"}.mdi-content-save-plus::before{content:"\F1B41"}.mdi-content-save-plus-outline::before{content:"\F1B42"}.mdi-content-save-settings::before{content:"\F061B"}.mdi-content-save-settings-outline::before{content:"\F0B2E"}.mdi-contrast::before{content:"\F0195"}.mdi-contrast-box::before{content:"\F0196"}.mdi-contrast-circle::before{content:"\F0197"}.mdi-controller::before{content:"\F02B4"}.mdi-controller-classic::before{content:"\F0B82"}.mdi-controller-classic-outline::before{content:"\F0B83"}.mdi-controller-off::before{content:"\F02B5"}.mdi-cookie::before{content:"\F0198"}.mdi-cookie-alert::before{content:"\F16D0"}.mdi-cookie-alert-outline::before{content:"\F16D1"}.mdi-cookie-check::before{content:"\F16D2"}.mdi-cookie-check-outline::before{content:"\F16D3"}.mdi-cookie-clock::before{content:"\F16E4"}.mdi-cookie-clock-outline::before{content:"\F16E5"}.mdi-cookie-cog::before{content:"\F16D4"}.mdi-cookie-cog-outline::before{content:"\F16D5"}.mdi-cookie-edit::before{content:"\F16E6"}.mdi-cookie-edit-outline::before{content:"\F16E7"}.mdi-cookie-lock::before{content:"\F16E8"}.mdi-cookie-lock-outline::before{content:"\F16E9"}.mdi-cookie-minus::before{content:"\F16DA"}.mdi-cookie-minus-outline::before{content:"\F16DB"}.mdi-cookie-off::before{content:"\F16EA"}.mdi-cookie-off-outline::before{content:"\F16EB"}.mdi-cookie-outline::before{content:"\F16DE"}.mdi-cookie-plus::before{content:"\F16D6"}.mdi-cookie-plus-outline::before{content:"\F16D7"}.mdi-cookie-refresh::before{content:"\F16EC"}.mdi-cookie-refresh-outline::before{content:"\F16ED"}.mdi-cookie-remove::before{content:"\F16D8"}.mdi-cookie-remove-outline::before{content:"\F16D9"}.mdi-cookie-settings::before{content:"\F16DC"}.mdi-cookie-settings-outline::before{content:"\F16DD"}.mdi-coolant-temperature::before{content:"\F03C8"}.mdi-copyleft::before{content:"\F1939"}.mdi-copyright::before{content:"\F05E6"}.mdi-cordova::before{content:"\F0958"}.mdi-corn::before{content:"\F07B8"}.mdi-corn-off::before{content:"\F13EF"}.mdi-cosine-wave::before{content:"\F1479"}.mdi-counter::before{content:"\F0199"}.mdi-countertop::before{content:"\F181C"}.mdi-countertop-outline::before{content:"\F181D"}.mdi-cow::before{content:"\F019A"}.mdi-cow-off::before{content:"\F18FC"}.mdi-cpu-32-bit::before{content:"\F0EDF"}.mdi-cpu-64-bit::before{content:"\F0EE0"}.mdi-cradle::before{content:"\F198B"}.mdi-cradle-outline::before{content:"\F1991"}.mdi-crane::before{content:"\F0862"}.mdi-creation::before{content:"\F0674"}.mdi-creation-outline::before{content:"\F1C2B"}.mdi-creative-commons::before{content:"\F0D6B"}.mdi-credit-card::before{content:"\F0FEF"}.mdi-credit-card-check::before{content:"\F13D0"}.mdi-credit-card-check-outline::before{content:"\F13D1"}.mdi-credit-card-chip::before{content:"\F190F"}.mdi-credit-card-chip-outline::before{content:"\F1910"}.mdi-credit-card-clock::before{content:"\F0EE1"}.mdi-credit-card-clock-outline::before{content:"\F0EE2"}.mdi-credit-card-edit::before{content:"\F17D7"}.mdi-credit-card-edit-outline::before{content:"\F17D8"}.mdi-credit-card-fast::before{content:"\F1911"}.mdi-credit-card-fast-outline::before{content:"\F1912"}.mdi-credit-card-lock::before{content:"\F18E7"}.mdi-credit-card-lock-outline::before{content:"\F18E8"}.mdi-credit-card-marker::before{content:"\F06A8"}.mdi-credit-card-marker-outline::before{content:"\F0DBE"}.mdi-credit-card-minus::before{content:"\F0FAC"}.mdi-credit-card-minus-outline::before{content:"\F0FAD"}.mdi-credit-card-multiple::before{content:"\F0FF0"}.mdi-credit-card-multiple-outline::before{content:"\F019C"}.mdi-credit-card-off::before{content:"\F0FF1"}.mdi-credit-card-off-outline::before{content:"\F05E4"}.mdi-credit-card-outline::before{content:"\F019B"}.mdi-credit-card-plus::before{content:"\F0FF2"}.mdi-credit-card-plus-outline::before{content:"\F0676"}.mdi-credit-card-refresh::before{content:"\F1645"}.mdi-credit-card-refresh-outline::before{content:"\F1646"}.mdi-credit-card-refund::before{content:"\F0FF3"}.mdi-credit-card-refund-outline::before{content:"\F0AA8"}.mdi-credit-card-remove::before{content:"\F0FAE"}.mdi-credit-card-remove-outline::before{content:"\F0FAF"}.mdi-credit-card-scan::before{content:"\F0FF4"}.mdi-credit-card-scan-outline::before{content:"\F019D"}.mdi-credit-card-search::before{content:"\F1647"}.mdi-credit-card-search-outline::before{content:"\F1648"}.mdi-credit-card-settings::before{content:"\F0FF5"}.mdi-credit-card-settings-outline::before{content:"\F08D7"}.mdi-credit-card-sync::before{content:"\F1649"}.mdi-credit-card-sync-outline::before{content:"\F164A"}.mdi-credit-card-wireless::before{content:"\F0802"}.mdi-credit-card-wireless-off::before{content:"\F057A"}.mdi-credit-card-wireless-off-outline::before{content:"\F057B"}.mdi-credit-card-wireless-outline::before{content:"\F0D6C"}.mdi-cricket::before{content:"\F0D6D"}.mdi-crop::before{content:"\F019E"}.mdi-crop-free::before{content:"\F019F"}.mdi-crop-landscape::before{content:"\F01A0"}.mdi-crop-portrait::before{content:"\F01A1"}.mdi-crop-rotate::before{content:"\F0696"}.mdi-crop-square::before{content:"\F01A2"}.mdi-cross::before{content:"\F0953"}.mdi-cross-bolnisi::before{content:"\F0CED"}.mdi-cross-celtic::before{content:"\F0CF5"}.mdi-cross-outline::before{content:"\F0CF6"}.mdi-crosshairs::before{content:"\F01A3"}.mdi-crosshairs-gps::before{content:"\F01A4"}.mdi-crosshairs-off::before{content:"\F0F45"}.mdi-crosshairs-question::before{content:"\F1136"}.mdi-crowd::before{content:"\F1975"}.mdi-crown::before{content:"\F01A5"}.mdi-crown-circle::before{content:"\F17DC"}.mdi-crown-circle-outline::before{content:"\F17DD"}.mdi-crown-outline::before{content:"\F11D0"}.mdi-cryengine::before{content:"\F0959"}.mdi-crystal-ball::before{content:"\F0B2F"}.mdi-cube::before{content:"\F01A6"}.mdi-cube-off::before{content:"\F141C"}.mdi-cube-off-outline::before{content:"\F141D"}.mdi-cube-outline::before{content:"\F01A7"}.mdi-cube-scan::before{content:"\F0B84"}.mdi-cube-send::before{content:"\F01A8"}.mdi-cube-unfolded::before{content:"\F01A9"}.mdi-cup::before{content:"\F01AA"}.mdi-cup-off::before{content:"\F05E5"}.mdi-cup-off-outline::before{content:"\F137D"}.mdi-cup-outline::before{content:"\F130F"}.mdi-cup-water::before{content:"\F01AB"}.mdi-cupboard::before{content:"\F0F46"}.mdi-cupboard-outline::before{content:"\F0F47"}.mdi-cupcake::before{content:"\F095A"}.mdi-curling::before{content:"\F0863"}.mdi-currency-bdt::before{content:"\F0864"}.mdi-currency-brl::before{content:"\F0B85"}.mdi-currency-btc::before{content:"\F01AC"}.mdi-currency-cny::before{content:"\F07BA"}.mdi-currency-eth::before{content:"\F07BB"}.mdi-currency-eur::before{content:"\F01AD"}.mdi-currency-eur-off::before{content:"\F1315"}.mdi-currency-fra::before{content:"\F1A39"}.mdi-currency-gbp::before{content:"\F01AE"}.mdi-currency-ils::before{content:"\F0C61"}.mdi-currency-inr::before{content:"\F01AF"}.mdi-currency-jpy::before{content:"\F07BC"}.mdi-currency-krw::before{content:"\F07BD"}.mdi-currency-kzt::before{content:"\F0865"}.mdi-currency-mnt::before{content:"\F1512"}.mdi-currency-ngn::before{content:"\F01B0"}.mdi-currency-php::before{content:"\F09E6"}.mdi-currency-rial::before{content:"\F0E9C"}.mdi-currency-rub::before{content:"\F01B1"}.mdi-currency-rupee::before{content:"\F1976"}.mdi-currency-sign::before{content:"\F07BE"}.mdi-currency-thb::before{content:"\F1C05"}.mdi-currency-try::before{content:"\F01B2"}.mdi-currency-twd::before{content:"\F07BF"}.mdi-currency-uah::before{content:"\F1B9B"}.mdi-currency-usd::before{content:"\F01C1"}.mdi-currency-usd-off::before{content:"\F067A"}.mdi-current-ac::before{content:"\F1480"}.mdi-current-dc::before{content:"\F095C"}.mdi-cursor-default::before{content:"\F01C0"}.mdi-cursor-default-click::before{content:"\F0CFD"}.mdi-cursor-default-click-outline::before{content:"\F0CFE"}.mdi-cursor-default-gesture::before{content:"\F1127"}.mdi-cursor-default-gesture-outline::before{content:"\F1128"}.mdi-cursor-default-outline::before{content:"\F01BF"}.mdi-cursor-move::before{content:"\F01BE"}.mdi-cursor-pointer::before{content:"\F01BD"}.mdi-cursor-text::before{content:"\F05E7"}.mdi-curtains::before{content:"\F1846"}.mdi-curtains-closed::before{content:"\F1847"}.mdi-cylinder::before{content:"\F194E"}.mdi-cylinder-off::before{content:"\F194F"}.mdi-dance-ballroom::before{content:"\F15FB"}.mdi-dance-pole::before{content:"\F1578"}.mdi-data-matrix::before{content:"\F153C"}.mdi-data-matrix-edit::before{content:"\F153D"}.mdi-data-matrix-minus::before{content:"\F153E"}.mdi-data-matrix-plus::before{content:"\F153F"}.mdi-data-matrix-remove::before{content:"\F1540"}.mdi-data-matrix-scan::before{content:"\F1541"}.mdi-database::before{content:"\F01BC"}.mdi-database-alert::before{content:"\F163A"}.mdi-database-alert-outline::before{content:"\F1624"}.mdi-database-arrow-down::before{content:"\F163B"}.mdi-database-arrow-down-outline::before{content:"\F1625"}.mdi-database-arrow-left::before{content:"\F163C"}.mdi-database-arrow-left-outline::before{content:"\F1626"}.mdi-database-arrow-right::before{content:"\F163D"}.mdi-database-arrow-right-outline::before{content:"\F1627"}.mdi-database-arrow-up::before{content:"\F163E"}.mdi-database-arrow-up-outline::before{content:"\F1628"}.mdi-database-check::before{content:"\F0AA9"}.mdi-database-check-outline::before{content:"\F1629"}.mdi-database-clock::before{content:"\F163F"}.mdi-database-clock-outline::before{content:"\F162A"}.mdi-database-cog::before{content:"\F164B"}.mdi-database-cog-outline::before{content:"\F164C"}.mdi-database-edit::before{content:"\F0B86"}.mdi-database-edit-outline::before{content:"\F162B"}.mdi-database-export::before{content:"\F095E"}.mdi-database-export-outline::before{content:"\F162C"}.mdi-database-eye::before{content:"\F191F"}.mdi-database-eye-off::before{content:"\F1920"}.mdi-database-eye-off-outline::before{content:"\F1921"}.mdi-database-eye-outline::before{content:"\F1922"}.mdi-database-import::before{content:"\F095D"}.mdi-database-import-outline::before{content:"\F162D"}.mdi-database-lock::before{content:"\F0AAA"}.mdi-database-lock-outline::before{content:"\F162E"}.mdi-database-marker::before{content:"\F12F6"}.mdi-database-marker-outline::before{content:"\F162F"}.mdi-database-minus::before{content:"\F01BB"}.mdi-database-minus-outline::before{content:"\F1630"}.mdi-database-off::before{content:"\F1640"}.mdi-database-off-outline::before{content:"\F1631"}.mdi-database-outline::before{content:"\F1632"}.mdi-database-plus::before{content:"\F01BA"}.mdi-database-plus-outline::before{content:"\F1633"}.mdi-database-refresh::before{content:"\F05C2"}.mdi-database-refresh-outline::before{content:"\F1634"}.mdi-database-remove::before{content:"\F0D00"}.mdi-database-remove-outline::before{content:"\F1635"}.mdi-database-search::before{content:"\F0866"}.mdi-database-search-outline::before{content:"\F1636"}.mdi-database-settings::before{content:"\F0D01"}.mdi-database-settings-outline::before{content:"\F1637"}.mdi-database-sync::before{content:"\F0CFF"}.mdi-database-sync-outline::before{content:"\F1638"}.mdi-death-star::before{content:"\F08D8"}.mdi-death-star-variant::before{content:"\F08D9"}.mdi-deathly-hallows::before{content:"\F0B87"}.mdi-debian::before{content:"\F08DA"}.mdi-debug-step-into::before{content:"\F01B9"}.mdi-debug-step-out::before{content:"\F01B8"}.mdi-debug-step-over::before{content:"\F01B7"}.mdi-decagram::before{content:"\F076C"}.mdi-decagram-outline::before{content:"\F076D"}.mdi-decimal::before{content:"\F10A1"}.mdi-decimal-comma::before{content:"\F10A2"}.mdi-decimal-comma-decrease::before{content:"\F10A3"}.mdi-decimal-comma-increase::before{content:"\F10A4"}.mdi-decimal-decrease::before{content:"\F01B6"}.mdi-decimal-increase::before{content:"\F01B5"}.mdi-delete::before{content:"\F01B4"}.mdi-delete-alert::before{content:"\F10A5"}.mdi-delete-alert-outline::before{content:"\F10A6"}.mdi-delete-circle::before{content:"\F0683"}.mdi-delete-circle-outline::before{content:"\F0B88"}.mdi-delete-clock::before{content:"\F1556"}.mdi-delete-clock-outline::before{content:"\F1557"}.mdi-delete-empty::before{content:"\F06CC"}.mdi-delete-empty-outline::before{content:"\F0E9D"}.mdi-delete-forever::before{content:"\F05E8"}.mdi-delete-forever-outline::before{content:"\F0B89"}.mdi-delete-off::before{content:"\F10A7"}.mdi-delete-off-outline::before{content:"\F10A8"}.mdi-delete-outline::before{content:"\F09E7"}.mdi-delete-restore::before{content:"\F0819"}.mdi-delete-sweep::before{content:"\F05E9"}.mdi-delete-sweep-outline::before{content:"\F0C62"}.mdi-delete-variant::before{content:"\F01B3"}.mdi-delta::before{content:"\F01C2"}.mdi-desk::before{content:"\F1239"}.mdi-desk-lamp::before{content:"\F095F"}.mdi-desk-lamp-off::before{content:"\F1B1F"}.mdi-desk-lamp-on::before{content:"\F1B20"}.mdi-deskphone::before{content:"\F01C3"}.mdi-desktop-classic::before{content:"\F07C0"}.mdi-desktop-tower::before{content:"\F01C5"}.mdi-desktop-tower-monitor::before{content:"\F0AAB"}.mdi-details::before{content:"\F01C6"}.mdi-dev-to::before{content:"\F0D6E"}.mdi-developer-board::before{content:"\F0697"}.mdi-deviantart::before{content:"\F01C7"}.mdi-devices::before{content:"\F0FB0"}.mdi-dharmachakra::before{content:"\F094B"}.mdi-diabetes::before{content:"\F1126"}.mdi-dialpad::before{content:"\F061C"}.mdi-diameter::before{content:"\F0C63"}.mdi-diameter-outline::before{content:"\F0C64"}.mdi-diameter-variant::before{content:"\F0C65"}.mdi-diamond::before{content:"\F0B8A"}.mdi-diamond-outline::before{content:"\F0B8B"}.mdi-diamond-stone::before{content:"\F01C8"}.mdi-diaper-outline::before{content:"\F1CCF"}.mdi-dice-1::before{content:"\F01CA"}.mdi-dice-1-outline::before{content:"\F114A"}.mdi-dice-2::before{content:"\F01CB"}.mdi-dice-2-outline::before{content:"\F114B"}.mdi-dice-3::before{content:"\F01CC"}.mdi-dice-3-outline::before{content:"\F114C"}.mdi-dice-4::before{content:"\F01CD"}.mdi-dice-4-outline::before{content:"\F114D"}.mdi-dice-5::before{content:"\F01CE"}.mdi-dice-5-outline::before{content:"\F114E"}.mdi-dice-6::before{content:"\F01CF"}.mdi-dice-6-outline::before{content:"\F114F"}.mdi-dice-d10::before{content:"\F1153"}.mdi-dice-d10-outline::before{content:"\F076F"}.mdi-dice-d12::before{content:"\F1154"}.mdi-dice-d12-outline::before{content:"\F0867"}.mdi-dice-d20::before{content:"\F1155"}.mdi-dice-d20-outline::before{content:"\F05EA"}.mdi-dice-d4::before{content:"\F1150"}.mdi-dice-d4-outline::before{content:"\F05EB"}.mdi-dice-d6::before{content:"\F1151"}.mdi-dice-d6-outline::before{content:"\F05ED"}.mdi-dice-d8::before{content:"\F1152"}.mdi-dice-d8-outline::before{content:"\F05EC"}.mdi-dice-multiple::before{content:"\F076E"}.mdi-dice-multiple-outline::before{content:"\F1156"}.mdi-digital-ocean::before{content:"\F1237"}.mdi-dip-switch::before{content:"\F07C1"}.mdi-directions::before{content:"\F01D0"}.mdi-directions-fork::before{content:"\F0641"}.mdi-disc::before{content:"\F05EE"}.mdi-disc-alert::before{content:"\F01D1"}.mdi-disc-player::before{content:"\F0960"}.mdi-dishwasher::before{content:"\F0AAC"}.mdi-dishwasher-alert::before{content:"\F11B8"}.mdi-dishwasher-off::before{content:"\F11B9"}.mdi-disqus::before{content:"\F01D2"}.mdi-distribute-horizontal-center::before{content:"\F11C9"}.mdi-distribute-horizontal-left::before{content:"\F11C8"}.mdi-distribute-horizontal-right::before{content:"\F11CA"}.mdi-distribute-vertical-bottom::before{content:"\F11CB"}.mdi-distribute-vertical-center::before{content:"\F11CC"}.mdi-distribute-vertical-top::before{content:"\F11CD"}.mdi-diversify::before{content:"\F1877"}.mdi-diving::before{content:"\F1977"}.mdi-diving-flippers::before{content:"\F0DBF"}.mdi-diving-helmet::before{content:"\F0DC0"}.mdi-diving-scuba::before{content:"\F1B77"}.mdi-diving-scuba-flag::before{content:"\F0DC2"}.mdi-diving-scuba-mask::before{content:"\F0DC1"}.mdi-diving-scuba-tank::before{content:"\F0DC3"}.mdi-diving-scuba-tank-multiple::before{content:"\F0DC4"}.mdi-diving-snorkel::before{content:"\F0DC5"}.mdi-division::before{content:"\F01D4"}.mdi-division-box::before{content:"\F01D5"}.mdi-dlna::before{content:"\F0A41"}.mdi-dna::before{content:"\F0684"}.mdi-dns::before{content:"\F01D6"}.mdi-dns-outline::before{content:"\F0B8C"}.mdi-dock-bottom::before{content:"\F10A9"}.mdi-dock-left::before{content:"\F10AA"}.mdi-dock-right::before{content:"\F10AB"}.mdi-dock-top::before{content:"\F1513"}.mdi-dock-window::before{content:"\F10AC"}.mdi-docker::before{content:"\F0868"}.mdi-doctor::before{content:"\F0A42"}.mdi-dog::before{content:"\F0A43"}.mdi-dog-service::before{content:"\F0AAD"}.mdi-dog-side::before{content:"\F0A44"}.mdi-dog-side-off::before{content:"\F16EE"}.mdi-dolby::before{content:"\F06B3"}.mdi-dolly::before{content:"\F0E9E"}.mdi-dolphin::before{content:"\F18B4"}.mdi-domain::before{content:"\F01D7"}.mdi-domain-off::before{content:"\F0D6F"}.mdi-domain-plus::before{content:"\F10AD"}.mdi-domain-remove::before{content:"\F10AE"}.mdi-domain-switch::before{content:"\F1C2C"}.mdi-dome-light::before{content:"\F141E"}.mdi-domino-mask::before{content:"\F1023"}.mdi-donkey::before{content:"\F07C2"}.mdi-door::before{content:"\F081A"}.mdi-door-closed::before{content:"\F081B"}.mdi-door-closed-cancel::before{content:"\F1C93"}.mdi-door-closed-lock::before{content:"\F10AF"}.mdi-door-open::before{content:"\F081C"}.mdi-door-sliding::before{content:"\F181E"}.mdi-door-sliding-lock::before{content:"\F181F"}.mdi-door-sliding-open::before{content:"\F1820"}.mdi-doorbell::before{content:"\F12E6"}.mdi-doorbell-video::before{content:"\F0869"}.mdi-dot-net::before{content:"\F0AAE"}.mdi-dots-circle::before{content:"\F1978"}.mdi-dots-grid::before{content:"\F15FC"}.mdi-dots-hexagon::before{content:"\F15FF"}.mdi-dots-horizontal::before{content:"\F01D8"}.mdi-dots-horizontal-circle::before{content:"\F07C3"}.mdi-dots-horizontal-circle-outline::before{content:"\F0B8D"}.mdi-dots-square::before{content:"\F15FD"}.mdi-dots-triangle::before{content:"\F15FE"}.mdi-dots-vertical::before{content:"\F01D9"}.mdi-dots-vertical-circle::before{content:"\F07C4"}.mdi-dots-vertical-circle-outline::before{content:"\F0B8E"}.mdi-download::before{content:"\F01DA"}.mdi-download-box::before{content:"\F1462"}.mdi-download-box-outline::before{content:"\F1463"}.mdi-download-circle::before{content:"\F1464"}.mdi-download-circle-outline::before{content:"\F1465"}.mdi-download-lock::before{content:"\F1320"}.mdi-download-lock-outline::before{content:"\F1321"}.mdi-download-multiple::before{content:"\F09E9"}.mdi-download-multiple-outline::before{content:"\F1CD0"}.mdi-download-network::before{content:"\F06F4"}.mdi-download-network-outline::before{content:"\F0C66"}.mdi-download-off::before{content:"\F10B0"}.mdi-download-off-outline::before{content:"\F10B1"}.mdi-download-outline::before{content:"\F0B8F"}.mdi-drag::before{content:"\F01DB"}.mdi-drag-horizontal::before{content:"\F01DC"}.mdi-drag-horizontal-variant::before{content:"\F12F0"}.mdi-drag-variant::before{content:"\F0B90"}.mdi-drag-vertical::before{content:"\F01DD"}.mdi-drag-vertical-variant::before{content:"\F12F1"}.mdi-drama-masks::before{content:"\F0D02"}.mdi-draw::before{content:"\F0F49"}.mdi-draw-pen::before{content:"\F19B9"}.mdi-drawing::before{content:"\F01DE"}.mdi-drawing-box::before{content:"\F01DF"}.mdi-dresser::before{content:"\F0F4A"}.mdi-dresser-outline::before{content:"\F0F4B"}.mdi-drone::before{content:"\F01E2"}.mdi-dropbox::before{content:"\F01E3"}.mdi-drupal::before{content:"\F01E4"}.mdi-duck::before{content:"\F01E5"}.mdi-dumbbell::before{content:"\F01E6"}.mdi-dump-truck::before{content:"\F0C67"}.mdi-ear-hearing::before{content:"\F07C5"}.mdi-ear-hearing-loop::before{content:"\F1AEE"}.mdi-ear-hearing-off::before{content:"\F0A45"}.mdi-earbuds::before{content:"\F184F"}.mdi-earbuds-off::before{content:"\F1850"}.mdi-earbuds-off-outline::before{content:"\F1851"}.mdi-earbuds-outline::before{content:"\F1852"}.mdi-earth::before{content:"\F01E7"}.mdi-earth-arrow-down::before{content:"\F1C87"}.mdi-earth-arrow-left::before{content:"\F1C88"}.mdi-earth-arrow-right::before{content:"\F1311"}.mdi-earth-arrow-up::before{content:"\F1C89"}.mdi-earth-box::before{content:"\F06CD"}.mdi-earth-box-minus::before{content:"\F1407"}.mdi-earth-box-off::before{content:"\F06CE"}.mdi-earth-box-plus::before{content:"\F1406"}.mdi-earth-box-remove::before{content:"\F1408"}.mdi-earth-minus::before{content:"\F1404"}.mdi-earth-off::before{content:"\F01E8"}.mdi-earth-plus::before{content:"\F1403"}.mdi-earth-remove::before{content:"\F1405"}.mdi-egg::before{content:"\F0AAF"}.mdi-egg-easter::before{content:"\F0AB0"}.mdi-egg-fried::before{content:"\F184A"}.mdi-egg-off::before{content:"\F13F0"}.mdi-egg-off-outline::before{content:"\F13F1"}.mdi-egg-outline::before{content:"\F13F2"}.mdi-eiffel-tower::before{content:"\F156B"}.mdi-eight-track::before{content:"\F09EA"}.mdi-eject::before{content:"\F01EA"}.mdi-eject-circle::before{content:"\F1B23"}.mdi-eject-circle-outline::before{content:"\F1B24"}.mdi-eject-outline::before{content:"\F0B91"}.mdi-electric-switch::before{content:"\F0E9F"}.mdi-electric-switch-closed::before{content:"\F10D9"}.mdi-electron-framework::before{content:"\F1024"}.mdi-elephant::before{content:"\F07C6"}.mdi-elevation-decline::before{content:"\F01EB"}.mdi-elevation-rise::before{content:"\F01EC"}.mdi-elevator::before{content:"\F01ED"}.mdi-elevator-down::before{content:"\F12C2"}.mdi-elevator-passenger::before{content:"\F1381"}.mdi-elevator-passenger-off::before{content:"\F1979"}.mdi-elevator-passenger-off-outline::before{content:"\F197A"}.mdi-elevator-passenger-outline::before{content:"\F197B"}.mdi-elevator-up::before{content:"\F12C1"}.mdi-ellipse::before{content:"\F0EA0"}.mdi-ellipse-outline::before{content:"\F0EA1"}.mdi-email::before{content:"\F01EE"}.mdi-email-alert::before{content:"\F06CF"}.mdi-email-alert-outline::before{content:"\F0D42"}.mdi-email-arrow-left::before{content:"\F10DA"}.mdi-email-arrow-left-outline::before{content:"\F10DB"}.mdi-email-arrow-right::before{content:"\F10DC"}.mdi-email-arrow-right-outline::before{content:"\F10DD"}.mdi-email-box::before{content:"\F0D03"}.mdi-email-check::before{content:"\F0AB1"}.mdi-email-check-outline::before{content:"\F0AB2"}.mdi-email-edit::before{content:"\F0EE3"}.mdi-email-edit-outline::before{content:"\F0EE4"}.mdi-email-fast::before{content:"\F186F"}.mdi-email-fast-outline::before{content:"\F1870"}.mdi-email-heart-outline::before{content:"\F1C5B"}.mdi-email-lock::before{content:"\F01F1"}.mdi-email-lock-outline::before{content:"\F1B61"}.mdi-email-mark-as-unread::before{content:"\F0B92"}.mdi-email-minus::before{content:"\F0EE5"}.mdi-email-minus-outline::before{content:"\F0EE6"}.mdi-email-multiple::before{content:"\F0EE7"}.mdi-email-multiple-outline::before{content:"\F0EE8"}.mdi-email-newsletter::before{content:"\F0FB1"}.mdi-email-off::before{content:"\F13E3"}.mdi-email-off-outline::before{content:"\F13E4"}.mdi-email-open::before{content:"\F01EF"}.mdi-email-open-heart-outline::before{content:"\F1C5C"}.mdi-email-open-multiple::before{content:"\F0EE9"}.mdi-email-open-multiple-outline::before{content:"\F0EEA"}.mdi-email-open-outline::before{content:"\F05EF"}.mdi-email-outline::before{content:"\F01F0"}.mdi-email-plus::before{content:"\F09EB"}.mdi-email-plus-outline::before{content:"\F09EC"}.mdi-email-remove::before{content:"\F1661"}.mdi-email-remove-outline::before{content:"\F1662"}.mdi-email-seal::before{content:"\F195B"}.mdi-email-seal-outline::before{content:"\F195C"}.mdi-email-search::before{content:"\F0961"}.mdi-email-search-outline::before{content:"\F0962"}.mdi-email-sync::before{content:"\F12C7"}.mdi-email-sync-outline::before{content:"\F12C8"}.mdi-email-variant::before{content:"\F05F0"}.mdi-ember::before{content:"\F0B30"}.mdi-emby::before{content:"\F06B4"}.mdi-emoticon::before{content:"\F0C68"}.mdi-emoticon-angry::before{content:"\F0C69"}.mdi-emoticon-angry-outline::before{content:"\F0C6A"}.mdi-emoticon-confused::before{content:"\F10DE"}.mdi-emoticon-confused-outline::before{content:"\F10DF"}.mdi-emoticon-cool::before{content:"\F0C6B"}.mdi-emoticon-cool-outline::before{content:"\F01F3"}.mdi-emoticon-cry::before{content:"\F0C6C"}.mdi-emoticon-cry-outline::before{content:"\F0C6D"}.mdi-emoticon-dead::before{content:"\F0C6E"}.mdi-emoticon-dead-outline::before{content:"\F069B"}.mdi-emoticon-devil::before{content:"\F0C6F"}.mdi-emoticon-devil-outline::before{content:"\F01F4"}.mdi-emoticon-excited::before{content:"\F0C70"}.mdi-emoticon-excited-outline::before{content:"\F069C"}.mdi-emoticon-frown::before{content:"\F0F4C"}.mdi-emoticon-frown-outline::before{content:"\F0F4D"}.mdi-emoticon-happy::before{content:"\F0C71"}.mdi-emoticon-happy-outline::before{content:"\F01F5"}.mdi-emoticon-kiss::before{content:"\F0C72"}.mdi-emoticon-kiss-outline::before{content:"\F0C73"}.mdi-emoticon-lol::before{content:"\F1214"}.mdi-emoticon-lol-outline::before{content:"\F1215"}.mdi-emoticon-minus::before{content:"\F1CB2"}.mdi-emoticon-minus-outline::before{content:"\F1CB3"}.mdi-emoticon-neutral::before{content:"\F0C74"}.mdi-emoticon-neutral-outline::before{content:"\F01F6"}.mdi-emoticon-outline::before{content:"\F01F2"}.mdi-emoticon-plus::before{content:"\F1CB4"}.mdi-emoticon-plus-outline::before{content:"\F1CB5"}.mdi-emoticon-poop::before{content:"\F01F7"}.mdi-emoticon-poop-outline::before{content:"\F0C75"}.mdi-emoticon-remove::before{content:"\F1CB6"}.mdi-emoticon-remove-outline::before{content:"\F1CB7"}.mdi-emoticon-sad::before{content:"\F0C76"}.mdi-emoticon-sad-outline::before{content:"\F01F8"}.mdi-emoticon-sick::before{content:"\F157C"}.mdi-emoticon-sick-outline::before{content:"\F157D"}.mdi-emoticon-tongue::before{content:"\F01F9"}.mdi-emoticon-tongue-outline::before{content:"\F0C77"}.mdi-emoticon-wink::before{content:"\F0C78"}.mdi-emoticon-wink-outline::before{content:"\F0C79"}.mdi-engine::before{content:"\F01FA"}.mdi-engine-off::before{content:"\F0A46"}.mdi-engine-off-outline::before{content:"\F0A47"}.mdi-engine-outline::before{content:"\F01FB"}.mdi-epsilon::before{content:"\F10E0"}.mdi-equal::before{content:"\F01FC"}.mdi-equal-box::before{content:"\F01FD"}.mdi-equalizer::before{content:"\F0EA2"}.mdi-equalizer-outline::before{content:"\F0EA3"}.mdi-eraser::before{content:"\F01FE"}.mdi-eraser-variant::before{content:"\F0642"}.mdi-escalator::before{content:"\F01FF"}.mdi-escalator-box::before{content:"\F1399"}.mdi-escalator-down::before{content:"\F12C0"}.mdi-escalator-up::before{content:"\F12BF"}.mdi-eslint::before{content:"\F0C7A"}.mdi-et::before{content:"\F0AB3"}.mdi-ethereum::before{content:"\F086A"}.mdi-ethernet::before{content:"\F0200"}.mdi-ethernet-cable::before{content:"\F0201"}.mdi-ethernet-cable-off::before{content:"\F0202"}.mdi-ethernet-off::before{content:"\F1CD1"}.mdi-ev-plug-ccs1::before{content:"\F1519"}.mdi-ev-plug-ccs2::before{content:"\F151A"}.mdi-ev-plug-chademo::before{content:"\F151B"}.mdi-ev-plug-tesla::before{content:"\F151C"}.mdi-ev-plug-type1::before{content:"\F151D"}.mdi-ev-plug-type2::before{content:"\F151E"}.mdi-ev-station::before{content:"\F05F1"}.mdi-evernote::before{content:"\F0204"}.mdi-excavator::before{content:"\F1025"}.mdi-exclamation::before{content:"\F0205"}.mdi-exclamation-thick::before{content:"\F1238"}.mdi-exit-run::before{content:"\F0A48"}.mdi-exit-to-app::before{content:"\F0206"}.mdi-expand-all::before{content:"\F0AB4"}.mdi-expand-all-outline::before{content:"\F0AB5"}.mdi-expansion-card::before{content:"\F08AE"}.mdi-expansion-card-variant::before{content:"\F0FB2"}.mdi-exponent::before{content:"\F0963"}.mdi-exponent-box::before{content:"\F0964"}.mdi-export::before{content:"\F0207"}.mdi-export-variant::before{content:"\F0B93"}.mdi-eye::before{content:"\F0208"}.mdi-eye-arrow-left::before{content:"\F18FD"}.mdi-eye-arrow-left-outline::before{content:"\F18FE"}.mdi-eye-arrow-right::before{content:"\F18FF"}.mdi-eye-arrow-right-outline::before{content:"\F1900"}.mdi-eye-check::before{content:"\F0D04"}.mdi-eye-check-outline::before{content:"\F0D05"}.mdi-eye-circle::before{content:"\F0B94"}.mdi-eye-circle-outline::before{content:"\F0B95"}.mdi-eye-closed::before{content:"\F1CA3"}.mdi-eye-lock::before{content:"\F1C06"}.mdi-eye-lock-open::before{content:"\F1C07"}.mdi-eye-lock-open-outline::before{content:"\F1C08"}.mdi-eye-lock-outline::before{content:"\F1C09"}.mdi-eye-minus::before{content:"\F1026"}.mdi-eye-minus-outline::before{content:"\F1027"}.mdi-eye-off::before{content:"\F0209"}.mdi-eye-off-outline::before{content:"\F06D1"}.mdi-eye-outline::before{content:"\F06D0"}.mdi-eye-plus::before{content:"\F086B"}.mdi-eye-plus-outline::before{content:"\F086C"}.mdi-eye-refresh::before{content:"\F197C"}.mdi-eye-refresh-outline::before{content:"\F197D"}.mdi-eye-remove::before{content:"\F15E3"}.mdi-eye-remove-outline::before{content:"\F15E4"}.mdi-eye-settings::before{content:"\F086D"}.mdi-eye-settings-outline::before{content:"\F086E"}.mdi-eyedropper::before{content:"\F020A"}.mdi-eyedropper-minus::before{content:"\F13DD"}.mdi-eyedropper-off::before{content:"\F13DF"}.mdi-eyedropper-plus::before{content:"\F13DC"}.mdi-eyedropper-remove::before{content:"\F13DE"}.mdi-eyedropper-variant::before{content:"\F020B"}.mdi-face-agent::before{content:"\F0D70"}.mdi-face-man::before{content:"\F0643"}.mdi-face-man-outline::before{content:"\F0B96"}.mdi-face-man-profile::before{content:"\F0644"}.mdi-face-man-shimmer::before{content:"\F15CC"}.mdi-face-man-shimmer-outline::before{content:"\F15CD"}.mdi-face-mask::before{content:"\F1586"}.mdi-face-mask-outline::before{content:"\F1587"}.mdi-face-recognition::before{content:"\F0C7B"}.mdi-face-woman::before{content:"\F1077"}.mdi-face-woman-outline::before{content:"\F1078"}.mdi-face-woman-profile::before{content:"\F1076"}.mdi-face-woman-shimmer::before{content:"\F15CE"}.mdi-face-woman-shimmer-outline::before{content:"\F15CF"}.mdi-facebook::before{content:"\F020C"}.mdi-facebook-gaming::before{content:"\F07DD"}.mdi-facebook-messenger::before{content:"\F020E"}.mdi-facebook-workplace::before{content:"\F0B31"}.mdi-factory::before{content:"\F020F"}.mdi-family-tree::before{content:"\F160E"}.mdi-fan::before{content:"\F0210"}.mdi-fan-alert::before{content:"\F146C"}.mdi-fan-auto::before{content:"\F171D"}.mdi-fan-chevron-down::before{content:"\F146D"}.mdi-fan-chevron-up::before{content:"\F146E"}.mdi-fan-clock::before{content:"\F1A3A"}.mdi-fan-minus::before{content:"\F1470"}.mdi-fan-off::before{content:"\F081D"}.mdi-fan-plus::before{content:"\F146F"}.mdi-fan-remove::before{content:"\F1471"}.mdi-fan-speed-1::before{content:"\F1472"}.mdi-fan-speed-2::before{content:"\F1473"}.mdi-fan-speed-3::before{content:"\F1474"}.mdi-fast-forward::before{content:"\F0211"}.mdi-fast-forward-10::before{content:"\F0D71"}.mdi-fast-forward-15::before{content:"\F193A"}.mdi-fast-forward-30::before{content:"\F0D06"}.mdi-fast-forward-45::before{content:"\F1B12"}.mdi-fast-forward-5::before{content:"\F11F8"}.mdi-fast-forward-60::before{content:"\F160B"}.mdi-fast-forward-outline::before{content:"\F06D2"}.mdi-faucet::before{content:"\F1B29"}.mdi-faucet-variant::before{content:"\F1B2A"}.mdi-fax::before{content:"\F0212"}.mdi-feather::before{content:"\F06D3"}.mdi-feature-search::before{content:"\F0A49"}.mdi-feature-search-outline::before{content:"\F0A4A"}.mdi-fedora::before{content:"\F08DB"}.mdi-fence::before{content:"\F179A"}.mdi-fence-electric::before{content:"\F17F6"}.mdi-fencing::before{content:"\F14C1"}.mdi-ferris-wheel::before{content:"\F0EA4"}.mdi-ferry::before{content:"\F0213"}.mdi-file::before{content:"\F0214"}.mdi-file-account::before{content:"\F073B"}.mdi-file-account-outline::before{content:"\F1028"}.mdi-file-alert::before{content:"\F0A4B"}.mdi-file-alert-outline::before{content:"\F0A4C"}.mdi-file-arrow-left-right::before{content:"\F1A93"}.mdi-file-arrow-left-right-outline::before{content:"\F1A94"}.mdi-file-arrow-up-down::before{content:"\F1A95"}.mdi-file-arrow-up-down-outline::before{content:"\F1A96"}.mdi-file-cabinet::before{content:"\F0AB6"}.mdi-file-cad::before{content:"\F0EEB"}.mdi-file-cad-box::before{content:"\F0EEC"}.mdi-file-cancel::before{content:"\F0DC6"}.mdi-file-cancel-outline::before{content:"\F0DC7"}.mdi-file-certificate::before{content:"\F1186"}.mdi-file-certificate-outline::before{content:"\F1187"}.mdi-file-chart::before{content:"\F0215"}.mdi-file-chart-check::before{content:"\F19C6"}.mdi-file-chart-check-outline::before{content:"\F19C7"}.mdi-file-chart-outline::before{content:"\F1029"}.mdi-file-check::before{content:"\F0216"}.mdi-file-check-outline::before{content:"\F0E29"}.mdi-file-clock::before{content:"\F12E1"}.mdi-file-clock-outline::before{content:"\F12E2"}.mdi-file-cloud::before{content:"\F0217"}.mdi-file-cloud-outline::before{content:"\F102A"}.mdi-file-code::before{content:"\F022E"}.mdi-file-code-outline::before{content:"\F102B"}.mdi-file-cog::before{content:"\F107B"}.mdi-file-cog-outline::before{content:"\F107C"}.mdi-file-compare::before{content:"\F08AA"}.mdi-file-delimited::before{content:"\F0218"}.mdi-file-delimited-outline::before{content:"\F0EA5"}.mdi-file-document::before{content:"\F0219"}.mdi-file-document-alert::before{content:"\F1A97"}.mdi-file-document-alert-outline::before{content:"\F1A98"}.mdi-file-document-arrow-right::before{content:"\F1C0F"}.mdi-file-document-arrow-right-outline::before{content:"\F1C10"}.mdi-file-document-check::before{content:"\F1A99"}.mdi-file-document-check-outline::before{content:"\F1A9A"}.mdi-file-document-edit::before{content:"\F0DC8"}.mdi-file-document-edit-outline::before{content:"\F0DC9"}.mdi-file-document-minus::before{content:"\F1A9B"}.mdi-file-document-minus-outline::before{content:"\F1A9C"}.mdi-file-document-multiple::before{content:"\F1517"}.mdi-file-document-multiple-outline::before{content:"\F1518"}.mdi-file-document-outline::before{content:"\F09EE"}.mdi-file-document-plus::before{content:"\F1A9D"}.mdi-file-document-plus-outline::before{content:"\F1A9E"}.mdi-file-document-refresh::before{content:"\F1C7A"}.mdi-file-document-refresh-outline::before{content:"\F1C7B"}.mdi-file-document-remove::before{content:"\F1A9F"}.mdi-file-document-remove-outline::before{content:"\F1AA0"}.mdi-file-download::before{content:"\F0965"}.mdi-file-download-outline::before{content:"\F0966"}.mdi-file-edit::before{content:"\F11E7"}.mdi-file-edit-outline::before{content:"\F11E8"}.mdi-file-excel::before{content:"\F021B"}.mdi-file-excel-box::before{content:"\F021C"}.mdi-file-excel-box-outline::before{content:"\F102C"}.mdi-file-excel-outline::before{content:"\F102D"}.mdi-file-export::before{content:"\F021D"}.mdi-file-export-outline::before{content:"\F102E"}.mdi-file-eye::before{content:"\F0DCA"}.mdi-file-eye-outline::before{content:"\F0DCB"}.mdi-file-find::before{content:"\F021E"}.mdi-file-find-outline::before{content:"\F0B97"}.mdi-file-gif-box::before{content:"\F0D78"}.mdi-file-hidden::before{content:"\F0613"}.mdi-file-image::before{content:"\F021F"}.mdi-file-image-marker::before{content:"\F1772"}.mdi-file-image-marker-outline::before{content:"\F1773"}.mdi-file-image-minus::before{content:"\F193B"}.mdi-file-image-minus-outline::before{content:"\F193C"}.mdi-file-image-outline::before{content:"\F0EB0"}.mdi-file-image-plus::before{content:"\F193D"}.mdi-file-image-plus-outline::before{content:"\F193E"}.mdi-file-image-remove::before{content:"\F193F"}.mdi-file-image-remove-outline::before{content:"\F1940"}.mdi-file-import::before{content:"\F0220"}.mdi-file-import-outline::before{content:"\F102F"}.mdi-file-jpg-box::before{content:"\F0225"}.mdi-file-key::before{content:"\F1184"}.mdi-file-key-outline::before{content:"\F1185"}.mdi-file-link::before{content:"\F1177"}.mdi-file-link-outline::before{content:"\F1178"}.mdi-file-lock::before{content:"\F0221"}.mdi-file-lock-open::before{content:"\F19C8"}.mdi-file-lock-open-outline::before{content:"\F19C9"}.mdi-file-lock-outline::before{content:"\F1030"}.mdi-file-marker::before{content:"\F1774"}.mdi-file-marker-outline::before{content:"\F1775"}.mdi-file-minus::before{content:"\F1AA1"}.mdi-file-minus-outline::before{content:"\F1AA2"}.mdi-file-move::before{content:"\F0AB9"}.mdi-file-move-outline::before{content:"\F1031"}.mdi-file-multiple::before{content:"\F0222"}.mdi-file-multiple-outline::before{content:"\F1032"}.mdi-file-music::before{content:"\F0223"}.mdi-file-music-outline::before{content:"\F0E2A"}.mdi-file-outline::before{content:"\F0224"}.mdi-file-pdf-box::before{content:"\F0226"}.mdi-file-percent::before{content:"\F081E"}.mdi-file-percent-outline::before{content:"\F1033"}.mdi-file-phone::before{content:"\F1179"}.mdi-file-phone-outline::before{content:"\F117A"}.mdi-file-plus::before{content:"\F0752"}.mdi-file-plus-outline::before{content:"\F0EED"}.mdi-file-png-box::before{content:"\F0E2D"}.mdi-file-powerpoint::before{content:"\F0227"}.mdi-file-powerpoint-box::before{content:"\F0228"}.mdi-file-powerpoint-box-outline::before{content:"\F1034"}.mdi-file-powerpoint-outline::before{content:"\F1035"}.mdi-file-presentation-box::before{content:"\F0229"}.mdi-file-question::before{content:"\F086F"}.mdi-file-question-outline::before{content:"\F1036"}.mdi-file-refresh::before{content:"\F0918"}.mdi-file-refresh-outline::before{content:"\F0541"}.mdi-file-remove::before{content:"\F0B98"}.mdi-file-remove-outline::before{content:"\F1037"}.mdi-file-replace::before{content:"\F0B32"}.mdi-file-replace-outline::before{content:"\F0B33"}.mdi-file-restore::before{content:"\F0670"}.mdi-file-restore-outline::before{content:"\F1038"}.mdi-file-rotate-left::before{content:"\F1A3B"}.mdi-file-rotate-left-outline::before{content:"\F1A3C"}.mdi-file-rotate-right::before{content:"\F1A3D"}.mdi-file-rotate-right-outline::before{content:"\F1A3E"}.mdi-file-search::before{content:"\F0C7C"}.mdi-file-search-outline::before{content:"\F0C7D"}.mdi-file-send::before{content:"\F022A"}.mdi-file-send-outline::before{content:"\F1039"}.mdi-file-settings::before{content:"\F1079"}.mdi-file-settings-outline::before{content:"\F107A"}.mdi-file-sign::before{content:"\F19C3"}.mdi-file-star::before{content:"\F103A"}.mdi-file-star-four-points::before{content:"\F1C2D"}.mdi-file-star-four-points-outline::before{content:"\F1C2E"}.mdi-file-star-outline::before{content:"\F103B"}.mdi-file-swap::before{content:"\F0FB4"}.mdi-file-swap-outline::before{content:"\F0FB5"}.mdi-file-sync::before{content:"\F1216"}.mdi-file-sync-outline::before{content:"\F1217"}.mdi-file-table::before{content:"\F0C7E"}.mdi-file-table-box::before{content:"\F10E1"}.mdi-file-table-box-multiple::before{content:"\F10E2"}.mdi-file-table-box-multiple-outline::before{content:"\F10E3"}.mdi-file-table-box-outline::before{content:"\F10E4"}.mdi-file-table-outline::before{content:"\F0C7F"}.mdi-file-tree::before{content:"\F0645"}.mdi-file-tree-outline::before{content:"\F13D2"}.mdi-file-undo::before{content:"\F08DC"}.mdi-file-undo-outline::before{content:"\F103C"}.mdi-file-upload::before{content:"\F0A4D"}.mdi-file-upload-outline::before{content:"\F0A4E"}.mdi-file-video::before{content:"\F022B"}.mdi-file-video-outline::before{content:"\F0E2C"}.mdi-file-word::before{content:"\F022C"}.mdi-file-word-box::before{content:"\F022D"}.mdi-file-word-box-outline::before{content:"\F103D"}.mdi-file-word-outline::before{content:"\F103E"}.mdi-file-xml-box::before{content:"\F1B4B"}.mdi-film::before{content:"\F022F"}.mdi-filmstrip::before{content:"\F0230"}.mdi-filmstrip-box::before{content:"\F0332"}.mdi-filmstrip-box-multiple::before{content:"\F0D18"}.mdi-filmstrip-off::before{content:"\F0231"}.mdi-filter::before{content:"\F0232"}.mdi-filter-check::before{content:"\F18EC"}.mdi-filter-check-outline::before{content:"\F18ED"}.mdi-filter-cog::before{content:"\F1AA3"}.mdi-filter-cog-outline::before{content:"\F1AA4"}.mdi-filter-menu::before{content:"\F10E5"}.mdi-filter-menu-outline::before{content:"\F10E6"}.mdi-filter-minus::before{content:"\F0EEE"}.mdi-filter-minus-outline::before{content:"\F0EEF"}.mdi-filter-multiple::before{content:"\F1A3F"}.mdi-filter-multiple-outline::before{content:"\F1A40"}.mdi-filter-off::before{content:"\F14EF"}.mdi-filter-off-outline::before{content:"\F14F0"}.mdi-filter-outline::before{content:"\F0233"}.mdi-filter-plus::before{content:"\F0EF0"}.mdi-filter-plus-outline::before{content:"\F0EF1"}.mdi-filter-remove::before{content:"\F0234"}.mdi-filter-remove-outline::before{content:"\F0235"}.mdi-filter-settings::before{content:"\F1AA5"}.mdi-filter-settings-outline::before{content:"\F1AA6"}.mdi-filter-variant::before{content:"\F0236"}.mdi-filter-variant-minus::before{content:"\F1112"}.mdi-filter-variant-plus::before{content:"\F1113"}.mdi-filter-variant-remove::before{content:"\F103F"}.mdi-finance::before{content:"\F081F"}.mdi-find-replace::before{content:"\F06D4"}.mdi-fingerprint::before{content:"\F0237"}.mdi-fingerprint-off::before{content:"\F0EB1"}.mdi-fire::before{content:"\F0238"}.mdi-fire-alert::before{content:"\F15D7"}.mdi-fire-circle::before{content:"\F1807"}.mdi-fire-extinguisher::before{content:"\F0EF2"}.mdi-fire-hydrant::before{content:"\F1137"}.mdi-fire-hydrant-alert::before{content:"\F1138"}.mdi-fire-hydrant-off::before{content:"\F1139"}.mdi-fire-off::before{content:"\F1722"}.mdi-fire-station::before{content:"\F1CC3"}.mdi-fire-truck::before{content:"\F08AB"}.mdi-firebase::before{content:"\F0967"}.mdi-firefox::before{content:"\F0239"}.mdi-fireplace::before{content:"\F0E2E"}.mdi-fireplace-off::before{content:"\F0E2F"}.mdi-firewire::before{content:"\F05BE"}.mdi-firework::before{content:"\F0E30"}.mdi-firework-off::before{content:"\F1723"}.mdi-fish::before{content:"\F023A"}.mdi-fish-off::before{content:"\F13F3"}.mdi-fishbowl::before{content:"\F0EF3"}.mdi-fishbowl-outline::before{content:"\F0EF4"}.mdi-fit-to-page::before{content:"\F0EF5"}.mdi-fit-to-page-outline::before{content:"\F0EF6"}.mdi-fit-to-screen::before{content:"\F18F4"}.mdi-fit-to-screen-outline::before{content:"\F18F5"}.mdi-flag::before{content:"\F023B"}.mdi-flag-checkered::before{content:"\F023C"}.mdi-flag-minus::before{content:"\F0B99"}.mdi-flag-minus-outline::before{content:"\F10B2"}.mdi-flag-off::before{content:"\F18EE"}.mdi-flag-off-outline::before{content:"\F18EF"}.mdi-flag-outline::before{content:"\F023D"}.mdi-flag-plus::before{content:"\F0B9A"}.mdi-flag-plus-outline::before{content:"\F10B3"}.mdi-flag-remove::before{content:"\F0B9B"}.mdi-flag-remove-outline::before{content:"\F10B4"}.mdi-flag-triangle::before{content:"\F023F"}.mdi-flag-variant::before{content:"\F0240"}.mdi-flag-variant-minus::before{content:"\F1BB4"}.mdi-flag-variant-minus-outline::before{content:"\F1BB5"}.mdi-flag-variant-off::before{content:"\F1BB0"}.mdi-flag-variant-off-outline::before{content:"\F1BB1"}.mdi-flag-variant-outline::before{content:"\F023E"}.mdi-flag-variant-plus::before{content:"\F1BB2"}.mdi-flag-variant-plus-outline::before{content:"\F1BB3"}.mdi-flag-variant-remove::before{content:"\F1BB6"}.mdi-flag-variant-remove-outline::before{content:"\F1BB7"}.mdi-flare::before{content:"\F0D72"}.mdi-flash::before{content:"\F0241"}.mdi-flash-alert::before{content:"\F0EF7"}.mdi-flash-alert-outline::before{content:"\F0EF8"}.mdi-flash-auto::before{content:"\F0242"}.mdi-flash-off::before{content:"\F0243"}.mdi-flash-off-outline::before{content:"\F1B45"}.mdi-flash-outline::before{content:"\F06D5"}.mdi-flash-red-eye::before{content:"\F067B"}.mdi-flash-triangle::before{content:"\F1B1D"}.mdi-flash-triangle-outline::before{content:"\F1B1E"}.mdi-flashlight::before{content:"\F0244"}.mdi-flashlight-off::before{content:"\F0245"}.mdi-flask::before{content:"\F0093"}.mdi-flask-empty::before{content:"\F0094"}.mdi-flask-empty-minus::before{content:"\F123A"}.mdi-flask-empty-minus-outline::before{content:"\F123B"}.mdi-flask-empty-off::before{content:"\F13F4"}.mdi-flask-empty-off-outline::before{content:"\F13F5"}.mdi-flask-empty-outline::before{content:"\F0095"}.mdi-flask-empty-plus::before{content:"\F123C"}.mdi-flask-empty-plus-outline::before{content:"\F123D"}.mdi-flask-empty-remove::before{content:"\F123E"}.mdi-flask-empty-remove-outline::before{content:"\F123F"}.mdi-flask-minus::before{content:"\F1240"}.mdi-flask-minus-outline::before{content:"\F1241"}.mdi-flask-off::before{content:"\F13F6"}.mdi-flask-off-outline::before{content:"\F13F7"}.mdi-flask-outline::before{content:"\F0096"}.mdi-flask-plus::before{content:"\F1242"}.mdi-flask-plus-outline::before{content:"\F1243"}.mdi-flask-remove::before{content:"\F1244"}.mdi-flask-remove-outline::before{content:"\F1245"}.mdi-flask-round-bottom::before{content:"\F124B"}.mdi-flask-round-bottom-empty::before{content:"\F124C"}.mdi-flask-round-bottom-empty-outline::before{content:"\F124D"}.mdi-flask-round-bottom-outline::before{content:"\F124E"}.mdi-fleur-de-lis::before{content:"\F1303"}.mdi-flip-horizontal::before{content:"\F10E7"}.mdi-flip-to-back::before{content:"\F0247"}.mdi-flip-to-front::before{content:"\F0248"}.mdi-flip-vertical::before{content:"\F10E8"}.mdi-floor-lamp::before{content:"\F08DD"}.mdi-floor-lamp-dual::before{content:"\F1040"}.mdi-floor-lamp-dual-outline::before{content:"\F17CE"}.mdi-floor-lamp-outline::before{content:"\F17C8"}.mdi-floor-lamp-torchiere::before{content:"\F1747"}.mdi-floor-lamp-torchiere-outline::before{content:"\F17D6"}.mdi-floor-lamp-torchiere-variant::before{content:"\F1041"}.mdi-floor-lamp-torchiere-variant-outline::before{content:"\F17CF"}.mdi-floor-plan::before{content:"\F0821"}.mdi-floppy::before{content:"\F0249"}.mdi-floppy-variant::before{content:"\F09EF"}.mdi-flower::before{content:"\F024A"}.mdi-flower-outline::before{content:"\F09F0"}.mdi-flower-pollen::before{content:"\F1885"}.mdi-flower-pollen-outline::before{content:"\F1886"}.mdi-flower-poppy::before{content:"\F0D08"}.mdi-flower-tulip::before{content:"\F09F1"}.mdi-flower-tulip-outline::before{content:"\F09F2"}.mdi-focus-auto::before{content:"\F0F4E"}.mdi-focus-field::before{content:"\F0F4F"}.mdi-focus-field-horizontal::before{content:"\F0F50"}.mdi-focus-field-vertical::before{content:"\F0F51"}.mdi-folder::before{content:"\F024B"}.mdi-folder-account::before{content:"\F024C"}.mdi-folder-account-outline::before{content:"\F0B9C"}.mdi-folder-alert::before{content:"\F0DCC"}.mdi-folder-alert-outline::before{content:"\F0DCD"}.mdi-folder-arrow-down::before{content:"\F19E8"}.mdi-folder-arrow-down-outline::before{content:"\F19E9"}.mdi-folder-arrow-left::before{content:"\F19EA"}.mdi-folder-arrow-left-outline::before{content:"\F19EB"}.mdi-folder-arrow-left-right::before{content:"\F19EC"}.mdi-folder-arrow-left-right-outline::before{content:"\F19ED"}.mdi-folder-arrow-right::before{content:"\F19EE"}.mdi-folder-arrow-right-outline::before{content:"\F19EF"}.mdi-folder-arrow-up::before{content:"\F19F0"}.mdi-folder-arrow-up-down::before{content:"\F19F1"}.mdi-folder-arrow-up-down-outline::before{content:"\F19F2"}.mdi-folder-arrow-up-outline::before{content:"\F19F3"}.mdi-folder-cancel::before{content:"\F19F4"}.mdi-folder-cancel-outline::before{content:"\F19F5"}.mdi-folder-check::before{content:"\F197E"}.mdi-folder-check-outline::before{content:"\F197F"}.mdi-folder-clock::before{content:"\F0ABA"}.mdi-folder-clock-outline::before{content:"\F0ABB"}.mdi-folder-cog::before{content:"\F107F"}.mdi-folder-cog-outline::before{content:"\F1080"}.mdi-folder-download::before{content:"\F024D"}.mdi-folder-download-outline::before{content:"\F10E9"}.mdi-folder-edit::before{content:"\F08DE"}.mdi-folder-edit-outline::before{content:"\F0DCE"}.mdi-folder-eye::before{content:"\F178A"}.mdi-folder-eye-outline::before{content:"\F178B"}.mdi-folder-file::before{content:"\F19F6"}.mdi-folder-file-outline::before{content:"\F19F7"}.mdi-folder-google-drive::before{content:"\F024E"}.mdi-folder-heart::before{content:"\F10EA"}.mdi-folder-heart-outline::before{content:"\F10EB"}.mdi-folder-hidden::before{content:"\F179E"}.mdi-folder-home::before{content:"\F10B5"}.mdi-folder-home-outline::before{content:"\F10B6"}.mdi-folder-image::before{content:"\F024F"}.mdi-folder-information::before{content:"\F10B7"}.mdi-folder-information-outline::before{content:"\F10B8"}.mdi-folder-key::before{content:"\F08AC"}.mdi-folder-key-network::before{content:"\F08AD"}.mdi-folder-key-network-outline::before{content:"\F0C80"}.mdi-folder-key-outline::before{content:"\F10EC"}.mdi-folder-lock::before{content:"\F0250"}.mdi-folder-lock-open::before{content:"\F0251"}.mdi-folder-lock-open-outline::before{content:"\F1AA7"}.mdi-folder-lock-outline::before{content:"\F1AA8"}.mdi-folder-marker::before{content:"\F126D"}.mdi-folder-marker-outline::before{content:"\F126E"}.mdi-folder-minus::before{content:"\F1B49"}.mdi-folder-minus-outline::before{content:"\F1B4A"}.mdi-folder-move::before{content:"\F0252"}.mdi-folder-move-outline::before{content:"\F1246"}.mdi-folder-multiple::before{content:"\F0253"}.mdi-folder-multiple-image::before{content:"\F0254"}.mdi-folder-multiple-outline::before{content:"\F0255"}.mdi-folder-multiple-plus::before{content:"\F147E"}.mdi-folder-multiple-plus-outline::before{content:"\F147F"}.mdi-folder-music::before{content:"\F1359"}.mdi-folder-music-outline::before{content:"\F135A"}.mdi-folder-network::before{content:"\F0870"}.mdi-folder-network-outline::before{content:"\F0C81"}.mdi-folder-off::before{content:"\F19F8"}.mdi-folder-off-outline::before{content:"\F19F9"}.mdi-folder-open::before{content:"\F0770"}.mdi-folder-open-outline::before{content:"\F0DCF"}.mdi-folder-outline::before{content:"\F0256"}.mdi-folder-play::before{content:"\F19FA"}.mdi-folder-play-outline::before{content:"\F19FB"}.mdi-folder-plus::before{content:"\F0257"}.mdi-folder-plus-outline::before{content:"\F0B9D"}.mdi-folder-pound::before{content:"\F0D09"}.mdi-folder-pound-outline::before{content:"\F0D0A"}.mdi-folder-question::before{content:"\F19CA"}.mdi-folder-question-outline::before{content:"\F19CB"}.mdi-folder-refresh::before{content:"\F0749"}.mdi-folder-refresh-outline::before{content:"\F0542"}.mdi-folder-remove::before{content:"\F0258"}.mdi-folder-remove-outline::before{content:"\F0B9E"}.mdi-folder-search::before{content:"\F0968"}.mdi-folder-search-outline::before{content:"\F0969"}.mdi-folder-settings::before{content:"\F107D"}.mdi-folder-settings-outline::before{content:"\F107E"}.mdi-folder-star::before{content:"\F069D"}.mdi-folder-star-multiple::before{content:"\F13D3"}.mdi-folder-star-multiple-outline::before{content:"\F13D4"}.mdi-folder-star-outline::before{content:"\F0B9F"}.mdi-folder-swap::before{content:"\F0FB6"}.mdi-folder-swap-outline::before{content:"\F0FB7"}.mdi-folder-sync::before{content:"\F0D0B"}.mdi-folder-sync-outline::before{content:"\F0D0C"}.mdi-folder-table::before{content:"\F12E3"}.mdi-folder-table-outline::before{content:"\F12E4"}.mdi-folder-text::before{content:"\F0C82"}.mdi-folder-text-outline::before{content:"\F0C83"}.mdi-folder-upload::before{content:"\F0259"}.mdi-folder-upload-outline::before{content:"\F10ED"}.mdi-folder-wrench::before{content:"\F19FC"}.mdi-folder-wrench-outline::before{content:"\F19FD"}.mdi-folder-zip::before{content:"\F06EB"}.mdi-folder-zip-outline::before{content:"\F07B9"}.mdi-font-awesome::before{content:"\F003A"}.mdi-food::before{content:"\F025A"}.mdi-food-apple::before{content:"\F025B"}.mdi-food-apple-outline::before{content:"\F0C84"}.mdi-food-croissant::before{content:"\F07C8"}.mdi-food-drumstick::before{content:"\F141F"}.mdi-food-drumstick-off::before{content:"\F1468"}.mdi-food-drumstick-off-outline::before{content:"\F1469"}.mdi-food-drumstick-outline::before{content:"\F1420"}.mdi-food-fork-drink::before{content:"\F05F2"}.mdi-food-halal::before{content:"\F1572"}.mdi-food-hot-dog::before{content:"\F184B"}.mdi-food-kosher::before{content:"\F1573"}.mdi-food-off::before{content:"\F05F3"}.mdi-food-off-outline::before{content:"\F1915"}.mdi-food-outline::before{content:"\F1916"}.mdi-food-steak::before{content:"\F146A"}.mdi-food-steak-off::before{content:"\F146B"}.mdi-food-takeout-box::before{content:"\F1836"}.mdi-food-takeout-box-outline::before{content:"\F1837"}.mdi-food-turkey::before{content:"\F171C"}.mdi-food-variant::before{content:"\F025C"}.mdi-food-variant-off::before{content:"\F13E5"}.mdi-foot-print::before{content:"\F0F52"}.mdi-football::before{content:"\F025D"}.mdi-football-australian::before{content:"\F025E"}.mdi-football-helmet::before{content:"\F025F"}.mdi-forest::before{content:"\F1897"}.mdi-forest-outline::before{content:"\F1C63"}.mdi-forklift::before{content:"\F07C9"}.mdi-form-dropdown::before{content:"\F1400"}.mdi-form-select::before{content:"\F1401"}.mdi-form-textarea::before{content:"\F1095"}.mdi-form-textbox::before{content:"\F060E"}.mdi-form-textbox-lock::before{content:"\F135D"}.mdi-form-textbox-password::before{content:"\F07F5"}.mdi-format-align-bottom::before{content:"\F0753"}.mdi-format-align-center::before{content:"\F0260"}.mdi-format-align-justify::before{content:"\F0261"}.mdi-format-align-left::before{content:"\F0262"}.mdi-format-align-middle::before{content:"\F0754"}.mdi-format-align-right::before{content:"\F0263"}.mdi-format-align-top::before{content:"\F0755"}.mdi-format-annotation-minus::before{content:"\F0ABC"}.mdi-format-annotation-plus::before{content:"\F0646"}.mdi-format-bold::before{content:"\F0264"}.mdi-format-clear::before{content:"\F0265"}.mdi-format-color-fill::before{content:"\F0266"}.mdi-format-color-highlight::before{content:"\F0E31"}.mdi-format-color-marker-cancel::before{content:"\F1313"}.mdi-format-color-text::before{content:"\F069E"}.mdi-format-columns::before{content:"\F08DF"}.mdi-format-float-center::before{content:"\F0267"}.mdi-format-float-left::before{content:"\F0268"}.mdi-format-float-none::before{content:"\F0269"}.mdi-format-float-right::before{content:"\F026A"}.mdi-format-font::before{content:"\F06D6"}.mdi-format-font-size-decrease::before{content:"\F09F3"}.mdi-format-font-size-increase::before{content:"\F09F4"}.mdi-format-header-1::before{content:"\F026B"}.mdi-format-header-2::before{content:"\F026C"}.mdi-format-header-3::before{content:"\F026D"}.mdi-format-header-4::before{content:"\F026E"}.mdi-format-header-5::before{content:"\F026F"}.mdi-format-header-6::before{content:"\F0270"}.mdi-format-header-decrease::before{content:"\F0271"}.mdi-format-header-equal::before{content:"\F0272"}.mdi-format-header-increase::before{content:"\F0273"}.mdi-format-header-pound::before{content:"\F0274"}.mdi-format-horizontal-align-center::before{content:"\F061E"}.mdi-format-horizontal-align-left::before{content:"\F061F"}.mdi-format-horizontal-align-right::before{content:"\F0620"}.mdi-format-indent-decrease::before{content:"\F0275"}.mdi-format-indent-increase::before{content:"\F0276"}.mdi-format-italic::before{content:"\F0277"}.mdi-format-letter-case::before{content:"\F0B34"}.mdi-format-letter-case-lower::before{content:"\F0B35"}.mdi-format-letter-case-upper::before{content:"\F0B36"}.mdi-format-letter-ends-with::before{content:"\F0FB8"}.mdi-format-letter-matches::before{content:"\F0FB9"}.mdi-format-letter-spacing::before{content:"\F1956"}.mdi-format-letter-spacing-variant::before{content:"\F1AFB"}.mdi-format-letter-starts-with::before{content:"\F0FBA"}.mdi-format-line-height::before{content:"\F1AFC"}.mdi-format-line-spacing::before{content:"\F0278"}.mdi-format-line-style::before{content:"\F05C8"}.mdi-format-line-weight::before{content:"\F05C9"}.mdi-format-list-bulleted::before{content:"\F0279"}.mdi-format-list-bulleted-square::before{content:"\F0DD0"}.mdi-format-list-bulleted-triangle::before{content:"\F0EB2"}.mdi-format-list-bulleted-type::before{content:"\F027A"}.mdi-format-list-checkbox::before{content:"\F096A"}.mdi-format-list-checks::before{content:"\F0756"}.mdi-format-list-group::before{content:"\F1860"}.mdi-format-list-group-plus::before{content:"\F1B56"}.mdi-format-list-numbered::before{content:"\F027B"}.mdi-format-list-numbered-rtl::before{content:"\F0D0D"}.mdi-format-list-text::before{content:"\F126F"}.mdi-format-overline::before{content:"\F0EB3"}.mdi-format-page-break::before{content:"\F06D7"}.mdi-format-page-split::before{content:"\F1917"}.mdi-format-paint::before{content:"\F027C"}.mdi-format-paragraph::before{content:"\F027D"}.mdi-format-paragraph-spacing::before{content:"\F1AFD"}.mdi-format-pilcrow::before{content:"\F06D8"}.mdi-format-pilcrow-arrow-left::before{content:"\F0286"}.mdi-format-pilcrow-arrow-right::before{content:"\F0285"}.mdi-format-quote-close::before{content:"\F027E"}.mdi-format-quote-close-outline::before{content:"\F11A8"}.mdi-format-quote-open::before{content:"\F0757"}.mdi-format-quote-open-outline::before{content:"\F11A7"}.mdi-format-rotate-90::before{content:"\F06AA"}.mdi-format-section::before{content:"\F069F"}.mdi-format-size::before{content:"\F027F"}.mdi-format-strikethrough::before{content:"\F0280"}.mdi-format-strikethrough-variant::before{content:"\F0281"}.mdi-format-subscript::before{content:"\F0282"}.mdi-format-superscript::before{content:"\F0283"}.mdi-format-text::before{content:"\F0284"}.mdi-format-text-rotation-angle-down::before{content:"\F0FBB"}.mdi-format-text-rotation-angle-up::before{content:"\F0FBC"}.mdi-format-text-rotation-down::before{content:"\F0D73"}.mdi-format-text-rotation-down-vertical::before{content:"\F0FBD"}.mdi-format-text-rotation-none::before{content:"\F0D74"}.mdi-format-text-rotation-up::before{content:"\F0FBE"}.mdi-format-text-rotation-vertical::before{content:"\F0FBF"}.mdi-format-text-variant::before{content:"\F0E32"}.mdi-format-text-variant-outline::before{content:"\F150F"}.mdi-format-text-wrapping-clip::before{content:"\F0D0E"}.mdi-format-text-wrapping-overflow::before{content:"\F0D0F"}.mdi-format-text-wrapping-wrap::before{content:"\F0D10"}.mdi-format-textbox::before{content:"\F0D11"}.mdi-format-title::before{content:"\F05F4"}.mdi-format-underline::before{content:"\F0287"}.mdi-format-underline-wavy::before{content:"\F18E9"}.mdi-format-vertical-align-bottom::before{content:"\F0621"}.mdi-format-vertical-align-center::before{content:"\F0622"}.mdi-format-vertical-align-top::before{content:"\F0623"}.mdi-format-wrap-inline::before{content:"\F0288"}.mdi-format-wrap-square::before{content:"\F0289"}.mdi-format-wrap-tight::before{content:"\F028A"}.mdi-format-wrap-top-bottom::before{content:"\F028B"}.mdi-forum::before{content:"\F028C"}.mdi-forum-minus::before{content:"\F1AA9"}.mdi-forum-minus-outline::before{content:"\F1AAA"}.mdi-forum-outline::before{content:"\F0822"}.mdi-forum-plus::before{content:"\F1AAB"}.mdi-forum-plus-outline::before{content:"\F1AAC"}.mdi-forum-remove::before{content:"\F1AAD"}.mdi-forum-remove-outline::before{content:"\F1AAE"}.mdi-forward::before{content:"\F028D"}.mdi-forwardburger::before{content:"\F0D75"}.mdi-fountain::before{content:"\F096B"}.mdi-fountain-pen::before{content:"\F0D12"}.mdi-fountain-pen-tip::before{content:"\F0D13"}.mdi-fraction-one-half::before{content:"\F1992"}.mdi-freebsd::before{content:"\F08E0"}.mdi-french-fries::before{content:"\F1957"}.mdi-frequently-asked-questions::before{content:"\F0EB4"}.mdi-fridge::before{content:"\F0290"}.mdi-fridge-alert::before{content:"\F11B1"}.mdi-fridge-alert-outline::before{content:"\F11B2"}.mdi-fridge-bottom::before{content:"\F0292"}.mdi-fridge-industrial::before{content:"\F15EE"}.mdi-fridge-industrial-alert::before{content:"\F15EF"}.mdi-fridge-industrial-alert-outline::before{content:"\F15F0"}.mdi-fridge-industrial-off::before{content:"\F15F1"}.mdi-fridge-industrial-off-outline::before{content:"\F15F2"}.mdi-fridge-industrial-outline::before{content:"\F15F3"}.mdi-fridge-off::before{content:"\F11AF"}.mdi-fridge-off-outline::before{content:"\F11B0"}.mdi-fridge-outline::before{content:"\F028F"}.mdi-fridge-top::before{content:"\F0291"}.mdi-fridge-variant::before{content:"\F15F4"}.mdi-fridge-variant-alert::before{content:"\F15F5"}.mdi-fridge-variant-alert-outline::before{content:"\F15F6"}.mdi-fridge-variant-off::before{content:"\F15F7"}.mdi-fridge-variant-off-outline::before{content:"\F15F8"}.mdi-fridge-variant-outline::before{content:"\F15F9"}.mdi-fruit-cherries::before{content:"\F1042"}.mdi-fruit-cherries-off::before{content:"\F13F8"}.mdi-fruit-citrus::before{content:"\F1043"}.mdi-fruit-citrus-off::before{content:"\F13F9"}.mdi-fruit-grapes::before{content:"\F1044"}.mdi-fruit-grapes-outline::before{content:"\F1045"}.mdi-fruit-pear::before{content:"\F1A0E"}.mdi-fruit-pineapple::before{content:"\F1046"}.mdi-fruit-watermelon::before{content:"\F1047"}.mdi-fuel::before{content:"\F07CA"}.mdi-fuel-cell::before{content:"\F18B5"}.mdi-fullscreen::before{content:"\F0293"}.mdi-fullscreen-exit::before{content:"\F0294"}.mdi-function::before{content:"\F0295"}.mdi-function-variant::before{content:"\F0871"}.mdi-furigana-horizontal::before{content:"\F1081"}.mdi-furigana-vertical::before{content:"\F1082"}.mdi-fuse::before{content:"\F0C85"}.mdi-fuse-alert::before{content:"\F142D"}.mdi-fuse-blade::before{content:"\F0C86"}.mdi-fuse-off::before{content:"\F142C"}.mdi-gamepad::before{content:"\F0296"}.mdi-gamepad-circle::before{content:"\F0E33"}.mdi-gamepad-circle-down::before{content:"\F0E34"}.mdi-gamepad-circle-left::before{content:"\F0E35"}.mdi-gamepad-circle-outline::before{content:"\F0E36"}.mdi-gamepad-circle-right::before{content:"\F0E37"}.mdi-gamepad-circle-up::before{content:"\F0E38"}.mdi-gamepad-down::before{content:"\F0E39"}.mdi-gamepad-left::before{content:"\F0E3A"}.mdi-gamepad-outline::before{content:"\F1919"}.mdi-gamepad-right::before{content:"\F0E3B"}.mdi-gamepad-round::before{content:"\F0E3C"}.mdi-gamepad-round-down::before{content:"\F0E3D"}.mdi-gamepad-round-left::before{content:"\F0E3E"}.mdi-gamepad-round-outline::before{content:"\F0E3F"}.mdi-gamepad-round-right::before{content:"\F0E40"}.mdi-gamepad-round-up::before{content:"\F0E41"}.mdi-gamepad-square::before{content:"\F0EB5"}.mdi-gamepad-square-outline::before{content:"\F0EB6"}.mdi-gamepad-up::before{content:"\F0E42"}.mdi-gamepad-variant::before{content:"\F0297"}.mdi-gamepad-variant-outline::before{content:"\F0EB7"}.mdi-gamma::before{content:"\F10EE"}.mdi-gantry-crane::before{content:"\F0DD1"}.mdi-garage::before{content:"\F06D9"}.mdi-garage-alert::before{content:"\F0872"}.mdi-garage-alert-variant::before{content:"\F12D5"}.mdi-garage-lock::before{content:"\F17FB"}.mdi-garage-open::before{content:"\F06DA"}.mdi-garage-open-variant::before{content:"\F12D4"}.mdi-garage-variant::before{content:"\F12D3"}.mdi-garage-variant-lock::before{content:"\F17FC"}.mdi-gas-burner::before{content:"\F1A1B"}.mdi-gas-cylinder::before{content:"\F0647"}.mdi-gas-station::before{content:"\F0298"}.mdi-gas-station-in-use::before{content:"\F1CC4"}.mdi-gas-station-in-use-outline::before{content:"\F1CC5"}.mdi-gas-station-off::before{content:"\F1409"}.mdi-gas-station-off-outline::before{content:"\F140A"}.mdi-gas-station-outline::before{content:"\F0EB8"}.mdi-gate::before{content:"\F0299"}.mdi-gate-alert::before{content:"\F17F8"}.mdi-gate-and::before{content:"\F08E1"}.mdi-gate-arrow-left::before{content:"\F17F7"}.mdi-gate-arrow-right::before{content:"\F1169"}.mdi-gate-buffer::before{content:"\F1AFE"}.mdi-gate-nand::before{content:"\F08E2"}.mdi-gate-nor::before{content:"\F08E3"}.mdi-gate-not::before{content:"\F08E4"}.mdi-gate-open::before{content:"\F116A"}.mdi-gate-or::before{content:"\F08E5"}.mdi-gate-xnor::before{content:"\F08E6"}.mdi-gate-xor::before{content:"\F08E7"}.mdi-gatsby::before{content:"\F0E43"}.mdi-gauge::before{content:"\F029A"}.mdi-gauge-empty::before{content:"\F0873"}.mdi-gauge-full::before{content:"\F0874"}.mdi-gauge-low::before{content:"\F0875"}.mdi-gavel::before{content:"\F029B"}.mdi-gender-female::before{content:"\F029C"}.mdi-gender-male::before{content:"\F029D"}.mdi-gender-male-female::before{content:"\F029E"}.mdi-gender-male-female-variant::before{content:"\F113F"}.mdi-gender-non-binary::before{content:"\F1140"}.mdi-gender-transgender::before{content:"\F029F"}.mdi-generator-mobile::before{content:"\F1C8A"}.mdi-generator-portable::before{content:"\F1C8B"}.mdi-generator-stationary::before{content:"\F1C8C"}.mdi-gentoo::before{content:"\F08E8"}.mdi-gesture::before{content:"\F07CB"}.mdi-gesture-double-tap::before{content:"\F073C"}.mdi-gesture-pinch::before{content:"\F0ABD"}.mdi-gesture-spread::before{content:"\F0ABE"}.mdi-gesture-swipe::before{content:"\F0D76"}.mdi-gesture-swipe-down::before{content:"\F073D"}.mdi-gesture-swipe-horizontal::before{content:"\F0ABF"}.mdi-gesture-swipe-left::before{content:"\F073E"}.mdi-gesture-swipe-right::before{content:"\F073F"}.mdi-gesture-swipe-up::before{content:"\F0740"}.mdi-gesture-swipe-vertical::before{content:"\F0AC0"}.mdi-gesture-tap::before{content:"\F0741"}.mdi-gesture-tap-box::before{content:"\F12A9"}.mdi-gesture-tap-button::before{content:"\F12A8"}.mdi-gesture-tap-hold::before{content:"\F0D77"}.mdi-gesture-two-double-tap::before{content:"\F0742"}.mdi-gesture-two-tap::before{content:"\F0743"}.mdi-ghost::before{content:"\F02A0"}.mdi-ghost-off::before{content:"\F09F5"}.mdi-ghost-off-outline::before{content:"\F165C"}.mdi-ghost-outline::before{content:"\F165D"}.mdi-gift::before{content:"\F0E44"}.mdi-gift-off::before{content:"\F16EF"}.mdi-gift-off-outline::before{content:"\F16F0"}.mdi-gift-open::before{content:"\F16F1"}.mdi-gift-open-outline::before{content:"\F16F2"}.mdi-gift-outline::before{content:"\F02A1"}.mdi-git::before{content:"\F02A2"}.mdi-github::before{content:"\F02A4"}.mdi-gitlab::before{content:"\F0BA0"}.mdi-glass-cocktail::before{content:"\F0356"}.mdi-glass-cocktail-off::before{content:"\F15E6"}.mdi-glass-flute::before{content:"\F02A5"}.mdi-glass-fragile::before{content:"\F1873"}.mdi-glass-mug::before{content:"\F02A6"}.mdi-glass-mug-off::before{content:"\F15E7"}.mdi-glass-mug-variant::before{content:"\F1116"}.mdi-glass-mug-variant-off::before{content:"\F15E8"}.mdi-glass-pint-outline::before{content:"\F130D"}.mdi-glass-stange::before{content:"\F02A7"}.mdi-glass-tulip::before{content:"\F02A8"}.mdi-glass-wine::before{content:"\F0876"}.mdi-glasses::before{content:"\F02AA"}.mdi-globe-light::before{content:"\F066F"}.mdi-globe-light-outline::before{content:"\F12D7"}.mdi-globe-model::before{content:"\F08E9"}.mdi-gmail::before{content:"\F02AB"}.mdi-gnome::before{content:"\F02AC"}.mdi-go-kart::before{content:"\F0D79"}.mdi-go-kart-track::before{content:"\F0D7A"}.mdi-gog::before{content:"\F0BA1"}.mdi-gold::before{content:"\F124F"}.mdi-golf::before{content:"\F0823"}.mdi-golf-cart::before{content:"\F11A4"}.mdi-golf-tee::before{content:"\F1083"}.mdi-gondola::before{content:"\F0686"}.mdi-goodreads::before{content:"\F0D7B"}.mdi-google::before{content:"\F02AD"}.mdi-google-ads::before{content:"\F0C87"}.mdi-google-analytics::before{content:"\F07CC"}.mdi-google-assistant::before{content:"\F07CD"}.mdi-google-cardboard::before{content:"\F02AE"}.mdi-google-chrome::before{content:"\F02AF"}.mdi-google-circles::before{content:"\F02B0"}.mdi-google-circles-communities::before{content:"\F02B1"}.mdi-google-circles-extended::before{content:"\F02B2"}.mdi-google-circles-group::before{content:"\F02B3"}.mdi-google-classroom::before{content:"\F02C0"}.mdi-google-cloud::before{content:"\F11F6"}.mdi-google-downasaur::before{content:"\F1362"}.mdi-google-drive::before{content:"\F02B6"}.mdi-google-earth::before{content:"\F02B7"}.mdi-google-fit::before{content:"\F096C"}.mdi-google-glass::before{content:"\F02B8"}.mdi-google-hangouts::before{content:"\F02C9"}.mdi-google-keep::before{content:"\F06DC"}.mdi-google-lens::before{content:"\F09F6"}.mdi-google-maps::before{content:"\F05F5"}.mdi-google-my-business::before{content:"\F1048"}.mdi-google-nearby::before{content:"\F02B9"}.mdi-google-play::before{content:"\F02BC"}.mdi-google-plus::before{content:"\F02BD"}.mdi-google-podcast::before{content:"\F0EB9"}.mdi-google-spreadsheet::before{content:"\F09F7"}.mdi-google-street-view::before{content:"\F0C88"}.mdi-google-translate::before{content:"\F02BF"}.mdi-gradient-horizontal::before{content:"\F174A"}.mdi-gradient-vertical::before{content:"\F06A0"}.mdi-grain::before{content:"\F0D7C"}.mdi-graph::before{content:"\F1049"}.mdi-graph-outline::before{content:"\F104A"}.mdi-graphql::before{content:"\F0877"}.mdi-grass::before{content:"\F1510"}.mdi-grave-stone::before{content:"\F0BA2"}.mdi-grease-pencil::before{content:"\F0648"}.mdi-greater-than::before{content:"\F096D"}.mdi-greater-than-or-equal::before{content:"\F096E"}.mdi-greenhouse::before{content:"\F002D"}.mdi-grid::before{content:"\F02C1"}.mdi-grid-large::before{content:"\F0758"}.mdi-grid-off::before{content:"\F02C2"}.mdi-grill::before{content:"\F0E45"}.mdi-grill-outline::before{content:"\F118A"}.mdi-group::before{content:"\F02C3"}.mdi-guitar-acoustic::before{content:"\F0771"}.mdi-guitar-electric::before{content:"\F02C4"}.mdi-guitar-pick::before{content:"\F02C5"}.mdi-guitar-pick-outline::before{content:"\F02C6"}.mdi-guy-fawkes-mask::before{content:"\F0825"}.mdi-gymnastics::before{content:"\F1A41"}.mdi-hail::before{content:"\F0AC1"}.mdi-hair-dryer::before{content:"\F10EF"}.mdi-hair-dryer-outline::before{content:"\F10F0"}.mdi-halloween::before{content:"\F0BA3"}.mdi-hamburger::before{content:"\F0685"}.mdi-hamburger-check::before{content:"\F1776"}.mdi-hamburger-minus::before{content:"\F1777"}.mdi-hamburger-off::before{content:"\F1778"}.mdi-hamburger-plus::before{content:"\F1779"}.mdi-hamburger-remove::before{content:"\F177A"}.mdi-hammer::before{content:"\F08EA"}.mdi-hammer-screwdriver::before{content:"\F1322"}.mdi-hammer-sickle::before{content:"\F1887"}.mdi-hammer-wrench::before{content:"\F1323"}.mdi-hand-back-left::before{content:"\F0E46"}.mdi-hand-back-left-off::before{content:"\F1830"}.mdi-hand-back-left-off-outline::before{content:"\F1832"}.mdi-hand-back-left-outline::before{content:"\F182C"}.mdi-hand-back-right::before{content:"\F0E47"}.mdi-hand-back-right-off::before{content:"\F1831"}.mdi-hand-back-right-off-outline::before{content:"\F1833"}.mdi-hand-back-right-outline::before{content:"\F182D"}.mdi-hand-clap::before{content:"\F194B"}.mdi-hand-clap-off::before{content:"\F1A42"}.mdi-hand-coin::before{content:"\F188F"}.mdi-hand-coin-outline::before{content:"\F1890"}.mdi-hand-cycle::before{content:"\F1B9C"}.mdi-hand-extended::before{content:"\F18B6"}.mdi-hand-extended-outline::before{content:"\F18B7"}.mdi-hand-front-left::before{content:"\F182B"}.mdi-hand-front-left-outline::before{content:"\F182E"}.mdi-hand-front-right::before{content:"\F0A4F"}.mdi-hand-front-right-outline::before{content:"\F182F"}.mdi-hand-heart::before{content:"\F10F1"}.mdi-hand-heart-outline::before{content:"\F157E"}.mdi-hand-okay::before{content:"\F0A50"}.mdi-hand-peace::before{content:"\F0A51"}.mdi-hand-peace-variant::before{content:"\F0A52"}.mdi-hand-pointing-down::before{content:"\F0A53"}.mdi-hand-pointing-left::before{content:"\F0A54"}.mdi-hand-pointing-right::before{content:"\F02C7"}.mdi-hand-pointing-up::before{content:"\F0A55"}.mdi-hand-saw::before{content:"\F0E48"}.mdi-hand-wash::before{content:"\F157F"}.mdi-hand-wash-outline::before{content:"\F1580"}.mdi-hand-water::before{content:"\F139F"}.mdi-hand-wave::before{content:"\F1821"}.mdi-hand-wave-outline::before{content:"\F1822"}.mdi-handball::before{content:"\F0F53"}.mdi-handcuffs::before{content:"\F113E"}.mdi-hands-pray::before{content:"\F0579"}.mdi-handshake::before{content:"\F1218"}.mdi-handshake-outline::before{content:"\F15A1"}.mdi-hanger::before{content:"\F02C8"}.mdi-hard-hat::before{content:"\F096F"}.mdi-harddisk::before{content:"\F02CA"}.mdi-harddisk-plus::before{content:"\F104B"}.mdi-harddisk-remove::before{content:"\F104C"}.mdi-hat-fedora::before{content:"\F0BA4"}.mdi-hazard-lights::before{content:"\F0C89"}.mdi-hdmi-port::before{content:"\F1BB8"}.mdi-hdr::before{content:"\F0D7D"}.mdi-hdr-off::before{content:"\F0D7E"}.mdi-head::before{content:"\F135E"}.mdi-head-alert::before{content:"\F1338"}.mdi-head-alert-outline::before{content:"\F1339"}.mdi-head-check::before{content:"\F133A"}.mdi-head-check-outline::before{content:"\F133B"}.mdi-head-cog::before{content:"\F133C"}.mdi-head-cog-outline::before{content:"\F133D"}.mdi-head-dots-horizontal::before{content:"\F133E"}.mdi-head-dots-horizontal-outline::before{content:"\F133F"}.mdi-head-flash::before{content:"\F1340"}.mdi-head-flash-outline::before{content:"\F1341"}.mdi-head-heart::before{content:"\F1342"}.mdi-head-heart-outline::before{content:"\F1343"}.mdi-head-lightbulb::before{content:"\F1344"}.mdi-head-lightbulb-outline::before{content:"\F1345"}.mdi-head-minus::before{content:"\F1346"}.mdi-head-minus-outline::before{content:"\F1347"}.mdi-head-outline::before{content:"\F135F"}.mdi-head-plus::before{content:"\F1348"}.mdi-head-plus-outline::before{content:"\F1349"}.mdi-head-question::before{content:"\F134A"}.mdi-head-question-outline::before{content:"\F134B"}.mdi-head-remove::before{content:"\F134C"}.mdi-head-remove-outline::before{content:"\F134D"}.mdi-head-snowflake::before{content:"\F134E"}.mdi-head-snowflake-outline::before{content:"\F134F"}.mdi-head-sync::before{content:"\F1350"}.mdi-head-sync-outline::before{content:"\F1351"}.mdi-headphones::before{content:"\F02CB"}.mdi-headphones-bluetooth::before{content:"\F0970"}.mdi-headphones-box::before{content:"\F02CC"}.mdi-headphones-off::before{content:"\F07CE"}.mdi-headphones-settings::before{content:"\F02CD"}.mdi-headset::before{content:"\F02CE"}.mdi-headset-dock::before{content:"\F02CF"}.mdi-headset-off::before{content:"\F02D0"}.mdi-heart::before{content:"\F02D1"}.mdi-heart-box::before{content:"\F02D2"}.mdi-heart-box-outline::before{content:"\F02D3"}.mdi-heart-broken::before{content:"\F02D4"}.mdi-heart-broken-outline::before{content:"\F0D14"}.mdi-heart-circle::before{content:"\F0971"}.mdi-heart-circle-outline::before{content:"\F0972"}.mdi-heart-cog::before{content:"\F1663"}.mdi-heart-cog-outline::before{content:"\F1664"}.mdi-heart-flash::before{content:"\F0EF9"}.mdi-heart-half::before{content:"\F06DF"}.mdi-heart-half-full::before{content:"\F06DE"}.mdi-heart-half-outline::before{content:"\F06E0"}.mdi-heart-minus::before{content:"\F142F"}.mdi-heart-minus-outline::before{content:"\F1432"}.mdi-heart-multiple::before{content:"\F0A56"}.mdi-heart-multiple-outline::before{content:"\F0A57"}.mdi-heart-off::before{content:"\F0759"}.mdi-heart-off-outline::before{content:"\F1434"}.mdi-heart-outline::before{content:"\F02D5"}.mdi-heart-plus::before{content:"\F142E"}.mdi-heart-plus-outline::before{content:"\F1431"}.mdi-heart-pulse::before{content:"\F05F6"}.mdi-heart-remove::before{content:"\F1430"}.mdi-heart-remove-outline::before{content:"\F1433"}.mdi-heart-search::before{content:"\F1C8D"}.mdi-heart-settings::before{content:"\F1665"}.mdi-heart-settings-outline::before{content:"\F1666"}.mdi-heat-pump::before{content:"\F1A43"}.mdi-heat-pump-outline::before{content:"\F1A44"}.mdi-heat-wave::before{content:"\F1A45"}.mdi-heating-coil::before{content:"\F1AAF"}.mdi-helicopter::before{content:"\F0AC2"}.mdi-help::before{content:"\F02D6"}.mdi-help-box::before{content:"\F078B"}.mdi-help-box-multiple::before{content:"\F1C0A"}.mdi-help-box-multiple-outline::before{content:"\F1C0B"}.mdi-help-box-outline::before{content:"\F1C0C"}.mdi-help-circle::before{content:"\F02D7"}.mdi-help-circle-outline::before{content:"\F0625"}.mdi-help-network::before{content:"\F06F5"}.mdi-help-network-outline::before{content:"\F0C8A"}.mdi-help-rhombus::before{content:"\F0BA5"}.mdi-help-rhombus-outline::before{content:"\F0BA6"}.mdi-hexadecimal::before{content:"\F12A7"}.mdi-hexagon::before{content:"\F02D8"}.mdi-hexagon-multiple::before{content:"\F06E1"}.mdi-hexagon-multiple-outline::before{content:"\F10F2"}.mdi-hexagon-outline::before{content:"\F02D9"}.mdi-hexagon-slice-1::before{content:"\F0AC3"}.mdi-hexagon-slice-2::before{content:"\F0AC4"}.mdi-hexagon-slice-3::before{content:"\F0AC5"}.mdi-hexagon-slice-4::before{content:"\F0AC6"}.mdi-hexagon-slice-5::before{content:"\F0AC7"}.mdi-hexagon-slice-6::before{content:"\F0AC8"}.mdi-hexagram::before{content:"\F0AC9"}.mdi-hexagram-outline::before{content:"\F0ACA"}.mdi-high-definition::before{content:"\F07CF"}.mdi-high-definition-box::before{content:"\F0878"}.mdi-highway::before{content:"\F05F7"}.mdi-hiking::before{content:"\F0D7F"}.mdi-history::before{content:"\F02DA"}.mdi-hockey-puck::before{content:"\F0879"}.mdi-hockey-sticks::before{content:"\F087A"}.mdi-hololens::before{content:"\F02DB"}.mdi-home::before{content:"\F02DC"}.mdi-home-account::before{content:"\F0826"}.mdi-home-alert::before{content:"\F087B"}.mdi-home-alert-outline::before{content:"\F15D0"}.mdi-home-analytics::before{content:"\F0EBA"}.mdi-home-assistant::before{content:"\F07D0"}.mdi-home-automation::before{content:"\F07D1"}.mdi-home-battery::before{content:"\F1901"}.mdi-home-battery-outline::before{content:"\F1902"}.mdi-home-circle::before{content:"\F07D2"}.mdi-home-circle-outline::before{content:"\F104D"}.mdi-home-city::before{content:"\F0D15"}.mdi-home-city-outline::before{content:"\F0D16"}.mdi-home-clock::before{content:"\F1A12"}.mdi-home-clock-outline::before{content:"\F1A13"}.mdi-home-edit::before{content:"\F1159"}.mdi-home-edit-outline::before{content:"\F115A"}.mdi-home-export-outline::before{content:"\F0F9B"}.mdi-home-flood::before{content:"\F0EFA"}.mdi-home-floor-0::before{content:"\F0DD2"}.mdi-home-floor-1::before{content:"\F0D80"}.mdi-home-floor-2::before{content:"\F0D81"}.mdi-home-floor-3::before{content:"\F0D82"}.mdi-home-floor-a::before{content:"\F0D83"}.mdi-home-floor-b::before{content:"\F0D84"}.mdi-home-floor-g::before{content:"\F0D85"}.mdi-home-floor-l::before{content:"\F0D86"}.mdi-home-floor-negative-1::before{content:"\F0DD3"}.mdi-home-group::before{content:"\F0DD4"}.mdi-home-group-minus::before{content:"\F19C1"}.mdi-home-group-plus::before{content:"\F19C0"}.mdi-home-group-remove::before{content:"\F19C2"}.mdi-home-heart::before{content:"\F0827"}.mdi-home-import-outline::before{content:"\F0F9C"}.mdi-home-lightbulb::before{content:"\F1251"}.mdi-home-lightbulb-outline::before{content:"\F1252"}.mdi-home-lightning-bolt::before{content:"\F1903"}.mdi-home-lightning-bolt-outline::before{content:"\F1904"}.mdi-home-lock::before{content:"\F08EB"}.mdi-home-lock-open::before{content:"\F08EC"}.mdi-home-map-marker::before{content:"\F05F8"}.mdi-home-minus::before{content:"\F0974"}.mdi-home-minus-outline::before{content:"\F13D5"}.mdi-home-modern::before{content:"\F02DD"}.mdi-home-off::before{content:"\F1A46"}.mdi-home-off-outline::before{content:"\F1A47"}.mdi-home-outline::before{content:"\F06A1"}.mdi-home-percent::before{content:"\F1C7C"}.mdi-home-percent-outline::before{content:"\F1C7D"}.mdi-home-plus::before{content:"\F0975"}.mdi-home-plus-outline::before{content:"\F13D6"}.mdi-home-remove::before{content:"\F1247"}.mdi-home-remove-outline::before{content:"\F13D7"}.mdi-home-roof::before{content:"\F112B"}.mdi-home-search::before{content:"\F13B0"}.mdi-home-search-outline::before{content:"\F13B1"}.mdi-home-silo::before{content:"\F1BA0"}.mdi-home-silo-outline::before{content:"\F1BA1"}.mdi-home-sound-in::before{content:"\F1C2F"}.mdi-home-sound-in-outline::before{content:"\F1C30"}.mdi-home-sound-out::before{content:"\F1C31"}.mdi-home-sound-out-outline::before{content:"\F1C32"}.mdi-home-switch::before{content:"\F1794"}.mdi-home-switch-outline::before{content:"\F1795"}.mdi-home-thermometer::before{content:"\F0F54"}.mdi-home-thermometer-outline::before{content:"\F0F55"}.mdi-home-variant::before{content:"\F02DE"}.mdi-home-variant-outline::before{content:"\F0BA7"}.mdi-hook::before{content:"\F06E2"}.mdi-hook-off::before{content:"\F06E3"}.mdi-hoop-house::before{content:"\F0E56"}.mdi-hops::before{content:"\F02DF"}.mdi-horizontal-rotate-clockwise::before{content:"\F10F3"}.mdi-horizontal-rotate-counterclockwise::before{content:"\F10F4"}.mdi-horse::before{content:"\F15BF"}.mdi-horse-human::before{content:"\F15C0"}.mdi-horse-variant::before{content:"\F15C1"}.mdi-horse-variant-fast::before{content:"\F186E"}.mdi-horseshoe::before{content:"\F0A58"}.mdi-hospital::before{content:"\F0FF6"}.mdi-hospital-box::before{content:"\F02E0"}.mdi-hospital-box-outline::before{content:"\F0FF7"}.mdi-hospital-building::before{content:"\F02E1"}.mdi-hospital-marker::before{content:"\F02E2"}.mdi-hot-tub::before{content:"\F0828"}.mdi-hours-12::before{content:"\F1C94"}.mdi-hours-24::before{content:"\F1478"}.mdi-hub::before{content:"\F1C95"}.mdi-hub-outline::before{content:"\F1C96"}.mdi-hubspot::before{content:"\F0D17"}.mdi-hulu::before{content:"\F0829"}.mdi-human::before{content:"\F02E6"}.mdi-human-baby-changing-table::before{content:"\F138B"}.mdi-human-cane::before{content:"\F1581"}.mdi-human-capacity-decrease::before{content:"\F159B"}.mdi-human-capacity-increase::before{content:"\F159C"}.mdi-human-child::before{content:"\F02E7"}.mdi-human-dolly::before{content:"\F1980"}.mdi-human-edit::before{content:"\F14E8"}.mdi-human-female::before{content:"\F0649"}.mdi-human-female-boy::before{content:"\F0A59"}.mdi-human-female-dance::before{content:"\F15C9"}.mdi-human-female-female::before{content:"\F0A5A"}.mdi-human-female-female-child::before{content:"\F1C8E"}.mdi-human-female-girl::before{content:"\F0A5B"}.mdi-human-greeting::before{content:"\F17C4"}.mdi-human-greeting-proximity::before{content:"\F159D"}.mdi-human-greeting-variant::before{content:"\F064A"}.mdi-human-handsdown::before{content:"\F064B"}.mdi-human-handsup::before{content:"\F064C"}.mdi-human-male::before{content:"\F064D"}.mdi-human-male-board::before{content:"\F0890"}.mdi-human-male-board-poll::before{content:"\F0846"}.mdi-human-male-boy::before{content:"\F0A5C"}.mdi-human-male-child::before{content:"\F138C"}.mdi-human-male-female::before{content:"\F02E8"}.mdi-human-male-female-child::before{content:"\F1823"}.mdi-human-male-girl::before{content:"\F0A5D"}.mdi-human-male-height::before{content:"\F0EFB"}.mdi-human-male-height-variant::before{content:"\F0EFC"}.mdi-human-male-male::before{content:"\F0A5E"}.mdi-human-male-male-child::before{content:"\F1C8F"}.mdi-human-non-binary::before{content:"\F1848"}.mdi-human-pregnant::before{content:"\F05CF"}.mdi-human-queue::before{content:"\F1571"}.mdi-human-scooter::before{content:"\F11E9"}.mdi-human-walker::before{content:"\F1B71"}.mdi-human-wheelchair::before{content:"\F138D"}.mdi-human-white-cane::before{content:"\F1981"}.mdi-humble-bundle::before{content:"\F0744"}.mdi-hvac::before{content:"\F1352"}.mdi-hvac-off::before{content:"\F159E"}.mdi-hydraulic-oil-level::before{content:"\F1324"}.mdi-hydraulic-oil-temperature::before{content:"\F1325"}.mdi-hydro-power::before{content:"\F12E5"}.mdi-hydrogen-station::before{content:"\F1894"}.mdi-ice-cream::before{content:"\F082A"}.mdi-ice-cream-off::before{content:"\F0E52"}.mdi-ice-pop::before{content:"\F0EFD"}.mdi-id-card::before{content:"\F0FC0"}.mdi-identifier::before{content:"\F0EFE"}.mdi-ideogram-cjk::before{content:"\F1331"}.mdi-ideogram-cjk-variant::before{content:"\F1332"}.mdi-image::before{content:"\F02E9"}.mdi-image-album::before{content:"\F02EA"}.mdi-image-area::before{content:"\F02EB"}.mdi-image-area-close::before{content:"\F02EC"}.mdi-image-auto-adjust::before{content:"\F0FC1"}.mdi-image-broken::before{content:"\F02ED"}.mdi-image-broken-variant::before{content:"\F02EE"}.mdi-image-check::before{content:"\F1B25"}.mdi-image-check-outline::before{content:"\F1B26"}.mdi-image-edit::before{content:"\F11E3"}.mdi-image-edit-outline::before{content:"\F11E4"}.mdi-image-filter-black-white::before{content:"\F02F0"}.mdi-image-filter-center-focus::before{content:"\F02F1"}.mdi-image-filter-center-focus-strong::before{content:"\F0EFF"}.mdi-image-filter-center-focus-strong-outline::before{content:"\F0F00"}.mdi-image-filter-center-focus-weak::before{content:"\F02F2"}.mdi-image-filter-drama::before{content:"\F02F3"}.mdi-image-filter-drama-outline::before{content:"\F1BFF"}.mdi-image-filter-frames::before{content:"\F02F4"}.mdi-image-filter-hdr::before{content:"\F02F5"}.mdi-image-filter-hdr-outline::before{content:"\F1C64"}.mdi-image-filter-none::before{content:"\F02F6"}.mdi-image-filter-tilt-shift::before{content:"\F02F7"}.mdi-image-filter-vintage::before{content:"\F02F8"}.mdi-image-frame::before{content:"\F0E49"}.mdi-image-lock::before{content:"\F1AB0"}.mdi-image-lock-outline::before{content:"\F1AB1"}.mdi-image-marker::before{content:"\F177B"}.mdi-image-marker-outline::before{content:"\F177C"}.mdi-image-minus::before{content:"\F1419"}.mdi-image-minus-outline::before{content:"\F1B47"}.mdi-image-move::before{content:"\F09F8"}.mdi-image-multiple::before{content:"\F02F9"}.mdi-image-multiple-outline::before{content:"\F02EF"}.mdi-image-off::before{content:"\F082B"}.mdi-image-off-outline::before{content:"\F11D1"}.mdi-image-outline::before{content:"\F0976"}.mdi-image-plus::before{content:"\F087C"}.mdi-image-plus-outline::before{content:"\F1B46"}.mdi-image-refresh::before{content:"\F19FE"}.mdi-image-refresh-outline::before{content:"\F19FF"}.mdi-image-remove::before{content:"\F1418"}.mdi-image-remove-outline::before{content:"\F1B48"}.mdi-image-search::before{content:"\F0977"}.mdi-image-search-outline::before{content:"\F0978"}.mdi-image-size-select-actual::before{content:"\F0C8D"}.mdi-image-size-select-large::before{content:"\F0C8E"}.mdi-image-size-select-small::before{content:"\F0C8F"}.mdi-image-sync::before{content:"\F1A00"}.mdi-image-sync-outline::before{content:"\F1A01"}.mdi-image-text::before{content:"\F160D"}.mdi-import::before{content:"\F02FA"}.mdi-inbox::before{content:"\F0687"}.mdi-inbox-arrow-down::before{content:"\F02FB"}.mdi-inbox-arrow-down-outline::before{content:"\F1270"}.mdi-inbox-arrow-up::before{content:"\F03D1"}.mdi-inbox-arrow-up-outline::before{content:"\F1271"}.mdi-inbox-full::before{content:"\F1272"}.mdi-inbox-full-outline::before{content:"\F1273"}.mdi-inbox-multiple::before{content:"\F08B0"}.mdi-inbox-multiple-outline::before{content:"\F0BA8"}.mdi-inbox-outline::before{content:"\F1274"}.mdi-inbox-remove::before{content:"\F159F"}.mdi-inbox-remove-outline::before{content:"\F15A0"}.mdi-incognito::before{content:"\F05F9"}.mdi-incognito-circle::before{content:"\F1421"}.mdi-incognito-circle-off::before{content:"\F1422"}.mdi-incognito-off::before{content:"\F0075"}.mdi-induction::before{content:"\F184C"}.mdi-infinity::before{content:"\F06E4"}.mdi-information::before{content:"\F02FC"}.mdi-information-box::before{content:"\F1C65"}.mdi-information-box-outline::before{content:"\F1C66"}.mdi-information-off::before{content:"\F178C"}.mdi-information-off-outline::before{content:"\F178D"}.mdi-information-outline::before{content:"\F02FD"}.mdi-information-slab-box::before{content:"\F1C67"}.mdi-information-slab-box-outline::before{content:"\F1C68"}.mdi-information-slab-circle::before{content:"\F1C69"}.mdi-information-slab-circle-outline::before{content:"\F1C6A"}.mdi-information-slab-symbol::before{content:"\F1C6B"}.mdi-information-symbol::before{content:"\F1C6C"}.mdi-information-variant::before{content:"\F064E"}.mdi-information-variant-box::before{content:"\F1C6D"}.mdi-information-variant-box-outline::before{content:"\F1C6E"}.mdi-information-variant-circle::before{content:"\F1C6F"}.mdi-information-variant-circle-outline::before{content:"\F1C70"}.mdi-instagram::before{content:"\F02FE"}.mdi-instrument-triangle::before{content:"\F104E"}.mdi-integrated-circuit-chip::before{content:"\F1913"}.mdi-invert-colors::before{content:"\F0301"}.mdi-invert-colors-off::before{content:"\F0E4A"}.mdi-invoice::before{content:"\F1CD2"}.mdi-invoice-arrow-left::before{content:"\F1CD3"}.mdi-invoice-arrow-left-outline::before{content:"\F1CD4"}.mdi-invoice-arrow-right::before{content:"\F1CD5"}.mdi-invoice-arrow-right-outline::before{content:"\F1CD6"}.mdi-invoice-check::before{content:"\F1CD7"}.mdi-invoice-check-outline::before{content:"\F1CD8"}.mdi-invoice-clock::before{content:"\F1CD9"}.mdi-invoice-clock-outline::before{content:"\F1CDA"}.mdi-invoice-edit::before{content:"\F1CDB"}.mdi-invoice-edit-outline::before{content:"\F1CDC"}.mdi-invoice-export-outline::before{content:"\F1CDD"}.mdi-invoice-fast::before{content:"\F1CDE"}.mdi-invoice-fast-outline::before{content:"\F1CDF"}.mdi-invoice-import::before{content:"\F1CE0"}.mdi-invoice-import-outline::before{content:"\F1CE1"}.mdi-invoice-list::before{content:"\F1CE2"}.mdi-invoice-list-outline::before{content:"\F1CE3"}.mdi-invoice-minus::before{content:"\F1CE4"}.mdi-invoice-minus-outline::before{content:"\F1CE5"}.mdi-invoice-multiple::before{content:"\F1CE6"}.mdi-invoice-multiple-outline::before{content:"\F1CE7"}.mdi-invoice-outline::before{content:"\F1CE8"}.mdi-invoice-plus::before{content:"\F1CE9"}.mdi-invoice-plus-outline::before{content:"\F1CEA"}.mdi-invoice-remove::before{content:"\F1CEB"}.mdi-invoice-remove-outline::before{content:"\F1CEC"}.mdi-invoice-send::before{content:"\F1CED"}.mdi-invoice-send-outline::before{content:"\F1CEE"}.mdi-invoice-text::before{content:"\F1CEF"}.mdi-invoice-text-arrow-left::before{content:"\F1CF0"}.mdi-invoice-text-arrow-left-outline::before{content:"\F1CF1"}.mdi-invoice-text-arrow-right::before{content:"\F1CF2"}.mdi-invoice-text-arrow-right-outline::before{content:"\F1CF3"}.mdi-invoice-text-check::before{content:"\F1CF4"}.mdi-invoice-text-check-outline::before{content:"\F1CF5"}.mdi-invoice-text-clock::before{content:"\F1CF6"}.mdi-invoice-text-clock-outline::before{content:"\F1CF7"}.mdi-invoice-text-edit::before{content:"\F1CF8"}.mdi-invoice-text-edit-outline::before{content:"\F1CF9"}.mdi-invoice-text-fast::before{content:"\F1CFA"}.mdi-invoice-text-fast-outline::before{content:"\F1CFB"}.mdi-invoice-text-minus::before{content:"\F1CFC"}.mdi-invoice-text-minus-outline::before{content:"\F1CFD"}.mdi-invoice-text-multiple::before{content:"\F1CFE"}.mdi-invoice-text-multiple-outline::before{content:"\F1CFF"}.mdi-invoice-text-outline::before{content:"\F1D00"}.mdi-invoice-text-plus::before{content:"\F1D01"}.mdi-invoice-text-plus-outline::before{content:"\F1D02"}.mdi-invoice-text-remove::before{content:"\F1D03"}.mdi-invoice-text-remove-outline::before{content:"\F1D04"}.mdi-invoice-text-send::before{content:"\F1D05"}.mdi-invoice-text-send-outline::before{content:"\F1D06"}.mdi-iobroker::before{content:"\F12E8"}.mdi-ip::before{content:"\F0A5F"}.mdi-ip-network::before{content:"\F0A60"}.mdi-ip-network-outline::before{content:"\F0C90"}.mdi-ip-outline::before{content:"\F1982"}.mdi-ipod::before{content:"\F0C91"}.mdi-iron::before{content:"\F1824"}.mdi-iron-board::before{content:"\F1838"}.mdi-iron-outline::before{content:"\F1825"}.mdi-island::before{content:"\F104F"}.mdi-island-variant::before{content:"\F1CC6"}.mdi-iv-bag::before{content:"\F10B9"}.mdi-jabber::before{content:"\F0DD5"}.mdi-jeepney::before{content:"\F0302"}.mdi-jellyfish::before{content:"\F0F01"}.mdi-jellyfish-outline::before{content:"\F0F02"}.mdi-jira::before{content:"\F0303"}.mdi-jquery::before{content:"\F087D"}.mdi-jsfiddle::before{content:"\F0304"}.mdi-jump-rope::before{content:"\F12FF"}.mdi-kabaddi::before{content:"\F0D87"}.mdi-kangaroo::before{content:"\F1558"}.mdi-karate::before{content:"\F082C"}.mdi-kayaking::before{content:"\F08AF"}.mdi-keg::before{content:"\F0305"}.mdi-kettle::before{content:"\F05FA"}.mdi-kettle-alert::before{content:"\F1317"}.mdi-kettle-alert-outline::before{content:"\F1318"}.mdi-kettle-off::before{content:"\F131B"}.mdi-kettle-off-outline::before{content:"\F131C"}.mdi-kettle-outline::before{content:"\F0F56"}.mdi-kettle-pour-over::before{content:"\F173C"}.mdi-kettle-steam::before{content:"\F1319"}.mdi-kettle-steam-outline::before{content:"\F131A"}.mdi-kettlebell::before{content:"\F1300"}.mdi-key::before{content:"\F0306"}.mdi-key-alert::before{content:"\F1983"}.mdi-key-alert-outline::before{content:"\F1984"}.mdi-key-arrow-right::before{content:"\F1312"}.mdi-key-chain::before{content:"\F1574"}.mdi-key-chain-variant::before{content:"\F1575"}.mdi-key-change::before{content:"\F0307"}.mdi-key-link::before{content:"\F119F"}.mdi-key-minus::before{content:"\F0308"}.mdi-key-outline::before{content:"\F0DD6"}.mdi-key-plus::before{content:"\F0309"}.mdi-key-remove::before{content:"\F030A"}.mdi-key-star::before{content:"\F119E"}.mdi-key-variant::before{content:"\F030B"}.mdi-key-wireless::before{content:"\F0FC2"}.mdi-keyboard::before{content:"\F030C"}.mdi-keyboard-backspace::before{content:"\F030D"}.mdi-keyboard-caps::before{content:"\F030E"}.mdi-keyboard-close::before{content:"\F030F"}.mdi-keyboard-close-outline::before{content:"\F1C00"}.mdi-keyboard-esc::before{content:"\F12B7"}.mdi-keyboard-f1::before{content:"\F12AB"}.mdi-keyboard-f10::before{content:"\F12B4"}.mdi-keyboard-f11::before{content:"\F12B5"}.mdi-keyboard-f12::before{content:"\F12B6"}.mdi-keyboard-f2::before{content:"\F12AC"}.mdi-keyboard-f3::before{content:"\F12AD"}.mdi-keyboard-f4::before{content:"\F12AE"}.mdi-keyboard-f5::before{content:"\F12AF"}.mdi-keyboard-f6::before{content:"\F12B0"}.mdi-keyboard-f7::before{content:"\F12B1"}.mdi-keyboard-f8::before{content:"\F12B2"}.mdi-keyboard-f9::before{content:"\F12B3"}.mdi-keyboard-off::before{content:"\F0310"}.mdi-keyboard-off-outline::before{content:"\F0E4B"}.mdi-keyboard-outline::before{content:"\F097B"}.mdi-keyboard-return::before{content:"\F0311"}.mdi-keyboard-settings::before{content:"\F09F9"}.mdi-keyboard-settings-outline::before{content:"\F09FA"}.mdi-keyboard-space::before{content:"\F1050"}.mdi-keyboard-tab::before{content:"\F0312"}.mdi-keyboard-tab-reverse::before{content:"\F0325"}.mdi-keyboard-variant::before{content:"\F0313"}.mdi-khanda::before{content:"\F10FD"}.mdi-kickstarter::before{content:"\F0745"}.mdi-kite::before{content:"\F1985"}.mdi-kite-outline::before{content:"\F1986"}.mdi-kitesurfing::before{content:"\F1744"}.mdi-klingon::before{content:"\F135B"}.mdi-knife::before{content:"\F09FB"}.mdi-knife-military::before{content:"\F09FC"}.mdi-knob::before{content:"\F1B96"}.mdi-koala::before{content:"\F173F"}.mdi-kodi::before{content:"\F0314"}.mdi-kubernetes::before{content:"\F10FE"}.mdi-label::before{content:"\F0315"}.mdi-label-multiple::before{content:"\F1375"}.mdi-label-multiple-outline::before{content:"\F1376"}.mdi-label-off::before{content:"\F0ACB"}.mdi-label-off-outline::before{content:"\F0ACC"}.mdi-label-outline::before{content:"\F0316"}.mdi-label-percent::before{content:"\F12EA"}.mdi-label-percent-outline::before{content:"\F12EB"}.mdi-label-variant::before{content:"\F0ACD"}.mdi-label-variant-outline::before{content:"\F0ACE"}.mdi-ladder::before{content:"\F15A2"}.mdi-ladybug::before{content:"\F082D"}.mdi-lambda::before{content:"\F0627"}.mdi-lamp::before{content:"\F06B5"}.mdi-lamp-outline::before{content:"\F17D0"}.mdi-lamps::before{content:"\F1576"}.mdi-lamps-outline::before{content:"\F17D1"}.mdi-lan::before{content:"\F0317"}.mdi-lan-check::before{content:"\F12AA"}.mdi-lan-connect::before{content:"\F0318"}.mdi-lan-disconnect::before{content:"\F0319"}.mdi-lan-pending::before{content:"\F031A"}.mdi-land-fields::before{content:"\F1AB2"}.mdi-land-plots::before{content:"\F1AB3"}.mdi-land-plots-circle::before{content:"\F1AB4"}.mdi-land-plots-circle-variant::before{content:"\F1AB5"}.mdi-land-plots-marker::before{content:"\F1C5D"}.mdi-land-rows-horizontal::before{content:"\F1AB6"}.mdi-land-rows-vertical::before{content:"\F1AB7"}.mdi-landslide::before{content:"\F1A48"}.mdi-landslide-outline::before{content:"\F1A49"}.mdi-language-c::before{content:"\F0671"}.mdi-language-cpp::before{content:"\F0672"}.mdi-language-csharp::before{content:"\F031B"}.mdi-language-css3::before{content:"\F031C"}.mdi-language-fortran::before{content:"\F121A"}.mdi-language-go::before{content:"\F07D3"}.mdi-language-haskell::before{content:"\F0C92"}.mdi-language-html5::before{content:"\F031D"}.mdi-language-java::before{content:"\F0B37"}.mdi-language-javascript::before{content:"\F031E"}.mdi-language-kotlin::before{content:"\F1219"}.mdi-language-lua::before{content:"\F08B1"}.mdi-language-markdown::before{content:"\F0354"}.mdi-language-markdown-outline::before{content:"\F0F5B"}.mdi-language-php::before{content:"\F031F"}.mdi-language-python::before{content:"\F0320"}.mdi-language-r::before{content:"\F07D4"}.mdi-language-ruby::before{content:"\F0D2D"}.mdi-language-ruby-on-rails::before{content:"\F0ACF"}.mdi-language-rust::before{content:"\F1617"}.mdi-language-swift::before{content:"\F06E5"}.mdi-language-typescript::before{content:"\F06E6"}.mdi-language-xaml::before{content:"\F0673"}.mdi-laptop::before{content:"\F0322"}.mdi-laptop-account::before{content:"\F1A4A"}.mdi-laptop-off::before{content:"\F06E7"}.mdi-laravel::before{content:"\F0AD0"}.mdi-laser-pointer::before{content:"\F1484"}.mdi-lasso::before{content:"\F0F03"}.mdi-lastpass::before{content:"\F0446"}.mdi-latitude::before{content:"\F0F57"}.mdi-launch::before{content:"\F0327"}.mdi-lava-lamp::before{content:"\F07D5"}.mdi-layers::before{content:"\F0328"}.mdi-layers-edit::before{content:"\F1892"}.mdi-layers-minus::before{content:"\F0E4C"}.mdi-layers-off::before{content:"\F0329"}.mdi-layers-off-outline::before{content:"\F09FD"}.mdi-layers-outline::before{content:"\F09FE"}.mdi-layers-plus::before{content:"\F0E4D"}.mdi-layers-remove::before{content:"\F0E4E"}.mdi-layers-search::before{content:"\F1206"}.mdi-layers-search-outline::before{content:"\F1207"}.mdi-layers-triple::before{content:"\F0F58"}.mdi-layers-triple-outline::before{content:"\F0F59"}.mdi-lead-pencil::before{content:"\F064F"}.mdi-leaf::before{content:"\F032A"}.mdi-leaf-circle::before{content:"\F1905"}.mdi-leaf-circle-outline::before{content:"\F1906"}.mdi-leaf-maple::before{content:"\F0C93"}.mdi-leaf-maple-off::before{content:"\F12DA"}.mdi-leaf-off::before{content:"\F12D9"}.mdi-leak::before{content:"\F0DD7"}.mdi-leak-off::before{content:"\F0DD8"}.mdi-lectern::before{content:"\F1AF0"}.mdi-led-off::before{content:"\F032B"}.mdi-led-on::before{content:"\F032C"}.mdi-led-outline::before{content:"\F032D"}.mdi-led-strip::before{content:"\F07D6"}.mdi-led-strip-variant::before{content:"\F1051"}.mdi-led-strip-variant-off::before{content:"\F1A4B"}.mdi-led-variant-off::before{content:"\F032E"}.mdi-led-variant-on::before{content:"\F032F"}.mdi-led-variant-outline::before{content:"\F0330"}.mdi-leek::before{content:"\F117D"}.mdi-less-than::before{content:"\F097C"}.mdi-less-than-or-equal::before{content:"\F097D"}.mdi-library::before{content:"\F0331"}.mdi-library-outline::before{content:"\F1A22"}.mdi-library-shelves::before{content:"\F0BA9"}.mdi-license::before{content:"\F0FC3"}.mdi-lifebuoy::before{content:"\F087E"}.mdi-light-flood-down::before{content:"\F1987"}.mdi-light-flood-up::before{content:"\F1988"}.mdi-light-recessed::before{content:"\F179B"}.mdi-light-switch::before{content:"\F097E"}.mdi-light-switch-off::before{content:"\F1A24"}.mdi-lightbulb::before{content:"\F0335"}.mdi-lightbulb-alert::before{content:"\F19E1"}.mdi-lightbulb-alert-outline::before{content:"\F19E2"}.mdi-lightbulb-auto::before{content:"\F1800"}.mdi-lightbulb-auto-outline::before{content:"\F1801"}.mdi-lightbulb-cfl::before{content:"\F1208"}.mdi-lightbulb-cfl-off::before{content:"\F1209"}.mdi-lightbulb-cfl-spiral::before{content:"\F1275"}.mdi-lightbulb-cfl-spiral-off::before{content:"\F12C3"}.mdi-lightbulb-fluorescent-tube::before{content:"\F1804"}.mdi-lightbulb-fluorescent-tube-outline::before{content:"\F1805"}.mdi-lightbulb-group::before{content:"\F1253"}.mdi-lightbulb-group-off::before{content:"\F12CD"}.mdi-lightbulb-group-off-outline::before{content:"\F12CE"}.mdi-lightbulb-group-outline::before{content:"\F1254"}.mdi-lightbulb-multiple::before{content:"\F1255"}.mdi-lightbulb-multiple-off::before{content:"\F12CF"}.mdi-lightbulb-multiple-off-outline::before{content:"\F12D0"}.mdi-lightbulb-multiple-outline::before{content:"\F1256"}.mdi-lightbulb-night::before{content:"\F1A4C"}.mdi-lightbulb-night-outline::before{content:"\F1A4D"}.mdi-lightbulb-off::before{content:"\F0E4F"}.mdi-lightbulb-off-outline::before{content:"\F0E50"}.mdi-lightbulb-on::before{content:"\F06E8"}.mdi-lightbulb-on-10::before{content:"\F1A4E"}.mdi-lightbulb-on-20::before{content:"\F1A4F"}.mdi-lightbulb-on-30::before{content:"\F1A50"}.mdi-lightbulb-on-40::before{content:"\F1A51"}.mdi-lightbulb-on-50::before{content:"\F1A52"}.mdi-lightbulb-on-60::before{content:"\F1A53"}.mdi-lightbulb-on-70::before{content:"\F1A54"}.mdi-lightbulb-on-80::before{content:"\F1A55"}.mdi-lightbulb-on-90::before{content:"\F1A56"}.mdi-lightbulb-on-outline::before{content:"\F06E9"}.mdi-lightbulb-outline::before{content:"\F0336"}.mdi-lightbulb-question::before{content:"\F19E3"}.mdi-lightbulb-question-outline::before{content:"\F19E4"}.mdi-lightbulb-spot::before{content:"\F17F4"}.mdi-lightbulb-spot-off::before{content:"\F17F5"}.mdi-lightbulb-variant::before{content:"\F1802"}.mdi-lightbulb-variant-outline::before{content:"\F1803"}.mdi-lighthouse::before{content:"\F09FF"}.mdi-lighthouse-on::before{content:"\F0A00"}.mdi-lightning-bolt::before{content:"\F140B"}.mdi-lightning-bolt-circle::before{content:"\F0820"}.mdi-lightning-bolt-outline::before{content:"\F140C"}.mdi-line-scan::before{content:"\F0624"}.mdi-lingerie::before{content:"\F1476"}.mdi-link::before{content:"\F0337"}.mdi-link-box::before{content:"\F0D1A"}.mdi-link-box-outline::before{content:"\F0D1B"}.mdi-link-box-variant::before{content:"\F0D1C"}.mdi-link-box-variant-outline::before{content:"\F0D1D"}.mdi-link-circle::before{content:"\F1CAC"}.mdi-link-circle-outline::before{content:"\F1CAD"}.mdi-link-edit::before{content:"\F1CAE"}.mdi-link-lock::before{content:"\F10BA"}.mdi-link-off::before{content:"\F0338"}.mdi-link-plus::before{content:"\F0C94"}.mdi-link-variant::before{content:"\F0339"}.mdi-link-variant-minus::before{content:"\F10FF"}.mdi-link-variant-off::before{content:"\F033A"}.mdi-link-variant-plus::before{content:"\F1100"}.mdi-link-variant-remove::before{content:"\F1101"}.mdi-linkedin::before{content:"\F033B"}.mdi-linux::before{content:"\F033D"}.mdi-linux-mint::before{content:"\F08ED"}.mdi-lipstick::before{content:"\F13B5"}.mdi-liquid-spot::before{content:"\F1826"}.mdi-liquor::before{content:"\F191E"}.mdi-list-box::before{content:"\F1B7B"}.mdi-list-box-outline::before{content:"\F1B7C"}.mdi-list-status::before{content:"\F15AB"}.mdi-litecoin::before{content:"\F0A61"}.mdi-loading::before{content:"\F0772"}.mdi-location-enter::before{content:"\F0FC4"}.mdi-location-exit::before{content:"\F0FC5"}.mdi-lock::before{content:"\F033E"}.mdi-lock-alert::before{content:"\F08EE"}.mdi-lock-alert-outline::before{content:"\F15D1"}.mdi-lock-check::before{content:"\F139A"}.mdi-lock-check-outline::before{content:"\F16A8"}.mdi-lock-clock::before{content:"\F097F"}.mdi-lock-minus::before{content:"\F16A9"}.mdi-lock-minus-outline::before{content:"\F16AA"}.mdi-lock-off::before{content:"\F1671"}.mdi-lock-off-outline::before{content:"\F1672"}.mdi-lock-open::before{content:"\F033F"}.mdi-lock-open-alert::before{content:"\F139B"}.mdi-lock-open-alert-outline::before{content:"\F15D2"}.mdi-lock-open-check::before{content:"\F139C"}.mdi-lock-open-check-outline::before{content:"\F16AB"}.mdi-lock-open-minus::before{content:"\F16AC"}.mdi-lock-open-minus-outline::before{content:"\F16AD"}.mdi-lock-open-outline::before{content:"\F0340"}.mdi-lock-open-plus::before{content:"\F16AE"}.mdi-lock-open-plus-outline::before{content:"\F16AF"}.mdi-lock-open-remove::before{content:"\F16B0"}.mdi-lock-open-remove-outline::before{content:"\F16B1"}.mdi-lock-open-variant::before{content:"\F0FC6"}.mdi-lock-open-variant-outline::before{content:"\F0FC7"}.mdi-lock-outline::before{content:"\F0341"}.mdi-lock-pattern::before{content:"\F06EA"}.mdi-lock-percent::before{content:"\F1C12"}.mdi-lock-percent-open::before{content:"\F1C13"}.mdi-lock-percent-open-outline::before{content:"\F1C14"}.mdi-lock-percent-open-variant::before{content:"\F1C15"}.mdi-lock-percent-open-variant-outline::before{content:"\F1C16"}.mdi-lock-percent-outline::before{content:"\F1C17"}.mdi-lock-plus::before{content:"\F05FB"}.mdi-lock-plus-outline::before{content:"\F16B2"}.mdi-lock-question::before{content:"\F08EF"}.mdi-lock-remove::before{content:"\F16B3"}.mdi-lock-remove-outline::before{content:"\F16B4"}.mdi-lock-reset::before{content:"\F0773"}.mdi-lock-smart::before{content:"\F08B2"}.mdi-locker::before{content:"\F07D7"}.mdi-locker-multiple::before{content:"\F07D8"}.mdi-login::before{content:"\F0342"}.mdi-login-variant::before{content:"\F05FC"}.mdi-logout::before{content:"\F0343"}.mdi-logout-variant::before{content:"\F05FD"}.mdi-longitude::before{content:"\F0F5A"}.mdi-looks::before{content:"\F0344"}.mdi-lotion::before{content:"\F1582"}.mdi-lotion-outline::before{content:"\F1583"}.mdi-lotion-plus::before{content:"\F1584"}.mdi-lotion-plus-outline::before{content:"\F1585"}.mdi-loupe::before{content:"\F0345"}.mdi-lumx::before{content:"\F0346"}.mdi-lungs::before{content:"\F1084"}.mdi-mace::before{content:"\F1843"}.mdi-magazine-pistol::before{content:"\F0324"}.mdi-magazine-rifle::before{content:"\F0323"}.mdi-magic-staff::before{content:"\F1844"}.mdi-magnet::before{content:"\F0347"}.mdi-magnet-on::before{content:"\F0348"}.mdi-magnify::before{content:"\F0349"}.mdi-magnify-close::before{content:"\F0980"}.mdi-magnify-expand::before{content:"\F1874"}.mdi-magnify-minus::before{content:"\F034A"}.mdi-magnify-minus-cursor::before{content:"\F0A62"}.mdi-magnify-minus-outline::before{content:"\F06EC"}.mdi-magnify-plus::before{content:"\F034B"}.mdi-magnify-plus-cursor::before{content:"\F0A63"}.mdi-magnify-plus-outline::before{content:"\F06ED"}.mdi-magnify-remove-cursor::before{content:"\F120C"}.mdi-magnify-remove-outline::before{content:"\F120D"}.mdi-magnify-scan::before{content:"\F1276"}.mdi-mail::before{content:"\F0EBB"}.mdi-mailbox::before{content:"\F06EE"}.mdi-mailbox-open::before{content:"\F0D88"}.mdi-mailbox-open-outline::before{content:"\F0D89"}.mdi-mailbox-open-up::before{content:"\F0D8A"}.mdi-mailbox-open-up-outline::before{content:"\F0D8B"}.mdi-mailbox-outline::before{content:"\F0D8C"}.mdi-mailbox-up::before{content:"\F0D8D"}.mdi-mailbox-up-outline::before{content:"\F0D8E"}.mdi-manjaro::before{content:"\F160A"}.mdi-map::before{content:"\F034D"}.mdi-map-check::before{content:"\F0EBC"}.mdi-map-check-outline::before{content:"\F0EBD"}.mdi-map-clock::before{content:"\F0D1E"}.mdi-map-clock-outline::before{content:"\F0D1F"}.mdi-map-legend::before{content:"\F0A01"}.mdi-map-marker::before{content:"\F034E"}.mdi-map-marker-account::before{content:"\F18E3"}.mdi-map-marker-account-outline::before{content:"\F18E4"}.mdi-map-marker-alert::before{content:"\F0F05"}.mdi-map-marker-alert-outline::before{content:"\F0F06"}.mdi-map-marker-check::before{content:"\F0C95"}.mdi-map-marker-check-outline::before{content:"\F12FB"}.mdi-map-marker-circle::before{content:"\F034F"}.mdi-map-marker-distance::before{content:"\F08F0"}.mdi-map-marker-down::before{content:"\F1102"}.mdi-map-marker-left::before{content:"\F12DB"}.mdi-map-marker-left-outline::before{content:"\F12DD"}.mdi-map-marker-minus::before{content:"\F0650"}.mdi-map-marker-minus-outline::before{content:"\F12F9"}.mdi-map-marker-multiple::before{content:"\F0350"}.mdi-map-marker-multiple-outline::before{content:"\F1277"}.mdi-map-marker-off::before{content:"\F0351"}.mdi-map-marker-off-outline::before{content:"\F12FD"}.mdi-map-marker-outline::before{content:"\F07D9"}.mdi-map-marker-path::before{content:"\F0D20"}.mdi-map-marker-plus::before{content:"\F0651"}.mdi-map-marker-plus-outline::before{content:"\F12F8"}.mdi-map-marker-question::before{content:"\F0F07"}.mdi-map-marker-question-outline::before{content:"\F0F08"}.mdi-map-marker-radius::before{content:"\F0352"}.mdi-map-marker-radius-outline::before{content:"\F12FC"}.mdi-map-marker-remove::before{content:"\F0F09"}.mdi-map-marker-remove-outline::before{content:"\F12FA"}.mdi-map-marker-remove-variant::before{content:"\F0F0A"}.mdi-map-marker-right::before{content:"\F12DC"}.mdi-map-marker-right-outline::before{content:"\F12DE"}.mdi-map-marker-star::before{content:"\F1608"}.mdi-map-marker-star-outline::before{content:"\F1609"}.mdi-map-marker-up::before{content:"\F1103"}.mdi-map-minus::before{content:"\F0981"}.mdi-map-outline::before{content:"\F0982"}.mdi-map-plus::before{content:"\F0983"}.mdi-map-search::before{content:"\F0984"}.mdi-map-search-outline::before{content:"\F0985"}.mdi-mapbox::before{content:"\F0BAA"}.mdi-margin::before{content:"\F0353"}.mdi-marker::before{content:"\F0652"}.mdi-marker-cancel::before{content:"\F0DD9"}.mdi-marker-check::before{content:"\F0355"}.mdi-mastodon::before{content:"\F0AD1"}.mdi-material-design::before{content:"\F0986"}.mdi-material-ui::before{content:"\F0357"}.mdi-math-compass::before{content:"\F0358"}.mdi-math-cos::before{content:"\F0C96"}.mdi-math-integral::before{content:"\F0FC8"}.mdi-math-integral-box::before{content:"\F0FC9"}.mdi-math-log::before{content:"\F1085"}.mdi-math-norm::before{content:"\F0FCA"}.mdi-math-norm-box::before{content:"\F0FCB"}.mdi-math-sin::before{content:"\F0C97"}.mdi-math-tan::before{content:"\F0C98"}.mdi-matrix::before{content:"\F0628"}.mdi-medal::before{content:"\F0987"}.mdi-medal-outline::before{content:"\F1326"}.mdi-medical-bag::before{content:"\F06EF"}.mdi-medical-cotton-swab::before{content:"\F1AB8"}.mdi-medication::before{content:"\F1B14"}.mdi-medication-outline::before{content:"\F1B15"}.mdi-meditation::before{content:"\F117B"}.mdi-memory::before{content:"\F035B"}.mdi-memory-arrow-down::before{content:"\F1CA6"}.mdi-menorah::before{content:"\F17D4"}.mdi-menorah-fire::before{content:"\F17D5"}.mdi-menu::before{content:"\F035C"}.mdi-menu-close::before{content:"\F1C90"}.mdi-menu-down::before{content:"\F035D"}.mdi-menu-down-outline::before{content:"\F06B6"}.mdi-menu-left::before{content:"\F035E"}.mdi-menu-left-outline::before{content:"\F0A02"}.mdi-menu-open::before{content:"\F0BAB"}.mdi-menu-right::before{content:"\F035F"}.mdi-menu-right-outline::before{content:"\F0A03"}.mdi-menu-swap::before{content:"\F0A64"}.mdi-menu-swap-outline::before{content:"\F0A65"}.mdi-menu-up::before{content:"\F0360"}.mdi-menu-up-outline::before{content:"\F06B7"}.mdi-merge::before{content:"\F0F5C"}.mdi-message::before{content:"\F0361"}.mdi-message-alert::before{content:"\F0362"}.mdi-message-alert-outline::before{content:"\F0A04"}.mdi-message-arrow-left::before{content:"\F12F2"}.mdi-message-arrow-left-outline::before{content:"\F12F3"}.mdi-message-arrow-right::before{content:"\F12F4"}.mdi-message-arrow-right-outline::before{content:"\F12F5"}.mdi-message-badge::before{content:"\F1941"}.mdi-message-badge-outline::before{content:"\F1942"}.mdi-message-bookmark::before{content:"\F15AC"}.mdi-message-bookmark-outline::before{content:"\F15AD"}.mdi-message-bulleted::before{content:"\F06A2"}.mdi-message-bulleted-off::before{content:"\F06A3"}.mdi-message-check::before{content:"\F1B8A"}.mdi-message-check-outline::before{content:"\F1B8B"}.mdi-message-cog::before{content:"\F06F1"}.mdi-message-cog-outline::before{content:"\F1172"}.mdi-message-draw::before{content:"\F0363"}.mdi-message-fast::before{content:"\F19CC"}.mdi-message-fast-outline::before{content:"\F19CD"}.mdi-message-flash::before{content:"\F15A9"}.mdi-message-flash-outline::before{content:"\F15AA"}.mdi-message-image::before{content:"\F0364"}.mdi-message-image-outline::before{content:"\F116C"}.mdi-message-lock::before{content:"\F0FCC"}.mdi-message-lock-outline::before{content:"\F116D"}.mdi-message-minus::before{content:"\F116E"}.mdi-message-minus-outline::before{content:"\F116F"}.mdi-message-off::before{content:"\F164D"}.mdi-message-off-outline::before{content:"\F164E"}.mdi-message-outline::before{content:"\F0365"}.mdi-message-plus::before{content:"\F0653"}.mdi-message-plus-outline::before{content:"\F10BB"}.mdi-message-processing::before{content:"\F0366"}.mdi-message-processing-outline::before{content:"\F1170"}.mdi-message-question::before{content:"\F173A"}.mdi-message-question-outline::before{content:"\F173B"}.mdi-message-reply::before{content:"\F0367"}.mdi-message-reply-outline::before{content:"\F173D"}.mdi-message-reply-text::before{content:"\F0368"}.mdi-message-reply-text-outline::before{content:"\F173E"}.mdi-message-settings::before{content:"\F06F0"}.mdi-message-settings-outline::before{content:"\F1171"}.mdi-message-star::before{content:"\F069A"}.mdi-message-star-outline::before{content:"\F1250"}.mdi-message-text::before{content:"\F0369"}.mdi-message-text-clock::before{content:"\F1173"}.mdi-message-text-clock-outline::before{content:"\F1174"}.mdi-message-text-fast::before{content:"\F19CE"}.mdi-message-text-fast-outline::before{content:"\F19CF"}.mdi-message-text-lock::before{content:"\F0FCD"}.mdi-message-text-lock-outline::before{content:"\F1175"}.mdi-message-text-outline::before{content:"\F036A"}.mdi-message-video::before{content:"\F036B"}.mdi-meteor::before{content:"\F0629"}.mdi-meter-electric::before{content:"\F1A57"}.mdi-meter-electric-outline::before{content:"\F1A58"}.mdi-meter-gas::before{content:"\F1A59"}.mdi-meter-gas-outline::before{content:"\F1A5A"}.mdi-metronome::before{content:"\F07DA"}.mdi-metronome-tick::before{content:"\F07DB"}.mdi-micro-sd::before{content:"\F07DC"}.mdi-microphone::before{content:"\F036C"}.mdi-microphone-message::before{content:"\F050A"}.mdi-microphone-message-off::before{content:"\F050B"}.mdi-microphone-minus::before{content:"\F08B3"}.mdi-microphone-off::before{content:"\F036D"}.mdi-microphone-outline::before{content:"\F036E"}.mdi-microphone-plus::before{content:"\F08B4"}.mdi-microphone-question::before{content:"\F1989"}.mdi-microphone-question-outline::before{content:"\F198A"}.mdi-microphone-settings::before{content:"\F036F"}.mdi-microphone-variant::before{content:"\F0370"}.mdi-microphone-variant-off::before{content:"\F0371"}.mdi-microscope::before{content:"\F0654"}.mdi-microsoft::before{content:"\F0372"}.mdi-microsoft-access::before{content:"\F138E"}.mdi-microsoft-azure::before{content:"\F0805"}.mdi-microsoft-azure-devops::before{content:"\F0FD5"}.mdi-microsoft-bing::before{content:"\F00A4"}.mdi-microsoft-dynamics-365::before{content:"\F0988"}.mdi-microsoft-edge::before{content:"\F01E9"}.mdi-microsoft-excel::before{content:"\F138F"}.mdi-microsoft-internet-explorer::before{content:"\F0300"}.mdi-microsoft-office::before{content:"\F03C6"}.mdi-microsoft-onedrive::before{content:"\F03CA"}.mdi-microsoft-onenote::before{content:"\F0747"}.mdi-microsoft-outlook::before{content:"\F0D22"}.mdi-microsoft-powerpoint::before{content:"\F1390"}.mdi-microsoft-sharepoint::before{content:"\F1391"}.mdi-microsoft-teams::before{content:"\F02BB"}.mdi-microsoft-visual-studio::before{content:"\F0610"}.mdi-microsoft-visual-studio-code::before{content:"\F0A1E"}.mdi-microsoft-windows::before{content:"\F05B3"}.mdi-microsoft-windows-classic::before{content:"\F0A21"}.mdi-microsoft-word::before{content:"\F1392"}.mdi-microsoft-xbox::before{content:"\F05B9"}.mdi-microsoft-xbox-controller::before{content:"\F05BA"}.mdi-microsoft-xbox-controller-battery-alert::before{content:"\F074B"}.mdi-microsoft-xbox-controller-battery-charging::before{content:"\F0A22"}.mdi-microsoft-xbox-controller-battery-empty::before{content:"\F074C"}.mdi-microsoft-xbox-controller-battery-full::before{content:"\F074D"}.mdi-microsoft-xbox-controller-battery-low::before{content:"\F074E"}.mdi-microsoft-xbox-controller-battery-medium::before{content:"\F074F"}.mdi-microsoft-xbox-controller-battery-unknown::before{content:"\F0750"}.mdi-microsoft-xbox-controller-menu::before{content:"\F0E6F"}.mdi-microsoft-xbox-controller-off::before{content:"\F05BB"}.mdi-microsoft-xbox-controller-view::before{content:"\F0E70"}.mdi-microwave::before{content:"\F0C99"}.mdi-microwave-off::before{content:"\F1423"}.mdi-middleware::before{content:"\F0F5D"}.mdi-middleware-outline::before{content:"\F0F5E"}.mdi-midi::before{content:"\F08F1"}.mdi-midi-port::before{content:"\F08F2"}.mdi-mine::before{content:"\F0DDA"}.mdi-minecraft::before{content:"\F0373"}.mdi-mini-sd::before{content:"\F0A05"}.mdi-minidisc::before{content:"\F0A06"}.mdi-minus::before{content:"\F0374"}.mdi-minus-box::before{content:"\F0375"}.mdi-minus-box-multiple::before{content:"\F1141"}.mdi-minus-box-multiple-outline::before{content:"\F1142"}.mdi-minus-box-outline::before{content:"\F06F2"}.mdi-minus-circle::before{content:"\F0376"}.mdi-minus-circle-multiple::before{content:"\F035A"}.mdi-minus-circle-multiple-outline::before{content:"\F0AD3"}.mdi-minus-circle-off::before{content:"\F1459"}.mdi-minus-circle-off-outline::before{content:"\F145A"}.mdi-minus-circle-outline::before{content:"\F0377"}.mdi-minus-network::before{content:"\F0378"}.mdi-minus-network-outline::before{content:"\F0C9A"}.mdi-minus-thick::before{content:"\F1639"}.mdi-mirror::before{content:"\F11FD"}.mdi-mirror-rectangle::before{content:"\F179F"}.mdi-mirror-variant::before{content:"\F17A0"}.mdi-mixed-martial-arts::before{content:"\F0D8F"}.mdi-mixed-reality::before{content:"\F087F"}.mdi-molecule::before{content:"\F0BAC"}.mdi-molecule-co::before{content:"\F12FE"}.mdi-molecule-co2::before{content:"\F07E4"}.mdi-monitor::before{content:"\F0379"}.mdi-monitor-account::before{content:"\F1A5B"}.mdi-monitor-arrow-down::before{content:"\F19D0"}.mdi-monitor-arrow-down-variant::before{content:"\F19D1"}.mdi-monitor-cellphone::before{content:"\F0989"}.mdi-monitor-cellphone-star::before{content:"\F098A"}.mdi-monitor-dashboard::before{content:"\F0A07"}.mdi-monitor-edit::before{content:"\F12C6"}.mdi-monitor-eye::before{content:"\F13B4"}.mdi-monitor-lock::before{content:"\F0DDB"}.mdi-monitor-multiple::before{content:"\F037A"}.mdi-monitor-off::before{content:"\F0D90"}.mdi-monitor-screenshot::before{content:"\F0E51"}.mdi-monitor-share::before{content:"\F1483"}.mdi-monitor-shimmer::before{content:"\F1104"}.mdi-monitor-small::before{content:"\F1876"}.mdi-monitor-speaker::before{content:"\F0F5F"}.mdi-monitor-speaker-off::before{content:"\F0F60"}.mdi-monitor-star::before{content:"\F0DDC"}.mdi-monitor-vertical::before{content:"\F1C33"}.mdi-moon-first-quarter::before{content:"\F0F61"}.mdi-moon-full::before{content:"\F0F62"}.mdi-moon-last-quarter::before{content:"\F0F63"}.mdi-moon-new::before{content:"\F0F64"}.mdi-moon-waning-crescent::before{content:"\F0F65"}.mdi-moon-waning-gibbous::before{content:"\F0F66"}.mdi-moon-waxing-crescent::before{content:"\F0F67"}.mdi-moon-waxing-gibbous::before{content:"\F0F68"}.mdi-moped::before{content:"\F1086"}.mdi-moped-electric::before{content:"\F15B7"}.mdi-moped-electric-outline::before{content:"\F15B8"}.mdi-moped-outline::before{content:"\F15B9"}.mdi-more::before{content:"\F037B"}.mdi-mortar-pestle::before{content:"\F1748"}.mdi-mortar-pestle-plus::before{content:"\F03F1"}.mdi-mosque::before{content:"\F0D45"}.mdi-mosque-outline::before{content:"\F1827"}.mdi-mother-heart::before{content:"\F1314"}.mdi-mother-nurse::before{content:"\F0D21"}.mdi-motion::before{content:"\F15B2"}.mdi-motion-outline::before{content:"\F15B3"}.mdi-motion-pause::before{content:"\F1590"}.mdi-motion-pause-outline::before{content:"\F1592"}.mdi-motion-play::before{content:"\F158F"}.mdi-motion-play-outline::before{content:"\F1591"}.mdi-motion-sensor::before{content:"\F0D91"}.mdi-motion-sensor-off::before{content:"\F1435"}.mdi-motorbike::before{content:"\F037C"}.mdi-motorbike-electric::before{content:"\F15BA"}.mdi-motorbike-off::before{content:"\F1B16"}.mdi-mouse::before{content:"\F037D"}.mdi-mouse-bluetooth::before{content:"\F098B"}.mdi-mouse-left-click::before{content:"\F1D07"}.mdi-mouse-left-click-outline::before{content:"\F1D08"}.mdi-mouse-move-down::before{content:"\F1550"}.mdi-mouse-move-up::before{content:"\F1551"}.mdi-mouse-move-vertical::before{content:"\F1552"}.mdi-mouse-off::before{content:"\F037E"}.mdi-mouse-outline::before{content:"\F1D09"}.mdi-mouse-right-click::before{content:"\F1D0A"}.mdi-mouse-right-click-outline::before{content:"\F1D0B"}.mdi-mouse-scroll-wheel::before{content:"\F1D0C"}.mdi-mouse-variant::before{content:"\F037F"}.mdi-mouse-variant-off::before{content:"\F0380"}.mdi-move-resize::before{content:"\F0655"}.mdi-move-resize-variant::before{content:"\F0656"}.mdi-movie::before{content:"\F0381"}.mdi-movie-check::before{content:"\F16F3"}.mdi-movie-check-outline::before{content:"\F16F4"}.mdi-movie-cog::before{content:"\F16F5"}.mdi-movie-cog-outline::before{content:"\F16F6"}.mdi-movie-edit::before{content:"\F1122"}.mdi-movie-edit-outline::before{content:"\F1123"}.mdi-movie-filter::before{content:"\F1124"}.mdi-movie-filter-outline::before{content:"\F1125"}.mdi-movie-minus::before{content:"\F16F7"}.mdi-movie-minus-outline::before{content:"\F16F8"}.mdi-movie-off::before{content:"\F16F9"}.mdi-movie-off-outline::before{content:"\F16FA"}.mdi-movie-open::before{content:"\F0FCE"}.mdi-movie-open-check::before{content:"\F16FB"}.mdi-movie-open-check-outline::before{content:"\F16FC"}.mdi-movie-open-cog::before{content:"\F16FD"}.mdi-movie-open-cog-outline::before{content:"\F16FE"}.mdi-movie-open-edit::before{content:"\F16FF"}.mdi-movie-open-edit-outline::before{content:"\F1700"}.mdi-movie-open-minus::before{content:"\F1701"}.mdi-movie-open-minus-outline::before{content:"\F1702"}.mdi-movie-open-off::before{content:"\F1703"}.mdi-movie-open-off-outline::before{content:"\F1704"}.mdi-movie-open-outline::before{content:"\F0FCF"}.mdi-movie-open-play::before{content:"\F1705"}.mdi-movie-open-play-outline::before{content:"\F1706"}.mdi-movie-open-plus::before{content:"\F1707"}.mdi-movie-open-plus-outline::before{content:"\F1708"}.mdi-movie-open-remove::before{content:"\F1709"}.mdi-movie-open-remove-outline::before{content:"\F170A"}.mdi-movie-open-settings::before{content:"\F170B"}.mdi-movie-open-settings-outline::before{content:"\F170C"}.mdi-movie-open-star::before{content:"\F170D"}.mdi-movie-open-star-outline::before{content:"\F170E"}.mdi-movie-outline::before{content:"\F0DDD"}.mdi-movie-play::before{content:"\F170F"}.mdi-movie-play-outline::before{content:"\F1710"}.mdi-movie-plus::before{content:"\F1711"}.mdi-movie-plus-outline::before{content:"\F1712"}.mdi-movie-remove::before{content:"\F1713"}.mdi-movie-remove-outline::before{content:"\F1714"}.mdi-movie-roll::before{content:"\F07DE"}.mdi-movie-search::before{content:"\F11D2"}.mdi-movie-search-outline::before{content:"\F11D3"}.mdi-movie-settings::before{content:"\F1715"}.mdi-movie-settings-outline::before{content:"\F1716"}.mdi-movie-star::before{content:"\F1717"}.mdi-movie-star-outline::before{content:"\F1718"}.mdi-mower::before{content:"\F166F"}.mdi-mower-bag::before{content:"\F1670"}.mdi-mower-bag-on::before{content:"\F1B60"}.mdi-mower-on::before{content:"\F1B5F"}.mdi-muffin::before{content:"\F098C"}.mdi-multicast::before{content:"\F1893"}.mdi-multimedia::before{content:"\F1B97"}.mdi-multiplication::before{content:"\F0382"}.mdi-multiplication-box::before{content:"\F0383"}.mdi-mushroom::before{content:"\F07DF"}.mdi-mushroom-off::before{content:"\F13FA"}.mdi-mushroom-off-outline::before{content:"\F13FB"}.mdi-mushroom-outline::before{content:"\F07E0"}.mdi-music::before{content:"\F075A"}.mdi-music-accidental-double-flat::before{content:"\F0F69"}.mdi-music-accidental-double-sharp::before{content:"\F0F6A"}.mdi-music-accidental-flat::before{content:"\F0F6B"}.mdi-music-accidental-natural::before{content:"\F0F6C"}.mdi-music-accidental-sharp::before{content:"\F0F6D"}.mdi-music-box::before{content:"\F0384"}.mdi-music-box-multiple::before{content:"\F0333"}.mdi-music-box-multiple-outline::before{content:"\F0F04"}.mdi-music-box-outline::before{content:"\F0385"}.mdi-music-circle::before{content:"\F0386"}.mdi-music-circle-outline::before{content:"\F0AD4"}.mdi-music-clef-alto::before{content:"\F0F6E"}.mdi-music-clef-bass::before{content:"\F0F6F"}.mdi-music-clef-treble::before{content:"\F0F70"}.mdi-music-note::before{content:"\F0387"}.mdi-music-note-bluetooth::before{content:"\F05FE"}.mdi-music-note-bluetooth-off::before{content:"\F05FF"}.mdi-music-note-eighth::before{content:"\F0388"}.mdi-music-note-eighth-dotted::before{content:"\F0F71"}.mdi-music-note-half::before{content:"\F0389"}.mdi-music-note-half-dotted::before{content:"\F0F72"}.mdi-music-note-minus::before{content:"\F1B89"}.mdi-music-note-off::before{content:"\F038A"}.mdi-music-note-off-outline::before{content:"\F0F73"}.mdi-music-note-outline::before{content:"\F0F74"}.mdi-music-note-plus::before{content:"\F0DDE"}.mdi-music-note-quarter::before{content:"\F038B"}.mdi-music-note-quarter-dotted::before{content:"\F0F75"}.mdi-music-note-sixteenth::before{content:"\F038C"}.mdi-music-note-sixteenth-dotted::before{content:"\F0F76"}.mdi-music-note-whole::before{content:"\F038D"}.mdi-music-note-whole-dotted::before{content:"\F0F77"}.mdi-music-off::before{content:"\F075B"}.mdi-music-rest-eighth::before{content:"\F0F78"}.mdi-music-rest-half::before{content:"\F0F79"}.mdi-music-rest-quarter::before{content:"\F0F7A"}.mdi-music-rest-sixteenth::before{content:"\F0F7B"}.mdi-music-rest-whole::before{content:"\F0F7C"}.mdi-mustache::before{content:"\F15DE"}.mdi-nail::before{content:"\F0DDF"}.mdi-nas::before{content:"\F08F3"}.mdi-nativescript::before{content:"\F0880"}.mdi-nature::before{content:"\F038E"}.mdi-nature-outline::before{content:"\F1C71"}.mdi-nature-people::before{content:"\F038F"}.mdi-nature-people-outline::before{content:"\F1C72"}.mdi-navigation::before{content:"\F0390"}.mdi-navigation-outline::before{content:"\F1607"}.mdi-navigation-variant::before{content:"\F18F0"}.mdi-navigation-variant-outline::before{content:"\F18F1"}.mdi-near-me::before{content:"\F05CD"}.mdi-necklace::before{content:"\F0F0B"}.mdi-needle::before{content:"\F0391"}.mdi-needle-off::before{content:"\F19D2"}.mdi-netflix::before{content:"\F0746"}.mdi-network::before{content:"\F06F3"}.mdi-network-off::before{content:"\F0C9B"}.mdi-network-off-outline::before{content:"\F0C9C"}.mdi-network-outline::before{content:"\F0C9D"}.mdi-network-pos::before{content:"\F1ACB"}.mdi-network-strength-1::before{content:"\F08F4"}.mdi-network-strength-1-alert::before{content:"\F08F5"}.mdi-network-strength-2::before{content:"\F08F6"}.mdi-network-strength-2-alert::before{content:"\F08F7"}.mdi-network-strength-3::before{content:"\F08F8"}.mdi-network-strength-3-alert::before{content:"\F08F9"}.mdi-network-strength-4::before{content:"\F08FA"}.mdi-network-strength-4-alert::before{content:"\F08FB"}.mdi-network-strength-4-cog::before{content:"\F191A"}.mdi-network-strength-off::before{content:"\F08FC"}.mdi-network-strength-off-outline::before{content:"\F08FD"}.mdi-network-strength-outline::before{content:"\F08FE"}.mdi-new-box::before{content:"\F0394"}.mdi-newspaper::before{content:"\F0395"}.mdi-newspaper-check::before{content:"\F1943"}.mdi-newspaper-minus::before{content:"\F0F0C"}.mdi-newspaper-plus::before{content:"\F0F0D"}.mdi-newspaper-remove::before{content:"\F1944"}.mdi-newspaper-variant::before{content:"\F1001"}.mdi-newspaper-variant-multiple::before{content:"\F1002"}.mdi-newspaper-variant-multiple-outline::before{content:"\F1003"}.mdi-newspaper-variant-outline::before{content:"\F1004"}.mdi-nfc::before{content:"\F0396"}.mdi-nfc-search-variant::before{content:"\F0E53"}.mdi-nfc-tap::before{content:"\F0397"}.mdi-nfc-variant::before{content:"\F0398"}.mdi-nfc-variant-off::before{content:"\F0E54"}.mdi-ninja::before{content:"\F0774"}.mdi-nintendo-game-boy::before{content:"\F1393"}.mdi-nintendo-switch::before{content:"\F07E1"}.mdi-nintendo-wii::before{content:"\F05AB"}.mdi-nintendo-wiiu::before{content:"\F072D"}.mdi-nix::before{content:"\F1105"}.mdi-nodejs::before{content:"\F0399"}.mdi-noodles::before{content:"\F117E"}.mdi-not-equal::before{content:"\F098D"}.mdi-not-equal-variant::before{content:"\F098E"}.mdi-note::before{content:"\F039A"}.mdi-note-alert::before{content:"\F177D"}.mdi-note-alert-outline::before{content:"\F177E"}.mdi-note-check::before{content:"\F177F"}.mdi-note-check-outline::before{content:"\F1780"}.mdi-note-edit::before{content:"\F1781"}.mdi-note-edit-outline::before{content:"\F1782"}.mdi-note-minus::before{content:"\F164F"}.mdi-note-minus-outline::before{content:"\F1650"}.mdi-note-multiple::before{content:"\F06B8"}.mdi-note-multiple-outline::before{content:"\F06B9"}.mdi-note-off::before{content:"\F1783"}.mdi-note-off-outline::before{content:"\F1784"}.mdi-note-outline::before{content:"\F039B"}.mdi-note-plus::before{content:"\F039C"}.mdi-note-plus-outline::before{content:"\F039D"}.mdi-note-remove::before{content:"\F1651"}.mdi-note-remove-outline::before{content:"\F1652"}.mdi-note-search::before{content:"\F1653"}.mdi-note-search-outline::before{content:"\F1654"}.mdi-note-text::before{content:"\F039E"}.mdi-note-text-outline::before{content:"\F11D7"}.mdi-notebook::before{content:"\F082E"}.mdi-notebook-check::before{content:"\F14F5"}.mdi-notebook-check-outline::before{content:"\F14F6"}.mdi-notebook-edit::before{content:"\F14E7"}.mdi-notebook-edit-outline::before{content:"\F14E9"}.mdi-notebook-heart::before{content:"\F1A0B"}.mdi-notebook-heart-outline::before{content:"\F1A0C"}.mdi-notebook-minus::before{content:"\F1610"}.mdi-notebook-minus-outline::before{content:"\F1611"}.mdi-notebook-multiple::before{content:"\F0E55"}.mdi-notebook-outline::before{content:"\F0EBF"}.mdi-notebook-plus::before{content:"\F1612"}.mdi-notebook-plus-outline::before{content:"\F1613"}.mdi-notebook-remove::before{content:"\F1614"}.mdi-notebook-remove-outline::before{content:"\F1615"}.mdi-notification-clear-all::before{content:"\F039F"}.mdi-npm::before{content:"\F06F7"}.mdi-nuke::before{content:"\F06A4"}.mdi-null::before{content:"\F07E2"}.mdi-numeric::before{content:"\F03A0"}.mdi-numeric-0::before{content:"\F0B39"}.mdi-numeric-0-box::before{content:"\F03A1"}.mdi-numeric-0-box-multiple::before{content:"\F0F0E"}.mdi-numeric-0-box-multiple-outline::before{content:"\F03A2"}.mdi-numeric-0-box-outline::before{content:"\F03A3"}.mdi-numeric-0-circle::before{content:"\F0C9E"}.mdi-numeric-0-circle-outline::before{content:"\F0C9F"}.mdi-numeric-1::before{content:"\F0B3A"}.mdi-numeric-1-box::before{content:"\F03A4"}.mdi-numeric-1-box-multiple::before{content:"\F0F0F"}.mdi-numeric-1-box-multiple-outline::before{content:"\F03A5"}.mdi-numeric-1-box-outline::before{content:"\F03A6"}.mdi-numeric-1-circle::before{content:"\F0CA0"}.mdi-numeric-1-circle-outline::before{content:"\F0CA1"}.mdi-numeric-10::before{content:"\F0FE9"}.mdi-numeric-10-box::before{content:"\F0F7D"}.mdi-numeric-10-box-multiple::before{content:"\F0FEA"}.mdi-numeric-10-box-multiple-outline::before{content:"\F0FEB"}.mdi-numeric-10-box-outline::before{content:"\F0F7E"}.mdi-numeric-10-circle::before{content:"\F0FEC"}.mdi-numeric-10-circle-outline::before{content:"\F0FED"}.mdi-numeric-2::before{content:"\F0B3B"}.mdi-numeric-2-box::before{content:"\F03A7"}.mdi-numeric-2-box-multiple::before{content:"\F0F10"}.mdi-numeric-2-box-multiple-outline::before{content:"\F03A8"}.mdi-numeric-2-box-outline::before{content:"\F03A9"}.mdi-numeric-2-circle::before{content:"\F0CA2"}.mdi-numeric-2-circle-outline::before{content:"\F0CA3"}.mdi-numeric-3::before{content:"\F0B3C"}.mdi-numeric-3-box::before{content:"\F03AA"}.mdi-numeric-3-box-multiple::before{content:"\F0F11"}.mdi-numeric-3-box-multiple-outline::before{content:"\F03AB"}.mdi-numeric-3-box-outline::before{content:"\F03AC"}.mdi-numeric-3-circle::before{content:"\F0CA4"}.mdi-numeric-3-circle-outline::before{content:"\F0CA5"}.mdi-numeric-4::before{content:"\F0B3D"}.mdi-numeric-4-box::before{content:"\F03AD"}.mdi-numeric-4-box-multiple::before{content:"\F0F12"}.mdi-numeric-4-box-multiple-outline::before{content:"\F03B2"}.mdi-numeric-4-box-outline::before{content:"\F03AE"}.mdi-numeric-4-circle::before{content:"\F0CA6"}.mdi-numeric-4-circle-outline::before{content:"\F0CA7"}.mdi-numeric-5::before{content:"\F0B3E"}.mdi-numeric-5-box::before{content:"\F03B1"}.mdi-numeric-5-box-multiple::before{content:"\F0F13"}.mdi-numeric-5-box-multiple-outline::before{content:"\F03AF"}.mdi-numeric-5-box-outline::before{content:"\F03B0"}.mdi-numeric-5-circle::before{content:"\F0CA8"}.mdi-numeric-5-circle-outline::before{content:"\F0CA9"}.mdi-numeric-6::before{content:"\F0B3F"}.mdi-numeric-6-box::before{content:"\F03B3"}.mdi-numeric-6-box-multiple::before{content:"\F0F14"}.mdi-numeric-6-box-multiple-outline::before{content:"\F03B4"}.mdi-numeric-6-box-outline::before{content:"\F03B5"}.mdi-numeric-6-circle::before{content:"\F0CAA"}.mdi-numeric-6-circle-outline::before{content:"\F0CAB"}.mdi-numeric-7::before{content:"\F0B40"}.mdi-numeric-7-box::before{content:"\F03B6"}.mdi-numeric-7-box-multiple::before{content:"\F0F15"}.mdi-numeric-7-box-multiple-outline::before{content:"\F03B7"}.mdi-numeric-7-box-outline::before{content:"\F03B8"}.mdi-numeric-7-circle::before{content:"\F0CAC"}.mdi-numeric-7-circle-outline::before{content:"\F0CAD"}.mdi-numeric-8::before{content:"\F0B41"}.mdi-numeric-8-box::before{content:"\F03B9"}.mdi-numeric-8-box-multiple::before{content:"\F0F16"}.mdi-numeric-8-box-multiple-outline::before{content:"\F03BA"}.mdi-numeric-8-box-outline::before{content:"\F03BB"}.mdi-numeric-8-circle::before{content:"\F0CAE"}.mdi-numeric-8-circle-outline::before{content:"\F0CAF"}.mdi-numeric-9::before{content:"\F0B42"}.mdi-numeric-9-box::before{content:"\F03BC"}.mdi-numeric-9-box-multiple::before{content:"\F0F17"}.mdi-numeric-9-box-multiple-outline::before{content:"\F03BD"}.mdi-numeric-9-box-outline::before{content:"\F03BE"}.mdi-numeric-9-circle::before{content:"\F0CB0"}.mdi-numeric-9-circle-outline::before{content:"\F0CB1"}.mdi-numeric-9-plus::before{content:"\F0FEE"}.mdi-numeric-9-plus-box::before{content:"\F03BF"}.mdi-numeric-9-plus-box-multiple::before{content:"\F0F18"}.mdi-numeric-9-plus-box-multiple-outline::before{content:"\F03C0"}.mdi-numeric-9-plus-box-outline::before{content:"\F03C1"}.mdi-numeric-9-plus-circle::before{content:"\F0CB2"}.mdi-numeric-9-plus-circle-outline::before{content:"\F0CB3"}.mdi-numeric-negative-1::before{content:"\F1052"}.mdi-numeric-off::before{content:"\F19D3"}.mdi-numeric-positive-1::before{content:"\F15CB"}.mdi-nut::before{content:"\F06F8"}.mdi-nutrition::before{content:"\F03C2"}.mdi-nuxt::before{content:"\F1106"}.mdi-oar::before{content:"\F067C"}.mdi-ocarina::before{content:"\F0DE0"}.mdi-oci::before{content:"\F12E9"}.mdi-ocr::before{content:"\F113A"}.mdi-octagon::before{content:"\F03C3"}.mdi-octagon-outline::before{content:"\F03C4"}.mdi-octagram::before{content:"\F06F9"}.mdi-octagram-edit::before{content:"\F1C34"}.mdi-octagram-edit-outline::before{content:"\F1C35"}.mdi-octagram-minus::before{content:"\F1C36"}.mdi-octagram-minus-outline::before{content:"\F1C37"}.mdi-octagram-outline::before{content:"\F0775"}.mdi-octagram-plus::before{content:"\F1C38"}.mdi-octagram-plus-outline::before{content:"\F1C39"}.mdi-octahedron::before{content:"\F1950"}.mdi-octahedron-off::before{content:"\F1951"}.mdi-odnoklassniki::before{content:"\F03C5"}.mdi-offer::before{content:"\F121B"}.mdi-office-building::before{content:"\F0991"}.mdi-office-building-cog::before{content:"\F1949"}.mdi-office-building-cog-outline::before{content:"\F194A"}.mdi-office-building-marker::before{content:"\F1520"}.mdi-office-building-marker-outline::before{content:"\F1521"}.mdi-office-building-minus::before{content:"\F1BAA"}.mdi-office-building-minus-outline::before{content:"\F1BAB"}.mdi-office-building-outline::before{content:"\F151F"}.mdi-office-building-plus::before{content:"\F1BA8"}.mdi-office-building-plus-outline::before{content:"\F1BA9"}.mdi-office-building-remove::before{content:"\F1BAC"}.mdi-office-building-remove-outline::before{content:"\F1BAD"}.mdi-oil::before{content:"\F03C7"}.mdi-oil-lamp::before{content:"\F0F19"}.mdi-oil-level::before{content:"\F1053"}.mdi-oil-temperature::before{content:"\F0FF8"}.mdi-om::before{content:"\F0973"}.mdi-omega::before{content:"\F03C9"}.mdi-one-up::before{content:"\F0BAD"}.mdi-onepassword::before{content:"\F0881"}.mdi-opacity::before{content:"\F05CC"}.mdi-open-in-app::before{content:"\F03CB"}.mdi-open-in-new::before{content:"\F03CC"}.mdi-open-source-initiative::before{content:"\F0BAE"}.mdi-openid::before{content:"\F03CD"}.mdi-opera::before{content:"\F03CE"}.mdi-orbit::before{content:"\F0018"}.mdi-orbit-variant::before{content:"\F15DB"}.mdi-order-alphabetical-ascending::before{content:"\F020D"}.mdi-order-alphabetical-descending::before{content:"\F0D07"}.mdi-order-bool-ascending::before{content:"\F02BE"}.mdi-order-bool-ascending-variant::before{content:"\F098F"}.mdi-order-bool-descending::before{content:"\F1384"}.mdi-order-bool-descending-variant::before{content:"\F0990"}.mdi-order-numeric-ascending::before{content:"\F0545"}.mdi-order-numeric-descending::before{content:"\F0546"}.mdi-origin::before{content:"\F0B43"}.mdi-ornament::before{content:"\F03CF"}.mdi-ornament-variant::before{content:"\F03D0"}.mdi-outdoor-lamp::before{content:"\F1054"}.mdi-overscan::before{content:"\F1005"}.mdi-owl::before{content:"\F03D2"}.mdi-pac-man::before{content:"\F0BAF"}.mdi-package::before{content:"\F03D3"}.mdi-package-check::before{content:"\F1B51"}.mdi-package-down::before{content:"\F03D4"}.mdi-package-up::before{content:"\F03D5"}.mdi-package-variant::before{content:"\F03D6"}.mdi-package-variant-closed::before{content:"\F03D7"}.mdi-package-variant-closed-check::before{content:"\F1B52"}.mdi-package-variant-closed-minus::before{content:"\F19D4"}.mdi-package-variant-closed-plus::before{content:"\F19D5"}.mdi-package-variant-closed-remove::before{content:"\F19D6"}.mdi-package-variant-minus::before{content:"\F19D7"}.mdi-package-variant-plus::before{content:"\F19D8"}.mdi-package-variant-remove::before{content:"\F19D9"}.mdi-page-first::before{content:"\F0600"}.mdi-page-last::before{content:"\F0601"}.mdi-page-layout-body::before{content:"\F06FA"}.mdi-page-layout-footer::before{content:"\F06FB"}.mdi-page-layout-header::before{content:"\F06FC"}.mdi-page-layout-header-footer::before{content:"\F0F7F"}.mdi-page-layout-sidebar-left::before{content:"\F06FD"}.mdi-page-layout-sidebar-right::before{content:"\F06FE"}.mdi-page-next::before{content:"\F0BB0"}.mdi-page-next-outline::before{content:"\F0BB1"}.mdi-page-previous::before{content:"\F0BB2"}.mdi-page-previous-outline::before{content:"\F0BB3"}.mdi-pail::before{content:"\F1417"}.mdi-pail-minus::before{content:"\F1437"}.mdi-pail-minus-outline::before{content:"\F143C"}.mdi-pail-off::before{content:"\F1439"}.mdi-pail-off-outline::before{content:"\F143E"}.mdi-pail-outline::before{content:"\F143A"}.mdi-pail-plus::before{content:"\F1436"}.mdi-pail-plus-outline::before{content:"\F143B"}.mdi-pail-remove::before{content:"\F1438"}.mdi-pail-remove-outline::before{content:"\F143D"}.mdi-palette::before{content:"\F03D8"}.mdi-palette-advanced::before{content:"\F03D9"}.mdi-palette-outline::before{content:"\F0E0C"}.mdi-palette-swatch::before{content:"\F08B5"}.mdi-palette-swatch-outline::before{content:"\F135C"}.mdi-palette-swatch-variant::before{content:"\F195A"}.mdi-palm-tree::before{content:"\F1055"}.mdi-pan::before{content:"\F0BB4"}.mdi-pan-bottom-left::before{content:"\F0BB5"}.mdi-pan-bottom-right::before{content:"\F0BB6"}.mdi-pan-down::before{content:"\F0BB7"}.mdi-pan-horizontal::before{content:"\F0BB8"}.mdi-pan-left::before{content:"\F0BB9"}.mdi-pan-right::before{content:"\F0BBA"}.mdi-pan-top-left::before{content:"\F0BBB"}.mdi-pan-top-right::before{content:"\F0BBC"}.mdi-pan-up::before{content:"\F0BBD"}.mdi-pan-vertical::before{content:"\F0BBE"}.mdi-panda::before{content:"\F03DA"}.mdi-pandora::before{content:"\F03DB"}.mdi-panorama::before{content:"\F03DC"}.mdi-panorama-fisheye::before{content:"\F03DD"}.mdi-panorama-horizontal::before{content:"\F1928"}.mdi-panorama-horizontal-outline::before{content:"\F03DE"}.mdi-panorama-outline::before{content:"\F198C"}.mdi-panorama-sphere::before{content:"\F198D"}.mdi-panorama-sphere-outline::before{content:"\F198E"}.mdi-panorama-variant::before{content:"\F198F"}.mdi-panorama-variant-outline::before{content:"\F1990"}.mdi-panorama-vertical::before{content:"\F1929"}.mdi-panorama-vertical-outline::before{content:"\F03DF"}.mdi-panorama-wide-angle::before{content:"\F195F"}.mdi-panorama-wide-angle-outline::before{content:"\F03E0"}.mdi-paper-cut-vertical::before{content:"\F03E1"}.mdi-paper-roll::before{content:"\F1157"}.mdi-paper-roll-outline::before{content:"\F1158"}.mdi-paperclip::before{content:"\F03E2"}.mdi-paperclip-check::before{content:"\F1AC6"}.mdi-paperclip-lock::before{content:"\F19DA"}.mdi-paperclip-minus::before{content:"\F1AC7"}.mdi-paperclip-off::before{content:"\F1AC8"}.mdi-paperclip-plus::before{content:"\F1AC9"}.mdi-paperclip-remove::before{content:"\F1ACA"}.mdi-parachute::before{content:"\F0CB4"}.mdi-parachute-outline::before{content:"\F0CB5"}.mdi-paragliding::before{content:"\F1745"}.mdi-parking::before{content:"\F03E3"}.mdi-party-popper::before{content:"\F1056"}.mdi-passport::before{content:"\F07E3"}.mdi-passport-alert::before{content:"\F1CB8"}.mdi-passport-biometric::before{content:"\F0DE1"}.mdi-passport-cancel::before{content:"\F1CB9"}.mdi-passport-check::before{content:"\F1CBA"}.mdi-passport-minus::before{content:"\F1CBB"}.mdi-passport-plus::before{content:"\F1CBC"}.mdi-passport-remove::before{content:"\F1CBD"}.mdi-pasta::before{content:"\F1160"}.mdi-patio-heater::before{content:"\F0F80"}.mdi-patreon::before{content:"\F0882"}.mdi-pause::before{content:"\F03E4"}.mdi-pause-box::before{content:"\F00BC"}.mdi-pause-box-outline::before{content:"\F1B7A"}.mdi-pause-circle::before{content:"\F03E5"}.mdi-pause-circle-outline::before{content:"\F03E6"}.mdi-pause-octagon::before{content:"\F03E7"}.mdi-pause-octagon-outline::before{content:"\F03E8"}.mdi-paw::before{content:"\F03E9"}.mdi-paw-off::before{content:"\F0657"}.mdi-paw-off-outline::before{content:"\F1676"}.mdi-paw-outline::before{content:"\F1675"}.mdi-peace::before{content:"\F0884"}.mdi-peanut::before{content:"\F0FFC"}.mdi-peanut-off::before{content:"\F0FFD"}.mdi-peanut-off-outline::before{content:"\F0FFF"}.mdi-peanut-outline::before{content:"\F0FFE"}.mdi-pen::before{content:"\F03EA"}.mdi-pen-lock::before{content:"\F0DE2"}.mdi-pen-minus::before{content:"\F0DE3"}.mdi-pen-off::before{content:"\F0DE4"}.mdi-pen-plus::before{content:"\F0DE5"}.mdi-pen-remove::before{content:"\F0DE6"}.mdi-pencil::before{content:"\F03EB"}.mdi-pencil-box::before{content:"\F03EC"}.mdi-pencil-box-multiple::before{content:"\F1144"}.mdi-pencil-box-multiple-outline::before{content:"\F1145"}.mdi-pencil-box-outline::before{content:"\F03ED"}.mdi-pencil-circle::before{content:"\F06FF"}.mdi-pencil-circle-outline::before{content:"\F0776"}.mdi-pencil-lock::before{content:"\F03EE"}.mdi-pencil-lock-outline::before{content:"\F0DE7"}.mdi-pencil-minus::before{content:"\F0DE8"}.mdi-pencil-minus-outline::before{content:"\F0DE9"}.mdi-pencil-off::before{content:"\F03EF"}.mdi-pencil-off-outline::before{content:"\F0DEA"}.mdi-pencil-outline::before{content:"\F0CB6"}.mdi-pencil-plus::before{content:"\F0DEB"}.mdi-pencil-plus-outline::before{content:"\F0DEC"}.mdi-pencil-remove::before{content:"\F0DED"}.mdi-pencil-remove-outline::before{content:"\F0DEE"}.mdi-pencil-ruler::before{content:"\F1353"}.mdi-pencil-ruler-outline::before{content:"\F1C11"}.mdi-penguin::before{content:"\F0EC0"}.mdi-pentagon::before{content:"\F0701"}.mdi-pentagon-outline::before{content:"\F0700"}.mdi-pentagram::before{content:"\F1667"}.mdi-percent::before{content:"\F03F0"}.mdi-percent-box::before{content:"\F1A02"}.mdi-percent-box-outline::before{content:"\F1A03"}.mdi-percent-circle::before{content:"\F1A04"}.mdi-percent-circle-outline::before{content:"\F1A05"}.mdi-percent-outline::before{content:"\F1278"}.mdi-periodic-table::before{content:"\F08B6"}.mdi-perspective-less::before{content:"\F0D23"}.mdi-perspective-more::before{content:"\F0D24"}.mdi-ph::before{content:"\F17C5"}.mdi-phone::before{content:"\F03F2"}.mdi-phone-alert::before{content:"\F0F1A"}.mdi-phone-alert-outline::before{content:"\F118E"}.mdi-phone-bluetooth::before{content:"\F03F3"}.mdi-phone-bluetooth-outline::before{content:"\F118F"}.mdi-phone-cancel::before{content:"\F10BC"}.mdi-phone-cancel-outline::before{content:"\F1190"}.mdi-phone-check::before{content:"\F11A9"}.mdi-phone-check-outline::before{content:"\F11AA"}.mdi-phone-classic::before{content:"\F0602"}.mdi-phone-classic-off::before{content:"\F1279"}.mdi-phone-clock::before{content:"\F19DB"}.mdi-phone-dial::before{content:"\F1559"}.mdi-phone-dial-outline::before{content:"\F155A"}.mdi-phone-forward::before{content:"\F03F4"}.mdi-phone-forward-outline::before{content:"\F1191"}.mdi-phone-hangup::before{content:"\F03F5"}.mdi-phone-hangup-outline::before{content:"\F1192"}.mdi-phone-in-talk::before{content:"\F03F6"}.mdi-phone-in-talk-outline::before{content:"\F1182"}.mdi-phone-incoming::before{content:"\F03F7"}.mdi-phone-incoming-outgoing::before{content:"\F1B3F"}.mdi-phone-incoming-outgoing-outline::before{content:"\F1B40"}.mdi-phone-incoming-outline::before{content:"\F1193"}.mdi-phone-lock::before{content:"\F03F8"}.mdi-phone-lock-outline::before{content:"\F1194"}.mdi-phone-log::before{content:"\F03F9"}.mdi-phone-log-outline::before{content:"\F1195"}.mdi-phone-message::before{content:"\F1196"}.mdi-phone-message-outline::before{content:"\F1197"}.mdi-phone-minus::before{content:"\F0658"}.mdi-phone-minus-outline::before{content:"\F1198"}.mdi-phone-missed::before{content:"\F03FA"}.mdi-phone-missed-outline::before{content:"\F11A5"}.mdi-phone-off::before{content:"\F0DEF"}.mdi-phone-off-outline::before{content:"\F11A6"}.mdi-phone-outgoing::before{content:"\F03FB"}.mdi-phone-outgoing-outline::before{content:"\F1199"}.mdi-phone-outline::before{content:"\F0DF0"}.mdi-phone-paused::before{content:"\F03FC"}.mdi-phone-paused-outline::before{content:"\F119A"}.mdi-phone-plus::before{content:"\F0659"}.mdi-phone-plus-outline::before{content:"\F119B"}.mdi-phone-refresh::before{content:"\F1993"}.mdi-phone-refresh-outline::before{content:"\F1994"}.mdi-phone-remove::before{content:"\F152F"}.mdi-phone-remove-outline::before{content:"\F1530"}.mdi-phone-return::before{content:"\F082F"}.mdi-phone-return-outline::before{content:"\F119C"}.mdi-phone-ring::before{content:"\F11AB"}.mdi-phone-ring-outline::before{content:"\F11AC"}.mdi-phone-rotate-landscape::before{content:"\F0885"}.mdi-phone-rotate-portrait::before{content:"\F0886"}.mdi-phone-settings::before{content:"\F03FD"}.mdi-phone-settings-outline::before{content:"\F119D"}.mdi-phone-sync::before{content:"\F1995"}.mdi-phone-sync-outline::before{content:"\F1996"}.mdi-phone-voip::before{content:"\F03FE"}.mdi-pi::before{content:"\F03FF"}.mdi-pi-box::before{content:"\F0400"}.mdi-pi-hole::before{content:"\F0DF1"}.mdi-piano::before{content:"\F067D"}.mdi-piano-off::before{content:"\F0698"}.mdi-pickaxe::before{content:"\F08B7"}.mdi-picture-in-picture-bottom-right::before{content:"\F0E57"}.mdi-picture-in-picture-bottom-right-outline::before{content:"\F0E58"}.mdi-picture-in-picture-top-right::before{content:"\F0E59"}.mdi-picture-in-picture-top-right-outline::before{content:"\F0E5A"}.mdi-pier::before{content:"\F0887"}.mdi-pier-crane::before{content:"\F0888"}.mdi-pig::before{content:"\F0401"}.mdi-pig-variant::before{content:"\F1006"}.mdi-pig-variant-outline::before{content:"\F1678"}.mdi-piggy-bank::before{content:"\F1007"}.mdi-piggy-bank-outline::before{content:"\F1679"}.mdi-pill::before{content:"\F0402"}.mdi-pill-multiple::before{content:"\F1B4C"}.mdi-pill-off::before{content:"\F1A5C"}.mdi-pillar::before{content:"\F0702"}.mdi-pin::before{content:"\F0403"}.mdi-pin-off::before{content:"\F0404"}.mdi-pin-off-outline::before{content:"\F0930"}.mdi-pin-outline::before{content:"\F0931"}.mdi-pine-tree::before{content:"\F0405"}.mdi-pine-tree-box::before{content:"\F0406"}.mdi-pine-tree-fire::before{content:"\F141A"}.mdi-pine-tree-variant::before{content:"\F1C73"}.mdi-pine-tree-variant-outline::before{content:"\F1C74"}.mdi-pinterest::before{content:"\F0407"}.mdi-pinwheel::before{content:"\F0AD5"}.mdi-pinwheel-outline::before{content:"\F0AD6"}.mdi-pipe::before{content:"\F07E5"}.mdi-pipe-disconnected::before{content:"\F07E6"}.mdi-pipe-leak::before{content:"\F0889"}.mdi-pipe-valve::before{content:"\F184D"}.mdi-pipe-wrench::before{content:"\F1354"}.mdi-pirate::before{content:"\F0A08"}.mdi-pistol::before{content:"\F0703"}.mdi-piston::before{content:"\F088A"}.mdi-pitchfork::before{content:"\F1553"}.mdi-pizza::before{content:"\F0409"}.mdi-plane-car::before{content:"\F1AFF"}.mdi-plane-train::before{content:"\F1B00"}.mdi-play::before{content:"\F040A"}.mdi-play-box::before{content:"\F127A"}.mdi-play-box-edit-outline::before{content:"\F1C3A"}.mdi-play-box-lock::before{content:"\F1A16"}.mdi-play-box-lock-open::before{content:"\F1A17"}.mdi-play-box-lock-open-outline::before{content:"\F1A18"}.mdi-play-box-lock-outline::before{content:"\F1A19"}.mdi-play-box-multiple::before{content:"\F0D19"}.mdi-play-box-multiple-outline::before{content:"\F13E6"}.mdi-play-box-outline::before{content:"\F040B"}.mdi-play-circle::before{content:"\F040C"}.mdi-play-circle-outline::before{content:"\F040D"}.mdi-play-network::before{content:"\F088B"}.mdi-play-network-outline::before{content:"\F0CB7"}.mdi-play-outline::before{content:"\F0F1B"}.mdi-play-pause::before{content:"\F040E"}.mdi-play-protected-content::before{content:"\F040F"}.mdi-play-speed::before{content:"\F08FF"}.mdi-playlist-check::before{content:"\F05C7"}.mdi-playlist-edit::before{content:"\F0900"}.mdi-playlist-minus::before{content:"\F0410"}.mdi-playlist-music::before{content:"\F0CB8"}.mdi-playlist-music-outline::before{content:"\F0CB9"}.mdi-playlist-play::before{content:"\F0411"}.mdi-playlist-plus::before{content:"\F0412"}.mdi-playlist-remove::before{content:"\F0413"}.mdi-playlist-star::before{content:"\F0DF2"}.mdi-plex::before{content:"\F06BA"}.mdi-pliers::before{content:"\F19A4"}.mdi-plus::before{content:"\F0415"}.mdi-plus-box::before{content:"\F0416"}.mdi-plus-box-multiple::before{content:"\F0334"}.mdi-plus-box-multiple-outline::before{content:"\F1143"}.mdi-plus-box-outline::before{content:"\F0704"}.mdi-plus-circle::before{content:"\F0417"}.mdi-plus-circle-multiple::before{content:"\F034C"}.mdi-plus-circle-multiple-outline::before{content:"\F0418"}.mdi-plus-circle-outline::before{content:"\F0419"}.mdi-plus-lock::before{content:"\F1A5D"}.mdi-plus-lock-open::before{content:"\F1A5E"}.mdi-plus-minus::before{content:"\F0992"}.mdi-plus-minus-box::before{content:"\F0993"}.mdi-plus-minus-variant::before{content:"\F14C9"}.mdi-plus-network::before{content:"\F041A"}.mdi-plus-network-outline::before{content:"\F0CBA"}.mdi-plus-outline::before{content:"\F0705"}.mdi-plus-thick::before{content:"\F11EC"}.mdi-pocket::before{content:"\F1CBE"}.mdi-podcast::before{content:"\F0994"}.mdi-podium::before{content:"\F0D25"}.mdi-podium-bronze::before{content:"\F0D26"}.mdi-podium-gold::before{content:"\F0D27"}.mdi-podium-silver::before{content:"\F0D28"}.mdi-point-of-sale::before{content:"\F0D92"}.mdi-pokeball::before{content:"\F041D"}.mdi-pokemon-go::before{content:"\F0A09"}.mdi-poker-chip::before{content:"\F0830"}.mdi-polaroid::before{content:"\F041E"}.mdi-police-badge::before{content:"\F1167"}.mdi-police-badge-outline::before{content:"\F1168"}.mdi-police-station::before{content:"\F1839"}.mdi-poll::before{content:"\F041F"}.mdi-polo::before{content:"\F14C3"}.mdi-polymer::before{content:"\F0421"}.mdi-pool::before{content:"\F0606"}.mdi-pool-thermometer::before{content:"\F1A5F"}.mdi-popcorn::before{content:"\F0422"}.mdi-post::before{content:"\F1008"}.mdi-post-lamp::before{content:"\F1A60"}.mdi-post-outline::before{content:"\F1009"}.mdi-postage-stamp::before{content:"\F0CBB"}.mdi-pot::before{content:"\F02E5"}.mdi-pot-mix::before{content:"\F065B"}.mdi-pot-mix-outline::before{content:"\F0677"}.mdi-pot-outline::before{content:"\F02FF"}.mdi-pot-steam::before{content:"\F065A"}.mdi-pot-steam-outline::before{content:"\F0326"}.mdi-pound::before{content:"\F0423"}.mdi-pound-box::before{content:"\F0424"}.mdi-pound-box-outline::before{content:"\F117F"}.mdi-power::before{content:"\F0425"}.mdi-power-cycle::before{content:"\F0901"}.mdi-power-off::before{content:"\F0902"}.mdi-power-on::before{content:"\F0903"}.mdi-power-plug::before{content:"\F06A5"}.mdi-power-plug-battery::before{content:"\F1C3B"}.mdi-power-plug-battery-outline::before{content:"\F1C3C"}.mdi-power-plug-off::before{content:"\F06A6"}.mdi-power-plug-off-outline::before{content:"\F1424"}.mdi-power-plug-outline::before{content:"\F1425"}.mdi-power-settings::before{content:"\F0426"}.mdi-power-sleep::before{content:"\F0904"}.mdi-power-socket::before{content:"\F0427"}.mdi-power-socket-au::before{content:"\F0905"}.mdi-power-socket-ch::before{content:"\F0FB3"}.mdi-power-socket-de::before{content:"\F1107"}.mdi-power-socket-eu::before{content:"\F07E7"}.mdi-power-socket-fr::before{content:"\F1108"}.mdi-power-socket-it::before{content:"\F14FF"}.mdi-power-socket-jp::before{content:"\F1109"}.mdi-power-socket-uk::before{content:"\F07E8"}.mdi-power-socket-us::before{content:"\F07E9"}.mdi-power-standby::before{content:"\F0906"}.mdi-powershell::before{content:"\F0A0A"}.mdi-prescription::before{content:"\F0706"}.mdi-presentation::before{content:"\F0428"}.mdi-presentation-play::before{content:"\F0429"}.mdi-pretzel::before{content:"\F1562"}.mdi-printer::before{content:"\F042A"}.mdi-printer-3d::before{content:"\F042B"}.mdi-printer-3d-nozzle::before{content:"\F0E5B"}.mdi-printer-3d-nozzle-alert::before{content:"\F11C0"}.mdi-printer-3d-nozzle-alert-outline::before{content:"\F11C1"}.mdi-printer-3d-nozzle-heat::before{content:"\F18B8"}.mdi-printer-3d-nozzle-heat-outline::before{content:"\F18B9"}.mdi-printer-3d-nozzle-off::before{content:"\F1B19"}.mdi-printer-3d-nozzle-off-outline::before{content:"\F1B1A"}.mdi-printer-3d-nozzle-outline::before{content:"\F0E5C"}.mdi-printer-3d-off::before{content:"\F1B0E"}.mdi-printer-alert::before{content:"\F042C"}.mdi-printer-check::before{content:"\F1146"}.mdi-printer-eye::before{content:"\F1458"}.mdi-printer-off::before{content:"\F0E5D"}.mdi-printer-off-outline::before{content:"\F1785"}.mdi-printer-outline::before{content:"\F1786"}.mdi-printer-pos::before{content:"\F1057"}.mdi-printer-pos-alert::before{content:"\F1BBC"}.mdi-printer-pos-alert-outline::before{content:"\F1BBD"}.mdi-printer-pos-cancel::before{content:"\F1BBE"}.mdi-printer-pos-cancel-outline::before{content:"\F1BBF"}.mdi-printer-pos-check::before{content:"\F1BC0"}.mdi-printer-pos-check-outline::before{content:"\F1BC1"}.mdi-printer-pos-cog::before{content:"\F1BC2"}.mdi-printer-pos-cog-outline::before{content:"\F1BC3"}.mdi-printer-pos-edit::before{content:"\F1BC4"}.mdi-printer-pos-edit-outline::before{content:"\F1BC5"}.mdi-printer-pos-minus::before{content:"\F1BC6"}.mdi-printer-pos-minus-outline::before{content:"\F1BC7"}.mdi-printer-pos-network::before{content:"\F1BC8"}.mdi-printer-pos-network-outline::before{content:"\F1BC9"}.mdi-printer-pos-off::before{content:"\F1BCA"}.mdi-printer-pos-off-outline::before{content:"\F1BCB"}.mdi-printer-pos-outline::before{content:"\F1BCC"}.mdi-printer-pos-pause::before{content:"\F1BCD"}.mdi-printer-pos-pause-outline::before{content:"\F1BCE"}.mdi-printer-pos-play::before{content:"\F1BCF"}.mdi-printer-pos-play-outline::before{content:"\F1BD0"}.mdi-printer-pos-plus::before{content:"\F1BD1"}.mdi-printer-pos-plus-outline::before{content:"\F1BD2"}.mdi-printer-pos-refresh::before{content:"\F1BD3"}.mdi-printer-pos-refresh-outline::before{content:"\F1BD4"}.mdi-printer-pos-remove::before{content:"\F1BD5"}.mdi-printer-pos-remove-outline::before{content:"\F1BD6"}.mdi-printer-pos-star::before{content:"\F1BD7"}.mdi-printer-pos-star-outline::before{content:"\F1BD8"}.mdi-printer-pos-stop::before{content:"\F1BD9"}.mdi-printer-pos-stop-outline::before{content:"\F1BDA"}.mdi-printer-pos-sync::before{content:"\F1BDB"}.mdi-printer-pos-sync-outline::before{content:"\F1BDC"}.mdi-printer-pos-wrench::before{content:"\F1BDD"}.mdi-printer-pos-wrench-outline::before{content:"\F1BDE"}.mdi-printer-search::before{content:"\F1457"}.mdi-printer-settings::before{content:"\F0707"}.mdi-printer-wireless::before{content:"\F0A0B"}.mdi-priority-high::before{content:"\F0603"}.mdi-priority-low::before{content:"\F0604"}.mdi-professional-hexagon::before{content:"\F042D"}.mdi-progress-alert::before{content:"\F0CBC"}.mdi-progress-check::before{content:"\F0995"}.mdi-progress-clock::before{content:"\F0996"}.mdi-progress-close::before{content:"\F110A"}.mdi-progress-download::before{content:"\F0997"}.mdi-progress-helper::before{content:"\F1BA2"}.mdi-progress-pencil::before{content:"\F1787"}.mdi-progress-question::before{content:"\F1522"}.mdi-progress-star::before{content:"\F1788"}.mdi-progress-star-four-points::before{content:"\F1C3D"}.mdi-progress-tag::before{content:"\F1D0D"}.mdi-progress-upload::before{content:"\F0998"}.mdi-progress-wrench::before{content:"\F0CBD"}.mdi-projector::before{content:"\F042E"}.mdi-projector-off::before{content:"\F1A23"}.mdi-projector-screen::before{content:"\F042F"}.mdi-projector-screen-off::before{content:"\F180D"}.mdi-projector-screen-off-outline::before{content:"\F180E"}.mdi-projector-screen-outline::before{content:"\F1724"}.mdi-projector-screen-variant::before{content:"\F180F"}.mdi-projector-screen-variant-off::before{content:"\F1810"}.mdi-projector-screen-variant-off-outline::before{content:"\F1811"}.mdi-projector-screen-variant-outline::before{content:"\F1812"}.mdi-propane-tank::before{content:"\F1357"}.mdi-propane-tank-outline::before{content:"\F1358"}.mdi-protocol::before{content:"\F0FD8"}.mdi-publish::before{content:"\F06A7"}.mdi-publish-off::before{content:"\F1945"}.mdi-pulse::before{content:"\F0430"}.mdi-pump::before{content:"\F1402"}.mdi-pump-off::before{content:"\F1B22"}.mdi-pumpkin::before{content:"\F0BBF"}.mdi-purse::before{content:"\F0F1C"}.mdi-purse-outline::before{content:"\F0F1D"}.mdi-puzzle::before{content:"\F0431"}.mdi-puzzle-check::before{content:"\F1426"}.mdi-puzzle-check-outline::before{content:"\F1427"}.mdi-puzzle-edit::before{content:"\F14D3"}.mdi-puzzle-edit-outline::before{content:"\F14D9"}.mdi-puzzle-heart::before{content:"\F14D4"}.mdi-puzzle-heart-outline::before{content:"\F14DA"}.mdi-puzzle-minus::before{content:"\F14D1"}.mdi-puzzle-minus-outline::before{content:"\F14D7"}.mdi-puzzle-outline::before{content:"\F0A66"}.mdi-puzzle-plus::before{content:"\F14D0"}.mdi-puzzle-plus-outline::before{content:"\F14D6"}.mdi-puzzle-remove::before{content:"\F14D2"}.mdi-puzzle-remove-outline::before{content:"\F14D8"}.mdi-puzzle-star::before{content:"\F14D5"}.mdi-puzzle-star-outline::before{content:"\F14DB"}.mdi-pyramid::before{content:"\F1952"}.mdi-pyramid-off::before{content:"\F1953"}.mdi-qi::before{content:"\F0999"}.mdi-qqchat::before{content:"\F0605"}.mdi-qrcode::before{content:"\F0432"}.mdi-qrcode-edit::before{content:"\F08B8"}.mdi-qrcode-minus::before{content:"\F118C"}.mdi-qrcode-plus::before{content:"\F118B"}.mdi-qrcode-remove::before{content:"\F118D"}.mdi-qrcode-scan::before{content:"\F0433"}.mdi-quadcopter::before{content:"\F0434"}.mdi-quality-high::before{content:"\F0435"}.mdi-quality-low::before{content:"\F0A0C"}.mdi-quality-medium::before{content:"\F0A0D"}.mdi-queue-first-in-last-out::before{content:"\F1CAF"}.mdi-quora::before{content:"\F0D29"}.mdi-rabbit::before{content:"\F0907"}.mdi-rabbit-variant::before{content:"\F1A61"}.mdi-rabbit-variant-outline::before{content:"\F1A62"}.mdi-racing-helmet::before{content:"\F0D93"}.mdi-racquetball::before{content:"\F0D94"}.mdi-radar::before{content:"\F0437"}.mdi-radiator::before{content:"\F0438"}.mdi-radiator-disabled::before{content:"\F0AD7"}.mdi-radiator-off::before{content:"\F0AD8"}.mdi-radio::before{content:"\F0439"}.mdi-radio-am::before{content:"\F0CBE"}.mdi-radio-fm::before{content:"\F0CBF"}.mdi-radio-handheld::before{content:"\F043A"}.mdi-radio-off::before{content:"\F121C"}.mdi-radio-tower::before{content:"\F043B"}.mdi-radioactive::before{content:"\F043C"}.mdi-radioactive-circle::before{content:"\F185D"}.mdi-radioactive-circle-outline::before{content:"\F185E"}.mdi-radioactive-off::before{content:"\F0EC1"}.mdi-radiobox-blank::before{content:"\F043D"}.mdi-radiobox-indeterminate-variant::before{content:"\F1C5E"}.mdi-radiobox-marked::before{content:"\F043E"}.mdi-radiology-box::before{content:"\F14C5"}.mdi-radiology-box-outline::before{content:"\F14C6"}.mdi-radius::before{content:"\F0CC0"}.mdi-radius-outline::before{content:"\F0CC1"}.mdi-railroad-light::before{content:"\F0F1E"}.mdi-rake::before{content:"\F1544"}.mdi-raspberry-pi::before{content:"\F043F"}.mdi-raw::before{content:"\F1A0F"}.mdi-raw-off::before{content:"\F1A10"}.mdi-ray-end::before{content:"\F0440"}.mdi-ray-end-arrow::before{content:"\F0441"}.mdi-ray-start::before{content:"\F0442"}.mdi-ray-start-arrow::before{content:"\F0443"}.mdi-ray-start-end::before{content:"\F0444"}.mdi-ray-start-vertex-end::before{content:"\F15D8"}.mdi-ray-vertex::before{content:"\F0445"}.mdi-razor-double-edge::before{content:"\F1997"}.mdi-razor-single-edge::before{content:"\F1998"}.mdi-react::before{content:"\F0708"}.mdi-read::before{content:"\F0447"}.mdi-receipt::before{content:"\F0824"}.mdi-receipt-clock::before{content:"\F1C3E"}.mdi-receipt-clock-outline::before{content:"\F1C3F"}.mdi-receipt-outline::before{content:"\F04F7"}.mdi-receipt-send::before{content:"\F1C40"}.mdi-receipt-send-outline::before{content:"\F1C41"}.mdi-receipt-text::before{content:"\F0449"}.mdi-receipt-text-arrow-left::before{content:"\F1C42"}.mdi-receipt-text-arrow-left-outline::before{content:"\F1C43"}.mdi-receipt-text-arrow-right::before{content:"\F1C44"}.mdi-receipt-text-arrow-right-outline::before{content:"\F1C45"}.mdi-receipt-text-check::before{content:"\F1A63"}.mdi-receipt-text-check-outline::before{content:"\F1A64"}.mdi-receipt-text-clock::before{content:"\F1C46"}.mdi-receipt-text-clock-outline::before{content:"\F1C47"}.mdi-receipt-text-edit::before{content:"\F1C48"}.mdi-receipt-text-edit-outline::before{content:"\F1C49"}.mdi-receipt-text-minus::before{content:"\F1A65"}.mdi-receipt-text-minus-outline::before{content:"\F1A66"}.mdi-receipt-text-outline::before{content:"\F19DC"}.mdi-receipt-text-plus::before{content:"\F1A67"}.mdi-receipt-text-plus-outline::before{content:"\F1A68"}.mdi-receipt-text-remove::before{content:"\F1A69"}.mdi-receipt-text-remove-outline::before{content:"\F1A6A"}.mdi-receipt-text-send::before{content:"\F1C4A"}.mdi-receipt-text-send-outline::before{content:"\F1C4B"}.mdi-record::before{content:"\F044A"}.mdi-record-circle::before{content:"\F0EC2"}.mdi-record-circle-outline::before{content:"\F0EC3"}.mdi-record-player::before{content:"\F099A"}.mdi-record-rec::before{content:"\F044B"}.mdi-rectangle::before{content:"\F0E5E"}.mdi-rectangle-outline::before{content:"\F0E5F"}.mdi-recycle::before{content:"\F044C"}.mdi-recycle-variant::before{content:"\F139D"}.mdi-reddit::before{content:"\F044D"}.mdi-redhat::before{content:"\F111B"}.mdi-redo::before{content:"\F044E"}.mdi-redo-variant::before{content:"\F044F"}.mdi-reflect-horizontal::before{content:"\F0A0E"}.mdi-reflect-vertical::before{content:"\F0A0F"}.mdi-refresh::before{content:"\F0450"}.mdi-refresh-auto::before{content:"\F18F2"}.mdi-refresh-circle::before{content:"\F1377"}.mdi-regex::before{content:"\F0451"}.mdi-registered-trademark::before{content:"\F0A67"}.mdi-reiterate::before{content:"\F1588"}.mdi-relation-many-to-many::before{content:"\F1496"}.mdi-relation-many-to-one::before{content:"\F1497"}.mdi-relation-many-to-one-or-many::before{content:"\F1498"}.mdi-relation-many-to-only-one::before{content:"\F1499"}.mdi-relation-many-to-zero-or-many::before{content:"\F149A"}.mdi-relation-many-to-zero-or-one::before{content:"\F149B"}.mdi-relation-one-or-many-to-many::before{content:"\F149C"}.mdi-relation-one-or-many-to-one::before{content:"\F149D"}.mdi-relation-one-or-many-to-one-or-many::before{content:"\F149E"}.mdi-relation-one-or-many-to-only-one::before{content:"\F149F"}.mdi-relation-one-or-many-to-zero-or-many::before{content:"\F14A0"}.mdi-relation-one-or-many-to-zero-or-one::before{content:"\F14A1"}.mdi-relation-one-to-many::before{content:"\F14A2"}.mdi-relation-one-to-one::before{content:"\F14A3"}.mdi-relation-one-to-one-or-many::before{content:"\F14A4"}.mdi-relation-one-to-only-one::before{content:"\F14A5"}.mdi-relation-one-to-zero-or-many::before{content:"\F14A6"}.mdi-relation-one-to-zero-or-one::before{content:"\F14A7"}.mdi-relation-only-one-to-many::before{content:"\F14A8"}.mdi-relation-only-one-to-one::before{content:"\F14A9"}.mdi-relation-only-one-to-one-or-many::before{content:"\F14AA"}.mdi-relation-only-one-to-only-one::before{content:"\F14AB"}.mdi-relation-only-one-to-zero-or-many::before{content:"\F14AC"}.mdi-relation-only-one-to-zero-or-one::before{content:"\F14AD"}.mdi-relation-zero-or-many-to-many::before{content:"\F14AE"}.mdi-relation-zero-or-many-to-one::before{content:"\F14AF"}.mdi-relation-zero-or-many-to-one-or-many::before{content:"\F14B0"}.mdi-relation-zero-or-many-to-only-one::before{content:"\F14B1"}.mdi-relation-zero-or-many-to-zero-or-many::before{content:"\F14B2"}.mdi-relation-zero-or-many-to-zero-or-one::before{content:"\F14B3"}.mdi-relation-zero-or-one-to-many::before{content:"\F14B4"}.mdi-relation-zero-or-one-to-one::before{content:"\F14B5"}.mdi-relation-zero-or-one-to-one-or-many::before{content:"\F14B6"}.mdi-relation-zero-or-one-to-only-one::before{content:"\F14B7"}.mdi-relation-zero-or-one-to-zero-or-many::before{content:"\F14B8"}.mdi-relation-zero-or-one-to-zero-or-one::before{content:"\F14B9"}.mdi-relative-scale::before{content:"\F0452"}.mdi-reload::before{content:"\F0453"}.mdi-reload-alert::before{content:"\F110B"}.mdi-reminder::before{content:"\F088C"}.mdi-remote::before{content:"\F0454"}.mdi-remote-desktop::before{content:"\F08B9"}.mdi-remote-off::before{content:"\F0EC4"}.mdi-remote-tv::before{content:"\F0EC5"}.mdi-remote-tv-off::before{content:"\F0EC6"}.mdi-rename::before{content:"\F1C18"}.mdi-rename-box::before{content:"\F0455"}.mdi-rename-box-outline::before{content:"\F1C19"}.mdi-rename-outline::before{content:"\F1C1A"}.mdi-reorder-horizontal::before{content:"\F0688"}.mdi-reorder-vertical::before{content:"\F0689"}.mdi-repeat::before{content:"\F0456"}.mdi-repeat-off::before{content:"\F0457"}.mdi-repeat-once::before{content:"\F0458"}.mdi-repeat-variant::before{content:"\F0547"}.mdi-replay::before{content:"\F0459"}.mdi-reply::before{content:"\F045A"}.mdi-reply-all::before{content:"\F045B"}.mdi-reply-all-outline::before{content:"\F0F1F"}.mdi-reply-circle::before{content:"\F11AE"}.mdi-reply-outline::before{content:"\F0F20"}.mdi-reproduction::before{content:"\F045C"}.mdi-resistor::before{content:"\F0B44"}.mdi-resistor-nodes::before{content:"\F0B45"}.mdi-resize::before{content:"\F0A68"}.mdi-resize-bottom-right::before{content:"\F045D"}.mdi-responsive::before{content:"\F045E"}.mdi-restart::before{content:"\F0709"}.mdi-restart-alert::before{content:"\F110C"}.mdi-restart-off::before{content:"\F0D95"}.mdi-restore::before{content:"\F099B"}.mdi-restore-alert::before{content:"\F110D"}.mdi-rewind::before{content:"\F045F"}.mdi-rewind-10::before{content:"\F0D2A"}.mdi-rewind-15::before{content:"\F1946"}.mdi-rewind-30::before{content:"\F0D96"}.mdi-rewind-45::before{content:"\F1B13"}.mdi-rewind-5::before{content:"\F11F9"}.mdi-rewind-60::before{content:"\F160C"}.mdi-rewind-outline::before{content:"\F070A"}.mdi-rhombus::before{content:"\F070B"}.mdi-rhombus-medium::before{content:"\F0A10"}.mdi-rhombus-medium-outline::before{content:"\F14DC"}.mdi-rhombus-outline::before{content:"\F070C"}.mdi-rhombus-split::before{content:"\F0A11"}.mdi-rhombus-split-outline::before{content:"\F14DD"}.mdi-ribbon::before{content:"\F0460"}.mdi-rice::before{content:"\F07EA"}.mdi-rickshaw::before{content:"\F15BB"}.mdi-rickshaw-electric::before{content:"\F15BC"}.mdi-ring::before{content:"\F07EB"}.mdi-rivet::before{content:"\F0E60"}.mdi-road::before{content:"\F0461"}.mdi-road-variant::before{content:"\F0462"}.mdi-robber::before{content:"\F1058"}.mdi-robot::before{content:"\F06A9"}.mdi-robot-angry::before{content:"\F169D"}.mdi-robot-angry-outline::before{content:"\F169E"}.mdi-robot-confused::before{content:"\F169F"}.mdi-robot-confused-outline::before{content:"\F16A0"}.mdi-robot-dead::before{content:"\F16A1"}.mdi-robot-dead-outline::before{content:"\F16A2"}.mdi-robot-excited::before{content:"\F16A3"}.mdi-robot-excited-outline::before{content:"\F16A4"}.mdi-robot-happy::before{content:"\F1719"}.mdi-robot-happy-outline::before{content:"\F171A"}.mdi-robot-industrial::before{content:"\F0B46"}.mdi-robot-industrial-outline::before{content:"\F1A1A"}.mdi-robot-love::before{content:"\F16A5"}.mdi-robot-love-outline::before{content:"\F16A6"}.mdi-robot-mower::before{content:"\F11F7"}.mdi-robot-mower-outline::before{content:"\F11F3"}.mdi-robot-off::before{content:"\F16A7"}.mdi-robot-off-outline::before{content:"\F167B"}.mdi-robot-outline::before{content:"\F167A"}.mdi-robot-vacuum::before{content:"\F070D"}.mdi-robot-vacuum-alert::before{content:"\F1B5D"}.mdi-robot-vacuum-off::before{content:"\F1C01"}.mdi-robot-vacuum-variant::before{content:"\F0908"}.mdi-robot-vacuum-variant-alert::before{content:"\F1B5E"}.mdi-robot-vacuum-variant-off::before{content:"\F1C02"}.mdi-rocket::before{content:"\F0463"}.mdi-rocket-launch::before{content:"\F14DE"}.mdi-rocket-launch-outline::before{content:"\F14DF"}.mdi-rocket-outline::before{content:"\F13AF"}.mdi-rodent::before{content:"\F1327"}.mdi-roller-shade::before{content:"\F1A6B"}.mdi-roller-shade-closed::before{content:"\F1A6C"}.mdi-roller-skate::before{content:"\F0D2B"}.mdi-roller-skate-off::before{content:"\F0145"}.mdi-rollerblade::before{content:"\F0D2C"}.mdi-rollerblade-off::before{content:"\F002E"}.mdi-rollupjs::before{content:"\F0BC0"}.mdi-rolodex::before{content:"\F1AB9"}.mdi-rolodex-outline::before{content:"\F1ABA"}.mdi-roman-numeral-1::before{content:"\F1088"}.mdi-roman-numeral-10::before{content:"\F1091"}.mdi-roman-numeral-2::before{content:"\F1089"}.mdi-roman-numeral-3::before{content:"\F108A"}.mdi-roman-numeral-4::before{content:"\F108B"}.mdi-roman-numeral-5::before{content:"\F108C"}.mdi-roman-numeral-6::before{content:"\F108D"}.mdi-roman-numeral-7::before{content:"\F108E"}.mdi-roman-numeral-8::before{content:"\F108F"}.mdi-roman-numeral-9::before{content:"\F1090"}.mdi-room-service::before{content:"\F088D"}.mdi-room-service-outline::before{content:"\F0D97"}.mdi-rotate-360::before{content:"\F1999"}.mdi-rotate-3d::before{content:"\F0EC7"}.mdi-rotate-3d-variant::before{content:"\F0464"}.mdi-rotate-left::before{content:"\F0465"}.mdi-rotate-left-variant::before{content:"\F0466"}.mdi-rotate-orbit::before{content:"\F0D98"}.mdi-rotate-right::before{content:"\F0467"}.mdi-rotate-right-variant::before{content:"\F0468"}.mdi-rounded-corner::before{content:"\F0607"}.mdi-router::before{content:"\F11E2"}.mdi-router-network::before{content:"\F1087"}.mdi-router-network-wireless::before{content:"\F1C97"}.mdi-router-wireless::before{content:"\F0469"}.mdi-router-wireless-off::before{content:"\F15A3"}.mdi-router-wireless-settings::before{content:"\F0A69"}.mdi-routes::before{content:"\F046A"}.mdi-routes-clock::before{content:"\F1059"}.mdi-rowing::before{content:"\F0608"}.mdi-rss::before{content:"\F046B"}.mdi-rss-box::before{content:"\F046C"}.mdi-rss-off::before{content:"\F0F21"}.mdi-rug::before{content:"\F1475"}.mdi-rugby::before{content:"\F0D99"}.mdi-ruler::before{content:"\F046D"}.mdi-ruler-square::before{content:"\F0CC2"}.mdi-ruler-square-compass::before{content:"\F0EBE"}.mdi-run::before{content:"\F070E"}.mdi-run-fast::before{content:"\F046E"}.mdi-rv-truck::before{content:"\F11D4"}.mdi-sack::before{content:"\F0D2E"}.mdi-sack-outline::before{content:"\F1C4C"}.mdi-sack-percent::before{content:"\F0D2F"}.mdi-safe::before{content:"\F0A6A"}.mdi-safe-square::before{content:"\F127C"}.mdi-safe-square-outline::before{content:"\F127D"}.mdi-safety-goggles::before{content:"\F0D30"}.mdi-sail-boat::before{content:"\F0EC8"}.mdi-sail-boat-sink::before{content:"\F1AEF"}.mdi-sale::before{content:"\F046F"}.mdi-sale-outline::before{content:"\F1A06"}.mdi-salesforce::before{content:"\F088E"}.mdi-sass::before{content:"\F07EC"}.mdi-satellite::before{content:"\F0470"}.mdi-satellite-uplink::before{content:"\F0909"}.mdi-satellite-variant::before{content:"\F0471"}.mdi-sausage::before{content:"\F08BA"}.mdi-sausage-off::before{content:"\F1789"}.mdi-saw-blade::before{content:"\F0E61"}.mdi-sawtooth-wave::before{content:"\F147A"}.mdi-saxophone::before{content:"\F0609"}.mdi-scale::before{content:"\F0472"}.mdi-scale-balance::before{content:"\F05D1"}.mdi-scale-bathroom::before{content:"\F0473"}.mdi-scale-off::before{content:"\F105A"}.mdi-scale-unbalanced::before{content:"\F19B8"}.mdi-scan-helper::before{content:"\F13D8"}.mdi-scanner::before{content:"\F06AB"}.mdi-scanner-off::before{content:"\F090A"}.mdi-scatter-plot::before{content:"\F0EC9"}.mdi-scatter-plot-outline::before{content:"\F0ECA"}.mdi-scent::before{content:"\F1958"}.mdi-scent-off::before{content:"\F1959"}.mdi-school::before{content:"\F0474"}.mdi-school-outline::before{content:"\F1180"}.mdi-scissors-cutting::before{content:"\F0A6B"}.mdi-scooter::before{content:"\F15BD"}.mdi-scooter-electric::before{content:"\F15BE"}.mdi-scoreboard::before{content:"\F127E"}.mdi-scoreboard-outline::before{content:"\F127F"}.mdi-screen-rotation::before{content:"\F0475"}.mdi-screen-rotation-lock::before{content:"\F0478"}.mdi-screw-flat-top::before{content:"\F0DF3"}.mdi-screw-lag::before{content:"\F0DF4"}.mdi-screw-machine-flat-top::before{content:"\F0DF5"}.mdi-screw-machine-round-top::before{content:"\F0DF6"}.mdi-screw-round-top::before{content:"\F0DF7"}.mdi-screwdriver::before{content:"\F0476"}.mdi-script::before{content:"\F0BC1"}.mdi-script-outline::before{content:"\F0477"}.mdi-script-text::before{content:"\F0BC2"}.mdi-script-text-key::before{content:"\F1725"}.mdi-script-text-key-outline::before{content:"\F1726"}.mdi-script-text-outline::before{content:"\F0BC3"}.mdi-script-text-play::before{content:"\F1727"}.mdi-script-text-play-outline::before{content:"\F1728"}.mdi-sd::before{content:"\F0479"}.mdi-seal::before{content:"\F047A"}.mdi-seal-variant::before{content:"\F0FD9"}.mdi-search-web::before{content:"\F070F"}.mdi-seat::before{content:"\F0CC3"}.mdi-seat-flat::before{content:"\F047B"}.mdi-seat-flat-angled::before{content:"\F047C"}.mdi-seat-individual-suite::before{content:"\F047D"}.mdi-seat-legroom-extra::before{content:"\F047E"}.mdi-seat-legroom-normal::before{content:"\F047F"}.mdi-seat-legroom-reduced::before{content:"\F0480"}.mdi-seat-outline::before{content:"\F0CC4"}.mdi-seat-passenger::before{content:"\F1249"}.mdi-seat-recline-extra::before{content:"\F0481"}.mdi-seat-recline-normal::before{content:"\F0482"}.mdi-seatbelt::before{content:"\F0CC5"}.mdi-security::before{content:"\F0483"}.mdi-security-network::before{content:"\F0484"}.mdi-seed::before{content:"\F0E62"}.mdi-seed-off::before{content:"\F13FD"}.mdi-seed-off-outline::before{content:"\F13FE"}.mdi-seed-outline::before{content:"\F0E63"}.mdi-seed-plus::before{content:"\F1A6D"}.mdi-seed-plus-outline::before{content:"\F1A6E"}.mdi-seesaw::before{content:"\F15A4"}.mdi-segment::before{content:"\F0ECB"}.mdi-select::before{content:"\F0485"}.mdi-select-all::before{content:"\F0486"}.mdi-select-arrow-down::before{content:"\F1B59"}.mdi-select-arrow-up::before{content:"\F1B58"}.mdi-select-color::before{content:"\F0D31"}.mdi-select-compare::before{content:"\F0AD9"}.mdi-select-drag::before{content:"\F0A6C"}.mdi-select-group::before{content:"\F0F82"}.mdi-select-inverse::before{content:"\F0487"}.mdi-select-marker::before{content:"\F1280"}.mdi-select-multiple::before{content:"\F1281"}.mdi-select-multiple-marker::before{content:"\F1282"}.mdi-select-off::before{content:"\F0488"}.mdi-select-place::before{content:"\F0FDA"}.mdi-select-remove::before{content:"\F17C1"}.mdi-select-search::before{content:"\F1204"}.mdi-selection::before{content:"\F0489"}.mdi-selection-drag::before{content:"\F0A6D"}.mdi-selection-ellipse::before{content:"\F0D32"}.mdi-selection-ellipse-arrow-inside::before{content:"\F0F22"}.mdi-selection-ellipse-remove::before{content:"\F17C2"}.mdi-selection-marker::before{content:"\F1283"}.mdi-selection-multiple::before{content:"\F1285"}.mdi-selection-multiple-marker::before{content:"\F1284"}.mdi-selection-off::before{content:"\F0777"}.mdi-selection-remove::before{content:"\F17C3"}.mdi-selection-search::before{content:"\F1205"}.mdi-semantic-web::before{content:"\F1316"}.mdi-send::before{content:"\F048A"}.mdi-send-check::before{content:"\F1161"}.mdi-send-check-outline::before{content:"\F1162"}.mdi-send-circle::before{content:"\F0DF8"}.mdi-send-circle-outline::before{content:"\F0DF9"}.mdi-send-clock::before{content:"\F1163"}.mdi-send-clock-outline::before{content:"\F1164"}.mdi-send-lock::before{content:"\F07ED"}.mdi-send-lock-outline::before{content:"\F1166"}.mdi-send-outline::before{content:"\F1165"}.mdi-send-variant::before{content:"\F1C4D"}.mdi-send-variant-clock::before{content:"\F1C7E"}.mdi-send-variant-clock-outline::before{content:"\F1C7F"}.mdi-send-variant-outline::before{content:"\F1C4E"}.mdi-serial-port::before{content:"\F065C"}.mdi-server::before{content:"\F048B"}.mdi-server-minus::before{content:"\F048C"}.mdi-server-minus-outline::before{content:"\F1C98"}.mdi-server-network::before{content:"\F048D"}.mdi-server-network-off::before{content:"\F048E"}.mdi-server-network-outline::before{content:"\F1C99"}.mdi-server-off::before{content:"\F048F"}.mdi-server-outline::before{content:"\F1C9A"}.mdi-server-plus::before{content:"\F0490"}.mdi-server-plus-outline::before{content:"\F1C9B"}.mdi-server-remove::before{content:"\F0491"}.mdi-server-security::before{content:"\F0492"}.mdi-set-all::before{content:"\F0778"}.mdi-set-center::before{content:"\F0779"}.mdi-set-center-right::before{content:"\F077A"}.mdi-set-left::before{content:"\F077B"}.mdi-set-left-center::before{content:"\F077C"}.mdi-set-left-right::before{content:"\F077D"}.mdi-set-merge::before{content:"\F14E0"}.mdi-set-none::before{content:"\F077E"}.mdi-set-right::before{content:"\F077F"}.mdi-set-split::before{content:"\F14E1"}.mdi-set-square::before{content:"\F145D"}.mdi-set-top-box::before{content:"\F099F"}.mdi-settings-helper::before{content:"\F0A6E"}.mdi-shaker::before{content:"\F110E"}.mdi-shaker-outline::before{content:"\F110F"}.mdi-shape::before{content:"\F0831"}.mdi-shape-circle-plus::before{content:"\F065D"}.mdi-shape-outline::before{content:"\F0832"}.mdi-shape-oval-plus::before{content:"\F11FA"}.mdi-shape-plus::before{content:"\F0495"}.mdi-shape-plus-outline::before{content:"\F1C4F"}.mdi-shape-polygon-plus::before{content:"\F065E"}.mdi-shape-rectangle-plus::before{content:"\F065F"}.mdi-shape-square-plus::before{content:"\F0660"}.mdi-shape-square-rounded-plus::before{content:"\F14FA"}.mdi-share::before{content:"\F0496"}.mdi-share-all::before{content:"\F11F4"}.mdi-share-all-outline::before{content:"\F11F5"}.mdi-share-circle::before{content:"\F11AD"}.mdi-share-off::before{content:"\F0F23"}.mdi-share-off-outline::before{content:"\F0F24"}.mdi-share-outline::before{content:"\F0932"}.mdi-share-variant::before{content:"\F0497"}.mdi-share-variant-outline::before{content:"\F1514"}.mdi-shark::before{content:"\F18BA"}.mdi-shark-fin::before{content:"\F1673"}.mdi-shark-fin-outline::before{content:"\F1674"}.mdi-shark-off::before{content:"\F18BB"}.mdi-sheep::before{content:"\F0CC6"}.mdi-shield::before{content:"\F0498"}.mdi-shield-account::before{content:"\F088F"}.mdi-shield-account-outline::before{content:"\F0A12"}.mdi-shield-account-variant::before{content:"\F15A7"}.mdi-shield-account-variant-outline::before{content:"\F15A8"}.mdi-shield-airplane::before{content:"\F06BB"}.mdi-shield-airplane-outline::before{content:"\F0CC7"}.mdi-shield-alert::before{content:"\F0ECC"}.mdi-shield-alert-outline::before{content:"\F0ECD"}.mdi-shield-bug::before{content:"\F13DA"}.mdi-shield-bug-outline::before{content:"\F13DB"}.mdi-shield-car::before{content:"\F0F83"}.mdi-shield-check::before{content:"\F0565"}.mdi-shield-check-outline::before{content:"\F0CC8"}.mdi-shield-cross::before{content:"\F0CC9"}.mdi-shield-cross-outline::before{content:"\F0CCA"}.mdi-shield-crown::before{content:"\F18BC"}.mdi-shield-crown-outline::before{content:"\F18BD"}.mdi-shield-edit::before{content:"\F11A0"}.mdi-shield-edit-outline::before{content:"\F11A1"}.mdi-shield-half::before{content:"\F1360"}.mdi-shield-half-full::before{content:"\F0780"}.mdi-shield-home::before{content:"\F068A"}.mdi-shield-home-outline::before{content:"\F0CCB"}.mdi-shield-key::before{content:"\F0BC4"}.mdi-shield-key-outline::before{content:"\F0BC5"}.mdi-shield-link-variant::before{content:"\F0D33"}.mdi-shield-link-variant-outline::before{content:"\F0D34"}.mdi-shield-lock::before{content:"\F099D"}.mdi-shield-lock-open::before{content:"\F199A"}.mdi-shield-lock-open-outline::before{content:"\F199B"}.mdi-shield-lock-outline::before{content:"\F0CCC"}.mdi-shield-moon::before{content:"\F1828"}.mdi-shield-moon-outline::before{content:"\F1829"}.mdi-shield-off::before{content:"\F099E"}.mdi-shield-off-outline::before{content:"\F099C"}.mdi-shield-outline::before{content:"\F0499"}.mdi-shield-plus::before{content:"\F0ADA"}.mdi-shield-plus-outline::before{content:"\F0ADB"}.mdi-shield-refresh::before{content:"\F00AA"}.mdi-shield-refresh-outline::before{content:"\F01E0"}.mdi-shield-remove::before{content:"\F0ADC"}.mdi-shield-remove-outline::before{content:"\F0ADD"}.mdi-shield-search::before{content:"\F0D9A"}.mdi-shield-star::before{content:"\F113B"}.mdi-shield-star-outline::before{content:"\F113C"}.mdi-shield-sun::before{content:"\F105D"}.mdi-shield-sun-outline::before{content:"\F105E"}.mdi-shield-sword::before{content:"\F18BE"}.mdi-shield-sword-outline::before{content:"\F18BF"}.mdi-shield-sync::before{content:"\F11A2"}.mdi-shield-sync-outline::before{content:"\F11A3"}.mdi-shimmer::before{content:"\F1545"}.mdi-ship-wheel::before{content:"\F0833"}.mdi-shipping-pallet::before{content:"\F184E"}.mdi-shoe-ballet::before{content:"\F15CA"}.mdi-shoe-cleat::before{content:"\F15C7"}.mdi-shoe-formal::before{content:"\F0B47"}.mdi-shoe-heel::before{content:"\F0B48"}.mdi-shoe-print::before{content:"\F0DFA"}.mdi-shoe-sneaker::before{content:"\F15C8"}.mdi-shopping::before{content:"\F049A"}.mdi-shopping-music::before{content:"\F049B"}.mdi-shopping-outline::before{content:"\F11D5"}.mdi-shopping-search::before{content:"\F0F84"}.mdi-shopping-search-outline::before{content:"\F1A6F"}.mdi-shore::before{content:"\F14F9"}.mdi-shovel::before{content:"\F0710"}.mdi-shovel-off::before{content:"\F0711"}.mdi-shower::before{content:"\F09A0"}.mdi-shower-head::before{content:"\F09A1"}.mdi-shredder::before{content:"\F049C"}.mdi-shuffle::before{content:"\F049D"}.mdi-shuffle-disabled::before{content:"\F049E"}.mdi-shuffle-variant::before{content:"\F049F"}.mdi-shuriken::before{content:"\F137F"}.mdi-sickle::before{content:"\F18C0"}.mdi-sigma::before{content:"\F04A0"}.mdi-sigma-lower::before{content:"\F062B"}.mdi-sign-caution::before{content:"\F04A1"}.mdi-sign-direction::before{content:"\F0781"}.mdi-sign-direction-minus::before{content:"\F1000"}.mdi-sign-direction-plus::before{content:"\F0FDC"}.mdi-sign-direction-remove::before{content:"\F0FDD"}.mdi-sign-language::before{content:"\F1B4D"}.mdi-sign-language-outline::before{content:"\F1B4E"}.mdi-sign-pole::before{content:"\F14F8"}.mdi-sign-real-estate::before{content:"\F1118"}.mdi-sign-text::before{content:"\F0782"}.mdi-sign-yield::before{content:"\F1BAF"}.mdi-signal::before{content:"\F04A2"}.mdi-signal-2g::before{content:"\F0712"}.mdi-signal-3g::before{content:"\F0713"}.mdi-signal-4g::before{content:"\F0714"}.mdi-signal-5g::before{content:"\F0A6F"}.mdi-signal-cellular-1::before{content:"\F08BC"}.mdi-signal-cellular-2::before{content:"\F08BD"}.mdi-signal-cellular-3::before{content:"\F08BE"}.mdi-signal-cellular-outline::before{content:"\F08BF"}.mdi-signal-distance-variant::before{content:"\F0E64"}.mdi-signal-hspa::before{content:"\F0715"}.mdi-signal-hspa-plus::before{content:"\F0716"}.mdi-signal-off::before{content:"\F0783"}.mdi-signal-variant::before{content:"\F060A"}.mdi-signature::before{content:"\F0DFB"}.mdi-signature-freehand::before{content:"\F0DFC"}.mdi-signature-image::before{content:"\F0DFD"}.mdi-signature-text::before{content:"\F0DFE"}.mdi-silo::before{content:"\F1B9F"}.mdi-silo-outline::before{content:"\F0B49"}.mdi-silverware::before{content:"\F04A3"}.mdi-silverware-clean::before{content:"\F0FDE"}.mdi-silverware-fork::before{content:"\F04A4"}.mdi-silverware-fork-knife::before{content:"\F0A70"}.mdi-silverware-spoon::before{content:"\F04A5"}.mdi-silverware-variant::before{content:"\F04A6"}.mdi-sim::before{content:"\F04A7"}.mdi-sim-alert::before{content:"\F04A8"}.mdi-sim-alert-outline::before{content:"\F15D3"}.mdi-sim-off::before{content:"\F04A9"}.mdi-sim-off-outline::before{content:"\F15D4"}.mdi-sim-outline::before{content:"\F15D5"}.mdi-simple-icons::before{content:"\F131D"}.mdi-sina-weibo::before{content:"\F0ADF"}.mdi-sine-wave::before{content:"\F095B"}.mdi-sitemap::before{content:"\F04AA"}.mdi-sitemap-outline::before{content:"\F199C"}.mdi-size-l::before{content:"\F13A6"}.mdi-size-m::before{content:"\F13A5"}.mdi-size-s::before{content:"\F13A4"}.mdi-size-xl::before{content:"\F13A7"}.mdi-size-xs::before{content:"\F13A3"}.mdi-size-xxl::before{content:"\F13A8"}.mdi-size-xxs::before{content:"\F13A2"}.mdi-size-xxxl::before{content:"\F13A9"}.mdi-skate::before{content:"\F0D35"}.mdi-skate-off::before{content:"\F0699"}.mdi-skateboard::before{content:"\F14C2"}.mdi-skateboarding::before{content:"\F0501"}.mdi-skew-less::before{content:"\F0D36"}.mdi-skew-more::before{content:"\F0D37"}.mdi-ski::before{content:"\F1304"}.mdi-ski-cross-country::before{content:"\F1305"}.mdi-ski-water::before{content:"\F1306"}.mdi-skip-backward::before{content:"\F04AB"}.mdi-skip-backward-outline::before{content:"\F0F25"}.mdi-skip-forward::before{content:"\F04AC"}.mdi-skip-forward-outline::before{content:"\F0F26"}.mdi-skip-next::before{content:"\F04AD"}.mdi-skip-next-circle::before{content:"\F0661"}.mdi-skip-next-circle-outline::before{content:"\F0662"}.mdi-skip-next-outline::before{content:"\F0F27"}.mdi-skip-previous::before{content:"\F04AE"}.mdi-skip-previous-circle::before{content:"\F0663"}.mdi-skip-previous-circle-outline::before{content:"\F0664"}.mdi-skip-previous-outline::before{content:"\F0F28"}.mdi-skull::before{content:"\F068C"}.mdi-skull-crossbones::before{content:"\F0BC6"}.mdi-skull-crossbones-outline::before{content:"\F0BC7"}.mdi-skull-outline::before{content:"\F0BC8"}.mdi-skull-scan::before{content:"\F14C7"}.mdi-skull-scan-outline::before{content:"\F14C8"}.mdi-skype::before{content:"\F04AF"}.mdi-skype-business::before{content:"\F04B0"}.mdi-slack::before{content:"\F04B1"}.mdi-slash-forward::before{content:"\F0FDF"}.mdi-slash-forward-box::before{content:"\F0FE0"}.mdi-sledding::before{content:"\F041B"}.mdi-sleep::before{content:"\F04B2"}.mdi-sleep-off::before{content:"\F04B3"}.mdi-slide::before{content:"\F15A5"}.mdi-slope-downhill::before{content:"\F0DFF"}.mdi-slope-uphill::before{content:"\F0E00"}.mdi-slot-machine::before{content:"\F1114"}.mdi-slot-machine-outline::before{content:"\F1115"}.mdi-smart-card::before{content:"\F10BD"}.mdi-smart-card-off::before{content:"\F18F7"}.mdi-smart-card-off-outline::before{content:"\F18F8"}.mdi-smart-card-outline::before{content:"\F10BE"}.mdi-smart-card-reader::before{content:"\F10BF"}.mdi-smart-card-reader-outline::before{content:"\F10C0"}.mdi-smog::before{content:"\F0A71"}.mdi-smoke::before{content:"\F1799"}.mdi-smoke-detector::before{content:"\F0392"}.mdi-smoke-detector-alert::before{content:"\F192E"}.mdi-smoke-detector-alert-outline::before{content:"\F192F"}.mdi-smoke-detector-off::before{content:"\F1809"}.mdi-smoke-detector-off-outline::before{content:"\F180A"}.mdi-smoke-detector-outline::before{content:"\F1808"}.mdi-smoke-detector-variant::before{content:"\F180B"}.mdi-smoke-detector-variant-alert::before{content:"\F1930"}.mdi-smoke-detector-variant-off::before{content:"\F180C"}.mdi-smoking::before{content:"\F04B4"}.mdi-smoking-off::before{content:"\F04B5"}.mdi-smoking-pipe::before{content:"\F140D"}.mdi-smoking-pipe-off::before{content:"\F1428"}.mdi-snail::before{content:"\F1677"}.mdi-snake::before{content:"\F150E"}.mdi-snapchat::before{content:"\F04B6"}.mdi-snowboard::before{content:"\F1307"}.mdi-snowflake::before{content:"\F0717"}.mdi-snowflake-alert::before{content:"\F0F29"}.mdi-snowflake-check::before{content:"\F1A70"}.mdi-snowflake-melt::before{content:"\F12CB"}.mdi-snowflake-off::before{content:"\F14E3"}.mdi-snowflake-thermometer::before{content:"\F1A71"}.mdi-snowflake-variant::before{content:"\F0F2A"}.mdi-snowman::before{content:"\F04B7"}.mdi-snowmobile::before{content:"\F06DD"}.mdi-snowshoeing::before{content:"\F1A72"}.mdi-soccer::before{content:"\F04B8"}.mdi-soccer-field::before{content:"\F0834"}.mdi-social-distance-2-meters::before{content:"\F1579"}.mdi-social-distance-6-feet::before{content:"\F157A"}.mdi-sofa::before{content:"\F04B9"}.mdi-sofa-outline::before{content:"\F156D"}.mdi-sofa-single::before{content:"\F156E"}.mdi-sofa-single-outline::before{content:"\F156F"}.mdi-solar-panel::before{content:"\F0D9B"}.mdi-solar-panel-large::before{content:"\F0D9C"}.mdi-solar-power::before{content:"\F0A72"}.mdi-solar-power-variant::before{content:"\F1A73"}.mdi-solar-power-variant-outline::before{content:"\F1A74"}.mdi-soldering-iron::before{content:"\F1092"}.mdi-solid::before{content:"\F068D"}.mdi-sony-playstation::before{content:"\F0414"}.mdi-sort::before{content:"\F04BA"}.mdi-sort-alphabetical-ascending::before{content:"\F05BD"}.mdi-sort-alphabetical-ascending-variant::before{content:"\F1148"}.mdi-sort-alphabetical-descending::before{content:"\F05BF"}.mdi-sort-alphabetical-descending-variant::before{content:"\F1149"}.mdi-sort-alphabetical-variant::before{content:"\F04BB"}.mdi-sort-ascending::before{content:"\F04BC"}.mdi-sort-bool-ascending::before{content:"\F1385"}.mdi-sort-bool-ascending-variant::before{content:"\F1386"}.mdi-sort-bool-descending::before{content:"\F1387"}.mdi-sort-bool-descending-variant::before{content:"\F1388"}.mdi-sort-calendar-ascending::before{content:"\F1547"}.mdi-sort-calendar-descending::before{content:"\F1548"}.mdi-sort-clock-ascending::before{content:"\F1549"}.mdi-sort-clock-ascending-outline::before{content:"\F154A"}.mdi-sort-clock-descending::before{content:"\F154B"}.mdi-sort-clock-descending-outline::before{content:"\F154C"}.mdi-sort-descending::before{content:"\F04BD"}.mdi-sort-numeric-ascending::before{content:"\F1389"}.mdi-sort-numeric-ascending-variant::before{content:"\F090D"}.mdi-sort-numeric-descending::before{content:"\F138A"}.mdi-sort-numeric-descending-variant::before{content:"\F0AD2"}.mdi-sort-numeric-variant::before{content:"\F04BE"}.mdi-sort-reverse-variant::before{content:"\F033C"}.mdi-sort-variant::before{content:"\F04BF"}.mdi-sort-variant-lock::before{content:"\F0CCD"}.mdi-sort-variant-lock-open::before{content:"\F0CCE"}.mdi-sort-variant-off::before{content:"\F1ABB"}.mdi-sort-variant-remove::before{content:"\F1147"}.mdi-soundbar::before{content:"\F17DB"}.mdi-soundcloud::before{content:"\F04C0"}.mdi-source-branch::before{content:"\F062C"}.mdi-source-branch-check::before{content:"\F14CF"}.mdi-source-branch-minus::before{content:"\F14CB"}.mdi-source-branch-plus::before{content:"\F14CA"}.mdi-source-branch-refresh::before{content:"\F14CD"}.mdi-source-branch-remove::before{content:"\F14CC"}.mdi-source-branch-sync::before{content:"\F14CE"}.mdi-source-commit::before{content:"\F0718"}.mdi-source-commit-end::before{content:"\F0719"}.mdi-source-commit-end-local::before{content:"\F071A"}.mdi-source-commit-local::before{content:"\F071B"}.mdi-source-commit-next-local::before{content:"\F071C"}.mdi-source-commit-start::before{content:"\F071D"}.mdi-source-commit-start-next-local::before{content:"\F071E"}.mdi-source-fork::before{content:"\F04C1"}.mdi-source-merge::before{content:"\F062D"}.mdi-source-pull::before{content:"\F04C2"}.mdi-source-repository::before{content:"\F0CCF"}.mdi-source-repository-multiple::before{content:"\F0CD0"}.mdi-soy-sauce::before{content:"\F07EE"}.mdi-soy-sauce-off::before{content:"\F13FC"}.mdi-spa::before{content:"\F0CD1"}.mdi-spa-outline::before{content:"\F0CD2"}.mdi-space-invaders::before{content:"\F0BC9"}.mdi-space-station::before{content:"\F1383"}.mdi-spade::before{content:"\F0E65"}.mdi-speaker::before{content:"\F04C3"}.mdi-speaker-bluetooth::before{content:"\F09A2"}.mdi-speaker-message::before{content:"\F1B11"}.mdi-speaker-multiple::before{content:"\F0D38"}.mdi-speaker-off::before{content:"\F04C4"}.mdi-speaker-pause::before{content:"\F1B73"}.mdi-speaker-play::before{content:"\F1B72"}.mdi-speaker-stop::before{content:"\F1B74"}.mdi-speaker-wireless::before{content:"\F071F"}.mdi-spear::before{content:"\F1845"}.mdi-speedometer::before{content:"\F04C5"}.mdi-speedometer-medium::before{content:"\F0F85"}.mdi-speedometer-slow::before{content:"\F0F86"}.mdi-spellcheck::before{content:"\F04C6"}.mdi-sphere::before{content:"\F1954"}.mdi-sphere-off::before{content:"\F1955"}.mdi-spider::before{content:"\F11EA"}.mdi-spider-outline::before{content:"\F1C75"}.mdi-spider-thread::before{content:"\F11EB"}.mdi-spider-web::before{content:"\F0BCA"}.mdi-spirit-level::before{content:"\F14F1"}.mdi-spoon-sugar::before{content:"\F1429"}.mdi-spotify::before{content:"\F04C7"}.mdi-spotlight::before{content:"\F04C8"}.mdi-spotlight-beam::before{content:"\F04C9"}.mdi-spray::before{content:"\F0665"}.mdi-spray-bottle::before{content:"\F0AE0"}.mdi-sprinkler::before{content:"\F105F"}.mdi-sprinkler-fire::before{content:"\F199D"}.mdi-sprinkler-variant::before{content:"\F1060"}.mdi-sprout::before{content:"\F0E66"}.mdi-sprout-outline::before{content:"\F0E67"}.mdi-square::before{content:"\F0764"}.mdi-square-circle::before{content:"\F1500"}.mdi-square-circle-outline::before{content:"\F1C50"}.mdi-square-edit-outline::before{content:"\F090C"}.mdi-square-medium::before{content:"\F0A13"}.mdi-square-medium-outline::before{content:"\F0A14"}.mdi-square-off::before{content:"\F12EE"}.mdi-square-off-outline::before{content:"\F12EF"}.mdi-square-opacity::before{content:"\F1854"}.mdi-square-outline::before{content:"\F0763"}.mdi-square-root::before{content:"\F0784"}.mdi-square-root-box::before{content:"\F09A3"}.mdi-square-rounded::before{content:"\F14FB"}.mdi-square-rounded-badge::before{content:"\F1A07"}.mdi-square-rounded-badge-outline::before{content:"\F1A08"}.mdi-square-rounded-outline::before{content:"\F14FC"}.mdi-square-small::before{content:"\F0A15"}.mdi-square-wave::before{content:"\F147B"}.mdi-squeegee::before{content:"\F0AE1"}.mdi-ssh::before{content:"\F08C0"}.mdi-stack-exchange::before{content:"\F060B"}.mdi-stack-overflow::before{content:"\F04CC"}.mdi-stackpath::before{content:"\F0359"}.mdi-stadium::before{content:"\F0FF9"}.mdi-stadium-outline::before{content:"\F1B03"}.mdi-stadium-variant::before{content:"\F0720"}.mdi-stairs::before{content:"\F04CD"}.mdi-stairs-box::before{content:"\F139E"}.mdi-stairs-down::before{content:"\F12BE"}.mdi-stairs-up::before{content:"\F12BD"}.mdi-stamper::before{content:"\F0D39"}.mdi-standard-definition::before{content:"\F07EF"}.mdi-star::before{content:"\F04CE"}.mdi-star-box::before{content:"\F0A73"}.mdi-star-box-multiple::before{content:"\F1286"}.mdi-star-box-multiple-outline::before{content:"\F1287"}.mdi-star-box-outline::before{content:"\F0A74"}.mdi-star-check::before{content:"\F1566"}.mdi-star-check-outline::before{content:"\F156A"}.mdi-star-circle::before{content:"\F04CF"}.mdi-star-circle-outline::before{content:"\F09A4"}.mdi-star-cog::before{content:"\F1668"}.mdi-star-cog-outline::before{content:"\F1669"}.mdi-star-crescent::before{content:"\F0979"}.mdi-star-david::before{content:"\F097A"}.mdi-star-face::before{content:"\F09A5"}.mdi-star-four-points::before{content:"\F0AE2"}.mdi-star-four-points-box::before{content:"\F1C51"}.mdi-star-four-points-box-outline::before{content:"\F1C52"}.mdi-star-four-points-circle::before{content:"\F1C53"}.mdi-star-four-points-circle-outline::before{content:"\F1C54"}.mdi-star-four-points-outline::before{content:"\F0AE3"}.mdi-star-four-points-small::before{content:"\F1C55"}.mdi-star-half::before{content:"\F0246"}.mdi-star-half-full::before{content:"\F04D0"}.mdi-star-minus::before{content:"\F1564"}.mdi-star-minus-outline::before{content:"\F1568"}.mdi-star-off::before{content:"\F04D1"}.mdi-star-off-outline::before{content:"\F155B"}.mdi-star-outline::before{content:"\F04D2"}.mdi-star-plus::before{content:"\F1563"}.mdi-star-plus-outline::before{content:"\F1567"}.mdi-star-remove::before{content:"\F1565"}.mdi-star-remove-outline::before{content:"\F1569"}.mdi-star-settings::before{content:"\F166A"}.mdi-star-settings-outline::before{content:"\F166B"}.mdi-star-shooting::before{content:"\F1741"}.mdi-star-shooting-outline::before{content:"\F1742"}.mdi-star-three-points::before{content:"\F0AE4"}.mdi-star-three-points-outline::before{content:"\F0AE5"}.mdi-state-machine::before{content:"\F11EF"}.mdi-steam::before{content:"\F04D3"}.mdi-steering::before{content:"\F04D4"}.mdi-steering-off::before{content:"\F090E"}.mdi-step-backward::before{content:"\F04D5"}.mdi-step-backward-2::before{content:"\F04D6"}.mdi-step-forward::before{content:"\F04D7"}.mdi-step-forward-2::before{content:"\F04D8"}.mdi-stethoscope::before{content:"\F04D9"}.mdi-sticker::before{content:"\F1364"}.mdi-sticker-alert::before{content:"\F1365"}.mdi-sticker-alert-outline::before{content:"\F1366"}.mdi-sticker-check::before{content:"\F1367"}.mdi-sticker-check-outline::before{content:"\F1368"}.mdi-sticker-circle-outline::before{content:"\F05D0"}.mdi-sticker-emoji::before{content:"\F0785"}.mdi-sticker-minus::before{content:"\F1369"}.mdi-sticker-minus-outline::before{content:"\F136A"}.mdi-sticker-outline::before{content:"\F136B"}.mdi-sticker-plus::before{content:"\F136C"}.mdi-sticker-plus-outline::before{content:"\F136D"}.mdi-sticker-remove::before{content:"\F136E"}.mdi-sticker-remove-outline::before{content:"\F136F"}.mdi-sticker-text::before{content:"\F178E"}.mdi-sticker-text-outline::before{content:"\F178F"}.mdi-stocking::before{content:"\F04DA"}.mdi-stomach::before{content:"\F1093"}.mdi-stool::before{content:"\F195D"}.mdi-stool-outline::before{content:"\F195E"}.mdi-stop::before{content:"\F04DB"}.mdi-stop-circle::before{content:"\F0666"}.mdi-stop-circle-outline::before{content:"\F0667"}.mdi-storage-tank::before{content:"\F1A75"}.mdi-storage-tank-outline::before{content:"\F1A76"}.mdi-store::before{content:"\F04DC"}.mdi-store-24-hour::before{content:"\F04DD"}.mdi-store-alert::before{content:"\F18C1"}.mdi-store-alert-outline::before{content:"\F18C2"}.mdi-store-check::before{content:"\F18C3"}.mdi-store-check-outline::before{content:"\F18C4"}.mdi-store-clock::before{content:"\F18C5"}.mdi-store-clock-outline::before{content:"\F18C6"}.mdi-store-cog::before{content:"\F18C7"}.mdi-store-cog-outline::before{content:"\F18C8"}.mdi-store-edit::before{content:"\F18C9"}.mdi-store-edit-outline::before{content:"\F18CA"}.mdi-store-marker::before{content:"\F18CB"}.mdi-store-marker-outline::before{content:"\F18CC"}.mdi-store-minus::before{content:"\F165E"}.mdi-store-minus-outline::before{content:"\F18CD"}.mdi-store-off::before{content:"\F18CE"}.mdi-store-off-outline::before{content:"\F18CF"}.mdi-store-outline::before{content:"\F1361"}.mdi-store-plus::before{content:"\F165F"}.mdi-store-plus-outline::before{content:"\F18D0"}.mdi-store-remove::before{content:"\F1660"}.mdi-store-remove-outline::before{content:"\F18D1"}.mdi-store-search::before{content:"\F18D2"}.mdi-store-search-outline::before{content:"\F18D3"}.mdi-store-settings::before{content:"\F18D4"}.mdi-store-settings-outline::before{content:"\F18D5"}.mdi-storefront::before{content:"\F07C7"}.mdi-storefront-check::before{content:"\F1B7D"}.mdi-storefront-check-outline::before{content:"\F1B7E"}.mdi-storefront-edit::before{content:"\F1B7F"}.mdi-storefront-edit-outline::before{content:"\F1B80"}.mdi-storefront-minus::before{content:"\F1B83"}.mdi-storefront-minus-outline::before{content:"\F1B84"}.mdi-storefront-outline::before{content:"\F10C1"}.mdi-storefront-plus::before{content:"\F1B81"}.mdi-storefront-plus-outline::before{content:"\F1B82"}.mdi-storefront-remove::before{content:"\F1B85"}.mdi-storefront-remove-outline::before{content:"\F1B86"}.mdi-stove::before{content:"\F04DE"}.mdi-strategy::before{content:"\F11D6"}.mdi-stretch-to-page::before{content:"\F0F2B"}.mdi-stretch-to-page-outline::before{content:"\F0F2C"}.mdi-string-lights::before{content:"\F12BA"}.mdi-string-lights-off::before{content:"\F12BB"}.mdi-subdirectory-arrow-left::before{content:"\F060C"}.mdi-subdirectory-arrow-right::before{content:"\F060D"}.mdi-submarine::before{content:"\F156C"}.mdi-subtitles::before{content:"\F0A16"}.mdi-subtitles-outline::before{content:"\F0A17"}.mdi-subway::before{content:"\F06AC"}.mdi-subway-alert-variant::before{content:"\F0D9D"}.mdi-subway-variant::before{content:"\F04DF"}.mdi-summit::before{content:"\F0786"}.mdi-sun-angle::before{content:"\F1B27"}.mdi-sun-angle-outline::before{content:"\F1B28"}.mdi-sun-clock::before{content:"\F1A77"}.mdi-sun-clock-outline::before{content:"\F1A78"}.mdi-sun-compass::before{content:"\F19A5"}.mdi-sun-snowflake::before{content:"\F1796"}.mdi-sun-snowflake-variant::before{content:"\F1A79"}.mdi-sun-thermometer::before{content:"\F18D6"}.mdi-sun-thermometer-outline::before{content:"\F18D7"}.mdi-sun-wireless::before{content:"\F17FE"}.mdi-sun-wireless-outline::before{content:"\F17FF"}.mdi-sunglasses::before{content:"\F04E0"}.mdi-surfing::before{content:"\F1746"}.mdi-surround-sound::before{content:"\F05C5"}.mdi-surround-sound-2-0::before{content:"\F07F0"}.mdi-surround-sound-2-1::before{content:"\F1729"}.mdi-surround-sound-3-1::before{content:"\F07F1"}.mdi-surround-sound-5-1::before{content:"\F07F2"}.mdi-surround-sound-5-1-2::before{content:"\F172A"}.mdi-surround-sound-7-1::before{content:"\F07F3"}.mdi-svg::before{content:"\F0721"}.mdi-swap-horizontal::before{content:"\F04E1"}.mdi-swap-horizontal-bold::before{content:"\F0BCD"}.mdi-swap-horizontal-circle::before{content:"\F0FE1"}.mdi-swap-horizontal-circle-outline::before{content:"\F0FE2"}.mdi-swap-horizontal-hidden::before{content:"\F1D0E"}.mdi-swap-horizontal-variant::before{content:"\F08C1"}.mdi-swap-vertical::before{content:"\F04E2"}.mdi-swap-vertical-bold::before{content:"\F0BCE"}.mdi-swap-vertical-circle::before{content:"\F0FE3"}.mdi-swap-vertical-circle-outline::before{content:"\F0FE4"}.mdi-swap-vertical-variant::before{content:"\F08C2"}.mdi-swim::before{content:"\F04E3"}.mdi-switch::before{content:"\F04E4"}.mdi-sword::before{content:"\F04E5"}.mdi-sword-cross::before{content:"\F0787"}.mdi-syllabary-hangul::before{content:"\F1333"}.mdi-syllabary-hiragana::before{content:"\F1334"}.mdi-syllabary-katakana::before{content:"\F1335"}.mdi-syllabary-katakana-halfwidth::before{content:"\F1336"}.mdi-symbol::before{content:"\F1501"}.mdi-symfony::before{content:"\F0AE6"}.mdi-synagogue::before{content:"\F1B04"}.mdi-synagogue-outline::before{content:"\F1B05"}.mdi-sync::before{content:"\F04E6"}.mdi-sync-alert::before{content:"\F04E7"}.mdi-sync-circle::before{content:"\F1378"}.mdi-sync-off::before{content:"\F04E8"}.mdi-tab::before{content:"\F04E9"}.mdi-tab-minus::before{content:"\F0B4B"}.mdi-tab-plus::before{content:"\F075C"}.mdi-tab-remove::before{content:"\F0B4C"}.mdi-tab-search::before{content:"\F199E"}.mdi-tab-unselected::before{content:"\F04EA"}.mdi-table::before{content:"\F04EB"}.mdi-table-account::before{content:"\F13B9"}.mdi-table-alert::before{content:"\F13BA"}.mdi-table-arrow-down::before{content:"\F13BB"}.mdi-table-arrow-left::before{content:"\F13BC"}.mdi-table-arrow-right::before{content:"\F13BD"}.mdi-table-arrow-up::before{content:"\F13BE"}.mdi-table-border::before{content:"\F0A18"}.mdi-table-cancel::before{content:"\F13BF"}.mdi-table-chair::before{content:"\F1061"}.mdi-table-check::before{content:"\F13C0"}.mdi-table-clock::before{content:"\F13C1"}.mdi-table-cog::before{content:"\F13C2"}.mdi-table-column::before{content:"\F0835"}.mdi-table-column-plus-after::before{content:"\F04EC"}.mdi-table-column-plus-before::before{content:"\F04ED"}.mdi-table-column-remove::before{content:"\F04EE"}.mdi-table-column-width::before{content:"\F04EF"}.mdi-table-edit::before{content:"\F04F0"}.mdi-table-eye::before{content:"\F1094"}.mdi-table-eye-off::before{content:"\F13C3"}.mdi-table-filter::before{content:"\F1B8C"}.mdi-table-furniture::before{content:"\F05BC"}.mdi-table-headers-eye::before{content:"\F121D"}.mdi-table-headers-eye-off::before{content:"\F121E"}.mdi-table-heart::before{content:"\F13C4"}.mdi-table-key::before{content:"\F13C5"}.mdi-table-large::before{content:"\F04F1"}.mdi-table-large-plus::before{content:"\F0F87"}.mdi-table-large-remove::before{content:"\F0F88"}.mdi-table-lock::before{content:"\F13C6"}.mdi-table-merge-cells::before{content:"\F09A6"}.mdi-table-minus::before{content:"\F13C7"}.mdi-table-multiple::before{content:"\F13C8"}.mdi-table-network::before{content:"\F13C9"}.mdi-table-of-contents::before{content:"\F0836"}.mdi-table-off::before{content:"\F13CA"}.mdi-table-picnic::before{content:"\F1743"}.mdi-table-pivot::before{content:"\F183C"}.mdi-table-plus::before{content:"\F0A75"}.mdi-table-question::before{content:"\F1B21"}.mdi-table-refresh::before{content:"\F13A0"}.mdi-table-remove::before{content:"\F0A76"}.mdi-table-row::before{content:"\F0837"}.mdi-table-row-height::before{content:"\F04F2"}.mdi-table-row-plus-after::before{content:"\F04F3"}.mdi-table-row-plus-before::before{content:"\F04F4"}.mdi-table-row-remove::before{content:"\F04F5"}.mdi-table-search::before{content:"\F090F"}.mdi-table-settings::before{content:"\F0838"}.mdi-table-split-cell::before{content:"\F142A"}.mdi-table-star::before{content:"\F13CB"}.mdi-table-sync::before{content:"\F13A1"}.mdi-table-tennis::before{content:"\F0E68"}.mdi-tablet::before{content:"\F04F6"}.mdi-tablet-cellphone::before{content:"\F09A7"}.mdi-tablet-dashboard::before{content:"\F0ECE"}.mdi-taco::before{content:"\F0762"}.mdi-tag::before{content:"\F04F9"}.mdi-tag-arrow-down::before{content:"\F172B"}.mdi-tag-arrow-down-outline::before{content:"\F172C"}.mdi-tag-arrow-left::before{content:"\F172D"}.mdi-tag-arrow-left-outline::before{content:"\F172E"}.mdi-tag-arrow-right::before{content:"\F172F"}.mdi-tag-arrow-right-outline::before{content:"\F1730"}.mdi-tag-arrow-up::before{content:"\F1731"}.mdi-tag-arrow-up-outline::before{content:"\F1732"}.mdi-tag-check::before{content:"\F1A7A"}.mdi-tag-check-outline::before{content:"\F1A7B"}.mdi-tag-edit::before{content:"\F1C9C"}.mdi-tag-edit-outline::before{content:"\F1C9D"}.mdi-tag-faces::before{content:"\F04FA"}.mdi-tag-heart::before{content:"\F068B"}.mdi-tag-heart-outline::before{content:"\F0BCF"}.mdi-tag-hidden::before{content:"\F1C76"}.mdi-tag-minus::before{content:"\F0910"}.mdi-tag-minus-outline::before{content:"\F121F"}.mdi-tag-multiple::before{content:"\F04FB"}.mdi-tag-multiple-outline::before{content:"\F12F7"}.mdi-tag-off::before{content:"\F1220"}.mdi-tag-off-outline::before{content:"\F1221"}.mdi-tag-outline::before{content:"\F04FC"}.mdi-tag-plus::before{content:"\F0722"}.mdi-tag-plus-outline::before{content:"\F1222"}.mdi-tag-remove::before{content:"\F0723"}.mdi-tag-remove-outline::before{content:"\F1223"}.mdi-tag-search::before{content:"\F1907"}.mdi-tag-search-outline::before{content:"\F1908"}.mdi-tag-text::before{content:"\F1224"}.mdi-tag-text-outline::before{content:"\F04FD"}.mdi-tailwind::before{content:"\F13FF"}.mdi-tally-mark-1::before{content:"\F1ABC"}.mdi-tally-mark-2::before{content:"\F1ABD"}.mdi-tally-mark-3::before{content:"\F1ABE"}.mdi-tally-mark-4::before{content:"\F1ABF"}.mdi-tally-mark-5::before{content:"\F1AC0"}.mdi-tangram::before{content:"\F04F8"}.mdi-tank::before{content:"\F0D3A"}.mdi-tanker-truck::before{content:"\F0FE5"}.mdi-tape-drive::before{content:"\F16DF"}.mdi-tape-measure::before{content:"\F0B4D"}.mdi-target::before{content:"\F04FE"}.mdi-target-account::before{content:"\F0BD0"}.mdi-target-variant::before{content:"\F0A77"}.mdi-taxi::before{content:"\F04FF"}.mdi-tea::before{content:"\F0D9E"}.mdi-tea-outline::before{content:"\F0D9F"}.mdi-teamviewer::before{content:"\F0500"}.mdi-teddy-bear::before{content:"\F18FB"}.mdi-telescope::before{content:"\F0B4E"}.mdi-television::before{content:"\F0502"}.mdi-television-ambient-light::before{content:"\F1356"}.mdi-television-box::before{content:"\F0839"}.mdi-television-classic::before{content:"\F07F4"}.mdi-television-classic-off::before{content:"\F083A"}.mdi-television-guide::before{content:"\F0503"}.mdi-television-off::before{content:"\F083B"}.mdi-television-pause::before{content:"\F0F89"}.mdi-television-play::before{content:"\F0ECF"}.mdi-television-shimmer::before{content:"\F1110"}.mdi-television-speaker::before{content:"\F1B1B"}.mdi-television-speaker-off::before{content:"\F1B1C"}.mdi-television-stop::before{content:"\F0F8A"}.mdi-temperature-celsius::before{content:"\F0504"}.mdi-temperature-fahrenheit::before{content:"\F0505"}.mdi-temperature-kelvin::before{content:"\F0506"}.mdi-temple-buddhist::before{content:"\F1B06"}.mdi-temple-buddhist-outline::before{content:"\F1B07"}.mdi-temple-hindu::before{content:"\F1B08"}.mdi-temple-hindu-outline::before{content:"\F1B09"}.mdi-tennis::before{content:"\F0DA0"}.mdi-tennis-ball::before{content:"\F0507"}.mdi-tennis-ball-outline::before{content:"\F1C5F"}.mdi-tent::before{content:"\F0508"}.mdi-terraform::before{content:"\F1062"}.mdi-terrain::before{content:"\F0509"}.mdi-test-tube::before{content:"\F0668"}.mdi-test-tube-empty::before{content:"\F0911"}.mdi-test-tube-off::before{content:"\F0912"}.mdi-text::before{content:"\F09A8"}.mdi-text-account::before{content:"\F1570"}.mdi-text-box::before{content:"\F021A"}.mdi-text-box-check::before{content:"\F0EA6"}.mdi-text-box-check-outline::before{content:"\F0EA7"}.mdi-text-box-edit::before{content:"\F1A7C"}.mdi-text-box-edit-outline::before{content:"\F1A7D"}.mdi-text-box-minus::before{content:"\F0EA8"}.mdi-text-box-minus-outline::before{content:"\F0EA9"}.mdi-text-box-multiple::before{content:"\F0AB7"}.mdi-text-box-multiple-outline::before{content:"\F0AB8"}.mdi-text-box-outline::before{content:"\F09ED"}.mdi-text-box-plus::before{content:"\F0EAA"}.mdi-text-box-plus-outline::before{content:"\F0EAB"}.mdi-text-box-remove::before{content:"\F0EAC"}.mdi-text-box-remove-outline::before{content:"\F0EAD"}.mdi-text-box-search::before{content:"\F0EAE"}.mdi-text-box-search-outline::before{content:"\F0EAF"}.mdi-text-long::before{content:"\F09AA"}.mdi-text-recognition::before{content:"\F113D"}.mdi-text-search::before{content:"\F13B8"}.mdi-text-search-variant::before{content:"\F1A7E"}.mdi-text-shadow::before{content:"\F0669"}.mdi-text-short::before{content:"\F09A9"}.mdi-texture::before{content:"\F050C"}.mdi-texture-box::before{content:"\F0FE6"}.mdi-theater::before{content:"\F050D"}.mdi-theme-light-dark::before{content:"\F050E"}.mdi-thermometer::before{content:"\F050F"}.mdi-thermometer-alert::before{content:"\F0E01"}.mdi-thermometer-auto::before{content:"\F1B0F"}.mdi-thermometer-bluetooth::before{content:"\F1895"}.mdi-thermometer-check::before{content:"\F1A7F"}.mdi-thermometer-chevron-down::before{content:"\F0E02"}.mdi-thermometer-chevron-up::before{content:"\F0E03"}.mdi-thermometer-high::before{content:"\F10C2"}.mdi-thermometer-lines::before{content:"\F0510"}.mdi-thermometer-low::before{content:"\F10C3"}.mdi-thermometer-minus::before{content:"\F0E04"}.mdi-thermometer-off::before{content:"\F1531"}.mdi-thermometer-plus::before{content:"\F0E05"}.mdi-thermometer-probe::before{content:"\F1B2B"}.mdi-thermometer-probe-off::before{content:"\F1B2C"}.mdi-thermometer-water::before{content:"\F1A80"}.mdi-thermostat::before{content:"\F0393"}.mdi-thermostat-auto::before{content:"\F1B17"}.mdi-thermostat-box::before{content:"\F0891"}.mdi-thermostat-box-auto::before{content:"\F1B18"}.mdi-thermostat-cog::before{content:"\F1C80"}.mdi-thought-bubble::before{content:"\F07F6"}.mdi-thought-bubble-outline::before{content:"\F07F7"}.mdi-thumb-down::before{content:"\F0511"}.mdi-thumb-down-outline::before{content:"\F0512"}.mdi-thumb-up::before{content:"\F0513"}.mdi-thumb-up-outline::before{content:"\F0514"}.mdi-thumbs-up-down::before{content:"\F0515"}.mdi-thumbs-up-down-outline::before{content:"\F1914"}.mdi-ticket::before{content:"\F0516"}.mdi-ticket-account::before{content:"\F0517"}.mdi-ticket-confirmation::before{content:"\F0518"}.mdi-ticket-confirmation-outline::before{content:"\F13AA"}.mdi-ticket-outline::before{content:"\F0913"}.mdi-ticket-percent::before{content:"\F0724"}.mdi-ticket-percent-outline::before{content:"\F142B"}.mdi-tie::before{content:"\F0519"}.mdi-tilde::before{content:"\F0725"}.mdi-tilde-off::before{content:"\F18F3"}.mdi-timelapse::before{content:"\F051A"}.mdi-timeline::before{content:"\F0BD1"}.mdi-timeline-alert::before{content:"\F0F95"}.mdi-timeline-alert-outline::before{content:"\F0F98"}.mdi-timeline-check::before{content:"\F1532"}.mdi-timeline-check-outline::before{content:"\F1533"}.mdi-timeline-clock::before{content:"\F11FB"}.mdi-timeline-clock-outline::before{content:"\F11FC"}.mdi-timeline-minus::before{content:"\F1534"}.mdi-timeline-minus-outline::before{content:"\F1535"}.mdi-timeline-outline::before{content:"\F0BD2"}.mdi-timeline-plus::before{content:"\F0F96"}.mdi-timeline-plus-outline::before{content:"\F0F97"}.mdi-timeline-question::before{content:"\F0F99"}.mdi-timeline-question-outline::before{content:"\F0F9A"}.mdi-timeline-remove::before{content:"\F1536"}.mdi-timeline-remove-outline::before{content:"\F1537"}.mdi-timeline-text::before{content:"\F0BD3"}.mdi-timeline-text-outline::before{content:"\F0BD4"}.mdi-timer::before{content:"\F13AB"}.mdi-timer-10::before{content:"\F051C"}.mdi-timer-3::before{content:"\F051D"}.mdi-timer-alert::before{content:"\F1ACC"}.mdi-timer-alert-outline::before{content:"\F1ACD"}.mdi-timer-cancel::before{content:"\F1ACE"}.mdi-timer-cancel-outline::before{content:"\F1ACF"}.mdi-timer-check::before{content:"\F1AD0"}.mdi-timer-check-outline::before{content:"\F1AD1"}.mdi-timer-cog::before{content:"\F1925"}.mdi-timer-cog-outline::before{content:"\F1926"}.mdi-timer-edit::before{content:"\F1AD2"}.mdi-timer-edit-outline::before{content:"\F1AD3"}.mdi-timer-lock::before{content:"\F1AD4"}.mdi-timer-lock-open::before{content:"\F1AD5"}.mdi-timer-lock-open-outline::before{content:"\F1AD6"}.mdi-timer-lock-outline::before{content:"\F1AD7"}.mdi-timer-marker::before{content:"\F1AD8"}.mdi-timer-marker-outline::before{content:"\F1AD9"}.mdi-timer-minus::before{content:"\F1ADA"}.mdi-timer-minus-outline::before{content:"\F1ADB"}.mdi-timer-music::before{content:"\F1ADC"}.mdi-timer-music-outline::before{content:"\F1ADD"}.mdi-timer-off::before{content:"\F13AC"}.mdi-timer-off-outline::before{content:"\F051E"}.mdi-timer-outline::before{content:"\F051B"}.mdi-timer-pause::before{content:"\F1ADE"}.mdi-timer-pause-outline::before{content:"\F1ADF"}.mdi-timer-play::before{content:"\F1AE0"}.mdi-timer-play-outline::before{content:"\F1AE1"}.mdi-timer-plus::before{content:"\F1AE2"}.mdi-timer-plus-outline::before{content:"\F1AE3"}.mdi-timer-refresh::before{content:"\F1AE4"}.mdi-timer-refresh-outline::before{content:"\F1AE5"}.mdi-timer-remove::before{content:"\F1AE6"}.mdi-timer-remove-outline::before{content:"\F1AE7"}.mdi-timer-sand::before{content:"\F051F"}.mdi-timer-sand-complete::before{content:"\F199F"}.mdi-timer-sand-empty::before{content:"\F06AD"}.mdi-timer-sand-full::before{content:"\F078C"}.mdi-timer-sand-paused::before{content:"\F19A0"}.mdi-timer-settings::before{content:"\F1923"}.mdi-timer-settings-outline::before{content:"\F1924"}.mdi-timer-star::before{content:"\F1AE8"}.mdi-timer-star-outline::before{content:"\F1AE9"}.mdi-timer-stop::before{content:"\F1AEA"}.mdi-timer-stop-outline::before{content:"\F1AEB"}.mdi-timer-sync::before{content:"\F1AEC"}.mdi-timer-sync-outline::before{content:"\F1AED"}.mdi-timetable::before{content:"\F0520"}.mdi-tire::before{content:"\F1896"}.mdi-toaster::before{content:"\F1063"}.mdi-toaster-off::before{content:"\F11B7"}.mdi-toaster-oven::before{content:"\F0CD3"}.mdi-toggle-switch::before{content:"\F0521"}.mdi-toggle-switch-off::before{content:"\F0522"}.mdi-toggle-switch-off-outline::before{content:"\F0A19"}.mdi-toggle-switch-outline::before{content:"\F0A1A"}.mdi-toggle-switch-variant::before{content:"\F1A25"}.mdi-toggle-switch-variant-off::before{content:"\F1A26"}.mdi-toilet::before{content:"\F09AB"}.mdi-toolbox::before{content:"\F09AC"}.mdi-toolbox-outline::before{content:"\F09AD"}.mdi-tools::before{content:"\F1064"}.mdi-tooltip::before{content:"\F0523"}.mdi-tooltip-account::before{content:"\F000C"}.mdi-tooltip-cellphone::before{content:"\F183B"}.mdi-tooltip-check::before{content:"\F155C"}.mdi-tooltip-check-outline::before{content:"\F155D"}.mdi-tooltip-edit::before{content:"\F0524"}.mdi-tooltip-edit-outline::before{content:"\F12C5"}.mdi-tooltip-image::before{content:"\F0525"}.mdi-tooltip-image-outline::before{content:"\F0BD5"}.mdi-tooltip-minus::before{content:"\F155E"}.mdi-tooltip-minus-outline::before{content:"\F155F"}.mdi-tooltip-outline::before{content:"\F0526"}.mdi-tooltip-plus::before{content:"\F0BD6"}.mdi-tooltip-plus-outline::before{content:"\F0527"}.mdi-tooltip-question::before{content:"\F1BBA"}.mdi-tooltip-question-outline::before{content:"\F1BBB"}.mdi-tooltip-remove::before{content:"\F1560"}.mdi-tooltip-remove-outline::before{content:"\F1561"}.mdi-tooltip-text::before{content:"\F0528"}.mdi-tooltip-text-outline::before{content:"\F0BD7"}.mdi-tooth::before{content:"\F08C3"}.mdi-tooth-outline::before{content:"\F0529"}.mdi-toothbrush::before{content:"\F1129"}.mdi-toothbrush-electric::before{content:"\F112C"}.mdi-toothbrush-paste::before{content:"\F112A"}.mdi-torch::before{content:"\F1606"}.mdi-tortoise::before{content:"\F0D3B"}.mdi-toslink::before{content:"\F12B8"}.mdi-touch-text-outline::before{content:"\F1C60"}.mdi-tournament::before{content:"\F09AE"}.mdi-tow-truck::before{content:"\F083C"}.mdi-tower-beach::before{content:"\F0681"}.mdi-tower-fire::before{content:"\F0682"}.mdi-town-hall::before{content:"\F1875"}.mdi-toy-brick::before{content:"\F1288"}.mdi-toy-brick-marker::before{content:"\F1289"}.mdi-toy-brick-marker-outline::before{content:"\F128A"}.mdi-toy-brick-minus::before{content:"\F128B"}.mdi-toy-brick-minus-outline::before{content:"\F128C"}.mdi-toy-brick-outline::before{content:"\F128D"}.mdi-toy-brick-plus::before{content:"\F128E"}.mdi-toy-brick-plus-outline::before{content:"\F128F"}.mdi-toy-brick-remove::before{content:"\F1290"}.mdi-toy-brick-remove-outline::before{content:"\F1291"}.mdi-toy-brick-search::before{content:"\F1292"}.mdi-toy-brick-search-outline::before{content:"\F1293"}.mdi-track-light::before{content:"\F0914"}.mdi-track-light-off::before{content:"\F1B01"}.mdi-trackpad::before{content:"\F07F8"}.mdi-trackpad-lock::before{content:"\F0933"}.mdi-tractor::before{content:"\F0892"}.mdi-tractor-variant::before{content:"\F14C4"}.mdi-trademark::before{content:"\F0A78"}.mdi-traffic-cone::before{content:"\F137C"}.mdi-traffic-light::before{content:"\F052B"}.mdi-traffic-light-outline::before{content:"\F182A"}.mdi-train::before{content:"\F052C"}.mdi-train-bus::before{content:"\F1CC7"}.mdi-train-car::before{content:"\F0BD8"}.mdi-train-car-autorack::before{content:"\F1B2D"}.mdi-train-car-box::before{content:"\F1B2E"}.mdi-train-car-box-full::before{content:"\F1B2F"}.mdi-train-car-box-open::before{content:"\F1B30"}.mdi-train-car-caboose::before{content:"\F1B31"}.mdi-train-car-centerbeam::before{content:"\F1B32"}.mdi-train-car-centerbeam-full::before{content:"\F1B33"}.mdi-train-car-container::before{content:"\F1B34"}.mdi-train-car-flatbed::before{content:"\F1B35"}.mdi-train-car-flatbed-car::before{content:"\F1B36"}.mdi-train-car-flatbed-tank::before{content:"\F1B37"}.mdi-train-car-gondola::before{content:"\F1B38"}.mdi-train-car-gondola-full::before{content:"\F1B39"}.mdi-train-car-hopper::before{content:"\F1B3A"}.mdi-train-car-hopper-covered::before{content:"\F1B3B"}.mdi-train-car-hopper-full::before{content:"\F1B3C"}.mdi-train-car-intermodal::before{content:"\F1B3D"}.mdi-train-car-passenger::before{content:"\F1733"}.mdi-train-car-passenger-door::before{content:"\F1734"}.mdi-train-car-passenger-door-open::before{content:"\F1735"}.mdi-train-car-passenger-variant::before{content:"\F1736"}.mdi-train-car-tank::before{content:"\F1B3E"}.mdi-train-variant::before{content:"\F08C4"}.mdi-tram::before{content:"\F052D"}.mdi-tram-side::before{content:"\F0FE7"}.mdi-transcribe::before{content:"\F052E"}.mdi-transcribe-close::before{content:"\F052F"}.mdi-transfer::before{content:"\F1065"}.mdi-transfer-down::before{content:"\F0DA1"}.mdi-transfer-left::before{content:"\F0DA2"}.mdi-transfer-right::before{content:"\F0530"}.mdi-transfer-up::before{content:"\F0DA3"}.mdi-transit-connection::before{content:"\F0D3C"}.mdi-transit-connection-horizontal::before{content:"\F1546"}.mdi-transit-connection-variant::before{content:"\F0D3D"}.mdi-transit-detour::before{content:"\F0F8B"}.mdi-transit-skip::before{content:"\F1515"}.mdi-transit-transfer::before{content:"\F06AE"}.mdi-transition::before{content:"\F0915"}.mdi-transition-masked::before{content:"\F0916"}.mdi-translate::before{content:"\F05CA"}.mdi-translate-off::before{content:"\F0E06"}.mdi-translate-variant::before{content:"\F1B99"}.mdi-transmission-tower::before{content:"\F0D3E"}.mdi-transmission-tower-export::before{content:"\F192C"}.mdi-transmission-tower-import::before{content:"\F192D"}.mdi-transmission-tower-off::before{content:"\F19DD"}.mdi-trash-can::before{content:"\F0A79"}.mdi-trash-can-outline::before{content:"\F0A7A"}.mdi-tray::before{content:"\F1294"}.mdi-tray-alert::before{content:"\F1295"}.mdi-tray-arrow-down::before{content:"\F0120"}.mdi-tray-arrow-up::before{content:"\F011D"}.mdi-tray-full::before{content:"\F1296"}.mdi-tray-minus::before{content:"\F1297"}.mdi-tray-plus::before{content:"\F1298"}.mdi-tray-remove::before{content:"\F1299"}.mdi-treasure-chest::before{content:"\F0726"}.mdi-treasure-chest-outline::before{content:"\F1C77"}.mdi-tree::before{content:"\F0531"}.mdi-tree-outline::before{content:"\F0E69"}.mdi-trello::before{content:"\F0532"}.mdi-trending-down::before{content:"\F0533"}.mdi-trending-neutral::before{content:"\F0534"}.mdi-trending-up::before{content:"\F0535"}.mdi-triangle::before{content:"\F0536"}.mdi-triangle-down::before{content:"\F1C56"}.mdi-triangle-down-outline::before{content:"\F1C57"}.mdi-triangle-outline::before{content:"\F0537"}.mdi-triangle-small-down::before{content:"\F1A09"}.mdi-triangle-small-up::before{content:"\F1A0A"}.mdi-triangle-wave::before{content:"\F147C"}.mdi-triforce::before{content:"\F0BD9"}.mdi-trophy::before{content:"\F0538"}.mdi-trophy-award::before{content:"\F0539"}.mdi-trophy-broken::before{content:"\F0DA4"}.mdi-trophy-outline::before{content:"\F053A"}.mdi-trophy-variant::before{content:"\F053B"}.mdi-trophy-variant-outline::before{content:"\F053C"}.mdi-truck::before{content:"\F053D"}.mdi-truck-alert::before{content:"\F19DE"}.mdi-truck-alert-outline::before{content:"\F19DF"}.mdi-truck-cargo-container::before{content:"\F18D8"}.mdi-truck-check::before{content:"\F0CD4"}.mdi-truck-check-outline::before{content:"\F129A"}.mdi-truck-delivery::before{content:"\F053E"}.mdi-truck-delivery-outline::before{content:"\F129B"}.mdi-truck-fast::before{content:"\F0788"}.mdi-truck-fast-outline::before{content:"\F129C"}.mdi-truck-flatbed::before{content:"\F1891"}.mdi-truck-minus::before{content:"\F19AE"}.mdi-truck-minus-outline::before{content:"\F19BD"}.mdi-truck-off-road::before{content:"\F1C9E"}.mdi-truck-off-road-off::before{content:"\F1C9F"}.mdi-truck-outline::before{content:"\F129D"}.mdi-truck-plus::before{content:"\F19AD"}.mdi-truck-plus-outline::before{content:"\F19BC"}.mdi-truck-remove::before{content:"\F19AF"}.mdi-truck-remove-outline::before{content:"\F19BE"}.mdi-truck-snowflake::before{content:"\F19A6"}.mdi-truck-trailer::before{content:"\F0727"}.mdi-trumpet::before{content:"\F1096"}.mdi-tshirt-crew::before{content:"\F0A7B"}.mdi-tshirt-crew-outline::before{content:"\F053F"}.mdi-tshirt-v::before{content:"\F0A7C"}.mdi-tshirt-v-outline::before{content:"\F0540"}.mdi-tsunami::before{content:"\F1A81"}.mdi-tumble-dryer::before{content:"\F0917"}.mdi-tumble-dryer-alert::before{content:"\F11BA"}.mdi-tumble-dryer-off::before{content:"\F11BB"}.mdi-tune::before{content:"\F062E"}.mdi-tune-variant::before{content:"\F1542"}.mdi-tune-vertical::before{content:"\F066A"}.mdi-tune-vertical-variant::before{content:"\F1543"}.mdi-tunnel::before{content:"\F183D"}.mdi-tunnel-outline::before{content:"\F183E"}.mdi-turbine::before{content:"\F1A82"}.mdi-turkey::before{content:"\F171B"}.mdi-turnstile::before{content:"\F0CD5"}.mdi-turnstile-outline::before{content:"\F0CD6"}.mdi-turtle::before{content:"\F0CD7"}.mdi-twitch::before{content:"\F0543"}.mdi-twitter::before{content:"\F0544"}.mdi-two-factor-authentication::before{content:"\F09AF"}.mdi-typewriter::before{content:"\F0F2D"}.mdi-ubisoft::before{content:"\F0BDA"}.mdi-ubuntu::before{content:"\F0548"}.mdi-ufo::before{content:"\F10C4"}.mdi-ufo-outline::before{content:"\F10C5"}.mdi-ultra-high-definition::before{content:"\F07F9"}.mdi-umbraco::before{content:"\F0549"}.mdi-umbrella::before{content:"\F054A"}.mdi-umbrella-beach::before{content:"\F188A"}.mdi-umbrella-beach-outline::before{content:"\F188B"}.mdi-umbrella-closed::before{content:"\F09B0"}.mdi-umbrella-closed-outline::before{content:"\F13E2"}.mdi-umbrella-closed-variant::before{content:"\F13E1"}.mdi-umbrella-outline::before{content:"\F054B"}.mdi-underwear-outline::before{content:"\F1D0F"}.mdi-undo::before{content:"\F054C"}.mdi-undo-variant::before{content:"\F054D"}.mdi-unfold-less-horizontal::before{content:"\F054E"}.mdi-unfold-less-vertical::before{content:"\F0760"}.mdi-unfold-more-horizontal::before{content:"\F054F"}.mdi-unfold-more-vertical::before{content:"\F0761"}.mdi-ungroup::before{content:"\F0550"}.mdi-unicode::before{content:"\F0ED0"}.mdi-unicorn::before{content:"\F15C2"}.mdi-unicorn-variant::before{content:"\F15C3"}.mdi-unicycle::before{content:"\F15E5"}.mdi-unity::before{content:"\F06AF"}.mdi-unreal::before{content:"\F09B1"}.mdi-update::before{content:"\F06B0"}.mdi-upload::before{content:"\F0552"}.mdi-upload-box::before{content:"\F1D10"}.mdi-upload-box-outline::before{content:"\F1D11"}.mdi-upload-circle::before{content:"\F1D12"}.mdi-upload-circle-outline::before{content:"\F1D13"}.mdi-upload-lock::before{content:"\F1373"}.mdi-upload-lock-outline::before{content:"\F1374"}.mdi-upload-multiple::before{content:"\F083D"}.mdi-upload-multiple-outline::before{content:"\F1D14"}.mdi-upload-network::before{content:"\F06F6"}.mdi-upload-network-outline::before{content:"\F0CD8"}.mdi-upload-off::before{content:"\F10C6"}.mdi-upload-off-outline::before{content:"\F10C7"}.mdi-upload-outline::before{content:"\F0E07"}.mdi-usb::before{content:"\F0553"}.mdi-usb-c-port::before{content:"\F1CBF"}.mdi-usb-flash-drive::before{content:"\F129E"}.mdi-usb-flash-drive-outline::before{content:"\F129F"}.mdi-usb-port::before{content:"\F11F0"}.mdi-vacuum::before{content:"\F19A1"}.mdi-vacuum-outline::before{content:"\F19A2"}.mdi-valve::before{content:"\F1066"}.mdi-valve-closed::before{content:"\F1067"}.mdi-valve-open::before{content:"\F1068"}.mdi-van-passenger::before{content:"\F07FA"}.mdi-van-utility::before{content:"\F07FB"}.mdi-vanish::before{content:"\F07FC"}.mdi-vanish-quarter::before{content:"\F1554"}.mdi-vanity-light::before{content:"\F11E1"}.mdi-variable::before{content:"\F0AE7"}.mdi-variable-box::before{content:"\F1111"}.mdi-vector-arrange-above::before{content:"\F0554"}.mdi-vector-arrange-below::before{content:"\F0555"}.mdi-vector-bezier::before{content:"\F0AE8"}.mdi-vector-circle::before{content:"\F0556"}.mdi-vector-circle-variant::before{content:"\F0557"}.mdi-vector-combine::before{content:"\F0558"}.mdi-vector-curve::before{content:"\F0559"}.mdi-vector-difference::before{content:"\F055A"}.mdi-vector-difference-ab::before{content:"\F055B"}.mdi-vector-difference-ba::before{content:"\F055C"}.mdi-vector-ellipse::before{content:"\F0893"}.mdi-vector-intersection::before{content:"\F055D"}.mdi-vector-line::before{content:"\F055E"}.mdi-vector-link::before{content:"\F0FE8"}.mdi-vector-point::before{content:"\F01C4"}.mdi-vector-point-edit::before{content:"\F09E8"}.mdi-vector-point-minus::before{content:"\F1B78"}.mdi-vector-point-plus::before{content:"\F1B79"}.mdi-vector-point-select::before{content:"\F055F"}.mdi-vector-polygon::before{content:"\F0560"}.mdi-vector-polygon-variant::before{content:"\F1856"}.mdi-vector-polyline::before{content:"\F0561"}.mdi-vector-polyline-edit::before{content:"\F1225"}.mdi-vector-polyline-minus::before{content:"\F1226"}.mdi-vector-polyline-plus::before{content:"\F1227"}.mdi-vector-polyline-remove::before{content:"\F1228"}.mdi-vector-radius::before{content:"\F074A"}.mdi-vector-rectangle::before{content:"\F05C6"}.mdi-vector-selection::before{content:"\F0562"}.mdi-vector-square::before{content:"\F0001"}.mdi-vector-square-close::before{content:"\F1857"}.mdi-vector-square-edit::before{content:"\F18D9"}.mdi-vector-square-minus::before{content:"\F18DA"}.mdi-vector-square-open::before{content:"\F1858"}.mdi-vector-square-plus::before{content:"\F18DB"}.mdi-vector-square-remove::before{content:"\F18DC"}.mdi-vector-triangle::before{content:"\F0563"}.mdi-vector-union::before{content:"\F0564"}.mdi-vhs::before{content:"\F0A1B"}.mdi-vibrate::before{content:"\F0566"}.mdi-vibrate-off::before{content:"\F0CD9"}.mdi-video::before{content:"\F0567"}.mdi-video-2d::before{content:"\F1A1C"}.mdi-video-3d::before{content:"\F07FD"}.mdi-video-3d-off::before{content:"\F13D9"}.mdi-video-3d-variant::before{content:"\F0ED1"}.mdi-video-4k-box::before{content:"\F083E"}.mdi-video-account::before{content:"\F0919"}.mdi-video-box::before{content:"\F00FD"}.mdi-video-box-off::before{content:"\F00FE"}.mdi-video-check::before{content:"\F1069"}.mdi-video-check-outline::before{content:"\F106A"}.mdi-video-high-definition::before{content:"\F152E"}.mdi-video-image::before{content:"\F091A"}.mdi-video-input-antenna::before{content:"\F083F"}.mdi-video-input-component::before{content:"\F0840"}.mdi-video-input-hdmi::before{content:"\F0841"}.mdi-video-input-scart::before{content:"\F0F8C"}.mdi-video-input-svideo::before{content:"\F0842"}.mdi-video-marker::before{content:"\F19A9"}.mdi-video-marker-outline::before{content:"\F19AA"}.mdi-video-minus::before{content:"\F09B2"}.mdi-video-minus-outline::before{content:"\F02BA"}.mdi-video-off::before{content:"\F0568"}.mdi-video-off-outline::before{content:"\F0BDB"}.mdi-video-outline::before{content:"\F0BDC"}.mdi-video-plus::before{content:"\F09B3"}.mdi-video-plus-outline::before{content:"\F01D3"}.mdi-video-stabilization::before{content:"\F091B"}.mdi-video-standard-definition::before{content:"\F1CA0"}.mdi-video-switch::before{content:"\F0569"}.mdi-video-switch-outline::before{content:"\F0790"}.mdi-video-vintage::before{content:"\F0A1C"}.mdi-video-wireless::before{content:"\F0ED2"}.mdi-video-wireless-outline::before{content:"\F0ED3"}.mdi-view-agenda::before{content:"\F056A"}.mdi-view-agenda-outline::before{content:"\F11D8"}.mdi-view-array::before{content:"\F056B"}.mdi-view-array-outline::before{content:"\F1485"}.mdi-view-carousel::before{content:"\F056C"}.mdi-view-carousel-outline::before{content:"\F1486"}.mdi-view-column::before{content:"\F056D"}.mdi-view-column-outline::before{content:"\F1487"}.mdi-view-comfy::before{content:"\F0E6A"}.mdi-view-comfy-outline::before{content:"\F1488"}.mdi-view-compact::before{content:"\F0E6B"}.mdi-view-compact-outline::before{content:"\F0E6C"}.mdi-view-dashboard::before{content:"\F056E"}.mdi-view-dashboard-edit::before{content:"\F1947"}.mdi-view-dashboard-edit-outline::before{content:"\F1948"}.mdi-view-dashboard-outline::before{content:"\F0A1D"}.mdi-view-dashboard-variant::before{content:"\F0843"}.mdi-view-dashboard-variant-outline::before{content:"\F1489"}.mdi-view-day::before{content:"\F056F"}.mdi-view-day-outline::before{content:"\F148A"}.mdi-view-gallery::before{content:"\F1888"}.mdi-view-gallery-outline::before{content:"\F1889"}.mdi-view-grid::before{content:"\F0570"}.mdi-view-grid-compact::before{content:"\F1C61"}.mdi-view-grid-outline::before{content:"\F11D9"}.mdi-view-grid-plus::before{content:"\F0F8D"}.mdi-view-grid-plus-outline::before{content:"\F11DA"}.mdi-view-headline::before{content:"\F0571"}.mdi-view-list::before{content:"\F0572"}.mdi-view-list-outline::before{content:"\F148B"}.mdi-view-module::before{content:"\F0573"}.mdi-view-module-outline::before{content:"\F148C"}.mdi-view-parallel::before{content:"\F0728"}.mdi-view-parallel-outline::before{content:"\F148D"}.mdi-view-quilt::before{content:"\F0574"}.mdi-view-quilt-outline::before{content:"\F148E"}.mdi-view-sequential::before{content:"\F0729"}.mdi-view-sequential-outline::before{content:"\F148F"}.mdi-view-split-horizontal::before{content:"\F0BCB"}.mdi-view-split-vertical::before{content:"\F0BCC"}.mdi-view-stream::before{content:"\F0575"}.mdi-view-stream-outline::before{content:"\F1490"}.mdi-view-week::before{content:"\F0576"}.mdi-view-week-outline::before{content:"\F1491"}.mdi-vimeo::before{content:"\F0577"}.mdi-violin::before{content:"\F060F"}.mdi-virtual-reality::before{content:"\F0894"}.mdi-virus::before{content:"\F13B6"}.mdi-virus-off::before{content:"\F18E1"}.mdi-virus-off-outline::before{content:"\F18E2"}.mdi-virus-outline::before{content:"\F13B7"}.mdi-vlc::before{content:"\F057C"}.mdi-voicemail::before{content:"\F057D"}.mdi-volcano::before{content:"\F1A83"}.mdi-volcano-outline::before{content:"\F1A84"}.mdi-volleyball::before{content:"\F09B4"}.mdi-volume-equal::before{content:"\F1B10"}.mdi-volume-high::before{content:"\F057E"}.mdi-volume-low::before{content:"\F057F"}.mdi-volume-medium::before{content:"\F0580"}.mdi-volume-minus::before{content:"\F075E"}.mdi-volume-mute::before{content:"\F075F"}.mdi-volume-off::before{content:"\F0581"}.mdi-volume-plus::before{content:"\F075D"}.mdi-volume-source::before{content:"\F1120"}.mdi-volume-variant-off::before{content:"\F0E08"}.mdi-volume-vibrate::before{content:"\F1121"}.mdi-vote::before{content:"\F0A1F"}.mdi-vote-outline::before{content:"\F0A20"}.mdi-vpn::before{content:"\F0582"}.mdi-vuejs::before{content:"\F0844"}.mdi-vuetify::before{content:"\F0E6D"}.mdi-walk::before{content:"\F0583"}.mdi-wall::before{content:"\F07FE"}.mdi-wall-fire::before{content:"\F1A11"}.mdi-wall-sconce::before{content:"\F091C"}.mdi-wall-sconce-flat::before{content:"\F091D"}.mdi-wall-sconce-flat-outline::before{content:"\F17C9"}.mdi-wall-sconce-flat-variant::before{content:"\F041C"}.mdi-wall-sconce-flat-variant-outline::before{content:"\F17CA"}.mdi-wall-sconce-outline::before{content:"\F17CB"}.mdi-wall-sconce-round::before{content:"\F0748"}.mdi-wall-sconce-round-outline::before{content:"\F17CC"}.mdi-wall-sconce-round-variant::before{content:"\F091E"}.mdi-wall-sconce-round-variant-outline::before{content:"\F17CD"}.mdi-wallet::before{content:"\F0584"}.mdi-wallet-bifold::before{content:"\F1C58"}.mdi-wallet-bifold-outline::before{content:"\F1C59"}.mdi-wallet-giftcard::before{content:"\F0585"}.mdi-wallet-membership::before{content:"\F0586"}.mdi-wallet-outline::before{content:"\F0BDD"}.mdi-wallet-plus::before{content:"\F0F8E"}.mdi-wallet-plus-outline::before{content:"\F0F8F"}.mdi-wallet-travel::before{content:"\F0587"}.mdi-wallpaper::before{content:"\F0E09"}.mdi-wan::before{content:"\F0588"}.mdi-wardrobe::before{content:"\F0F90"}.mdi-wardrobe-outline::before{content:"\F0F91"}.mdi-warehouse::before{content:"\F0F81"}.mdi-washing-machine::before{content:"\F072A"}.mdi-washing-machine-alert::before{content:"\F11BC"}.mdi-washing-machine-off::before{content:"\F11BD"}.mdi-watch::before{content:"\F0589"}.mdi-watch-export::before{content:"\F058A"}.mdi-watch-export-variant::before{content:"\F0895"}.mdi-watch-import::before{content:"\F058B"}.mdi-watch-import-variant::before{content:"\F0896"}.mdi-watch-variant::before{content:"\F0897"}.mdi-watch-vibrate::before{content:"\F06B1"}.mdi-watch-vibrate-off::before{content:"\F0CDA"}.mdi-water::before{content:"\F058C"}.mdi-water-alert::before{content:"\F1502"}.mdi-water-alert-outline::before{content:"\F1503"}.mdi-water-boiler::before{content:"\F0F92"}.mdi-water-boiler-alert::before{content:"\F11B3"}.mdi-water-boiler-auto::before{content:"\F1B98"}.mdi-water-boiler-off::before{content:"\F11B4"}.mdi-water-check::before{content:"\F1504"}.mdi-water-check-outline::before{content:"\F1505"}.mdi-water-circle::before{content:"\F1806"}.mdi-water-minus::before{content:"\F1506"}.mdi-water-minus-outline::before{content:"\F1507"}.mdi-water-off::before{content:"\F058D"}.mdi-water-off-outline::before{content:"\F1508"}.mdi-water-opacity::before{content:"\F1855"}.mdi-water-outline::before{content:"\F0E0A"}.mdi-water-percent::before{content:"\F058E"}.mdi-water-percent-alert::before{content:"\F1509"}.mdi-water-plus::before{content:"\F150A"}.mdi-water-plus-outline::before{content:"\F150B"}.mdi-water-polo::before{content:"\F12A0"}.mdi-water-pump::before{content:"\F058F"}.mdi-water-pump-off::before{content:"\F0F93"}.mdi-water-remove::before{content:"\F150C"}.mdi-water-remove-outline::before{content:"\F150D"}.mdi-water-sync::before{content:"\F17C6"}.mdi-water-thermometer::before{content:"\F1A85"}.mdi-water-thermometer-outline::before{content:"\F1A86"}.mdi-water-well::before{content:"\F106B"}.mdi-water-well-outline::before{content:"\F106C"}.mdi-waterfall::before{content:"\F1849"}.mdi-watering-can::before{content:"\F1481"}.mdi-watering-can-outline::before{content:"\F1482"}.mdi-watermark::before{content:"\F0612"}.mdi-wave::before{content:"\F0F2E"}.mdi-wave-arrow-down::before{content:"\F1CB0"}.mdi-wave-arrow-up::before{content:"\F1CB1"}.mdi-wave-undercurrent::before{content:"\F1CC0"}.mdi-waveform::before{content:"\F147D"}.mdi-waves::before{content:"\F078D"}.mdi-waves-arrow-left::before{content:"\F1859"}.mdi-waves-arrow-right::before{content:"\F185A"}.mdi-waves-arrow-up::before{content:"\F185B"}.mdi-waze::before{content:"\F0BDE"}.mdi-weather-cloudy::before{content:"\F0590"}.mdi-weather-cloudy-alert::before{content:"\F0F2F"}.mdi-weather-cloudy-arrow-right::before{content:"\F0E6E"}.mdi-weather-cloudy-clock::before{content:"\F18F6"}.mdi-weather-dust::before{content:"\F1B5A"}.mdi-weather-fog::before{content:"\F0591"}.mdi-weather-hail::before{content:"\F0592"}.mdi-weather-hazy::before{content:"\F0F30"}.mdi-weather-hurricane::before{content:"\F0898"}.mdi-weather-hurricane-outline::before{content:"\F1C78"}.mdi-weather-lightning::before{content:"\F0593"}.mdi-weather-lightning-rainy::before{content:"\F067E"}.mdi-weather-moonset::before{content:"\F1D15"}.mdi-weather-moonset-down::before{content:"\F1D16"}.mdi-weather-moonset-up::before{content:"\F1D17"}.mdi-weather-night::before{content:"\F0594"}.mdi-weather-night-partly-cloudy::before{content:"\F0F31"}.mdi-weather-partly-cloudy::before{content:"\F0595"}.mdi-weather-partly-lightning::before{content:"\F0F32"}.mdi-weather-partly-rainy::before{content:"\F0F33"}.mdi-weather-partly-snowy::before{content:"\F0F34"}.mdi-weather-partly-snowy-rainy::before{content:"\F0F35"}.mdi-weather-pouring::before{content:"\F0596"}.mdi-weather-rainy::before{content:"\F0597"}.mdi-weather-snowy::before{content:"\F0598"}.mdi-weather-snowy-heavy::before{content:"\F0F36"}.mdi-weather-snowy-rainy::before{content:"\F067F"}.mdi-weather-sunny::before{content:"\F0599"}.mdi-weather-sunny-alert::before{content:"\F0F37"}.mdi-weather-sunny-off::before{content:"\F14E4"}.mdi-weather-sunset::before{content:"\F059A"}.mdi-weather-sunset-down::before{content:"\F059B"}.mdi-weather-sunset-up::before{content:"\F059C"}.mdi-weather-tornado::before{content:"\F0F38"}.mdi-weather-windy::before{content:"\F059D"}.mdi-weather-windy-variant::before{content:"\F059E"}.mdi-web::before{content:"\F059F"}.mdi-web-box::before{content:"\F0F94"}.mdi-web-cancel::before{content:"\F1790"}.mdi-web-check::before{content:"\F0789"}.mdi-web-clock::before{content:"\F124A"}.mdi-web-minus::before{content:"\F10A0"}.mdi-web-off::before{content:"\F0A8E"}.mdi-web-plus::before{content:"\F0033"}.mdi-web-refresh::before{content:"\F1791"}.mdi-web-remove::before{content:"\F0551"}.mdi-web-sync::before{content:"\F1792"}.mdi-webcam::before{content:"\F05A0"}.mdi-webcam-off::before{content:"\F1737"}.mdi-webhook::before{content:"\F062F"}.mdi-webpack::before{content:"\F072B"}.mdi-webrtc::before{content:"\F1248"}.mdi-wechat::before{content:"\F0611"}.mdi-weight::before{content:"\F05A1"}.mdi-weight-gram::before{content:"\F0D3F"}.mdi-weight-kilogram::before{content:"\F05A2"}.mdi-weight-lifter::before{content:"\F115D"}.mdi-weight-pound::before{content:"\F09B5"}.mdi-whatsapp::before{content:"\F05A3"}.mdi-wheel-barrow::before{content:"\F14F2"}.mdi-wheelchair::before{content:"\F1A87"}.mdi-wheelchair-accessibility::before{content:"\F05A4"}.mdi-whistle::before{content:"\F09B6"}.mdi-whistle-outline::before{content:"\F12BC"}.mdi-white-balance-auto::before{content:"\F05A5"}.mdi-white-balance-incandescent::before{content:"\F05A6"}.mdi-white-balance-iridescent::before{content:"\F05A7"}.mdi-white-balance-sunny::before{content:"\F05A8"}.mdi-widgets::before{content:"\F072C"}.mdi-widgets-outline::before{content:"\F1355"}.mdi-wifi::before{content:"\F05A9"}.mdi-wifi-alert::before{content:"\F16B5"}.mdi-wifi-arrow-down::before{content:"\F16B6"}.mdi-wifi-arrow-left::before{content:"\F16B7"}.mdi-wifi-arrow-left-right::before{content:"\F16B8"}.mdi-wifi-arrow-right::before{content:"\F16B9"}.mdi-wifi-arrow-up::before{content:"\F16BA"}.mdi-wifi-arrow-up-down::before{content:"\F16BB"}.mdi-wifi-cancel::before{content:"\F16BC"}.mdi-wifi-check::before{content:"\F16BD"}.mdi-wifi-cog::before{content:"\F16BE"}.mdi-wifi-lock::before{content:"\F16BF"}.mdi-wifi-lock-open::before{content:"\F16C0"}.mdi-wifi-marker::before{content:"\F16C1"}.mdi-wifi-minus::before{content:"\F16C2"}.mdi-wifi-off::before{content:"\F05AA"}.mdi-wifi-plus::before{content:"\F16C3"}.mdi-wifi-refresh::before{content:"\F16C4"}.mdi-wifi-remove::before{content:"\F16C5"}.mdi-wifi-settings::before{content:"\F16C6"}.mdi-wifi-star::before{content:"\F0E0B"}.mdi-wifi-strength-1::before{content:"\F091F"}.mdi-wifi-strength-1-alert::before{content:"\F0920"}.mdi-wifi-strength-1-lock::before{content:"\F0921"}.mdi-wifi-strength-1-lock-open::before{content:"\F16CB"}.mdi-wifi-strength-2::before{content:"\F0922"}.mdi-wifi-strength-2-alert::before{content:"\F0923"}.mdi-wifi-strength-2-lock::before{content:"\F0924"}.mdi-wifi-strength-2-lock-open::before{content:"\F16CC"}.mdi-wifi-strength-3::before{content:"\F0925"}.mdi-wifi-strength-3-alert::before{content:"\F0926"}.mdi-wifi-strength-3-lock::before{content:"\F0927"}.mdi-wifi-strength-3-lock-open::before{content:"\F16CD"}.mdi-wifi-strength-4::before{content:"\F0928"}.mdi-wifi-strength-4-alert::before{content:"\F0929"}.mdi-wifi-strength-4-lock::before{content:"\F092A"}.mdi-wifi-strength-4-lock-open::before{content:"\F16CE"}.mdi-wifi-strength-alert-outline::before{content:"\F092B"}.mdi-wifi-strength-lock-open-outline::before{content:"\F16CF"}.mdi-wifi-strength-lock-outline::before{content:"\F092C"}.mdi-wifi-strength-off::before{content:"\F092D"}.mdi-wifi-strength-off-outline::before{content:"\F092E"}.mdi-wifi-strength-outline::before{content:"\F092F"}.mdi-wifi-sync::before{content:"\F16C7"}.mdi-wikipedia::before{content:"\F05AC"}.mdi-wind-power::before{content:"\F1A88"}.mdi-wind-power-outline::before{content:"\F1A89"}.mdi-wind-turbine::before{content:"\F0DA5"}.mdi-wind-turbine-alert::before{content:"\F19AB"}.mdi-wind-turbine-check::before{content:"\F19AC"}.mdi-window-close::before{content:"\F05AD"}.mdi-window-closed::before{content:"\F05AE"}.mdi-window-closed-variant::before{content:"\F11DB"}.mdi-window-maximize::before{content:"\F05AF"}.mdi-window-minimize::before{content:"\F05B0"}.mdi-window-open::before{content:"\F05B1"}.mdi-window-open-variant::before{content:"\F11DC"}.mdi-window-restore::before{content:"\F05B2"}.mdi-window-shutter::before{content:"\F111C"}.mdi-window-shutter-alert::before{content:"\F111D"}.mdi-window-shutter-auto::before{content:"\F1BA3"}.mdi-window-shutter-cog::before{content:"\F1A8A"}.mdi-window-shutter-open::before{content:"\F111E"}.mdi-window-shutter-settings::before{content:"\F1A8B"}.mdi-windsock::before{content:"\F15FA"}.mdi-wiper::before{content:"\F0AE9"}.mdi-wiper-wash::before{content:"\F0DA6"}.mdi-wiper-wash-alert::before{content:"\F18DF"}.mdi-wizard-hat::before{content:"\F1477"}.mdi-wordpress::before{content:"\F05B4"}.mdi-wrap::before{content:"\F05B6"}.mdi-wrap-disabled::before{content:"\F0BDF"}.mdi-wrench::before{content:"\F05B7"}.mdi-wrench-check::before{content:"\F1B8F"}.mdi-wrench-check-outline::before{content:"\F1B90"}.mdi-wrench-clock::before{content:"\F19A3"}.mdi-wrench-clock-outline::before{content:"\F1B93"}.mdi-wrench-cog::before{content:"\F1B91"}.mdi-wrench-cog-outline::before{content:"\F1B92"}.mdi-wrench-outline::before{content:"\F0BE0"}.mdi-xamarin::before{content:"\F0845"}.mdi-xml::before{content:"\F05C0"}.mdi-xmpp::before{content:"\F07FF"}.mdi-yahoo::before{content:"\F0B4F"}.mdi-yeast::before{content:"\F05C1"}.mdi-yin-yang::before{content:"\F0680"}.mdi-yoga::before{content:"\F117C"}.mdi-youtube::before{content:"\F05C3"}.mdi-youtube-gaming::before{content:"\F0848"}.mdi-youtube-studio::before{content:"\F0847"}.mdi-youtube-subscription::before{content:"\F0D40"}.mdi-youtube-tv::before{content:"\F0448"}.mdi-yurt::before{content:"\F1516"}.mdi-z-wave::before{content:"\F0AEA"}.mdi-zend::before{content:"\F0AEB"}.mdi-zigbee::before{content:"\F0D41"}.mdi-zip-box::before{content:"\F05C4"}.mdi-zip-box-outline::before{content:"\F0FFA"}.mdi-zip-disk::before{content:"\F0A23"}.mdi-zodiac-aquarius::before{content:"\F0A7D"}.mdi-zodiac-aries::before{content:"\F0A7E"}.mdi-zodiac-cancer::before{content:"\F0A7F"}.mdi-zodiac-capricorn::before{content:"\F0A80"}.mdi-zodiac-gemini::before{content:"\F0A81"}.mdi-zodiac-leo::before{content:"\F0A82"}.mdi-zodiac-libra::before{content:"\F0A83"}.mdi-zodiac-pisces::before{content:"\F0A84"}.mdi-zodiac-sagittarius::before{content:"\F0A85"}.mdi-zodiac-scorpio::before{content:"\F0A86"}.mdi-zodiac-taurus::before{content:"\F0A87"}.mdi-zodiac-virgo::before{content:"\F0A88"}.mdi-blank::before{content:"\F68C";visibility:hidden}.mdi-18px.mdi-set,.mdi-18px.mdi:before{font-size:18px}.mdi-24px.mdi-set,.mdi-24px.mdi:before{font-size:24px}.mdi-36px.mdi-set,.mdi-36px.mdi:before{font-size:36px}.mdi-48px.mdi-set,.mdi-48px.mdi:before{font-size:48px}.mdi-dark:before{color:rgba(0,0,0,0.54)}.mdi-dark.mdi-inactive:before{color:rgba(0,0,0,0.26)}.mdi-light:before{color:#fff}.mdi-light.mdi-inactive:before{color:rgba(255,255,255,0.3)}.mdi-rotate-45:before{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.mdi-rotate-90:before{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.mdi-rotate-135:before{-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg)}.mdi-rotate-180:before{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.mdi-rotate-225:before{-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg)}.mdi-rotate-270:before{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.mdi-rotate-315:before{-webkit-transform:rotate(315deg);-ms-transform:rotate(315deg);transform:rotate(315deg)}.mdi-flip-h:before{-webkit-transform:scaleX(-1);transform:scaleX(-1);filter:FlipH;-ms-filter:"FlipH"}.mdi-flip-v:before{-webkit-transform:scaleY(-1);transform:scaleY(-1);filter:FlipV;-ms-filter:"FlipV"}.mdi-spin:before{-webkit-animation:mdi-spin 2s infinite linear;animation:mdi-spin 2s infinite linear}@-webkit-keyframes mdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes mdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}} - -/*# sourceMappingURL=materialdesignicons.css.map */ diff --git a/web/scripts/api.js b/web/scripts/api.js deleted file mode 100644 index e022d4e16..000000000 --- a/web/scripts/api.js +++ /dev/null @@ -1,3 +0,0 @@ -// Shim for scripts/api.ts -export const ComfyApi = window.comfyAPI.api.ComfyApi; -export const api = window.comfyAPI.api.api; diff --git a/web/scripts/app.js b/web/scripts/app.js deleted file mode 100644 index 3ae1a239d..000000000 --- a/web/scripts/app.js +++ /dev/null @@ -1,4 +0,0 @@ -// Shim for scripts/app.ts -export const ANIM_PREVIEW_WIDGET = window.comfyAPI.app.ANIM_PREVIEW_WIDGET; -export const ComfyApp = window.comfyAPI.app.ComfyApp; -export const app = window.comfyAPI.app.app; diff --git a/web/scripts/changeTracker.js b/web/scripts/changeTracker.js deleted file mode 100644 index c4c391cf2..000000000 --- a/web/scripts/changeTracker.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/changeTracker.ts -export const ChangeTracker = window.comfyAPI.changeTracker.ChangeTracker; diff --git a/web/scripts/defaultGraph.js b/web/scripts/defaultGraph.js deleted file mode 100644 index eaefc5b0c..000000000 --- a/web/scripts/defaultGraph.js +++ /dev/null @@ -1,4 +0,0 @@ -// Shim for scripts/defaultGraph.ts -export const defaultGraph = window.comfyAPI.defaultGraph.defaultGraph; -export const defaultGraphJSON = window.comfyAPI.defaultGraph.defaultGraphJSON; -export const blankGraph = window.comfyAPI.defaultGraph.blankGraph; diff --git a/web/scripts/metadata/flac.js b/web/scripts/metadata/flac.js deleted file mode 100644 index 3b247b43c..000000000 --- a/web/scripts/metadata/flac.js +++ /dev/null @@ -1,3 +0,0 @@ -// Shim for scripts/metadata/flac.ts -export const getFromFlacBuffer = window.comfyAPI.flac.getFromFlacBuffer; -export const getFromFlacFile = window.comfyAPI.flac.getFromFlacFile; diff --git a/web/scripts/metadata/png.js b/web/scripts/metadata/png.js deleted file mode 100644 index 789ef4f0f..000000000 --- a/web/scripts/metadata/png.js +++ /dev/null @@ -1,3 +0,0 @@ -// Shim for scripts/metadata/png.ts -export const getFromPngBuffer = window.comfyAPI.png.getFromPngBuffer; -export const getFromPngFile = window.comfyAPI.png.getFromPngFile; diff --git a/web/scripts/pnginfo.js b/web/scripts/pnginfo.js deleted file mode 100644 index 991d2929c..000000000 --- a/web/scripts/pnginfo.js +++ /dev/null @@ -1,6 +0,0 @@ -// Shim for scripts/pnginfo.ts -export const getPngMetadata = window.comfyAPI.pnginfo.getPngMetadata; -export const getFlacMetadata = window.comfyAPI.pnginfo.getFlacMetadata; -export const getWebpMetadata = window.comfyAPI.pnginfo.getWebpMetadata; -export const getLatentMetadata = window.comfyAPI.pnginfo.getLatentMetadata; -export const importA1111 = window.comfyAPI.pnginfo.importA1111; diff --git a/web/scripts/ui.js b/web/scripts/ui.js deleted file mode 100644 index 948a039b8..000000000 --- a/web/scripts/ui.js +++ /dev/null @@ -1,4 +0,0 @@ -// Shim for scripts/ui.ts -export const ComfyDialog = window.comfyAPI.ui.ComfyDialog; -export const $el = window.comfyAPI.ui.$el; -export const ComfyUI = window.comfyAPI.ui.ComfyUI; diff --git a/web/scripts/ui/components/asyncDialog.js b/web/scripts/ui/components/asyncDialog.js deleted file mode 100644 index 43a8e19e6..000000000 --- a/web/scripts/ui/components/asyncDialog.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/components/asyncDialog.ts -export const ComfyAsyncDialog = window.comfyAPI.asyncDialog.ComfyAsyncDialog; diff --git a/web/scripts/ui/components/button.js b/web/scripts/ui/components/button.js deleted file mode 100644 index 7fe39ee29..000000000 --- a/web/scripts/ui/components/button.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/components/button.ts -export const ComfyButton = window.comfyAPI.button.ComfyButton; diff --git a/web/scripts/ui/components/buttonGroup.js b/web/scripts/ui/components/buttonGroup.js deleted file mode 100644 index 5fa0021ab..000000000 --- a/web/scripts/ui/components/buttonGroup.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/components/buttonGroup.ts -export const ComfyButtonGroup = window.comfyAPI.buttonGroup.ComfyButtonGroup; diff --git a/web/scripts/ui/components/popup.js b/web/scripts/ui/components/popup.js deleted file mode 100644 index 93f9f093d..000000000 --- a/web/scripts/ui/components/popup.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/components/popup.ts -export const ComfyPopup = window.comfyAPI.popup.ComfyPopup; diff --git a/web/scripts/ui/components/splitButton.js b/web/scripts/ui/components/splitButton.js deleted file mode 100644 index 53a21b69b..000000000 --- a/web/scripts/ui/components/splitButton.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/components/splitButton.ts -export const ComfySplitButton = window.comfyAPI.splitButton.ComfySplitButton; diff --git a/web/scripts/ui/dialog.js b/web/scripts/ui/dialog.js deleted file mode 100644 index 7475d42fa..000000000 --- a/web/scripts/ui/dialog.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/dialog.ts -export const ComfyDialog = window.comfyAPI.dialog.ComfyDialog; diff --git a/web/scripts/ui/draggableList.js b/web/scripts/ui/draggableList.js deleted file mode 100644 index 2c9596550..000000000 --- a/web/scripts/ui/draggableList.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/draggableList.ts -export const DraggableList = window.comfyAPI.draggableList.DraggableList; diff --git a/web/scripts/ui/imagePreview.js b/web/scripts/ui/imagePreview.js deleted file mode 100644 index 4153bbf5f..000000000 --- a/web/scripts/ui/imagePreview.js +++ /dev/null @@ -1,3 +0,0 @@ -// Shim for scripts/ui/imagePreview.ts -export const calculateImageGrid = window.comfyAPI.imagePreview.calculateImageGrid; -export const createImageHost = window.comfyAPI.imagePreview.createImageHost; diff --git a/web/scripts/ui/menu/index.js b/web/scripts/ui/menu/index.js deleted file mode 100644 index 777b5b993..000000000 --- a/web/scripts/ui/menu/index.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/menu/index.ts -export const ComfyAppMenu = window.comfyAPI.index.ComfyAppMenu; diff --git a/web/scripts/ui/settings.js b/web/scripts/ui/settings.js deleted file mode 100644 index 3fd01c755..000000000 --- a/web/scripts/ui/settings.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/settings.ts -export const ComfySettingsDialog = window.comfyAPI.settings.ComfySettingsDialog; diff --git a/web/scripts/ui/toggleSwitch.js b/web/scripts/ui/toggleSwitch.js deleted file mode 100644 index 21be93d17..000000000 --- a/web/scripts/ui/toggleSwitch.js +++ /dev/null @@ -1,2 +0,0 @@ -// Shim for scripts/ui/toggleSwitch.ts -export const toggleSwitch = window.comfyAPI.toggleSwitch.toggleSwitch; diff --git a/web/scripts/ui/utils.js b/web/scripts/ui/utils.js deleted file mode 100644 index cd4b49137..000000000 --- a/web/scripts/ui/utils.js +++ /dev/null @@ -1,3 +0,0 @@ -// Shim for scripts/ui/utils.ts -export const applyClasses = window.comfyAPI.utils.applyClasses; -export const toggleElement = window.comfyAPI.utils.toggleElement; diff --git a/web/scripts/utils.js b/web/scripts/utils.js deleted file mode 100644 index 8bff241fa..000000000 --- a/web/scripts/utils.js +++ /dev/null @@ -1,9 +0,0 @@ -// Shim for scripts/utils.ts -export const clone = window.comfyAPI.utils.clone; -export const applyTextReplacements = window.comfyAPI.utils.applyTextReplacements; -export const addStylesheet = window.comfyAPI.utils.addStylesheet; -export const downloadBlob = window.comfyAPI.utils.downloadBlob; -export const uploadFile = window.comfyAPI.utils.uploadFile; -export const prop = window.comfyAPI.utils.prop; -export const getStorageValue = window.comfyAPI.utils.getStorageValue; -export const setStorageValue = window.comfyAPI.utils.setStorageValue; diff --git a/web/scripts/widgets.js b/web/scripts/widgets.js deleted file mode 100644 index dd4dcb4e3..000000000 --- a/web/scripts/widgets.js +++ /dev/null @@ -1,6 +0,0 @@ -// Shim for scripts/widgets.ts -export const updateControlWidgetLabel = window.comfyAPI.widgets.updateControlWidgetLabel; -export const IS_CONTROL_WIDGET = window.comfyAPI.widgets.IS_CONTROL_WIDGET; -export const addValueControlWidget = window.comfyAPI.widgets.addValueControlWidget; -export const addValueControlWidgets = window.comfyAPI.widgets.addValueControlWidgets; -export const ComfyWidgets = window.comfyAPI.widgets.ComfyWidgets; diff --git a/web/templates/default.jpg b/web/templates/default.jpg deleted file mode 100644 index a2b870cef..000000000 Binary files a/web/templates/default.jpg and /dev/null differ diff --git a/web/templates/default.json b/web/templates/default.json deleted file mode 100644 index 657ac107c..000000000 --- a/web/templates/default.json +++ /dev/null @@ -1,356 +0,0 @@ -{ - "last_node_id": 9, - "last_link_id": 9, - "nodes": [ - { - "id": 7, - "type": "CLIPTextEncode", - "pos": [ - 413, - 389 - ], - "size": [ - 425.27801513671875, - 180.6060791015625 - ], - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 5 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 6 - ], - "slot_index": 0 - } - ], - "properties": {}, - "widgets_values": [ - "text, watermark" - ] - }, - { - "id": 6, - "type": "CLIPTextEncode", - "pos": [ - 415, - 186 - ], - "size": [ - 422.84503173828125, - 164.31304931640625 - ], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 3 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 4 - ], - "slot_index": 0 - } - ], - "properties": {}, - "widgets_values": [ - "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," - ] - }, - { - "id": 5, - "type": "EmptyLatentImage", - "pos": [ - 473, - 609 - ], - "size": [ - 315, - 106 - ], - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 2 - ], - "slot_index": 0 - } - ], - "properties": {}, - "widgets_values": [ - 512, - 512, - 1 - ] - }, - { - "id": 3, - "type": "KSampler", - "pos": [ - 863, - 186 - ], - "size": [ - 315, - 262 - ], - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 1 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 4 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 6 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 2 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 7 - ], - "slot_index": 0 - } - ], - "properties": {}, - "widgets_values": [ - 156680208700286, - true, - 20, - 8, - "euler", - "normal", - 1 - ] - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [ - 1209, - 188 - ], - "size": [ - 210, - 46 - ], - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 7 - }, - { - "name": "vae", - "type": "VAE", - "link": 8 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 9 - ], - "slot_index": 0 - } - ], - "properties": {} - }, - { - "id": 9, - "type": "SaveImage", - "pos": [ - 1451, - 189 - ], - "size": [ - 210, - 26 - ], - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 9 - } - ], - "properties": {} - }, - { - "id": 4, - "type": "CheckpointLoaderSimple", - "pos": [ - 26, - 474 - ], - "size": [ - 315, - 98 - ], - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 1 - ], - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 3, - 5 - ], - "slot_index": 1 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 8 - ], - "slot_index": 2 - } - ], - "properties": {}, - "widgets_values": [ - "v1-5-pruned-emaonly.safetensors" - ] - } - ], - "links": [ - [ - 1, - 4, - 0, - 3, - 0, - "MODEL" - ], - [ - 2, - 5, - 0, - 3, - 3, - "LATENT" - ], - [ - 3, - 4, - 1, - 6, - 0, - "CLIP" - ], - [ - 4, - 6, - 0, - 3, - 1, - "CONDITIONING" - ], - [ - 5, - 4, - 1, - 7, - 0, - "CLIP" - ], - [ - 6, - 7, - 0, - 3, - 2, - "CONDITIONING" - ], - [ - 7, - 3, - 0, - 8, - 0, - "LATENT" - ], - [ - 8, - 4, - 2, - 8, - 1, - "VAE" - ], - [ - 9, - 8, - 0, - 9, - 0, - "IMAGE" - ] - ], - "groups": [], - "config": {}, - "extra": {}, - "version": 0.4, - "models": [{ - "name": "v1-5-pruned-emaonly.safetensors", - "url": "https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly.safetensors?download=true", - "directory": "checkpoints" - }] -} diff --git a/web/templates/flux_schnell.jpg b/web/templates/flux_schnell.jpg deleted file mode 100644 index a0663c041..000000000 Binary files a/web/templates/flux_schnell.jpg and /dev/null differ diff --git a/web/templates/flux_schnell.json b/web/templates/flux_schnell.json deleted file mode 100644 index 9a6858faf..000000000 --- a/web/templates/flux_schnell.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "last_node_id": 36, - "last_link_id": 58, - "nodes": [ - { - "id": 33, - "type": "CLIPTextEncode", - "pos": [ - 390, - 400 - ], - "size": { - "0": 422.84503173828125, - "1": 164.31304931640625 - }, - "flags": { - "collapsed": true - }, - "order": 4, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 54, - "slot_index": 0 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 55 - ], - "slot_index": 0 - } - ], - "title": "CLIP Text Encode (Negative Prompt)", - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "" - ], - "color": "#322", - "bgcolor": "#533" - }, - { - "id": 27, - "type": "EmptySD3LatentImage", - "pos": [ - 471, - 455 - ], - "size": { - "0": 315, - "1": 106 - }, - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 51 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "EmptySD3LatentImage" - }, - "widgets_values": [ - 1024, - 1024, - 1 - ], - "color": "#323", - "bgcolor": "#535" - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [ - 1151, - 195 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 52 - }, - { - "name": "vae", - "type": "VAE", - "link": 46 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 9 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 9, - "type": "SaveImage", - "pos": [ - 1375, - 194 - ], - "size": { - "0": 985.3012084960938, - "1": 1060.3828125 - }, - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 9 - } - ], - "properties": {}, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 31, - "type": "KSampler", - "pos": [ - 816, - 192 - ], - "size": { - "0": 315, - "1": 262 - }, - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 47 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 58 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 55 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 51 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 52 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSampler" - }, - "widgets_values": [ - 173805153958730, - "randomize", - 4, - 1, - "euler", - "simple", - 1 - ] - }, - { - "id": 30, - "type": "CheckpointLoaderSimple", - "pos": [ - 48, - 192 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 47 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 45, - 54 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 46 - ], - "shape": 3, - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "CheckpointLoaderSimple" - }, - "widgets_values": [ - "flux1-schnell-fp8.safetensors" - ] - }, - { - "id": 6, - "type": "CLIPTextEncode", - "pos": [ - 384, - 192 - ], - "size": { - "0": 422.84503173828125, - "1": 164.31304931640625 - }, - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 45 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 58 - ], - "slot_index": 0 - } - ], - "title": "CLIP Text Encode (Positive Prompt)", - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "a bottle with a beautiful rainbow galaxy inside it on top of a wooden table in the middle of a modern kitchen beside a plate of vegetables and mushrooms and a wine glasse that contains a planet earth with a plate with a half eaten apple pie on it" - ], - "color": "#232", - "bgcolor": "#353" - }, - { - "id": 34, - "type": "Note", - "pos": [ - 831, - 501 - ], - "size": { - "0": 282.8617858886719, - "1": 164.08004760742188 - }, - "flags": {}, - "order": 2, - "mode": 0, - "properties": { - "text": "" - }, - "widgets_values": [ - "Note that Flux dev and schnell do not have any negative prompt so CFG should be set to 1.0. Setting CFG to 1.0 means the negative prompt is ignored.\n\nThe schnell model is a distilled model that can generate a good image with only 4 steps." - ], - "color": "#432", - "bgcolor": "#653" - } - ], - "links": [ - [ - 9, - 8, - 0, - 9, - 0, - "IMAGE" - ], - [ - 45, - 30, - 1, - 6, - 0, - "CLIP" - ], - [ - 46, - 30, - 2, - 8, - 1, - "VAE" - ], - [ - 47, - 30, - 0, - 31, - 0, - "MODEL" - ], - [ - 51, - 27, - 0, - 31, - 3, - "LATENT" - ], - [ - 52, - 31, - 0, - 8, - 0, - "LATENT" - ], - [ - 54, - 30, - 1, - 33, - 0, - "CLIP" - ], - [ - 55, - 33, - 0, - 31, - 2, - "CONDITIONING" - ], - [ - 58, - 6, - 0, - 31, - 1, - "CONDITIONING" - ] - ], - "groups": [], - "config": {}, - "extra": { - "ds": { - "scale": 1.1, - "offset": [ - 0.6836674124529055, - 1.8290357611967831 - ] - } - }, - "models": [ - { - "name": "flux1-schnell-fp8.safetensors", - "url": "https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell-fp8.safetensors?download=true", - "directory": "checkpoints" - } - ], - "version": 0.4 - } diff --git a/web/templates/image2image.jpg b/web/templates/image2image.jpg deleted file mode 100644 index fc8e3ab61..000000000 Binary files a/web/templates/image2image.jpg and /dev/null differ diff --git a/web/templates/image2image.json b/web/templates/image2image.json deleted file mode 100644 index 81da539d0..000000000 --- a/web/templates/image2image.json +++ /dev/null @@ -1,447 +0,0 @@ -{ - "last_node_id": 14, - "last_link_id": 17, - "nodes": [ - { - "id": 7, - "type": "CLIPTextEncode", - "pos": [ - 413, - 389 - ], - "size": { - "0": 425.27801513671875, - "1": 180.6060791015625 - }, - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 15 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 6 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "watermark, text\n" - ] - }, - { - "id": 6, - "type": "CLIPTextEncode", - "pos": [ - 415, - 186 - ], - "size": { - "0": 422.84503173828125, - "1": 164.31304931640625 - }, - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 14 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 4 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "photograph of victorian woman with wings, sky clouds, meadow grass\n" - ] - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [ - 1209, - 188 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 7 - }, - { - "name": "vae", - "type": "VAE", - "link": 17 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 9 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 9, - "type": "SaveImage", - "pos": [ - 1451, - 189 - ], - "size": { - "0": 210, - "1": 58 - }, - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 9 - } - ], - "properties": {}, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 10, - "type": "LoadImage", - "pos": [ - 215.9799597167969, - 703.6800268554688 - ], - "size": [ - 315, - 314.00002670288086 - ], - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 10 - ], - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": null, - "shape": 3 - } - ], - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "example.png", - "image" - ] - }, - { - "id": 12, - "type": "VAEEncode", - "pos": [ - 614.979959716797, - 707.6800268554688 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [ - { - "name": "pixels", - "type": "IMAGE", - "link": 10 - }, - { - "name": "vae", - "type": "VAE", - "link": 16 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 11 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEEncode" - } - }, - { - "id": 3, - "type": "KSampler", - "pos": [ - 863, - 186 - ], - "size": { - "0": 315, - "1": 262 - }, - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 13 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 4 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 6 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 11 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 7 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSampler" - }, - "widgets_values": [ - 280823642470253, - "randomize", - 20, - 8, - "dpmpp_2m", - "normal", - 0.8700000000000001 - ] - }, - { - "id": 14, - "type": "CheckpointLoaderSimple", - "pos": [ - 19, - 433 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 13 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 14, - 15 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 16, - 17 - ], - "shape": 3, - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "CheckpointLoaderSimple" - }, - "widgets_values": [ - "v1-5-pruned-emaonly.safetensors" - ] - } - ], - "links": [ - [ - 4, - 6, - 0, - 3, - 1, - "CONDITIONING" - ], - [ - 6, - 7, - 0, - 3, - 2, - "CONDITIONING" - ], - [ - 7, - 3, - 0, - 8, - 0, - "LATENT" - ], - [ - 9, - 8, - 0, - 9, - 0, - "IMAGE" - ], - [ - 10, - 10, - 0, - 12, - 0, - "IMAGE" - ], - [ - 11, - 12, - 0, - 3, - 3, - "LATENT" - ], - [ - 13, - 14, - 0, - 3, - 0, - "MODEL" - ], - [ - 14, - 14, - 1, - 6, - 0, - "CLIP" - ], - [ - 15, - 14, - 1, - 7, - 0, - "CLIP" - ], - [ - 16, - 14, - 2, - 12, - 1, - "VAE" - ], - [ - 17, - 14, - 2, - 8, - 1, - "VAE" - ] - ], - "groups": [ - { - "title": "Loading images", - "bounding": [ - 150, - 630, - 726, - 171 - ], - "color": "#3f789e" - } - ], - "config": {}, - "extra": {}, - "version": 0.4, - "models": [{ - "name": "v1-5-pruned-emaonly.safetensors", - "url": "https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly.safetensors?download=true", - "directory": "checkpoints" - }] -} diff --git a/web/templates/upscale.jpg b/web/templates/upscale.jpg deleted file mode 100644 index e8523535f..000000000 Binary files a/web/templates/upscale.jpg and /dev/null differ diff --git a/web/templates/upscale.json b/web/templates/upscale.json deleted file mode 100644 index 5d568b1c5..000000000 --- a/web/templates/upscale.json +++ /dev/null @@ -1,652 +0,0 @@ -{ - "last_node_id": 16, - "last_link_id": 23, - "nodes": [ - { - "id": 8, - "type": "VAEDecode", - "pos": [ - 1235.7215957031258, - 577.1878720703122 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 7 - }, - { - "name": "vae", - "type": "VAE", - "link": 21 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 9 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 10, - "type": "LatentUpscale", - "pos": [ - 1238, - 170 - ], - "size": { - "0": 315, - "1": 130 - }, - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 10 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 14 - ] - } - ], - "properties": { - "Node name for S&R": "LatentUpscale" - }, - "widgets_values": [ - "nearest-exact", - 1152, - 1152, - "disabled" - ] - }, - { - "id": 13, - "type": "VAEDecode", - "pos": [ - 1961, - 125 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 9, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 15 - }, - { - "name": "vae", - "type": "VAE", - "link": 22 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 17 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 6, - "type": "CLIPTextEncode", - "pos": [ - 374, - 171 - ], - "size": { - "0": 422.84503173828125, - "1": 164.31304931640625 - }, - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 19 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 4, - 12 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "masterpiece HDR victorian portrait painting of woman, blonde hair, mountain nature, blue sky\n" - ] - }, - { - "id": 7, - "type": "CLIPTextEncode", - "pos": [ - 377, - 381 - ], - "size": { - "0": 425.27801513671875, - "1": 180.6060791015625 - }, - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 20 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 6, - 13 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "bad hands, text, watermark\n" - ] - }, - { - "id": 5, - "type": "EmptyLatentImage", - "pos": [ - 435, - 600 - ], - "size": { - "0": 315, - "1": 106 - }, - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 2 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "EmptyLatentImage" - }, - "widgets_values": [ - 768, - 768, - 1 - ] - }, - { - "id": 11, - "type": "KSampler", - "pos": [ - 1585, - 114 - ], - "size": { - "0": 315, - "1": 262 - }, - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 23, - "slot_index": 0 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 12, - "slot_index": 1 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 13, - "slot_index": 2 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 14, - "slot_index": 3 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 15 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSampler" - }, - "widgets_values": [ - 469771404043268, - "randomize", - 14, - 8, - "dpmpp_2m", - "simple", - 0.5 - ] - }, - { - "id": 12, - "type": "SaveImage", - "pos": [ - 2203, - 123 - ], - "size": { - "0": 407.53717041015625, - "1": 468.13226318359375 - }, - "flags": {}, - "order": 10, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 17 - } - ], - "properties": {}, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 3, - "type": "KSampler", - "pos": [ - 845, - 172 - ], - "size": { - "0": 315, - "1": 262 - }, - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 18 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 4 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 6 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 2 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 7, - 10 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "KSampler" - }, - "widgets_values": [ - 89848141647836, - "randomize", - 12, - 8, - "dpmpp_sde", - "normal", - 1 - ] - }, - { - "id": 16, - "type": "CheckpointLoaderSimple", - "pos": [ - 24, - 315 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 18, - 23 - ], - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 19, - 20 - ], - "slot_index": 1 - }, - { - "name": "VAE", - "type": "VAE", - "links": [ - 21, - 22 - ], - "slot_index": 2 - } - ], - "properties": { - "Node name for S&R": "CheckpointLoaderSimple" - }, - "widgets_values": [ - "v2-1_768-ema-pruned.safetensors" - ] - }, - { - "id": 9, - "type": "SaveImage", - "pos": [ - 1495.7215957031258, - 576.1878720703122 - ], - "size": [ - 232.9403301043692, - 282.4336258387117 - ], - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 9 - } - ], - "properties": {}, - "widgets_values": [ - "ComfyUI" - ] - } - ], - "links": [ - [ - 2, - 5, - 0, - 3, - 3, - "LATENT" - ], - [ - 4, - 6, - 0, - 3, - 1, - "CONDITIONING" - ], - [ - 6, - 7, - 0, - 3, - 2, - "CONDITIONING" - ], - [ - 7, - 3, - 0, - 8, - 0, - "LATENT" - ], - [ - 9, - 8, - 0, - 9, - 0, - "IMAGE" - ], - [ - 10, - 3, - 0, - 10, - 0, - "LATENT" - ], - [ - 12, - 6, - 0, - 11, - 1, - "CONDITIONING" - ], - [ - 13, - 7, - 0, - 11, - 2, - "CONDITIONING" - ], - [ - 14, - 10, - 0, - 11, - 3, - "LATENT" - ], - [ - 15, - 11, - 0, - 13, - 0, - "LATENT" - ], - [ - 17, - 13, - 0, - 12, - 0, - "IMAGE" - ], - [ - 18, - 16, - 0, - 3, - 0, - "MODEL" - ], - [ - 19, - 16, - 1, - 6, - 0, - "CLIP" - ], - [ - 20, - 16, - 1, - 7, - 0, - "CLIP" - ], - [ - 21, - 16, - 2, - 8, - 1, - "VAE" - ], - [ - 22, - 16, - 2, - 13, - 1, - "VAE" - ], - [ - 23, - 16, - 0, - 11, - 0, - "MODEL" - ] - ], - "groups": [ - { - "title": "Txt2Img", - "bounding": [ - -1, - 30, - 1211, - 708 - ], - "color": "#a1309b" - }, - { - "title": "Save Intermediate Image", - "bounding": [ - 1225, - 500, - 516, - 196 - ], - "color": "#3f789e" - }, - { - "title": "Hires Fix", - "bounding": [ - 1224, - 29, - 710, - 464 - ], - "color": "#b58b2a" - }, - { - "title": "Save Final Image", - "bounding": [ - 1949, - 31, - 483, - 199 - ], - "color": "#3f789e" - } - ], - "config": {}, - "extra": {}, - "version": 0.4, - "models": [ - { - "name": "v2-1_768-ema-pruned.safetensors", - "url": "https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors?download=true", - "directory": "checkpoints" - } - ] - } diff --git a/web/user.css b/web/user.css deleted file mode 100644 index 8b1af3868..000000000 --- a/web/user.css +++ /dev/null @@ -1 +0,0 @@ -/* Put custom styles here */ \ No newline at end of file