diff --git a/README.md b/README.md index 7a941fd85f7bc6e543d43758a8fdab3073889469..da75d6eb690979dfe13deae3554a0fb36451dc79 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ app_file: space.py --- # `gradio_propertysheet` -Static Badge

💻 Component GitHub Code

+Static Badge

💻 Component GitHub Code

The **PropertySheet** component for Gradio allows you to automatically generate a complete and interactive settings panel from a standard Python `dataclass`. It's designed to bring the power of IDE-like property editors directly into your Gradio applications. @@ -50,115 +50,55 @@ from dataclasses import dataclass, field, asdict from typing import Literal from gradio_propertysheet import PropertySheet -# --- Main Configuration Dataclasses for the "Render Settings" Sheet --- +# --- Configuration Data Models --- +# These dataclasses define the structure for all settings panels. @dataclass class ModelSettings: """Settings for loading models, VAEs, etc.""" - model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field( - default="SDXL", - metadata={"component": "dropdown", "label": "Base Model"} - ) - custom_model_path: str = field( - default="/path/to/default.safetensors", - metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}} - ) - vae_path: str = field( - default="", - metadata={"label": "VAE Path (optional)"} - ) + model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field(default="SDXL", metadata={"component": "dropdown", "label": "Base Model"}) + custom_model_path: str = field(default="/path/to/default.safetensors", metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}}) + vae_path: str = field(default="", metadata={"label": "VAE Path (optional)"}) @dataclass class SamplingSettings: """Settings for the image sampling process.""" - sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field( - default="DPM++ 2M Karras", - metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."} - ) - steps: int = field( - default=25, - metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."} - ) - cfg_scale: float = field( - default=7.0, - metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."} - ) + sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field(default="DPM++ 2M Karras", metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."}) + steps: int = field(default=25, metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."}) + cfg_scale: float = field(default=7.0, metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."}) @dataclass class ImageSettings: """Settings for image dimensions.""" - width: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"} - ) - height: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"} - ) + width: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"}) + height: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"}) @dataclass class PostprocessingSettings: """Settings for image post-processing effects.""" - restore_faces: bool = field( - default=True, - metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."} - ) - enable_hr: bool = field( - default=False, - metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."} - ) - denoising_strength: float = field( - default=0.45, - metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}} - ) + restore_faces: bool = field(default=True, metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."}) + enable_hr: bool = field(default=False, metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."}) + denoising_strength: float = field(default=0.45, metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}}) @dataclass class AdvancedSettings: """Advanced and rarely changed settings.""" - clip_skip: int = field( - default=2, - metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."} - ) - noise_schedule: Literal["Default", "Karras", "Exponential"] = field( - default="Karras", - metadata={"component": "dropdown", "label": "Noise Schedule"} - ) - do_not_scale_cond_uncond: bool = field( - default=False, - metadata={"label": "Do not scale cond/uncond"} - ) - s_churn: int = field( - default=1, - metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."} - ) + clip_skip: int = field(default=2, metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."}) + noise_schedule: Literal["Default", "Karras", "Exponential"] = field(default="Karras", metadata={"component": "dropdown", "label": "Noise Schedule"}) + do_not_scale_cond_uncond: bool = field(default=False, metadata={"label": "Do not scale cond/uncond"}) + s_churn: int = field(default=1, metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."}) @dataclass class ScriptSettings: """Settings for automation scripts like X/Y/Z plots.""" - script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field( - default="None", - metadata={"component": "dropdown", "label": "Script"} - ) - x_values: str = field( - default="-1, 10, 20", - metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) - y_values: str = field( - default="", - metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) + script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field(default="None", metadata={"component": "dropdown", "label": "Script"}) + x_values: str = field(default="-1, 10, 20", metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) + y_values: str = field(default="", metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) @dataclass class RenderConfig: """Main configuration object for rendering, grouping all settings.""" - seed: int = field( - default=-1, - metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."} - ) - batch_size: int = field( - default=1, - metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"} - ) - # Nested groups + seed: int = field(default=-1, metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."}) + batch_size: int = field(default=1, metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"}) model: ModelSettings = field(default_factory=ModelSettings) sampling: SamplingSettings = field(default_factory=SamplingSettings) image: ImageSettings = field(default_factory=ImageSettings) @@ -166,7 +106,6 @@ class RenderConfig: scripts: ScriptSettings = field(default_factory=ScriptSettings) advanced: AdvancedSettings = field(default_factory=AdvancedSettings) - @dataclass class Lighting: """Lighting settings for the environment.""" @@ -180,8 +119,8 @@ class EnvironmentConfig: background: Literal["Sky", "Color", "Image"] = field(default="Sky", metadata={"component": "dropdown"}) lighting: Lighting = field(default_factory=Lighting) - # --- Initial Instances --- +# Create default instances of the configuration objects. initial_render_config = RenderConfig() initial_env_config = EnvironmentConfig() @@ -191,66 +130,118 @@ with gr.Blocks(title="PropertySheet Demo") as demo: gr.Markdown("An example of a realistic application layout using the `PropertySheet` component as a sidebar for settings.") gr.Markdown("💻 Component GitHub Code") + # --- Persistent State Management --- + # Use gr.State to hold the application's data. This is the "single source of truth". + render_state = gr.State(value=initial_render_config) + env_state = gr.State(value=initial_env_config) + with gr.Row(): - # Main content area on the left - with gr.Column(scale=3): - #gr.Image(label="Main Viewport", height=500, value=None) - gr.Textbox(label="AI Prompt", lines=3, placeholder="Enter your prompt here...") - gr.Button("Generate", variant="primary") + with gr.Column(scale=3): + generate = gr.Button("Show Settings", variant="primary") with gr.Row(): output_render_json = gr.JSON(label="Live Render State") output_env_json = gr.JSON(label="Live Environment State") - # Sidebar with Property Sheets on the right with gr.Column(scale=1): render_sheet = PropertySheet( - value=initial_render_config, + value=initial_render_config, label="Render Settings", width=400, - height=550 # Set a fixed height to demonstrate internal scrolling + height=550, + visible=False ) environment_sheet = PropertySheet( value=initial_env_config, label="Environment Settings", width=400, - open=False # Start collapsed to show the accordion feature + open=False, + visible=False ) # --- Event Handlers --- - def handle_render_change(updated_config: RenderConfig | None): - """Callback to process changes from the Render Settings sheet.""" + def change_visibility(render_config, env_config): + """ + Handles the visibility toggle for the property sheets. + NOTE: This approach of modifying the component object's attribute directly + is not reliable for tracking state changes in Gradio. A gr.State object is + the recommended way to manage UI state like visibility. + """ + if render_sheet.visible != environment_sheet.visible: + render_sheet.visible = False + environment_sheet.visible = False + + if render_sheet.visible == False and environment_sheet.visible == False: + render_sheet.visible = True + environment_sheet.visible = True + return ( + gr.update(visible=True, value=render_config), + gr.update(visible=True, value=env_config), + gr.update(value="Hide Settings") + ) + else: + render_sheet.visible = False + environment_sheet.visible = False + return ( + gr.update(visible=False, value=render_config), + gr.update(visible=False, value=env_config), + gr.update(value="Show Settings") + ) + + def handle_render_change(updated_config: RenderConfig | None, current_state: RenderConfig): + """Processes updates from the render PropertySheet and syncs the state.""" if updated_config is None: - return initial_render_config, asdict(initial_render_config) + return current_state, asdict(current_state), current_state - # Example of business logic: reset custom path if not in custom mode + # Example of applying business logic if updated_config.model.model_type != "Custom": updated_config.model.custom_model_path = "/path/to/default.safetensors" - - return updated_config, asdict(updated_config) + + return updated_config, asdict(updated_config), updated_config - def handle_env_change(updated_config: EnvironmentConfig | None): - """Callback to process changes from the Environment Settings sheet.""" + def handle_env_change(updated_config: EnvironmentConfig | None, current_state: EnvironmentConfig): + """Processes updates from the environment PropertySheet and syncs the state.""" if updated_config is None: - return initial_env_config, asdict(initial_env_config) - return updated_config, asdict(updated_config) - + return current_state, asdict(current_state), current_state + return updated_config, asdict(updated_config), updated_config + + # --- Event Listeners --- + # Toggle the property sheets' visibility on button click. + generate.click( + fn=change_visibility, + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet, generate] + ) + + # Syncs changes from the UI back to the state and JSON display. render_sheet.change( fn=handle_render_change, - inputs=[render_sheet], - outputs=[render_sheet, output_render_json] + inputs=[render_sheet, render_state], + outputs=[render_sheet, output_render_json, render_state] ) + + # Syncs changes from the UI back to the state and JSON display. environment_sheet.change( fn=handle_env_change, - inputs=[environment_sheet], - outputs=[environment_sheet, output_env_json] + inputs=[environment_sheet, env_state], + outputs=[environment_sheet, output_env_json, env_state] ) - # Load initial state into JSON viewers on app load + # Load initial data into JSON displays on app start. demo.load( fn=lambda: (asdict(initial_render_config), asdict(initial_env_config)), outputs=[output_render_json, output_env_json] ) + # Ensure components are populated with state values on load/reload. + demo.load( + fn=lambda render_config, env_config: ( + gr.update(value=render_config), + gr.update(value=env_config) + ), + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet] + ) + if __name__ == "__main__": demo.launch() ``` @@ -418,10 +409,10 @@ list[str] | str | None | name | description | |:-----|:------------| -| `change` | Triggered when a value is changed and committed (e.g., on slider release, or after unfocusing a textbox). | -| `input` | Triggered on every keystroke or slider movement. | -| `expand` | Triggered when the main accordion is opened. | -| `collapse` | Triggered when the main accordion is closed. | +| `change` | | +| `input` | | +| `expand` | | +| `collapse` | | @@ -434,7 +425,8 @@ The impact on the users predict function varies depending on whether the compone The code snippet below is accurate in cases where the component is used as both an input and an output. - +- **As output:** Is passed, a new, updated instance of the dataclass. +- **As input:** Should return, the dataclass instance to process. ```python def predict( @@ -442,4 +434,4 @@ The code snippet below is accurate in cases where the component is used as both ) -> Any: return value ``` -``` \ No newline at end of file + diff --git a/app.py b/app.py index da2c449a27b54f8ce81059ff8b546963fb0f8bbe..24954912ef14091fbdb20f0ecdb4c3c78bd4a2eb 100644 --- a/app.py +++ b/app.py @@ -3,115 +3,55 @@ from dataclasses import dataclass, field, asdict from typing import Literal from gradio_propertysheet import PropertySheet -# --- Main Configuration Dataclasses for the "Render Settings" Sheet --- +# --- Configuration Data Models --- +# These dataclasses define the structure for all settings panels. @dataclass class ModelSettings: """Settings for loading models, VAEs, etc.""" - model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field( - default="SDXL", - metadata={"component": "dropdown", "label": "Base Model"} - ) - custom_model_path: str = field( - default="/path/to/default.safetensors", - metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}} - ) - vae_path: str = field( - default="", - metadata={"label": "VAE Path (optional)"} - ) + model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field(default="SDXL", metadata={"component": "dropdown", "label": "Base Model"}) + custom_model_path: str = field(default="/path/to/default.safetensors", metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}}) + vae_path: str = field(default="", metadata={"label": "VAE Path (optional)"}) @dataclass class SamplingSettings: """Settings for the image sampling process.""" - sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field( - default="DPM++ 2M Karras", - metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."} - ) - steps: int = field( - default=25, - metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."} - ) - cfg_scale: float = field( - default=7.0, - metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."} - ) + sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field(default="DPM++ 2M Karras", metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."}) + steps: int = field(default=25, metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."}) + cfg_scale: float = field(default=7.0, metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."}) @dataclass class ImageSettings: """Settings for image dimensions.""" - width: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"} - ) - height: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"} - ) + width: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"}) + height: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"}) @dataclass class PostprocessingSettings: """Settings for image post-processing effects.""" - restore_faces: bool = field( - default=True, - metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."} - ) - enable_hr: bool = field( - default=False, - metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."} - ) - denoising_strength: float = field( - default=0.45, - metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}} - ) + restore_faces: bool = field(default=True, metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."}) + enable_hr: bool = field(default=False, metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."}) + denoising_strength: float = field(default=0.45, metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}}) @dataclass class AdvancedSettings: """Advanced and rarely changed settings.""" - clip_skip: int = field( - default=2, - metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."} - ) - noise_schedule: Literal["Default", "Karras", "Exponential"] = field( - default="Karras", - metadata={"component": "dropdown", "label": "Noise Schedule"} - ) - do_not_scale_cond_uncond: bool = field( - default=False, - metadata={"label": "Do not scale cond/uncond"} - ) - s_churn: int = field( - default=1, - metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."} - ) + clip_skip: int = field(default=2, metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."}) + noise_schedule: Literal["Default", "Karras", "Exponential"] = field(default="Karras", metadata={"component": "dropdown", "label": "Noise Schedule"}) + do_not_scale_cond_uncond: bool = field(default=False, metadata={"label": "Do not scale cond/uncond"}) + s_churn: int = field(default=1, metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."}) @dataclass class ScriptSettings: """Settings for automation scripts like X/Y/Z plots.""" - script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field( - default="None", - metadata={"component": "dropdown", "label": "Script"} - ) - x_values: str = field( - default="-1, 10, 20", - metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) - y_values: str = field( - default="", - metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) + script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field(default="None", metadata={"component": "dropdown", "label": "Script"}) + x_values: str = field(default="-1, 10, 20", metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) + y_values: str = field(default="", metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) @dataclass class RenderConfig: """Main configuration object for rendering, grouping all settings.""" - seed: int = field( - default=-1, - metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."} - ) - batch_size: int = field( - default=1, - metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"} - ) - # Nested groups + seed: int = field(default=-1, metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."}) + batch_size: int = field(default=1, metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"}) model: ModelSettings = field(default_factory=ModelSettings) sampling: SamplingSettings = field(default_factory=SamplingSettings) image: ImageSettings = field(default_factory=ImageSettings) @@ -119,7 +59,6 @@ class RenderConfig: scripts: ScriptSettings = field(default_factory=ScriptSettings) advanced: AdvancedSettings = field(default_factory=AdvancedSettings) - @dataclass class Lighting: """Lighting settings for the environment.""" @@ -133,8 +72,8 @@ class EnvironmentConfig: background: Literal["Sky", "Color", "Image"] = field(default="Sky", metadata={"component": "dropdown"}) lighting: Lighting = field(default_factory=Lighting) - # --- Initial Instances --- +# Create default instances of the configuration objects. initial_render_config = RenderConfig() initial_env_config = EnvironmentConfig() @@ -144,65 +83,117 @@ with gr.Blocks(title="PropertySheet Demo") as demo: gr.Markdown("An example of a realistic application layout using the `PropertySheet` component as a sidebar for settings.") gr.Markdown("💻 Component GitHub Code") + # --- Persistent State Management --- + # Use gr.State to hold the application's data. This is the "single source of truth". + render_state = gr.State(value=initial_render_config) + env_state = gr.State(value=initial_env_config) + with gr.Row(): - # Main content area on the left - with gr.Column(scale=3): - #gr.Image(label="Main Viewport", height=500, value=None) - gr.Textbox(label="AI Prompt", lines=3, placeholder="Enter your prompt here...") - gr.Button("Generate", variant="primary") + with gr.Column(scale=3): + generate = gr.Button("Show Settings", variant="primary") with gr.Row(): output_render_json = gr.JSON(label="Live Render State") output_env_json = gr.JSON(label="Live Environment State") - # Sidebar with Property Sheets on the right with gr.Column(scale=1): render_sheet = PropertySheet( - value=initial_render_config, + value=initial_render_config, label="Render Settings", width=400, - height=550 # Set a fixed height to demonstrate internal scrolling + height=550, + visible=False ) environment_sheet = PropertySheet( value=initial_env_config, label="Environment Settings", width=400, - open=False # Start collapsed to show the accordion feature + open=False, + visible=False ) # --- Event Handlers --- - def handle_render_change(updated_config: RenderConfig | None): - """Callback to process changes from the Render Settings sheet.""" + def change_visibility(render_config, env_config): + """ + Handles the visibility toggle for the property sheets. + NOTE: This approach of modifying the component object's attribute directly + is not reliable for tracking state changes in Gradio. A gr.State object is + the recommended way to manage UI state like visibility. + """ + if render_sheet.visible != environment_sheet.visible: + render_sheet.visible = False + environment_sheet.visible = False + + if render_sheet.visible == False and environment_sheet.visible == False: + render_sheet.visible = True + environment_sheet.visible = True + return ( + gr.update(visible=True, value=render_config), + gr.update(visible=True, value=env_config), + gr.update(value="Hide Settings") + ) + else: + render_sheet.visible = False + environment_sheet.visible = False + return ( + gr.update(visible=False, value=render_config), + gr.update(visible=False, value=env_config), + gr.update(value="Show Settings") + ) + + def handle_render_change(updated_config: RenderConfig | None, current_state: RenderConfig): + """Processes updates from the render PropertySheet and syncs the state.""" if updated_config is None: - return initial_render_config, asdict(initial_render_config) + return current_state, asdict(current_state), current_state - # Example of business logic: reset custom path if not in custom mode + # Example of applying business logic if updated_config.model.model_type != "Custom": updated_config.model.custom_model_path = "/path/to/default.safetensors" - - return updated_config, asdict(updated_config) + + return updated_config, asdict(updated_config), updated_config - def handle_env_change(updated_config: EnvironmentConfig | None): - """Callback to process changes from the Environment Settings sheet.""" + def handle_env_change(updated_config: EnvironmentConfig | None, current_state: EnvironmentConfig): + """Processes updates from the environment PropertySheet and syncs the state.""" if updated_config is None: - return initial_env_config, asdict(initial_env_config) - return updated_config, asdict(updated_config) + return current_state, asdict(current_state), current_state + return updated_config, asdict(updated_config), updated_config + # --- Event Listeners --- + # Toggle the property sheets' visibility on button click. + generate.click( + fn=change_visibility, + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet, generate] + ) + + # Syncs changes from the UI back to the state and JSON display. render_sheet.change( fn=handle_render_change, - inputs=[render_sheet], - outputs=[render_sheet, output_render_json] + inputs=[render_sheet, render_state], + outputs=[render_sheet, output_render_json, render_state] ) + + # Syncs changes from the UI back to the state and JSON display. environment_sheet.change( fn=handle_env_change, - inputs=[environment_sheet], - outputs=[environment_sheet, output_env_json] + inputs=[environment_sheet, env_state], + outputs=[environment_sheet, output_env_json, env_state] ) - # Load initial state into JSON viewers on app load + # Load initial data into JSON displays on app start. demo.load( fn=lambda: (asdict(initial_render_config), asdict(initial_env_config)), outputs=[output_render_json, output_env_json] ) + # Ensure components are populated with state values on load/reload. + demo.load( + fn=lambda render_config, env_config: ( + gr.update(value=render_config), + gr.update(value=env_config) + ), + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet] + ) + if __name__ == "__main__": demo.launch() \ No newline at end of file diff --git a/space.py b/space.py index 7ea2bddfef851a5361e5c5a8023c453e53dce24d..49d14545322ab088b416e5034a5651930270204d 100644 --- a/space.py +++ b/space.py @@ -3,7 +3,7 @@ import gradio as gr from app import demo as app import os -_docs = {'PropertySheet': {'description': 'A Gradio component that renders a dynamic UI from a Python dataclass instance.', 'members': {'__init__': {'value': {'type': 'typing.Optional[typing.Any][Any, None]', 'default': 'None', 'description': 'The initial dataclass instance to render.'}, 'label': {'type': 'str | None', 'default': 'None', 'description': 'The main label for the component, displayed in the accordion header.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'If False, the component will be hidden.'}, 'open': {'type': 'bool', 'default': 'True', 'description': 'If False, the accordion will be collapsed by default.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'An optional string that is assigned as the id of this component in the DOM.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'The relative size of the component in its container.'}, 'width': {'type': 'int | str | None', 'default': 'None', 'description': 'The width of the component in pixels.'}, 'height': {'type': 'int | str | None', 'default': 'None', 'description': "The maximum height of the component's content area in pixels before scrolling."}, 'min_width': {'type': 'int | None', 'default': 'None', 'description': 'The minimum width of the component in pixels.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'If True, wraps the component in a container with a background.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'An optional list of strings that are assigned as the classes of this component in the DOM.'}}, 'postprocess': {'value': {'type': 'Any', 'description': None}}, 'preprocess': {'return': {'type': 'Any', 'description': None}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': ''}, 'input': {'type': None, 'default': None, 'description': ''}, 'expand': {'type': None, 'default': None, 'description': ''}, 'collapse': {'type': None, 'default': None, 'description': ''}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'PropertySheet': []}}} +_docs = {'PropertySheet': {'description': 'A Gradio component that renders a dynamic UI from a Python dataclass instance.\nIt allows for nested settings and automatically infers input types.', 'members': {'__init__': {'value': {'type': 'typing.Optional[typing.Any][Any, None]', 'default': 'None', 'description': 'The initial dataclass instance to render.'}, 'label': {'type': 'str | None', 'default': 'None', 'description': 'The main label for the component, displayed in the accordion header.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'If False, the component will be hidden.'}, 'open': {'type': 'bool', 'default': 'True', 'description': 'If False, the accordion will be collapsed by default.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'An optional string that is assigned as the id of this component in the DOM.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'The relative size of the component in its container.'}, 'width': {'type': 'int | str | None', 'default': 'None', 'description': 'The width of the component in pixels.'}, 'height': {'type': 'int | str | None', 'default': 'None', 'description': "The maximum height of the component's content area in pixels before scrolling."}, 'min_width': {'type': 'int | None', 'default': 'None', 'description': 'The minimum width of the component in pixels.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'If True, wraps the component in a container with a background.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'An optional list of strings that are assigned as the classes of this component in the DOM.'}}, 'postprocess': {'value': {'type': 'Any', 'description': 'The dataclass instance to process.'}}, 'preprocess': {'return': {'type': 'Any', 'description': 'A new, updated instance of the dataclass.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': ''}, 'input': {'type': None, 'default': None, 'description': ''}, 'expand': {'type': None, 'default': None, 'description': ''}, 'collapse': {'type': None, 'default': None, 'description': ''}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'PropertySheet': []}}} abs_path = os.path.join(os.path.dirname(__file__), "css.css") @@ -21,7 +21,7 @@ with gr.Blocks( # `gradio_propertysheet`
-Static Badge +PyPI - Version
Property sheet @@ -43,115 +43,55 @@ from dataclasses import dataclass, field, asdict from typing import Literal from gradio_propertysheet import PropertySheet -# --- Main Configuration Dataclasses for the "Render Settings" Sheet --- +# --- Configuration Data Models --- +# These dataclasses define the structure for all settings panels. @dataclass class ModelSettings: \"\"\"Settings for loading models, VAEs, etc.\"\"\" - model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field( - default="SDXL", - metadata={"component": "dropdown", "label": "Base Model"} - ) - custom_model_path: str = field( - default="/path/to/default.safetensors", - metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}} - ) - vae_path: str = field( - default="", - metadata={"label": "VAE Path (optional)"} - ) + model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field(default="SDXL", metadata={"component": "dropdown", "label": "Base Model"}) + custom_model_path: str = field(default="/path/to/default.safetensors", metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}}) + vae_path: str = field(default="", metadata={"label": "VAE Path (optional)"}) @dataclass class SamplingSettings: \"\"\"Settings for the image sampling process.\"\"\" - sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field( - default="DPM++ 2M Karras", - metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."} - ) - steps: int = field( - default=25, - metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."} - ) - cfg_scale: float = field( - default=7.0, - metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."} - ) + sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field(default="DPM++ 2M Karras", metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."}) + steps: int = field(default=25, metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."}) + cfg_scale: float = field(default=7.0, metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."}) @dataclass class ImageSettings: \"\"\"Settings for image dimensions.\"\"\" - width: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"} - ) - height: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"} - ) + width: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"}) + height: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"}) @dataclass class PostprocessingSettings: \"\"\"Settings for image post-processing effects.\"\"\" - restore_faces: bool = field( - default=True, - metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."} - ) - enable_hr: bool = field( - default=False, - metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."} - ) - denoising_strength: float = field( - default=0.45, - metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}} - ) + restore_faces: bool = field(default=True, metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."}) + enable_hr: bool = field(default=False, metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."}) + denoising_strength: float = field(default=0.45, metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}}) @dataclass class AdvancedSettings: \"\"\"Advanced and rarely changed settings.\"\"\" - clip_skip: int = field( - default=2, - metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."} - ) - noise_schedule: Literal["Default", "Karras", "Exponential"] = field( - default="Karras", - metadata={"component": "dropdown", "label": "Noise Schedule"} - ) - do_not_scale_cond_uncond: bool = field( - default=False, - metadata={"label": "Do not scale cond/uncond"} - ) - s_churn: int = field( - default=1, - metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."} - ) + clip_skip: int = field(default=2, metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."}) + noise_schedule: Literal["Default", "Karras", "Exponential"] = field(default="Karras", metadata={"component": "dropdown", "label": "Noise Schedule"}) + do_not_scale_cond_uncond: bool = field(default=False, metadata={"label": "Do not scale cond/uncond"}) + s_churn: int = field(default=1, metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."}) @dataclass class ScriptSettings: \"\"\"Settings for automation scripts like X/Y/Z plots.\"\"\" - script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field( - default="None", - metadata={"component": "dropdown", "label": "Script"} - ) - x_values: str = field( - default="-1, 10, 20", - metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) - y_values: str = field( - default="", - metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) + script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field(default="None", metadata={"component": "dropdown", "label": "Script"}) + x_values: str = field(default="-1, 10, 20", metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) + y_values: str = field(default="", metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) @dataclass class RenderConfig: \"\"\"Main configuration object for rendering, grouping all settings.\"\"\" - seed: int = field( - default=-1, - metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."} - ) - batch_size: int = field( - default=1, - metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"} - ) - # Nested groups + seed: int = field(default=-1, metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."}) + batch_size: int = field(default=1, metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"}) model: ModelSettings = field(default_factory=ModelSettings) sampling: SamplingSettings = field(default_factory=SamplingSettings) image: ImageSettings = field(default_factory=ImageSettings) @@ -159,7 +99,6 @@ class RenderConfig: scripts: ScriptSettings = field(default_factory=ScriptSettings) advanced: AdvancedSettings = field(default_factory=AdvancedSettings) - @dataclass class Lighting: \"\"\"Lighting settings for the environment.\"\"\" @@ -173,8 +112,8 @@ class EnvironmentConfig: background: Literal["Sky", "Color", "Image"] = field(default="Sky", metadata={"component": "dropdown"}) lighting: Lighting = field(default_factory=Lighting) - # --- Initial Instances --- +# Create default instances of the configuration objects. initial_render_config = RenderConfig() initial_env_config = EnvironmentConfig() @@ -184,66 +123,118 @@ with gr.Blocks(title="PropertySheet Demo") as demo: gr.Markdown("An example of a realistic application layout using the `PropertySheet` component as a sidebar for settings.") gr.Markdown("💻 Component GitHub Code") + # --- Persistent State Management --- + # Use gr.State to hold the application's data. This is the "single source of truth". + render_state = gr.State(value=initial_render_config) + env_state = gr.State(value=initial_env_config) + with gr.Row(): - # Main content area on the left - with gr.Column(scale=3): - #gr.Image(label="Main Viewport", height=500, value=None) - gr.Textbox(label="AI Prompt", lines=3, placeholder="Enter your prompt here...") - gr.Button("Generate", variant="primary") + with gr.Column(scale=3): + generate = gr.Button("Show Settings", variant="primary") with gr.Row(): output_render_json = gr.JSON(label="Live Render State") output_env_json = gr.JSON(label="Live Environment State") - # Sidebar with Property Sheets on the right with gr.Column(scale=1): render_sheet = PropertySheet( - value=initial_render_config, + value=initial_render_config, label="Render Settings", width=400, - height=550 # Set a fixed height to demonstrate internal scrolling + height=550, + visible=False ) environment_sheet = PropertySheet( value=initial_env_config, label="Environment Settings", width=400, - open=False # Start collapsed to show the accordion feature + open=False, + visible=False ) # --- Event Handlers --- - def handle_render_change(updated_config: RenderConfig | None): - \"\"\"Callback to process changes from the Render Settings sheet.\"\"\" + def change_visibility(render_config, env_config): + \"\"\" + Handles the visibility toggle for the property sheets. + NOTE: This approach of modifying the component object's attribute directly + is not reliable for tracking state changes in Gradio. A gr.State object is + the recommended way to manage UI state like visibility. + \"\"\" + if render_sheet.visible != environment_sheet.visible: + render_sheet.visible = False + environment_sheet.visible = False + + if render_sheet.visible == False and environment_sheet.visible == False: + render_sheet.visible = True + environment_sheet.visible = True + return ( + gr.update(visible=True, value=render_config), + gr.update(visible=True, value=env_config), + gr.update(value="Hide Settings") + ) + else: + render_sheet.visible = False + environment_sheet.visible = False + return ( + gr.update(visible=False, value=render_config), + gr.update(visible=False, value=env_config), + gr.update(value="Show Settings") + ) + + def handle_render_change(updated_config: RenderConfig | None, current_state: RenderConfig): + \"\"\"Processes updates from the render PropertySheet and syncs the state.\"\"\" if updated_config is None: - return initial_render_config, asdict(initial_render_config) + return current_state, asdict(current_state), current_state - # Example of business logic: reset custom path if not in custom mode + # Example of applying business logic if updated_config.model.model_type != "Custom": updated_config.model.custom_model_path = "/path/to/default.safetensors" - - return updated_config, asdict(updated_config) + + return updated_config, asdict(updated_config), updated_config - def handle_env_change(updated_config: EnvironmentConfig | None): - \"\"\"Callback to process changes from the Environment Settings sheet.\"\"\" + def handle_env_change(updated_config: EnvironmentConfig | None, current_state: EnvironmentConfig): + \"\"\"Processes updates from the environment PropertySheet and syncs the state.\"\"\" if updated_config is None: - return initial_env_config, asdict(initial_env_config) - return updated_config, asdict(updated_config) - + return current_state, asdict(current_state), current_state + return updated_config, asdict(updated_config), updated_config + + # --- Event Listeners --- + # Toggle the property sheets' visibility on button click. + generate.click( + fn=change_visibility, + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet, generate] + ) + + # Syncs changes from the UI back to the state and JSON display. render_sheet.change( fn=handle_render_change, - inputs=[render_sheet], - outputs=[render_sheet, output_render_json] + inputs=[render_sheet, render_state], + outputs=[render_sheet, output_render_json, render_state] ) + + # Syncs changes from the UI back to the state and JSON display. environment_sheet.change( fn=handle_env_change, - inputs=[environment_sheet], - outputs=[environment_sheet, output_env_json] + inputs=[environment_sheet, env_state], + outputs=[environment_sheet, output_env_json, env_state] ) - # Load initial state into JSON viewers on app load + # Load initial data into JSON displays on app start. demo.load( fn=lambda: (asdict(initial_render_config), asdict(initial_env_config)), outputs=[output_render_json, output_env_json] ) + # Ensure components are populated with state values on load/reload. + demo.load( + fn=lambda render_config, env_config: ( + gr.update(value=render_config), + gr.update(value=env_config) + ), + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet] + ) + if __name__ == "__main__": demo.launch() ``` @@ -276,7 +267,8 @@ The impact on the users predict function varies depending on whether the compone The code snippet below is accurate in cases where the component is used as both an input and an output. - +- **As input:** Is passed, a new, updated instance of the dataclass. +- **As output:** Should return, the dataclass instance to process. ```python def predict( diff --git a/src/README.md b/src/README.md index 7a941fd85f7bc6e543d43758a8fdab3073889469..da75d6eb690979dfe13deae3554a0fb36451dc79 100644 --- a/src/README.md +++ b/src/README.md @@ -10,7 +10,7 @@ app_file: space.py --- # `gradio_propertysheet` -Static Badge

💻 Component GitHub Code

+Static Badge

💻 Component GitHub Code

The **PropertySheet** component for Gradio allows you to automatically generate a complete and interactive settings panel from a standard Python `dataclass`. It's designed to bring the power of IDE-like property editors directly into your Gradio applications. @@ -50,115 +50,55 @@ from dataclasses import dataclass, field, asdict from typing import Literal from gradio_propertysheet import PropertySheet -# --- Main Configuration Dataclasses for the "Render Settings" Sheet --- +# --- Configuration Data Models --- +# These dataclasses define the structure for all settings panels. @dataclass class ModelSettings: """Settings for loading models, VAEs, etc.""" - model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field( - default="SDXL", - metadata={"component": "dropdown", "label": "Base Model"} - ) - custom_model_path: str = field( - default="/path/to/default.safetensors", - metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}} - ) - vae_path: str = field( - default="", - metadata={"label": "VAE Path (optional)"} - ) + model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field(default="SDXL", metadata={"component": "dropdown", "label": "Base Model"}) + custom_model_path: str = field(default="/path/to/default.safetensors", metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}}) + vae_path: str = field(default="", metadata={"label": "VAE Path (optional)"}) @dataclass class SamplingSettings: """Settings for the image sampling process.""" - sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field( - default="DPM++ 2M Karras", - metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."} - ) - steps: int = field( - default=25, - metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."} - ) - cfg_scale: float = field( - default=7.0, - metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."} - ) + sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field(default="DPM++ 2M Karras", metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."}) + steps: int = field(default=25, metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."}) + cfg_scale: float = field(default=7.0, metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."}) @dataclass class ImageSettings: """Settings for image dimensions.""" - width: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"} - ) - height: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"} - ) + width: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"}) + height: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"}) @dataclass class PostprocessingSettings: """Settings for image post-processing effects.""" - restore_faces: bool = field( - default=True, - metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."} - ) - enable_hr: bool = field( - default=False, - metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."} - ) - denoising_strength: float = field( - default=0.45, - metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}} - ) + restore_faces: bool = field(default=True, metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."}) + enable_hr: bool = field(default=False, metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."}) + denoising_strength: float = field(default=0.45, metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}}) @dataclass class AdvancedSettings: """Advanced and rarely changed settings.""" - clip_skip: int = field( - default=2, - metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."} - ) - noise_schedule: Literal["Default", "Karras", "Exponential"] = field( - default="Karras", - metadata={"component": "dropdown", "label": "Noise Schedule"} - ) - do_not_scale_cond_uncond: bool = field( - default=False, - metadata={"label": "Do not scale cond/uncond"} - ) - s_churn: int = field( - default=1, - metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."} - ) + clip_skip: int = field(default=2, metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."}) + noise_schedule: Literal["Default", "Karras", "Exponential"] = field(default="Karras", metadata={"component": "dropdown", "label": "Noise Schedule"}) + do_not_scale_cond_uncond: bool = field(default=False, metadata={"label": "Do not scale cond/uncond"}) + s_churn: int = field(default=1, metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."}) @dataclass class ScriptSettings: """Settings for automation scripts like X/Y/Z plots.""" - script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field( - default="None", - metadata={"component": "dropdown", "label": "Script"} - ) - x_values: str = field( - default="-1, 10, 20", - metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) - y_values: str = field( - default="", - metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) + script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field(default="None", metadata={"component": "dropdown", "label": "Script"}) + x_values: str = field(default="-1, 10, 20", metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) + y_values: str = field(default="", metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) @dataclass class RenderConfig: """Main configuration object for rendering, grouping all settings.""" - seed: int = field( - default=-1, - metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."} - ) - batch_size: int = field( - default=1, - metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"} - ) - # Nested groups + seed: int = field(default=-1, metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."}) + batch_size: int = field(default=1, metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"}) model: ModelSettings = field(default_factory=ModelSettings) sampling: SamplingSettings = field(default_factory=SamplingSettings) image: ImageSettings = field(default_factory=ImageSettings) @@ -166,7 +106,6 @@ class RenderConfig: scripts: ScriptSettings = field(default_factory=ScriptSettings) advanced: AdvancedSettings = field(default_factory=AdvancedSettings) - @dataclass class Lighting: """Lighting settings for the environment.""" @@ -180,8 +119,8 @@ class EnvironmentConfig: background: Literal["Sky", "Color", "Image"] = field(default="Sky", metadata={"component": "dropdown"}) lighting: Lighting = field(default_factory=Lighting) - # --- Initial Instances --- +# Create default instances of the configuration objects. initial_render_config = RenderConfig() initial_env_config = EnvironmentConfig() @@ -191,66 +130,118 @@ with gr.Blocks(title="PropertySheet Demo") as demo: gr.Markdown("An example of a realistic application layout using the `PropertySheet` component as a sidebar for settings.") gr.Markdown("💻 Component GitHub Code") + # --- Persistent State Management --- + # Use gr.State to hold the application's data. This is the "single source of truth". + render_state = gr.State(value=initial_render_config) + env_state = gr.State(value=initial_env_config) + with gr.Row(): - # Main content area on the left - with gr.Column(scale=3): - #gr.Image(label="Main Viewport", height=500, value=None) - gr.Textbox(label="AI Prompt", lines=3, placeholder="Enter your prompt here...") - gr.Button("Generate", variant="primary") + with gr.Column(scale=3): + generate = gr.Button("Show Settings", variant="primary") with gr.Row(): output_render_json = gr.JSON(label="Live Render State") output_env_json = gr.JSON(label="Live Environment State") - # Sidebar with Property Sheets on the right with gr.Column(scale=1): render_sheet = PropertySheet( - value=initial_render_config, + value=initial_render_config, label="Render Settings", width=400, - height=550 # Set a fixed height to demonstrate internal scrolling + height=550, + visible=False ) environment_sheet = PropertySheet( value=initial_env_config, label="Environment Settings", width=400, - open=False # Start collapsed to show the accordion feature + open=False, + visible=False ) # --- Event Handlers --- - def handle_render_change(updated_config: RenderConfig | None): - """Callback to process changes from the Render Settings sheet.""" + def change_visibility(render_config, env_config): + """ + Handles the visibility toggle for the property sheets. + NOTE: This approach of modifying the component object's attribute directly + is not reliable for tracking state changes in Gradio. A gr.State object is + the recommended way to manage UI state like visibility. + """ + if render_sheet.visible != environment_sheet.visible: + render_sheet.visible = False + environment_sheet.visible = False + + if render_sheet.visible == False and environment_sheet.visible == False: + render_sheet.visible = True + environment_sheet.visible = True + return ( + gr.update(visible=True, value=render_config), + gr.update(visible=True, value=env_config), + gr.update(value="Hide Settings") + ) + else: + render_sheet.visible = False + environment_sheet.visible = False + return ( + gr.update(visible=False, value=render_config), + gr.update(visible=False, value=env_config), + gr.update(value="Show Settings") + ) + + def handle_render_change(updated_config: RenderConfig | None, current_state: RenderConfig): + """Processes updates from the render PropertySheet and syncs the state.""" if updated_config is None: - return initial_render_config, asdict(initial_render_config) + return current_state, asdict(current_state), current_state - # Example of business logic: reset custom path if not in custom mode + # Example of applying business logic if updated_config.model.model_type != "Custom": updated_config.model.custom_model_path = "/path/to/default.safetensors" - - return updated_config, asdict(updated_config) + + return updated_config, asdict(updated_config), updated_config - def handle_env_change(updated_config: EnvironmentConfig | None): - """Callback to process changes from the Environment Settings sheet.""" + def handle_env_change(updated_config: EnvironmentConfig | None, current_state: EnvironmentConfig): + """Processes updates from the environment PropertySheet and syncs the state.""" if updated_config is None: - return initial_env_config, asdict(initial_env_config) - return updated_config, asdict(updated_config) - + return current_state, asdict(current_state), current_state + return updated_config, asdict(updated_config), updated_config + + # --- Event Listeners --- + # Toggle the property sheets' visibility on button click. + generate.click( + fn=change_visibility, + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet, generate] + ) + + # Syncs changes from the UI back to the state and JSON display. render_sheet.change( fn=handle_render_change, - inputs=[render_sheet], - outputs=[render_sheet, output_render_json] + inputs=[render_sheet, render_state], + outputs=[render_sheet, output_render_json, render_state] ) + + # Syncs changes from the UI back to the state and JSON display. environment_sheet.change( fn=handle_env_change, - inputs=[environment_sheet], - outputs=[environment_sheet, output_env_json] + inputs=[environment_sheet, env_state], + outputs=[environment_sheet, output_env_json, env_state] ) - # Load initial state into JSON viewers on app load + # Load initial data into JSON displays on app start. demo.load( fn=lambda: (asdict(initial_render_config), asdict(initial_env_config)), outputs=[output_render_json, output_env_json] ) + # Ensure components are populated with state values on load/reload. + demo.load( + fn=lambda render_config, env_config: ( + gr.update(value=render_config), + gr.update(value=env_config) + ), + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet] + ) + if __name__ == "__main__": demo.launch() ``` @@ -418,10 +409,10 @@ list[str] | str | None | name | description | |:-----|:------------| -| `change` | Triggered when a value is changed and committed (e.g., on slider release, or after unfocusing a textbox). | -| `input` | Triggered on every keystroke or slider movement. | -| `expand` | Triggered when the main accordion is opened. | -| `collapse` | Triggered when the main accordion is closed. | +| `change` | | +| `input` | | +| `expand` | | +| `collapse` | | @@ -434,7 +425,8 @@ The impact on the users predict function varies depending on whether the compone The code snippet below is accurate in cases where the component is used as both an input and an output. - +- **As output:** Is passed, a new, updated instance of the dataclass. +- **As input:** Should return, the dataclass instance to process. ```python def predict( @@ -442,4 +434,4 @@ The code snippet below is accurate in cases where the component is used as both ) -> Any: return value ``` -``` \ No newline at end of file + diff --git a/src/backend/gradio_propertysheet/propertysheet.py b/src/backend/gradio_propertysheet/propertysheet.py index 78623e06ddaef07a89031712cba56fd00a888c94..cc1dd91c8d03d664b91445ce8c850f34febbeae0 100644 --- a/src/backend/gradio_propertysheet/propertysheet.py +++ b/src/backend/gradio_propertysheet/propertysheet.py @@ -7,14 +7,17 @@ from gradio.components.base import Component def prop_meta(**kwargs) -> dataclasses.Field: """ A helper function to create a dataclass field with Gradio-specific metadata. + + Returns: + A dataclasses.Field instance with the provided metadata. """ return dataclasses.field(metadata=kwargs) class PropertySheet(Component): """ A Gradio component that renders a dynamic UI from a Python dataclass instance. + It allows for nested settings and automatically infers input types. """ - EVENTS = ["change", "input", "expand", "collapse"] def __init__( @@ -52,8 +55,11 @@ class PropertySheet(Component): if value is not None and not dataclasses.is_dataclass(value): raise ValueError("Initial value must be a dataclass instance") - self._dataclass_value = copy.deepcopy(value) - self._initial_value = copy.deepcopy(value) + # Store the current dataclass instance and its type. + # These might be None if the component is initialized without a value. + self._dataclass_value = copy.deepcopy(value) if value is not None else None + self._dataclass_type = type(value) if dataclasses.is_dataclass(value) else None + self.width = width self.height = height self.open = open @@ -67,6 +73,15 @@ class PropertySheet(Component): def _extract_prop_metadata(self, obj: Any, field: dataclasses.Field) -> Dict[str, Any]: """ Inspects a dataclass field and extracts metadata for UI rendering. + + This function infers the appropriate frontend component (e.g., slider, checkbox) + based on the field's type hint if not explicitly specified in the metadata. + + Args: + obj: The dataclass instance containing the field. + field: The dataclasses.Field object to inspect. + Returns: + A dictionary of metadata for the frontend to render a property control. """ metadata = field.metadata.copy() metadata["name"] = field.name @@ -94,11 +109,23 @@ class PropertySheet(Component): def postprocess(self, value: Any) -> List[Dict[str, Any]]: """ Converts the Python dataclass instance into a JSON schema for the frontend. - It also synchronizes the component's internal state. + + Crucially, this method also acts as a "state guardian". When Gradio calls it + with a valid dataclass (e.g., during a `gr.update` that makes the component visible), + it synchronizes the component's internal state (`_dataclass_value` and `_dataclass_type`), + ensuring the object is "rehydrated" and ready for `preprocess`. + + Args: + value: The dataclass instance to process. + Returns: + A list representing the JSON schema for the frontend UI. """ if dataclasses.is_dataclass(value): self._dataclass_value = copy.deepcopy(value) - + # Restore the dataclass type if it was lost (e.g., on re-initialization). + if self._dataclass_type is None: + self._dataclass_type = type(value) + if value is None or not dataclasses.is_dataclass(value): return [] @@ -126,52 +153,67 @@ class PropertySheet(Component): def preprocess(self, payload: Any) -> Any: """ - Processes the payload from the frontend to update the dataclass instance. + Processes the payload from the frontend to create an updated dataclass instance. + + This method is stateless regarding the instance value. It reconstructs the object + from scratch using the `_dataclass_type` (which is reliably set by `postprocess`) + and then applies the changes from the payload. + + Args: + payload: The data received from the frontend, typically a list of property groups. + Returns: + A new, updated instance of the dataclass. """ if payload is None: - return self._dataclass_value + return None - updated_config_obj = copy.deepcopy(self._dataclass_value) + if self._dataclass_type is None: + # This can happen if the component is used in a way that prevents postprocess + # from ever being called with a valid value. Returning None is a safe fallback. + return None + + # Create a new, default instance of the stored dataclass type. + reconstructed_obj = self._dataclass_type() - # This logic handles the full value object sent by the frontend on reset. + # Apply the values from the payload to the new instance. if isinstance(payload, list): for group in payload: for prop in group.get("properties", []): prop_name = prop["name"] new_value = prop["value"] - if hasattr(updated_config_obj, prop_name): - current_value = getattr(updated_config_obj, prop_name) - if current_value != new_value: - setattr(updated_config_obj, prop_name, new_value) + if hasattr(reconstructed_obj, prop_name): + setattr(reconstructed_obj, prop_name, new_value) else: - for f in dataclasses.fields(updated_config_obj): + # Handle nested dataclasses. + for f in dataclasses.fields(reconstructed_obj): if dataclasses.is_dataclass(f.type): - group_obj = getattr(updated_config_obj, f.name) + group_obj = getattr(reconstructed_obj, f.name) if hasattr(group_obj, prop_name): - current_value = getattr(group_obj, prop_name) - if current_value != new_value: - setattr(group_obj, prop_name, new_value) - break - # This logic handles single-value updates from sliders, textboxes, etc. + setattr(group_obj, prop_name, new_value) + break elif isinstance(payload, dict): - for key, new_value in payload.items(): - if hasattr(updated_config_obj, key): - setattr(updated_config_obj, key, new_value) + for key, new_value in payload.items(): + if hasattr(reconstructed_obj, key): + setattr(reconstructed_obj, key, new_value) else: - for f in dataclasses.fields(updated_config_obj): + # Handle nested dataclasses for dict payloads. + for f in dataclasses.fields(reconstructed_obj): if dataclasses.is_dataclass(f.type): - group_obj = getattr(updated_config_obj, f.name) + group_obj = getattr(reconstructed_obj, f.name) if hasattr(group_obj, key): setattr(group_obj, key, new_value) break - - self._dataclass_value = updated_config_obj - return updated_config_obj + + return reconstructed_obj def api_info(self) -> Dict[str, Any]: - """Provides API information for the component.""" + """ + Provides API information for the component for use in API docs. + """ return {"type": "object", "description": "A key-value dictionary of property settings."} def example_payload(self) -> Any: - """Returns an example payload for the component's API.""" + """ + Returns an example payload for the component's API. + """ return {"seed": 12345} \ No newline at end of file diff --git a/src/backend/gradio_propertysheet/templates/component/index.js b/src/backend/gradio_propertysheet/templates/component/index.js index b17c2877ea584a81440f9f8b7cfcc276b469246e..40fc1b51a778057185120f414afe6d7c598ecbe2 100644 --- a/src/backend/gradio_propertysheet/templates/component/index.js +++ b/src/backend/gradio_propertysheet/templates/component/index.js @@ -1,72 +1,72 @@ -var Pl = Object.defineProperty; -var Ci = (i) => { +var Ml = Object.defineProperty; +var Si = (i) => { throw TypeError(i); }; -var zl = (i, e, t) => e in i ? Pl(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t; -var Q = (i, e, t) => zl(i, typeof e != "symbol" ? e + "" : e, t), Ul = (i, e, t) => e.has(i) || Ci("Cannot " + t); -var Si = (i, e, t) => e.has(i) ? Ci("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t); -var an = (i, e, t) => (Ul(i, e, "access private method"), t); +var Pl = (i, e, t) => e in i ? Ml(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t; +var Q = (i, e, t) => Pl(i, typeof e != "symbol" ? e + "" : e, t), Ul = (i, e, t) => e.has(i) || Si("Cannot " + t); +var Ti = (i, e, t) => e.has(i) ? Si("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t); +var cn = (i, e, t) => (Ul(i, e, "access private method"), t); const { SvelteComponent: Hl, - append_hydration: Gn, + append_hydration: Yn, assign: Gl, - attr: ge, + attr: De, binding_callbacks: jl, - children: Gt, - claim_element: Ua, - claim_space: Ha, - claim_svg_element: Rn, + children: Xt, + claim_element: Ha, + claim_space: Ga, + claim_svg_element: qn, create_slot: Vl, - detach: Ke, - element: Ga, - empty: Ti, + detach: et, + element: ja, + empty: Bi, get_all_dirty_from_scope: Wl, get_slot_changes: Zl, get_spread_update: Yl, init: Xl, - insert_hydration: Yt, + insert_hydration: tn, listen: Kl, noop: Ql, safe_not_equal: Jl, - set_dynamic_element_data: Bi, + set_dynamic_element_data: Ri, set_style: V, - space: ja, - svg_element: In, - toggle_class: _e, - transition_in: Va, - transition_out: Wa, + space: Va, + svg_element: Nn, + toggle_class: fe, + transition_in: Wa, + transition_out: Za, update_slot_base: eo } = window.__gradio__svelte__internal; -function Ri(i) { +function Ii(i) { let e, t, n, a, o; return { c() { - e = In("svg"), t = In("line"), n = In("line"), this.h(); + e = Nn("svg"), t = Nn("line"), n = Nn("line"), this.h(); }, l(l) { - e = Rn(l, "svg", { class: !0, xmlns: !0, viewBox: !0 }); - var r = Gt(e); - t = Rn(r, "line", { + e = qn(l, "svg", { class: !0, xmlns: !0, viewBox: !0 }); + var r = Xt(e); + t = qn(r, "line", { x1: !0, y1: !0, x2: !0, y2: !0, stroke: !0, "stroke-width": !0 - }), Gt(t).forEach(Ke), n = Rn(r, "line", { + }), Xt(t).forEach(et), n = qn(r, "line", { x1: !0, y1: !0, x2: !0, y2: !0, stroke: !0, "stroke-width": !0 - }), Gt(n).forEach(Ke), r.forEach(Ke), this.h(); + }), Xt(n).forEach(et), r.forEach(et), this.h(); }, h() { - ge(t, "x1", "1"), ge(t, "y1", "9"), ge(t, "x2", "9"), ge(t, "y2", "1"), ge(t, "stroke", "gray"), ge(t, "stroke-width", "0.5"), ge(n, "x1", "5"), ge(n, "y1", "9"), ge(n, "x2", "9"), ge(n, "y2", "5"), ge(n, "stroke", "gray"), ge(n, "stroke-width", "0.5"), ge(e, "class", "resize-handle svelte-239wnu"), ge(e, "xmlns", "http://www.w3.org/2000/svg"), ge(e, "viewBox", "0 0 10 10"); + De(t, "x1", "1"), De(t, "y1", "9"), De(t, "x2", "9"), De(t, "y2", "1"), De(t, "stroke", "gray"), De(t, "stroke-width", "0.5"), De(n, "x1", "5"), De(n, "y1", "9"), De(n, "x2", "9"), De(n, "y2", "5"), De(n, "stroke", "gray"), De(n, "stroke-width", "0.5"), De(e, "class", "resize-handle svelte-239wnu"), De(e, "xmlns", "http://www.w3.org/2000/svg"), De(e, "viewBox", "0 0 10 10"); }, m(l, r) { - Yt(l, e, r), Gn(e, t), Gn(e, n), a || (o = Kl( + tn(l, e, r), Yn(e, t), Yn(e, n), a || (o = Kl( e, "mousedown", /*resize*/ @@ -75,12 +75,12 @@ function Ri(i) { }, p: Ql, d(l) { - l && Ke(e), a = !1, o(); + l && et(e), a = !1, o(); } }; } function to(i) { - var m; + var h; let e, t, n, a, o; const l = ( /*#slots*/ @@ -94,8 +94,8 @@ function to(i) { ); let s = ( /*resizable*/ - i[19] && Ri(i) - ), c = [ + i[19] && Ii(i) + ), u = [ { "data-testid": ( /*test_id*/ i[11] @@ -106,24 +106,24 @@ function to(i) { ) }, { class: n = "block " + /*elem_classes*/ - (((m = i[7]) == null ? void 0 : m.join(" ")) || "") + " svelte-239wnu" + (((h = i[7]) == null ? void 0 : h.join(" ")) || "") + " svelte-239wnu" }, { dir: a = /*rtl*/ i[20] ? "rtl" : "ltr" } - ], u = {}; - for (let d = 0; d < c.length; d += 1) - u = Gl(u, c[d]); + ], c = {}; + for (let d = 0; d < u.length; d += 1) + c = Gl(c, u[d]); return { c() { - e = Ga( + e = ja( /*tag*/ i[25] - ), r && r.c(), t = ja(), s && s.c(), this.h(); + ), r && r.c(), t = Va(), s && s.c(), this.h(); }, l(d) { - e = Ua( + e = Ha( d, /*tag*/ (i[25] || "null").toUpperCase(), @@ -134,52 +134,52 @@ function to(i) { dir: !0 } ); - var f = Gt(e); - r && r.l(f), t = Ha(f), s && s.l(f), f.forEach(Ke), this.h(); + var f = Xt(e); + r && r.l(f), t = Ga(f), s && s.l(f), f.forEach(et), this.h(); }, h() { - Bi( + Ri( /*tag*/ i[25] - )(e, u), _e( + )(e, c), fe( e, "hidden", /*visible*/ i[14] === !1 - ), _e( + ), fe( e, "padded", /*padding*/ i[10] - ), _e( + ), fe( e, "flex", /*flex*/ i[1] - ), _e( + ), fe( e, "border_focus", /*border_mode*/ i[9] === "focus" - ), _e( + ), fe( e, "border_contrast", /*border_mode*/ i[9] === "contrast" - ), _e(e, "hide-container", !/*explicit_call*/ + ), fe(e, "hide-container", !/*explicit_call*/ i[12] && !/*container*/ - i[13]), _e( + i[13]), fe( e, "fullscreen", /*fullscreen*/ i[0] - ), _e( + ), fe( e, "animating", /*fullscreen*/ i[0] && /*preexpansionBoundingRect*/ i[24] !== null - ), _e( + ), fe( e, "auto-margin", /*scale*/ @@ -276,7 +276,7 @@ function to(i) { i[18]}px, 100%))`), V(e, "border-width", "var(--block-border-width)"); }, m(d, f) { - Yt(d, e, f), r && r.m(e, null), Gn(e, t), s && s.m(e, null), i[32](e), o = !0; + tn(d, e, f), r && r.m(e, null), Yn(e, t), s && s.m(e, null), i[32](e), o = !0; }, p(d, f) { var v; @@ -299,10 +299,10 @@ function to(i) { ), null ), /*resizable*/ - d[19] ? s ? s.p(d, f) : (s = Ri(d), s.c(), s.m(e, null)) : s && (s.d(1), s = null), Bi( + d[19] ? s ? s.p(d, f) : (s = Ii(d), s.c(), s.m(e, null)) : s && (s.d(1), s = null), Ri( /*tag*/ d[25] - )(e, u = Yl(c, [ + )(e, c = Yl(u, [ (!o || f[0] & /*test_id*/ 2048) && { "data-testid": ( /*test_id*/ @@ -319,45 +319,45 @@ function to(i) { (!o || f[0] & /*rtl*/ 1048576 && a !== (a = /*rtl*/ d[20] ? "rtl" : "ltr")) && { dir: a } - ])), _e( + ])), fe( e, "hidden", /*visible*/ d[14] === !1 - ), _e( + ), fe( e, "padded", /*padding*/ d[10] - ), _e( + ), fe( e, "flex", /*flex*/ d[1] - ), _e( + ), fe( e, "border_focus", /*border_mode*/ d[9] === "focus" - ), _e( + ), fe( e, "border_contrast", /*border_mode*/ d[9] === "contrast" - ), _e(e, "hide-container", !/*explicit_call*/ + ), fe(e, "hide-container", !/*explicit_call*/ d[12] && !/*container*/ - d[13]), _e( + d[13]), fe( e, "fullscreen", /*fullscreen*/ d[0] - ), _e( + ), fe( e, "animating", /*fullscreen*/ d[0] && /*preexpansionBoundingRect*/ d[24] !== null - ), _e( + ), fe( e, "auto-margin", /*scale*/ @@ -466,27 +466,27 @@ function to(i) { d[18]}px, 100%))`); }, i(d) { - o || (Va(r, d), o = !0); + o || (Wa(r, d), o = !0); }, o(d) { - Wa(r, d), o = !1; + Za(r, d), o = !1; }, d(d) { - d && Ke(e), r && r.d(d), s && s.d(), i[32](null); + d && et(e), r && r.d(d), s && s.d(), i[32](null); } }; } -function Ii(i) { +function Li(i) { let e; return { c() { - e = Ga("div"), this.h(); + e = ja("div"), this.h(); }, l(t) { - e = Ua(t, "DIV", { class: !0 }), Gt(e).forEach(Ke), this.h(); + e = Ha(t, "DIV", { class: !0 }), Xt(e).forEach(et), this.h(); }, h() { - ge(e, "class", "placeholder svelte-239wnu"), V( + De(e, "class", "placeholder svelte-239wnu"), V( e, "height", /*placeholder_height*/ @@ -499,7 +499,7 @@ function Ii(i) { ); }, m(t, n) { - Yt(t, e, n); + tn(t, e, n); }, p(t, n) { n[0] & /*placeholder_height*/ @@ -517,7 +517,7 @@ function Ii(i) { ); }, d(t) { - t && Ke(e); + t && et(e); } }; } @@ -527,101 +527,101 @@ function no(i) { i[25] && to(i) ), o = ( /*fullscreen*/ - i[0] && Ii(i) + i[0] && Li(i) ); return { c() { - a && a.c(), e = ja(), o && o.c(), t = Ti(); + a && a.c(), e = Va(), o && o.c(), t = Bi(); }, l(l) { - a && a.l(l), e = Ha(l), o && o.l(l), t = Ti(); + a && a.l(l), e = Ga(l), o && o.l(l), t = Bi(); }, m(l, r) { - a && a.m(l, r), Yt(l, e, r), o && o.m(l, r), Yt(l, t, r), n = !0; + a && a.m(l, r), tn(l, e, r), o && o.m(l, r), tn(l, t, r), n = !0; }, p(l, r) { /*tag*/ l[25] && a.p(l, r), /*fullscreen*/ - l[0] ? o ? o.p(l, r) : (o = Ii(l), o.c(), o.m(t.parentNode, t)) : o && (o.d(1), o = null); + l[0] ? o ? o.p(l, r) : (o = Li(l), o.c(), o.m(t.parentNode, t)) : o && (o.d(1), o = null); }, i(l) { - n || (Va(a, l), n = !0); + n || (Wa(a, l), n = !0); }, o(l) { - Wa(a, l), n = !1; + Za(a, l), n = !1; }, d(l) { - l && (Ke(e), Ke(t)), a && a.d(l), o && o.d(l); + l && (et(e), et(t)), a && a.d(l), o && o.d(l); } }; } function io(i, e, t) { - let { $$slots: n = {}, $$scope: a } = e, { height: o = void 0 } = e, { min_height: l = void 0 } = e, { max_height: r = void 0 } = e, { width: s = void 0 } = e, { elem_id: c = "" } = e, { elem_classes: u = [] } = e, { variant: m = "solid" } = e, { border_mode: d = "base" } = e, { padding: f = !0 } = e, { type: v = "normal" } = e, { test_id: D = void 0 } = e, { explicit_call: b = !1 } = e, { container: E = !0 } = e, { visible: h = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: g = "auto" } = e, { scale: y = null } = e, { min_width: $ = 0 } = e, { flex: C = !1 } = e, { resizable: R = !1 } = e, { rtl: S = !1 } = e, { fullscreen: N = !1 } = e, O = N, H, Ae = v === "fieldset" ? "fieldset" : "div", W = 0, ve = 0, oe = null; - function Be(w) { - N && w.key === "Escape" && t(0, N = !1); - } - const K = (w) => { - if (w !== void 0) { - if (typeof w == "number") - return w + "px"; - if (typeof w == "string") - return w; + let { $$slots: n = {}, $$scope: a } = e, { height: o = void 0 } = e, { min_height: l = void 0 } = e, { max_height: r = void 0 } = e, { width: s = void 0 } = e, { elem_id: u = "" } = e, { elem_classes: c = [] } = e, { variant: h = "solid" } = e, { border_mode: d = "base" } = e, { padding: f = !0 } = e, { type: v = "normal" } = e, { test_id: D = void 0 } = e, { explicit_call: b = !1 } = e, { container: E = !0 } = e, { visible: m = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: g = "auto" } = e, { scale: F = null } = e, { min_width: w = 0 } = e, { flex: C = !1 } = e, { resizable: I = !1 } = e, { rtl: S = !1 } = e, { fullscreen: O = !1 } = e, q = O, H, ke = v === "fieldset" ? "fieldset" : "div", re = 0, ae = 0, se = null; + function Se($) { + O && $.key === "Escape" && t(0, O = !1); + } + const K = ($) => { + if ($ !== void 0) { + if (typeof $ == "number") + return $ + "px"; + if (typeof $ == "string") + return $; } - }, re = (w) => { - let le = w.clientY; + }, ue = ($) => { + let le = $.clientY; const X = (A) => { - const we = A.clientY - le; - le = A.clientY, t(21, H.style.height = `${H.offsetHeight + we}px`, H); - }, ue = () => { - window.removeEventListener("mousemove", X), window.removeEventListener("mouseup", ue); + const Ee = A.clientY - le; + le = A.clientY, t(21, H.style.height = `${H.offsetHeight + Ee}px`, H); + }, _e = () => { + window.removeEventListener("mousemove", X), window.removeEventListener("mouseup", _e); }; - window.addEventListener("mousemove", X), window.addEventListener("mouseup", ue); + window.addEventListener("mousemove", X), window.addEventListener("mouseup", _e); }; - function fe(w) { - jl[w ? "unshift" : "push"](() => { - H = w, t(21, H); + function he($) { + jl[$ ? "unshift" : "push"](() => { + H = $, t(21, H); }); } - return i.$$set = (w) => { - "height" in w && t(2, o = w.height), "min_height" in w && t(3, l = w.min_height), "max_height" in w && t(4, r = w.max_height), "width" in w && t(5, s = w.width), "elem_id" in w && t(6, c = w.elem_id), "elem_classes" in w && t(7, u = w.elem_classes), "variant" in w && t(8, m = w.variant), "border_mode" in w && t(9, d = w.border_mode), "padding" in w && t(10, f = w.padding), "type" in w && t(28, v = w.type), "test_id" in w && t(11, D = w.test_id), "explicit_call" in w && t(12, b = w.explicit_call), "container" in w && t(13, E = w.container), "visible" in w && t(14, h = w.visible), "allow_overflow" in w && t(15, _ = w.allow_overflow), "overflow_behavior" in w && t(16, g = w.overflow_behavior), "scale" in w && t(17, y = w.scale), "min_width" in w && t(18, $ = w.min_width), "flex" in w && t(1, C = w.flex), "resizable" in w && t(19, R = w.resizable), "rtl" in w && t(20, S = w.rtl), "fullscreen" in w && t(0, N = w.fullscreen), "$$scope" in w && t(30, a = w.$$scope); + return i.$$set = ($) => { + "height" in $ && t(2, o = $.height), "min_height" in $ && t(3, l = $.min_height), "max_height" in $ && t(4, r = $.max_height), "width" in $ && t(5, s = $.width), "elem_id" in $ && t(6, u = $.elem_id), "elem_classes" in $ && t(7, c = $.elem_classes), "variant" in $ && t(8, h = $.variant), "border_mode" in $ && t(9, d = $.border_mode), "padding" in $ && t(10, f = $.padding), "type" in $ && t(28, v = $.type), "test_id" in $ && t(11, D = $.test_id), "explicit_call" in $ && t(12, b = $.explicit_call), "container" in $ && t(13, E = $.container), "visible" in $ && t(14, m = $.visible), "allow_overflow" in $ && t(15, _ = $.allow_overflow), "overflow_behavior" in $ && t(16, g = $.overflow_behavior), "scale" in $ && t(17, F = $.scale), "min_width" in $ && t(18, w = $.min_width), "flex" in $ && t(1, C = $.flex), "resizable" in $ && t(19, I = $.resizable), "rtl" in $ && t(20, S = $.rtl), "fullscreen" in $ && t(0, O = $.fullscreen), "$$scope" in $ && t(30, a = $.$$scope); }, i.$$.update = () => { i.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/ - 538968065 && N !== O && (t(29, O = N), N ? (t(24, oe = H.getBoundingClientRect()), t(22, W = H.offsetHeight), t(23, ve = H.offsetWidth), window.addEventListener("keydown", Be)) : (t(24, oe = null), window.removeEventListener("keydown", Be))), i.$$.dirty[0] & /*visible*/ - 16384 && (h || t(1, C = !1)); + 538968065 && O !== q && (t(29, q = O), O ? (t(24, se = H.getBoundingClientRect()), t(22, re = H.offsetHeight), t(23, ae = H.offsetWidth), window.addEventListener("keydown", Se)) : (t(24, se = null), window.removeEventListener("keydown", Se))), i.$$.dirty[0] & /*visible*/ + 16384 && (m || t(1, C = !1)); }, [ - N, + O, C, o, l, r, s, - c, u, - m, + c, + h, d, f, D, b, E, - h, + m, _, g, - y, - $, - R, + F, + w, + I, S, H, - W, - ve, - oe, - Ae, - K, re, + ae, + se, + ke, + K, + ue, v, - O, + q, a, n, - fe + he ]; } class ao extends Hl { @@ -661,7 +661,7 @@ class ao extends Hl { ); } } -function ii() { +function si() { return { async: !1, breaks: !1, @@ -675,23 +675,23 @@ function ii() { walkTokens: null }; } -let wt = ii(); -function Za(i) { - wt = i; +let Tt = si(); +function Ya(i) { + Tt = i; } -const Ya = /[&<>"']/, lo = new RegExp(Ya.source, "g"), Xa = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, oo = new RegExp(Xa.source, "g"), ro = { +const Xa = /[&<>"']/, lo = new RegExp(Xa.source, "g"), Ka = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, oo = new RegExp(Ka.source, "g"), ro = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" -}, Li = (i) => ro[i]; -function Te(i, e) { +}, xi = (i) => ro[i]; +function Be(i, e) { if (e) { - if (Ya.test(i)) - return i.replace(lo, Li); - } else if (Xa.test(i)) - return i.replace(oo, Li); + if (Xa.test(i)) + return i.replace(lo, xi); + } else if (Ka.test(i)) + return i.replace(oo, xi); return i; } const so = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig; @@ -711,7 +711,7 @@ function Y(i, e) { }; return n; } -function xi(i) { +function Oi(i) { try { i = encodeURI(i).replace(/%25/g, "%"); } catch { @@ -719,11 +719,11 @@ function xi(i) { } return i; } -const jt = { exec: () => null }; -function Oi(i, e) { +const Kt = { exec: () => null }; +function qi(i, e) { const t = i.replace(/\|/g, (o, l, r) => { - let s = !1, c = l; - for (; --c >= 0 && r[c] === "\\"; ) + let s = !1, u = l; + for (; --u >= 0 && r[u] === "\\"; ) s = !s; return s ? "|" : " |"; }), n = t.split(/ \|/); @@ -738,7 +738,7 @@ function Oi(i, e) { n[a] = n[a].trim().replace(/\\\|/g, "|"); return n; } -function ln(i, e, t) { +function _n(i, e, t) { const n = i.length; if (n === 0) return ""; @@ -760,8 +760,8 @@ function _o(i, e) { return n; return -1; } -function qi(i, e, t, n) { - const a = e.href, o = e.title ? Te(e.title) : null, l = i[1].replace(/\\([\[\]])/g, "$1"); +function Ni(i, e, t, n) { + const a = e.href, o = e.title ? Be(e.title) : null, l = i[1].replace(/\\([\[\]])/g, "$1"); if (i[0].charAt(0) !== "!") { n.state.inLink = !0; const r = { @@ -779,7 +779,7 @@ function qi(i, e, t, n) { raw: t, href: a, title: o, - text: Te(l) + text: Be(l) }; } function fo(i, e) { @@ -797,14 +797,14 @@ function fo(i, e) { }).join(` `); } -class vn { +class $n { // set by the lexer constructor(e) { Q(this, "options"); Q(this, "rules"); // set by the lexer Q(this, "lexer"); - this.options = e || wt; + this.options = e || Tt; } space(e) { const t = this.rules.block.newline.exec(e); @@ -822,7 +822,7 @@ class vn { type: "code", raw: t[0], codeBlockStyle: "indented", - text: this.options.pedantic ? n : ln(n, ` + text: this.options.pedantic ? n : _n(n, ` `) }; } @@ -844,7 +844,7 @@ class vn { if (t) { let n = t[2].trim(); if (/#$/.test(n)) { - const a = ln(n, "#"); + const a = _n(n, "#"); (this.options.pedantic || !a || / $/.test(a)) && (n = a.trim()); } return { @@ -869,7 +869,7 @@ class vn { if (t) { let n = t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, ` $1`); - n = ln(n.replace(/^ *>[ \t]?/gm, ""), ` + n = _n(n.replace(/^ *>[ \t]?/gm, ""), ` `); const a = this.lexer.state.top; this.lexer.state.top = !0; @@ -896,39 +896,39 @@ class vn { }; n = a ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = a ? n : "[*+-]"); const l = new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`); - let r = "", s = "", c = !1; + let r = "", s = "", u = !1; for (; e; ) { - let u = !1; + let c = !1; if (!(t = l.exec(e)) || this.rules.block.hr.test(e)) break; r = t[0], e = e.substring(r.length); - let m = t[2].split(` + let h = t[2].split(` `, 1)[0].replace(/^\t+/, (E) => " ".repeat(3 * E.length)), d = e.split(` `, 1)[0], f = 0; - this.options.pedantic ? (f = 2, s = m.trimStart()) : (f = t[2].search(/[^ ]/), f = f > 4 ? 1 : f, s = m.slice(f), f += t[1].length); + this.options.pedantic ? (f = 2, s = h.trimStart()) : (f = t[2].search(/[^ ]/), f = f > 4 ? 1 : f, s = h.slice(f), f += t[1].length); let v = !1; - if (!m && /^ *$/.test(d) && (r += d + ` -`, e = e.substring(d.length + 1), u = !0), !u) { - const E = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), h = new RegExp(`^ {0,${Math.min(3, f - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:\`\`\`|~~~)`), g = new RegExp(`^ {0,${Math.min(3, f - 1)}}#`); + if (!h && /^ *$/.test(d) && (r += d + ` +`, e = e.substring(d.length + 1), c = !0), !c) { + const E = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), m = new RegExp(`^ {0,${Math.min(3, f - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:\`\`\`|~~~)`), g = new RegExp(`^ {0,${Math.min(3, f - 1)}}#`); for (; e; ) { - const y = e.split(` + const F = e.split(` `, 1)[0]; - if (d = y, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || g.test(d) || E.test(d) || h.test(e)) + if (d = F, this.options.pedantic && (d = d.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(d) || g.test(d) || E.test(d) || m.test(e)) break; if (d.search(/[^ ]/) >= f || !d.trim()) s += ` ` + d.slice(f); else { - if (v || m.search(/[^ ]/) >= 4 || _.test(m) || g.test(m) || h.test(m)) + if (v || h.search(/[^ ]/) >= 4 || _.test(h) || g.test(h) || m.test(h)) break; s += ` ` + d; } - !v && !d.trim() && (v = !0), r += y + ` -`, e = e.substring(y.length + 1), m = d.slice(f); + !v && !d.trim() && (v = !0), r += F + ` +`, e = e.substring(F.length + 1), h = d.slice(f); } } - o.loose || (c ? o.loose = !0 : /\n *\n *$/.test(r) && (c = !0)); + o.loose || (u ? o.loose = !0 : /\n *\n *$/.test(r) && (u = !0)); let D = null, b; this.options.gfm && (D = /^\[[ xX]\] /.exec(s), D && (b = D[0] !== "[ ] ", s = s.replace(/^\[[ xX]\] +/, ""))), o.items.push({ type: "list_item", @@ -941,14 +941,14 @@ class vn { }), o.raw += r; } o.items[o.items.length - 1].raw = r.trimEnd(), o.items[o.items.length - 1].text = s.trimEnd(), o.raw = o.raw.trimEnd(); - for (let u = 0; u < o.items.length; u++) - if (this.lexer.state.top = !1, o.items[u].tokens = this.lexer.blockTokens(o.items[u].text, []), !o.loose) { - const m = o.items[u].tokens.filter((f) => f.type === "space"), d = m.length > 0 && m.some((f) => /\n.*\n/.test(f.raw)); + for (let c = 0; c < o.items.length; c++) + if (this.lexer.state.top = !1, o.items[c].tokens = this.lexer.blockTokens(o.items[c].text, []), !o.loose) { + const h = o.items[c].tokens.filter((f) => f.type === "space"), d = h.length > 0 && h.some((f) => /\n.*\n/.test(f.raw)); o.loose = d; } if (o.loose) - for (let u = 0; u < o.items.length; u++) - o.items[u].loose = !0; + for (let c = 0; c < o.items.length; c++) + o.items[c].loose = !0; return o; } } @@ -980,7 +980,7 @@ class vn { const t = this.rules.block.table.exec(e); if (!t || !/[:|]/.test(t[2])) return; - const n = Oi(t[1]), a = t[2].replace(/^\||\| *$/g, "").split("|"), o = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(` + const n = qi(t[1]), a = t[2].replace(/^\||\| *$/g, "").split("|"), o = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(` `) : [], l = { type: "table", raw: t[0], @@ -997,7 +997,7 @@ class vn { tokens: this.lexer.inline(r) }); for (const r of o) - l.rows.push(Oi(r, l.header.length).map((s) => ({ + l.rows.push(qi(r, l.header.length).map((s) => ({ text: s, tokens: this.lexer.inline(s) }))); @@ -1044,7 +1044,7 @@ class vn { return { type: "escape", raw: t[0], - text: Te(t[1]) + text: Be(t[1]) }; } tag(e) { @@ -1066,7 +1066,7 @@ class vn { if (!this.options.pedantic && /^$/.test(n)) return; - const l = ln(n.slice(0, -1), "\\"); + const l = _n(n.slice(0, -1), "\\"); if ((n.length - l.length) % 2 === 0) return; } else { @@ -1082,7 +1082,7 @@ class vn { l && (a = l[1], o = l[3]); } else o = t[3] ? t[3].slice(1, -1) : ""; - return a = a.trim(), /^$/.test(n) ? a = a.slice(1) : a = a.slice(1, -1)), qi(t, { + return a = a.trim(), /^$/.test(n) ? a = a.slice(1) : a = a.slice(1, -1)), Ni(t, { href: a && a.replace(this.rules.inline.anyPunctuation, "$1"), title: o && o.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer); @@ -1100,7 +1100,7 @@ class vn { text: l }; } - return qi(n, o, n[0], this.lexer); + return Ni(n, o, n[0], this.lexer); } } emStrong(e, t, n = "") { @@ -1109,21 +1109,21 @@ class vn { return; if (!(a[1] || a[2] || "") || !n || this.rules.inline.punctuation.exec(n)) { const l = [...a[0]].length - 1; - let r, s, c = l, u = 0; - const m = a[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; - for (m.lastIndex = 0, t = t.slice(-1 * e.length + l); (a = m.exec(t)) != null; ) { + let r, s, u = l, c = 0; + const h = a[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; + for (h.lastIndex = 0, t = t.slice(-1 * e.length + l); (a = h.exec(t)) != null; ) { if (r = a[1] || a[2] || a[3] || a[4] || a[5] || a[6], !r) continue; if (s = [...r].length, a[3] || a[4]) { - c += s; + u += s; continue; } else if ((a[5] || a[6]) && l % 3 && !((l + s) % 3)) { - u += s; + c += s; continue; } - if (c -= s, c > 0) + if (u -= s, u > 0) continue; - s = Math.min(s, s + c + u); + s = Math.min(s, s + u + c); const d = [...a[0]][0].length, f = e.slice(0, l + a.index + d + s); if (Math.min(l, s) % 2) { const D = f.slice(1, -1); @@ -1149,7 +1149,7 @@ class vn { if (t) { let n = t[2].replace(/\n/g, " "); const a = /[^ ]/.test(n), o = /^ /.test(n) && / $/.test(n); - return a && o && (n = n.substring(1, n.length - 1)), n = Te(n, !0), { + return a && o && (n = n.substring(1, n.length - 1)), n = Be(n, !0), { type: "codespan", raw: t[0], text: n @@ -1178,7 +1178,7 @@ class vn { const t = this.rules.inline.autolink.exec(e); if (t) { let n, a; - return t[2] === "@" ? (n = Te(t[1]), a = "mailto:" + n) : (n = Te(t[1]), a = n), { + return t[2] === "@" ? (n = Be(t[1]), a = "mailto:" + n) : (n = Be(t[1]), a = n), { type: "link", raw: t[0], text: n, @@ -1199,13 +1199,13 @@ class vn { if (t = this.rules.inline.url.exec(e)) { let a, o; if (t[2] === "@") - a = Te(t[0]), o = "mailto:" + a; + a = Be(t[0]), o = "mailto:" + a; else { let l; do l = t[0], t[0] = ((n = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : n[0]) ?? ""; while (l !== t[0]); - a = Te(t[0]), t[1] === "www." ? o = "http://" + t[0] : o = t[0]; + a = Be(t[0]), t[1] === "www." ? o = "http://" + t[0] : o = t[0]; } return { type: "link", @@ -1226,7 +1226,7 @@ class vn { const t = this.rules.inline.text.exec(e); if (t) { let n; - return this.lexer.state.inRawBlock ? n = t[0] : n = Te(t[0]), { + return this.lexer.state.inRawBlock ? n = t[0] : n = Be(t[0]), { type: "text", raw: t[0], text: n @@ -1234,118 +1234,118 @@ class vn { } } } -const po = /^(?: *(?:\n|$))+/, ho = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, mo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Xt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, go = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ka = /(?:[*+-]|\d{1,9}[.)])/, Qa = Y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Ka).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), ai = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, vo = /^[^\n]+/, li = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Do = Y(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", li).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), bo = Y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ka).getRegex(), wn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", oi = /|$))/, yo = Y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", oi).replace("tag", wn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ja = Y(ai).replace("hr", Xt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", wn).getRegex(), Fo = Y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ja).getRegex(), ri = { +const po = /^(?: *(?:\n|$))+/, ho = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, mo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, nn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, go = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Qa = /(?:[*+-]|\d{1,9}[.)])/, Ja = Y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Qa).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), ui = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, vo = /^[^\n]+/, ci = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Do = Y(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", ci).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), bo = Y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Qa).getRegex(), Tn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", _i = /|$))/, yo = Y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", _i).replace("tag", Tn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), el = Y(ui).replace("hr", nn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Tn).getRegex(), Fo = Y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", el).getRegex(), di = { blockquote: Fo, code: ho, def: Do, fences: mo, heading: go, - hr: Xt, + hr: nn, html: yo, - lheading: Qa, + lheading: Ja, list: bo, newline: po, - paragraph: Ja, - table: jt, + paragraph: el, + table: Kt, text: vo -}, Ni = Y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Xt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", wn).getRegex(), $o = { - ...ri, - table: Ni, - paragraph: Y(ai).replace("hr", Xt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ni).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", wn).getRegex() -}, wo = { - ...ri, - html: Y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", oi).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), +}, zi = Y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", nn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Tn).getRegex(), wo = { + ...di, + table: zi, + paragraph: Y(ui).replace("hr", nn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", zi).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", Tn).getRegex() +}, $o = { + ...di, + html: Y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", _i).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, - fences: jt, + fences: Kt, // fences not supported lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, - paragraph: Y(ai).replace("hr", Xt).replace("heading", ` *#{1,6} *[^ -]`).replace("lheading", Qa).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() -}, el = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ko = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, tl = /^( {2,}|\\)\n(?!\s*$)/, Eo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, So = Y(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Kt).getRegex(), To = Y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Kt).getRegex(), Bo = Y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Kt).getRegex(), Ro = Y(/\\([punct])/, "gu").replace(/punct/g, Kt).getRegex(), Io = Y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Lo = Y(oi).replace("(?:-->|$)", "-->").getRegex(), xo = Y("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", Lo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Dn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Oo = Y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Dn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), nl = Y(/^!?\[(label)\]\[(ref)\]/).replace("label", Dn).replace("ref", li).getRegex(), il = Y(/^!?\[(ref)\](?:\[\])?/).replace("ref", li).getRegex(), qo = Y("reflink|nolink(?!\\()", "g").replace("reflink", nl).replace("nolink", il).getRegex(), si = { - _backpedal: jt, + paragraph: Y(ui).replace("hr", nn).replace("heading", ` *#{1,6} *[^ +]`).replace("lheading", Ja).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() +}, tl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ko = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, nl = /^( {2,}|\\)\n(?!\s*$)/, Eo = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, So = Y(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, an).getRegex(), To = Y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, an).getRegex(), Bo = Y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, an).getRegex(), Ro = Y(/\\([punct])/, "gu").replace(/punct/g, an).getRegex(), Io = Y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Lo = Y(_i).replace("(?:-->|$)", "-->").getRegex(), xo = Y("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", Lo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Oo = Y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", kn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), il = Y(/^!?\[(label)\]\[(ref)\]/).replace("label", kn).replace("ref", ci).getRegex(), al = Y(/^!?\[(ref)\](?:\[\])?/).replace("ref", ci).getRegex(), qo = Y("reflink|nolink(?!\\()", "g").replace("reflink", il).replace("nolink", al).getRegex(), fi = { + _backpedal: Kt, // only used for GFM url anyPunctuation: Ro, autolink: Io, blockSkip: Co, - br: tl, + br: nl, code: ko, - del: jt, + del: Kt, emStrongLDelim: So, emStrongRDelimAst: To, emStrongRDelimUnd: Bo, - escape: el, + escape: tl, link: Oo, - nolink: il, + nolink: al, punctuation: Ao, - reflink: nl, + reflink: il, reflinkSearch: qo, tag: xo, text: Eo, - url: jt + url: Kt }, No = { - ...si, - link: Y(/^!?\[(label)\]\((.*?)\)/).replace("label", Dn).getRegex(), - reflink: Y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Dn).getRegex() -}, jn = { - ...si, - escape: Y(el).replace("])", "~|])").getRegex(), + ...fi, + link: Y(/^!?\[(label)\]\((.*?)\)/).replace("label", kn).getRegex(), + reflink: Y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kn).getRegex() +}, Xn = { + ...fi, + escape: Y(tl).replace("])", "~|])").getRegex(), url: Y(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ s + " ".repeat(c.length)); + this.options.pedantic ? e = e.replace(/\t/g, " ").replace(/^ +$/gm, "") : e = e.replace(/^( *)(\t+)/gm, (r, s, u) => s + " ".repeat(u.length)); let n, a, o, l; for (; e; ) if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((r) => (n = r.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) { @@ -1419,9 +1419,9 @@ class Qe { if (o = e, this.options.extensions && this.options.extensions.startBlock) { let r = 1 / 0; const s = e.slice(1); - let c; - this.options.extensions.startBlock.forEach((u) => { - c = u.call({ lexer: this }, s), typeof c == "number" && c >= 0 && (r = Math.min(r, c)); + let u; + this.options.extensions.startBlock.forEach((c) => { + u = c.call({ lexer: this }, s), typeof u == "number" && u >= 0 && (r = Math.min(r, u)); }), r < 1 / 0 && r >= 0 && (o = e.substring(0, r + 1)); } if (this.state.top && (n = this.tokenizer.paragraph(o))) { @@ -1454,19 +1454,19 @@ class Qe { * Lexing/Compiling */ inlineTokens(e, t = []) { - let n, a, o, l = e, r, s, c; + let n, a, o, l = e, r, s, u; if (this.tokens.links) { - const u = Object.keys(this.tokens.links); - if (u.length > 0) + const c = Object.keys(this.tokens.links); + if (c.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(l)) != null; ) - u.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (l = l.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); + c.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (l = l.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); } for (; (r = this.tokenizer.rules.inline.blockSkip.exec(l)) != null; ) l = l.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(l)) != null; ) l = l.slice(0, r.index) + "++" + l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex); for (; e; ) - if (s || (c = ""), s = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((u) => (n = u.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) { + if (s || (u = ""), s = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((c) => (n = c.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) { if (n = this.tokenizer.escape(e)) { e = e.substring(n.raw.length), t.push(n); continue; @@ -1483,7 +1483,7 @@ class Qe { e = e.substring(n.raw.length), a = t[t.length - 1], a && n.type === "text" && a.type === "text" ? (a.raw += n.raw, a.text += n.text) : t.push(n); continue; } - if (n = this.tokenizer.emStrong(e, l, c)) { + if (n = this.tokenizer.emStrong(e, l, u)) { e = e.substring(n.raw.length), t.push(n); continue; } @@ -1508,40 +1508,40 @@ class Qe { continue; } if (o = e, this.options.extensions && this.options.extensions.startInline) { - let u = 1 / 0; - const m = e.slice(1); + let c = 1 / 0; + const h = e.slice(1); let d; this.options.extensions.startInline.forEach((f) => { - d = f.call({ lexer: this }, m), typeof d == "number" && d >= 0 && (u = Math.min(u, d)); - }), u < 1 / 0 && u >= 0 && (o = e.substring(0, u + 1)); + d = f.call({ lexer: this }, h), typeof d == "number" && d >= 0 && (c = Math.min(c, d)); + }), c < 1 / 0 && c >= 0 && (o = e.substring(0, c + 1)); } if (n = this.tokenizer.inlineText(o)) { - e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (c = n.raw.slice(-1)), s = !0, a = t[t.length - 1], a && a.type === "text" ? (a.raw += n.raw, a.text += n.text) : t.push(n); + e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (u = n.raw.slice(-1)), s = !0, a = t[t.length - 1], a && a.type === "text" ? (a.raw += n.raw, a.text += n.text) : t.push(n); continue; } if (e) { - const u = "Infinite loop on byte: " + e.charCodeAt(0); + const c = "Infinite loop on byte: " + e.charCodeAt(0); if (this.options.silent) { - console.error(u); + console.error(c); break; } else - throw new Error(u); + throw new Error(c); } } return t; } } -class bn { +class En { constructor(e) { Q(this, "options"); - this.options = e || wt; + this.options = e || Tt; } code(e, t, n) { var o; const a = (o = (t || "").match(/^\S*/)) == null ? void 0 : o[0]; return e = e.replace(/\n$/, "") + ` -`, a ? '
' + (n ? e : Te(e, !0)) + `
-` : "
" + (n ? e : Te(e, !0)) + `
+`, a ? '
' + (n ? e : Be(e, !0)) + `
+` : "
" + (n ? e : Be(e, !0)) + `
`; } blockquote(e) { @@ -1613,7 +1613,7 @@ ${e} return `${e}`; } link(e, t, n) { - const a = xi(e); + const a = Oi(e); if (a === null) return n; e = a; @@ -1621,7 +1621,7 @@ ${e} return t && (o += ' title="' + t + '"'), o += ">" + n + "", o; } image(e, t, n) { - const a = xi(e); + const a = Oi(e); if (a === null) return n; e = a; @@ -1632,7 +1632,7 @@ ${e} return e; } } -class ui { +class pi { // no need for block level renderers strong(e) { return e; @@ -1662,24 +1662,24 @@ class ui { return ""; } } -class Je { +class nt { constructor(e) { Q(this, "options"); Q(this, "renderer"); Q(this, "textRenderer"); - this.options = e || wt, this.options.renderer = this.options.renderer || new bn(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new ui(); + this.options = e || Tt, this.options.renderer = this.options.renderer || new En(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new pi(); } /** * Static Parse Method */ static parse(e, t) { - return new Je(t).parse(e); + return new nt(t).parse(e); } /** * Static Parse Inline Method */ static parseInline(e, t) { - return new Je(t).parseInline(e); + return new nt(t).parseInline(e); } /** * Parse Loop @@ -1715,18 +1715,18 @@ class Je { case "table": { const l = o; let r = "", s = ""; - for (let u = 0; u < l.header.length; u++) - s += this.renderer.tablecell(this.parseInline(l.header[u].tokens), { header: !0, align: l.align[u] }); + for (let c = 0; c < l.header.length; c++) + s += this.renderer.tablecell(this.parseInline(l.header[c].tokens), { header: !0, align: l.align[c] }); r += this.renderer.tablerow(s); - let c = ""; - for (let u = 0; u < l.rows.length; u++) { - const m = l.rows[u]; + let u = ""; + for (let c = 0; c < l.rows.length; c++) { + const h = l.rows[c]; s = ""; - for (let d = 0; d < m.length; d++) - s += this.renderer.tablecell(this.parseInline(m[d].tokens), { header: !1, align: l.align[d] }); - c += this.renderer.tablerow(s); + for (let d = 0; d < h.length; d++) + s += this.renderer.tablecell(this.parseInline(h[d].tokens), { header: !1, align: l.align[d] }); + u += this.renderer.tablerow(s); } - n += this.renderer.table(r, c); + n += this.renderer.table(r, u); continue; } case "blockquote": { @@ -1735,21 +1735,21 @@ class Je { continue; } case "list": { - const l = o, r = l.ordered, s = l.start, c = l.loose; - let u = ""; - for (let m = 0; m < l.items.length; m++) { - const d = l.items[m], f = d.checked, v = d.task; + const l = o, r = l.ordered, s = l.start, u = l.loose; + let c = ""; + for (let h = 0; h < l.items.length; h++) { + const d = l.items[h], f = d.checked, v = d.task; let D = ""; if (d.task) { const b = this.renderer.checkbox(!!f); - c ? d.tokens.length > 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text = b + " " + d.tokens[0].text, d.tokens[0].tokens && d.tokens[0].tokens.length > 0 && d.tokens[0].tokens[0].type === "text" && (d.tokens[0].tokens[0].text = b + " " + d.tokens[0].tokens[0].text)) : d.tokens.unshift({ + u ? d.tokens.length > 0 && d.tokens[0].type === "paragraph" ? (d.tokens[0].text = b + " " + d.tokens[0].text, d.tokens[0].tokens && d.tokens[0].tokens.length > 0 && d.tokens[0].tokens[0].type === "text" && (d.tokens[0].tokens[0].text = b + " " + d.tokens[0].tokens[0].text)) : d.tokens.unshift({ type: "text", text: b + " " }) : D += b + " "; } - D += this.parse(d.tokens, c), u += this.renderer.listitem(D, v, !!f); + D += this.parse(d.tokens, u), c += this.renderer.listitem(D, v, !!f); } - n += this.renderer.list(u, r, s); + n += this.renderer.list(c, r, s); continue; } case "html": { @@ -1856,10 +1856,10 @@ class Je { return n; } } -class Vt { +class Qt { constructor(e) { Q(this, "options"); - this.options = e || wt; + this.options = e || Tt; } /** * Process markdown before marked @@ -1880,25 +1880,25 @@ class Vt { return e; } } -Q(Vt, "passThroughHooks", /* @__PURE__ */ new Set([ +Q(Qt, "passThroughHooks", /* @__PURE__ */ new Set([ "preprocess", "postprocess", "processAllTokens" ])); -var $t, Vn, al; -class Po { +var St, Kn, ll; +class Mo { constructor(...e) { - Si(this, $t); - Q(this, "defaults", ii()); + Ti(this, St); + Q(this, "defaults", si()); Q(this, "options", this.setOptions); - Q(this, "parse", an(this, $t, Vn).call(this, Qe.lex, Je.parse)); - Q(this, "parseInline", an(this, $t, Vn).call(this, Qe.lexInline, Je.parseInline)); - Q(this, "Parser", Je); - Q(this, "Renderer", bn); - Q(this, "TextRenderer", ui); - Q(this, "Lexer", Qe); - Q(this, "Tokenizer", vn); - Q(this, "Hooks", Vt); + Q(this, "parse", cn(this, St, Kn).call(this, tt.lex, nt.parse)); + Q(this, "parseInline", cn(this, St, Kn).call(this, tt.lexInline, nt.parseInline)); + Q(this, "Parser", nt); + Q(this, "Renderer", En); + Q(this, "TextRenderer", pi); + Q(this, "Lexer", tt); + Q(this, "Tokenizer", $n); + Q(this, "Hooks", Qt); this.use(...e); } /** @@ -1914,8 +1914,8 @@ class Po { for (const s of r.header) n = n.concat(this.walkTokens(s.tokens, t)); for (const s of r.rows) - for (const c of s) - n = n.concat(this.walkTokens(c.tokens, t)); + for (const u of s) + n = n.concat(this.walkTokens(u.tokens, t)); break; } case "list": { @@ -1926,8 +1926,8 @@ class Po { default: { const r = l; (o = (a = this.defaults.extensions) == null ? void 0 : a.childTokens) != null && o[r.type] ? this.defaults.extensions.childTokens[r.type].forEach((s) => { - const c = r[s].flat(1 / 0); - n = n.concat(this.walkTokens(c, t)); + const u = r[s].flat(1 / 0); + n = n.concat(this.walkTokens(u, t)); }) : r.tokens && (n = n.concat(this.walkTokens(r.tokens, t))); } } @@ -1955,51 +1955,51 @@ class Po { } "childTokens" in o && o.childTokens && (t.childTokens[o.name] = o.childTokens); }), a.extensions = t), n.renderer) { - const o = this.defaults.renderer || new bn(this.defaults); + const o = this.defaults.renderer || new En(this.defaults); for (const l in n.renderer) { if (!(l in o)) throw new Error(`renderer '${l}' does not exist`); if (l === "options") continue; - const r = l, s = n.renderer[r], c = o[r]; - o[r] = (...u) => { - let m = s.apply(o, u); - return m === !1 && (m = c.apply(o, u)), m || ""; + const r = l, s = n.renderer[r], u = o[r]; + o[r] = (...c) => { + let h = s.apply(o, c); + return h === !1 && (h = u.apply(o, c)), h || ""; }; } a.renderer = o; } if (n.tokenizer) { - const o = this.defaults.tokenizer || new vn(this.defaults); + const o = this.defaults.tokenizer || new $n(this.defaults); for (const l in n.tokenizer) { if (!(l in o)) throw new Error(`tokenizer '${l}' does not exist`); if (["options", "rules", "lexer"].includes(l)) continue; - const r = l, s = n.tokenizer[r], c = o[r]; - o[r] = (...u) => { - let m = s.apply(o, u); - return m === !1 && (m = c.apply(o, u)), m; + const r = l, s = n.tokenizer[r], u = o[r]; + o[r] = (...c) => { + let h = s.apply(o, c); + return h === !1 && (h = u.apply(o, c)), h; }; } a.tokenizer = o; } if (n.hooks) { - const o = this.defaults.hooks || new Vt(); + const o = this.defaults.hooks || new Qt(); for (const l in n.hooks) { if (!(l in o)) throw new Error(`hook '${l}' does not exist`); if (l === "options") continue; - const r = l, s = n.hooks[r], c = o[r]; - Vt.passThroughHooks.has(l) ? o[r] = (u) => { + const r = l, s = n.hooks[r], u = o[r]; + Qt.passThroughHooks.has(l) ? o[r] = (c) => { if (this.defaults.async) - return Promise.resolve(s.call(o, u)).then((d) => c.call(o, d)); - const m = s.call(o, u); - return c.call(o, m); - } : o[r] = (...u) => { - let m = s.apply(o, u); - return m === !1 && (m = c.apply(o, u)), m; + return Promise.resolve(s.call(o, c)).then((d) => u.call(o, d)); + const h = s.call(o, c); + return u.call(o, h); + } : o[r] = (...c) => { + let h = s.apply(o, c); + return h === !1 && (h = u.apply(o, c)), h; }; } a.hooks = o; @@ -2018,17 +2018,17 @@ class Po { return this.defaults = { ...this.defaults, ...e }, this; } lexer(e, t) { - return Qe.lex(e, t ?? this.defaults); + return tt.lex(e, t ?? this.defaults); } parser(e, t) { - return Je.parse(e, t ?? this.defaults); + return nt.parse(e, t ?? this.defaults); } } -$t = new WeakSet(), Vn = function(e, t) { +St = new WeakSet(), Kn = function(e, t) { return (n, a) => { const o = { ...a }, l = { ...this.defaults, ...o }; this.defaults.async === !0 && o.async === !1 && (l.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), l.async = !0); - const r = an(this, $t, al).call(this, !!l.silent, !!l.async); + const r = cn(this, St, ll).call(this, !!l.silent, !!l.async); if (typeof n > "u" || n === null) return r(new Error("marked(): input parameter is undefined or null")); if (typeof n != "string") @@ -2039,17 +2039,17 @@ $t = new WeakSet(), Vn = function(e, t) { l.hooks && (n = l.hooks.preprocess(n)); let s = e(n, l); l.hooks && (s = l.hooks.processAllTokens(s)), l.walkTokens && this.walkTokens(s, l.walkTokens); - let c = t(s, l); - return l.hooks && (c = l.hooks.postprocess(c)), c; + let u = t(s, l); + return l.hooks && (u = l.hooks.postprocess(u)), u; } catch (s) { return r(s); } }; -}, al = function(e, t) { +}, ll = function(e, t) { return (n) => { if (n.message += ` Please report this to https://github.com/markedjs/marked.`, e) { - const a = "

An error occurred:

" + Te(n.message + "", !0) + "
"; + const a = "

An error occurred:

" + Be(n.message + "", !0) + "
"; return t ? Promise.resolve(a) : a; } if (t) @@ -2057,40 +2057,40 @@ Please report this to https://github.com/markedjs/marked.`, e) { throw n; }; }; -const Ft = new Po(); +const Ct = new Mo(); function Z(i, e) { - return Ft.parse(i, e); + return Ct.parse(i, e); } Z.options = Z.setOptions = function(i) { - return Ft.setOptions(i), Z.defaults = Ft.defaults, Za(Z.defaults), Z; + return Ct.setOptions(i), Z.defaults = Ct.defaults, Ya(Z.defaults), Z; }; -Z.getDefaults = ii; -Z.defaults = wt; +Z.getDefaults = si; +Z.defaults = Tt; Z.use = function(...i) { - return Ft.use(...i), Z.defaults = Ft.defaults, Za(Z.defaults), Z; + return Ct.use(...i), Z.defaults = Ct.defaults, Ya(Z.defaults), Z; }; Z.walkTokens = function(i, e) { - return Ft.walkTokens(i, e); + return Ct.walkTokens(i, e); }; -Z.parseInline = Ft.parseInline; -Z.Parser = Je; -Z.parser = Je.parse; -Z.Renderer = bn; -Z.TextRenderer = ui; -Z.Lexer = Qe; -Z.lexer = Qe.lex; -Z.Tokenizer = vn; -Z.Hooks = Vt; +Z.parseInline = Ct.parseInline; +Z.Parser = nt; +Z.parser = nt.parse; +Z.Renderer = En; +Z.TextRenderer = pi; +Z.Lexer = tt; +Z.lexer = tt.lex; +Z.Tokenizer = $n; +Z.Hooks = Qt; Z.parse = Z; Z.options; Z.setOptions; Z.use; Z.walkTokens; Z.parseInline; -Je.parse; -Qe.lex; -const zo = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, Uo = Object.hasOwnProperty; -class ll { +nt.parse; +tt.lex; +const Po = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, Uo = Object.hasOwnProperty; +class ol { /** * Create a new slug class. */ @@ -2129,9 +2129,9 @@ class ll { } } function Ho(i, e) { - return typeof i != "string" ? "" : (e || (i = i.toLowerCase()), i.replace(zo, "").replace(/ /g, "-")); + return typeof i != "string" ? "" : (e || (i = i.toLowerCase()), i.replace(Po, "").replace(/ /g, "-")); } -new ll(); +new ol(); var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Go = { exports: {} }; (function(i) { var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {}; @@ -2199,8 +2199,8 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @memberof Prism */ util: { - encode: function h(_) { - return _ instanceof s ? new s(_.type, h(_.content), _.alias) : Array.isArray(_) ? _.map(h) : _.replace(/&/g, "&").replace(/} */ - {}, g[$] = y; + if (w = r.util.objId(_), g[w]) + return g[w]; + F = /** @type {Record} */ + {}, g[w] = F; for (var C in _) - _.hasOwnProperty(C) && (y[C] = h(_[C], g)); + _.hasOwnProperty(C) && (F[C] = m(_[C], g)); return ( /** @type {any} */ - y + F ); case "Array": - return $ = r.util.objId(_), g[$] ? g[$] : (y = [], g[$] = y, /** @type {Array} */ + return w = r.util.objId(_), g[w] ? g[w] : (F = [], g[w] = F, /** @type {Array} */ /** @type {any} */ - _.forEach(function(R, S) { - y[S] = h(R, g); + _.forEach(function(I, S) { + F[S] = m(I, g); }), /** @type {any} */ - y); + F); default: return _; } @@ -2274,12 +2274,12 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @param {Element} element * @returns {string} */ - getLanguage: function(h) { - for (; h; ) { - var _ = a.exec(h.className); + getLanguage: function(m) { + for (; m; ) { + var _ = a.exec(m.className); if (_) return _[1].toLowerCase(); - h = h.parentElement; + m = m.parentElement; } return "none"; }, @@ -2290,8 +2290,8 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @param {string} language * @returns {void} */ - setLanguage: function(h, _) { - h.className = h.className.replace(RegExp(a, "gi"), ""), h.classList.add("language-" + _); + setLanguage: function(m, _) { + m.className = m.className.replace(RegExp(a, "gi"), ""), m.classList.add("language-" + _); }, /** * Returns the script element that is currently executing. @@ -2310,12 +2310,12 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t ); try { throw new Error(); - } catch (y) { - var h = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(y.stack) || [])[1]; - if (h) { + } catch (F) { + var m = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(F.stack) || [])[1]; + if (m) { var _ = document.getElementsByTagName("script"); for (var g in _) - if (_[g].src == h) + if (_[g].src == m) return _[g]; } return null; @@ -2340,14 +2340,14 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @param {boolean} [defaultActivation=false] * @returns {boolean} */ - isActive: function(h, _, g) { - for (var y = "no-" + _; h; ) { - var $ = h.classList; - if ($.contains(_)) + isActive: function(m, _, g) { + for (var F = "no-" + _; m; ) { + var w = m.classList; + if (w.contains(_)) return !0; - if ($.contains(y)) + if (w.contains(F)) return !1; - h = h.parentElement; + m = m.parentElement; } return !!g; } @@ -2395,10 +2395,10 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * 'color': /\b(?:red|green|blue)\b/ * }); */ - extend: function(h, _) { - var g = r.util.clone(r.languages[h]); - for (var y in _) - g[y] = _[y]; + extend: function(m, _) { + var g = r.util.clone(r.languages[m]); + for (var F in _) + g[F] = _[F]; return g; }, /** @@ -2476,31 +2476,31 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @returns {Grammar} The new grammar object. * @public */ - insertBefore: function(h, _, g, y) { - y = y || /** @type {any} */ + insertBefore: function(m, _, g, F) { + F = F || /** @type {any} */ r.languages; - var $ = y[h], C = {}; - for (var R in $) - if ($.hasOwnProperty(R)) { - if (R == _) + var w = F[m], C = {}; + for (var I in w) + if (w.hasOwnProperty(I)) { + if (I == _) for (var S in g) g.hasOwnProperty(S) && (C[S] = g[S]); - g.hasOwnProperty(R) || (C[R] = $[R]); + g.hasOwnProperty(I) || (C[I] = w[I]); } - var N = y[h]; - return y[h] = C, r.languages.DFS(r.languages, function(O, H) { - H === N && O != h && (this[O] = C); + var O = F[m]; + return F[m] = C, r.languages.DFS(r.languages, function(q, H) { + H === O && q != m && (this[q] = C); }), C; }, // Traverse a language definition with Depth First Search - DFS: function h(_, g, y, $) { - $ = $ || {}; + DFS: function m(_, g, F, w) { + w = w || {}; var C = r.util.objId; - for (var R in _) - if (_.hasOwnProperty(R)) { - g.call(_, R, _[R], y || R); - var S = _[R], N = r.util.type(S); - N === "Object" && !$[C(S)] ? ($[C(S)] = !0, h(S, g, null, $)) : N === "Array" && !$[C(S)] && ($[C(S)] = !0, h(S, g, R, $)); + for (var I in _) + if (_.hasOwnProperty(I)) { + g.call(_, I, _[I], F || I); + var S = _[I], O = r.util.type(S); + O === "Object" && !w[C(S)] ? (w[C(S)] = !0, m(S, g, null, w)) : O === "Array" && !w[C(S)] && (w[C(S)] = !0, m(S, g, I, w)); } } }, @@ -2517,8 +2517,8 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @memberof Prism * @public */ - highlightAll: function(h, _) { - r.highlightAllUnder(document, h, _); + highlightAll: function(m, _) { + r.highlightAllUnder(document, m, _); }, /** * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls @@ -2535,15 +2535,15 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @memberof Prism * @public */ - highlightAllUnder: function(h, _, g) { - var y = { + highlightAllUnder: function(m, _, g) { + var F = { callback: g, - container: h, + container: m, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' }; - r.hooks.run("before-highlightall", y), y.elements = Array.prototype.slice.apply(y.container.querySelectorAll(y.selector)), r.hooks.run("before-all-elements-highlight", y); - for (var $ = 0, C; C = y.elements[$++]; ) - r.highlightElement(C, _ === !0, y.callback); + r.hooks.run("before-highlightall", F), F.elements = Array.prototype.slice.apply(F.container.querySelectorAll(F.selector)), r.hooks.run("before-all-elements-highlight", F); + for (var w = 0, C; C = F.elements[w++]; ) + r.highlightElement(C, _ === !0, F.callback); }, /** * Highlights the code inside a single element. @@ -2573,18 +2573,18 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @memberof Prism * @public */ - highlightElement: function(h, _, g) { - var y = r.util.getLanguage(h), $ = r.languages[y]; - r.util.setLanguage(h, y); - var C = h.parentElement; - C && C.nodeName.toLowerCase() === "pre" && r.util.setLanguage(C, y); - var R = h.textContent, S = { - element: h, - language: y, - grammar: $, - code: R + highlightElement: function(m, _, g) { + var F = r.util.getLanguage(m), w = r.languages[F]; + r.util.setLanguage(m, F); + var C = m.parentElement; + C && C.nodeName.toLowerCase() === "pre" && r.util.setLanguage(C, F); + var I = m.textContent, S = { + element: m, + language: F, + grammar: w, + code: I }; - function N(H) { + function O(H) { S.highlightedCode = H, r.hooks.run("before-insert", S), S.element.innerHTML = S.highlightedCode, r.hooks.run("after-highlight", S), r.hooks.run("complete", S), g && g.call(S.element); } if (r.hooks.run("before-sanity-check", S), C = S.element.parentElement, C && C.nodeName.toLowerCase() === "pre" && !C.hasAttribute("tabindex") && C.setAttribute("tabindex", "0"), !S.code) { @@ -2592,20 +2592,20 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t return; } if (r.hooks.run("before-highlight", S), !S.grammar) { - N(r.util.encode(S.code)); + O(r.util.encode(S.code)); return; } if (_ && n.Worker) { - var O = new Worker(r.filename); - O.onmessage = function(H) { - N(H.data); - }, O.postMessage(JSON.stringify({ + var q = new Worker(r.filename); + q.onmessage = function(H) { + O(H.data); + }, q.postMessage(JSON.stringify({ language: S.language, code: S.code, immediateClose: !0 })); } else - N(r.highlight(S.code, S.grammar, S.language)); + O(r.highlight(S.code, S.grammar, S.language)); }, /** * Low-level function, only use if you know what you’re doing. It accepts a string of text as input @@ -2627,15 +2627,15 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @example * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript'); */ - highlight: function(h, _, g) { - var y = { - code: h, + highlight: function(m, _, g) { + var F = { + code: m, grammar: _, language: g }; - if (r.hooks.run("before-tokenize", y), !y.grammar) - throw new Error('The language "' + y.language + '" has no grammar.'); - return y.tokens = r.tokenize(y.code, y.grammar), r.hooks.run("after-tokenize", y), s.stringify(r.util.encode(y.tokens), y.language); + if (r.hooks.run("before-tokenize", F), !F.grammar) + throw new Error('The language "' + F.language + '" has no grammar.'); + return F.tokens = r.tokenize(F.code, F.grammar), r.hooks.run("after-tokenize", F), s.stringify(r.util.encode(F.tokens), F.language); }, /** * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input @@ -2661,15 +2661,15 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * } * }); */ - tokenize: function(h, _) { + tokenize: function(m, _) { var g = _.rest; if (g) { - for (var y in g) - _[y] = g[y]; + for (var F in g) + _[F] = g[F]; delete _.rest; } - var $ = new m(); - return d($, $.head, h), u(h, $, _, $.head, 0), v($); + var w = new h(); + return d(w, w.head, m), c(m, w, _, w.head, 0), v(w); }, /** * @namespace @@ -2690,9 +2690,9 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @param {HookCallback} callback The callback function which is given environment variables. * @public */ - add: function(h, _) { + add: function(m, _) { var g = r.hooks.all; - g[h] = g[h] || [], g[h].push(_); + g[m] = g[m] || [], g[m].push(_); }, /** * Runs a hook invoking all registered callbacks with the given environment variables. @@ -2703,122 +2703,122 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @param {Object} env The environment variables of the hook passed to all callbacks registered. * @public */ - run: function(h, _) { - var g = r.hooks.all[h]; + run: function(m, _) { + var g = r.hooks.all[m]; if (!(!g || !g.length)) - for (var y = 0, $; $ = g[y++]; ) - $(_); + for (var F = 0, w; w = g[F++]; ) + w(_); } }, Token: s }; n.Prism = r; - function s(h, _, g, y) { - this.type = h, this.content = _, this.alias = g, this.length = (y || "").length | 0; + function s(m, _, g, F) { + this.type = m, this.content = _, this.alias = g, this.length = (F || "").length | 0; } - s.stringify = function h(_, g) { + s.stringify = function m(_, g) { if (typeof _ == "string") return _; if (Array.isArray(_)) { - var y = ""; - return _.forEach(function(N) { - y += h(N, g); - }), y; + var F = ""; + return _.forEach(function(O) { + F += m(O, g); + }), F; } - var $ = { + var w = { type: _.type, - content: h(_.content, g), + content: m(_.content, g), tag: "span", classes: ["token", _.type], attributes: {}, language: g }, C = _.alias; - C && (Array.isArray(C) ? Array.prototype.push.apply($.classes, C) : $.classes.push(C)), r.hooks.run("wrap", $); - var R = ""; - for (var S in $.attributes) - R += " " + S + '="' + ($.attributes[S] || "").replace(/"/g, """) + '"'; - return "<" + $.tag + ' class="' + $.classes.join(" ") + '"' + R + ">" + $.content + ""; + C && (Array.isArray(C) ? Array.prototype.push.apply(w.classes, C) : w.classes.push(C)), r.hooks.run("wrap", w); + var I = ""; + for (var S in w.attributes) + I += " " + S + '="' + (w.attributes[S] || "").replace(/"/g, """) + '"'; + return "<" + w.tag + ' class="' + w.classes.join(" ") + '"' + I + ">" + w.content + ""; }; - function c(h, _, g, y) { - h.lastIndex = _; - var $ = h.exec(g); - if ($ && y && $[1]) { - var C = $[1].length; - $.index += C, $[0] = $[0].slice(C); + function u(m, _, g, F) { + m.lastIndex = _; + var w = m.exec(g); + if (w && F && w[1]) { + var C = w[1].length; + w.index += C, w[0] = w[0].slice(C); } - return $; + return w; } - function u(h, _, g, y, $, C) { - for (var R in g) - if (!(!g.hasOwnProperty(R) || !g[R])) { - var S = g[R]; + function c(m, _, g, F, w, C) { + for (var I in g) + if (!(!g.hasOwnProperty(I) || !g[I])) { + var S = g[I]; S = Array.isArray(S) ? S : [S]; - for (var N = 0; N < S.length; ++N) { - if (C && C.cause == R + "," + N) + for (var O = 0; O < S.length; ++O) { + if (C && C.cause == I + "," + O) return; - var O = S[N], H = O.inside, Ae = !!O.lookbehind, W = !!O.greedy, ve = O.alias; - if (W && !O.pattern.global) { - var oe = O.pattern.toString().match(/[imsuy]*$/)[0]; - O.pattern = RegExp(O.pattern.source, oe + "g"); + var q = S[O], H = q.inside, ke = !!q.lookbehind, re = !!q.greedy, ae = q.alias; + if (re && !q.pattern.global) { + var se = q.pattern.toString().match(/[imsuy]*$/)[0]; + q.pattern = RegExp(q.pattern.source, se + "g"); } - for (var Be = O.pattern || O, K = y.next, re = $; K !== _.tail && !(C && re >= C.reach); re += K.value.length, K = K.next) { - var fe = K.value; - if (_.length > h.length) + for (var Se = q.pattern || q, K = F.next, ue = w; K !== _.tail && !(C && ue >= C.reach); ue += K.value.length, K = K.next) { + var he = K.value; + if (_.length > m.length) return; - if (!(fe instanceof s)) { - var w = 1, le; - if (W) { - if (le = c(Be, re, h, Ae), !le || le.index >= h.length) + if (!(he instanceof s)) { + var $ = 1, le; + if (re) { + if (le = u(Se, ue, m, ke), !le || le.index >= m.length) break; - var we = le.index, X = le.index + le[0].length, ue = re; - for (ue += K.value.length; we >= ue; ) - K = K.next, ue += K.value.length; - if (ue -= K.value.length, re = ue, K.value instanceof s) + var Ee = le.index, X = le.index + le[0].length, _e = ue; + for (_e += K.value.length; Ee >= _e; ) + K = K.next, _e += K.value.length; + if (_e -= K.value.length, ue = _e, K.value instanceof s) continue; - for (var A = K; A !== _.tail && (ue < X || typeof A.value == "string"); A = A.next) - w++, ue += A.value.length; - w--, fe = h.slice(re, ue), le.index -= re; - } else if (le = c(Be, 0, fe, Ae), !le) + for (var A = K; A !== _.tail && (_e < X || typeof A.value == "string"); A = A.next) + $++, _e += A.value.length; + $--, he = m.slice(ue, _e), le.index -= ue; + } else if (le = u(Se, 0, he, ke), !le) continue; - var we = le.index, Ve = le[0], pt = fe.slice(0, we), ht = fe.slice(we + Ve.length), mt = re + fe.length; - C && mt > C.reach && (C.reach = mt); - var lt = K.prev; - pt && (lt = d(_, lt, pt), re += pt.length), f(_, lt, w); - var We = new s(R, H ? r.tokenize(Ve, H) : Ve, ve, Ve); - if (K = d(_, lt, We), ht && d(_, K, ht), w > 1) { - var Ze = { - cause: R + "," + N, - reach: mt + var Ee = le.index, We = le[0], gt = he.slice(0, Ee), vt = he.slice(Ee + We.length), Dt = ue + he.length; + C && Dt > C.reach && (C.reach = Dt); + var st = K.prev; + gt && (st = d(_, st, gt), ue += gt.length), f(_, st, $); + var Ze = new s(I, H ? r.tokenize(We, H) : We, ae, We); + if (K = d(_, st, Ze), vt && d(_, K, vt), $ > 1) { + var Ye = { + cause: I + "," + O, + reach: Dt }; - u(h, _, g, K.prev, re, Ze), C && Ze.reach > C.reach && (C.reach = Ze.reach); + c(m, _, g, K.prev, ue, Ye), C && Ye.reach > C.reach && (C.reach = Ye.reach); } } } } } } - function m() { - var h = { value: null, prev: null, next: null }, _ = { value: null, prev: h, next: null }; - h.next = _, this.head = h, this.tail = _, this.length = 0; + function h() { + var m = { value: null, prev: null, next: null }, _ = { value: null, prev: m, next: null }; + m.next = _, this.head = m, this.tail = _, this.length = 0; } - function d(h, _, g) { - var y = _.next, $ = { value: g, prev: _, next: y }; - return _.next = $, y.prev = $, h.length++, $; + function d(m, _, g) { + var F = _.next, w = { value: g, prev: _, next: F }; + return _.next = w, F.prev = w, m.length++, w; } - function f(h, _, g) { - for (var y = _.next, $ = 0; $ < g && y !== h.tail; $++) - y = y.next; - _.next = y, y.prev = _, h.length -= $; + function f(m, _, g) { + for (var F = _.next, w = 0; w < g && F !== m.tail; w++) + F = F.next; + _.next = F, F.prev = _, m.length -= w; } - function v(h) { - for (var _ = [], g = h.head.next; g !== h.tail; ) + function v(m) { + for (var _ = [], g = m.head.next; g !== m.tail; ) _.push(g.value), g = g.next; return _; } if (!n.document) - return n.addEventListener && (r.disableWorkerMessageHandler || n.addEventListener("message", function(h) { - var _ = JSON.parse(h.data), g = _.language, y = _.code, $ = _.immediateClose; - n.postMessage(r.highlight(y, r.languages[g], g)), $ && n.close(); + return n.addEventListener && (r.disableWorkerMessageHandler || n.addEventListener("message", function(m) { + var _ = JSON.parse(m.data), g = _.language, F = _.code, w = _.immediateClose; + n.postMessage(r.highlight(F, r.languages[g], g)), w && n.close(); }, !1)), r; var D = r.util.currentScript(); D && (r.filename = D.src, D.hasAttribute("data-manual") && (r.manual = !0)); @@ -3221,52 +3221,52 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t bat: "batch", h: "c", tex: "latex" - }, r = "data-src-status", s = "loading", c = "loaded", u = "failed", m = "pre[data-src]:not([" + r + '="' + c + '"]):not([' + r + '="' + s + '"])'; + }, r = "data-src-status", s = "loading", u = "loaded", c = "failed", h = "pre[data-src]:not([" + r + '="' + u + '"]):not([' + r + '="' + s + '"])'; function d(D, b, E) { - var h = new XMLHttpRequest(); - h.open("GET", D, !0), h.onreadystatechange = function() { - h.readyState == 4 && (h.status < 400 && h.responseText ? b(h.responseText) : h.status >= 400 ? E(a(h.status, h.statusText)) : E(o)); - }, h.send(null); + var m = new XMLHttpRequest(); + m.open("GET", D, !0), m.onreadystatechange = function() { + m.readyState == 4 && (m.status < 400 && m.responseText ? b(m.responseText) : m.status >= 400 ? E(a(m.status, m.statusText)) : E(o)); + }, m.send(null); } function f(D) { var b = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(D || ""); if (b) { - var E = Number(b[1]), h = b[2], _ = b[3]; - return h ? _ ? [E, Number(_)] : [E, void 0] : [E, E]; + var E = Number(b[1]), m = b[2], _ = b[3]; + return m ? _ ? [E, Number(_)] : [E, void 0] : [E, E]; } } t.hooks.add("before-highlightall", function(D) { - D.selector += ", " + m; + D.selector += ", " + h; }), t.hooks.add("before-sanity-check", function(D) { var b = ( /** @type {HTMLPreElement} */ D.element ); - if (b.matches(m)) { + if (b.matches(h)) { D.code = "", b.setAttribute(r, s); var E = b.appendChild(document.createElement("CODE")); E.textContent = n; - var h = b.getAttribute("data-src"), _ = D.language; + var m = b.getAttribute("data-src"), _ = D.language; if (_ === "none") { - var g = (/\.(\w+)$/.exec(h) || [, "none"])[1]; + var g = (/\.(\w+)$/.exec(m) || [, "none"])[1]; _ = l[g] || g; } t.util.setLanguage(E, _), t.util.setLanguage(b, _); - var y = t.plugins.autoloader; - y && y.loadLanguages(_), d( - h, - function($) { - b.setAttribute(r, c); + var F = t.plugins.autoloader; + F && F.loadLanguages(_), d( + m, + function(w) { + b.setAttribute(r, u); var C = f(b.getAttribute("data-range")); if (C) { - var R = $.split(/\r\n?|\n/g), S = C[0], N = C[1] == null ? R.length : C[1]; - S < 0 && (S += R.length), S = Math.max(0, Math.min(S - 1, R.length)), N < 0 && (N += R.length), N = Math.max(0, Math.min(N, R.length)), $ = R.slice(S, N).join(` + var I = w.split(/\r\n?|\n/g), S = C[0], O = C[1] == null ? I.length : C[1]; + S < 0 && (S += I.length), S = Math.max(0, Math.min(S - 1, I.length)), O < 0 && (O += I.length), O = Math.max(0, Math.min(O, I.length)), w = I.slice(S, O).join(` `), b.hasAttribute("data-start") || b.setAttribute("data-start", String(S + 1)); } - E.textContent = $, t.highlightElement(E); + E.textContent = w, t.highlightElement(E); }, - function($) { - b.setAttribute(r, u), E.textContent = $; + function(w) { + b.setAttribute(r, c), E.textContent = w; } ); } @@ -3279,7 +3279,7 @@ var Mi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t * @param {ParentNode} [container=document] */ highlight: function(b) { - for (var E = (b || document).querySelectorAll(m), h = 0, _; _ = E[h++]; ) + for (var E = (b || document).querySelectorAll(h), m = 0, _; _ = E[m++]; ) t.highlightElement(_); } }; @@ -3630,7 +3630,7 @@ Prism.languages.py = Prism.languages.python; o[a[l]] = i.languages.bash[a[l]]; i.languages.sh = i.languages.bash, i.languages.shell = i.languages.bash; })(Prism); -new ll(); +new ol(); const jo = (i) => { const e = {}; for (let t = 0, n = i.length; t < n; t++) { @@ -4093,142 +4093,142 @@ jo([ Object.fromEntries(Zo.map((i) => [i, ["math:*"]])) ]); const { - HtmlTagHydration: js, - SvelteComponent: Vs, - attr: Ws, - binding_callbacks: Zs, - children: Ys, - claim_element: Xs, - claim_html_tag: Ks, - detach: Qs, - element: Js, - init: eu, - insert_hydration: tu, - noop: nu, - safe_not_equal: iu, - toggle_class: au -} = window.__gradio__svelte__internal, { afterUpdate: lu, tick: ou, onMount: ru } = window.__gradio__svelte__internal, { - SvelteComponent: su, - attr: uu, - children: cu, - claim_component: _u, - claim_element: du, - create_component: fu, - destroy_component: pu, - detach: hu, - element: mu, - init: gu, - insert_hydration: vu, - mount_component: Du, - safe_not_equal: bu, - transition_in: yu, - transition_out: Fu + HtmlTagHydration: Vs, + SvelteComponent: Ws, + attr: Zs, + binding_callbacks: Ys, + children: Xs, + claim_element: Ks, + claim_html_tag: Qs, + detach: Js, + element: eu, + init: tu, + insert_hydration: nu, + noop: iu, + safe_not_equal: au, + toggle_class: lu +} = window.__gradio__svelte__internal, { afterUpdate: ou, tick: ru, onMount: su } = window.__gradio__svelte__internal, { + SvelteComponent: uu, + attr: cu, + children: _u, + claim_component: du, + claim_element: fu, + create_component: pu, + destroy_component: hu, + detach: mu, + element: gu, + init: vu, + insert_hydration: Du, + mount_component: bu, + safe_not_equal: yu, + transition_in: Fu, + transition_out: wu } = window.__gradio__svelte__internal, { SvelteComponent: $u, - attr: wu, - check_outros: ku, - children: Eu, - claim_component: Au, - claim_element: Cu, - claim_space: Su, - create_component: Tu, - create_slot: Bu, - destroy_component: Ru, - detach: Iu, - element: Lu, - empty: xu, - get_all_dirty_from_scope: Ou, - get_slot_changes: qu, - group_outros: Nu, + attr: ku, + check_outros: Eu, + children: Au, + claim_component: Cu, + claim_element: Su, + claim_space: Tu, + create_component: Bu, + create_slot: Ru, + destroy_component: Iu, + detach: Lu, + element: xu, + empty: Ou, + get_all_dirty_from_scope: qu, + get_slot_changes: Nu, + group_outros: zu, init: Mu, insert_hydration: Pu, - mount_component: zu, - safe_not_equal: Uu, - space: Hu, - toggle_class: Gu, - transition_in: ju, - transition_out: Vu, - update_slot_base: Wu + mount_component: Uu, + safe_not_equal: Hu, + space: Gu, + toggle_class: ju, + transition_in: Vu, + transition_out: Wu, + update_slot_base: Zu } = window.__gradio__svelte__internal, { - SvelteComponent: Zu, - append_hydration: Yu, - attr: Xu, - children: Ku, - claim_component: Qu, - claim_element: Ju, - claim_space: ec, - claim_text: tc, - create_component: nc, - destroy_component: ic, - detach: ac, - element: lc, - init: oc, - insert_hydration: rc, - mount_component: sc, - safe_not_equal: uc, - set_data: cc, - space: _c, - text: dc, - toggle_class: fc, - transition_in: pc, - transition_out: hc + SvelteComponent: Yu, + append_hydration: Xu, + attr: Ku, + children: Qu, + claim_component: Ju, + claim_element: ec, + claim_space: tc, + claim_text: nc, + create_component: ic, + destroy_component: ac, + detach: lc, + element: oc, + init: rc, + insert_hydration: sc, + mount_component: uc, + safe_not_equal: cc, + set_data: _c, + space: dc, + text: fc, + toggle_class: pc, + transition_in: hc, + transition_out: mc } = window.__gradio__svelte__internal, { SvelteComponent: Yo, - append_hydration: hn, - attr: ct, + append_hydration: yn, + attr: ft, bubble: Xo, check_outros: Ko, - children: Wn, + children: Qn, claim_component: Qo, - claim_element: Zn, + claim_element: Jn, claim_space: Pi, claim_text: Jo, - construct_svelte_component: zi, - create_component: Ui, + construct_svelte_component: Ui, + create_component: Hi, create_slot: er, - destroy_component: Hi, - detach: Wt, - element: Yn, + destroy_component: Gi, + detach: Jt, + element: ei, get_all_dirty_from_scope: tr, get_slot_changes: nr, group_outros: ir, init: ar, - insert_hydration: ol, + insert_hydration: rl, listen: lr, - mount_component: Gi, + mount_component: ji, safe_not_equal: or, set_data: rr, - set_style: rn, - space: ji, + set_style: fn, + space: Vi, text: sr, - toggle_class: me, - transition_in: Ln, - transition_out: xn, + toggle_class: ve, + transition_in: zn, + transition_out: Mn, update_slot_base: ur } = window.__gradio__svelte__internal; -function Vi(i) { +function Wi(i) { let e, t; return { c() { - e = Yn("span"), t = sr( + e = ei("span"), t = sr( /*label*/ i[1] ), this.h(); }, l(n) { - e = Zn(n, "SPAN", { class: !0 }); - var a = Wn(e); + e = Jn(n, "SPAN", { class: !0 }); + var a = Qn(e); t = Jo( a, /*label*/ i[1] - ), a.forEach(Wt), this.h(); + ), a.forEach(Jt), this.h(); }, h() { - ct(e, "class", "svelte-qgco6m"); + ft(e, "class", "svelte-qgco6m"); }, m(n, a) { - ol(n, e, a), hn(e, t); + rl(n, e, a), yn(e, t); }, p(n, a) { a & /*label*/ @@ -4239,23 +4239,23 @@ function Vi(i) { ); }, d(n) { - n && Wt(e); + n && Jt(e); } }; } function cr(i) { - let e, t, n, a, o, l, r, s, c = ( + let e, t, n, a, o, l, r, s, u = ( /*show_label*/ - i[2] && Vi(i) + i[2] && Wi(i) ); - var u = ( + var c = ( /*Icon*/ i[0] ); - function m(v, D) { + function h(v, D) { return {}; } - u && (a = zi(u, m())); + c && (a = Ui(c, h())); const d = ( /*#slots*/ i[14].default @@ -4268,90 +4268,90 @@ function cr(i) { ); return { c() { - e = Yn("button"), c && c.c(), t = ji(), n = Yn("div"), a && Ui(a.$$.fragment), o = ji(), f && f.c(), this.h(); + e = ei("button"), u && u.c(), t = Vi(), n = ei("div"), a && Hi(a.$$.fragment), o = Vi(), f && f.c(), this.h(); }, l(v) { - e = Zn(v, "BUTTON", { + e = Jn(v, "BUTTON", { "aria-label": !0, "aria-haspopup": !0, title: !0, class: !0 }); - var D = Wn(e); - c && c.l(D), t = Pi(D), n = Zn(D, "DIV", { class: !0 }); - var b = Wn(n); - a && Qo(a.$$.fragment, b), o = Pi(b), f && f.l(b), b.forEach(Wt), D.forEach(Wt), this.h(); + var D = Qn(e); + u && u.l(D), t = Pi(D), n = Jn(D, "DIV", { class: !0 }); + var b = Qn(n); + a && Qo(a.$$.fragment, b), o = Pi(b), f && f.l(b), b.forEach(Jt), D.forEach(Jt), this.h(); }, h() { - ct(n, "class", "svelte-qgco6m"), me( + ft(n, "class", "svelte-qgco6m"), ve( n, "x-small", /*size*/ i[4] === "x-small" - ), me( + ), ve( n, "small", /*size*/ i[4] === "small" - ), me( + ), ve( n, "large", /*size*/ i[4] === "large" - ), me( + ), ve( n, "medium", /*size*/ i[4] === "medium" ), e.disabled = /*disabled*/ - i[7], ct( + i[7], ft( e, "aria-label", /*label*/ i[1] - ), ct( + ), ft( e, "aria-haspopup", /*hasPopup*/ i[8] - ), ct( + ), ft( e, "title", /*label*/ i[1] - ), ct(e, "class", "svelte-qgco6m"), me( + ), ft(e, "class", "svelte-qgco6m"), ve( e, "pending", /*pending*/ i[3] - ), me( + ), ve( e, "padded", /*padded*/ i[5] - ), me( + ), ve( e, "highlight", /*highlight*/ i[6] - ), me( + ), ve( e, "transparent", /*transparent*/ i[9] - ), rn(e, "color", !/*disabled*/ + ), fn(e, "color", !/*disabled*/ i[7] && /*_color*/ i[11] ? ( /*_color*/ i[11] - ) : "var(--block-label-text-color)"), rn(e, "--bg-color", /*disabled*/ + ) : "var(--block-label-text-color)"), fn(e, "--bg-color", /*disabled*/ i[7] ? "auto" : ( /*background*/ i[10] )); }, m(v, D) { - ol(v, e, D), c && c.m(e, null), hn(e, t), hn(e, n), a && Gi(a, n, null), hn(n, o), f && f.m(n, null), l = !0, r || (s = lr( + rl(v, e, D), u && u.m(e, null), yn(e, t), yn(e, n), a && ji(a, n, null), yn(n, o), f && f.m(n, null), l = !0, r || (s = lr( e, "click", /*click_handler*/ @@ -4360,17 +4360,17 @@ function cr(i) { }, p(v, [D]) { if (/*show_label*/ - v[2] ? c ? c.p(v, D) : (c = Vi(v), c.c(), c.m(e, t)) : c && (c.d(1), c = null), D & /*Icon*/ - 1 && u !== (u = /*Icon*/ + v[2] ? u ? u.p(v, D) : (u = Wi(v), u.c(), u.m(e, t)) : u && (u.d(1), u = null), D & /*Icon*/ + 1 && c !== (c = /*Icon*/ v[0])) { if (a) { ir(); const b = a; - xn(b.$$.fragment, 1, 0, () => { - Hi(b, 1); + Mn(b.$$.fragment, 1, 0, () => { + Gi(b, 1); }), Ko(); } - u ? (a = zi(u, m()), Ui(a.$$.fragment), Ln(a.$$.fragment, 1), Gi(a, n, o)) : a = null; + c ? (a = Ui(c, h()), Hi(a.$$.fragment), zn(a.$$.fragment, 1), ji(a, n, o)) : a = null; } f && f.p && (!l || D & /*$$scope*/ 8192) && ur( @@ -4391,25 +4391,25 @@ function cr(i) { ), null ), (!l || D & /*size*/ - 16) && me( + 16) && ve( n, "x-small", /*size*/ v[4] === "x-small" ), (!l || D & /*size*/ - 16) && me( + 16) && ve( n, "small", /*size*/ v[4] === "small" ), (!l || D & /*size*/ - 16) && me( + 16) && ve( n, "large", /*size*/ v[4] === "large" ), (!l || D & /*size*/ - 16) && me( + 16) && ve( n, "medium", /*size*/ @@ -4417,78 +4417,78 @@ function cr(i) { ), (!l || D & /*disabled*/ 128) && (e.disabled = /*disabled*/ v[7]), (!l || D & /*label*/ - 2) && ct( + 2) && ft( e, "aria-label", /*label*/ v[1] ), (!l || D & /*hasPopup*/ - 256) && ct( + 256) && ft( e, "aria-haspopup", /*hasPopup*/ v[8] ), (!l || D & /*label*/ - 2) && ct( + 2) && ft( e, "title", /*label*/ v[1] ), (!l || D & /*pending*/ - 8) && me( + 8) && ve( e, "pending", /*pending*/ v[3] ), (!l || D & /*padded*/ - 32) && me( + 32) && ve( e, "padded", /*padded*/ v[5] ), (!l || D & /*highlight*/ - 64) && me( + 64) && ve( e, "highlight", /*highlight*/ v[6] ), (!l || D & /*transparent*/ - 512) && me( + 512) && ve( e, "transparent", /*transparent*/ v[9] ), D & /*disabled, _color*/ - 2176 && rn(e, "color", !/*disabled*/ + 2176 && fn(e, "color", !/*disabled*/ v[7] && /*_color*/ v[11] ? ( /*_color*/ v[11] ) : "var(--block-label-text-color)"), D & /*disabled, background*/ - 1152 && rn(e, "--bg-color", /*disabled*/ + 1152 && fn(e, "--bg-color", /*disabled*/ v[7] ? "auto" : ( /*background*/ v[10] )); }, i(v) { - l || (a && Ln(a.$$.fragment, v), Ln(f, v), l = !0); + l || (a && zn(a.$$.fragment, v), zn(f, v), l = !0); }, o(v) { - a && xn(a.$$.fragment, v), xn(f, v), l = !1; + a && Mn(a.$$.fragment, v), Mn(f, v), l = !1; }, d(v) { - v && Wt(e), c && c.d(), a && Hi(a), f && f.d(v), r = !1, s(); + v && Jt(e), u && u.d(), a && Gi(a), f && f.d(v), r = !1, s(); } }; } function _r(i, e, t) { - let n, { $$slots: a = {}, $$scope: o } = e, { Icon: l } = e, { label: r = "" } = e, { show_label: s = !1 } = e, { pending: c = !1 } = e, { size: u = "small" } = e, { padded: m = !0 } = e, { highlight: d = !1 } = e, { disabled: f = !1 } = e, { hasPopup: v = !1 } = e, { color: D = "var(--block-label-text-color)" } = e, { transparent: b = !1 } = e, { background: E = "var(--block-background-fill)" } = e; - function h(_) { + let n, { $$slots: a = {}, $$scope: o } = e, { Icon: l } = e, { label: r = "" } = e, { show_label: s = !1 } = e, { pending: u = !1 } = e, { size: c = "small" } = e, { padded: h = !0 } = e, { highlight: d = !1 } = e, { disabled: f = !1 } = e, { hasPopup: v = !1 } = e, { color: D = "var(--block-label-text-color)" } = e, { transparent: b = !1 } = e, { background: E = "var(--block-background-fill)" } = e; + function m(_) { Xo.call(this, i, _); } return i.$$set = (_) => { - "Icon" in _ && t(0, l = _.Icon), "label" in _ && t(1, r = _.label), "show_label" in _ && t(2, s = _.show_label), "pending" in _ && t(3, c = _.pending), "size" in _ && t(4, u = _.size), "padded" in _ && t(5, m = _.padded), "highlight" in _ && t(6, d = _.highlight), "disabled" in _ && t(7, f = _.disabled), "hasPopup" in _ && t(8, v = _.hasPopup), "color" in _ && t(12, D = _.color), "transparent" in _ && t(9, b = _.transparent), "background" in _ && t(10, E = _.background), "$$scope" in _ && t(13, o = _.$$scope); + "Icon" in _ && t(0, l = _.Icon), "label" in _ && t(1, r = _.label), "show_label" in _ && t(2, s = _.show_label), "pending" in _ && t(3, u = _.pending), "size" in _ && t(4, c = _.size), "padded" in _ && t(5, h = _.padded), "highlight" in _ && t(6, d = _.highlight), "disabled" in _ && t(7, f = _.disabled), "hasPopup" in _ && t(8, v = _.hasPopup), "color" in _ && t(12, D = _.color), "transparent" in _ && t(9, b = _.transparent), "background" in _ && t(10, E = _.background), "$$scope" in _ && t(13, o = _.$$scope); }, i.$$.update = () => { i.$$.dirty & /*highlight, color*/ 4160 && t(11, n = d ? "var(--color-accent)" : D); @@ -4496,9 +4496,9 @@ function _r(i, e, t) { l, r, s, - c, u, - m, + c, + h, d, f, v, @@ -4508,7 +4508,7 @@ function _r(i, e, t) { D, o, a, - h + m ]; } class dr extends Yo { @@ -4530,190 +4530,190 @@ class dr extends Yo { } } const { - SvelteComponent: mc, - append_hydration: gc, - attr: vc, - binding_callbacks: Dc, - children: bc, - claim_element: yc, - create_slot: Fc, + SvelteComponent: gc, + append_hydration: vc, + attr: Dc, + binding_callbacks: bc, + children: yc, + claim_element: Fc, + create_slot: wc, detach: $c, - element: wc, - get_all_dirty_from_scope: kc, - get_slot_changes: Ec, - init: Ac, - insert_hydration: Cc, - safe_not_equal: Sc, - toggle_class: Tc, - transition_in: Bc, - transition_out: Rc, - update_slot_base: Ic + element: kc, + get_all_dirty_from_scope: Ec, + get_slot_changes: Ac, + init: Cc, + insert_hydration: Sc, + safe_not_equal: Tc, + toggle_class: Bc, + transition_in: Rc, + transition_out: Ic, + update_slot_base: Lc } = window.__gradio__svelte__internal, { - SvelteComponent: Lc, - append_hydration: xc, - attr: Oc, - children: qc, - claim_svg_element: Nc, + SvelteComponent: xc, + append_hydration: Oc, + attr: qc, + children: Nc, + claim_svg_element: zc, detach: Mc, init: Pc, - insert_hydration: zc, - noop: Uc, - safe_not_equal: Hc, - svg_element: Gc + insert_hydration: Uc, + noop: Hc, + safe_not_equal: Gc, + svg_element: jc } = window.__gradio__svelte__internal, { - SvelteComponent: jc, - append_hydration: Vc, - attr: Wc, - children: Zc, - claim_svg_element: Yc, - detach: Xc, - init: Kc, - insert_hydration: Qc, - noop: Jc, - safe_not_equal: e_, - svg_element: t_ + SvelteComponent: Vc, + append_hydration: Wc, + attr: Zc, + children: Yc, + claim_svg_element: Xc, + detach: Kc, + init: Qc, + insert_hydration: Jc, + noop: e_, + safe_not_equal: t_, + svg_element: n_ } = window.__gradio__svelte__internal, { - SvelteComponent: n_, - append_hydration: i_, - attr: a_, - children: l_, - claim_svg_element: o_, - detach: r_, - init: s_, - insert_hydration: u_, - noop: c_, - safe_not_equal: __, - svg_element: d_ + SvelteComponent: i_, + append_hydration: a_, + attr: l_, + children: o_, + claim_svg_element: r_, + detach: s_, + init: u_, + insert_hydration: c_, + noop: __, + safe_not_equal: d_, + svg_element: f_ } = window.__gradio__svelte__internal, { - SvelteComponent: f_, - append_hydration: p_, - attr: h_, - children: m_, - claim_svg_element: g_, - detach: v_, - init: D_, - insert_hydration: b_, - noop: y_, - safe_not_equal: F_, + SvelteComponent: p_, + append_hydration: h_, + attr: m_, + children: g_, + claim_svg_element: v_, + detach: D_, + init: b_, + insert_hydration: y_, + noop: F_, + safe_not_equal: w_, svg_element: $_ } = window.__gradio__svelte__internal, { - SvelteComponent: w_, - append_hydration: k_, - attr: E_, - children: A_, - claim_svg_element: C_, - detach: S_, - init: T_, - insert_hydration: B_, - noop: R_, - safe_not_equal: I_, - svg_element: L_ + SvelteComponent: k_, + append_hydration: E_, + attr: A_, + children: C_, + claim_svg_element: S_, + detach: T_, + init: B_, + insert_hydration: R_, + noop: I_, + safe_not_equal: L_, + svg_element: x_ } = window.__gradio__svelte__internal, { - SvelteComponent: x_, - append_hydration: O_, - attr: q_, - children: N_, + SvelteComponent: O_, + append_hydration: q_, + attr: N_, + children: z_, claim_svg_element: M_, detach: P_, - init: z_, - insert_hydration: U_, - noop: H_, - safe_not_equal: G_, - svg_element: j_ + init: U_, + insert_hydration: H_, + noop: G_, + safe_not_equal: j_, + svg_element: V_ } = window.__gradio__svelte__internal, { - SvelteComponent: V_, - append_hydration: W_, - attr: Z_, - children: Y_, - claim_svg_element: X_, - detach: K_, - init: Q_, - insert_hydration: J_, - noop: ed, - safe_not_equal: td, - svg_element: nd + SvelteComponent: W_, + append_hydration: Z_, + attr: Y_, + children: X_, + claim_svg_element: K_, + detach: Q_, + init: J_, + insert_hydration: ed, + noop: td, + safe_not_equal: nd, + svg_element: id } = window.__gradio__svelte__internal, { - SvelteComponent: id, - append_hydration: ad, - attr: ld, - children: od, - claim_svg_element: rd, - detach: sd, - init: ud, - insert_hydration: cd, - noop: _d, - safe_not_equal: dd, - svg_element: fd + SvelteComponent: ad, + append_hydration: ld, + attr: od, + children: rd, + claim_svg_element: sd, + detach: ud, + init: cd, + insert_hydration: _d, + noop: dd, + safe_not_equal: fd, + svg_element: pd } = window.__gradio__svelte__internal, { - SvelteComponent: pd, - append_hydration: hd, - attr: md, - children: gd, - claim_svg_element: vd, - detach: Dd, - init: bd, - insert_hydration: yd, - noop: Fd, + SvelteComponent: hd, + append_hydration: md, + attr: gd, + children: vd, + claim_svg_element: Dd, + detach: bd, + init: yd, + insert_hydration: Fd, + noop: wd, safe_not_equal: $d, - svg_element: wd + svg_element: kd } = window.__gradio__svelte__internal, { - SvelteComponent: kd, - append_hydration: Ed, - attr: Ad, - children: Cd, - claim_svg_element: Sd, - detach: Td, - init: Bd, - insert_hydration: Rd, - noop: Id, - safe_not_equal: Ld, - svg_element: xd + SvelteComponent: Ed, + append_hydration: Ad, + attr: Cd, + children: Sd, + claim_svg_element: Td, + detach: Bd, + init: Rd, + insert_hydration: Id, + noop: Ld, + safe_not_equal: xd, + svg_element: Od } = window.__gradio__svelte__internal, { - SvelteComponent: Od, - append_hydration: qd, - attr: Nd, + SvelteComponent: qd, + append_hydration: Nd, + attr: zd, children: Md, claim_svg_element: Pd, - detach: zd, - init: Ud, - insert_hydration: Hd, - noop: Gd, - safe_not_equal: jd, - svg_element: Vd + detach: Ud, + init: Hd, + insert_hydration: Gd, + noop: jd, + safe_not_equal: Vd, + svg_element: Wd } = window.__gradio__svelte__internal, { - SvelteComponent: Wd, - append_hydration: Zd, - attr: Yd, - children: Xd, - claim_svg_element: Kd, - detach: Qd, - init: Jd, - insert_hydration: ef, - noop: tf, - safe_not_equal: nf, - svg_element: af + SvelteComponent: Zd, + append_hydration: Yd, + attr: Xd, + children: Kd, + claim_svg_element: Qd, + detach: Jd, + init: ef, + insert_hydration: tf, + noop: nf, + safe_not_equal: af, + svg_element: lf } = window.__gradio__svelte__internal, { SvelteComponent: fr, - append_hydration: On, + append_hydration: Pn, attr: Me, - children: sn, - claim_svg_element: un, - detach: Nt, + children: pn, + claim_svg_element: hn, + detach: Gt, init: pr, insert_hydration: hr, - noop: qn, + noop: Un, safe_not_equal: mr, - set_style: Xe, - svg_element: cn + set_style: Je, + svg_element: mn } = window.__gradio__svelte__internal; function gr(i) { let e, t, n, a; return { c() { - e = cn("svg"), t = cn("g"), n = cn("path"), a = cn("path"), this.h(); + e = mn("svg"), t = mn("g"), n = mn("path"), a = mn("path"), this.h(); }, l(o) { - e = un(o, "svg", { + e = hn(o, "svg", { width: !0, height: !0, viewBox: !0, @@ -4724,22 +4724,22 @@ function gr(i) { stroke: !0, style: !0 }); - var l = sn(e); - t = un(l, "g", { transform: !0 }); - var r = sn(t); - n = un(r, "path", { d: !0, style: !0 }), sn(n).forEach(Nt), r.forEach(Nt), a = un(l, "path", { d: !0, style: !0 }), sn(a).forEach(Nt), l.forEach(Nt), this.h(); + var l = pn(e); + t = hn(l, "g", { transform: !0 }); + var r = pn(t); + n = hn(r, "path", { d: !0, style: !0 }), pn(n).forEach(Gt), r.forEach(Gt), a = hn(l, "path", { d: !0, style: !0 }), pn(a).forEach(Gt), l.forEach(Gt), this.h(); }, h() { - Me(n, "d", "M18,6L6.087,17.913"), Xe(n, "fill", "none"), Xe(n, "fill-rule", "nonzero"), Xe(n, "stroke-width", "2px"), Me(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), Me(a, "d", "M4.364,4.364L19.636,19.636"), Xe(a, "fill", "none"), Xe(a, "fill-rule", "nonzero"), Xe(a, "stroke-width", "2px"), Me(e, "width", "100%"), Me(e, "height", "100%"), Me(e, "viewBox", "0 0 24 24"), Me(e, "version", "1.1"), Me(e, "xmlns", "http://www.w3.org/2000/svg"), Me(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Me(e, "xml:space", "preserve"), Me(e, "stroke", "currentColor"), Xe(e, "fill-rule", "evenodd"), Xe(e, "clip-rule", "evenodd"), Xe(e, "stroke-linecap", "round"), Xe(e, "stroke-linejoin", "round"); + Me(n, "d", "M18,6L6.087,17.913"), Je(n, "fill", "none"), Je(n, "fill-rule", "nonzero"), Je(n, "stroke-width", "2px"), Me(t, "transform", "matrix(1.14096,-0.140958,-0.140958,1.14096,-0.0559523,0.0559523)"), Me(a, "d", "M4.364,4.364L19.636,19.636"), Je(a, "fill", "none"), Je(a, "fill-rule", "nonzero"), Je(a, "stroke-width", "2px"), Me(e, "width", "100%"), Me(e, "height", "100%"), Me(e, "viewBox", "0 0 24 24"), Me(e, "version", "1.1"), Me(e, "xmlns", "http://www.w3.org/2000/svg"), Me(e, "xmlns:xlink", "http://www.w3.org/1999/xlink"), Me(e, "xml:space", "preserve"), Me(e, "stroke", "currentColor"), Je(e, "fill-rule", "evenodd"), Je(e, "clip-rule", "evenodd"), Je(e, "stroke-linecap", "round"), Je(e, "stroke-linejoin", "round"); }, m(o, l) { - hr(o, e, l), On(e, t), On(t, n), On(e, a); + hr(o, e, l), Pn(e, t), Pn(t, n), Pn(e, a); }, - p: qn, - i: qn, - o: qn, + p: Un, + i: Un, + o: Un, d(o) { - o && Nt(e); + o && Gt(e); } }; } @@ -4749,758 +4749,758 @@ class vr extends fr { } } const { - SvelteComponent: lf, - append_hydration: of, - attr: rf, - children: sf, - claim_svg_element: uf, - detach: cf, - init: _f, - insert_hydration: df, - noop: ff, - safe_not_equal: pf, - svg_element: hf + SvelteComponent: of, + append_hydration: rf, + attr: sf, + children: uf, + claim_svg_element: cf, + detach: _f, + init: df, + insert_hydration: ff, + noop: pf, + safe_not_equal: hf, + svg_element: mf } = window.__gradio__svelte__internal, { - SvelteComponent: mf, - append_hydration: gf, - attr: vf, - children: Df, - claim_svg_element: bf, - detach: yf, - init: Ff, + SvelteComponent: gf, + append_hydration: vf, + attr: Df, + children: bf, + claim_svg_element: yf, + detach: Ff, + init: wf, insert_hydration: $f, - noop: wf, - safe_not_equal: kf, - svg_element: Ef + noop: kf, + safe_not_equal: Ef, + svg_element: Af } = window.__gradio__svelte__internal, { - SvelteComponent: Af, - append_hydration: Cf, - attr: Sf, - children: Tf, - claim_svg_element: Bf, - detach: Rf, - init: If, - insert_hydration: Lf, - noop: xf, - safe_not_equal: Of, - svg_element: qf + SvelteComponent: Cf, + append_hydration: Sf, + attr: Tf, + children: Bf, + claim_svg_element: Rf, + detach: If, + init: Lf, + insert_hydration: xf, + noop: Of, + safe_not_equal: qf, + svg_element: Nf } = window.__gradio__svelte__internal, { - SvelteComponent: Nf, + SvelteComponent: zf, append_hydration: Mf, attr: Pf, - children: zf, - claim_svg_element: Uf, - detach: Hf, - init: Gf, - insert_hydration: jf, - noop: Vf, - safe_not_equal: Wf, - svg_element: Zf + children: Uf, + claim_svg_element: Hf, + detach: Gf, + init: jf, + insert_hydration: Vf, + noop: Wf, + safe_not_equal: Zf, + svg_element: Yf } = window.__gradio__svelte__internal, { - SvelteComponent: Yf, - append_hydration: Xf, - attr: Kf, - children: Qf, - claim_svg_element: Jf, - detach: ep, - init: tp, - insert_hydration: np, - noop: ip, - safe_not_equal: ap, - svg_element: lp + SvelteComponent: Xf, + append_hydration: Kf, + attr: Qf, + children: Jf, + claim_svg_element: ep, + detach: tp, + init: np, + insert_hydration: ip, + noop: ap, + safe_not_equal: lp, + svg_element: op } = window.__gradio__svelte__internal, { - SvelteComponent: op, - append_hydration: rp, - attr: sp, - children: up, - claim_svg_element: cp, - detach: _p, - init: dp, - insert_hydration: fp, - noop: pp, - safe_not_equal: hp, - svg_element: mp + SvelteComponent: rp, + append_hydration: sp, + attr: up, + children: cp, + claim_svg_element: _p, + detach: dp, + init: fp, + insert_hydration: pp, + noop: hp, + safe_not_equal: mp, + svg_element: gp } = window.__gradio__svelte__internal, { - SvelteComponent: gp, - append_hydration: vp, - attr: Dp, - children: bp, - claim_svg_element: yp, - detach: Fp, + SvelteComponent: vp, + append_hydration: Dp, + attr: bp, + children: yp, + claim_svg_element: Fp, + detach: wp, init: $p, - insert_hydration: wp, - noop: kp, - safe_not_equal: Ep, - svg_element: Ap + insert_hydration: kp, + noop: Ep, + safe_not_equal: Ap, + svg_element: Cp } = window.__gradio__svelte__internal, { - SvelteComponent: Cp, - append_hydration: Sp, - attr: Tp, - children: Bp, - claim_svg_element: Rp, - detach: Ip, - init: Lp, - insert_hydration: xp, - noop: Op, - safe_not_equal: qp, - svg_element: Np + SvelteComponent: Sp, + append_hydration: Tp, + attr: Bp, + children: Rp, + claim_svg_element: Ip, + detach: Lp, + init: xp, + insert_hydration: Op, + noop: qp, + safe_not_equal: Np, + svg_element: zp } = window.__gradio__svelte__internal, { SvelteComponent: Mp, append_hydration: Pp, - attr: zp, - children: Up, - claim_svg_element: Hp, - detach: Gp, - init: jp, - insert_hydration: Vp, - noop: Wp, - safe_not_equal: Zp, - svg_element: Yp + attr: Up, + children: Hp, + claim_svg_element: Gp, + detach: jp, + init: Vp, + insert_hydration: Wp, + noop: Zp, + safe_not_equal: Yp, + svg_element: Xp } = window.__gradio__svelte__internal, { - SvelteComponent: Xp, - append_hydration: Kp, - attr: Qp, - children: Jp, - claim_svg_element: eh, - detach: th, - init: nh, - insert_hydration: ih, - noop: ah, - safe_not_equal: lh, - svg_element: oh + SvelteComponent: Kp, + append_hydration: Qp, + attr: Jp, + children: eh, + claim_svg_element: th, + detach: nh, + init: ih, + insert_hydration: ah, + noop: lh, + safe_not_equal: oh, + svg_element: rh } = window.__gradio__svelte__internal, { - SvelteComponent: rh, - append_hydration: sh, - attr: uh, - children: ch, - claim_svg_element: _h, - detach: dh, - init: fh, - insert_hydration: ph, - noop: hh, - safe_not_equal: mh, - svg_element: gh + SvelteComponent: sh, + append_hydration: uh, + attr: ch, + children: _h, + claim_svg_element: dh, + detach: fh, + init: ph, + insert_hydration: hh, + noop: mh, + safe_not_equal: gh, + svg_element: vh } = window.__gradio__svelte__internal, { - SvelteComponent: vh, - append_hydration: Dh, - attr: bh, - children: yh, - claim_svg_element: Fh, + SvelteComponent: Dh, + append_hydration: bh, + attr: yh, + children: Fh, + claim_svg_element: wh, detach: $h, - init: wh, - insert_hydration: kh, - noop: Eh, - safe_not_equal: Ah, - svg_element: Ch + init: kh, + insert_hydration: Eh, + noop: Ah, + safe_not_equal: Ch, + svg_element: Sh } = window.__gradio__svelte__internal, { - SvelteComponent: Sh, - append_hydration: Th, - attr: Bh, - children: Rh, - claim_svg_element: Ih, - detach: Lh, - init: xh, - insert_hydration: Oh, - noop: qh, - safe_not_equal: Nh, + SvelteComponent: Th, + append_hydration: Bh, + attr: Rh, + children: Ih, + claim_svg_element: Lh, + detach: xh, + init: Oh, + insert_hydration: qh, + noop: Nh, + safe_not_equal: zh, svg_element: Mh } = window.__gradio__svelte__internal, { SvelteComponent: Ph, - append_hydration: zh, - attr: Uh, - children: Hh, - claim_svg_element: Gh, - detach: jh, - init: Vh, - insert_hydration: Wh, - noop: Zh, - safe_not_equal: Yh, - svg_element: Xh + append_hydration: Uh, + attr: Hh, + children: Gh, + claim_svg_element: jh, + detach: Vh, + init: Wh, + insert_hydration: Zh, + noop: Yh, + safe_not_equal: Xh, + svg_element: Kh } = window.__gradio__svelte__internal, { - SvelteComponent: Kh, - append_hydration: Qh, - attr: Jh, - children: em, - claim_svg_element: tm, - detach: nm, - init: im, - insert_hydration: am, - noop: lm, - safe_not_equal: om, - svg_element: rm + SvelteComponent: Qh, + append_hydration: Jh, + attr: em, + children: tm, + claim_svg_element: nm, + detach: im, + init: am, + insert_hydration: lm, + noop: om, + safe_not_equal: rm, + svg_element: sm } = window.__gradio__svelte__internal, { - SvelteComponent: sm, - append_hydration: um, - attr: cm, - children: _m, - claim_svg_element: dm, - detach: fm, - init: pm, - insert_hydration: hm, - noop: mm, - safe_not_equal: gm, - svg_element: vm + SvelteComponent: um, + append_hydration: cm, + attr: _m, + children: dm, + claim_svg_element: fm, + detach: pm, + init: hm, + insert_hydration: mm, + noop: gm, + safe_not_equal: vm, + svg_element: Dm } = window.__gradio__svelte__internal, { - SvelteComponent: Dm, - append_hydration: bm, - attr: ym, - children: Fm, + SvelteComponent: bm, + append_hydration: ym, + attr: Fm, + children: wm, claim_svg_element: $m, - detach: wm, - init: km, - insert_hydration: Em, - noop: Am, - safe_not_equal: Cm, - svg_element: Sm + detach: km, + init: Em, + insert_hydration: Am, + noop: Cm, + safe_not_equal: Sm, + svg_element: Tm } = window.__gradio__svelte__internal, { - SvelteComponent: Tm, - append_hydration: Bm, - attr: Rm, - children: Im, - claim_svg_element: Lm, - detach: xm, - init: Om, - insert_hydration: qm, - noop: Nm, + SvelteComponent: Bm, + append_hydration: Rm, + attr: Im, + children: Lm, + claim_svg_element: xm, + detach: Om, + init: qm, + insert_hydration: Nm, + noop: zm, safe_not_equal: Mm, svg_element: Pm } = window.__gradio__svelte__internal, { - SvelteComponent: zm, - append_hydration: Um, - attr: Hm, - children: Gm, - claim_svg_element: jm, - detach: Vm, - init: Wm, - insert_hydration: Zm, - noop: Ym, - safe_not_equal: Xm, - svg_element: Km + SvelteComponent: Um, + append_hydration: Hm, + attr: Gm, + children: jm, + claim_svg_element: Vm, + detach: Wm, + init: Zm, + insert_hydration: Ym, + noop: Xm, + safe_not_equal: Km, + svg_element: Qm } = window.__gradio__svelte__internal, { - SvelteComponent: Qm, - append_hydration: Jm, - attr: eg, - children: tg, - claim_svg_element: ng, - detach: ig, - init: ag, - insert_hydration: lg, - noop: og, - safe_not_equal: rg, - svg_element: sg + SvelteComponent: Jm, + append_hydration: eg, + attr: tg, + children: ng, + claim_svg_element: ig, + detach: ag, + init: lg, + insert_hydration: og, + noop: rg, + safe_not_equal: sg, + svg_element: ug } = window.__gradio__svelte__internal, { - SvelteComponent: ug, - append_hydration: cg, - attr: _g, - children: dg, - claim_svg_element: fg, - detach: pg, - init: hg, - insert_hydration: mg, - noop: gg, - safe_not_equal: vg, - svg_element: Dg + SvelteComponent: cg, + append_hydration: _g, + attr: dg, + children: fg, + claim_svg_element: pg, + detach: hg, + init: mg, + insert_hydration: gg, + noop: vg, + safe_not_equal: Dg, + svg_element: bg } = window.__gradio__svelte__internal, { - SvelteComponent: bg, - append_hydration: yg, - attr: Fg, + SvelteComponent: yg, + append_hydration: Fg, + attr: wg, children: $g, - claim_svg_element: wg, - detach: kg, - init: Eg, - insert_hydration: Ag, - noop: Cg, - safe_not_equal: Sg, - svg_element: Tg + claim_svg_element: kg, + detach: Eg, + init: Ag, + insert_hydration: Cg, + noop: Sg, + safe_not_equal: Tg, + svg_element: Bg } = window.__gradio__svelte__internal, { - SvelteComponent: Bg, - append_hydration: Rg, - attr: Ig, - children: Lg, - claim_svg_element: xg, - detach: Og, - init: qg, - insert_hydration: Ng, + SvelteComponent: Rg, + append_hydration: Ig, + attr: Lg, + children: xg, + claim_svg_element: Og, + detach: qg, + init: Ng, + insert_hydration: zg, noop: Mg, safe_not_equal: Pg, - svg_element: zg + svg_element: Ug } = window.__gradio__svelte__internal, { - SvelteComponent: Ug, - append_hydration: Hg, - attr: Gg, - children: jg, - claim_svg_element: Vg, - detach: Wg, - init: Zg, - insert_hydration: Yg, - noop: Xg, - safe_not_equal: Kg, - svg_element: Qg + SvelteComponent: Hg, + append_hydration: Gg, + attr: jg, + children: Vg, + claim_svg_element: Wg, + detach: Zg, + init: Yg, + insert_hydration: Xg, + noop: Kg, + safe_not_equal: Qg, + svg_element: Jg } = window.__gradio__svelte__internal, { - SvelteComponent: Jg, - append_hydration: e0, - attr: t0, - children: n0, - claim_svg_element: i0, - detach: a0, - init: l0, - insert_hydration: o0, - noop: r0, - safe_not_equal: s0, - svg_element: u0 + SvelteComponent: e0, + append_hydration: t0, + attr: n0, + children: i0, + claim_svg_element: a0, + detach: l0, + init: o0, + insert_hydration: r0, + noop: s0, + safe_not_equal: u0, + svg_element: c0 } = window.__gradio__svelte__internal, { - SvelteComponent: c0, - append_hydration: _0, - attr: d0, - children: f0, - claim_svg_element: p0, - detach: h0, - init: m0, - insert_hydration: g0, - noop: v0, - safe_not_equal: D0, - svg_element: b0 + SvelteComponent: _0, + append_hydration: d0, + attr: f0, + children: p0, + claim_svg_element: h0, + detach: m0, + init: g0, + insert_hydration: v0, + noop: D0, + safe_not_equal: b0, + svg_element: y0 } = window.__gradio__svelte__internal, { - SvelteComponent: y0, - append_hydration: F0, + SvelteComponent: F0, + append_hydration: w0, attr: $0, - children: w0, - claim_svg_element: k0, - detach: E0, - init: A0, - insert_hydration: C0, - noop: S0, - safe_not_equal: T0, - svg_element: B0 + children: k0, + claim_svg_element: E0, + detach: A0, + init: C0, + insert_hydration: S0, + noop: T0, + safe_not_equal: B0, + svg_element: R0 } = window.__gradio__svelte__internal, { - SvelteComponent: R0, - append_hydration: I0, - attr: L0, - children: x0, - claim_svg_element: O0, - detach: q0, - init: N0, + SvelteComponent: I0, + append_hydration: L0, + attr: x0, + children: O0, + claim_svg_element: q0, + detach: N0, + init: z0, insert_hydration: M0, noop: P0, - safe_not_equal: z0, - svg_element: U0 + safe_not_equal: U0, + svg_element: H0 } = window.__gradio__svelte__internal, { - SvelteComponent: H0, - append_hydration: G0, - attr: j0, - children: V0, - claim_svg_element: W0, - detach: Z0, - init: Y0, - insert_hydration: X0, - noop: K0, - safe_not_equal: Q0, - svg_element: J0 + SvelteComponent: G0, + append_hydration: j0, + attr: V0, + children: W0, + claim_svg_element: Z0, + detach: Y0, + init: X0, + insert_hydration: K0, + noop: Q0, + safe_not_equal: J0, + svg_element: e1 } = window.__gradio__svelte__internal, { - SvelteComponent: e1, - append_hydration: t1, - attr: n1, - children: i1, - claim_svg_element: a1, - detach: l1, - init: o1, - insert_hydration: r1, - noop: s1, - safe_not_equal: u1, - svg_element: c1 + SvelteComponent: t1, + append_hydration: n1, + attr: i1, + children: a1, + claim_svg_element: l1, + detach: o1, + init: r1, + insert_hydration: s1, + noop: u1, + safe_not_equal: c1, + svg_element: _1 } = window.__gradio__svelte__internal, { - SvelteComponent: _1, - append_hydration: d1, - attr: f1, - children: p1, - claim_svg_element: h1, - detach: m1, - init: g1, - insert_hydration: v1, - noop: D1, - safe_not_equal: b1, - svg_element: y1 + SvelteComponent: d1, + append_hydration: f1, + attr: p1, + children: h1, + claim_svg_element: m1, + detach: g1, + init: v1, + insert_hydration: D1, + noop: b1, + safe_not_equal: y1, + svg_element: F1 } = window.__gradio__svelte__internal, { - SvelteComponent: F1, + SvelteComponent: w1, append_hydration: $1, - attr: w1, - children: k1, - claim_svg_element: E1, - detach: A1, - init: C1, - insert_hydration: S1, - noop: T1, - safe_not_equal: B1, - svg_element: R1 + attr: k1, + children: E1, + claim_svg_element: A1, + detach: C1, + init: S1, + insert_hydration: T1, + noop: B1, + safe_not_equal: R1, + svg_element: I1 } = window.__gradio__svelte__internal, { - SvelteComponent: I1, - append_hydration: L1, - attr: x1, - children: O1, - claim_svg_element: q1, - detach: N1, + SvelteComponent: L1, + append_hydration: x1, + attr: O1, + children: q1, + claim_svg_element: N1, + detach: z1, init: M1, insert_hydration: P1, - noop: z1, - safe_not_equal: U1, - svg_element: H1 + noop: U1, + safe_not_equal: H1, + svg_element: G1 } = window.__gradio__svelte__internal, { - SvelteComponent: G1, - append_hydration: j1, - attr: V1, - children: W1, - claim_svg_element: Z1, - detach: Y1, - init: X1, - insert_hydration: K1, - noop: Q1, - safe_not_equal: J1, - svg_element: ev + SvelteComponent: j1, + append_hydration: V1, + attr: W1, + children: Z1, + claim_svg_element: Y1, + detach: X1, + init: K1, + insert_hydration: Q1, + noop: J1, + safe_not_equal: ev, + svg_element: tv } = window.__gradio__svelte__internal, { - SvelteComponent: tv, - append_hydration: nv, - attr: iv, - children: av, - claim_svg_element: lv, - detach: ov, - init: rv, - insert_hydration: sv, - noop: uv, - safe_not_equal: cv, - set_style: _v, - svg_element: dv + SvelteComponent: nv, + append_hydration: iv, + attr: av, + children: lv, + claim_svg_element: ov, + detach: rv, + init: sv, + insert_hydration: uv, + noop: cv, + safe_not_equal: _v, + set_style: dv, + svg_element: fv } = window.__gradio__svelte__internal, { - SvelteComponent: fv, - append_hydration: pv, - attr: hv, - children: mv, - claim_svg_element: gv, - detach: vv, - init: Dv, - insert_hydration: bv, - noop: yv, - safe_not_equal: Fv, + SvelteComponent: pv, + append_hydration: hv, + attr: mv, + children: gv, + claim_svg_element: vv, + detach: Dv, + init: bv, + insert_hydration: yv, + noop: Fv, + safe_not_equal: wv, svg_element: $v } = window.__gradio__svelte__internal, { - SvelteComponent: wv, - append_hydration: kv, - attr: Ev, - children: Av, - claim_svg_element: Cv, - detach: Sv, - init: Tv, - insert_hydration: Bv, - noop: Rv, - safe_not_equal: Iv, - svg_element: Lv + SvelteComponent: kv, + append_hydration: Ev, + attr: Av, + children: Cv, + claim_svg_element: Sv, + detach: Tv, + init: Bv, + insert_hydration: Rv, + noop: Iv, + safe_not_equal: Lv, + svg_element: xv } = window.__gradio__svelte__internal, { - SvelteComponent: xv, - append_hydration: Ov, - attr: qv, - children: Nv, + SvelteComponent: Ov, + append_hydration: qv, + attr: Nv, + children: zv, claim_svg_element: Mv, detach: Pv, - init: zv, - insert_hydration: Uv, - noop: Hv, - safe_not_equal: Gv, - svg_element: jv + init: Uv, + insert_hydration: Hv, + noop: Gv, + safe_not_equal: jv, + svg_element: Vv } = window.__gradio__svelte__internal, { - SvelteComponent: Vv, - append_hydration: Wv, - attr: Zv, - children: Yv, - claim_svg_element: Xv, - detach: Kv, - init: Qv, - insert_hydration: Jv, - noop: eD, - safe_not_equal: tD, - svg_element: nD + SvelteComponent: Wv, + append_hydration: Zv, + attr: Yv, + children: Xv, + claim_svg_element: Kv, + detach: Qv, + init: Jv, + insert_hydration: eD, + noop: tD, + safe_not_equal: nD, + svg_element: iD } = window.__gradio__svelte__internal, { - SvelteComponent: iD, - append_hydration: aD, - attr: lD, - children: oD, - claim_svg_element: rD, - detach: sD, - init: uD, - insert_hydration: cD, - noop: _D, - safe_not_equal: dD, - svg_element: fD + SvelteComponent: aD, + append_hydration: lD, + attr: oD, + children: rD, + claim_svg_element: sD, + detach: uD, + init: cD, + insert_hydration: _D, + noop: dD, + safe_not_equal: fD, + svg_element: pD } = window.__gradio__svelte__internal, { - SvelteComponent: pD, - append_hydration: hD, - attr: mD, - children: gD, - claim_svg_element: vD, - detach: DD, - init: bD, - insert_hydration: yD, - noop: FD, + SvelteComponent: hD, + append_hydration: mD, + attr: gD, + children: vD, + claim_svg_element: DD, + detach: bD, + init: yD, + insert_hydration: FD, + noop: wD, safe_not_equal: $D, - svg_element: wD + svg_element: kD } = window.__gradio__svelte__internal, { - SvelteComponent: kD, - append_hydration: ED, - attr: AD, - children: CD, - claim_svg_element: SD, - detach: TD, - init: BD, - insert_hydration: RD, - noop: ID, - safe_not_equal: LD, - svg_element: xD + SvelteComponent: ED, + append_hydration: AD, + attr: CD, + children: SD, + claim_svg_element: TD, + detach: BD, + init: RD, + insert_hydration: ID, + noop: LD, + safe_not_equal: xD, + svg_element: OD } = window.__gradio__svelte__internal, { - SvelteComponent: OD, - append_hydration: qD, - attr: ND, + SvelteComponent: qD, + append_hydration: ND, + attr: zD, children: MD, claim_svg_element: PD, - detach: zD, - init: UD, - insert_hydration: HD, - noop: GD, - safe_not_equal: jD, - svg_element: VD + detach: UD, + init: HD, + insert_hydration: GD, + noop: jD, + safe_not_equal: VD, + svg_element: WD } = window.__gradio__svelte__internal, { - SvelteComponent: WD, - append_hydration: ZD, - attr: YD, - children: XD, - claim_svg_element: KD, - claim_text: QD, - detach: JD, - init: eb, - insert_hydration: tb, - noop: nb, - safe_not_equal: ib, - svg_element: ab, - text: lb + SvelteComponent: ZD, + append_hydration: YD, + attr: XD, + children: KD, + claim_svg_element: QD, + claim_text: JD, + detach: eb, + init: tb, + insert_hydration: nb, + noop: ib, + safe_not_equal: ab, + svg_element: lb, + text: ob } = window.__gradio__svelte__internal, { - SvelteComponent: ob, - append_hydration: rb, - attr: sb, - children: ub, - claim_svg_element: cb, - detach: _b, - init: db, - insert_hydration: fb, - noop: pb, - safe_not_equal: hb, - svg_element: mb + SvelteComponent: rb, + append_hydration: sb, + attr: ub, + children: cb, + claim_svg_element: _b, + detach: db, + init: fb, + insert_hydration: pb, + noop: hb, + safe_not_equal: mb, + svg_element: gb } = window.__gradio__svelte__internal, { - SvelteComponent: gb, - append_hydration: vb, - attr: Db, - children: bb, - claim_svg_element: yb, - detach: Fb, + SvelteComponent: vb, + append_hydration: Db, + attr: bb, + children: yb, + claim_svg_element: Fb, + detach: wb, init: $b, - insert_hydration: wb, - noop: kb, - safe_not_equal: Eb, - svg_element: Ab + insert_hydration: kb, + noop: Eb, + safe_not_equal: Ab, + svg_element: Cb } = window.__gradio__svelte__internal, { - SvelteComponent: Cb, - append_hydration: Sb, - attr: Tb, - children: Bb, - claim_svg_element: Rb, - detach: Ib, - init: Lb, - insert_hydration: xb, - noop: Ob, - safe_not_equal: qb, - svg_element: Nb + SvelteComponent: Sb, + append_hydration: Tb, + attr: Bb, + children: Rb, + claim_svg_element: Ib, + detach: Lb, + init: xb, + insert_hydration: Ob, + noop: qb, + safe_not_equal: Nb, + svg_element: zb } = window.__gradio__svelte__internal, { SvelteComponent: Mb, append_hydration: Pb, - attr: zb, - children: Ub, - claim_svg_element: Hb, - detach: Gb, - init: jb, - insert_hydration: Vb, - noop: Wb, - safe_not_equal: Zb, - svg_element: Yb + attr: Ub, + children: Hb, + claim_svg_element: Gb, + detach: jb, + init: Vb, + insert_hydration: Wb, + noop: Zb, + safe_not_equal: Yb, + svg_element: Xb } = window.__gradio__svelte__internal, { - SvelteComponent: Xb, - append_hydration: Kb, - attr: Qb, - children: Jb, - claim_svg_element: ey, - detach: ty, - init: ny, - insert_hydration: iy, - noop: ay, - safe_not_equal: ly, - svg_element: oy + SvelteComponent: Kb, + append_hydration: Qb, + attr: Jb, + children: ey, + claim_svg_element: ty, + detach: ny, + init: iy, + insert_hydration: ay, + noop: ly, + safe_not_equal: oy, + svg_element: ry } = window.__gradio__svelte__internal, { - SvelteComponent: ry, - append_hydration: sy, - attr: uy, - children: cy, - claim_svg_element: _y, - detach: dy, - init: fy, - insert_hydration: py, - noop: hy, - safe_not_equal: my, - svg_element: gy + SvelteComponent: sy, + append_hydration: uy, + attr: cy, + children: _y, + claim_svg_element: dy, + detach: fy, + init: py, + insert_hydration: hy, + noop: my, + safe_not_equal: gy, + svg_element: vy } = window.__gradio__svelte__internal, { - SvelteComponent: vy, - append_hydration: Dy, - attr: by, - children: yy, - claim_svg_element: Fy, + SvelteComponent: Dy, + append_hydration: by, + attr: yy, + children: Fy, + claim_svg_element: wy, detach: $y, - init: wy, - insert_hydration: ky, - noop: Ey, - safe_not_equal: Ay, - svg_element: Cy + init: ky, + insert_hydration: Ey, + noop: Ay, + safe_not_equal: Cy, + svg_element: Sy } = window.__gradio__svelte__internal, { - SvelteComponent: Sy, - append_hydration: Ty, - attr: By, - children: Ry, - claim_svg_element: Iy, - claim_text: Ly, - detach: xy, - init: Oy, - insert_hydration: qy, - noop: Ny, + SvelteComponent: Ty, + append_hydration: By, + attr: Ry, + children: Iy, + claim_svg_element: Ly, + claim_text: xy, + detach: Oy, + init: qy, + insert_hydration: Ny, + noop: zy, safe_not_equal: My, svg_element: Py, - text: zy + text: Uy } = window.__gradio__svelte__internal, { - SvelteComponent: Uy, - append_hydration: Hy, - attr: Gy, - children: jy, - claim_svg_element: Vy, - claim_text: Wy, - detach: Zy, - init: Yy, - insert_hydration: Xy, - noop: Ky, - safe_not_equal: Qy, - svg_element: Jy, - text: eF + SvelteComponent: Hy, + append_hydration: Gy, + attr: jy, + children: Vy, + claim_svg_element: Wy, + claim_text: Zy, + detach: Yy, + init: Xy, + insert_hydration: Ky, + noop: Qy, + safe_not_equal: Jy, + svg_element: eF, + text: tF } = window.__gradio__svelte__internal, { - SvelteComponent: tF, - append_hydration: nF, - attr: iF, - children: aF, - claim_svg_element: lF, - claim_text: oF, - detach: rF, - init: sF, - insert_hydration: uF, - noop: cF, - safe_not_equal: _F, - svg_element: dF, - text: fF + SvelteComponent: nF, + append_hydration: iF, + attr: aF, + children: lF, + claim_svg_element: oF, + claim_text: rF, + detach: sF, + init: uF, + insert_hydration: cF, + noop: _F, + safe_not_equal: dF, + svg_element: fF, + text: pF } = window.__gradio__svelte__internal, { - SvelteComponent: pF, - append_hydration: hF, - attr: mF, - children: gF, - claim_svg_element: vF, - detach: DF, - init: bF, - insert_hydration: yF, - noop: FF, + SvelteComponent: hF, + append_hydration: mF, + attr: gF, + children: vF, + claim_svg_element: DF, + detach: bF, + init: yF, + insert_hydration: FF, + noop: wF, safe_not_equal: $F, - svg_element: wF + svg_element: kF } = window.__gradio__svelte__internal, { - SvelteComponent: kF, - append_hydration: EF, - attr: AF, - children: CF, - claim_svg_element: SF, - detach: TF, - init: BF, - insert_hydration: RF, - noop: IF, - safe_not_equal: LF, - svg_element: xF + SvelteComponent: EF, + append_hydration: AF, + attr: CF, + children: SF, + claim_svg_element: TF, + detach: BF, + init: RF, + insert_hydration: IF, + noop: LF, + safe_not_equal: xF, + svg_element: OF } = window.__gradio__svelte__internal, { - SvelteComponent: OF, - append_hydration: qF, - attr: NF, + SvelteComponent: qF, + append_hydration: NF, + attr: zF, children: MF, claim_svg_element: PF, - detach: zF, - init: UF, - insert_hydration: HF, - noop: GF, - safe_not_equal: jF, - svg_element: VF + detach: UF, + init: HF, + insert_hydration: GF, + noop: jF, + safe_not_equal: VF, + svg_element: WF } = window.__gradio__svelte__internal, { - SvelteComponent: WF, - append_hydration: ZF, - attr: YF, - children: XF, - claim_svg_element: KF, - detach: QF, - init: JF, - insert_hydration: e$, - noop: t$, - safe_not_equal: n$, - svg_element: i$ + SvelteComponent: ZF, + append_hydration: YF, + attr: XF, + children: KF, + claim_svg_element: QF, + detach: JF, + init: ew, + insert_hydration: tw, + noop: nw, + safe_not_equal: iw, + svg_element: aw } = window.__gradio__svelte__internal, { - SvelteComponent: a$, - append_hydration: l$, - attr: o$, - children: r$, - claim_svg_element: s$, - detach: u$, - init: c$, - insert_hydration: _$, - noop: d$, - safe_not_equal: f$, - svg_element: p$ + SvelteComponent: lw, + append_hydration: ow, + attr: rw, + children: sw, + claim_svg_element: uw, + detach: cw, + init: _w, + insert_hydration: dw, + noop: fw, + safe_not_equal: pw, + svg_element: hw } = window.__gradio__svelte__internal, { - SvelteComponent: h$, - append_hydration: m$, - attr: g$, - children: v$, - claim_svg_element: D$, - detach: b$, - init: y$, - insert_hydration: F$, - noop: $$, - safe_not_equal: w$, - svg_element: k$ + SvelteComponent: mw, + append_hydration: gw, + attr: vw, + children: Dw, + claim_svg_element: bw, + detach: yw, + init: Fw, + insert_hydration: ww, + noop: $w, + safe_not_equal: kw, + svg_element: Ew } = window.__gradio__svelte__internal, { - SvelteComponent: E$, - append_hydration: A$, - attr: C$, - children: S$, - claim_svg_element: T$, - detach: B$, - init: R$, - insert_hydration: I$, - noop: L$, - safe_not_equal: x$, - svg_element: O$ + SvelteComponent: Aw, + append_hydration: Cw, + attr: Sw, + children: Tw, + claim_svg_element: Bw, + detach: Rw, + init: Iw, + insert_hydration: Lw, + noop: xw, + safe_not_equal: Ow, + svg_element: qw } = window.__gradio__svelte__internal, { - SvelteComponent: q$, - append_hydration: N$, - attr: M$, - children: P$, - claim_svg_element: z$, - detach: U$, - init: H$, - insert_hydration: G$, - noop: j$, - safe_not_equal: V$, - svg_element: W$ + SvelteComponent: Nw, + append_hydration: zw, + attr: Mw, + children: Pw, + claim_svg_element: Uw, + detach: Hw, + init: Gw, + insert_hydration: jw, + noop: Vw, + safe_not_equal: Ww, + svg_element: Zw } = window.__gradio__svelte__internal, Dr = [ { color: "red", primary: 600, secondary: 100 }, { color: "green", primary: 600, secondary: 100 }, @@ -5512,7 +5512,7 @@ const { { color: "cyan", primary: 600, secondary: 100 }, { color: "lime", primary: 500, secondary: 100 }, { color: "pink", primary: 600, secondary: 100 } -], Wi = { +], Zi = { inherit: "inherit", current: "currentColor", transparent: "transparent", @@ -5809,159 +5809,159 @@ Dr.reduce( (i, { color: e, primary: t, secondary: n }) => ({ ...i, [e]: { - primary: Wi[e][t], - secondary: Wi[e][n] + primary: Zi[e][t], + secondary: Zi[e][n] } }), {} ); const { - SvelteComponent: Z$, - claim_component: Y$, - create_component: X$, - destroy_component: K$, - init: Q$, - mount_component: J$, - safe_not_equal: ew, - transition_in: tw, - transition_out: nw -} = window.__gradio__svelte__internal, { createEventDispatcher: iw } = window.__gradio__svelte__internal, { - SvelteComponent: aw, - append_hydration: lw, - attr: ow, - check_outros: rw, - children: sw, - claim_component: uw, - claim_element: cw, - claim_space: _w, - claim_text: dw, - create_component: fw, - destroy_component: pw, - detach: hw, - element: mw, - empty: gw, - group_outros: vw, - init: Dw, - insert_hydration: bw, - mount_component: yw, - safe_not_equal: Fw, - set_data: $w, - space: ww, - text: kw, - toggle_class: Ew, - transition_in: Aw, - transition_out: Cw + SvelteComponent: Yw, + claim_component: Xw, + create_component: Kw, + destroy_component: Qw, + init: Jw, + mount_component: e$, + safe_not_equal: t$, + transition_in: n$, + transition_out: i$ +} = window.__gradio__svelte__internal, { createEventDispatcher: a$ } = window.__gradio__svelte__internal, { + SvelteComponent: l$, + append_hydration: o$, + attr: r$, + check_outros: s$, + children: u$, + claim_component: c$, + claim_element: _$, + claim_space: d$, + claim_text: f$, + create_component: p$, + destroy_component: h$, + detach: m$, + element: g$, + empty: v$, + group_outros: D$, + init: b$, + insert_hydration: y$, + mount_component: F$, + safe_not_equal: w$, + set_data: $$, + space: k$, + text: E$, + toggle_class: A$, + transition_in: C$, + transition_out: S$ } = window.__gradio__svelte__internal, { - SvelteComponent: Sw, - attr: Tw, - children: Bw, - claim_element: Rw, - create_slot: Iw, - detach: Lw, - element: xw, - get_all_dirty_from_scope: Ow, - get_slot_changes: qw, - init: Nw, - insert_hydration: Mw, - safe_not_equal: Pw, - toggle_class: zw, - transition_in: Uw, - transition_out: Hw, - update_slot_base: Gw + SvelteComponent: T$, + attr: B$, + children: R$, + claim_element: I$, + create_slot: L$, + detach: x$, + element: O$, + get_all_dirty_from_scope: q$, + get_slot_changes: N$, + init: z$, + insert_hydration: M$, + safe_not_equal: P$, + toggle_class: U$, + transition_in: H$, + transition_out: G$, + update_slot_base: j$ } = window.__gradio__svelte__internal, { - SvelteComponent: jw, - append_hydration: Vw, - attr: Ww, - check_outros: Zw, - children: Yw, - claim_component: Xw, - claim_element: Kw, - claim_space: Qw, - create_component: Jw, - destroy_component: ek, - detach: tk, - element: nk, - empty: ik, - group_outros: ak, - init: lk, - insert_hydration: ok, - listen: rk, - mount_component: sk, - safe_not_equal: uk, - space: ck, - toggle_class: _k, - transition_in: dk, - transition_out: fk + SvelteComponent: V$, + append_hydration: W$, + attr: Z$, + check_outros: Y$, + children: X$, + claim_component: K$, + claim_element: Q$, + claim_space: J$, + create_component: ek, + destroy_component: tk, + detach: nk, + element: ik, + empty: ak, + group_outros: lk, + init: ok, + insert_hydration: rk, + listen: sk, + mount_component: uk, + safe_not_equal: ck, + space: _k, + toggle_class: dk, + transition_in: fk, + transition_out: pk } = window.__gradio__svelte__internal, { - SvelteComponent: pk, - attr: hk, - children: mk, - claim_element: gk, - create_slot: vk, - detach: Dk, - element: bk, - get_all_dirty_from_scope: yk, - get_slot_changes: Fk, + SvelteComponent: hk, + attr: mk, + children: gk, + claim_element: vk, + create_slot: Dk, + detach: bk, + element: yk, + get_all_dirty_from_scope: Fk, + get_slot_changes: wk, init: $k, - insert_hydration: wk, - null_to_empty: kk, - safe_not_equal: Ek, - transition_in: Ak, - transition_out: Ck, - update_slot_base: Sk + insert_hydration: kk, + null_to_empty: Ek, + safe_not_equal: Ak, + transition_in: Ck, + transition_out: Sk, + update_slot_base: Tk } = window.__gradio__svelte__internal, { - SvelteComponent: Tk, - check_outros: Bk, - claim_component: Rk, - create_component: Ik, - destroy_component: Lk, - detach: xk, - empty: Ok, - group_outros: qk, - init: Nk, + SvelteComponent: Bk, + check_outros: Rk, + claim_component: Ik, + create_component: Lk, + destroy_component: xk, + detach: Ok, + empty: qk, + group_outros: Nk, + init: zk, insert_hydration: Mk, mount_component: Pk, - noop: zk, - safe_not_equal: Uk, - transition_in: Hk, - transition_out: Gk -} = window.__gradio__svelte__internal, { createEventDispatcher: jk } = window.__gradio__svelte__internal; -function Bt(i) { + noop: Uk, + safe_not_equal: Hk, + transition_in: Gk, + transition_out: jk +} = window.__gradio__svelte__internal, { createEventDispatcher: Vk } = window.__gradio__svelte__internal; +function Ot(i) { let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0; for (; i > 1e3 && t < e.length - 1; ) i /= 1e3, t++; let n = e[t]; return (Number.isInteger(i) ? i : i.toFixed(1)) + n; } -function mn() { +function Fn() { } -const rl = typeof window < "u"; -let Zi = rl ? () => window.performance.now() : () => Date.now(), sl = rl ? (i) => requestAnimationFrame(i) : mn; -const Rt = /* @__PURE__ */ new Set(); -function ul(i) { - Rt.forEach((e) => { - e.c(i) || (Rt.delete(e), e.f()); - }), Rt.size !== 0 && sl(ul); +const sl = typeof window < "u"; +let Yi = sl ? () => window.performance.now() : () => Date.now(), ul = sl ? (i) => requestAnimationFrame(i) : Fn; +const qt = /* @__PURE__ */ new Set(); +function cl(i) { + qt.forEach((e) => { + e.c(i) || (qt.delete(e), e.f()); + }), qt.size !== 0 && ul(cl); } function br(i) { let e; - return Rt.size === 0 && sl(ul), { promise: new Promise((t) => { - Rt.add(e = { c: i, f: t }); + return qt.size === 0 && ul(cl), { promise: new Promise((t) => { + qt.add(e = { c: i, f: t }); }), abort() { - Rt.delete(e); + qt.delete(e); } }; } -const Tt = []; -function yr(i, e = mn) { +const xt = []; +function yr(i, e = Fn) { let t; const n = /* @__PURE__ */ new Set(); function a(l) { if (s = l, ((r = i) != r ? s == s : r !== s || r && typeof r == "object" || typeof r == "function") && (i = l, t)) { - const c = !Tt.length; - for (const u of n) u[1](), Tt.push(u, i); - if (c) { - for (let u = 0; u < Tt.length; u += 2) Tt[u][0](Tt[u + 1]); - Tt.length = 0; + const u = !xt.length; + for (const c of n) c[1](), xt.push(c, i); + if (u) { + for (let c = 0; c < xt.length; c += 2) xt[c][0](xt[c + 1]); + xt.length = 0; } } var r, s; @@ -5969,115 +5969,115 @@ function yr(i, e = mn) { function o(l) { a(l(i)); } - return { set: a, update: o, subscribe: function(l, r = mn) { + return { set: a, update: o, subscribe: function(l, r = Fn) { const s = [l, r]; - return n.add(s), n.size === 1 && (t = e(a, o) || mn), l(i), () => { + return n.add(s), n.size === 1 && (t = e(a, o) || Fn), l(i), () => { n.delete(s), n.size === 0 && t && (t(), t = null); }; } }; } -function Yi(i) { +function Xi(i) { return Object.prototype.toString.call(i) === "[object Date]"; } -function Xn(i, e, t, n) { - if (typeof t == "number" || Yi(t)) { +function ti(i, e, t, n) { + if (typeof t == "number" || Xi(t)) { const a = n - t, o = (t - e) / (i.dt || 1 / 60), l = (o + (i.opts.stiffness * a - i.opts.damping * o) * i.inv_mass) * i.dt; - return Math.abs(l) < i.opts.precision && Math.abs(a) < i.opts.precision ? n : (i.settled = !1, Yi(t) ? new Date(t.getTime() + l) : t + l); + return Math.abs(l) < i.opts.precision && Math.abs(a) < i.opts.precision ? n : (i.settled = !1, Xi(t) ? new Date(t.getTime() + l) : t + l); } - if (Array.isArray(t)) return t.map((a, o) => Xn(i, e[o], t[o], n[o])); + if (Array.isArray(t)) return t.map((a, o) => ti(i, e[o], t[o], n[o])); if (typeof t == "object") { const a = {}; - for (const o in t) a[o] = Xn(i, e[o], t[o], n[o]); + for (const o in t) a[o] = ti(i, e[o], t[o], n[o]); return a; } throw new Error(`Cannot spring ${typeof t} values`); } -function Xi(i, e = {}) { +function Ki(i, e = {}) { const t = yr(i), { stiffness: n = 0.15, damping: a = 0.8, precision: o = 0.01 } = e; - let l, r, s, c = i, u = i, m = 1, d = 0, f = !1; + let l, r, s, u = i, c = i, h = 1, d = 0, f = !1; function v(b, E = {}) { - u = b; - const h = s = {}; - return i == null || E.hard || D.stiffness >= 1 && D.damping >= 1 ? (f = !0, l = Zi(), c = b, t.set(i = u), Promise.resolve()) : (E.soft && (d = 1 / (60 * (E.soft === !0 ? 0.5 : +E.soft)), m = 0), r || (l = Zi(), f = !1, r = br((_) => { + c = b; + const m = s = {}; + return i == null || E.hard || D.stiffness >= 1 && D.damping >= 1 ? (f = !0, l = Yi(), u = b, t.set(i = c), Promise.resolve()) : (E.soft && (d = 1 / (60 * (E.soft === !0 ? 0.5 : +E.soft)), h = 0), r || (l = Yi(), f = !1, r = br((_) => { if (f) return f = !1, r = null, !1; - m = Math.min(m + d, 1); - const g = { inv_mass: m, opts: D, settled: !0, dt: 60 * (_ - l) / 1e3 }, y = Xn(g, c, i, u); - return l = _, c = i, t.set(i = y), g.settled && (r = null), !g.settled; + h = Math.min(h + d, 1); + const g = { inv_mass: h, opts: D, settled: !0, dt: 60 * (_ - l) / 1e3 }, F = ti(g, u, i, c); + return l = _, u = i, t.set(i = F), g.settled && (r = null), !g.settled; })), new Promise((_) => { r.promise.then(() => { - h === s && _(); + m === s && _(); }); })); } - const D = { set: v, update: (b, E) => v(b(u, i), E), subscribe: t.subscribe, stiffness: n, damping: a, precision: o }; + const D = { set: v, update: (b, E) => v(b(c, i), E), subscribe: t.subscribe, stiffness: n, damping: a, precision: o }; return D; } const { SvelteComponent: Fr, append_hydration: Pe, - attr: z, - children: Re, - claim_element: $r, - claim_svg_element: ze, - component_subscribe: Ki, - detach: Se, - element: wr, + attr: P, + children: Ie, + claim_element: wr, + claim_svg_element: Ue, + component_subscribe: Qi, + detach: Te, + element: $r, init: kr, insert_hydration: Er, - noop: Qi, + noop: Ji, safe_not_equal: Ar, - set_style: _n, - svg_element: Ue, - toggle_class: Ji + set_style: gn, + svg_element: He, + toggle_class: ea } = window.__gradio__svelte__internal, { onMount: Cr } = window.__gradio__svelte__internal; function Sr(i) { - let e, t, n, a, o, l, r, s, c, u, m, d; + let e, t, n, a, o, l, r, s, u, c, h, d; return { c() { - e = wr("div"), t = Ue("svg"), n = Ue("g"), a = Ue("path"), o = Ue("path"), l = Ue("path"), r = Ue("path"), s = Ue("g"), c = Ue("path"), u = Ue("path"), m = Ue("path"), d = Ue("path"), this.h(); + e = $r("div"), t = He("svg"), n = He("g"), a = He("path"), o = He("path"), l = He("path"), r = He("path"), s = He("g"), u = He("path"), c = He("path"), h = He("path"), d = He("path"), this.h(); }, l(f) { - e = $r(f, "DIV", { class: !0 }); - var v = Re(e); - t = ze(v, "svg", { + e = wr(f, "DIV", { class: !0 }); + var v = Ie(e); + t = Ue(v, "svg", { viewBox: !0, fill: !0, xmlns: !0, class: !0 }); - var D = Re(t); - n = ze(D, "g", { style: !0 }); - var b = Re(n); - a = ze(b, "path", { + var D = Ie(t); + n = Ue(D, "g", { style: !0 }); + var b = Ie(n); + a = Ue(b, "path", { d: !0, fill: !0, "fill-opacity": !0, class: !0 - }), Re(a).forEach(Se), o = ze(b, "path", { d: !0, fill: !0, class: !0 }), Re(o).forEach(Se), l = ze(b, "path", { + }), Ie(a).forEach(Te), o = Ue(b, "path", { d: !0, fill: !0, class: !0 }), Ie(o).forEach(Te), l = Ue(b, "path", { d: !0, fill: !0, "fill-opacity": !0, class: !0 - }), Re(l).forEach(Se), r = ze(b, "path", { d: !0, fill: !0, class: !0 }), Re(r).forEach(Se), b.forEach(Se), s = ze(D, "g", { style: !0 }); - var E = Re(s); - c = ze(E, "path", { + }), Ie(l).forEach(Te), r = Ue(b, "path", { d: !0, fill: !0, class: !0 }), Ie(r).forEach(Te), b.forEach(Te), s = Ue(D, "g", { style: !0 }); + var E = Ie(s); + u = Ue(E, "path", { d: !0, fill: !0, "fill-opacity": !0, class: !0 - }), Re(c).forEach(Se), u = ze(E, "path", { d: !0, fill: !0, class: !0 }), Re(u).forEach(Se), m = ze(E, "path", { + }), Ie(u).forEach(Te), c = Ue(E, "path", { d: !0, fill: !0, class: !0 }), Ie(c).forEach(Te), h = Ue(E, "path", { d: !0, fill: !0, "fill-opacity": !0, class: !0 - }), Re(m).forEach(Se), d = ze(E, "path", { d: !0, fill: !0, class: !0 }), Re(d).forEach(Se), E.forEach(Se), D.forEach(Se), v.forEach(Se), this.h(); + }), Ie(h).forEach(Te), d = Ue(E, "path", { d: !0, fill: !0, class: !0 }), Ie(d).forEach(Te), E.forEach(Te), D.forEach(Te), v.forEach(Te), this.h(); }, h() { - z(a, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), z(a, "fill", "#FF7C00"), z(a, "fill-opacity", "0.4"), z(a, "class", "svelte-43sxxs"), z(o, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), z(o, "fill", "#FF7C00"), z(o, "class", "svelte-43sxxs"), z(l, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), z(l, "fill", "#FF7C00"), z(l, "fill-opacity", "0.4"), z(l, "class", "svelte-43sxxs"), z(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), z(r, "fill", "#FF7C00"), z(r, "class", "svelte-43sxxs"), _n(n, "transform", "translate(" + /*$top*/ + P(a, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), P(a, "fill", "#FF7C00"), P(a, "fill-opacity", "0.4"), P(a, "class", "svelte-43sxxs"), P(o, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), P(o, "fill", "#FF7C00"), P(o, "class", "svelte-43sxxs"), P(l, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), P(l, "fill", "#FF7C00"), P(l, "fill-opacity", "0.4"), P(l, "class", "svelte-43sxxs"), P(r, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), P(r, "fill", "#FF7C00"), P(r, "class", "svelte-43sxxs"), gn(n, "transform", "translate(" + /*$top*/ i[1][0] + "px, " + /*$top*/ - i[1][1] + "px)"), z(c, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), z(c, "fill", "#FF7C00"), z(c, "fill-opacity", "0.4"), z(c, "class", "svelte-43sxxs"), z(u, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), z(u, "fill", "#FF7C00"), z(u, "class", "svelte-43sxxs"), z(m, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), z(m, "fill", "#FF7C00"), z(m, "fill-opacity", "0.4"), z(m, "class", "svelte-43sxxs"), z(d, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), z(d, "fill", "#FF7C00"), z(d, "class", "svelte-43sxxs"), _n(s, "transform", "translate(" + /*$bottom*/ + i[1][1] + "px)"), P(u, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), P(u, "fill", "#FF7C00"), P(u, "fill-opacity", "0.4"), P(u, "class", "svelte-43sxxs"), P(c, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), P(c, "fill", "#FF7C00"), P(c, "class", "svelte-43sxxs"), P(h, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), P(h, "fill", "#FF7C00"), P(h, "fill-opacity", "0.4"), P(h, "class", "svelte-43sxxs"), P(d, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), P(d, "fill", "#FF7C00"), P(d, "class", "svelte-43sxxs"), gn(s, "transform", "translate(" + /*$bottom*/ i[2][0] + "px, " + /*$bottom*/ - i[2][1] + "px)"), z(t, "viewBox", "-1200 -1200 3000 3000"), z(t, "fill", "none"), z(t, "xmlns", "http://www.w3.org/2000/svg"), z(t, "class", "svelte-43sxxs"), z(e, "class", "svelte-43sxxs"), Ji( + i[2][1] + "px)"), P(t, "viewBox", "-1200 -1200 3000 3000"), P(t, "fill", "none"), P(t, "xmlns", "http://www.w3.org/2000/svg"), P(t, "class", "svelte-43sxxs"), P(e, "class", "svelte-43sxxs"), ea( e, "margin", /*margin*/ @@ -6085,81 +6085,81 @@ function Sr(i) { ); }, m(f, v) { - Er(f, e, v), Pe(e, t), Pe(t, n), Pe(n, a), Pe(n, o), Pe(n, l), Pe(n, r), Pe(t, s), Pe(s, c), Pe(s, u), Pe(s, m), Pe(s, d); + Er(f, e, v), Pe(e, t), Pe(t, n), Pe(n, a), Pe(n, o), Pe(n, l), Pe(n, r), Pe(t, s), Pe(s, u), Pe(s, c), Pe(s, h), Pe(s, d); }, p(f, [v]) { v & /*$top*/ - 2 && _n(n, "transform", "translate(" + /*$top*/ + 2 && gn(n, "transform", "translate(" + /*$top*/ f[1][0] + "px, " + /*$top*/ f[1][1] + "px)"), v & /*$bottom*/ - 4 && _n(s, "transform", "translate(" + /*$bottom*/ + 4 && gn(s, "transform", "translate(" + /*$bottom*/ f[2][0] + "px, " + /*$bottom*/ f[2][1] + "px)"), v & /*margin*/ - 1 && Ji( + 1 && ea( e, "margin", /*margin*/ f[0] ); }, - i: Qi, - o: Qi, + i: Ji, + o: Ji, d(f) { - f && Se(e); + f && Te(e); } }; } function Tr(i, e, t) { let n, a; var o = this && this.__awaiter || function(f, v, D, b) { - function E(h) { - return h instanceof D ? h : new D(function(_) { - _(h); + function E(m) { + return m instanceof D ? m : new D(function(_) { + _(m); }); } - return new (D || (D = Promise))(function(h, _) { + return new (D || (D = Promise))(function(m, _) { function g(C) { try { - $(b.next(C)); - } catch (R) { - _(R); + w(b.next(C)); + } catch (I) { + _(I); } } - function y(C) { + function F(C) { try { - $(b.throw(C)); - } catch (R) { - _(R); + w(b.throw(C)); + } catch (I) { + _(I); } } - function $(C) { - C.done ? h(C.value) : E(C.value).then(g, y); + function w(C) { + C.done ? m(C.value) : E(C.value).then(g, F); } - $((b = b.apply(f, v || [])).next()); + w((b = b.apply(f, v || [])).next()); }); }; let { margin: l = !0 } = e; - const r = Xi([0, 0]); - Ki(i, r, (f) => t(1, n = f)); - const s = Xi([0, 0]); - Ki(i, s, (f) => t(2, a = f)); - let c; - function u() { + const r = Ki([0, 0]); + Qi(i, r, (f) => t(1, n = f)); + const s = Ki([0, 0]); + Qi(i, s, (f) => t(2, a = f)); + let u; + function c() { return o(this, void 0, void 0, function* () { yield Promise.all([r.set([125, 140]), s.set([-125, -140])]), yield Promise.all([r.set([-125, 140]), s.set([125, -140])]), yield Promise.all([r.set([-125, 0]), s.set([125, -0])]), yield Promise.all([r.set([125, 0]), s.set([-125, 0])]); }); } - function m() { + function h() { return o(this, void 0, void 0, function* () { - yield u(), c || m(); + yield c(), u || h(); }); } function d() { return o(this, void 0, void 0, function* () { - yield Promise.all([r.set([125, 0]), s.set([-125, 0])]), m(); + yield Promise.all([r.set([125, 0]), s.set([-125, 0])]), h(); }); } - return Cr(() => (d(), () => c = !0)), i.$$set = (f) => { + return Cr(() => (d(), () => u = !0)), i.$$set = (f) => { "margin" in f && t(0, l = f.margin); }, [l, n, a, r, s]; } @@ -6170,49 +6170,49 @@ class Br extends Fr { } const { SvelteComponent: Rr, - append_hydration: yt, - attr: je, - binding_callbacks: ea, - check_outros: Kn, - children: et, - claim_component: cl, - claim_element: tt, - claim_space: Le, - claim_text: ne, - create_component: _l, - create_slot: dl, - destroy_component: fl, - destroy_each: pl, - detach: I, - element: nt, - empty: Oe, - ensure_array_like: yn, - get_all_dirty_from_scope: hl, - get_slot_changes: ml, - group_outros: Qn, + append_hydration: At, + attr: Ve, + binding_callbacks: ta, + check_outros: ni, + children: it, + claim_component: _l, + claim_element: at, + claim_space: xe, + claim_text: te, + create_component: dl, + create_slot: fl, + destroy_component: pl, + destroy_each: hl, + detach: R, + element: lt, + empty: qe, + ensure_array_like: An, + get_all_dirty_from_scope: ml, + get_slot_changes: gl, + group_outros: ii, init: Ir, - insert_hydration: M, - mount_component: gl, - noop: Jn, + insert_hydration: z, + mount_component: vl, + noop: ai, safe_not_equal: Lr, - set_data: qe, - set_style: vt, - space: xe, - text: ie, - toggle_class: Ie, - transition_in: Ge, - transition_out: it, - update_slot_base: vl -} = window.__gradio__svelte__internal, { tick: xr } = window.__gradio__svelte__internal, { onDestroy: Or } = window.__gradio__svelte__internal, { createEventDispatcher: qr } = window.__gradio__svelte__internal, Nr = (i) => ({}), ta = (i) => ({}), Mr = (i) => ({}), na = (i) => ({}); -function ia(i, e, t) { + set_data: Ne, + set_style: Ft, + space: Oe, + text: ne, + toggle_class: Le, + transition_in: je, + transition_out: ot, + update_slot_base: Dl +} = window.__gradio__svelte__internal, { tick: xr } = window.__gradio__svelte__internal, { onDestroy: Or } = window.__gradio__svelte__internal, { createEventDispatcher: qr } = window.__gradio__svelte__internal, Nr = (i) => ({}), na = (i) => ({}), zr = (i) => ({}), ia = (i) => ({}); +function aa(i, e, t) { const n = i.slice(); return n[40] = e[t], n[42] = t, n; } -function aa(i, e, t) { +function la(i, e, t) { const n = i.slice(); return n[40] = e[t], n; } -function Pr(i) { +function Mr(i) { let e, t, n, a, o = ( /*i18n*/ i[1]("common.error") + "" @@ -6231,78 +6231,78 @@ function Pr(i) { /*click_handler*/ i[32] ); - const c = ( + const u = ( /*#slots*/ i[30].error - ), u = dl( - c, + ), c = fl( + u, i, /*$$scope*/ i[29], - ta + na ); return { c() { - e = nt("div"), _l(t.$$.fragment), n = xe(), a = nt("span"), l = ie(o), r = xe(), u && u.c(), this.h(); + e = lt("div"), dl(t.$$.fragment), n = Oe(), a = lt("span"), l = ne(o), r = Oe(), c && c.c(), this.h(); }, - l(m) { - e = tt(m, "DIV", { class: !0 }); - var d = et(e); - cl(t.$$.fragment, d), d.forEach(I), n = Le(m), a = tt(m, "SPAN", { class: !0 }); - var f = et(a); - l = ne(f, o), f.forEach(I), r = Le(m), u && u.l(m), this.h(); + l(h) { + e = at(h, "DIV", { class: !0 }); + var d = it(e); + _l(t.$$.fragment, d), d.forEach(R), n = xe(h), a = at(h, "SPAN", { class: !0 }); + var f = it(a); + l = te(f, o), f.forEach(R), r = xe(h), c && c.l(h), this.h(); }, h() { - je(e, "class", "clear-status svelte-17v219f"), je(a, "class", "error svelte-17v219f"); + Ve(e, "class", "clear-status svelte-17v219f"), Ve(a, "class", "error svelte-17v219f"); }, - m(m, d) { - M(m, e, d), gl(t, e, null), M(m, n, d), M(m, a, d), yt(a, l), M(m, r, d), u && u.m(m, d), s = !0; + m(h, d) { + z(h, e, d), vl(t, e, null), z(h, n, d), z(h, a, d), At(a, l), z(h, r, d), c && c.m(h, d), s = !0; }, - p(m, d) { + p(h, d) { const f = {}; d[0] & /*i18n*/ 2 && (f.label = /*i18n*/ - m[1]("common.clear")), t.$set(f), (!s || d[0] & /*i18n*/ + h[1]("common.clear")), t.$set(f), (!s || d[0] & /*i18n*/ 2) && o !== (o = /*i18n*/ - m[1]("common.error") + "") && qe(l, o), u && u.p && (!s || d[0] & /*$$scope*/ - 536870912) && vl( - u, + h[1]("common.error") + "") && Ne(l, o), c && c.p && (!s || d[0] & /*$$scope*/ + 536870912) && Dl( c, - m, + u, + h, /*$$scope*/ - m[29], - s ? ml( - c, + h[29], + s ? gl( + u, /*$$scope*/ - m[29], + h[29], d, Nr - ) : hl( + ) : ml( /*$$scope*/ - m[29] + h[29] ), - ta + na ); }, - i(m) { - s || (Ge(t.$$.fragment, m), Ge(u, m), s = !0); + i(h) { + s || (je(t.$$.fragment, h), je(c, h), s = !0); }, - o(m) { - it(t.$$.fragment, m), it(u, m), s = !1; + o(h) { + ot(t.$$.fragment, h), ot(c, h), s = !1; }, - d(m) { - m && (I(e), I(n), I(a), I(r)), fl(t), u && u.d(m); + d(h) { + h && (R(e), R(n), R(a), R(r)), pl(t), c && c.d(h); } }; } -function zr(i) { - let e, t, n, a, o, l, r, s, c, u = ( +function Pr(i) { + let e, t, n, a, o, l, r, s, u, c = ( /*variant*/ i[8] === "default" && /*show_eta_bar*/ i[18] && /*show_progress*/ - i[6] === "full" && la(i) + i[6] === "full" && oa(i) ); - function m(_, g) { + function h(_, g) { if ( /*progress*/ _[7] @@ -6318,9 +6318,9 @@ function zr(i) { _[2] === 0 ) return Ur; } - let d = m(i), f = d && d(i), v = ( + let d = h(i), f = d && d(i), v = ( /*timer*/ - i[5] && sa(i) + i[5] && ua(i) ); const D = [Zr, Wr], b = []; function E(_, g) { @@ -6333,24 +6333,24 @@ function zr(i) { ); } ~(o = E(i)) && (l = b[o] = D[o](i)); - let h = !/*timer*/ - i[5] && ha(i); + let m = !/*timer*/ + i[5] && ma(i); return { c() { - u && u.c(), e = xe(), t = nt("div"), f && f.c(), n = xe(), v && v.c(), a = xe(), l && l.c(), r = xe(), h && h.c(), s = Oe(), this.h(); + c && c.c(), e = Oe(), t = lt("div"), f && f.c(), n = Oe(), v && v.c(), a = Oe(), l && l.c(), r = Oe(), m && m.c(), s = qe(), this.h(); }, l(_) { - u && u.l(_), e = Le(_), t = tt(_, "DIV", { class: !0 }); - var g = et(t); - f && f.l(g), n = Le(g), v && v.l(g), g.forEach(I), a = Le(_), l && l.l(_), r = Le(_), h && h.l(_), s = Oe(), this.h(); + c && c.l(_), e = xe(_), t = at(_, "DIV", { class: !0 }); + var g = it(t); + f && f.l(g), n = xe(g), v && v.l(g), g.forEach(R), a = xe(_), l && l.l(_), r = xe(_), m && m.l(_), s = qe(), this.h(); }, h() { - je(t, "class", "progress-text svelte-17v219f"), Ie( + Ve(t, "class", "progress-text svelte-17v219f"), Le( t, "meta-text-center", /*variant*/ i[8] === "center" - ), Ie( + ), Le( t, "meta-text", /*variant*/ @@ -6358,69 +6358,69 @@ function zr(i) { ); }, m(_, g) { - u && u.m(_, g), M(_, e, g), M(_, t, g), f && f.m(t, null), yt(t, n), v && v.m(t, null), M(_, a, g), ~o && b[o].m(_, g), M(_, r, g), h && h.m(_, g), M(_, s, g), c = !0; + c && c.m(_, g), z(_, e, g), z(_, t, g), f && f.m(t, null), At(t, n), v && v.m(t, null), z(_, a, g), ~o && b[o].m(_, g), z(_, r, g), m && m.m(_, g), z(_, s, g), u = !0; }, p(_, g) { /*variant*/ _[8] === "default" && /*show_eta_bar*/ _[18] && /*show_progress*/ - _[6] === "full" ? u ? u.p(_, g) : (u = la(_), u.c(), u.m(e.parentNode, e)) : u && (u.d(1), u = null), d === (d = m(_)) && f ? f.p(_, g) : (f && f.d(1), f = d && d(_), f && (f.c(), f.m(t, n))), /*timer*/ - _[5] ? v ? v.p(_, g) : (v = sa(_), v.c(), v.m(t, null)) : v && (v.d(1), v = null), (!c || g[0] & /*variant*/ - 256) && Ie( + _[6] === "full" ? c ? c.p(_, g) : (c = oa(_), c.c(), c.m(e.parentNode, e)) : c && (c.d(1), c = null), d === (d = h(_)) && f ? f.p(_, g) : (f && f.d(1), f = d && d(_), f && (f.c(), f.m(t, n))), /*timer*/ + _[5] ? v ? v.p(_, g) : (v = ua(_), v.c(), v.m(t, null)) : v && (v.d(1), v = null), (!u || g[0] & /*variant*/ + 256) && Le( t, "meta-text-center", /*variant*/ _[8] === "center" - ), (!c || g[0] & /*variant*/ - 256) && Ie( + ), (!u || g[0] & /*variant*/ + 256) && Le( t, "meta-text", /*variant*/ _[8] === "default" ); - let y = o; - o = E(_), o === y ? ~o && b[o].p(_, g) : (l && (Qn(), it(b[y], 1, 1, () => { - b[y] = null; - }), Kn()), ~o ? (l = b[o], l ? l.p(_, g) : (l = b[o] = D[o](_), l.c()), Ge(l, 1), l.m(r.parentNode, r)) : l = null), /*timer*/ - _[5] ? h && (Qn(), it(h, 1, 1, () => { - h = null; - }), Kn()) : h ? (h.p(_, g), g[0] & /*timer*/ - 32 && Ge(h, 1)) : (h = ha(_), h.c(), Ge(h, 1), h.m(s.parentNode, s)); + let F = o; + o = E(_), o === F ? ~o && b[o].p(_, g) : (l && (ii(), ot(b[F], 1, 1, () => { + b[F] = null; + }), ni()), ~o ? (l = b[o], l ? l.p(_, g) : (l = b[o] = D[o](_), l.c()), je(l, 1), l.m(r.parentNode, r)) : l = null), /*timer*/ + _[5] ? m && (ii(), ot(m, 1, 1, () => { + m = null; + }), ni()) : m ? (m.p(_, g), g[0] & /*timer*/ + 32 && je(m, 1)) : (m = ma(_), m.c(), je(m, 1), m.m(s.parentNode, s)); }, i(_) { - c || (Ge(l), Ge(h), c = !0); + u || (je(l), je(m), u = !0); }, o(_) { - it(l), it(h), c = !1; + ot(l), ot(m), u = !1; }, d(_) { - _ && (I(e), I(t), I(a), I(r), I(s)), u && u.d(_), f && f.d(), v && v.d(), ~o && b[o].d(_), h && h.d(_); + _ && (R(e), R(t), R(a), R(r), R(s)), c && c.d(_), f && f.d(), v && v.d(), ~o && b[o].d(_), m && m.d(_); } }; } -function la(i) { +function oa(i) { let e, t = `translateX(${/*eta_level*/ (i[17] || 0) * 100 - 100}%)`; return { c() { - e = nt("div"), this.h(); + e = lt("div"), this.h(); }, l(n) { - e = tt(n, "DIV", { class: !0 }), et(e).forEach(I), this.h(); + e = at(n, "DIV", { class: !0 }), it(e).forEach(R), this.h(); }, h() { - je(e, "class", "eta-bar svelte-17v219f"), vt(e, "transform", t); + Ve(e, "class", "eta-bar svelte-17v219f"), Ft(e, "transform", t); }, m(n, a) { - M(n, e, a); + z(n, e, a); }, p(n, a) { a[0] & /*eta_level*/ 131072 && t !== (t = `translateX(${/*eta_level*/ - (n[17] || 0) * 100 - 100}%)`) && vt(e, "transform", t); + (n[17] || 0) * 100 - 100}%)`) && Ft(e, "transform", t); }, d(n) { - n && I(e); + n && R(e); } }; } @@ -6428,17 +6428,17 @@ function Ur(i) { let e; return { c() { - e = ie("processing |"); + e = ne("processing |"); }, l(t) { - e = ne(t, "processing |"); + e = te(t, "processing |"); }, m(t, n) { - M(t, e, n); + z(t, e, n); }, - p: Jn, + p: ai, d(t) { - t && I(e); + t && R(e); } }; } @@ -6449,70 +6449,70 @@ function Hr(i) { ), n, a, o, l; return { c() { - e = ie("queue: "), n = ie(t), a = ie("/"), o = ie( + e = ne("queue: "), n = ne(t), a = ne("/"), o = ne( /*queue_size*/ i[3] - ), l = ie(" |"); + ), l = ne(" |"); }, l(r) { - e = ne(r, "queue: "), n = ne(r, t), a = ne(r, "/"), o = ne( + e = te(r, "queue: "), n = te(r, t), a = te(r, "/"), o = te( r, /*queue_size*/ i[3] - ), l = ne(r, " |"); + ), l = te(r, " |"); }, m(r, s) { - M(r, e, s), M(r, n, s), M(r, a, s), M(r, o, s), M(r, l, s); + z(r, e, s), z(r, n, s), z(r, a, s), z(r, o, s), z(r, l, s); }, p(r, s) { s[0] & /*queue_position*/ 4 && t !== (t = /*queue_position*/ - r[2] + 1 + "") && qe(n, t), s[0] & /*queue_size*/ - 8 && qe( + r[2] + 1 + "") && Ne(n, t), s[0] & /*queue_size*/ + 8 && Ne( o, /*queue_size*/ r[3] ); }, d(r) { - r && (I(e), I(n), I(a), I(o), I(l)); + r && (R(e), R(n), R(a), R(o), R(l)); } }; } function Gr(i) { - let e, t = yn( + let e, t = An( /*progress*/ i[7] ), n = []; for (let a = 0; a < t.length; a += 1) - n[a] = ra(aa(i, t, a)); + n[a] = sa(la(i, t, a)); return { c() { for (let a = 0; a < n.length; a += 1) n[a].c(); - e = Oe(); + e = qe(); }, l(a) { for (let o = 0; o < n.length; o += 1) n[o].l(a); - e = Oe(); + e = qe(); }, m(a, o) { for (let l = 0; l < n.length; l += 1) n[l] && n[l].m(a, o); - M(a, e, o); + z(a, e, o); }, p(a, o) { if (o[0] & /*progress*/ 128) { - t = yn( + t = An( /*progress*/ a[7] ); let l; for (l = 0; l < t.length; l += 1) { - const r = aa(a, t, l); - n[l] ? n[l].p(r, o) : (n[l] = ra(r), n[l].c(), n[l].m(e.parentNode, e)); + const r = la(a, t, l); + n[l] ? n[l].p(r, o) : (n[l] = sa(r), n[l].c(), n[l].m(e.parentNode, e)); } for (; l < n.length; l += 1) n[l].d(1); @@ -6520,128 +6520,128 @@ function Gr(i) { } }, d(a) { - a && I(e), pl(n, a); + a && R(e), hl(n, a); } }; } -function oa(i) { +function ra(i) { let e, t = ( /*p*/ i[40].unit + "" ), n, a, o = " ", l; - function r(u, m) { + function r(c, h) { return ( /*p*/ - u[40].length != null ? Vr : jr + c[40].length != null ? Vr : jr ); } - let s = r(i), c = s(i); + let s = r(i), u = s(i); return { c() { - c.c(), e = xe(), n = ie(t), a = ie(" | "), l = ie(o); + u.c(), e = Oe(), n = ne(t), a = ne(" | "), l = ne(o); }, - l(u) { - c.l(u), e = Le(u), n = ne(u, t), a = ne(u, " | "), l = ne(u, o); + l(c) { + u.l(c), e = xe(c), n = te(c, t), a = te(c, " | "), l = te(c, o); }, - m(u, m) { - c.m(u, m), M(u, e, m), M(u, n, m), M(u, a, m), M(u, l, m); + m(c, h) { + u.m(c, h), z(c, e, h), z(c, n, h), z(c, a, h), z(c, l, h); }, - p(u, m) { - s === (s = r(u)) && c ? c.p(u, m) : (c.d(1), c = s(u), c && (c.c(), c.m(e.parentNode, e))), m[0] & /*progress*/ + p(c, h) { + s === (s = r(c)) && u ? u.p(c, h) : (u.d(1), u = s(c), u && (u.c(), u.m(e.parentNode, e))), h[0] & /*progress*/ 128 && t !== (t = /*p*/ - u[40].unit + "") && qe(n, t); + c[40].unit + "") && Ne(n, t); }, - d(u) { - u && (I(e), I(n), I(a), I(l)), c.d(u); + d(c) { + c && (R(e), R(n), R(a), R(l)), u.d(c); } }; } function jr(i) { - let e = Bt( + let e = Ot( /*p*/ i[40].index || 0 ) + "", t; return { c() { - t = ie(e); + t = ne(e); }, l(n) { - t = ne(n, e); + t = te(n, e); }, m(n, a) { - M(n, t, a); + z(n, t, a); }, p(n, a) { a[0] & /*progress*/ - 128 && e !== (e = Bt( + 128 && e !== (e = Ot( /*p*/ n[40].index || 0 - ) + "") && qe(t, e); + ) + "") && Ne(t, e); }, d(n) { - n && I(t); + n && R(t); } }; } function Vr(i) { - let e = Bt( + let e = Ot( /*p*/ i[40].index || 0 - ) + "", t, n, a = Bt( + ) + "", t, n, a = Ot( /*p*/ i[40].length ) + "", o; return { c() { - t = ie(e), n = ie("/"), o = ie(a); + t = ne(e), n = ne("/"), o = ne(a); }, l(l) { - t = ne(l, e), n = ne(l, "/"), o = ne(l, a); + t = te(l, e), n = te(l, "/"), o = te(l, a); }, m(l, r) { - M(l, t, r), M(l, n, r), M(l, o, r); + z(l, t, r), z(l, n, r), z(l, o, r); }, p(l, r) { r[0] & /*progress*/ - 128 && e !== (e = Bt( + 128 && e !== (e = Ot( /*p*/ l[40].index || 0 - ) + "") && qe(t, e), r[0] & /*progress*/ - 128 && a !== (a = Bt( + ) + "") && Ne(t, e), r[0] & /*progress*/ + 128 && a !== (a = Ot( /*p*/ l[40].length - ) + "") && qe(o, a); + ) + "") && Ne(o, a); }, d(l) { - l && (I(t), I(n), I(o)); + l && (R(t), R(n), R(o)); } }; } -function ra(i) { +function sa(i) { let e, t = ( /*p*/ - i[40].index != null && oa(i) + i[40].index != null && ra(i) ); return { c() { - t && t.c(), e = Oe(); + t && t.c(), e = qe(); }, l(n) { - t && t.l(n), e = Oe(); + t && t.l(n), e = qe(); }, m(n, a) { - t && t.m(n, a), M(n, e, a); + t && t.m(n, a), z(n, e, a); }, p(n, a) { /*p*/ - n[40].index != null ? t ? t.p(n, a) : (t = oa(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); + n[40].index != null ? t ? t.p(n, a) : (t = ra(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, d(n) { - n && I(e), t && t.d(n); + n && R(e), t && t.d(n); } }; } -function sa(i) { +function ua(i) { let e, t = ( /*eta*/ i[0] ? `/${/*formatted_eta*/ @@ -6649,34 +6649,34 @@ function sa(i) { ), n, a; return { c() { - e = ie( + e = ne( /*formatted_timer*/ i[20] - ), n = ie(t), a = ie("s"); + ), n = ne(t), a = ne("s"); }, l(o) { - e = ne( + e = te( o, /*formatted_timer*/ i[20] - ), n = ne(o, t), a = ne(o, "s"); + ), n = te(o, t), a = te(o, "s"); }, m(o, l) { - M(o, e, l), M(o, n, l), M(o, a, l); + z(o, e, l), z(o, n, l), z(o, a, l); }, p(o, l) { l[0] & /*formatted_timer*/ - 1048576 && qe( + 1048576 && Ne( e, /*formatted_timer*/ o[20] ), l[0] & /*eta, formatted_eta*/ 524289 && t !== (t = /*eta*/ o[0] ? `/${/*formatted_eta*/ - o[19]}` : "") && qe(n, t); + o[19]}` : "") && Ne(n, t); }, d(o) { - o && (I(e), I(n), I(a)); + o && (R(e), R(n), R(a)); } }; } @@ -6689,13 +6689,13 @@ function Wr(i) { ) } }), { c() { - _l(e.$$.fragment); + dl(e.$$.fragment); }, l(n) { - cl(e.$$.fragment, n); + _l(e.$$.fragment, n); }, m(n, a) { - gl(e, n, a), t = !0; + vl(e, n, a), t = !0; }, p(n, a) { const o = {}; @@ -6704,13 +6704,13 @@ function Wr(i) { n[8] === "default"), e.$set(o); }, i(n) { - t || (Ge(e.$$.fragment, n), t = !0); + t || (je(e.$$.fragment, n), t = !0); }, o(n) { - it(e.$$.fragment, n), t = !1; + ot(e.$$.fragment, n), t = !1; }, d(n) { - fl(e, n); + pl(e, n); } }; } @@ -6718,74 +6718,74 @@ function Zr(i) { let e, t, n, a, o, l = `${/*last_progress_level*/ i[15] * 100}%`, r = ( /*progress*/ - i[7] != null && ua(i) + i[7] != null && ca(i) ); return { c() { - e = nt("div"), t = nt("div"), r && r.c(), n = xe(), a = nt("div"), o = nt("div"), this.h(); + e = lt("div"), t = lt("div"), r && r.c(), n = Oe(), a = lt("div"), o = lt("div"), this.h(); }, l(s) { - e = tt(s, "DIV", { class: !0 }); - var c = et(e); - t = tt(c, "DIV", { class: !0 }); - var u = et(t); - r && r.l(u), u.forEach(I), n = Le(c), a = tt(c, "DIV", { class: !0 }); - var m = et(a); - o = tt(m, "DIV", { class: !0 }), et(o).forEach(I), m.forEach(I), c.forEach(I), this.h(); + e = at(s, "DIV", { class: !0 }); + var u = it(e); + t = at(u, "DIV", { class: !0 }); + var c = it(t); + r && r.l(c), c.forEach(R), n = xe(u), a = at(u, "DIV", { class: !0 }); + var h = it(a); + o = at(h, "DIV", { class: !0 }), it(o).forEach(R), h.forEach(R), u.forEach(R), this.h(); }, h() { - je(t, "class", "progress-level-inner svelte-17v219f"), je(o, "class", "progress-bar svelte-17v219f"), vt(o, "width", l), je(a, "class", "progress-bar-wrap svelte-17v219f"), je(e, "class", "progress-level svelte-17v219f"); + Ve(t, "class", "progress-level-inner svelte-17v219f"), Ve(o, "class", "progress-bar svelte-17v219f"), Ft(o, "width", l), Ve(a, "class", "progress-bar-wrap svelte-17v219f"), Ve(e, "class", "progress-level svelte-17v219f"); }, - m(s, c) { - M(s, e, c), yt(e, t), r && r.m(t, null), yt(e, n), yt(e, a), yt(a, o), i[31](o); + m(s, u) { + z(s, e, u), At(e, t), r && r.m(t, null), At(e, n), At(e, a), At(a, o), i[31](o); }, - p(s, c) { + p(s, u) { /*progress*/ - s[7] != null ? r ? r.p(s, c) : (r = ua(s), r.c(), r.m(t, null)) : r && (r.d(1), r = null), c[0] & /*last_progress_level*/ + s[7] != null ? r ? r.p(s, u) : (r = ca(s), r.c(), r.m(t, null)) : r && (r.d(1), r = null), u[0] & /*last_progress_level*/ 32768 && l !== (l = `${/*last_progress_level*/ - s[15] * 100}%`) && vt(o, "width", l); + s[15] * 100}%`) && Ft(o, "width", l); }, - i: Jn, - o: Jn, + i: ai, + o: ai, d(s) { - s && I(e), r && r.d(), i[31](null); + s && R(e), r && r.d(), i[31](null); } }; } -function ua(i) { - let e, t = yn( +function ca(i) { + let e, t = An( /*progress*/ i[7] ), n = []; for (let a = 0; a < t.length; a += 1) - n[a] = pa(ia(i, t, a)); + n[a] = ha(aa(i, t, a)); return { c() { for (let a = 0; a < n.length; a += 1) n[a].c(); - e = Oe(); + e = qe(); }, l(a) { for (let o = 0; o < n.length; o += 1) n[o].l(a); - e = Oe(); + e = qe(); }, m(a, o) { for (let l = 0; l < n.length; l += 1) n[l] && n[l].m(a, o); - M(a, e, o); + z(a, e, o); }, p(a, o) { if (o[0] & /*progress_level, progress*/ 16512) { - t = yn( + t = An( /*progress*/ a[7] ); let l; for (l = 0; l < t.length; l += 1) { - const r = ia(a, t, l); - n[l] ? n[l].p(r, o) : (n[l] = pa(r), n[l].c(), n[l].m(e.parentNode, e)); + const r = aa(a, t, l); + n[l] ? n[l].p(r, o) : (n[l] = ha(r), n[l].c(), n[l].m(e.parentNode, e)); } for (; l < n.length; l += 1) n[l].d(1); @@ -6793,17 +6793,17 @@ function ua(i) { } }, d(a) { - a && I(e), pl(n, a); + a && R(e), hl(n, a); } }; } -function ca(i) { +function _a(i) { let e, t, n, a, o = ( /*i*/ i[42] !== 0 && Yr() ), l = ( /*p*/ - i[40].desc != null && _a(i) + i[40].desc != null && da(i) ), r = ( /*p*/ i[40].desc != null && /*progress_level*/ @@ -6811,34 +6811,34 @@ function ca(i) { i[14][ /*i*/ i[42] - ] != null && da() + ] != null && fa() ), s = ( /*progress_level*/ - i[14] != null && fa(i) + i[14] != null && pa(i) ); return { c() { - o && o.c(), e = xe(), l && l.c(), t = xe(), r && r.c(), n = xe(), s && s.c(), a = Oe(); + o && o.c(), e = Oe(), l && l.c(), t = Oe(), r && r.c(), n = Oe(), s && s.c(), a = qe(); }, - l(c) { - o && o.l(c), e = Le(c), l && l.l(c), t = Le(c), r && r.l(c), n = Le(c), s && s.l(c), a = Oe(); + l(u) { + o && o.l(u), e = xe(u), l && l.l(u), t = xe(u), r && r.l(u), n = xe(u), s && s.l(u), a = qe(); }, - m(c, u) { - o && o.m(c, u), M(c, e, u), l && l.m(c, u), M(c, t, u), r && r.m(c, u), M(c, n, u), s && s.m(c, u), M(c, a, u); + m(u, c) { + o && o.m(u, c), z(u, e, c), l && l.m(u, c), z(u, t, c), r && r.m(u, c), z(u, n, c), s && s.m(u, c), z(u, a, c); }, - p(c, u) { + p(u, c) { /*p*/ - c[40].desc != null ? l ? l.p(c, u) : (l = _a(c), l.c(), l.m(t.parentNode, t)) : l && (l.d(1), l = null), /*p*/ - c[40].desc != null && /*progress_level*/ - c[14] && /*progress_level*/ - c[14][ + u[40].desc != null ? l ? l.p(u, c) : (l = da(u), l.c(), l.m(t.parentNode, t)) : l && (l.d(1), l = null), /*p*/ + u[40].desc != null && /*progress_level*/ + u[14] && /*progress_level*/ + u[14][ /*i*/ - c[42] - ] != null ? r || (r = da(), r.c(), r.m(n.parentNode, n)) : r && (r.d(1), r = null), /*progress_level*/ - c[14] != null ? s ? s.p(c, u) : (s = fa(c), s.c(), s.m(a.parentNode, a)) : s && (s.d(1), s = null); + u[42] + ] != null ? r || (r = fa(), r.c(), r.m(n.parentNode, n)) : r && (r.d(1), r = null), /*progress_level*/ + u[14] != null ? s ? s.p(u, c) : (s = pa(u), s.c(), s.m(a.parentNode, a)) : s && (s.d(1), s = null); }, - d(c) { - c && (I(e), I(t), I(n), I(a)), o && o.d(c), l && l.d(c), r && r.d(c), s && s.d(c); + d(u) { + u && (R(e), R(t), R(n), R(a)), o && o.d(u), l && l.d(u), r && r.d(u), s && s.d(u); } }; } @@ -6846,62 +6846,62 @@ function Yr(i) { let e; return { c() { - e = ie(" /"); + e = ne(" /"); }, l(t) { - e = ne(t, " /"); + e = te(t, " /"); }, m(t, n) { - M(t, e, n); + z(t, e, n); }, d(t) { - t && I(e); + t && R(e); } }; } -function _a(i) { +function da(i) { let e = ( /*p*/ i[40].desc + "" ), t; return { c() { - t = ie(e); + t = ne(e); }, l(n) { - t = ne(n, e); + t = te(n, e); }, m(n, a) { - M(n, t, a); + z(n, t, a); }, p(n, a) { a[0] & /*progress*/ 128 && e !== (e = /*p*/ - n[40].desc + "") && qe(t, e); + n[40].desc + "") && Ne(t, e); }, d(n) { - n && I(t); + n && R(t); } }; } -function da(i) { +function fa(i) { let e; return { c() { - e = ie("-"); + e = ne("-"); }, l(t) { - e = ne(t, "-"); + e = te(t, "-"); }, m(t, n) { - M(t, e, n); + z(t, e, n); }, d(t) { - t && I(e); + t && R(e); } }; } -function fa(i) { +function pa(i) { let e = (100 * /*progress_level*/ (i[14][ /*i*/ @@ -6909,13 +6909,13 @@ function fa(i) { ] || 0)).toFixed(1) + "", t, n; return { c() { - t = ie(e), n = ie("%"); + t = ne(e), n = ne("%"); }, l(a) { - t = ne(a, e), n = ne(a, "%"); + t = te(a, e), n = te(a, "%"); }, m(a, o) { - M(a, t, o), M(a, n, o); + z(a, t, o), z(a, n, o); }, p(a, o) { o[0] & /*progress_level*/ @@ -6923,14 +6923,14 @@ function fa(i) { (a[14][ /*i*/ a[42] - ] || 0)).toFixed(1) + "") && qe(t, e); + ] || 0)).toFixed(1) + "") && Ne(t, e); }, d(a) { - a && (I(t), I(n)); + a && (R(t), R(n)); } }; } -function pa(i) { +function ha(i) { let e, t = ( /*p*/ (i[40].desc != null || /*progress_level*/ @@ -6938,17 +6938,17 @@ function pa(i) { i[14][ /*i*/ i[42] - ] != null) && ca(i) + ] != null) && _a(i) ); return { c() { - t && t.c(), e = Oe(); + t && t.c(), e = qe(); }, l(n) { - t && t.l(n), e = Oe(); + t && t.l(n), e = qe(); }, m(n, a) { - t && t.m(n, a), M(n, e, a); + t && t.m(n, a), z(n, e, a); }, p(n, a) { /*p*/ @@ -6957,113 +6957,113 @@ function pa(i) { n[14][ /*i*/ n[42] - ] != null ? t ? t.p(n, a) : (t = ca(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); + ] != null ? t ? t.p(n, a) : (t = _a(n), t.c(), t.m(e.parentNode, e)) : t && (t.d(1), t = null); }, d(n) { - n && I(e), t && t.d(n); + n && R(e), t && t.d(n); } }; } -function ha(i) { +function ma(i) { let e, t, n, a; const o = ( /*#slots*/ i[30]["additional-loading-text"] - ), l = dl( + ), l = fl( o, i, /*$$scope*/ i[29], - na + ia ); return { c() { - e = nt("p"), t = ie( + e = lt("p"), t = ne( /*loading_text*/ i[9] - ), n = xe(), l && l.c(), this.h(); + ), n = Oe(), l && l.c(), this.h(); }, l(r) { - e = tt(r, "P", { class: !0 }); - var s = et(e); - t = ne( + e = at(r, "P", { class: !0 }); + var s = it(e); + t = te( s, /*loading_text*/ i[9] - ), s.forEach(I), n = Le(r), l && l.l(r), this.h(); + ), s.forEach(R), n = xe(r), l && l.l(r), this.h(); }, h() { - je(e, "class", "loading svelte-17v219f"); + Ve(e, "class", "loading svelte-17v219f"); }, m(r, s) { - M(r, e, s), yt(e, t), M(r, n, s), l && l.m(r, s), a = !0; + z(r, e, s), At(e, t), z(r, n, s), l && l.m(r, s), a = !0; }, p(r, s) { (!a || s[0] & /*loading_text*/ - 512) && qe( + 512) && Ne( t, /*loading_text*/ r[9] ), l && l.p && (!a || s[0] & /*$$scope*/ - 536870912) && vl( + 536870912) && Dl( l, o, r, /*$$scope*/ r[29], - a ? ml( + a ? gl( o, /*$$scope*/ r[29], s, - Mr - ) : hl( + zr + ) : ml( /*$$scope*/ r[29] ), - na + ia ); }, i(r) { - a || (Ge(l, r), a = !0); + a || (je(l, r), a = !0); }, o(r) { - it(l, r), a = !1; + ot(l, r), a = !1; }, d(r) { - r && (I(e), I(n)), l && l.d(r); + r && (R(e), R(n)), l && l.d(r); } }; } function Xr(i) { let e, t, n, a, o; - const l = [zr, Pr], r = []; - function s(c, u) { + const l = [Pr, Mr], r = []; + function s(u, c) { return ( /*status*/ - c[4] === "pending" ? 0 : ( + u[4] === "pending" ? 0 : ( /*status*/ - c[4] === "error" ? 1 : -1 + u[4] === "error" ? 1 : -1 ) ); } return ~(t = s(i)) && (n = r[t] = l[t](i)), { c() { - e = nt("div"), n && n.c(), this.h(); + e = lt("div"), n && n.c(), this.h(); }, - l(c) { - e = tt(c, "DIV", { class: !0 }); - var u = et(e); - n && n.l(u), u.forEach(I), this.h(); + l(u) { + e = at(u, "DIV", { class: !0 }); + var c = it(e); + n && n.l(c), c.forEach(R), this.h(); }, h() { - je(e, "class", a = "wrap " + /*variant*/ + Ve(e, "class", a = "wrap " + /*variant*/ i[8] + " " + /*show_progress*/ - i[6] + " svelte-17v219f"), Ie(e, "hide", !/*status*/ + i[6] + " svelte-17v219f"), Le(e, "hide", !/*status*/ i[4] || /*status*/ i[4] === "complete" || /*show_progress*/ i[6] === "hidden" || /*status*/ - i[4] == "streaming"), Ie( + i[4] == "streaming"), Le( e, "translucent", /*variant*/ @@ -7072,89 +7072,89 @@ function Xr(i) { i[4] === "error") || /*translucent*/ i[11] || /*show_progress*/ i[6] === "minimal" - ), Ie( + ), Le( e, "generating", /*status*/ i[4] === "generating" && /*show_progress*/ i[6] === "full" - ), Ie( + ), Le( e, "border", /*border*/ i[12] - ), vt( + ), Ft( e, "position", /*absolute*/ i[10] ? "absolute" : "static" - ), vt( + ), Ft( e, "padding", /*absolute*/ i[10] ? "0" : "var(--size-8) 0" ); }, - m(c, u) { - M(c, e, u), ~t && r[t].m(e, null), i[33](e), o = !0; + m(u, c) { + z(u, e, c), ~t && r[t].m(e, null), i[33](e), o = !0; }, - p(c, u) { - let m = t; - t = s(c), t === m ? ~t && r[t].p(c, u) : (n && (Qn(), it(r[m], 1, 1, () => { - r[m] = null; - }), Kn()), ~t ? (n = r[t], n ? n.p(c, u) : (n = r[t] = l[t](c), n.c()), Ge(n, 1), n.m(e, null)) : n = null), (!o || u[0] & /*variant, show_progress*/ + p(u, c) { + let h = t; + t = s(u), t === h ? ~t && r[t].p(u, c) : (n && (ii(), ot(r[h], 1, 1, () => { + r[h] = null; + }), ni()), ~t ? (n = r[t], n ? n.p(u, c) : (n = r[t] = l[t](u), n.c()), je(n, 1), n.m(e, null)) : n = null), (!o || c[0] & /*variant, show_progress*/ 320 && a !== (a = "wrap " + /*variant*/ - c[8] + " " + /*show_progress*/ - c[6] + " svelte-17v219f")) && je(e, "class", a), (!o || u[0] & /*variant, show_progress, status, show_progress*/ - 336) && Ie(e, "hide", !/*status*/ - c[4] || /*status*/ - c[4] === "complete" || /*show_progress*/ - c[6] === "hidden" || /*status*/ - c[4] == "streaming"), (!o || u[0] & /*variant, show_progress, variant, status, translucent, show_progress*/ - 2384) && Ie( + u[8] + " " + /*show_progress*/ + u[6] + " svelte-17v219f")) && Ve(e, "class", a), (!o || c[0] & /*variant, show_progress, status, show_progress*/ + 336) && Le(e, "hide", !/*status*/ + u[4] || /*status*/ + u[4] === "complete" || /*show_progress*/ + u[6] === "hidden" || /*status*/ + u[4] == "streaming"), (!o || c[0] & /*variant, show_progress, variant, status, translucent, show_progress*/ + 2384) && Le( e, "translucent", /*variant*/ - c[8] === "center" && /*status*/ - (c[4] === "pending" || /*status*/ - c[4] === "error") || /*translucent*/ - c[11] || /*show_progress*/ - c[6] === "minimal" - ), (!o || u[0] & /*variant, show_progress, status, show_progress*/ - 336) && Ie( + u[8] === "center" && /*status*/ + (u[4] === "pending" || /*status*/ + u[4] === "error") || /*translucent*/ + u[11] || /*show_progress*/ + u[6] === "minimal" + ), (!o || c[0] & /*variant, show_progress, status, show_progress*/ + 336) && Le( e, "generating", /*status*/ - c[4] === "generating" && /*show_progress*/ - c[6] === "full" - ), (!o || u[0] & /*variant, show_progress, border*/ - 4416) && Ie( + u[4] === "generating" && /*show_progress*/ + u[6] === "full" + ), (!o || c[0] & /*variant, show_progress, border*/ + 4416) && Le( e, "border", /*border*/ - c[12] - ), u[0] & /*absolute*/ - 1024 && vt( + u[12] + ), c[0] & /*absolute*/ + 1024 && Ft( e, "position", /*absolute*/ - c[10] ? "absolute" : "static" - ), u[0] & /*absolute*/ - 1024 && vt( + u[10] ? "absolute" : "static" + ), c[0] & /*absolute*/ + 1024 && Ft( e, "padding", /*absolute*/ - c[10] ? "0" : "var(--size-8) 0" + u[10] ? "0" : "var(--size-8) 0" ); }, - i(c) { - o || (Ge(n), o = !0); + i(u) { + o || (je(n), o = !0); }, - o(c) { - it(n), o = !1; + o(u) { + ot(n), o = !1; }, - d(c) { - c && I(e), ~t && r[t].d(), i[33](null); + d(u) { + u && R(e), ~t && r[t].d(), i[33](null); } }; } @@ -7165,41 +7165,41 @@ var Kr = function(i, e, t, n) { }); } return new (t || (t = Promise))(function(o, l) { - function r(u) { + function r(c) { try { - c(n.next(u)); - } catch (m) { - l(m); + u(n.next(c)); + } catch (h) { + l(h); } } - function s(u) { + function s(c) { try { - c(n.throw(u)); - } catch (m) { - l(m); + u(n.throw(c)); + } catch (h) { + l(h); } } - function c(u) { - u.done ? o(u.value) : a(u.value).then(r, s); + function u(c) { + c.done ? o(c.value) : a(c.value).then(r, s); } - c((n = n.apply(i, e || [])).next()); + u((n = n.apply(i, e || [])).next()); }); }; -let dn = [], Nn = !1; -const Qr = typeof window < "u", Dl = Qr ? window.requestAnimationFrame : (i) => { +let vn = [], Hn = !1; +const Qr = typeof window < "u", bl = Qr ? window.requestAnimationFrame : (i) => { }; function Jr(i) { return Kr(this, arguments, void 0, function* (e, t = !0) { if (!(window.__gradio_mode__ === "website" || window.__gradio_mode__ !== "app" && t !== !0)) { - if (dn.push(e), !Nn) Nn = !0; + if (vn.push(e), !Hn) Hn = !0; else return; - yield xr(), Dl(() => { + yield xr(), bl(() => { let n = [0, 0]; - for (let a = 0; a < dn.length; a++) { - const l = dn[a].getBoundingClientRect(); + for (let a = 0; a < vn.length; a++) { + const l = vn[a].getBoundingClientRect(); (a === 0 || l.top + window.scrollY <= n[0]) && (n[0] = l.top + window.scrollY, n[1] = a); } - window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), Nn = !1, dn = []; + window.scrollTo({ top: n[0] - 20, behavior: "smooth" }), Hn = !1, vn = []; }); } }); @@ -7207,87 +7207,87 @@ function Jr(i) { function es(i, e, t) { let n, { $$slots: a = {}, $$scope: o } = e; const l = qr(); - let { i18n: r } = e, { eta: s = null } = e, { queue_position: c } = e, { queue_size: u } = e, { status: m } = e, { scroll_to_output: d = !1 } = e, { timer: f = !0 } = e, { show_progress: v = "full" } = e, { message: D = null } = e, { progress: b = null } = e, { variant: E = "default" } = e, { loading_text: h = "Loading..." } = e, { absolute: _ = !0 } = e, { translucent: g = !1 } = e, { border: y = !1 } = e, { autoscroll: $ } = e, C, R = !1, S = 0, N = 0, O = null, H = null, Ae = 0, W = null, ve, oe = null, Be = !0; + let { i18n: r } = e, { eta: s = null } = e, { queue_position: u } = e, { queue_size: c } = e, { status: h } = e, { scroll_to_output: d = !1 } = e, { timer: f = !0 } = e, { show_progress: v = "full" } = e, { message: D = null } = e, { progress: b = null } = e, { variant: E = "default" } = e, { loading_text: m = "Loading..." } = e, { absolute: _ = !0 } = e, { translucent: g = !1 } = e, { border: F = !1 } = e, { autoscroll: w } = e, C, I = !1, S = 0, O = 0, q = null, H = null, ke = 0, re = null, ae, se = null, Se = !0; const K = () => { - t(0, s = t(27, O = t(19, w = null))), t(25, S = performance.now()), t(26, N = 0), R = !0, re(); + t(0, s = t(27, q = t(19, $ = null))), t(25, S = performance.now()), t(26, O = 0), I = !0, ue(); }; - function re() { - Dl(() => { - t(26, N = (performance.now() - S) / 1e3), R && re(); + function ue() { + bl(() => { + t(26, O = (performance.now() - S) / 1e3), I && ue(); }); } - function fe() { - t(26, N = 0), t(0, s = t(27, O = t(19, w = null))), R && (R = !1); + function he() { + t(26, O = 0), t(0, s = t(27, q = t(19, $ = null))), I && (I = !1); } Or(() => { - R && fe(); + I && he(); }); - let w = null; + let $ = null; function le(A) { - ea[A ? "unshift" : "push"](() => { - oe = A, t(16, oe), t(7, b), t(14, W), t(15, ve); + ta[A ? "unshift" : "push"](() => { + se = A, t(16, se), t(7, b), t(14, re), t(15, ae); }); } const X = () => { l("clear_status"); }; - function ue(A) { - ea[A ? "unshift" : "push"](() => { + function _e(A) { + ta[A ? "unshift" : "push"](() => { C = A, t(13, C); }); } return i.$$set = (A) => { - "i18n" in A && t(1, r = A.i18n), "eta" in A && t(0, s = A.eta), "queue_position" in A && t(2, c = A.queue_position), "queue_size" in A && t(3, u = A.queue_size), "status" in A && t(4, m = A.status), "scroll_to_output" in A && t(22, d = A.scroll_to_output), "timer" in A && t(5, f = A.timer), "show_progress" in A && t(6, v = A.show_progress), "message" in A && t(23, D = A.message), "progress" in A && t(7, b = A.progress), "variant" in A && t(8, E = A.variant), "loading_text" in A && t(9, h = A.loading_text), "absolute" in A && t(10, _ = A.absolute), "translucent" in A && t(11, g = A.translucent), "border" in A && t(12, y = A.border), "autoscroll" in A && t(24, $ = A.autoscroll), "$$scope" in A && t(29, o = A.$$scope); + "i18n" in A && t(1, r = A.i18n), "eta" in A && t(0, s = A.eta), "queue_position" in A && t(2, u = A.queue_position), "queue_size" in A && t(3, c = A.queue_size), "status" in A && t(4, h = A.status), "scroll_to_output" in A && t(22, d = A.scroll_to_output), "timer" in A && t(5, f = A.timer), "show_progress" in A && t(6, v = A.show_progress), "message" in A && t(23, D = A.message), "progress" in A && t(7, b = A.progress), "variant" in A && t(8, E = A.variant), "loading_text" in A && t(9, m = A.loading_text), "absolute" in A && t(10, _ = A.absolute), "translucent" in A && t(11, g = A.translucent), "border" in A && t(12, F = A.border), "autoscroll" in A && t(24, w = A.autoscroll), "$$scope" in A && t(29, o = A.$$scope); }, i.$$.update = () => { i.$$.dirty[0] & /*eta, old_eta, timer_start, eta_from_start*/ - 436207617 && (s === null && t(0, s = O), s != null && O !== s && (t(28, H = (performance.now() - S) / 1e3 + s), t(19, w = H.toFixed(1)), t(27, O = s))), i.$$.dirty[0] & /*eta_from_start, timer_diff*/ - 335544320 && t(17, Ae = H === null || H <= 0 || !N ? null : Math.min(N / H, 1)), i.$$.dirty[0] & /*progress*/ - 128 && b != null && t(18, Be = !1), i.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/ - 114816 && (b != null ? t(14, W = b.map((A) => { + 436207617 && (s === null && t(0, s = q), s != null && q !== s && (t(28, H = (performance.now() - S) / 1e3 + s), t(19, $ = H.toFixed(1)), t(27, q = s))), i.$$.dirty[0] & /*eta_from_start, timer_diff*/ + 335544320 && t(17, ke = H === null || H <= 0 || !O ? null : Math.min(O / H, 1)), i.$$.dirty[0] & /*progress*/ + 128 && b != null && t(18, Se = !1), i.$$.dirty[0] & /*progress, progress_level, progress_bar, last_progress_level*/ + 114816 && (b != null ? t(14, re = b.map((A) => { if (A.index != null && A.length != null) return A.index / A.length; if (A.progress != null) return A.progress; - })) : t(14, W = null), W ? (t(15, ve = W[W.length - 1]), oe && (ve === 0 ? t(16, oe.style.transition = "0", oe) : t(16, oe.style.transition = "150ms", oe))) : t(15, ve = void 0)), i.$$.dirty[0] & /*status*/ - 16 && (m === "pending" ? K() : fe()), i.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ - 20979728 && C && d && (m === "pending" || m === "complete") && Jr(C, $), i.$$.dirty[0] & /*status, message*/ + })) : t(14, re = null), re ? (t(15, ae = re[re.length - 1]), se && (ae === 0 ? t(16, se.style.transition = "0", se) : t(16, se.style.transition = "150ms", se))) : t(15, ae = void 0)), i.$$.dirty[0] & /*status*/ + 16 && (h === "pending" ? K() : he()), i.$$.dirty[0] & /*el, scroll_to_output, status, autoscroll*/ + 20979728 && C && d && (h === "pending" || h === "complete") && Jr(C, w), i.$$.dirty[0] & /*status, message*/ 8388624, i.$$.dirty[0] & /*timer_diff*/ - 67108864 && t(20, n = N.toFixed(1)); + 67108864 && t(20, n = O.toFixed(1)); }, [ s, r, - c, u, - m, + c, + h, f, v, b, E, - h, + m, _, g, - y, + F, C, - W, - ve, - oe, - Ae, - Be, - w, + re, + ae, + se, + ke, + Se, + $, n, l, d, D, - $, + w, S, - N, O, + q, H, o, a, le, X, - ue + _e ]; } class ts extends Rr { @@ -7323,51 +7323,51 @@ class ts extends Rr { } /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */ const { - entries: bl, - setPrototypeOf: ma, + entries: yl, + setPrototypeOf: ga, isFrozen: ns, getPrototypeOf: is, getOwnPropertyDescriptor: as } = Object; let { - freeze: Fe, - seal: Ne, - create: yl + freeze: we, + seal: ze, + create: Fl } = Object, { - apply: ei, - construct: ti + apply: li, + construct: oi } = typeof Reflect < "u" && Reflect; -Fe || (Fe = function(e) { +we || (we = function(e) { return e; }); -Ne || (Ne = function(e) { +ze || (ze = function(e) { return e; }); -ei || (ei = function(e, t, n) { +li || (li = function(e, t, n) { return e.apply(t, n); }); -ti || (ti = function(e, t) { +oi || (oi = function(e, t) { return new e(...t); }); -const fn = $e(Array.prototype.forEach), ls = $e(Array.prototype.lastIndexOf), ga = $e(Array.prototype.pop), Mt = $e(Array.prototype.push), os = $e(Array.prototype.splice), gn = $e(String.prototype.toLowerCase), Mn = $e(String.prototype.toString), va = $e(String.prototype.match), Pt = $e(String.prototype.replace), rs = $e(String.prototype.indexOf), ss = $e(String.prototype.trim), He = $e(Object.prototype.hasOwnProperty), De = $e(RegExp.prototype.test), zt = us(TypeError); +const Dn = $e(Array.prototype.forEach), ls = $e(Array.prototype.lastIndexOf), va = $e(Array.prototype.pop), jt = $e(Array.prototype.push), os = $e(Array.prototype.splice), wn = $e(String.prototype.toLowerCase), Gn = $e(String.prototype.toString), Da = $e(String.prototype.match), Vt = $e(String.prototype.replace), rs = $e(String.prototype.indexOf), ss = $e(String.prototype.trim), Ge = $e(Object.prototype.hasOwnProperty), be = $e(RegExp.prototype.test), Wt = us(TypeError); function $e(i) { return function(e) { e instanceof RegExp && (e.lastIndex = 0); for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++) n[a - 1] = arguments[a]; - return ei(i, e, n); + return li(i, e, n); }; } function us(i) { return function() { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++) t[n] = arguments[n]; - return ti(i, t); + return oi(i, t); }; } -function P(i, e) { - let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : gn; - ma && ma(i, null); +function M(i, e) { + let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : wn; + ga && ga(i, null); let n = e.length; for (; n--; ) { let a = e[n]; @@ -7381,16 +7381,16 @@ function P(i, e) { } function cs(i) { for (let e = 0; e < i.length; e++) - He(i, e) || (i[e] = null); + Ge(i, e) || (i[e] = null); return i; } -function _t(i) { - const e = yl(null); - for (const [t, n] of bl(i)) - He(i, t) && (Array.isArray(n) ? e[t] = cs(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = _t(n) : e[t] = n); +function pt(i) { + const e = Fl(null); + for (const [t, n] of yl(i)) + Ge(i, t) && (Array.isArray(n) ? e[t] = cs(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = pt(n) : e[t] = n); return e; } -function Ut(i, e) { +function Zt(i, e) { for (; i !== null; ) { const n = as(i, e); if (n) { @@ -7406,13 +7406,13 @@ function Ut(i, e) { } return t; } -const Da = Fe(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Pn = Fe(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), zn = Fe(["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"]), _s = Fe(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Un = Fe(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ds = Fe(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ba = Fe(["#text"]), ya = Fe(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Hn = Fe(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Fa = Fe(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), pn = Fe(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), fs = Ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ps = Ne(/<%[\w\W]*|[\w\W]*%>/gm), hs = Ne(/\$\{[\w\W]*/gm), ms = Ne(/^data-[\-\w.\u00B7-\uFFFF]+$/), gs = Ne(/^aria-[\-\w]+$/), Fl = Ne( +const ba = we(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), jn = we(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Vn = we(["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"]), _s = we(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Wn = we(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ds = we(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ya = we(["#text"]), Fa = we(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Zn = we(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), wa = we(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), bn = we(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), fs = ze(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ps = ze(/<%[\w\W]*|[\w\W]*%>/gm), hs = ze(/\$\{[\w\W]*/gm), ms = ze(/^data-[\-\w.\u00B7-\uFFFF]+$/), gs = ze(/^aria-[\-\w]+$/), wl = ze( /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape -), vs = Ne(/^(?:\w+script|data):/i), Ds = Ne( +), vs = ze(/^(?:\w+script|data):/i), Ds = ze( /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex -), $l = Ne(/^html$/i), bs = Ne(/^[a-z][.\w]*(-[.\w]+)+$/i); +), $l = ze(/^html$/i), bs = ze(/^[a-z][.\w]*(-[.\w]+)+$/i); var $a = /* @__PURE__ */ Object.freeze({ __proto__: null, ARIA_ATTR: gs, @@ -7421,12 +7421,12 @@ var $a = /* @__PURE__ */ Object.freeze({ DATA_ATTR: ms, DOCTYPE_NAME: $l, ERB_EXPR: ps, - IS_ALLOWED_URI: Fl, + IS_ALLOWED_URI: wl, IS_SCRIPT_OR_DATA: vs, MUSTACHE_EXPR: fs, TMPLIT_EXPR: hs }); -const Ht = { +const Yt = { element: 1, text: 3, // Deprecated @@ -7454,7 +7454,7 @@ const Ht = { } catch { return console.warn("TrustedTypes policy " + o + " could not be created."), null; } -}, wa = function() { +}, ka = function() { return { afterSanitizeAttributes: [], afterSanitizeElements: [], @@ -7467,10 +7467,10 @@ const Ht = { uponSanitizeShadowNode: [] }; }; -function wl() { +function kl() { let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ys(); - const e = (B) => wl(B); - if (e.version = "3.2.6", e.removed = [], !i || !i.document || i.document.nodeType !== Ht.document || !i.Element) + const e = (B) => kl(B); + if (e.version = "3.2.6", e.removed = [], !i || !i.document || i.document.nodeType !== Yt.document || !i.Element) return e.isSupported = !1, e; let { document: t @@ -7480,44 +7480,44 @@ function wl() { HTMLTemplateElement: l, Node: r, Element: s, - NodeFilter: c, - NamedNodeMap: u = i.NamedNodeMap || i.MozNamedAttrMap, - HTMLFormElement: m, + NodeFilter: u, + NamedNodeMap: c = i.NamedNodeMap || i.MozNamedAttrMap, + HTMLFormElement: h, DOMParser: d, trustedTypes: f - } = i, v = s.prototype, D = Ut(v, "cloneNode"), b = Ut(v, "remove"), E = Ut(v, "nextSibling"), h = Ut(v, "childNodes"), _ = Ut(v, "parentNode"); + } = i, v = s.prototype, D = Zt(v, "cloneNode"), b = Zt(v, "remove"), E = Zt(v, "nextSibling"), m = Zt(v, "childNodes"), _ = Zt(v, "parentNode"); if (typeof l == "function") { const B = t.createElement("template"); B.content && B.content.ownerDocument && (t = B.content.ownerDocument); } - let g, y = ""; + let g, F = ""; const { - implementation: $, + implementation: w, createNodeIterator: C, - createDocumentFragment: R, + createDocumentFragment: I, getElementsByTagName: S } = t, { - importNode: N + importNode: O } = n; - let O = wa(); - e.isSupported = typeof bl == "function" && typeof _ == "function" && $ && $.createHTMLDocument !== void 0; + let q = ka(); + e.isSupported = typeof yl == "function" && typeof _ == "function" && w && w.createHTMLDocument !== void 0; const { MUSTACHE_EXPR: H, - ERB_EXPR: Ae, - TMPLIT_EXPR: W, - DATA_ATTR: ve, - ARIA_ATTR: oe, - IS_SCRIPT_OR_DATA: Be, + ERB_EXPR: ke, + TMPLIT_EXPR: re, + DATA_ATTR: ae, + ARIA_ATTR: se, + IS_SCRIPT_OR_DATA: Se, ATTR_WHITESPACE: K, - CUSTOM_ELEMENT: re + CUSTOM_ELEMENT: ue } = $a; let { - IS_ALLOWED_URI: fe - } = $a, w = null; - const le = P({}, [...Da, ...Pn, ...zn, ...Un, ...ba]); + IS_ALLOWED_URI: he + } = $a, $ = null; + const le = M({}, [...ba, ...jn, ...Vn, ...Wn, ...ya]); let X = null; - const ue = P({}, [...ya, ...Hn, ...Fa, ...pn]); - let A = Object.seal(yl(null, { + const _e = M({}, [...Fa, ...Zn, ...wa, ...bn]); + let A = Object.seal(Fl(null, { tagNameCheck: { writable: !0, configurable: !1, @@ -7536,47 +7536,47 @@ function wl() { enumerable: !0, value: !1 } - })), we = null, Ve = null, pt = !0, ht = !0, mt = !1, lt = !0, We = !1, Ze = !0, ot = !1, F = !1, L = !1, te = !1, Ce = !1, gt = !1, ci = !0, _i = !1; - const Rl = "user-content-"; - let kn = !0, Lt = !1, kt = {}, Et = null; - const di = P({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); - let fi = null; - const pi = P({}, ["audio", "video", "img", "source", "image", "track"]); - let En = null; - const hi = P({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Jt = "http://www.w3.org/1998/Math/MathML", en = "http://www.w3.org/2000/svg", rt = "http://www.w3.org/1999/xhtml"; - let At = rt, An = !1, Cn = null; - const Il = P({}, [Jt, en, rt], Mn); - let tn = P({}, ["mi", "mo", "mn", "ms", "mtext"]), nn = P({}, ["annotation-xml"]); - const Ll = P({}, ["title", "style", "font", "a", "script"]); - let xt = null; + })), Ee = null, We = null, gt = !0, vt = !0, Dt = !1, st = !0, Ze = !1, Ye = !0, ut = !1, zt = !1, Mt = !1, y = !1, L = !1, W = !1, oe = !0, Re = !1; + const kt = "user-content-"; + let bt = !0, Et = !1, yt = {}, Xe = null; + const Ke = M({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]); + let Bt = null; + const hi = M({}, ["audio", "video", "img", "source", "image", "track"]); + let Bn = null; + const mi = M({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), on = "http://www.w3.org/1998/Math/MathML", rn = "http://www.w3.org/2000/svg", ct = "http://www.w3.org/1999/xhtml"; + let Rt = ct, Rn = !1, In = null; + const Il = M({}, [on, rn, ct], Gn); + let sn = M({}, ["mi", "mo", "mn", "ms", "mtext"]), un = M({}, ["annotation-xml"]); + const Ll = M({}, ["title", "style", "font", "a", "script"]); + let Pt = null; const xl = ["application/xhtml+xml", "text/html"], Ol = "text/html"; - let ce = null, Ct = null; - const ql = t.createElement("form"), mi = function(p) { + let de = null, It = null; + const ql = t.createElement("form"), gi = function(p) { return p instanceof RegExp || p instanceof Function; - }, Sn = function() { + }, Ln = function() { let p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - if (!(Ct && Ct === p)) { - if ((!p || typeof p != "object") && (p = {}), p = _t(p), xt = // eslint-disable-next-line unicorn/prefer-includes - xl.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? Ol : p.PARSER_MEDIA_TYPE, ce = xt === "application/xhtml+xml" ? Mn : gn, w = He(p, "ALLOWED_TAGS") ? P({}, p.ALLOWED_TAGS, ce) : le, X = He(p, "ALLOWED_ATTR") ? P({}, p.ALLOWED_ATTR, ce) : ue, Cn = He(p, "ALLOWED_NAMESPACES") ? P({}, p.ALLOWED_NAMESPACES, Mn) : Il, En = He(p, "ADD_URI_SAFE_ATTR") ? P(_t(hi), p.ADD_URI_SAFE_ATTR, ce) : hi, fi = He(p, "ADD_DATA_URI_TAGS") ? P(_t(pi), p.ADD_DATA_URI_TAGS, ce) : pi, Et = He(p, "FORBID_CONTENTS") ? P({}, p.FORBID_CONTENTS, ce) : di, we = He(p, "FORBID_TAGS") ? P({}, p.FORBID_TAGS, ce) : _t({}), Ve = He(p, "FORBID_ATTR") ? P({}, p.FORBID_ATTR, ce) : _t({}), kt = He(p, "USE_PROFILES") ? p.USE_PROFILES : !1, pt = p.ALLOW_ARIA_ATTR !== !1, ht = p.ALLOW_DATA_ATTR !== !1, mt = p.ALLOW_UNKNOWN_PROTOCOLS || !1, lt = p.ALLOW_SELF_CLOSE_IN_ATTR !== !1, We = p.SAFE_FOR_TEMPLATES || !1, Ze = p.SAFE_FOR_XML !== !1, ot = p.WHOLE_DOCUMENT || !1, te = p.RETURN_DOM || !1, Ce = p.RETURN_DOM_FRAGMENT || !1, gt = p.RETURN_TRUSTED_TYPE || !1, L = p.FORCE_BODY || !1, ci = p.SANITIZE_DOM !== !1, _i = p.SANITIZE_NAMED_PROPS || !1, kn = p.KEEP_CONTENT !== !1, Lt = p.IN_PLACE || !1, fe = p.ALLOWED_URI_REGEXP || Fl, At = p.NAMESPACE || rt, tn = p.MATHML_TEXT_INTEGRATION_POINTS || tn, nn = p.HTML_INTEGRATION_POINTS || nn, A = p.CUSTOM_ELEMENT_HANDLING || {}, p.CUSTOM_ELEMENT_HANDLING && mi(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (A.tagNameCheck = p.CUSTOM_ELEMENT_HANDLING.tagNameCheck), p.CUSTOM_ELEMENT_HANDLING && mi(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (A.attributeNameCheck = p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), p.CUSTOM_ELEMENT_HANDLING && typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (A.allowCustomizedBuiltInElements = p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), We && (ht = !1), Ce && (te = !0), kt && (w = P({}, ba), X = [], kt.html === !0 && (P(w, Da), P(X, ya)), kt.svg === !0 && (P(w, Pn), P(X, Hn), P(X, pn)), kt.svgFilters === !0 && (P(w, zn), P(X, Hn), P(X, pn)), kt.mathMl === !0 && (P(w, Un), P(X, Fa), P(X, pn))), p.ADD_TAGS && (w === le && (w = _t(w)), P(w, p.ADD_TAGS, ce)), p.ADD_ATTR && (X === ue && (X = _t(X)), P(X, p.ADD_ATTR, ce)), p.ADD_URI_SAFE_ATTR && P(En, p.ADD_URI_SAFE_ATTR, ce), p.FORBID_CONTENTS && (Et === di && (Et = _t(Et)), P(Et, p.FORBID_CONTENTS, ce)), kn && (w["#text"] = !0), ot && P(w, ["html", "head", "body"]), w.table && (P(w, ["tbody"]), delete we.tbody), p.TRUSTED_TYPES_POLICY) { + if (!(It && It === p)) { + if ((!p || typeof p != "object") && (p = {}), p = pt(p), Pt = // eslint-disable-next-line unicorn/prefer-includes + xl.indexOf(p.PARSER_MEDIA_TYPE) === -1 ? Ol : p.PARSER_MEDIA_TYPE, de = Pt === "application/xhtml+xml" ? Gn : wn, $ = Ge(p, "ALLOWED_TAGS") ? M({}, p.ALLOWED_TAGS, de) : le, X = Ge(p, "ALLOWED_ATTR") ? M({}, p.ALLOWED_ATTR, de) : _e, In = Ge(p, "ALLOWED_NAMESPACES") ? M({}, p.ALLOWED_NAMESPACES, Gn) : Il, Bn = Ge(p, "ADD_URI_SAFE_ATTR") ? M(pt(mi), p.ADD_URI_SAFE_ATTR, de) : mi, Bt = Ge(p, "ADD_DATA_URI_TAGS") ? M(pt(hi), p.ADD_DATA_URI_TAGS, de) : hi, Xe = Ge(p, "FORBID_CONTENTS") ? M({}, p.FORBID_CONTENTS, de) : Ke, Ee = Ge(p, "FORBID_TAGS") ? M({}, p.FORBID_TAGS, de) : pt({}), We = Ge(p, "FORBID_ATTR") ? M({}, p.FORBID_ATTR, de) : pt({}), yt = Ge(p, "USE_PROFILES") ? p.USE_PROFILES : !1, gt = p.ALLOW_ARIA_ATTR !== !1, vt = p.ALLOW_DATA_ATTR !== !1, Dt = p.ALLOW_UNKNOWN_PROTOCOLS || !1, st = p.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ze = p.SAFE_FOR_TEMPLATES || !1, Ye = p.SAFE_FOR_XML !== !1, ut = p.WHOLE_DOCUMENT || !1, y = p.RETURN_DOM || !1, L = p.RETURN_DOM_FRAGMENT || !1, W = p.RETURN_TRUSTED_TYPE || !1, Mt = p.FORCE_BODY || !1, oe = p.SANITIZE_DOM !== !1, Re = p.SANITIZE_NAMED_PROPS || !1, bt = p.KEEP_CONTENT !== !1, Et = p.IN_PLACE || !1, he = p.ALLOWED_URI_REGEXP || wl, Rt = p.NAMESPACE || ct, sn = p.MATHML_TEXT_INTEGRATION_POINTS || sn, un = p.HTML_INTEGRATION_POINTS || un, A = p.CUSTOM_ELEMENT_HANDLING || {}, p.CUSTOM_ELEMENT_HANDLING && gi(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (A.tagNameCheck = p.CUSTOM_ELEMENT_HANDLING.tagNameCheck), p.CUSTOM_ELEMENT_HANDLING && gi(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (A.attributeNameCheck = p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), p.CUSTOM_ELEMENT_HANDLING && typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (A.allowCustomizedBuiltInElements = p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ze && (vt = !1), L && (y = !0), yt && ($ = M({}, ya), X = [], yt.html === !0 && (M($, ba), M(X, Fa)), yt.svg === !0 && (M($, jn), M(X, Zn), M(X, bn)), yt.svgFilters === !0 && (M($, Vn), M(X, Zn), M(X, bn)), yt.mathMl === !0 && (M($, Wn), M(X, wa), M(X, bn))), p.ADD_TAGS && ($ === le && ($ = pt($)), M($, p.ADD_TAGS, de)), p.ADD_ATTR && (X === _e && (X = pt(X)), M(X, p.ADD_ATTR, de)), p.ADD_URI_SAFE_ATTR && M(Bn, p.ADD_URI_SAFE_ATTR, de), p.FORBID_CONTENTS && (Xe === Ke && (Xe = pt(Xe)), M(Xe, p.FORBID_CONTENTS, de)), bt && ($["#text"] = !0), ut && M($, ["html", "head", "body"]), $.table && (M($, ["tbody"]), delete Ee.tbody), p.TRUSTED_TYPES_POLICY) { if (typeof p.TRUSTED_TYPES_POLICY.createHTML != "function") - throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); + throw Wt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.'); if (typeof p.TRUSTED_TYPES_POLICY.createScriptURL != "function") - throw zt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); - g = p.TRUSTED_TYPES_POLICY, y = g.createHTML(""); + throw Wt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.'); + g = p.TRUSTED_TYPES_POLICY, F = g.createHTML(""); } else - g === void 0 && (g = Fs(f, a)), g !== null && typeof y == "string" && (y = g.createHTML("")); - Fe && Fe(p), Ct = p; + g === void 0 && (g = Fs(f, a)), g !== null && typeof F == "string" && (F = g.createHTML("")); + we && we(p), It = p; } - }, gi = P({}, [...Pn, ...zn, ..._s]), vi = P({}, [...Un, ...ds]), Nl = function(p) { + }, vi = M({}, [...jn, ...Vn, ..._s]), Di = M({}, [...Wn, ...ds]), Nl = function(p) { let k = _(p); (!k || !k.tagName) && (k = { - namespaceURI: At, + namespaceURI: Rt, tagName: "template" }); - const T = gn(p.tagName), ee = gn(k.tagName); - return Cn[p.namespaceURI] ? p.namespaceURI === en ? k.namespaceURI === rt ? T === "svg" : k.namespaceURI === Jt ? T === "svg" && (ee === "annotation-xml" || tn[ee]) : !!gi[T] : p.namespaceURI === Jt ? k.namespaceURI === rt ? T === "math" : k.namespaceURI === en ? T === "math" && nn[ee] : !!vi[T] : p.namespaceURI === rt ? k.namespaceURI === en && !nn[ee] || k.namespaceURI === Jt && !tn[ee] ? !1 : !vi[T] && (Ll[T] || !gi[T]) : !!(xt === "application/xhtml+xml" && Cn[p.namespaceURI]) : !1; - }, Ye = function(p) { - Mt(e.removed, { + const T = wn(p.tagName), ee = wn(k.tagName); + return In[p.namespaceURI] ? p.namespaceURI === rn ? k.namespaceURI === ct ? T === "svg" : k.namespaceURI === on ? T === "svg" && (ee === "annotation-xml" || sn[ee]) : !!vi[T] : p.namespaceURI === on ? k.namespaceURI === ct ? T === "math" : k.namespaceURI === rn ? T === "math" && un[ee] : !!Di[T] : p.namespaceURI === ct ? k.namespaceURI === rn && !un[ee] || k.namespaceURI === on && !sn[ee] ? !1 : !Di[T] && (Ll[T] || !vi[T]) : !!(Pt === "application/xhtml+xml" && In[p.namespaceURI]) : !1; + }, Qe = function(p) { + jt(e.removed, { element: p }); try { @@ -7584,22 +7584,22 @@ function wl() { } catch { b(p); } - }, St = function(p, k) { + }, Lt = function(p, k) { try { - Mt(e.removed, { + jt(e.removed, { attribute: k.getAttributeNode(p), from: k }); } catch { - Mt(e.removed, { + jt(e.removed, { attribute: null, from: k }); } if (k.removeAttribute(p), p === "is") - if (te || Ce) + if (y || L) try { - Ye(k); + Qe(k); } catch { } else @@ -7607,96 +7607,96 @@ function wl() { k.setAttribute(p, ""); } catch { } - }, Di = function(p) { + }, bi = function(p) { let k = null, T = null; - if (L) + if (Mt) p = "" + p; else { - const se = va(p, /^[\r\n\t ]+/); - T = se && se[0]; + const ce = Da(p, /^[\r\n\t ]+/); + T = ce && ce[0]; } - xt === "application/xhtml+xml" && At === rt && (p = '' + p + ""); + Pt === "application/xhtml+xml" && Rt === ct && (p = '' + p + ""); const ee = g ? g.createHTML(p) : p; - if (At === rt) + if (Rt === ct) try { - k = new d().parseFromString(ee, xt); + k = new d().parseFromString(ee, Pt); } catch { } if (!k || !k.documentElement) { - k = $.createDocument(At, "template", null); + k = w.createDocument(Rt, "template", null); try { - k.documentElement.innerHTML = An ? y : ee; + k.documentElement.innerHTML = Rn ? F : ee; } catch { } } - const pe = k.body || k.documentElement; - return p && T && pe.insertBefore(t.createTextNode(T), pe.childNodes[0] || null), At === rt ? S.call(k, ot ? "html" : "body")[0] : ot ? k.documentElement : pe; - }, bi = function(p) { + const me = k.body || k.documentElement; + return p && T && me.insertBefore(t.createTextNode(T), me.childNodes[0] || null), Rt === ct ? S.call(k, ut ? "html" : "body")[0] : ut ? k.documentElement : me; + }, yi = function(p) { return C.call( p.ownerDocument || p, p, // eslint-disable-next-line no-bitwise - c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, + u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION, null ); - }, Tn = function(p) { - return p instanceof m && (typeof p.nodeName != "string" || typeof p.textContent != "string" || typeof p.removeChild != "function" || !(p.attributes instanceof u) || typeof p.removeAttribute != "function" || typeof p.setAttribute != "function" || typeof p.namespaceURI != "string" || typeof p.insertBefore != "function" || typeof p.hasChildNodes != "function"); - }, yi = function(p) { + }, xn = function(p) { + return p instanceof h && (typeof p.nodeName != "string" || typeof p.textContent != "string" || typeof p.removeChild != "function" || !(p.attributes instanceof c) || typeof p.removeAttribute != "function" || typeof p.setAttribute != "function" || typeof p.namespaceURI != "string" || typeof p.insertBefore != "function" || typeof p.hasChildNodes != "function"); + }, Fi = function(p) { return typeof r == "function" && p instanceof r; }; - function st(B, p, k) { - fn(B, (T) => { - T.call(e, p, k, Ct); + function _t(B, p, k) { + Dn(B, (T) => { + T.call(e, p, k, It); }); } - const Fi = function(p) { + const wi = function(p) { let k = null; - if (st(O.beforeSanitizeElements, p, null), Tn(p)) - return Ye(p), !0; - const T = ce(p.nodeName); - if (st(O.uponSanitizeElement, p, { + if (_t(q.beforeSanitizeElements, p, null), xn(p)) + return Qe(p), !0; + const T = de(p.nodeName); + if (_t(q.uponSanitizeElement, p, { tagName: T, - allowedTags: w - }), Ze && p.hasChildNodes() && !yi(p.firstElementChild) && De(/<[/\w!]/g, p.innerHTML) && De(/<[/\w!]/g, p.textContent) || p.nodeType === Ht.progressingInstruction || Ze && p.nodeType === Ht.comment && De(/<[/\w]/g, p.data)) - return Ye(p), !0; - if (!w[T] || we[T]) { - if (!we[T] && wi(T) && (A.tagNameCheck instanceof RegExp && De(A.tagNameCheck, T) || A.tagNameCheck instanceof Function && A.tagNameCheck(T))) + allowedTags: $ + }), Ye && p.hasChildNodes() && !Fi(p.firstElementChild) && be(/<[/\w!]/g, p.innerHTML) && be(/<[/\w!]/g, p.textContent) || p.nodeType === Yt.progressingInstruction || Ye && p.nodeType === Yt.comment && be(/<[/\w]/g, p.data)) + return Qe(p), !0; + if (!$[T] || Ee[T]) { + if (!Ee[T] && ki(T) && (A.tagNameCheck instanceof RegExp && be(A.tagNameCheck, T) || A.tagNameCheck instanceof Function && A.tagNameCheck(T))) return !1; - if (kn && !Et[T]) { - const ee = _(p) || p.parentNode, pe = h(p) || p.childNodes; - if (pe && ee) { - const se = pe.length; - for (let ke = se - 1; ke >= 0; --ke) { - const ut = D(pe[ke], !0); - ut.__removalCount = (p.__removalCount || 0) + 1, ee.insertBefore(ut, E(p)); + if (bt && !Xe[T]) { + const ee = _(p) || p.parentNode, me = m(p) || p.childNodes; + if (me && ee) { + const ce = me.length; + for (let Ae = ce - 1; Ae >= 0; --Ae) { + const dt = D(me[Ae], !0); + dt.__removalCount = (p.__removalCount || 0) + 1, ee.insertBefore(dt, E(p)); } } } - return Ye(p), !0; + return Qe(p), !0; } - return p instanceof s && !Nl(p) || (T === "noscript" || T === "noembed" || T === "noframes") && De(/<\/no(script|embed|frames)/i, p.innerHTML) ? (Ye(p), !0) : (We && p.nodeType === Ht.text && (k = p.textContent, fn([H, Ae, W], (ee) => { - k = Pt(k, ee, " "); - }), p.textContent !== k && (Mt(e.removed, { + return p instanceof s && !Nl(p) || (T === "noscript" || T === "noembed" || T === "noframes") && be(/<\/no(script|embed|frames)/i, p.innerHTML) ? (Qe(p), !0) : (Ze && p.nodeType === Yt.text && (k = p.textContent, Dn([H, ke, re], (ee) => { + k = Vt(k, ee, " "); + }), p.textContent !== k && (jt(e.removed, { element: p.cloneNode() - }), p.textContent = k)), st(O.afterSanitizeElements, p, null), !1); + }), p.textContent = k)), _t(q.afterSanitizeElements, p, null), !1); }, $i = function(p, k, T) { - if (ci && (k === "id" || k === "name") && (T in t || T in ql)) + if (oe && (k === "id" || k === "name") && (T in t || T in ql)) return !1; - if (!(ht && !Ve[k] && De(ve, k))) { - if (!(pt && De(oe, k))) { - if (!X[k] || Ve[k]) { + if (!(vt && !We[k] && be(ae, k))) { + if (!(gt && be(se, k))) { + if (!X[k] || We[k]) { if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck - !(wi(p) && (A.tagNameCheck instanceof RegExp && De(A.tagNameCheck, p) || A.tagNameCheck instanceof Function && A.tagNameCheck(p)) && (A.attributeNameCheck instanceof RegExp && De(A.attributeNameCheck, k) || A.attributeNameCheck instanceof Function && A.attributeNameCheck(k)) || // Alternative, second condition checks if it's an `is`-attribute, AND + !(ki(p) && (A.tagNameCheck instanceof RegExp && be(A.tagNameCheck, p) || A.tagNameCheck instanceof Function && A.tagNameCheck(p)) && (A.attributeNameCheck instanceof RegExp && be(A.attributeNameCheck, k) || A.attributeNameCheck instanceof Function && A.attributeNameCheck(k)) || // Alternative, second condition checks if it's an `is`-attribute, AND // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck - k === "is" && A.allowCustomizedBuiltInElements && (A.tagNameCheck instanceof RegExp && De(A.tagNameCheck, T) || A.tagNameCheck instanceof Function && A.tagNameCheck(T))) + k === "is" && A.allowCustomizedBuiltInElements && (A.tagNameCheck instanceof RegExp && be(A.tagNameCheck, T) || A.tagNameCheck instanceof Function && A.tagNameCheck(T))) ) return !1; - } else if (!En[k]) { - if (!De(fe, Pt(T, K, ""))) { - if (!((k === "src" || k === "xlink:href" || k === "href") && p !== "script" && rs(T, "data:") === 0 && fi[p])) { - if (!(mt && !De(Be, Pt(T, K, "")))) { + } else if (!Bn[k]) { + if (!be(he, Vt(T, K, ""))) { + if (!((k === "src" || k === "xlink:href" || k === "href") && p !== "script" && rs(T, "data:") === 0 && Bt[p])) { + if (!(Dt && !be(Se, Vt(T, K, "")))) { if (T) return !1; } @@ -7706,14 +7706,14 @@ function wl() { } } return !0; - }, wi = function(p) { - return p !== "annotation-xml" && va(p, re); }, ki = function(p) { - st(O.beforeSanitizeAttributes, p, null); + return p !== "annotation-xml" && Da(p, ue); + }, Ei = function(p) { + _t(q.beforeSanitizeAttributes, p, null); const { attributes: k } = p; - if (!k || Tn(p)) + if (!k || xn(p)) return; const T = { attrName: "", @@ -7724,274 +7724,274 @@ function wl() { }; let ee = k.length; for (; ee--; ) { - const pe = k[ee], { - name: se, - namespaceURI: ke, - value: ut - } = pe, Ot = ce(se), Bn = ut; - let he = se === "value" ? Bn : ss(Bn); - if (T.attrName = Ot, T.attrValue = he, T.keepAttr = !0, T.forceKeepAttr = void 0, st(O.uponSanitizeAttribute, p, T), he = T.attrValue, _i && (Ot === "id" || Ot === "name") && (St(se, p), he = Rl + he), Ze && De(/((--!?|])>)|<\/(style|title)/i, he)) { - St(se, p); + const me = k[ee], { + name: ce, + namespaceURI: Ae, + value: dt + } = me, Ut = de(ce), On = dt; + let ge = ce === "value" ? On : ss(On); + if (T.attrName = Ut, T.attrValue = ge, T.keepAttr = !0, T.forceKeepAttr = void 0, _t(q.uponSanitizeAttribute, p, T), ge = T.attrValue, Re && (Ut === "id" || Ut === "name") && (Lt(ce, p), ge = kt + ge), Ye && be(/((--!?|])>)|<\/(style|title)/i, ge)) { + Lt(ce, p); continue; } if (T.forceKeepAttr) continue; if (!T.keepAttr) { - St(se, p); + Lt(ce, p); continue; } - if (!lt && De(/\/>/i, he)) { - St(se, p); + if (!st && be(/\/>/i, ge)) { + Lt(ce, p); continue; } - We && fn([H, Ae, W], (Ai) => { - he = Pt(he, Ai, " "); + Ze && Dn([H, ke, re], (Ci) => { + ge = Vt(ge, Ci, " "); }); - const Ei = ce(p.nodeName); - if (!$i(Ei, Ot, he)) { - St(se, p); + const Ai = de(p.nodeName); + if (!$i(Ai, Ut, ge)) { + Lt(ce, p); continue; } - if (g && typeof f == "object" && typeof f.getAttributeType == "function" && !ke) - switch (f.getAttributeType(Ei, Ot)) { + if (g && typeof f == "object" && typeof f.getAttributeType == "function" && !Ae) + switch (f.getAttributeType(Ai, Ut)) { case "TrustedHTML": { - he = g.createHTML(he); + ge = g.createHTML(ge); break; } case "TrustedScriptURL": { - he = g.createScriptURL(he); + ge = g.createScriptURL(ge); break; } } - if (he !== Bn) + if (ge !== On) try { - ke ? p.setAttributeNS(ke, se, he) : p.setAttribute(se, he), Tn(p) ? Ye(p) : ga(e.removed); + Ae ? p.setAttributeNS(Ae, ce, ge) : p.setAttribute(ce, ge), xn(p) ? Qe(p) : va(e.removed); } catch { - St(se, p); + Lt(ce, p); } } - st(O.afterSanitizeAttributes, p, null); - }, Ml = function B(p) { + _t(q.afterSanitizeAttributes, p, null); + }, zl = function B(p) { let k = null; - const T = bi(p); - for (st(O.beforeSanitizeShadowDOM, p, null); k = T.nextNode(); ) - st(O.uponSanitizeShadowNode, k, null), Fi(k), ki(k), k.content instanceof o && B(k.content); - st(O.afterSanitizeShadowDOM, p, null); + const T = yi(p); + for (_t(q.beforeSanitizeShadowDOM, p, null); k = T.nextNode(); ) + _t(q.uponSanitizeShadowNode, k, null), wi(k), Ei(k), k.content instanceof o && B(k.content); + _t(q.afterSanitizeShadowDOM, p, null); }; return e.sanitize = function(B) { - let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = null, T = null, ee = null, pe = null; - if (An = !B, An && (B = ""), typeof B != "string" && !yi(B)) + let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = null, T = null, ee = null, me = null; + if (Rn = !B, Rn && (B = ""), typeof B != "string" && !Fi(B)) if (typeof B.toString == "function") { if (B = B.toString(), typeof B != "string") - throw zt("dirty is not a string, aborting"); + throw Wt("dirty is not a string, aborting"); } else - throw zt("toString is not a function"); + throw Wt("toString is not a function"); if (!e.isSupported) return B; - if (F || Sn(p), e.removed = [], typeof B == "string" && (Lt = !1), Lt) { + if (zt || Ln(p), e.removed = [], typeof B == "string" && (Et = !1), Et) { if (B.nodeName) { - const ut = ce(B.nodeName); - if (!w[ut] || we[ut]) - throw zt("root node is forbidden and cannot be sanitized in-place"); + const dt = de(B.nodeName); + if (!$[dt] || Ee[dt]) + throw Wt("root node is forbidden and cannot be sanitized in-place"); } } else if (B instanceof r) - k = Di(""), T = k.ownerDocument.importNode(B, !0), T.nodeType === Ht.element && T.nodeName === "BODY" || T.nodeName === "HTML" ? k = T : k.appendChild(T); + k = bi(""), T = k.ownerDocument.importNode(B, !0), T.nodeType === Yt.element && T.nodeName === "BODY" || T.nodeName === "HTML" ? k = T : k.appendChild(T); else { - if (!te && !We && !ot && // eslint-disable-next-line unicorn/prefer-includes + if (!y && !Ze && !ut && // eslint-disable-next-line unicorn/prefer-includes B.indexOf("<") === -1) - return g && gt ? g.createHTML(B) : B; - if (k = Di(B), !k) - return te ? null : gt ? y : ""; + return g && W ? g.createHTML(B) : B; + if (k = bi(B), !k) + return y ? null : W ? F : ""; } - k && L && Ye(k.firstChild); - const se = bi(Lt ? B : k); - for (; ee = se.nextNode(); ) - Fi(ee), ki(ee), ee.content instanceof o && Ml(ee.content); - if (Lt) + k && Mt && Qe(k.firstChild); + const ce = yi(Et ? B : k); + for (; ee = ce.nextNode(); ) + wi(ee), Ei(ee), ee.content instanceof o && zl(ee.content); + if (Et) return B; - if (te) { - if (Ce) - for (pe = R.call(k.ownerDocument); k.firstChild; ) - pe.appendChild(k.firstChild); + if (y) { + if (L) + for (me = I.call(k.ownerDocument); k.firstChild; ) + me.appendChild(k.firstChild); else - pe = k; - return (X.shadowroot || X.shadowrootmode) && (pe = N.call(n, pe, !0)), pe; + me = k; + return (X.shadowroot || X.shadowrootmode) && (me = O.call(n, me, !0)), me; } - let ke = ot ? k.outerHTML : k.innerHTML; - return ot && w["!doctype"] && k.ownerDocument && k.ownerDocument.doctype && k.ownerDocument.doctype.name && De($l, k.ownerDocument.doctype.name) && (ke = " -` + ke), We && fn([H, Ae, W], (ut) => { - ke = Pt(ke, ut, " "); - }), g && gt ? g.createHTML(ke) : ke; + let Ae = ut ? k.outerHTML : k.innerHTML; + return ut && $["!doctype"] && k.ownerDocument && k.ownerDocument.doctype && k.ownerDocument.doctype.name && be($l, k.ownerDocument.doctype.name) && (Ae = " +` + Ae), Ze && Dn([H, ke, re], (dt) => { + Ae = Vt(Ae, dt, " "); + }), g && W ? g.createHTML(Ae) : Ae; }, e.setConfig = function() { let B = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; - Sn(B), F = !0; + Ln(B), zt = !0; }, e.clearConfig = function() { - Ct = null, F = !1; + It = null, zt = !1; }, e.isValidAttribute = function(B, p, k) { - Ct || Sn({}); - const T = ce(B), ee = ce(p); + It || Ln({}); + const T = de(B), ee = de(p); return $i(T, ee, k); }, e.addHook = function(B, p) { - typeof p == "function" && Mt(O[B], p); + typeof p == "function" && jt(q[B], p); }, e.removeHook = function(B, p) { if (p !== void 0) { - const k = ls(O[B], p); - return k === -1 ? void 0 : os(O[B], k, 1)[0]; + const k = ls(q[B], p); + return k === -1 ? void 0 : os(q[B], k, 1)[0]; } - return ga(O[B]); + return va(q[B]); }, e.removeHooks = function(B) { - O[B] = []; + q[B] = []; }, e.removeAllHooks = function() { - O = wa(); + q = ka(); }, e; } -wl(); +kl(); const { - HtmlTagHydration: Vk, - SvelteComponent: Wk, - add_render_callback: Zk, - append_hydration: Yk, - attr: Xk, - bubble: Kk, - check_outros: Qk, - children: Jk, - claim_component: e2, - claim_element: t2, - claim_html_tag: n2, - claim_space: i2, - claim_text: a2, - create_component: l2, - create_in_transition: o2, - create_out_transition: r2, - destroy_component: s2, - detach: u2, - element: c2, - get_svelte_dataset: _2, - group_outros: d2, - init: f2, - insert_hydration: p2, - listen: h2, - mount_component: m2, - run_all: g2, - safe_not_equal: v2, - set_data: D2, - space: b2, - stop_propagation: y2, - text: F2, - toggle_class: $2, - transition_in: w2, - transition_out: k2 -} = window.__gradio__svelte__internal, { createEventDispatcher: E2, onMount: A2 } = window.__gradio__svelte__internal, { - SvelteComponent: C2, - append_hydration: S2, - attr: T2, - bubble: B2, - check_outros: R2, - children: I2, - claim_component: L2, - claim_element: x2, - claim_space: O2, - create_animation: q2, - create_component: N2, - destroy_component: M2, - detach: P2, - element: z2, - ensure_array_like: U2, - fix_and_outro_and_destroy_block: H2, - fix_position: G2, - group_outros: j2, - init: V2, - insert_hydration: W2, - mount_component: Z2, - noop: Y2, - safe_not_equal: X2, - set_style: K2, - space: Q2, - transition_in: J2, - transition_out: eE, - update_keyed_each: tE + HtmlTagHydration: Wk, + SvelteComponent: Zk, + add_render_callback: Yk, + append_hydration: Xk, + attr: Kk, + bubble: Qk, + check_outros: Jk, + children: eE, + claim_component: tE, + claim_element: nE, + claim_html_tag: iE, + claim_space: aE, + claim_text: lE, + create_component: oE, + create_in_transition: rE, + create_out_transition: sE, + destroy_component: uE, + detach: cE, + element: _E, + get_svelte_dataset: dE, + group_outros: fE, + init: pE, + insert_hydration: hE, + listen: mE, + mount_component: gE, + run_all: vE, + safe_not_equal: DE, + set_data: bE, + space: yE, + stop_propagation: FE, + text: wE, + toggle_class: $E, + transition_in: kE, + transition_out: EE +} = window.__gradio__svelte__internal, { createEventDispatcher: AE, onMount: CE } = window.__gradio__svelte__internal, { + SvelteComponent: SE, + append_hydration: TE, + attr: BE, + bubble: RE, + check_outros: IE, + children: LE, + claim_component: xE, + claim_element: OE, + claim_space: qE, + create_animation: NE, + create_component: zE, + destroy_component: ME, + detach: PE, + element: UE, + ensure_array_like: HE, + fix_and_outro_and_destroy_block: GE, + fix_position: jE, + group_outros: VE, + init: WE, + insert_hydration: ZE, + mount_component: YE, + noop: XE, + safe_not_equal: KE, + set_style: QE, + space: JE, + transition_in: eA, + transition_out: tA, + update_keyed_each: nA } = window.__gradio__svelte__internal, { - SvelteComponent: nE, - attr: iE, - children: aE, - claim_element: lE, - detach: oE, - element: rE, - empty: sE, - init: uE, - insert_hydration: cE, - noop: _E, - safe_not_equal: dE, - set_style: fE + SvelteComponent: iA, + attr: aA, + children: lA, + claim_element: oA, + detach: rA, + element: sA, + empty: uA, + init: cA, + insert_hydration: _A, + noop: dA, + safe_not_equal: fA, + set_style: pA } = window.__gradio__svelte__internal, { - SvelteComponent: $s, + SvelteComponent: ws, append_hydration: U, - assign: ws, - attr: q, + assign: $s, + attr: N, binding_callbacks: ks, check_outros: Es, - children: ae, - claim_component: kl, + children: ie, + claim_component: El, claim_element: G, - claim_space: be, - claim_text: dt, - create_component: El, - destroy_block: Al, - destroy_component: Cl, + claim_space: ye, + claim_text: ht, + create_component: Al, + destroy_block: Cl, + destroy_component: Sl, destroy_each: As, detach: x, element: j, - empty: Dt, - ensure_array_like: It, + empty: wt, + ensure_array_like: Nt, get_spread_object: Cs, get_spread_update: Ss, - get_svelte_dataset: Sl, + get_svelte_dataset: Tl, group_outros: Ts, init: Bs, insert_hydration: J, - listen: de, - mount_component: Tl, - run_all: Qt, + listen: pe, + mount_component: Bl, + run_all: ln, safe_not_equal: Rs, - select_option: ka, - set_data: bt, - set_input_value: at, - set_style: Fn, - space: ye, + select_option: Ea, + set_data: $t, + set_input_value: rt, + set_style: Cn, + space: Fe, stop_propagation: Is, - text: ft, - to_number: ni, - toggle_class: Ee, - transition_in: Zt, - transition_out: $n, - update_keyed_each: Bl -} = window.__gradio__svelte__internal, { onMount: Ls } = window.__gradio__svelte__internal; -function Ea(i, e, t) { + text: mt, + to_number: ri, + toggle_class: Ce, + transition_in: en, + transition_out: Sn, + update_keyed_each: Rl +} = window.__gradio__svelte__internal, { onMount: Ls, tick: xs } = window.__gradio__svelte__internal; +function Aa(i, e, t) { const n = i.slice(); - return n[49] = e[t], n; + return n[51] = e[t], n; } -function Aa(i, e, t) { +function Ca(i, e, t) { const n = i.slice(); - n[52] = e[t], n[54] = e, n[55] = t; + n[54] = e[t], n[56] = e, n[57] = t; const a = ( /*interactive*/ n[11] && /*prop*/ - (n[52].interactive_if ? ( + (n[54].interactive_if ? ( /*get_prop_value*/ n[21]( /*prop*/ - n[52].interactive_if.field + n[54].interactive_if.field ) === /*prop*/ - n[52].interactive_if.value + n[54].interactive_if.value ) : !0) ); - return n[53] = a, n; + return n[55] = a, n; } -function Ca(i, e, t) { +function Sa(i, e, t) { const n = i.slice(); - return n[56] = e[t], n; + return n[58] = e[t], n; } -function Sa(i) { +function Ta(i) { let e, t; const n = [ { @@ -8009,20 +8009,20 @@ function Sa(i) { ]; let a = {}; for (let o = 0; o < n.length; o += 1) - a = ws(a, n[o]); + a = $s(a, n[o]); return e = new ts({ props: a }), e.$on( "clear_status", /*clear_status_handler*/ i[28] ), { c() { - El(e.$$.fragment); + Al(e.$$.fragment); }, l(o) { - kl(e.$$.fragment, o); + El(e.$$.fragment, o); }, m(o, l) { - Tl(e, o, l), t = !0; + Bl(e, o, l), t = !0; }, p(o, l) { const r = l[0] & /*gradio, loading_status*/ @@ -8048,43 +8048,43 @@ function Sa(i) { e.$set(r); }, i(o) { - t || (Zt(e.$$.fragment, o), t = !0); + t || (en(e.$$.fragment, o), t = !0); }, o(o) { - $n(e.$$.fragment, o), t = !1; + Sn(e.$$.fragment, o), t = !1; }, d(o) { - Cl(e, o); + Sl(e, o); } }; } -function Ta(i) { +function Ba(i) { let e, t; return { c() { - e = j("span"), t = ft( + e = j("span"), t = mt( /*label*/ i[2] ), this.h(); }, l(n) { e = G(n, "SPAN", { class: !0 }); - var a = ae(e); - t = dt( + var a = ie(e); + t = ht( a, /*label*/ i[2] ), a.forEach(x), this.h(); }, h() { - q(e, "class", "label"); + N(e, "class", "label"); }, m(n, a) { J(n, e, a), U(e, t); }, p(n, a) { a[0] & /*label*/ - 4 && bt( + 4 && $t( t, /*label*/ n[2] @@ -8095,22 +8095,22 @@ function Ta(i) { } }; } -function Ba(i) { +function Ra(i) { let e, t = Array.isArray( /*value*/ i[0] - ), n = t && Ra(i); + ), n = t && Ia(i); return { c() { e = j("div"), n && n.c(), this.h(); }, l(a) { e = G(a, "DIV", { class: !0, style: !0 }); - var o = ae(e); + var o = ie(e); n && n.l(o), o.forEach(x), this.h(); }, h() { - q(e, "class", "container svelte-16grkhl"), Fn( + N(e, "class", "container svelte-1nz1lmm"), Cn( e, "--sheet-max-height", /*height*/ @@ -8126,8 +8126,8 @@ function Ba(i) { 1 && (t = Array.isArray( /*value*/ a[0] - )), t ? n ? n.p(a, o) : (n = Ra(a), n.c(), n.m(e, null)) : n && (n.d(1), n = null), o[0] & /*height*/ - 512 && Fn( + )), t ? n ? n.p(a, o) : (n = Ia(a), n.c(), n.m(e, null)) : n && (n.d(1), n = null), o[0] & /*height*/ + 512 && Cn( e, "--sheet-max-height", /*height*/ @@ -8140,29 +8140,29 @@ function Ba(i) { } }; } -function Ra(i) { - let e = [], t = /* @__PURE__ */ new Map(), n, a = It( +function Ia(i) { + let e = [], t = /* @__PURE__ */ new Map(), n, a = Nt( /*value*/ i[0] ); const o = (l) => ( /*group*/ - l[49].group_name + l[51].group_name ); for (let l = 0; l < a.length; l += 1) { - let r = Ea(i, a, l), s = o(r); + let r = Aa(i, a, l), s = o(r); t.set(s, e[l] = Pa(s, r)); } return { c() { for (let l = 0; l < e.length; l += 1) e[l].c(); - n = Dt(); + n = wt(); }, l(l) { for (let r = 0; r < e.length; r += 1) e[r].l(l); - n = Dt(); + n = wt(); }, m(l, r) { for (let s = 0; s < e.length; s += 1) @@ -8171,10 +8171,10 @@ function Ra(i) { }, p(l, r) { r[0] & /*value, interactive, get_prop_value, initialValues, handle_reset_prop, dispatch_update, validationState, validate_prop, sliderElements, handle_dropdown_change, groupVisibility, toggleGroup*/ - 32892929 && (a = It( + 32892929 && (a = Nt( /*value*/ l[0] - ), e = Bl(e, r, o, 1, l, a, t, n.parentNode, Al, Pa, n, Ea)); + ), e = Rl(e, r, o, 1, l, a, t, n.parentNode, Cl, Pa, n, Aa)); }, d(l) { l && x(n); @@ -8183,22 +8183,22 @@ function Ra(i) { } }; } -function Ia(i) { +function La(i) { let e, t = Array.isArray( /*group*/ - i[49].properties - ), n, a = t && La(i); + i[51].properties + ), n, a = t && xa(i); return { c() { - e = j("div"), a && a.c(), n = ye(), this.h(); + e = j("div"), a && a.c(), n = Fe(), this.h(); }, l(o) { e = G(o, "DIV", { class: !0 }); - var l = ae(e); - a && a.l(l), n = be(l), l.forEach(x), this.h(); + var l = ie(e); + a && a.l(l), n = ye(l), l.forEach(x), this.h(); }, h() { - q(e, "class", "properties-grid svelte-16grkhl"); + N(e, "class", "properties-grid svelte-1nz1lmm"); }, m(o, l) { J(o, e, l), a && a.m(e, null), U(e, n); @@ -8207,37 +8207,37 @@ function Ia(i) { l[0] & /*value*/ 1 && (t = Array.isArray( /*group*/ - o[49].properties - )), t ? a ? a.p(o, l) : (a = La(o), a.c(), a.m(e, n)) : a && (a.d(1), a = null); + o[51].properties + )), t ? a ? a.p(o, l) : (a = xa(o), a.c(), a.m(e, n)) : a && (a.d(1), a = null); }, d(o) { o && x(e), a && a.d(); } }; } -function La(i) { - let e = [], t = /* @__PURE__ */ new Map(), n, a = It( +function xa(i) { + let e = [], t = /* @__PURE__ */ new Map(), n, a = Nt( /*group*/ - i[49].properties + i[51].properties ); const o = (l) => ( /*prop*/ - l[52].name + l[54].name ); for (let l = 0; l < a.length; l += 1) { - let r = Aa(i, a, l), s = o(r); + let r = Ca(i, a, l), s = o(r); t.set(s, e[l] = Ma(s, r)); } return { c() { for (let l = 0; l < e.length; l += 1) e[l].c(); - n = Dt(); + n = wt(); }, l(l) { for (let r = 0; r < e.length; r += 1) e[r].l(l); - n = Dt(); + n = wt(); }, m(l, r) { for (let s = 0; s < e.length; s += 1) @@ -8246,10 +8246,10 @@ function La(i) { }, p(l, r) { r[0] & /*interactive, value, get_prop_value, initialValues, handle_reset_prop, dispatch_update, validationState, validate_prop, sliderElements, handle_dropdown_change*/ - 31836161 && (a = It( + 31836161 && (a = Nt( /*group*/ - l[49].properties - ), e = Bl(e, r, o, 1, l, a, t, n.parentNode, Al, Ma, n, Aa)); + l[51].properties + ), e = Rl(e, r, o, 1, l, a, t, n.parentNode, Cl, Ma, n, Ca)); }, d(l) { l && x(n); @@ -8258,181 +8258,181 @@ function La(i) { } }; } -function xa(i) { +function Oa(i) { let e, t, n = "?", a, o, l = ( /*prop*/ - i[52].help + "" + i[54].help + "" ), r; return { c() { - e = j("div"), t = j("span"), t.textContent = n, a = ye(), o = j("span"), r = ft(l), this.h(); + e = j("div"), t = j("span"), t.textContent = n, a = Fe(), o = j("span"), r = mt(l), this.h(); }, l(s) { e = G(s, "DIV", { class: !0 }); - var c = ae(e); - t = G(c, "SPAN", { class: !0, "data-svelte-h": !0 }), Sl(t) !== "svelte-fzek5l" && (t.textContent = n), a = be(c), o = G(c, "SPAN", { class: !0 }); - var u = ae(o); - r = dt(u, l), u.forEach(x), c.forEach(x), this.h(); + var u = ie(e); + t = G(u, "SPAN", { class: !0, "data-svelte-h": !0 }), Tl(t) !== "svelte-fzek5l" && (t.textContent = n), a = ye(u), o = G(u, "SPAN", { class: !0 }); + var c = ie(o); + r = ht(c, l), c.forEach(x), u.forEach(x), this.h(); }, h() { - q(t, "class", "tooltip-icon svelte-16grkhl"), q(o, "class", "tooltip-text svelte-16grkhl"), q(e, "class", "tooltip-container svelte-16grkhl"); + N(t, "class", "tooltip-icon svelte-1nz1lmm"), N(o, "class", "tooltip-text svelte-1nz1lmm"), N(e, "class", "tooltip-container svelte-1nz1lmm"); }, - m(s, c) { - J(s, e, c), U(e, t), U(e, a), U(e, o), U(o, r); + m(s, u) { + J(s, e, u), U(e, t), U(e, a), U(e, o), U(o, r); }, - p(s, c) { - c[0] & /*value*/ + p(s, u) { + u[0] & /*value*/ 1 && l !== (l = /*prop*/ - s[52].help + "") && bt(r, l); + s[54].help + "") && $t(r, l); }, d(s) { s && x(e); } }; } -function xs(i) { +function Os(i) { let e, t, n = Array.isArray( /*prop*/ - i[52].choices - ), a, o, l, r, s, c, u = n && Oa(i); - function m(...d) { + i[54].choices + ), a, o, l, r, s, u, c = n && qa(i); + function h(...d) { return ( /*change_handler_5*/ i[44]( /*prop*/ - i[52], + i[54], ...d ) ); } return { c() { - e = j("div"), t = j("select"), u && u.c(), l = ye(), r = j("div"), this.h(); + e = j("div"), t = j("select"), c && c.c(), l = Fe(), r = j("div"), this.h(); }, l(d) { e = G(d, "DIV", { class: !0 }); - var f = ae(e); + var f = ie(e); t = G(f, "SELECT", { class: !0 }); - var v = ae(t); - u && u.l(v), v.forEach(x), l = be(f), r = G(f, "DIV", { class: !0 }), ae(r).forEach(x), f.forEach(x), this.h(); + var v = ie(t); + c && c.l(v), v.forEach(x), l = ye(f), r = G(f, "DIV", { class: !0 }), ie(r).forEach(x), f.forEach(x), this.h(); }, h() { t.disabled = a = !/*is_interactive*/ - i[53], q(t, "class", "svelte-16grkhl"), q(r, "class", "dropdown-arrow-icon svelte-16grkhl"), q(e, "class", "dropdown-wrapper svelte-16grkhl"), Ee(e, "disabled", !/*is_interactive*/ - i[53]); + i[55], N(t, "class", "svelte-1nz1lmm"), N(r, "class", "dropdown-arrow-icon svelte-1nz1lmm"), N(e, "class", "dropdown-wrapper svelte-1nz1lmm"), Ce(e, "disabled", !/*is_interactive*/ + i[55]); }, m(d, f) { - J(d, e, f), U(e, t), u && u.m(t, null), ka( + J(d, e, f), U(e, t), c && c.m(t, null), Ea( t, /*prop*/ - i[52].value - ), U(e, l), U(e, r), s || (c = de(t, "change", m), s = !0); + i[54].value + ), U(e, l), U(e, r), s || (u = pe(t, "change", h), s = !0); }, p(d, f) { i = d, f[0] & /*value*/ 1 && (n = Array.isArray( /*prop*/ - i[52].choices - )), n ? u ? u.p(i, f) : (u = Oa(i), u.c(), u.m(t, null)) : u && (u.d(1), u = null), f[0] & /*interactive, value*/ + i[54].choices + )), n ? c ? c.p(i, f) : (c = qa(i), c.c(), c.m(t, null)) : c && (c.d(1), c = null), f[0] & /*interactive, value*/ 2049 && a !== (a = !/*is_interactive*/ - i[53]) && (t.disabled = a), f[0] & /*value*/ + i[55]) && (t.disabled = a), f[0] & /*value*/ 1 && o !== (o = /*prop*/ - i[52].value) && ka( + i[54].value) && Ea( t, /*prop*/ - i[52].value + i[54].value ), f[0] & /*interactive, value, get_prop_value*/ - 2099201 && Ee(e, "disabled", !/*is_interactive*/ - i[53]); + 2099201 && Ce(e, "disabled", !/*is_interactive*/ + i[55]); }, d(d) { - d && x(e), u && u.d(), s = !1, c(); + d && x(e), c && c.d(), s = !1, u(); } }; } -function Os(i) { +function qs(i) { let e, t, n, a, o, l = ( /*prop*/ - i[52].value + "" - ), r, s, c; - function u() { + i[54].value + "" + ), r, s, u; + function c() { i[42].call( t, /*each_value_1*/ - i[54], + i[56], /*prop_index*/ - i[55] + i[57] ); } - function m() { + function h() { return ( /*change_handler_4*/ i[43]( /*prop*/ - i[52] + i[54] ) ); } return { c() { - e = j("div"), t = j("input"), a = ye(), o = j("span"), r = ft(l), this.h(); + e = j("div"), t = j("input"), a = Fe(), o = j("span"), r = mt(l), this.h(); }, l(d) { e = G(d, "DIV", { class: !0 }); - var f = ae(e); - t = G(f, "INPUT", { type: !0, class: !0 }), a = be(f), o = G(f, "SPAN", { class: !0 }); - var v = ae(o); - r = dt(v, l), v.forEach(x), f.forEach(x), this.h(); + var f = ie(e); + t = G(f, "INPUT", { type: !0, class: !0 }), a = ye(f), o = G(f, "SPAN", { class: !0 }); + var v = ie(o); + r = ht(v, l), v.forEach(x), f.forEach(x), this.h(); }, h() { - q(t, "type", "color"), q(t, "class", "color-picker-input svelte-16grkhl"), t.disabled = n = !/*is_interactive*/ - i[53], q(o, "class", "color-picker-value svelte-16grkhl"), q(e, "class", "color-picker-container svelte-16grkhl"), Ee(e, "disabled", !/*is_interactive*/ - i[53]); + N(t, "type", "color"), N(t, "class", "color-picker-input svelte-1nz1lmm"), t.disabled = n = !/*is_interactive*/ + i[55], N(o, "class", "color-picker-value svelte-1nz1lmm"), N(e, "class", "color-picker-container svelte-1nz1lmm"), Ce(e, "disabled", !/*is_interactive*/ + i[55]); }, m(d, f) { - J(d, e, f), U(e, t), at( + J(d, e, f), U(e, t), rt( t, /*prop*/ - i[52].value - ), U(e, a), U(e, o), U(o, r), s || (c = [ - de(t, "input", u), - de(t, "change", m) + i[54].value + ), U(e, a), U(e, o), U(o, r), s || (u = [ + pe(t, "input", c), + pe(t, "change", h) ], s = !0); }, p(d, f) { i = d, f[0] & /*interactive, value*/ 2049 && n !== (n = !/*is_interactive*/ - i[53]) && (t.disabled = n), f[0] & /*value*/ - 1 && at( + i[55]) && (t.disabled = n), f[0] & /*value*/ + 1 && rt( t, /*prop*/ - i[52].value + i[54].value ), f[0] & /*value*/ 1 && l !== (l = /*prop*/ - i[52].value + "") && bt(r, l), f[0] & /*interactive, value, get_prop_value*/ - 2099201 && Ee(e, "disabled", !/*is_interactive*/ - i[53]); + i[54].value + "") && $t(r, l), f[0] & /*interactive, value, get_prop_value*/ + 2099201 && Ce(e, "disabled", !/*is_interactive*/ + i[55]); }, d(d) { - d && x(e), s = !1, Qt(c); + d && x(e), s = !1, ln(u); } }; } -function qs(i) { +function Ns(i) { let e, t, n, a, o, l, r = ( /*prop*/ - i[52] - ), s, c, u = ( + i[54] + ), s, u, c = ( /*prop*/ - i[52].value + "" - ), m, d, f; + i[54].value + "" + ), h, d, f; function v() { i[38].call( t, /*each_value_1*/ - i[54], + i[56], /*prop_index*/ - i[55] + i[57] ); } const D = () => ( @@ -8447,92 +8447,92 @@ function qs(i) { /*input_handler_2*/ i[40]( /*prop*/ - i[52] + i[54] ) ); } - function h() { + function m() { return ( /*change_handler_3*/ i[41]( /*prop*/ - i[52] + i[54] ) ); } return { c() { - e = j("div"), t = j("input"), s = ye(), c = j("span"), m = ft(u), this.h(); + e = j("div"), t = j("input"), s = Fe(), u = j("span"), h = mt(c), this.h(); }, l(_) { e = G(_, "DIV", { class: !0 }); - var g = ae(e); + var g = ie(e); t = G(g, "INPUT", { type: !0, min: !0, max: !0, step: !0, class: !0 - }), s = be(g), c = G(g, "SPAN", { class: !0 }); - var y = ae(c); - m = dt(y, u), y.forEach(x), g.forEach(x), this.h(); + }), s = ye(g), u = G(g, "SPAN", { class: !0 }); + var F = ie(u); + h = ht(F, c), F.forEach(x), g.forEach(x), this.h(); }, h() { - q(t, "type", "range"), q(t, "min", n = /*prop*/ - i[52].minimum), q(t, "max", a = /*prop*/ - i[52].maximum), q(t, "step", o = /*prop*/ - i[52].step || 1), t.disabled = l = !/*is_interactive*/ - i[53], q(t, "class", "svelte-16grkhl"), q(c, "class", "slider-value svelte-16grkhl"), q(e, "class", "slider-container svelte-16grkhl"), Ee(e, "disabled", !/*is_interactive*/ - i[53]); + N(t, "type", "range"), N(t, "min", n = /*prop*/ + i[54].minimum), N(t, "max", a = /*prop*/ + i[54].maximum), N(t, "step", o = /*prop*/ + i[54].step || 1), t.disabled = l = !/*is_interactive*/ + i[55], N(t, "class", "svelte-1nz1lmm"), N(u, "class", "slider-value svelte-1nz1lmm"), N(e, "class", "slider-container svelte-1nz1lmm"), Ce(e, "disabled", !/*is_interactive*/ + i[55]); }, m(_, g) { - J(_, e, g), U(e, t), at( + J(_, e, g), U(e, t), rt( t, /*prop*/ - i[52].value - ), D(), U(e, s), U(e, c), U(c, m), d || (f = [ - de(t, "change", v), - de(t, "input", v), - de(t, "input", E), - de(t, "change", h) + i[54].value + ), D(), U(e, s), U(e, u), U(u, h), d || (f = [ + pe(t, "change", v), + pe(t, "input", v), + pe(t, "input", E), + pe(t, "change", m) ], d = !0); }, p(_, g) { i = _, g[0] & /*value*/ 1 && n !== (n = /*prop*/ - i[52].minimum) && q(t, "min", n), g[0] & /*value*/ + i[54].minimum) && N(t, "min", n), g[0] & /*value*/ 1 && a !== (a = /*prop*/ - i[52].maximum) && q(t, "max", a), g[0] & /*value*/ + i[54].maximum) && N(t, "max", a), g[0] & /*value*/ 1 && o !== (o = /*prop*/ - i[52].step || 1) && q(t, "step", o), g[0] & /*interactive, value*/ + i[54].step || 1) && N(t, "step", o), g[0] & /*interactive, value*/ 2049 && l !== (l = !/*is_interactive*/ - i[53]) && (t.disabled = l), g[0] & /*value*/ - 1 && at( + i[55]) && (t.disabled = l), g[0] & /*value*/ + 1 && rt( t, /*prop*/ - i[52].value + i[54].value ), r !== /*prop*/ - i[52] && (b(), r = /*prop*/ - i[52], D()), g[0] & /*value*/ - 1 && u !== (u = /*prop*/ - i[52].value + "") && bt(m, u), g[0] & /*interactive, value, get_prop_value*/ - 2099201 && Ee(e, "disabled", !/*is_interactive*/ - i[53]); + i[54] && (b(), r = /*prop*/ + i[54], D()), g[0] & /*value*/ + 1 && c !== (c = /*prop*/ + i[54].value + "") && $t(h, c), g[0] & /*interactive, value, get_prop_value*/ + 2099201 && Ce(e, "disabled", !/*is_interactive*/ + i[55]); }, d(_) { - _ && x(e), b(), d = !1, Qt(f); + _ && x(e), b(), d = !1, ln(f); } }; } -function Ns(i) { +function zs(i) { let e, t, n, a, o; function l() { i[35].call( e, /*each_value_1*/ - i[54], + i[56], /*prop_index*/ - i[55] + i[57] ); } function r() { @@ -8540,7 +8540,7 @@ function Ns(i) { /*change_handler_2*/ i[36]( /*prop*/ - i[52] + i[54] ) ); } @@ -8549,7 +8549,7 @@ function Ns(i) { /*input_handler_1*/ i[37]( /*prop*/ - i[52] + i[54] ) ); } @@ -8557,60 +8557,60 @@ function Ns(i) { c() { e = j("input"), this.h(); }, - l(c) { - e = G(c, "INPUT", { type: !0, step: !0, class: !0 }), this.h(); + l(u) { + e = G(u, "INPUT", { type: !0, step: !0, class: !0 }), this.h(); }, h() { - q(e, "type", "number"), q(e, "step", t = /*prop*/ - i[52].step || 1), e.disabled = n = !/*is_interactive*/ - i[53], q(e, "class", "svelte-16grkhl"), Ee( + N(e, "type", "number"), N(e, "step", t = /*prop*/ + i[54].step || 1), e.disabled = n = !/*is_interactive*/ + i[55], N(e, "class", "svelte-1nz1lmm"), Ce( e, "invalid", /*validationState*/ i[15][ /*prop*/ - i[52].name + i[54].name ] === !1 - ), Ee(e, "disabled", !/*is_interactive*/ - i[53]); + ), Ce(e, "disabled", !/*is_interactive*/ + i[55]); }, - m(c, u) { - J(c, e, u), at( + m(u, c) { + J(u, e, c), rt( e, /*prop*/ - i[52].value + i[54].value ), a || (o = [ - de(e, "input", l), - de(e, "change", r), - de(e, "input", s) + pe(e, "input", l), + pe(e, "change", r), + pe(e, "input", s) ], a = !0); }, - p(c, u) { - i = c, u[0] & /*value*/ + p(u, c) { + i = u, c[0] & /*value*/ 1 && t !== (t = /*prop*/ - i[52].step || 1) && q(e, "step", t), u[0] & /*interactive, value*/ + i[54].step || 1) && N(e, "step", t), c[0] & /*interactive, value*/ 2049 && n !== (n = !/*is_interactive*/ - i[53]) && (e.disabled = n), u[0] & /*value*/ - 1 && ni(e.value) !== /*prop*/ - i[52].value && at( + i[55]) && (e.disabled = n), c[0] & /*value*/ + 1 && ri(e.value) !== /*prop*/ + i[54].value && rt( e, /*prop*/ - i[52].value - ), u[0] & /*validationState, value*/ - 32769 && Ee( + i[54].value + ), c[0] & /*validationState, value*/ + 32769 && Ce( e, "invalid", /*validationState*/ i[15][ /*prop*/ - i[52].name + i[54].name ] === !1 - ), u[0] & /*interactive, value, get_prop_value*/ - 2099201 && Ee(e, "disabled", !/*is_interactive*/ - i[53]); + ), c[0] & /*interactive, value, get_prop_value*/ + 2099201 && Ce(e, "disabled", !/*is_interactive*/ + i[55]); }, - d(c) { - c && x(e), a = !1, Qt(o); + d(u) { + u && x(e), a = !1, ln(o); } }; } @@ -8620,9 +8620,9 @@ function Ms(i) { i[33].call( e, /*each_value_1*/ - i[54], + i[56], /*prop_index*/ - i[55] + i[57] ); } function l() { @@ -8630,7 +8630,7 @@ function Ms(i) { /*change_handler_1*/ i[34]( /*prop*/ - i[52] + i[54] ) ); } @@ -8642,25 +8642,25 @@ function Ms(i) { e = G(r, "INPUT", { type: !0, class: !0 }), this.h(); }, h() { - q(e, "type", "checkbox"), e.disabled = t = !/*is_interactive*/ - i[53], q(e, "class", "svelte-16grkhl"); + N(e, "type", "checkbox"), e.disabled = t = !/*is_interactive*/ + i[55], N(e, "class", "svelte-1nz1lmm"); }, m(r, s) { J(r, e, s), e.checked = /*prop*/ - i[52].value, n || (a = [ - de(e, "change", o), - de(e, "change", l) + i[54].value, n || (a = [ + pe(e, "change", o), + pe(e, "change", l) ], n = !0); }, p(r, s) { i = r, s[0] & /*interactive, value*/ 2049 && t !== (t = !/*is_interactive*/ - i[53]) && (e.disabled = t), s[0] & /*value*/ + i[55]) && (e.disabled = t), s[0] & /*value*/ 1 && (e.checked = /*prop*/ - i[52].value); + i[54].value); }, d(r) { - r && x(e), n = !1, Qt(a); + r && x(e), n = !1, ln(a); } }; } @@ -8670,9 +8670,9 @@ function Ps(i) { i[30].call( e, /*each_value_1*/ - i[54], + i[56], /*prop_index*/ - i[55] + i[57] ); } function l() { @@ -8680,7 +8680,7 @@ function Ps(i) { /*change_handler*/ i[31]( /*prop*/ - i[52] + i[54] ) ); } @@ -8689,7 +8689,7 @@ function Ps(i) { /*input_handler*/ i[32]( /*prop*/ - i[52] + i[54] ) ); } @@ -8701,53 +8701,53 @@ function Ps(i) { e = G(s, "INPUT", { type: !0, class: !0 }), this.h(); }, h() { - q(e, "type", "text"), e.disabled = t = !/*is_interactive*/ - i[53], q(e, "class", "svelte-16grkhl"); + N(e, "type", "text"), e.disabled = t = !/*is_interactive*/ + i[55], N(e, "class", "svelte-1nz1lmm"); }, - m(s, c) { - J(s, e, c), at( + m(s, u) { + J(s, e, u), rt( e, /*prop*/ - i[52].value + i[54].value ), n || (a = [ - de(e, "input", o), - de(e, "change", l), - de(e, "input", r) + pe(e, "input", o), + pe(e, "change", l), + pe(e, "input", r) ], n = !0); }, - p(s, c) { - i = s, c[0] & /*interactive, value*/ + p(s, u) { + i = s, u[0] & /*interactive, value*/ 2049 && t !== (t = !/*is_interactive*/ - i[53]) && (e.disabled = t), c[0] & /*value*/ + i[55]) && (e.disabled = t), u[0] & /*value*/ 1 && e.value !== /*prop*/ - i[52].value && at( + i[54].value && rt( e, /*prop*/ - i[52].value + i[54].value ); }, d(s) { - s && x(e), n = !1, Qt(a); + s && x(e), n = !1, ln(a); } }; } -function Oa(i) { - let e, t = It( +function qa(i) { + let e, t = Nt( /*prop*/ - i[52].choices + i[54].choices ), n = []; for (let a = 0; a < t.length; a += 1) - n[a] = qa(Ca(i, t, a)); + n[a] = Na(Sa(i, t, a)); return { c() { for (let a = 0; a < n.length; a += 1) n[a].c(); - e = Dt(); + e = wt(); }, l(a) { for (let o = 0; o < n.length; o += 1) n[o].l(a); - e = Dt(); + e = wt(); }, m(a, o) { for (let l = 0; l < n.length; l += 1) @@ -8757,14 +8757,14 @@ function Oa(i) { p(a, o) { if (o[0] & /*value*/ 1) { - t = It( + t = Nt( /*prop*/ - a[52].choices + a[54].choices ); let l; for (l = 0; l < t.length; l += 1) { - const r = Ca(a, t, l); - n[l] ? n[l].p(r, o) : (n[l] = qa(r), n[l].c(), n[l].m(e.parentNode, e)); + const r = Sa(a, t, l); + n[l] ? n[l].p(r, o) : (n[l] = Na(r), n[l].c(), n[l].m(e.parentNode, e)); } for (; l < n.length; l += 1) n[l].d(1); @@ -8776,25 +8776,25 @@ function Oa(i) { } }; } -function qa(i) { +function Na(i) { let e, t = ( /*choice*/ - i[56] + "" + i[58] + "" ), n, a, o, l; return { c() { - e = j("option"), n = ft(t), a = ye(), this.h(); + e = j("option"), n = mt(t), a = Fe(), this.h(); }, l(r) { e = G(r, "OPTION", { class: !0 }); - var s = ae(e); - n = dt(s, t), a = be(s), s.forEach(x), this.h(); + var s = ie(e); + n = ht(s, t), a = ye(s), s.forEach(x), this.h(); }, h() { e.__value = o = /*choice*/ - i[56], at(e, e.__value), e.selected = l = /*prop*/ - i[52].value === /*choice*/ - i[56], q(e, "class", "svelte-16grkhl"); + i[58], rt(e, e.__value), e.selected = l = /*prop*/ + i[54].value === /*choice*/ + i[58], N(e, "class", "svelte-1nz1lmm"); }, m(r, s) { J(r, e, s), U(e, n), U(e, a); @@ -8802,67 +8802,67 @@ function qa(i) { p(r, s) { s[0] & /*value*/ 1 && t !== (t = /*choice*/ - r[56] + "") && bt(n, t), s[0] & /*value*/ + r[58] + "") && $t(n, t), s[0] & /*value*/ 1 && o !== (o = /*choice*/ - r[56]) && (e.__value = o, at(e, e.__value)), s[0] & /*value*/ + r[58]) && (e.__value = o, rt(e, e.__value)), s[0] & /*value*/ 1 && l !== (l = /*prop*/ - r[52].value === /*choice*/ - r[56]) && (e.selected = l); + r[54].value === /*choice*/ + r[58]) && (e.selected = l); }, d(r) { r && x(e); } }; } -function Na(i) { +function za(i) { let e, t, n, a, o; function l() { return ( /*click_handler_1*/ i[45]( /*prop*/ - i[52] + i[54] ) ); } return { c() { - e = j("button"), t = ft("↺"), this.h(); + e = j("button"), t = mt("↺"), this.h(); }, l(r) { e = G(r, "BUTTON", { class: !0, title: !0 }); - var s = ae(e); - t = dt(s, "↺"), s.forEach(x), this.h(); + var s = ie(e); + t = ht(s, "↺"), s.forEach(x), this.h(); }, h() { - q(e, "class", "reset-button-prop svelte-16grkhl"), q(e, "title", "Reset to default"), e.disabled = n = !/*is_interactive*/ - i[53], Ee( + N(e, "class", "reset-button-prop svelte-1nz1lmm"), N(e, "title", "Reset to default"), e.disabled = n = !/*is_interactive*/ + i[55], Ce( e, "visible", /*initialValues*/ i[16][ /*prop*/ - i[52].name + i[54].name ] !== /*prop*/ - i[52].value + i[54].value ); }, m(r, s) { - J(r, e, s), U(e, t), a || (o = de(e, "click", Is(l)), a = !0); + J(r, e, s), U(e, t), a || (o = pe(e, "click", Is(l)), a = !0); }, p(r, s) { i = r, s[0] & /*interactive, value*/ 2049 && n !== (n = !/*is_interactive*/ - i[53]) && (e.disabled = n), s[0] & /*initialValues, value*/ - 65537 && Ee( + i[55]) && (e.disabled = n), s[0] & /*initialValues, value*/ + 65537 && Ce( e, "visible", /*initialValues*/ i[16][ /*prop*/ - i[52].name + i[54].name ] !== /*prop*/ - i[52].value + i[54].value ); }, d(r) { @@ -8873,97 +8873,97 @@ function Na(i) { function Ma(i, e) { let t, n, a, o = ( /*prop*/ - e[52].label + "" - ), l, r, s, c, u, m, d, f = ( + e[54].label + "" + ), l, r, s, u, c, h, d, f = ( /*prop*/ - e[52].help && xa(e) + e[54].help && Oa(e) ); - function v(h, _) { + function v(m, _) { if ( /*prop*/ - h[52].component === "string" + m[54].component === "string" ) return Ps; if ( /*prop*/ - h[52].component === "checkbox" + m[54].component === "checkbox" ) return Ms; if ( /*prop*/ - h[52].component === "number_integer" || /*prop*/ - h[52].component === "number_float" + m[54].component === "number_integer" || /*prop*/ + m[54].component === "number_float" + ) return zs; + if ( + /*prop*/ + m[54].component === "slider" ) return Ns; if ( /*prop*/ - h[52].component === "slider" + m[54].component === "colorpicker" ) return qs; if ( /*prop*/ - h[52].component === "colorpicker" + m[54].component === "dropdown" ) return Os; - if ( - /*prop*/ - h[52].component === "dropdown" - ) return xs; } let D = v(e), b = D && D(e), E = ( /*prop*/ - e[52].component !== "checkbox" && Na(e) + e[54].component !== "checkbox" && za(e) ); return { key: i, first: null, c() { - t = j("label"), n = j("div"), a = j("span"), l = ft(o), r = ye(), f && f.c(), c = ye(), u = j("div"), b && b.c(), m = ye(), E && E.c(), d = ye(), this.h(); + t = j("label"), n = j("div"), a = j("span"), l = mt(o), r = Fe(), f && f.c(), u = Fe(), c = j("div"), b && b.c(), h = Fe(), E && E.c(), d = Fe(), this.h(); }, - l(h) { - t = G(h, "LABEL", { class: !0, for: !0 }); - var _ = ae(t); + l(m) { + t = G(m, "LABEL", { class: !0, for: !0 }); + var _ = ie(t); n = G(_, "DIV", { class: !0 }); - var g = ae(n); + var g = ie(n); a = G(g, "SPAN", {}); - var y = ae(a); - l = dt(y, o), y.forEach(x), r = be(g), f && f.l(g), g.forEach(x), _.forEach(x), c = be(h), u = G(h, "DIV", { class: !0 }); - var $ = ae(u); - b && b.l($), m = be($), E && E.l($), d = be($), $.forEach(x), this.h(); + var F = ie(a); + l = ht(F, o), F.forEach(x), r = ye(g), f && f.l(g), g.forEach(x), _.forEach(x), u = ye(m), c = G(m, "DIV", { class: !0 }); + var w = ie(c); + b && b.l(w), h = ye(w), E && E.l(w), d = ye(w), w.forEach(x), this.h(); }, h() { - q(n, "class", "prop-label-wrapper svelte-16grkhl"), q(t, "class", "prop-label svelte-16grkhl"), q(t, "for", s = /*prop*/ - e[52].name), q(u, "class", "prop-control svelte-16grkhl"), this.first = t; + N(n, "class", "prop-label-wrapper svelte-1nz1lmm"), N(t, "class", "prop-label svelte-1nz1lmm"), N(t, "for", s = /*prop*/ + e[54].name), N(c, "class", "prop-control svelte-1nz1lmm"), this.first = t; }, - m(h, _) { - J(h, t, _), U(t, n), U(n, a), U(a, l), U(n, r), f && f.m(n, null), J(h, c, _), J(h, u, _), b && b.m(u, null), U(u, m), E && E.m(u, null), U(u, d); + m(m, _) { + J(m, t, _), U(t, n), U(n, a), U(a, l), U(n, r), f && f.m(n, null), J(m, u, _), J(m, c, _), b && b.m(c, null), U(c, h), E && E.m(c, null), U(c, d); }, - p(h, _) { - e = h, _[0] & /*value*/ + p(m, _) { + e = m, _[0] & /*value*/ 1 && o !== (o = /*prop*/ - e[52].label + "") && bt(l, o), /*prop*/ - e[52].help ? f ? f.p(e, _) : (f = xa(e), f.c(), f.m(n, null)) : f && (f.d(1), f = null), _[0] & /*value*/ + e[54].label + "") && $t(l, o), /*prop*/ + e[54].help ? f ? f.p(e, _) : (f = Oa(e), f.c(), f.m(n, null)) : f && (f.d(1), f = null), _[0] & /*value*/ 1 && s !== (s = /*prop*/ - e[52].name) && q(t, "for", s), D === (D = v(e)) && b ? b.p(e, _) : (b && b.d(1), b = D && D(e), b && (b.c(), b.m(u, m))), /*prop*/ - e[52].component !== "checkbox" ? E ? E.p(e, _) : (E = Na(e), E.c(), E.m(u, d)) : E && (E.d(1), E = null); + e[54].name) && N(t, "for", s), D === (D = v(e)) && b ? b.p(e, _) : (b && b.d(1), b = D && D(e), b && (b.c(), b.m(c, h))), /*prop*/ + e[54].component !== "checkbox" ? E ? E.p(e, _) : (E = za(e), E.c(), E.m(c, d)) : E && (E.d(1), E = null); }, - d(h) { - h && (x(t), x(c), x(u)), f && f.d(), b && b.d(), E && E.d(); + d(m) { + m && (x(t), x(u), x(c)), f && f.d(), b && b.d(), E && E.d(); } }; } function Pa(i, e) { let t, n, a = ( /*group*/ - e[49].group_name + "" + e[51].group_name + "" ), o, l, r, s = ( /*groupVisibility*/ e[13][ /*group*/ - e[49].group_name + e[51].group_name ] ? "−" : "+" - ), c, u, m, d, f; + ), u, c, h, d, f; function v() { return ( /*click_handler*/ e[29]( /*group*/ - e[49] + e[51] ) ); } @@ -8971,117 +8971,117 @@ function Pa(i, e) { /*groupVisibility*/ e[13][ /*group*/ - e[49].group_name - ] && Ia(e) + e[51].group_name + ] && La(e) ); return { key: i, first: null, c() { - t = j("button"), n = j("span"), o = ft(a), l = ye(), r = j("span"), c = ft(s), u = ye(), D && D.c(), m = Dt(), this.h(); + t = j("button"), n = j("span"), o = mt(a), l = Fe(), r = j("span"), u = mt(s), c = Fe(), D && D.c(), h = wt(), this.h(); }, l(b) { t = G(b, "BUTTON", { class: !0 }); - var E = ae(t); + var E = ie(t); n = G(E, "SPAN", { class: !0 }); - var h = ae(n); - o = dt(h, a), h.forEach(x), l = be(E), r = G(E, "SPAN", { class: !0 }); - var _ = ae(r); - c = dt(_, s), _.forEach(x), E.forEach(x), u = be(b), D && D.l(b), m = Dt(), this.h(); + var m = ie(n); + o = ht(m, a), m.forEach(x), l = ye(E), r = G(E, "SPAN", { class: !0 }); + var _ = ie(r); + u = ht(_, s), _.forEach(x), E.forEach(x), c = ye(b), D && D.l(b), h = wt(), this.h(); }, h() { - q(n, "class", "group-title"), q(r, "class", "group-toggle-icon"), q(t, "class", "group-header svelte-16grkhl"), this.first = t; + N(n, "class", "group-title"), N(r, "class", "group-toggle-icon"), N(t, "class", "group-header svelte-1nz1lmm"), this.first = t; }, m(b, E) { - J(b, t, E), U(t, n), U(n, o), U(t, l), U(t, r), U(r, c), J(b, u, E), D && D.m(b, E), J(b, m, E), d || (f = de(t, "click", v), d = !0); + J(b, t, E), U(t, n), U(n, o), U(t, l), U(t, r), U(r, u), J(b, c, E), D && D.m(b, E), J(b, h, E), d || (f = pe(t, "click", v), d = !0); }, p(b, E) { e = b, E[0] & /*value*/ 1 && a !== (a = /*group*/ - e[49].group_name + "") && bt(o, a), E[0] & /*groupVisibility, value*/ + e[51].group_name + "") && $t(o, a), E[0] & /*groupVisibility, value*/ 8193 && s !== (s = /*groupVisibility*/ e[13][ /*group*/ - e[49].group_name - ] ? "−" : "+") && bt(c, s), /*groupVisibility*/ + e[51].group_name + ] ? "−" : "+") && $t(u, s), /*groupVisibility*/ e[13][ /*group*/ - e[49].group_name - ] ? D ? D.p(e, E) : (D = Ia(e), D.c(), D.m(m.parentNode, m)) : D && (D.d(1), D = null); + e[51].group_name + ] ? D ? D.p(e, E) : (D = La(e), D.c(), D.m(h.parentNode, h)) : D && (D.d(1), D = null); }, d(b) { - b && (x(t), x(u), x(m)), D && D.d(b), d = !1, f(); + b && (x(t), x(c), x(h)), D && D.d(b), d = !1, f(); } }; } -function zs(i) { - let e, t, n, a, o = "▼", l, r, s, c, u, m = ( +function Us(i) { + let e, t, n, a, o = "▼", l, r, s, u, c, h = ( /*loading_status*/ - i[10] && Sa(i) + i[10] && Ta(i) ), d = ( /*label*/ - i[2] && Ta(i) + i[2] && Ba(i) ), f = ( /*open*/ - i[1] && Ba(i) + i[1] && Ra(i) ); return { c() { - m && m.c(), e = ye(), t = j("button"), d && d.c(), n = ye(), a = j("span"), a.textContent = o, l = ye(), r = j("div"), f && f.c(), this.h(); + h && h.c(), e = Fe(), t = j("button"), d && d.c(), n = Fe(), a = j("span"), a.textContent = o, l = Fe(), r = j("div"), f && f.c(), this.h(); }, l(v) { - m && m.l(v), e = be(v), t = G(v, "BUTTON", { class: !0 }); - var D = ae(t); - d && d.l(D), n = be(D), a = G(D, "SPAN", { class: !0, "data-svelte-h": !0 }), Sl(a) !== "svelte-zp2qne" && (a.textContent = o), D.forEach(x), l = be(v), r = G(v, "DIV", { class: !0 }); - var b = ae(r); + h && h.l(v), e = ye(v), t = G(v, "BUTTON", { class: !0 }); + var D = ie(t); + d && d.l(D), n = ye(D), a = G(D, "SPAN", { class: !0, "data-svelte-h": !0 }), Tl(a) !== "svelte-zp2qne" && (a.textContent = o), D.forEach(x), l = ye(v), r = G(v, "DIV", { class: !0 }); + var b = ie(r); f && f.l(b), b.forEach(x), this.h(); }, h() { - q(a, "class", "accordion-icon"), Fn( + N(a, "class", "accordion-icon"), Cn( a, "transform", /*open*/ i[1] ? "rotate(0)" : "rotate(-90deg)" - ), q(t, "class", "accordion-header svelte-16grkhl"), q(r, "class", "content-wrapper svelte-16grkhl"), Ee(r, "closed", !/*open*/ + ), N(t, "class", "accordion-header svelte-1nz1lmm"), N(r, "class", "content-wrapper svelte-1nz1lmm"), Ce(r, "closed", !/*open*/ i[1]); }, m(v, D) { - m && m.m(v, D), J(v, e, D), J(v, t, D), d && d.m(t, null), U(t, n), U(t, a), J(v, l, D), J(v, r, D), f && f.m(r, null), s = !0, c || (u = de( + h && h.m(v, D), J(v, e, D), J(v, t, D), d && d.m(t, null), U(t, n), U(t, a), J(v, l, D), J(v, r, D), f && f.m(r, null), s = !0, u || (c = pe( t, "click", /*handle_toggle*/ i[19] - ), c = !0); + ), u = !0); }, p(v, D) { /*loading_status*/ - v[10] ? m ? (m.p(v, D), D[0] & /*loading_status*/ - 1024 && Zt(m, 1)) : (m = Sa(v), m.c(), Zt(m, 1), m.m(e.parentNode, e)) : m && (Ts(), $n(m, 1, 1, () => { - m = null; + v[10] ? h ? (h.p(v, D), D[0] & /*loading_status*/ + 1024 && en(h, 1)) : (h = Ta(v), h.c(), en(h, 1), h.m(e.parentNode, e)) : h && (Ts(), Sn(h, 1, 1, () => { + h = null; }), Es()), /*label*/ - v[2] ? d ? d.p(v, D) : (d = Ta(v), d.c(), d.m(t, n)) : d && (d.d(1), d = null), D[0] & /*open*/ - 2 && Fn( + v[2] ? d ? d.p(v, D) : (d = Ba(v), d.c(), d.m(t, n)) : d && (d.d(1), d = null), D[0] & /*open*/ + 2 && Cn( a, "transform", /*open*/ v[1] ? "rotate(0)" : "rotate(-90deg)" ), /*open*/ - v[1] ? f ? f.p(v, D) : (f = Ba(v), f.c(), f.m(r, null)) : f && (f.d(1), f = null), (!s || D[0] & /*open*/ - 2) && Ee(r, "closed", !/*open*/ + v[1] ? f ? f.p(v, D) : (f = Ra(v), f.c(), f.m(r, null)) : f && (f.d(1), f = null), (!s || D[0] & /*open*/ + 2) && Ce(r, "closed", !/*open*/ v[1]); }, i(v) { - s || (Zt(m), s = !0); + s || (en(h), s = !0); }, o(v) { - $n(m), s = !1; + Sn(h), s = !1; }, d(v) { - v && (x(e), x(t), x(l), x(r)), m && m.d(v), d && d.d(), f && f.d(), c = !1, u(); + v && (x(e), x(t), x(l), x(r)), h && h.d(v), d && d.d(), f && f.d(), u = !1, c(); } }; } -function Us(i) { +function Hs(i) { let e, t; return e = new ao({ props: { @@ -9113,18 +9113,18 @@ function Us(i) { /*width*/ i[8] ), - $$slots: { default: [zs] }, + $$slots: { default: [Us] }, $$scope: { ctx: i } } }), { c() { - El(e.$$.fragment); + Al(e.$$.fragment); }, l(n) { - kl(e.$$.fragment, n); + El(e.$$.fragment, n); }, m(n, a) { - Tl(e, n, a), t = !0; + Bl(e, n, a), t = !0; }, p(n, a) { const o = {}; @@ -9144,192 +9144,226 @@ function Us(i) { 256 && (o.width = /*width*/ n[8]), a[0] & /*open, height, value, interactive, initialValues, validationState, sliderElements, groupVisibility, label, gradio, loading_status*/ 130567 | a[1] & /*$$scope*/ - 268435456 && (o.$$scope = { dirty: a, ctx: n }), e.$set(o); + 1073741824 && (o.$$scope = { dirty: a, ctx: n }), e.$set(o); }, i(n) { - t || (Zt(e.$$.fragment, n), t = !0); + t || (en(e.$$.fragment, n), t = !0); }, o(n) { - $n(e.$$.fragment, n), t = !1; + Sn(e.$$.fragment, n), t = !1; }, d(n) { - Cl(e, n); + Sl(e, n); } }; } -function za(i, e) { +function Ua(i, e) { var t, n; if (!e) return; const a = (t = i.minimum) !== null && t !== void 0 ? t : 0, o = (n = i.maximum) !== null && n !== void 0 ? n : 100, l = Number(i.value), r = l <= a ? 0 : (l - a) * 100 / (o - a); e.style.setProperty("--slider-progress", `${r}%`); } -function Hs(i, e, t) { +function Gs(i, e, t) { let n; - var a; - let { value: o = [] } = e, { label: l = void 0 } = e, { visible: r = !0 } = e, { open: s = !0 } = e, { elem_id: c = "" } = e, { elem_classes: u = [] } = e, { container: m = !1 } = e, { scale: d = null } = e, { min_width: f = void 0 } = e, { width: v = void 0 } = e, { height: D = void 0 } = e, { loading_status: b = void 0 } = e, { interactive: E = !0 } = e, { gradio: h } = e, _ = {}, g = {}, y = {}, $ = null, C = !1, R = {}; - function S(F) { - if (F.minimum === void 0 && F.maximum === void 0) { - y[F.name] !== !0 && (t(15, y[F.name] = !0, y), t(15, y = Object.assign({}, y))); + var a = this && this.__awaiter || function(y, L, W, oe) { + function Re(kt) { + return kt instanceof W ? kt : new W(function(bt) { + bt(kt); + }); + } + return new (W || (W = Promise))(function(kt, bt) { + function Et(Ke) { + try { + Xe(oe.next(Ke)); + } catch (Bt) { + bt(Bt); + } + } + function yt(Ke) { + try { + Xe(oe.throw(Ke)); + } catch (Bt) { + bt(Bt); + } + } + function Xe(Ke) { + Ke.done ? kt(Ke.value) : Re(Ke.value).then(Et, yt); + } + Xe((oe = oe.apply(y, L || [])).next()); + }); + }, o; + let { value: l = [] } = e, { label: r = void 0 } = e, { visible: s = !0 } = e, { open: u = !0 } = e, { elem_id: c = "" } = e, { elem_classes: h = [] } = e, { container: d = !1 } = e, { scale: f = null } = e, { min_width: v = void 0 } = e, { width: D = void 0 } = e, { height: b = void 0 } = e, { loading_status: E = void 0 } = e, { interactive: m = !0 } = e, { gradio: _ } = e, g = {}, F = {}, w = {}, C = null, I = !1, S = {}; + function O(y) { + if (y.minimum === void 0 && y.maximum === void 0) { + w[y.name] !== !0 && (t(15, w[y.name] = !0, w), t(15, w = Object.assign({}, w))); return; } - const L = Number(F.value); - let te = !0; - F.minimum !== void 0 && L < F.minimum && (te = !1), F.maximum !== void 0 && L > F.maximum && (te = !1), y[F.name] !== te && (t(15, y[F.name] = te, y), t(15, y = Object.assign({}, y))); - } - function N() { - if (Array.isArray(o)) { - for (const F of o) - if (Array.isArray(F.properties)) - for (const L of F.properties) - L.component === "slider" && g[L.name] && za(L, g[L.name]); + const L = Number(y.value); + let W = !0; + y.minimum !== void 0 && L < y.minimum && (W = !1), y.maximum !== void 0 && L > y.maximum && (W = !1), w[y.name] !== W && (t(15, w[y.name] = W, w), t(15, w = Object.assign({}, w))); + } + function q() { + if (Array.isArray(l)) { + for (const y of l) + if (Array.isArray(y.properties)) + for (const L of y.properties) + L.component === "slider" && F[L.name] && Ua(L, F[L.name]); } } - function O() { - t(1, s = !s), s ? h.dispatch("expand") : h.dispatch("collapse"); + function H() { + t(1, u = !u), u ? _.dispatch("expand") : _.dispatch("collapse"); } - function H(F) { - t(13, _[F] = !_[F], _); + function ke(y) { + t(13, g[y] = !g[y], g); } - function Ae(F) { - if (Array.isArray(o)) - for (const L of o) { + function re(y) { + if (Array.isArray(l)) + for (const L of l) { if (!Array.isArray(L.properties)) continue; - const te = L.properties.find((Ce) => Ce.name === F); - if (te) return te.value; + const W = L.properties.find((oe) => oe.name === y); + if (W) return W.value; } } - function W(F, L) { - var te; - if (y[L.name] === !1) + function ae(y, L) { + var W; + if (w[L.name] === !1) return; - const Ce = {}; - let gt = L.value; - !((te = L.component) === null || te === void 0) && te.startsWith("number") || L.component === "slider" ? gt = Number(L.value) : L.component === "checkbox" && (gt = L.value), Ce[L.name] = gt, h.dispatch(F, Ce); - } - function ve(F, L) { - L.value = F.target.value, W("change", L); + const oe = {}; + let Re = L.value; + !((W = L.component) === null || W === void 0) && W.startsWith("number") || L.component === "slider" ? Re = Number(L.value) : L.component === "checkbox" && (Re = L.value), oe[L.name] = Re, _.dispatch(y, oe); + } + function se(y, L) { + return a(this, void 0, void 0, function* () { + const W = y.target.value; + t(0, l = l.map((oe) => oe.properties ? Object.assign(Object.assign({}, oe), { + properties: oe.properties.map((Re) => Re.name === L.name ? Object.assign(Object.assign({}, Re), { value: W }) : Re) + }) : oe)), yield xs(), _.dispatch("change", l); + }); } - function oe(F) { - if (C) return; - if (C = !0, !(F in R)) { - C = !1; + function Se(y) { + if (I) return; + if (I = !0, !(y in S)) { + I = !1; return; } - let L = o.map((te) => (te.properties && (te.properties = te.properties.map((Ce) => Ce.name === F ? Object.assign(Object.assign({}, Ce), { value: R[F] }) : Ce)), te)); - t(0, o = L), h.dispatch("change", L), setTimeout( + let L = l.map((W) => (W.properties && (W.properties = W.properties.map((oe) => oe.name === y ? Object.assign(Object.assign({}, oe), { value: S[y] }) : oe)), W)); + t(0, l = L), _.dispatch("change", L), setTimeout( () => { - C = !1; + I = !1; }, 100 ); } - Ls(() => { - t(27, $ = JSON.stringify(o)), Array.isArray(o) && o.forEach((F) => { - Array.isArray(F.properties) && F.properties.forEach((L) => { - t(16, R[L.name] = L.value, R); + function K() { + t(27, C = JSON.stringify(l)), Array.isArray(l) && l.forEach((y) => { + Array.isArray(y.properties) && y.properties.forEach((L) => { + t(16, S[L.name] = L.value, S); }); - }), setTimeout(N, 0); + }), setTimeout(q, 50); + } + Ls(() => { + K(); }); - const Be = () => h.dispatch("clear_status"), K = (F) => H(F.group_name); - function re(F, L) { - F[L].value = this.value, t(0, o); + const ue = () => _.dispatch("clear_status"), he = (y) => ke(y.group_name); + function $(y, L) { + y[L].value = this.value, t(0, l); } - const fe = (F) => W("change", F), w = (F) => W("input", F); - function le(F, L) { - F[L].value = this.checked, t(0, o); + const le = (y) => ae("change", y), X = (y) => ae("input", y); + function _e(y, L) { + y[L].value = this.checked, t(0, l); } - const X = (F) => W("change", F); - function ue(F, L) { - F[L].value = ni(this.value), t(0, o); + const A = (y) => ae("change", y); + function Ee(y, L) { + y[L].value = ri(this.value), t(0, l); } - const A = (F) => W("change", F), we = (F) => { - S(F), W("input", F); + const We = (y) => ae("change", y), gt = (y) => { + O(y), ae("input", y); }; - function Ve(F, L) { - F[L].value = ni(this.value), t(0, o); + function vt(y, L) { + y[L].value = ri(this.value), t(0, l); } - function pt(F, L) { - ks[F ? "unshift" : "push"](() => { - g[L.name] = F, t(14, g); + function Dt(y, L) { + ks[y ? "unshift" : "push"](() => { + F[L.name] = y, t(14, F); }); } - const ht = (F) => { - S(F), za(F, g[F.name]), W("input", F); - }, mt = (F) => W("change", F); - function lt(F, L) { - F[L].value = this.value, t(0, o); + const st = (y) => { + O(y), Ua(y, F[y.name]), ae("input", y); + }, Ze = (y) => ae("change", y); + function Ye(y, L) { + y[L].value = this.value, t(0, l); } - const We = (F) => W("change", F), Ze = (F, L) => ve(L, F), ot = (F) => oe(F.name); - return i.$$set = (F) => { - "value" in F && t(0, o = F.value), "label" in F && t(2, l = F.label), "visible" in F && t(3, r = F.visible), "open" in F && t(1, s = F.open), "elem_id" in F && t(4, c = F.elem_id), "elem_classes" in F && t(25, u = F.elem_classes), "container" in F && t(5, m = F.container), "scale" in F && t(6, d = F.scale), "min_width" in F && t(7, f = F.min_width), "width" in F && t(8, v = F.width), "height" in F && t(9, D = F.height), "loading_status" in F && t(10, b = F.loading_status), "interactive" in F && t(11, E = F.interactive), "gradio" in F && t(12, h = F.gradio); + const ut = (y) => ae("change", y), zt = (y, L) => se(L, y), Mt = (y) => Se(y.name); + return i.$$set = (y) => { + "value" in y && t(0, l = y.value), "label" in y && t(2, r = y.label), "visible" in y && t(3, s = y.visible), "open" in y && t(1, u = y.open), "elem_id" in y && t(4, c = y.elem_id), "elem_classes" in y && t(25, h = y.elem_classes), "container" in y && t(5, d = y.container), "scale" in y && t(6, f = y.scale), "min_width" in y && t(7, v = y.min_width), "width" in y && t(8, D = y.width), "height" in y && t(9, b = y.height), "loading_status" in y && t(10, E = y.loading_status), "interactive" in y && t(11, m = y.interactive), "gradio" in y && t(12, _ = y.gradio); }, i.$$.update = () => { if (i.$$.dirty[0] & /*elem_classes*/ - 33554432 && t(17, n = ["propertysheet-wrapper", ...u]), i.$$.dirty[0] & /*open, height*/ + 33554432 && t(17, n = ["propertysheet-wrapper", ...h]), i.$$.dirty[0] & /*open, height*/ 514, i.$$.dirty[0] & /*value, lastValue, groupVisibility, _a*/ - 201334785 && Array.isArray(o) && JSON.stringify(o) !== $) { - t(27, $ = JSON.stringify(o)); - for (const F of o) - if (_[F.group_name] === void 0 && t(13, _[F.group_name] = !0, _), Array.isArray(F.properties)) - for (const L of F.properties) - (!(t(26, a = L.component) === null || a === void 0) && a.startsWith("number") || L.component === "slider") && S(L); - N(); + 201334785 && Array.isArray(l) && JSON.stringify(l) !== C) { + t(27, C = JSON.stringify(l)); + for (const y of l) + if (g[y.group_name] === void 0 && t(13, g[y.group_name] = !0, g), Array.isArray(y.properties)) + for (const L of y.properties) + (!(t(26, o = L.component) === null || o === void 0) && o.startsWith("number") || L.component === "slider") && O(L); + q(); } }, [ - o, - s, l, + u, r, + s, c, - m, d, f, v, D, b, E, - h, + m, _, g, - y, - R, - n, + F, + w, S, + n, O, H, - Ae, - W, - ve, - oe, - u, - a, - $, - Be, - K, + ke, re, - fe, - w, + ae, + se, + Se, + h, + o, + C, + ue, + he, + $, le, X, - ue, + _e, A, - we, - Ve, - pt, - ht, - mt, - lt, + Ee, We, + gt, + vt, + Dt, + st, Ze, - ot + Ye, + ut, + zt, + Mt ]; } -class pE extends $s { +class hA extends ws { constructor(e) { super(), Bs( this, e, + Gs, Hs, - Us, Rs, { value: 0, @@ -9353,5 +9387,5 @@ class pE extends $s { } } export { - pE as default + hA as default }; diff --git a/src/backend/gradio_propertysheet/templates/component/style.css b/src/backend/gradio_propertysheet/templates/component/style.css index fe765fce18e1badef8247f2ae2d1f0d4b3ce2009..d2fb05b2001edfeaffa571693f6fc1c7b13f1d65 100644 --- a/src/backend/gradio_propertysheet/templates/component/style.css +++ b/src/backend/gradio_propertysheet/templates/component/style.css @@ -1 +1 @@ -.block.svelte-239wnu{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.fullscreen.svelte-239wnu{border-radius:0}.auto-margin.svelte-239wnu{margin-left:auto;margin-right:auto}.block.border_focus.svelte-239wnu{border-color:var(--color-accent)}.block.border_contrast.svelte-239wnu{border-color:var(--body-text-color)}.padded.svelte-239wnu{padding:var(--block-padding)}.hidden.svelte-239wnu{display:none}.flex.svelte-239wnu{display:flex;flex-direction:column}.hide-container.svelte-239wnu:not(.fullscreen){margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}.resize-handle.svelte-239wnu{position:absolute;bottom:0;right:0;width:10px;height:10px;fill:var(--block-border-color);cursor:nwse-resize}.fullscreen.svelte-239wnu{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1000;overflow:auto}.animating.svelte-239wnu{animation:svelte-239wnu-pop-out .1s ease-out forwards}@keyframes svelte-239wnu-pop-out{0%{position:fixed;top:var(--start-top);left:var(--start-left);width:var(--start-width);height:var(--start-height);z-index:100}to{position:fixed;top:0vh;left:0vw;width:100vw;height:100vh;z-index:1000}}.placeholder.svelte-239wnu{border-radius:var(--block-radius);border-width:var(--block-border-width);border-color:var(--block-border-color);border-style:dashed}Tables */ table,tr,td,th{margin-top:var(--spacing-sm);margin-bottom:var(--spacing-sm);padding:var(--spacing-xl)}.md code,.md pre{background:none;font-family:var(--font-mono);font-size:var(--text-sm);text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:2;tab-size:2;-webkit-hyphens:none;hyphens:none}.md pre[class*=language-]::selection,.md pre[class*=language-] ::selection,.md code[class*=language-]::selection,.md code[class*=language-] ::selection{text-shadow:none;background:#b3d4fc}.md pre{padding:1em;margin:.5em 0;overflow:auto;position:relative;margin-top:var(--spacing-sm);margin-bottom:var(--spacing-sm);box-shadow:none;border:none;border-radius:var(--radius-md);background:var(--code-background-fill);padding:var(--spacing-xxl);font-family:var(--font-mono);text-shadow:none;border-radius:var(--radius-sm);white-space:nowrap;display:block;white-space:pre}.md :not(pre)>code{padding:.1em;border-radius:var(--radius-xs);white-space:normal;background:var(--code-background-fill);border:1px solid var(--panel-border-color);padding:var(--spacing-xxs) var(--spacing-xs)}.md .token.comment,.md .token.prolog,.md .token.doctype,.md .token.cdata{color:#708090}.md .token.punctuation{color:#999}.md .token.namespace{opacity:.7}.md .token.property,.md .token.tag,.md .token.boolean,.md .token.number,.md .token.constant,.md .token.symbol,.md .token.deleted{color:#905}.md .token.selector,.md .token.attr-name,.md .token.string,.md .token.char,.md .token.builtin,.md .token.inserted{color:#690}.md .token.atrule,.md .token.attr-value,.md .token.keyword{color:#07a}.md .token.function,.md .token.class-name{color:#dd4a68}.md .token.regex,.md .token.important,.md .token.variable{color:#e90}.md .token.important,.md .token.bold{font-weight:700}.md .token.italic{font-style:italic}.md .token.entity{cursor:help}.dark .md .token.comment,.dark .md .token.prolog,.dark .md .token.cdata{color:#5c6370}.dark .md .token.doctype,.dark .md .token.punctuation,.dark .md .token.entity{color:#abb2bf}.dark .md .token.attr-name,.dark .md .token.class-name,.dark .md .token.boolean,.dark .md .token.constant,.dark .md .token.number,.dark .md .token.atrule{color:#d19a66}.dark .md .token.keyword{color:#c678dd}.dark .md .token.property,.dark .md .token.tag,.dark .md .token.symbol,.dark .md .token.deleted,.dark .md .token.important{color:#e06c75}.dark .md .token.selector,.dark .md .token.string,.dark .md .token.char,.dark .md .token.builtin,.dark .md .token.inserted,.dark .md .token.regex,.dark .md .token.attr-value,.dark .md .token.attr-value>.token.punctuation{color:#98c379}.dark .md .token.variable,.dark .md .token.operator,.dark .md .token.function{color:#61afef}.dark .md .token.url{color:#56b6c2}span.svelte-1m32c2s div[class*=code_wrap]{position:relative}span.svelte-1m32c2s span.katex{font-size:var(--text-lg);direction:ltr}span.svelte-1m32c2s div[class*=code_wrap]>button{z-index:1;cursor:pointer;border-bottom-left-radius:var(--radius-sm);padding:var(--spacing-md);width:25px;height:25px;position:absolute;right:0}span.svelte-1m32c2s .check{opacity:0;z-index:var(--layer-top);transition:opacity .2s;background:var(--code-background-fill);color:var(--body-text-color);position:absolute;top:var(--size-1-5);left:var(--size-1-5)}span.svelte-1m32c2s p:not(:first-child){margin-top:var(--spacing-xxl)}span.svelte-1m32c2s .md-header-anchor{margin-left:-25px;padding-right:8px;line-height:1;color:var(--body-text-color-subdued);opacity:0}span.svelte-1m32c2s h1:hover .md-header-anchor,span.svelte-1m32c2s h2:hover .md-header-anchor,span.svelte-1m32c2s h3:hover .md-header-anchor,span.svelte-1m32c2s h4:hover .md-header-anchor,span.svelte-1m32c2s h5:hover .md-header-anchor,span.svelte-1m32c2s h6:hover .md-header-anchor{opacity:1}span.md.svelte-1m32c2s .md-header-anchor>svg{color:var(--body-text-color-subdued)}span.svelte-1m32c2s table{word-break:break-word}div.svelte-17qq50w>.md.prose{font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}div.svelte-17qq50w>.md.prose *{color:var(--block-info-text-color)}div.svelte-17qq50w{margin-bottom:var(--spacing-md)}span.has-info.svelte-zgrq3{margin-bottom:var(--spacing-xs)}span.svelte-zgrq3:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-zgrq3{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}span[dir=rtl].svelte-zgrq3{display:block}.hide.svelte-zgrq3{margin:0;height:0}label.svelte-13ao5pu.svelte-13ao5pu{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--block-label-border-color);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-13ao5pu.svelte-13ao5pu{border-top-left-radius:0}label.float.svelte-13ao5pu.svelte-13ao5pu{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-13ao5pu.svelte-13ao5pu:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-13ao5pu.svelte-13ao5pu{height:0}span.svelte-13ao5pu.svelte-13ao5pu{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-13ao5pu.svelte-13ao5pu{box-shadow:none;border-width:0;background:transparent;overflow:visible}label[dir=rtl].svelte-13ao5pu.svelte-13ao5pu{border:var(--block-label-border-width) solid var(--block-label-border-color);border-top:none;border-right:none;border-bottom-left-radius:var(--block-radius);border-bottom-right-radius:var(--block-label-radius);border-top-left-radius:var(--block-label-radius)}label[dir=rtl].svelte-13ao5pu span.svelte-13ao5pu{margin-left:var(--size-2);margin-right:0}button.svelte-qgco6m{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-xs);color:var(--block-label-text-color);border:1px solid transparent;padding:var(--spacing-xxs)}button.svelte-qgco6m:hover{background-color:var(--background-fill-secondary)}button[disabled].svelte-qgco6m{opacity:.5;box-shadow:none}button[disabled].svelte-qgco6m:hover{cursor:not-allowed}.padded.svelte-qgco6m{background:var(--bg-color)}button.svelte-qgco6m:hover,button.highlight.svelte-qgco6m{cursor:pointer;color:var(--color-accent)}.padded.svelte-qgco6m:hover{color:var(--block-label-text-color)}span.svelte-qgco6m{padding:0 1px;font-size:10px}div.svelte-qgco6m{display:flex;align-items:center;justify-content:center;transition:filter .2s ease-in-out}.x-small.svelte-qgco6m{width:10px;height:10px}.small.svelte-qgco6m{width:14px;height:14px}.medium.svelte-qgco6m{width:20px;height:20px}.large.svelte-qgco6m{width:22px;height:22px}.pending.svelte-qgco6m{animation:svelte-qgco6m-flash .5s infinite}@keyframes svelte-qgco6m-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.transparent.svelte-qgco6m{background:transparent;border:none;box-shadow:none}.empty.svelte-3w3rth{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-3w3rth{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-3w3rth{min-height:calc(var(--size-32) - 20px)}.large.svelte-3w3rth{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-3w3rth{margin-top:0}.small_parent.svelte-3w3rth{min-height:100%!important}.dropdown-arrow.svelte-145leq6,.dropdown-arrow.svelte-ihhdbf{fill:currentColor}.circle.svelte-ihhdbf{fill:currentColor;opacity:.1}svg.svelte-pb9pol{animation:svelte-pb9pol-spin 1.5s linear infinite}@keyframes svelte-pb9pol-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}h2.svelte-1xg7h5n{font-size:var(--text-xl)!important}p.svelte-1xg7h5n,h2.svelte-1xg7h5n{white-space:pre-line}.wrap.svelte-1xg7h5n{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3);text-align:center;margin:auto var(--spacing-lg)}.or.svelte-1xg7h5n{color:var(--body-text-color-subdued);display:flex}.icon-wrap.svelte-1xg7h5n{width:30px;margin-bottom:var(--spacing-lg)}@media (--screen-md){.wrap.svelte-1xg7h5n{font-size:var(--text-lg)}}.hovered.svelte-1xg7h5n{color:var(--color-accent)}div.svelte-q32hvf{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;align-items:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;color:var(--block-label-text-color);flex-shrink:0}.show_border.svelte-q32hvf{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl);box-shadow:var(--shadow-drop)}.source-selection.svelte-15ls1gu{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:100%;margin-left:auto;margin-right:auto;height:var(--size-10)}.icon.svelte-15ls1gu{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.svelte-15ls1gu{color:var(--color-accent)}.icon.svelte-15ls1gu:hover,.icon.svelte-15ls1gu:focus{color:var(--color-accent)}.icon-button-wrapper.svelte-109se4{display:flex;flex-direction:row;align-items:center;justify-content:center;z-index:var(--layer-3);gap:var(--spacing-sm);box-shadow:var(--shadow-drop);border:1px solid var(--border-color-primary);background:var(--block-background-fill);padding:var(--spacing-xxs)}.icon-button-wrapper.hide-top-corner.svelte-109se4{border-top:none;border-right:none;border-radius:var(--block-label-right-radius)}.icon-button-wrapper.display-top-corner.svelte-109se4{border-radius:var(--radius-sm) 0 0 var(--radius-sm);top:var(--spacing-sm);right:-1px}.icon-button-wrapper.svelte-109se4:not(.top-panel){border:1px solid var(--border-color-primary);border-radius:var(--radius-sm)}.top-panel.svelte-109se4{position:absolute;top:var(--block-label-margin);right:var(--block-label-margin);margin:0}.icon-button-wrapper.svelte-109se4 button{margin:var(--spacing-xxs);border-radius:var(--radius-xs);position:relative}.icon-button-wrapper.svelte-109se4 a.download-link:not(:last-child),.icon-button-wrapper.svelte-109se4 button:not(:last-child){margin-right:var(--spacing-xxs)}.icon-button-wrapper.svelte-109se4 a.download-link:not(:last-child):not(.no-border *):after,.icon-button-wrapper.svelte-109se4 button:not(:last-child):not(.no-border *):after{content:"";position:absolute;right:-4.5px;top:15%;height:70%;width:1px;background-color:var(--border-color-primary)}.icon-button-wrapper.svelte-109se4>*{height:100%}svg.svelte-43sxxs.svelte-43sxxs{width:var(--size-20);height:var(--size-20)}svg.svelte-43sxxs path.svelte-43sxxs{fill:var(--loader-color)}div.svelte-43sxxs.svelte-43sxxs{z-index:var(--layer-2)}.margin.svelte-43sxxs.svelte-43sxxs{margin:var(--size-4)}.wrap.svelte-17v219f.svelte-17v219f{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-2);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden}.wrap.center.svelte-17v219f.svelte-17v219f{top:0;right:0;left:0}.wrap.default.svelte-17v219f.svelte-17v219f{top:0;right:0;bottom:0;left:0}.hide.svelte-17v219f.svelte-17v219f{opacity:0;pointer-events:none}.generating.svelte-17v219f.svelte-17v219f{animation:svelte-17v219f-pulseStart 1s cubic-bezier(.4,0,.6,1),svelte-17v219f-pulse 2s cubic-bezier(.4,0,.6,1) 1s infinite;border:2px solid var(--color-accent);background:transparent;z-index:var(--layer-1);pointer-events:none}.translucent.svelte-17v219f.svelte-17v219f{background:none}@keyframes svelte-17v219f-pulseStart{0%{opacity:0}to{opacity:1}}@keyframes svelte-17v219f-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-17v219f.svelte-17v219f{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-17v219f.svelte-17v219f{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-17v219f.svelte-17v219f{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-17v219f.svelte-17v219f{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-17v219f.svelte-17v219f{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-17v219f.svelte-17v219f{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-17v219f.svelte-17v219f{position:absolute;bottom:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-17v219f.svelte-17v219f{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-17v219f.svelte-17v219f{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-17v219f.svelte-17v219f{pointer-events:none}.minimal.svelte-17v219f .progress-text.svelte-17v219f{background:var(--block-background-fill)}.border.svelte-17v219f.svelte-17v219f{border:1px solid var(--border-color-primary)}.clear-status.svelte-17v219f.svelte-17v219f{position:absolute;display:flex;top:var(--size-2);right:var(--size-2);justify-content:flex-end;gap:var(--spacing-sm);z-index:var(--layer-1)}.toast-body.svelte-1pgj5gs{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-1pgj5gs{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-1pgj5gs{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-1pgj5gs{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-1pgj5gs{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-1pgj5gs{border:1px solid var(--color-grey-700);background:var (--color-grey-50)}.dark .toast-body.info.svelte-1pgj5gs{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-body.success.svelte-1pgj5gs{border:1px solid var(--color-green-700);background:var(--color-green-50)}.dark .toast-body.success.svelte-1pgj5gs{border:1px solid var(--color-green-500);background-color:var(--color-grey-950)}.toast-title.svelte-1pgj5gs{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm)}.toast-title.error.svelte-1pgj5gs{color:var(--color-red-700)}.dark .toast-title.error.svelte-1pgj5gs{color:var(--color-red-50)}.toast-title.warning.svelte-1pgj5gs{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-1pgj5gs{color:var(--color-yellow-50)}.toast-title.info.svelte-1pgj5gs{color:var(--color-grey-700)}.dark .toast-title.info.svelte-1pgj5gs{color:var(--color-grey-50)}.toast-title.success.svelte-1pgj5gs{color:var(--color-green-700)}.dark .toast-title.success.svelte-1pgj5gs{color:var(--color-green-50)}.toast-close.svelte-1pgj5gs{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-1pgj5gs{color:var(--color-red-700)}.dark .toast-close.error.svelte-1pgj5gs{color:var(--color-red-500)}.toast-close.warning.svelte-1pgj5gs{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-1pgj5gs{color:var(--color-yellow-500)}.toast-close.info.svelte-1pgj5gs{color:var(--color-grey-700)}.dark .toast-close.info.svelte-1pgj5gs{color:var(--color-grey-500)}.toast-close.success.svelte-1pgj5gs{color:var(--color-green-700)}.dark .toast-close.success.svelte-1pgj5gs{color:var(--color-green-500)}.toast-text.svelte-1pgj5gs{font-size:var(--text-lg);word-wrap:break-word;overflow-wrap:break-word;word-break:break-word}.toast-text.error.svelte-1pgj5gs{color:var(--color-red-700)}.dark .toast-text.error.svelte-1pgj5gs{color:var(--color-red-50)}.toast-text.warning.svelte-1pgj5gs{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-1pgj5gs{color:var(--color-yellow-50)}.toast-text.info.svelte-1pgj5gs{color:var(--color-grey-700)}.dark .toast-text.info.svelte-1pgj5gs{color:var(--color-grey-50)}.toast-text.success.svelte-1pgj5gs{color:var(--color-green-700)}.dark .toast-text.success.svelte-1pgj5gs{color:var(--color-green-50)}.toast-details.svelte-1pgj5gs{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-1pgj5gs{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-1pgj5gs{color:var(--color-red-700)}.dark .toast-icon.error.svelte-1pgj5gs{color:var(--color-red-500)}.toast-icon.warning.svelte-1pgj5gs{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-1pgj5gs{color:var(--color-yellow-500)}.toast-icon.info.svelte-1pgj5gs{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-1pgj5gs{color:var(--color-grey-500)}.toast-icon.success.svelte-1pgj5gs{color:var(--color-green-700)}.dark .toast-icon.success.svelte-1pgj5gs{color:var(--color-green-500)}@keyframes svelte-1pgj5gs-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-1pgj5gs{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-1pgj5gs-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-1pgj5gs{background:var(--color-red-700)}.dark .timer.error.svelte-1pgj5gs{background:var(--color-red-500)}.timer.warning.svelte-1pgj5gs{background:var(--color-yellow-700)}.dark .timer.warning.svelte-1pgj5gs{background:var(--color-yellow-500)}.timer.info.svelte-1pgj5gs{background:var(--color-grey-700)}.dark .timer.info.svelte-1pgj5gs{background:var(--color-grey-500)}.timer.success.svelte-1pgj5gs{background:var(--color-green-700)}.dark .timer.success.svelte-1pgj5gs{background:var(--color-green-500)}.hidden.svelte-1pgj5gs{display:none}.toast-text.svelte-1pgj5gs a{text-decoration:underline}.toast-wrap.svelte-gatr8h{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.svelte-gatr8h{width:calc(var(--size-96) + var(--size-10))}}.streaming-bar.svelte-ga0jj6{position:absolute;bottom:0;left:0;right:0;height:4px;background-color:var(--primary-600);animation:svelte-ga0jj6-countdown linear forwards;z-index:1}@keyframes svelte-ga0jj6-countdown{0%{transform:translate(0)}to{transform:translate(-100%)}}:host{display:flex;flex-direction:column;height:100%}.propertysheet-wrapper{overflow:hidden!important;display:flex;flex-direction:column;flex-grow:1}.accordion-header.svelte-16grkhl.svelte-16grkhl{display:flex;justify-content:space-between;align-items:center;width:100%;cursor:pointer;padding:var(--block-title-padding);background:var(--block-title-background-fill);color:var(--block-title-text-color);flex-shrink:0}.content-wrapper.svelte-16grkhl.svelte-16grkhl{flex-grow:1;min-height:0}.container.svelte-16grkhl.svelte-16grkhl{overflow-y:auto;height:auto;max-height:var(--sheet-max-height, 500px);border-radius:0!important;border:1px solid var(--border-color-primary);border-top:none;border-bottom-left-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg);background-color:var(--background-fill-secondary)}.closed.svelte-16grkhl.svelte-16grkhl{display:none}.group-header.svelte-16grkhl.svelte-16grkhl{display:flex;justify-content:space-between;align-items:center;width:100%;padding:var(--spacing-sm) var(--spacing-md);background-color:var(--input-background-fill);color:var(--body-text-color);text-align:left;cursor:pointer;font-size:var(--text-md);font-weight:var(--font-weight-bold);border:1px solid var(--border-color-primary)}.properties-grid.svelte-16grkhl.svelte-16grkhl{display:grid;grid-template-columns:1fr 2fr;gap:0;padding:0}.prop-label.svelte-16grkhl.svelte-16grkhl,.prop-control.svelte-16grkhl.svelte-16grkhl{padding:var(--spacing-sm) var(--spacing-md);display:flex;align-items:center;border-bottom:1px solid var(--background-fill-secondary)}.prop-label.svelte-16grkhl.svelte-16grkhl{background-color:var(--background-fill-primary);color:var(--body-text-color);opacity:.7;font-weight:var(--font-weight-semibold);font-size:var(--text-xs);text-align:right;justify-content:flex-end;word-break:break-word}.prop-control.svelte-16grkhl.svelte-16grkhl{gap:var(--spacing-sm)}.properties-grid.svelte-16grkhl>.svelte-16grkhl:nth-last-child(-n+2){border-bottom:none}.prop-control.svelte-16grkhl input[type=text].svelte-16grkhl,.prop-control.svelte-16grkhl input[type=number].svelte-16grkhl{background-color:var(--input-background-fill);border:var(--input-border-width) solid var(--border-color-primary);box-shadow:var(--input-shadow);color:var(--input-text-color);font-size:var(--input-text-size);border-radius:0;width:100%;padding-top:var(--spacing-1);padding-bottom:var(--spacing-1);padding-left:var(--spacing-md);padding-right:var(--spacing-3)}.prop-control.svelte-16grkhl input[type=text].svelte-16grkhl:focus,.prop-control.svelte-16grkhl input[type=number].svelte-16grkhl:focus{box-shadow:var(--input-shadow-focus);border-color:var(--input-border-color-focus);background-color:var(--input-background-fill-focus);outline:none}.dropdown-wrapper.svelte-16grkhl.svelte-16grkhl{position:relative;width:100%}.dropdown-wrapper.svelte-16grkhl select.svelte-16grkhl{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--input-background-fill);border:var(--input-border-width) solid var(--border-color-primary);box-shadow:var(--input-shadow);color:var(--input-text-color);font-size:var(--input-text-size);width:100%;cursor:pointer;border-radius:0;padding-top:var(--spacing-1);padding-bottom:var(--spacing-1);padding-left:var(--spacing-md);padding-right:calc(var(--spacing-3) + 1.2em)}.dropdown-arrow-icon.svelte-16grkhl.svelte-16grkhl{position:absolute;top:50%;right:var(--spacing-3);transform:translateY(-50%);width:1em;height:1em;pointer-events:none;z-index:1;background-color:var(--body-text-color-subdued);-webkit-mask-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 8l4 4 4-4'/%3e%3c/svg%3e");mask-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 8l4 4 4-4'%3e%3c/svg%3e")}.dropdown-wrapper.svelte-16grkhl select.svelte-16grkhl:focus{box-shadow:var(--input-shadow-focus);border-color:var(--input-border-color-focus);background-color:var(--input-background-fill-focus);outline:none}.dropdown-wrapper.svelte-16grkhl select option.svelte-16grkhl{background:var(--input-background-fill);color:var(--body-text-color)}.prop-control.svelte-16grkhl input[type=checkbox].svelte-16grkhl{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:var(--size-4);height:var(--size-4);border-radius:0;border:1px solid var(--checkbox-border-color);background-color:var(--checkbox-background-color);box-shadow:var(--checkbox-shadow);cursor:pointer;margin:0;transition:background-color .2s,border-color .2s}.prop-control.svelte-16grkhl input[type=checkbox].svelte-16grkhl:hover{border-color:var(--checkbox-border-color-hover);background-color:var(--checkbox-background-color-hover)}.prop-control.svelte-16grkhl input[type=checkbox].svelte-16grkhl:focus{border-color:var(--checkbox-border-color-focus);background-color:var(--checkbox-background-color-focus);outline:none}.prop-control.svelte-16grkhl input[type=checkbox].svelte-16grkhl:checked{background-color:var(--checkbox-background-color-selected);border-color:var(--checkbox-border-color-focus)}.prop-control.svelte-16grkhl input[type=checkbox].svelte-16grkhl:checked:after{content:"";position:absolute;display:block;top:50%;left:50%;width:4px;height:8px;border:solid var(--checkbox-label-text-color-selected);border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}.slider-container.svelte-16grkhl.svelte-16grkhl{display:flex;align-items:center;gap:var(--spacing-md);width:100%}.slider-container.svelte-16grkhl input[type=range].svelte-16grkhl{--slider-progress:0%;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer;width:100%}.slider-container.svelte-16grkhl input[type=range].svelte-16grkhl::-webkit-slider-runnable-track{height:8px;border-radius:var(--radius-lg);background:linear-gradient(to right,var(--slider-color) var(--slider-progress),var(--input-background-fill) var(--slider-progress))}.slider-container.svelte-16grkhl input[type=range].svelte-16grkhl::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-top:-4px;background-color:#fff;border-radius:50%;height:16px;width:16px;border:1px solid var(--border-color-primary);box-shadow:var(--shadow-drop)}.slider-container.svelte-16grkhl input[type=range].svelte-16grkhl::-moz-range-track{height:8px;border-radius:var(--radius-lg);background:linear-gradient(to right,var(--slider-color) var(--slider-progress),var(--input-background-fill) var(--slider-progress))}.slider-container.svelte-16grkhl input[type=range].svelte-16grkhl::-moz-range-thumb{background-color:#fff;border-radius:50%;height:16px;width:16px;border:1px solid var(--border-color-primary);box-shadow:var(--shadow-drop)}.slider-value.svelte-16grkhl.svelte-16grkhl{min-width:40px;text-align:right;font-family:var(--font-mono);font-size:var(--text-xs)}.prop-label-wrapper.svelte-16grkhl.svelte-16grkhl{display:flex;justify-content:flex-end;align-items:center;gap:var(--spacing-sm);width:100%}.tooltip-container.svelte-16grkhl.svelte-16grkhl{position:relative;display:inline-flex;align-items:center;justify-content:center}.tooltip-icon.svelte-16grkhl.svelte-16grkhl{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;background-color:var(--body-text-color-subdued);color:var(--background-fill-primary);font-size:10px;font-weight:700;cursor:help;-webkit-user-select:none;user-select:none}.tooltip-text.svelte-16grkhl.svelte-16grkhl{visibility:hidden;width:200px;background-color:var(--body-text-color);color:var(--background-fill-primary);text-align:center;border-radius:var(--radius-md);padding:var(--spacing-md);position:absolute;z-index:10;bottom:125%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .3s}.tooltip-container.svelte-16grkhl:hover .tooltip-text.svelte-16grkhl{visibility:visible;opacity:1}.color-picker-container.svelte-16grkhl.svelte-16grkhl{display:flex;align-items:center;gap:var(--spacing-md);width:100%}.color-picker-input.svelte-16grkhl.svelte-16grkhl{width:50px;height:28px;background-color:transparent;border:1px solid var(--border-color-primary);border-radius:var(--radius-sm);cursor:pointer;padding:0}.color-picker-input.svelte-16grkhl.svelte-16grkhl::-webkit-color-swatch-wrapper{padding:2px}.color-picker-input.svelte-16grkhl.svelte-16grkhl::-moz-padding{padding:2px}.color-picker-input.svelte-16grkhl.svelte-16grkhl::-webkit-color-swatch{border:none;border-radius:var(--radius-sm)}.color-picker-input.svelte-16grkhl.svelte-16grkhl::-moz-color-swatch{border:none;border-radius:var(--radius-sm)}.color-picker-value.svelte-16grkhl.svelte-16grkhl{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--body-text-color-subdued)}.prop-control.svelte-16grkhl input.invalid.svelte-16grkhl{border-color:var(--error-border-color, red)!important;box-shadow:0 0 0 1px var(--error-border-color, red)!important}.reset-button-prop.svelte-16grkhl.svelte-16grkhl{display:flex;align-items:center;justify-content:center;background:none;border:none;border-left:1px solid var(--border-color-primary);cursor:pointer;color:var(--body-text-color-subdued);font-size:var(--text-lg);padding:0 var(--spacing-2);visibility:hidden;opacity:0;transition:opacity .15s ease-in-out,color .15s ease-in-out}.reset-button-prop.visible.svelte-16grkhl.svelte-16grkhl{visibility:visible;opacity:1}.reset-button-prop.svelte-16grkhl.svelte-16grkhl:hover{color:var(--body-text-color);background-color:var(--background-fill-secondary-hover)}.reset-button-prop.svelte-16grkhl.svelte-16grkhl:disabled{color:var(--body-text-color-subdued)!important;opacity:.5;cursor:not-allowed;background-color:transparent!important}.prop-control.svelte-16grkhl .disabled.svelte-16grkhl{opacity:.5;pointer-events:none;cursor:not-allowed}.prop-control.svelte-16grkhl .disabled input.svelte-16grkhl{cursor:not-allowed}.reset-button-prop.svelte-16grkhl.svelte-16grkhl:disabled{opacity:.3;cursor:not-allowed;background-color:transparent!important} +.block.svelte-239wnu{position:relative;margin:0;box-shadow:var(--block-shadow);border-width:var(--block-border-width);border-color:var(--block-border-color);border-radius:var(--block-radius);background:var(--block-background-fill);width:100%;line-height:var(--line-sm)}.block.fullscreen.svelte-239wnu{border-radius:0}.auto-margin.svelte-239wnu{margin-left:auto;margin-right:auto}.block.border_focus.svelte-239wnu{border-color:var(--color-accent)}.block.border_contrast.svelte-239wnu{border-color:var(--body-text-color)}.padded.svelte-239wnu{padding:var(--block-padding)}.hidden.svelte-239wnu{display:none}.flex.svelte-239wnu{display:flex;flex-direction:column}.hide-container.svelte-239wnu:not(.fullscreen){margin:0;box-shadow:none;--block-border-width:0;background:transparent;padding:0;overflow:visible}.resize-handle.svelte-239wnu{position:absolute;bottom:0;right:0;width:10px;height:10px;fill:var(--block-border-color);cursor:nwse-resize}.fullscreen.svelte-239wnu{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1000;overflow:auto}.animating.svelte-239wnu{animation:svelte-239wnu-pop-out .1s ease-out forwards}@keyframes svelte-239wnu-pop-out{0%{position:fixed;top:var(--start-top);left:var(--start-left);width:var(--start-width);height:var(--start-height);z-index:100}to{position:fixed;top:0vh;left:0vw;width:100vw;height:100vh;z-index:1000}}.placeholder.svelte-239wnu{border-radius:var(--block-radius);border-width:var(--block-border-width);border-color:var(--block-border-color);border-style:dashed}Tables */ table,tr,td,th{margin-top:var(--spacing-sm);margin-bottom:var(--spacing-sm);padding:var(--spacing-xl)}.md code,.md pre{background:none;font-family:var(--font-mono);font-size:var(--text-sm);text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:2;tab-size:2;-webkit-hyphens:none;hyphens:none}.md pre[class*=language-]::selection,.md pre[class*=language-] ::selection,.md code[class*=language-]::selection,.md code[class*=language-] ::selection{text-shadow:none;background:#b3d4fc}.md pre{padding:1em;margin:.5em 0;overflow:auto;position:relative;margin-top:var(--spacing-sm);margin-bottom:var(--spacing-sm);box-shadow:none;border:none;border-radius:var(--radius-md);background:var(--code-background-fill);padding:var(--spacing-xxl);font-family:var(--font-mono);text-shadow:none;border-radius:var(--radius-sm);white-space:nowrap;display:block;white-space:pre}.md :not(pre)>code{padding:.1em;border-radius:var(--radius-xs);white-space:normal;background:var(--code-background-fill);border:1px solid var(--panel-border-color);padding:var(--spacing-xxs) var(--spacing-xs)}.md .token.comment,.md .token.prolog,.md .token.doctype,.md .token.cdata{color:#708090}.md .token.punctuation{color:#999}.md .token.namespace{opacity:.7}.md .token.property,.md .token.tag,.md .token.boolean,.md .token.number,.md .token.constant,.md .token.symbol,.md .token.deleted{color:#905}.md .token.selector,.md .token.attr-name,.md .token.string,.md .token.char,.md .token.builtin,.md .token.inserted{color:#690}.md .token.atrule,.md .token.attr-value,.md .token.keyword{color:#07a}.md .token.function,.md .token.class-name{color:#dd4a68}.md .token.regex,.md .token.important,.md .token.variable{color:#e90}.md .token.important,.md .token.bold{font-weight:700}.md .token.italic{font-style:italic}.md .token.entity{cursor:help}.dark .md .token.comment,.dark .md .token.prolog,.dark .md .token.cdata{color:#5c6370}.dark .md .token.doctype,.dark .md .token.punctuation,.dark .md .token.entity{color:#abb2bf}.dark .md .token.attr-name,.dark .md .token.class-name,.dark .md .token.boolean,.dark .md .token.constant,.dark .md .token.number,.dark .md .token.atrule{color:#d19a66}.dark .md .token.keyword{color:#c678dd}.dark .md .token.property,.dark .md .token.tag,.dark .md .token.symbol,.dark .md .token.deleted,.dark .md .token.important{color:#e06c75}.dark .md .token.selector,.dark .md .token.string,.dark .md .token.char,.dark .md .token.builtin,.dark .md .token.inserted,.dark .md .token.regex,.dark .md .token.attr-value,.dark .md .token.attr-value>.token.punctuation{color:#98c379}.dark .md .token.variable,.dark .md .token.operator,.dark .md .token.function{color:#61afef}.dark .md .token.url{color:#56b6c2}span.svelte-1m32c2s div[class*=code_wrap]{position:relative}span.svelte-1m32c2s span.katex{font-size:var(--text-lg);direction:ltr}span.svelte-1m32c2s div[class*=code_wrap]>button{z-index:1;cursor:pointer;border-bottom-left-radius:var(--radius-sm);padding:var(--spacing-md);width:25px;height:25px;position:absolute;right:0}span.svelte-1m32c2s .check{opacity:0;z-index:var(--layer-top);transition:opacity .2s;background:var(--code-background-fill);color:var(--body-text-color);position:absolute;top:var(--size-1-5);left:var(--size-1-5)}span.svelte-1m32c2s p:not(:first-child){margin-top:var(--spacing-xxl)}span.svelte-1m32c2s .md-header-anchor{margin-left:-25px;padding-right:8px;line-height:1;color:var(--body-text-color-subdued);opacity:0}span.svelte-1m32c2s h1:hover .md-header-anchor,span.svelte-1m32c2s h2:hover .md-header-anchor,span.svelte-1m32c2s h3:hover .md-header-anchor,span.svelte-1m32c2s h4:hover .md-header-anchor,span.svelte-1m32c2s h5:hover .md-header-anchor,span.svelte-1m32c2s h6:hover .md-header-anchor{opacity:1}span.md.svelte-1m32c2s .md-header-anchor>svg{color:var(--body-text-color-subdued)}span.svelte-1m32c2s table{word-break:break-word}div.svelte-17qq50w>.md.prose{font-weight:var(--block-info-text-weight);font-size:var(--block-info-text-size);line-height:var(--line-sm)}div.svelte-17qq50w>.md.prose *{color:var(--block-info-text-color)}div.svelte-17qq50w{margin-bottom:var(--spacing-md)}span.has-info.svelte-zgrq3{margin-bottom:var(--spacing-xs)}span.svelte-zgrq3:not(.has-info){margin-bottom:var(--spacing-lg)}span.svelte-zgrq3{display:inline-block;position:relative;z-index:var(--layer-4);border:solid var(--block-title-border-width) var(--block-title-border-color);border-radius:var(--block-title-radius);background:var(--block-title-background-fill);padding:var(--block-title-padding);color:var(--block-title-text-color);font-weight:var(--block-title-text-weight);font-size:var(--block-title-text-size);line-height:var(--line-sm)}span[dir=rtl].svelte-zgrq3{display:block}.hide.svelte-zgrq3{margin:0;height:0}label.svelte-13ao5pu.svelte-13ao5pu{display:inline-flex;align-items:center;z-index:var(--layer-2);box-shadow:var(--block-label-shadow);border:var(--block-label-border-width) solid var(--block-label-border-color);border-top:none;border-left:none;border-radius:var(--block-label-radius);background:var(--block-label-background-fill);padding:var(--block-label-padding);pointer-events:none;color:var(--block-label-text-color);font-weight:var(--block-label-text-weight);font-size:var(--block-label-text-size);line-height:var(--line-sm)}.gr-group label.svelte-13ao5pu.svelte-13ao5pu{border-top-left-radius:0}label.float.svelte-13ao5pu.svelte-13ao5pu{position:absolute;top:var(--block-label-margin);left:var(--block-label-margin)}label.svelte-13ao5pu.svelte-13ao5pu:not(.float){position:static;margin-top:var(--block-label-margin);margin-left:var(--block-label-margin)}.hide.svelte-13ao5pu.svelte-13ao5pu{height:0}span.svelte-13ao5pu.svelte-13ao5pu{opacity:.8;margin-right:var(--size-2);width:calc(var(--block-label-text-size) - 1px);height:calc(var(--block-label-text-size) - 1px)}.hide-label.svelte-13ao5pu.svelte-13ao5pu{box-shadow:none;border-width:0;background:transparent;overflow:visible}label[dir=rtl].svelte-13ao5pu.svelte-13ao5pu{border:var(--block-label-border-width) solid var(--block-label-border-color);border-top:none;border-right:none;border-bottom-left-radius:var(--block-radius);border-bottom-right-radius:var(--block-label-radius);border-top-left-radius:var(--block-label-radius)}label[dir=rtl].svelte-13ao5pu span.svelte-13ao5pu{margin-left:var(--size-2);margin-right:0}button.svelte-qgco6m{display:flex;justify-content:center;align-items:center;gap:1px;z-index:var(--layer-2);border-radius:var(--radius-xs);color:var(--block-label-text-color);border:1px solid transparent;padding:var(--spacing-xxs)}button.svelte-qgco6m:hover{background-color:var(--background-fill-secondary)}button[disabled].svelte-qgco6m{opacity:.5;box-shadow:none}button[disabled].svelte-qgco6m:hover{cursor:not-allowed}.padded.svelte-qgco6m{background:var(--bg-color)}button.svelte-qgco6m:hover,button.highlight.svelte-qgco6m{cursor:pointer;color:var(--color-accent)}.padded.svelte-qgco6m:hover{color:var(--block-label-text-color)}span.svelte-qgco6m{padding:0 1px;font-size:10px}div.svelte-qgco6m{display:flex;align-items:center;justify-content:center;transition:filter .2s ease-in-out}.x-small.svelte-qgco6m{width:10px;height:10px}.small.svelte-qgco6m{width:14px;height:14px}.medium.svelte-qgco6m{width:20px;height:20px}.large.svelte-qgco6m{width:22px;height:22px}.pending.svelte-qgco6m{animation:svelte-qgco6m-flash .5s infinite}@keyframes svelte-qgco6m-flash{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.transparent.svelte-qgco6m{background:transparent;border:none;box-shadow:none}.empty.svelte-3w3rth{display:flex;justify-content:center;align-items:center;margin-top:calc(0px - var(--size-6));height:var(--size-full)}.icon.svelte-3w3rth{opacity:.5;height:var(--size-5);color:var(--body-text-color)}.small.svelte-3w3rth{min-height:calc(var(--size-32) - 20px)}.large.svelte-3w3rth{min-height:calc(var(--size-64) - 20px)}.unpadded_box.svelte-3w3rth{margin-top:0}.small_parent.svelte-3w3rth{min-height:100%!important}.dropdown-arrow.svelte-145leq6,.dropdown-arrow.svelte-ihhdbf{fill:currentColor}.circle.svelte-ihhdbf{fill:currentColor;opacity:.1}svg.svelte-pb9pol{animation:svelte-pb9pol-spin 1.5s linear infinite}@keyframes svelte-pb9pol-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}h2.svelte-1xg7h5n{font-size:var(--text-xl)!important}p.svelte-1xg7h5n,h2.svelte-1xg7h5n{white-space:pre-line}.wrap.svelte-1xg7h5n{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:var(--size-60);color:var(--block-label-text-color);line-height:var(--line-md);height:100%;padding-top:var(--size-3);text-align:center;margin:auto var(--spacing-lg)}.or.svelte-1xg7h5n{color:var(--body-text-color-subdued);display:flex}.icon-wrap.svelte-1xg7h5n{width:30px;margin-bottom:var(--spacing-lg)}@media (--screen-md){.wrap.svelte-1xg7h5n{font-size:var(--text-lg)}}.hovered.svelte-1xg7h5n{color:var(--color-accent)}div.svelte-q32hvf{border-top:1px solid transparent;display:flex;max-height:100%;justify-content:center;align-items:center;gap:var(--spacing-sm);height:auto;align-items:flex-end;color:var(--block-label-text-color);flex-shrink:0}.show_border.svelte-q32hvf{border-top:1px solid var(--block-border-color);margin-top:var(--spacing-xxl);box-shadow:var(--shadow-drop)}.source-selection.svelte-15ls1gu{display:flex;align-items:center;justify-content:center;border-top:1px solid var(--border-color-primary);width:100%;margin-left:auto;margin-right:auto;height:var(--size-10)}.icon.svelte-15ls1gu{width:22px;height:22px;margin:var(--spacing-lg) var(--spacing-xs);padding:var(--spacing-xs);color:var(--neutral-400);border-radius:var(--radius-md)}.selected.svelte-15ls1gu{color:var(--color-accent)}.icon.svelte-15ls1gu:hover,.icon.svelte-15ls1gu:focus{color:var(--color-accent)}.icon-button-wrapper.svelte-109se4{display:flex;flex-direction:row;align-items:center;justify-content:center;z-index:var(--layer-3);gap:var(--spacing-sm);box-shadow:var(--shadow-drop);border:1px solid var(--border-color-primary);background:var(--block-background-fill);padding:var(--spacing-xxs)}.icon-button-wrapper.hide-top-corner.svelte-109se4{border-top:none;border-right:none;border-radius:var(--block-label-right-radius)}.icon-button-wrapper.display-top-corner.svelte-109se4{border-radius:var(--radius-sm) 0 0 var(--radius-sm);top:var(--spacing-sm);right:-1px}.icon-button-wrapper.svelte-109se4:not(.top-panel){border:1px solid var(--border-color-primary);border-radius:var(--radius-sm)}.top-panel.svelte-109se4{position:absolute;top:var(--block-label-margin);right:var(--block-label-margin);margin:0}.icon-button-wrapper.svelte-109se4 button{margin:var(--spacing-xxs);border-radius:var(--radius-xs);position:relative}.icon-button-wrapper.svelte-109se4 a.download-link:not(:last-child),.icon-button-wrapper.svelte-109se4 button:not(:last-child){margin-right:var(--spacing-xxs)}.icon-button-wrapper.svelte-109se4 a.download-link:not(:last-child):not(.no-border *):after,.icon-button-wrapper.svelte-109se4 button:not(:last-child):not(.no-border *):after{content:"";position:absolute;right:-4.5px;top:15%;height:70%;width:1px;background-color:var(--border-color-primary)}.icon-button-wrapper.svelte-109se4>*{height:100%}svg.svelte-43sxxs.svelte-43sxxs{width:var(--size-20);height:var(--size-20)}svg.svelte-43sxxs path.svelte-43sxxs{fill:var(--loader-color)}div.svelte-43sxxs.svelte-43sxxs{z-index:var(--layer-2)}.margin.svelte-43sxxs.svelte-43sxxs{margin:var(--size-4)}.wrap.svelte-17v219f.svelte-17v219f{display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:var(--layer-2);transition:opacity .1s ease-in-out;border-radius:var(--block-radius);background:var(--block-background-fill);padding:0 var(--size-6);max-height:var(--size-screen-h);overflow:hidden}.wrap.center.svelte-17v219f.svelte-17v219f{top:0;right:0;left:0}.wrap.default.svelte-17v219f.svelte-17v219f{top:0;right:0;bottom:0;left:0}.hide.svelte-17v219f.svelte-17v219f{opacity:0;pointer-events:none}.generating.svelte-17v219f.svelte-17v219f{animation:svelte-17v219f-pulseStart 1s cubic-bezier(.4,0,.6,1),svelte-17v219f-pulse 2s cubic-bezier(.4,0,.6,1) 1s infinite;border:2px solid var(--color-accent);background:transparent;z-index:var(--layer-1);pointer-events:none}.translucent.svelte-17v219f.svelte-17v219f{background:none}@keyframes svelte-17v219f-pulseStart{0%{opacity:0}to{opacity:1}}@keyframes svelte-17v219f-pulse{0%,to{opacity:1}50%{opacity:.5}}.loading.svelte-17v219f.svelte-17v219f{z-index:var(--layer-2);color:var(--body-text-color)}.eta-bar.svelte-17v219f.svelte-17v219f{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:left;opacity:.8;z-index:var(--layer-1);transition:10ms;background:var(--background-fill-secondary)}.progress-bar-wrap.svelte-17v219f.svelte-17v219f{border:1px solid var(--border-color-primary);background:var(--background-fill-primary);width:55.5%;height:var(--size-4)}.progress-bar.svelte-17v219f.svelte-17v219f{transform-origin:left;background-color:var(--loader-color);width:var(--size-full);height:var(--size-full)}.progress-level.svelte-17v219f.svelte-17v219f{display:flex;flex-direction:column;align-items:center;gap:1;z-index:var(--layer-2);width:var(--size-full)}.progress-level-inner.svelte-17v219f.svelte-17v219f{margin:var(--size-2) auto;color:var(--body-text-color);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text.svelte-17v219f.svelte-17v219f{position:absolute;bottom:0;right:0;z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono)}.meta-text-center.svelte-17v219f.svelte-17v219f{display:flex;position:absolute;top:0;right:0;justify-content:center;align-items:center;transform:translateY(var(--size-6));z-index:var(--layer-2);padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-family:var(--font-mono);text-align:center}.error.svelte-17v219f.svelte-17v219f{box-shadow:var(--shadow-drop);border:solid 1px var(--error-border-color);border-radius:var(--radius-full);background:var(--error-background-fill);padding-right:var(--size-4);padding-left:var(--size-4);color:var(--error-text-color);font-weight:var(--weight-semibold);font-size:var(--text-lg);line-height:var(--line-lg);font-family:var(--font)}.minimal.svelte-17v219f.svelte-17v219f{pointer-events:none}.minimal.svelte-17v219f .progress-text.svelte-17v219f{background:var(--block-background-fill)}.border.svelte-17v219f.svelte-17v219f{border:1px solid var(--border-color-primary)}.clear-status.svelte-17v219f.svelte-17v219f{position:absolute;display:flex;top:var(--size-2);right:var(--size-2);justify-content:flex-end;gap:var(--spacing-sm);z-index:var(--layer-1)}.toast-body.svelte-1pgj5gs{display:flex;position:relative;right:0;left:0;align-items:center;margin:var(--size-6) var(--size-4);margin:auto;border-radius:var(--container-radius);overflow:hidden;pointer-events:auto}.toast-body.error.svelte-1pgj5gs{border:1px solid var(--color-red-700);background:var(--color-red-50)}.dark .toast-body.error.svelte-1pgj5gs{border:1px solid var(--color-red-500);background-color:var(--color-grey-950)}.toast-body.warning.svelte-1pgj5gs{border:1px solid var(--color-yellow-700);background:var(--color-yellow-50)}.dark .toast-body.warning.svelte-1pgj5gs{border:1px solid var(--color-yellow-500);background-color:var(--color-grey-950)}.toast-body.info.svelte-1pgj5gs{border:1px solid var(--color-grey-700);background:var (--color-grey-50)}.dark .toast-body.info.svelte-1pgj5gs{border:1px solid var(--color-grey-500);background-color:var(--color-grey-950)}.toast-body.success.svelte-1pgj5gs{border:1px solid var(--color-green-700);background:var(--color-green-50)}.dark .toast-body.success.svelte-1pgj5gs{border:1px solid var(--color-green-500);background-color:var(--color-grey-950)}.toast-title.svelte-1pgj5gs{display:flex;align-items:center;font-weight:var(--weight-bold);font-size:var(--text-lg);line-height:var(--line-sm)}.toast-title.error.svelte-1pgj5gs{color:var(--color-red-700)}.dark .toast-title.error.svelte-1pgj5gs{color:var(--color-red-50)}.toast-title.warning.svelte-1pgj5gs{color:var(--color-yellow-700)}.dark .toast-title.warning.svelte-1pgj5gs{color:var(--color-yellow-50)}.toast-title.info.svelte-1pgj5gs{color:var(--color-grey-700)}.dark .toast-title.info.svelte-1pgj5gs{color:var(--color-grey-50)}.toast-title.success.svelte-1pgj5gs{color:var(--color-green-700)}.dark .toast-title.success.svelte-1pgj5gs{color:var(--color-green-50)}.toast-close.svelte-1pgj5gs{margin:0 var(--size-3);border-radius:var(--size-3);padding:0px var(--size-1-5);font-size:var(--size-5);line-height:var(--size-5)}.toast-close.error.svelte-1pgj5gs{color:var(--color-red-700)}.dark .toast-close.error.svelte-1pgj5gs{color:var(--color-red-500)}.toast-close.warning.svelte-1pgj5gs{color:var(--color-yellow-700)}.dark .toast-close.warning.svelte-1pgj5gs{color:var(--color-yellow-500)}.toast-close.info.svelte-1pgj5gs{color:var(--color-grey-700)}.dark .toast-close.info.svelte-1pgj5gs{color:var(--color-grey-500)}.toast-close.success.svelte-1pgj5gs{color:var(--color-green-700)}.dark .toast-close.success.svelte-1pgj5gs{color:var(--color-green-500)}.toast-text.svelte-1pgj5gs{font-size:var(--text-lg);word-wrap:break-word;overflow-wrap:break-word;word-break:break-word}.toast-text.error.svelte-1pgj5gs{color:var(--color-red-700)}.dark .toast-text.error.svelte-1pgj5gs{color:var(--color-red-50)}.toast-text.warning.svelte-1pgj5gs{color:var(--color-yellow-700)}.dark .toast-text.warning.svelte-1pgj5gs{color:var(--color-yellow-50)}.toast-text.info.svelte-1pgj5gs{color:var(--color-grey-700)}.dark .toast-text.info.svelte-1pgj5gs{color:var(--color-grey-50)}.toast-text.success.svelte-1pgj5gs{color:var(--color-green-700)}.dark .toast-text.success.svelte-1pgj5gs{color:var(--color-green-50)}.toast-details.svelte-1pgj5gs{margin:var(--size-3) var(--size-3) var(--size-3) 0;width:100%}.toast-icon.svelte-1pgj5gs{display:flex;position:absolute;position:relative;flex-shrink:0;justify-content:center;align-items:center;margin:var(--size-2);border-radius:var(--radius-full);padding:var(--size-1);padding-left:calc(var(--size-1) - 1px);width:35px;height:35px}.toast-icon.error.svelte-1pgj5gs{color:var(--color-red-700)}.dark .toast-icon.error.svelte-1pgj5gs{color:var(--color-red-500)}.toast-icon.warning.svelte-1pgj5gs{color:var(--color-yellow-700)}.dark .toast-icon.warning.svelte-1pgj5gs{color:var(--color-yellow-500)}.toast-icon.info.svelte-1pgj5gs{color:var(--color-grey-700)}.dark .toast-icon.info.svelte-1pgj5gs{color:var(--color-grey-500)}.toast-icon.success.svelte-1pgj5gs{color:var(--color-green-700)}.dark .toast-icon.success.svelte-1pgj5gs{color:var(--color-green-500)}@keyframes svelte-1pgj5gs-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.timer.svelte-1pgj5gs{position:absolute;bottom:0;left:0;transform-origin:0 0;animation:svelte-1pgj5gs-countdown 10s linear forwards;width:100%;height:var(--size-1)}.timer.error.svelte-1pgj5gs{background:var(--color-red-700)}.dark .timer.error.svelte-1pgj5gs{background:var(--color-red-500)}.timer.warning.svelte-1pgj5gs{background:var(--color-yellow-700)}.dark .timer.warning.svelte-1pgj5gs{background:var(--color-yellow-500)}.timer.info.svelte-1pgj5gs{background:var(--color-grey-700)}.dark .timer.info.svelte-1pgj5gs{background:var(--color-grey-500)}.timer.success.svelte-1pgj5gs{background:var(--color-green-700)}.dark .timer.success.svelte-1pgj5gs{background:var(--color-green-500)}.hidden.svelte-1pgj5gs{display:none}.toast-text.svelte-1pgj5gs a{text-decoration:underline}.toast-wrap.svelte-gatr8h{display:flex;position:fixed;top:var(--size-4);right:var(--size-4);flex-direction:column;align-items:end;gap:var(--size-2);z-index:var(--layer-top);width:calc(100% - var(--size-8))}@media (--screen-sm){.toast-wrap.svelte-gatr8h{width:calc(var(--size-96) + var(--size-10))}}.streaming-bar.svelte-ga0jj6{position:absolute;bottom:0;left:0;right:0;height:4px;background-color:var(--primary-600);animation:svelte-ga0jj6-countdown linear forwards;z-index:1}@keyframes svelte-ga0jj6-countdown{0%{transform:translate(0)}to{transform:translate(-100%)}}:host{display:flex;flex-direction:column;height:100%}.propertysheet-wrapper{overflow:hidden!important;display:flex;flex-direction:column;flex-grow:1}.accordion-header.svelte-1nz1lmm.svelte-1nz1lmm{display:flex;justify-content:space-between;align-items:center;width:100%;cursor:pointer;padding:var(--block-title-padding);background:var(--block-title-background-fill);color:var(--block-title-text-color);flex-shrink:0}.content-wrapper.svelte-1nz1lmm.svelte-1nz1lmm{flex-grow:1;min-height:0}.container.svelte-1nz1lmm.svelte-1nz1lmm{overflow-y:auto;height:auto;max-height:var(--sheet-max-height, 500px);border-radius:0!important;border:1px solid var(--border-color-primary);border-top:none;border-bottom-left-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg);background-color:var(--background-fill-secondary)}.closed.svelte-1nz1lmm.svelte-1nz1lmm{display:none}.group-header.svelte-1nz1lmm.svelte-1nz1lmm{display:flex;justify-content:space-between;align-items:center;width:100%;padding:var(--spacing-sm) var(--spacing-md);background-color:var(--input-background-fill);color:var(--body-text-color);text-align:left;cursor:pointer;font-size:var(--text-md);font-weight:var(--font-weight-bold);border:1px solid var(--border-color-primary)}.properties-grid.svelte-1nz1lmm.svelte-1nz1lmm{display:grid;grid-template-columns:1fr 2fr;gap:0;padding:0}.prop-label.svelte-1nz1lmm.svelte-1nz1lmm,.prop-control.svelte-1nz1lmm.svelte-1nz1lmm{padding:var(--spacing-sm) var(--spacing-md);display:flex;align-items:center;border-bottom:1px solid var(--background-fill-secondary)}.prop-label.svelte-1nz1lmm.svelte-1nz1lmm{background-color:var(--background-fill-primary);color:var(--body-text-color);opacity:.7;font-weight:var(--font-weight-semibold);font-size:var(--text-xs);text-align:right;justify-content:flex-end;word-break:break-word}.prop-control.svelte-1nz1lmm.svelte-1nz1lmm{gap:var(--spacing-sm)}.properties-grid.svelte-1nz1lmm>.svelte-1nz1lmm:nth-last-child(-n+2){border-bottom:none}.prop-control.svelte-1nz1lmm input[type=text].svelte-1nz1lmm,.prop-control.svelte-1nz1lmm input[type=number].svelte-1nz1lmm{background-color:var(--input-background-fill);border:var(--input-border-width) solid var(--border-color-primary);box-shadow:var(--input-shadow);color:var(--input-text-color);font-size:var(--input-text-size);border-radius:0;width:100%;padding-top:var(--spacing-1);padding-bottom:var(--spacing-1);padding-left:var(--spacing-md);padding-right:var(--spacing-3)}.prop-control.svelte-1nz1lmm input[type=text].svelte-1nz1lmm:focus,.prop-control.svelte-1nz1lmm input[type=number].svelte-1nz1lmm:focus{box-shadow:var(--input-shadow-focus);border-color:var(--input-border-color-focus);background-color:var(--input-background-fill-focus);outline:none}.dropdown-wrapper.svelte-1nz1lmm.svelte-1nz1lmm{position:relative;width:100%}.dropdown-wrapper.svelte-1nz1lmm select.svelte-1nz1lmm{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--input-background-fill);border:var(--input-border-width) solid var(--border-color-primary);box-shadow:var(--input-shadow);color:var(--input-text-color);font-size:var(--input-text-size);width:100%;cursor:pointer;border-radius:0;padding-top:var(--spacing-1);padding-bottom:var(--spacing-1);padding-left:var(--spacing-md);padding-right:calc(var(--spacing-3) + 1.2em)}.dropdown-arrow-icon.svelte-1nz1lmm.svelte-1nz1lmm{position:absolute;top:50%;right:var(--spacing-3);transform:translateY(-50%);width:1em;height:1em;pointer-events:none;z-index:1;background-color:var(--body-text-color-subdued);-webkit-mask-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 8l4 4 4-4'/%3e%3c/svg%3e");mask-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 8l4 4 4-4'%3e%3c/svg%3e")}.dropdown-wrapper.svelte-1nz1lmm select.svelte-1nz1lmm:focus{box-shadow:var(--input-shadow-focus);border-color:var(--input-border-color-focus);background-color:var(--input-background-fill-focus);outline:none}.dropdown-wrapper.svelte-1nz1lmm select option.svelte-1nz1lmm{background:var(--input-background-fill);color:var(--body-text-color)}.prop-control.svelte-1nz1lmm input[type=checkbox].svelte-1nz1lmm{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;width:var(--size-4);height:var(--size-4);border-radius:0;border:1px solid var(--checkbox-border-color);background-color:var(--checkbox-background-color);box-shadow:var(--checkbox-shadow);cursor:pointer;margin:0;transition:background-color .2s,border-color .2s}.prop-control.svelte-1nz1lmm input[type=checkbox].svelte-1nz1lmm:hover{border-color:var(--checkbox-border-color-hover);background-color:var(--checkbox-background-color-hover)}.prop-control.svelte-1nz1lmm input[type=checkbox].svelte-1nz1lmm:focus{border-color:var(--checkbox-border-color-focus);background-color:var(--checkbox-background-color-focus);outline:none}.prop-control.svelte-1nz1lmm input[type=checkbox].svelte-1nz1lmm:checked{background-color:var(--checkbox-background-color-selected);border-color:var(--checkbox-border-color-focus)}.prop-control.svelte-1nz1lmm input[type=checkbox].svelte-1nz1lmm:checked:after{content:"";position:absolute;display:block;top:50%;left:50%;width:4px;height:8px;border:solid var(--checkbox-label-text-color-selected);border-width:0 2px 2px 0;transform:translate(-50%,-60%) rotate(45deg)}.slider-container.svelte-1nz1lmm.svelte-1nz1lmm{display:flex;align-items:center;gap:var(--spacing-md);width:100%}.slider-container.svelte-1nz1lmm input[type=range].svelte-1nz1lmm{--slider-progress:0%;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer;width:100%}.slider-container.svelte-1nz1lmm input[type=range].svelte-1nz1lmm::-webkit-slider-runnable-track{height:8px;border-radius:var(--radius-lg);background:linear-gradient(to right,var(--slider-color) var(--slider-progress),var(--input-background-fill) var(--slider-progress))}.slider-container.svelte-1nz1lmm input[type=range].svelte-1nz1lmm::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin-top:-4px;background-color:#fff;border-radius:50%;height:16px;width:16px;border:1px solid var(--border-color-primary);box-shadow:var(--shadow-drop)}.slider-container.svelte-1nz1lmm input[type=range].svelte-1nz1lmm::-moz-range-track{height:8px;border-radius:var(--radius-lg);background:linear-gradient(to right,var(--slider-color) var(--slider-progress),var(--input-background-fill) var(--slider-progress))}.slider-container.svelte-1nz1lmm input[type=range].svelte-1nz1lmm::-moz-range-thumb{background-color:#fff;border-radius:50%;height:16px;width:16px;border:1px solid var(--border-color-primary);box-shadow:var(--shadow-drop)}.slider-value.svelte-1nz1lmm.svelte-1nz1lmm{min-width:40px;text-align:right;font-family:var(--font-mono);font-size:var(--text-xs)}.prop-label-wrapper.svelte-1nz1lmm.svelte-1nz1lmm{display:flex;justify-content:flex-end;align-items:center;gap:var(--spacing-sm);width:100%}.tooltip-container.svelte-1nz1lmm.svelte-1nz1lmm{position:relative;display:inline-flex;align-items:center;justify-content:center}.tooltip-icon.svelte-1nz1lmm.svelte-1nz1lmm{display:flex;align-items:center;justify-content:center;width:14px;height:14px;border-radius:50%;background-color:var(--body-text-color-subdued);color:var(--background-fill-primary);font-size:10px;font-weight:700;cursor:help;-webkit-user-select:none;user-select:none}.tooltip-text.svelte-1nz1lmm.svelte-1nz1lmm{visibility:hidden;width:200px;background-color:var(--body-text-color);color:var(--background-fill-primary);text-align:center;border-radius:var(--radius-md);padding:var(--spacing-md);position:absolute;z-index:10;bottom:125%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .3s}.tooltip-container.svelte-1nz1lmm:hover .tooltip-text.svelte-1nz1lmm{visibility:visible;opacity:1}.color-picker-container.svelte-1nz1lmm.svelte-1nz1lmm{display:flex;align-items:center;gap:var(--spacing-md);width:100%}.color-picker-input.svelte-1nz1lmm.svelte-1nz1lmm{width:50px;height:28px;background-color:transparent;border:1px solid var(--border-color-primary);border-radius:var(--radius-sm);cursor:pointer;padding:0}.color-picker-input.svelte-1nz1lmm.svelte-1nz1lmm::-webkit-color-swatch-wrapper{padding:2px}.color-picker-input.svelte-1nz1lmm.svelte-1nz1lmm::-moz-padding{padding:2px}.color-picker-input.svelte-1nz1lmm.svelte-1nz1lmm::-webkit-color-swatch{border:none;border-radius:var(--radius-sm)}.color-picker-input.svelte-1nz1lmm.svelte-1nz1lmm::-moz-color-swatch{border:none;border-radius:var(--radius-sm)}.color-picker-value.svelte-1nz1lmm.svelte-1nz1lmm{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--body-text-color-subdued)}.prop-control.svelte-1nz1lmm input.invalid.svelte-1nz1lmm{border-color:var(--error-border-color, red)!important;box-shadow:0 0 0 1px var(--error-border-color, red)!important}.reset-button-prop.svelte-1nz1lmm.svelte-1nz1lmm{display:flex;align-items:center;justify-content:center;background:none;border:none;border-left:1px solid var(--border-color-primary);cursor:pointer;color:var(--body-text-color-subdued);font-size:var(--text-lg);padding:0 var(--spacing-2);visibility:hidden;opacity:0;transition:opacity .15s ease-in-out,color .15s ease-in-out}.reset-button-prop.visible.svelte-1nz1lmm.svelte-1nz1lmm{visibility:visible;opacity:1}.reset-button-prop.svelte-1nz1lmm.svelte-1nz1lmm:hover{color:var(--body-text-color);background-color:var(--background-fill-secondary-hover)}.reset-button-prop.svelte-1nz1lmm.svelte-1nz1lmm:disabled{color:var(--body-text-color-subdued)!important;opacity:.5;cursor:not-allowed;background-color:transparent!important}.prop-control.svelte-1nz1lmm .disabled.svelte-1nz1lmm{opacity:.5;pointer-events:none;cursor:not-allowed}.prop-control.svelte-1nz1lmm .disabled input.svelte-1nz1lmm{cursor:not-allowed}.reset-button-prop.svelte-1nz1lmm.svelte-1nz1lmm:disabled{opacity:.3;cursor:not-allowed;background-color:transparent!important} diff --git a/src/demo/app.py b/src/demo/app.py index da2c449a27b54f8ce81059ff8b546963fb0f8bbe..24954912ef14091fbdb20f0ecdb4c3c78bd4a2eb 100644 --- a/src/demo/app.py +++ b/src/demo/app.py @@ -3,115 +3,55 @@ from dataclasses import dataclass, field, asdict from typing import Literal from gradio_propertysheet import PropertySheet -# --- Main Configuration Dataclasses for the "Render Settings" Sheet --- +# --- Configuration Data Models --- +# These dataclasses define the structure for all settings panels. @dataclass class ModelSettings: """Settings for loading models, VAEs, etc.""" - model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field( - default="SDXL", - metadata={"component": "dropdown", "label": "Base Model"} - ) - custom_model_path: str = field( - default="/path/to/default.safetensors", - metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}} - ) - vae_path: str = field( - default="", - metadata={"label": "VAE Path (optional)"} - ) + model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field(default="SDXL", metadata={"component": "dropdown", "label": "Base Model"}) + custom_model_path: str = field(default="/path/to/default.safetensors", metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}}) + vae_path: str = field(default="", metadata={"label": "VAE Path (optional)"}) @dataclass class SamplingSettings: """Settings for the image sampling process.""" - sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field( - default="DPM++ 2M Karras", - metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."} - ) - steps: int = field( - default=25, - metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."} - ) - cfg_scale: float = field( - default=7.0, - metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."} - ) + sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field(default="DPM++ 2M Karras", metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."}) + steps: int = field(default=25, metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."}) + cfg_scale: float = field(default=7.0, metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."}) @dataclass class ImageSettings: """Settings for image dimensions.""" - width: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"} - ) - height: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"} - ) + width: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"}) + height: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"}) @dataclass class PostprocessingSettings: """Settings for image post-processing effects.""" - restore_faces: bool = field( - default=True, - metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."} - ) - enable_hr: bool = field( - default=False, - metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."} - ) - denoising_strength: float = field( - default=0.45, - metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}} - ) + restore_faces: bool = field(default=True, metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."}) + enable_hr: bool = field(default=False, metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."}) + denoising_strength: float = field(default=0.45, metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}}) @dataclass class AdvancedSettings: """Advanced and rarely changed settings.""" - clip_skip: int = field( - default=2, - metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."} - ) - noise_schedule: Literal["Default", "Karras", "Exponential"] = field( - default="Karras", - metadata={"component": "dropdown", "label": "Noise Schedule"} - ) - do_not_scale_cond_uncond: bool = field( - default=False, - metadata={"label": "Do not scale cond/uncond"} - ) - s_churn: int = field( - default=1, - metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."} - ) + clip_skip: int = field(default=2, metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."}) + noise_schedule: Literal["Default", "Karras", "Exponential"] = field(default="Karras", metadata={"component": "dropdown", "label": "Noise Schedule"}) + do_not_scale_cond_uncond: bool = field(default=False, metadata={"label": "Do not scale cond/uncond"}) + s_churn: int = field(default=1, metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."}) @dataclass class ScriptSettings: """Settings for automation scripts like X/Y/Z plots.""" - script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field( - default="None", - metadata={"component": "dropdown", "label": "Script"} - ) - x_values: str = field( - default="-1, 10, 20", - metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) - y_values: str = field( - default="", - metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) + script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field(default="None", metadata={"component": "dropdown", "label": "Script"}) + x_values: str = field(default="-1, 10, 20", metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) + y_values: str = field(default="", metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) @dataclass class RenderConfig: """Main configuration object for rendering, grouping all settings.""" - seed: int = field( - default=-1, - metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."} - ) - batch_size: int = field( - default=1, - metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"} - ) - # Nested groups + seed: int = field(default=-1, metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."}) + batch_size: int = field(default=1, metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"}) model: ModelSettings = field(default_factory=ModelSettings) sampling: SamplingSettings = field(default_factory=SamplingSettings) image: ImageSettings = field(default_factory=ImageSettings) @@ -119,7 +59,6 @@ class RenderConfig: scripts: ScriptSettings = field(default_factory=ScriptSettings) advanced: AdvancedSettings = field(default_factory=AdvancedSettings) - @dataclass class Lighting: """Lighting settings for the environment.""" @@ -133,8 +72,8 @@ class EnvironmentConfig: background: Literal["Sky", "Color", "Image"] = field(default="Sky", metadata={"component": "dropdown"}) lighting: Lighting = field(default_factory=Lighting) - # --- Initial Instances --- +# Create default instances of the configuration objects. initial_render_config = RenderConfig() initial_env_config = EnvironmentConfig() @@ -144,65 +83,117 @@ with gr.Blocks(title="PropertySheet Demo") as demo: gr.Markdown("An example of a realistic application layout using the `PropertySheet` component as a sidebar for settings.") gr.Markdown("💻 Component GitHub Code") + # --- Persistent State Management --- + # Use gr.State to hold the application's data. This is the "single source of truth". + render_state = gr.State(value=initial_render_config) + env_state = gr.State(value=initial_env_config) + with gr.Row(): - # Main content area on the left - with gr.Column(scale=3): - #gr.Image(label="Main Viewport", height=500, value=None) - gr.Textbox(label="AI Prompt", lines=3, placeholder="Enter your prompt here...") - gr.Button("Generate", variant="primary") + with gr.Column(scale=3): + generate = gr.Button("Show Settings", variant="primary") with gr.Row(): output_render_json = gr.JSON(label="Live Render State") output_env_json = gr.JSON(label="Live Environment State") - # Sidebar with Property Sheets on the right with gr.Column(scale=1): render_sheet = PropertySheet( - value=initial_render_config, + value=initial_render_config, label="Render Settings", width=400, - height=550 # Set a fixed height to demonstrate internal scrolling + height=550, + visible=False ) environment_sheet = PropertySheet( value=initial_env_config, label="Environment Settings", width=400, - open=False # Start collapsed to show the accordion feature + open=False, + visible=False ) # --- Event Handlers --- - def handle_render_change(updated_config: RenderConfig | None): - """Callback to process changes from the Render Settings sheet.""" + def change_visibility(render_config, env_config): + """ + Handles the visibility toggle for the property sheets. + NOTE: This approach of modifying the component object's attribute directly + is not reliable for tracking state changes in Gradio. A gr.State object is + the recommended way to manage UI state like visibility. + """ + if render_sheet.visible != environment_sheet.visible: + render_sheet.visible = False + environment_sheet.visible = False + + if render_sheet.visible == False and environment_sheet.visible == False: + render_sheet.visible = True + environment_sheet.visible = True + return ( + gr.update(visible=True, value=render_config), + gr.update(visible=True, value=env_config), + gr.update(value="Hide Settings") + ) + else: + render_sheet.visible = False + environment_sheet.visible = False + return ( + gr.update(visible=False, value=render_config), + gr.update(visible=False, value=env_config), + gr.update(value="Show Settings") + ) + + def handle_render_change(updated_config: RenderConfig | None, current_state: RenderConfig): + """Processes updates from the render PropertySheet and syncs the state.""" if updated_config is None: - return initial_render_config, asdict(initial_render_config) + return current_state, asdict(current_state), current_state - # Example of business logic: reset custom path if not in custom mode + # Example of applying business logic if updated_config.model.model_type != "Custom": updated_config.model.custom_model_path = "/path/to/default.safetensors" - - return updated_config, asdict(updated_config) + + return updated_config, asdict(updated_config), updated_config - def handle_env_change(updated_config: EnvironmentConfig | None): - """Callback to process changes from the Environment Settings sheet.""" + def handle_env_change(updated_config: EnvironmentConfig | None, current_state: EnvironmentConfig): + """Processes updates from the environment PropertySheet and syncs the state.""" if updated_config is None: - return initial_env_config, asdict(initial_env_config) - return updated_config, asdict(updated_config) + return current_state, asdict(current_state), current_state + return updated_config, asdict(updated_config), updated_config + # --- Event Listeners --- + # Toggle the property sheets' visibility on button click. + generate.click( + fn=change_visibility, + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet, generate] + ) + + # Syncs changes from the UI back to the state and JSON display. render_sheet.change( fn=handle_render_change, - inputs=[render_sheet], - outputs=[render_sheet, output_render_json] + inputs=[render_sheet, render_state], + outputs=[render_sheet, output_render_json, render_state] ) + + # Syncs changes from the UI back to the state and JSON display. environment_sheet.change( fn=handle_env_change, - inputs=[environment_sheet], - outputs=[environment_sheet, output_env_json] + inputs=[environment_sheet, env_state], + outputs=[environment_sheet, output_env_json, env_state] ) - # Load initial state into JSON viewers on app load + # Load initial data into JSON displays on app start. demo.load( fn=lambda: (asdict(initial_render_config), asdict(initial_env_config)), outputs=[output_render_json, output_env_json] ) + # Ensure components are populated with state values on load/reload. + demo.load( + fn=lambda render_config, env_config: ( + gr.update(value=render_config), + gr.update(value=env_config) + ), + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet] + ) + if __name__ == "__main__": demo.launch() \ No newline at end of file diff --git a/src/demo/space.py b/src/demo/space.py index 7ea2bddfef851a5361e5c5a8023c453e53dce24d..49d14545322ab088b416e5034a5651930270204d 100644 --- a/src/demo/space.py +++ b/src/demo/space.py @@ -3,7 +3,7 @@ import gradio as gr from app import demo as app import os -_docs = {'PropertySheet': {'description': 'A Gradio component that renders a dynamic UI from a Python dataclass instance.', 'members': {'__init__': {'value': {'type': 'typing.Optional[typing.Any][Any, None]', 'default': 'None', 'description': 'The initial dataclass instance to render.'}, 'label': {'type': 'str | None', 'default': 'None', 'description': 'The main label for the component, displayed in the accordion header.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'If False, the component will be hidden.'}, 'open': {'type': 'bool', 'default': 'True', 'description': 'If False, the accordion will be collapsed by default.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'An optional string that is assigned as the id of this component in the DOM.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'The relative size of the component in its container.'}, 'width': {'type': 'int | str | None', 'default': 'None', 'description': 'The width of the component in pixels.'}, 'height': {'type': 'int | str | None', 'default': 'None', 'description': "The maximum height of the component's content area in pixels before scrolling."}, 'min_width': {'type': 'int | None', 'default': 'None', 'description': 'The minimum width of the component in pixels.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'If True, wraps the component in a container with a background.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'An optional list of strings that are assigned as the classes of this component in the DOM.'}}, 'postprocess': {'value': {'type': 'Any', 'description': None}}, 'preprocess': {'return': {'type': 'Any', 'description': None}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': ''}, 'input': {'type': None, 'default': None, 'description': ''}, 'expand': {'type': None, 'default': None, 'description': ''}, 'collapse': {'type': None, 'default': None, 'description': ''}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'PropertySheet': []}}} +_docs = {'PropertySheet': {'description': 'A Gradio component that renders a dynamic UI from a Python dataclass instance.\nIt allows for nested settings and automatically infers input types.', 'members': {'__init__': {'value': {'type': 'typing.Optional[typing.Any][Any, None]', 'default': 'None', 'description': 'The initial dataclass instance to render.'}, 'label': {'type': 'str | None', 'default': 'None', 'description': 'The main label for the component, displayed in the accordion header.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'If False, the component will be hidden.'}, 'open': {'type': 'bool', 'default': 'True', 'description': 'If False, the accordion will be collapsed by default.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'An optional string that is assigned as the id of this component in the DOM.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'The relative size of the component in its container.'}, 'width': {'type': 'int | str | None', 'default': 'None', 'description': 'The width of the component in pixels.'}, 'height': {'type': 'int | str | None', 'default': 'None', 'description': "The maximum height of the component's content area in pixels before scrolling."}, 'min_width': {'type': 'int | None', 'default': 'None', 'description': 'The minimum width of the component in pixels.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'If True, wraps the component in a container with a background.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'An optional list of strings that are assigned as the classes of this component in the DOM.'}}, 'postprocess': {'value': {'type': 'Any', 'description': 'The dataclass instance to process.'}}, 'preprocess': {'return': {'type': 'Any', 'description': 'A new, updated instance of the dataclass.'}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': ''}, 'input': {'type': None, 'default': None, 'description': ''}, 'expand': {'type': None, 'default': None, 'description': ''}, 'collapse': {'type': None, 'default': None, 'description': ''}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'PropertySheet': []}}} abs_path = os.path.join(os.path.dirname(__file__), "css.css") @@ -21,7 +21,7 @@ with gr.Blocks( # `gradio_propertysheet`
-Static Badge +PyPI - Version
Property sheet @@ -43,115 +43,55 @@ from dataclasses import dataclass, field, asdict from typing import Literal from gradio_propertysheet import PropertySheet -# --- Main Configuration Dataclasses for the "Render Settings" Sheet --- +# --- Configuration Data Models --- +# These dataclasses define the structure for all settings panels. @dataclass class ModelSettings: \"\"\"Settings for loading models, VAEs, etc.\"\"\" - model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field( - default="SDXL", - metadata={"component": "dropdown", "label": "Base Model"} - ) - custom_model_path: str = field( - default="/path/to/default.safetensors", - metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}} - ) - vae_path: str = field( - default="", - metadata={"label": "VAE Path (optional)"} - ) + model_type: Literal["SD 1.5", "SDXL", "Pony", "Custom"] = field(default="SDXL", metadata={"component": "dropdown", "label": "Base Model"}) + custom_model_path: str = field(default="/path/to/default.safetensors", metadata={"label": "Custom Model Path", "interactive_if": {"field": "model_type", "value": "Custom"}}) + vae_path: str = field(default="", metadata={"label": "VAE Path (optional)"}) @dataclass class SamplingSettings: \"\"\"Settings for the image sampling process.\"\"\" - sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field( - default="DPM++ 2M Karras", - metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."} - ) - steps: int = field( - default=25, - metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."} - ) - cfg_scale: float = field( - default=7.0, - metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."} - ) + sampler_name: Literal["Euler", "Euler a", "DPM++ 2M Karras", "UniPC"] = field(default="DPM++ 2M Karras", metadata={"component": "dropdown", "label": "Sampler", "help": "The algorithm for the diffusion process."}) + steps: int = field(default=25, metadata={"component": "slider", "minimum": 1, "maximum": 150, "step": 1, "label": "Sampling Steps", "help": "More steps can improve quality."}) + cfg_scale: float = field(default=7.0, metadata={"component": "slider", "minimum": 1.0, "maximum": 30.0, "step": 0.5, "label": "CFG Scale", "help": "How strongly the prompt is adhered to."}) @dataclass class ImageSettings: \"\"\"Settings for image dimensions.\"\"\" - width: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"} - ) - height: int = field( - default=1024, - metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"} - ) + width: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Width"}) + height: int = field(default=1024, metadata={"component": "slider", "minimum": 512, "maximum": 2048, "step": 64, "label": "Image Height"}) @dataclass class PostprocessingSettings: \"\"\"Settings for image post-processing effects.\"\"\" - restore_faces: bool = field( - default=True, - metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."} - ) - enable_hr: bool = field( - default=False, - metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."} - ) - denoising_strength: float = field( - default=0.45, - metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}} - ) + restore_faces: bool = field(default=True, metadata={"label": "Restore Faces", "help": "Use a secondary model to fix distorted faces."}) + enable_hr: bool = field(default=False, metadata={"label": "Hires. fix", "help": "Enable a second pass at a higher resolution."}) + denoising_strength: float = field(default=0.45, metadata={"component": "slider", "minimum": 0.0, "maximum": 1.0, "step": 0.01, "label": "Denoising Strength", "interactive_if": {"field": "enable_hr", "value": True}}) @dataclass class AdvancedSettings: \"\"\"Advanced and rarely changed settings.\"\"\" - clip_skip: int = field( - default=2, - metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."} - ) - noise_schedule: Literal["Default", "Karras", "Exponential"] = field( - default="Karras", - metadata={"component": "dropdown", "label": "Noise Schedule"} - ) - do_not_scale_cond_uncond: bool = field( - default=False, - metadata={"label": "Do not scale cond/uncond"} - ) - s_churn: int = field( - default=1, - metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."} - ) + clip_skip: int = field(default=2, metadata={"component": "slider", "minimum": 1, "maximum": 12, "step": 1, "label": "CLIP Skip", "help": "Skip final layers of the text encoder."}) + noise_schedule: Literal["Default", "Karras", "Exponential"] = field(default="Karras", metadata={"component": "dropdown", "label": "Noise Schedule"}) + do_not_scale_cond_uncond: bool = field(default=False, metadata={"label": "Do not scale cond/uncond"}) + s_churn: int = field(default=1, metadata={"component": "number_integer", "minimum": 1, "maximum": 12, "label": "S_churn", "help": "S_churn value for generation."}) @dataclass class ScriptSettings: \"\"\"Settings for automation scripts like X/Y/Z plots.\"\"\" - script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field( - default="None", - metadata={"component": "dropdown", "label": "Script"} - ) - x_values: str = field( - default="-1, 10, 20", - metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) - y_values: str = field( - default="", - metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}} - ) + script_name: Literal["None", "Prompt matrix", "X/Y/Z plot"] = field(default="None", metadata={"component": "dropdown", "label": "Script"}) + x_values: str = field(default="-1, 10, 20", metadata={"label": "X axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) + y_values: str = field(default="", metadata={"label": "Y axis values", "interactive_if": {"field": "script_name", "value": "X/Y/Z plot"}}) @dataclass class RenderConfig: \"\"\"Main configuration object for rendering, grouping all settings.\"\"\" - seed: int = field( - default=-1, - metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."} - ) - batch_size: int = field( - default=1, - metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"} - ) - # Nested groups + seed: int = field(default=-1, metadata={"component": "number_integer", "label": "Seed (-1 for random)", "help": "The random seed for generation."}) + batch_size: int = field(default=1, metadata={"component": "slider", "minimum": 1, "maximum": 8, "step": 1, "label": "Batch Size"}) model: ModelSettings = field(default_factory=ModelSettings) sampling: SamplingSettings = field(default_factory=SamplingSettings) image: ImageSettings = field(default_factory=ImageSettings) @@ -159,7 +99,6 @@ class RenderConfig: scripts: ScriptSettings = field(default_factory=ScriptSettings) advanced: AdvancedSettings = field(default_factory=AdvancedSettings) - @dataclass class Lighting: \"\"\"Lighting settings for the environment.\"\"\" @@ -173,8 +112,8 @@ class EnvironmentConfig: background: Literal["Sky", "Color", "Image"] = field(default="Sky", metadata={"component": "dropdown"}) lighting: Lighting = field(default_factory=Lighting) - # --- Initial Instances --- +# Create default instances of the configuration objects. initial_render_config = RenderConfig() initial_env_config = EnvironmentConfig() @@ -184,66 +123,118 @@ with gr.Blocks(title="PropertySheet Demo") as demo: gr.Markdown("An example of a realistic application layout using the `PropertySheet` component as a sidebar for settings.") gr.Markdown("💻 Component GitHub Code") + # --- Persistent State Management --- + # Use gr.State to hold the application's data. This is the "single source of truth". + render_state = gr.State(value=initial_render_config) + env_state = gr.State(value=initial_env_config) + with gr.Row(): - # Main content area on the left - with gr.Column(scale=3): - #gr.Image(label="Main Viewport", height=500, value=None) - gr.Textbox(label="AI Prompt", lines=3, placeholder="Enter your prompt here...") - gr.Button("Generate", variant="primary") + with gr.Column(scale=3): + generate = gr.Button("Show Settings", variant="primary") with gr.Row(): output_render_json = gr.JSON(label="Live Render State") output_env_json = gr.JSON(label="Live Environment State") - # Sidebar with Property Sheets on the right with gr.Column(scale=1): render_sheet = PropertySheet( - value=initial_render_config, + value=initial_render_config, label="Render Settings", width=400, - height=550 # Set a fixed height to demonstrate internal scrolling + height=550, + visible=False ) environment_sheet = PropertySheet( value=initial_env_config, label="Environment Settings", width=400, - open=False # Start collapsed to show the accordion feature + open=False, + visible=False ) # --- Event Handlers --- - def handle_render_change(updated_config: RenderConfig | None): - \"\"\"Callback to process changes from the Render Settings sheet.\"\"\" + def change_visibility(render_config, env_config): + \"\"\" + Handles the visibility toggle for the property sheets. + NOTE: This approach of modifying the component object's attribute directly + is not reliable for tracking state changes in Gradio. A gr.State object is + the recommended way to manage UI state like visibility. + \"\"\" + if render_sheet.visible != environment_sheet.visible: + render_sheet.visible = False + environment_sheet.visible = False + + if render_sheet.visible == False and environment_sheet.visible == False: + render_sheet.visible = True + environment_sheet.visible = True + return ( + gr.update(visible=True, value=render_config), + gr.update(visible=True, value=env_config), + gr.update(value="Hide Settings") + ) + else: + render_sheet.visible = False + environment_sheet.visible = False + return ( + gr.update(visible=False, value=render_config), + gr.update(visible=False, value=env_config), + gr.update(value="Show Settings") + ) + + def handle_render_change(updated_config: RenderConfig | None, current_state: RenderConfig): + \"\"\"Processes updates from the render PropertySheet and syncs the state.\"\"\" if updated_config is None: - return initial_render_config, asdict(initial_render_config) + return current_state, asdict(current_state), current_state - # Example of business logic: reset custom path if not in custom mode + # Example of applying business logic if updated_config.model.model_type != "Custom": updated_config.model.custom_model_path = "/path/to/default.safetensors" - - return updated_config, asdict(updated_config) + + return updated_config, asdict(updated_config), updated_config - def handle_env_change(updated_config: EnvironmentConfig | None): - \"\"\"Callback to process changes from the Environment Settings sheet.\"\"\" + def handle_env_change(updated_config: EnvironmentConfig | None, current_state: EnvironmentConfig): + \"\"\"Processes updates from the environment PropertySheet and syncs the state.\"\"\" if updated_config is None: - return initial_env_config, asdict(initial_env_config) - return updated_config, asdict(updated_config) - + return current_state, asdict(current_state), current_state + return updated_config, asdict(updated_config), updated_config + + # --- Event Listeners --- + # Toggle the property sheets' visibility on button click. + generate.click( + fn=change_visibility, + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet, generate] + ) + + # Syncs changes from the UI back to the state and JSON display. render_sheet.change( fn=handle_render_change, - inputs=[render_sheet], - outputs=[render_sheet, output_render_json] + inputs=[render_sheet, render_state], + outputs=[render_sheet, output_render_json, render_state] ) + + # Syncs changes from the UI back to the state and JSON display. environment_sheet.change( fn=handle_env_change, - inputs=[environment_sheet], - outputs=[environment_sheet, output_env_json] + inputs=[environment_sheet, env_state], + outputs=[environment_sheet, output_env_json, env_state] ) - # Load initial state into JSON viewers on app load + # Load initial data into JSON displays on app start. demo.load( fn=lambda: (asdict(initial_render_config), asdict(initial_env_config)), outputs=[output_render_json, output_env_json] ) + # Ensure components are populated with state values on load/reload. + demo.load( + fn=lambda render_config, env_config: ( + gr.update(value=render_config), + gr.update(value=env_config) + ), + inputs=[render_state, env_state], + outputs=[render_sheet, environment_sheet] + ) + if __name__ == "__main__": demo.launch() ``` @@ -276,7 +267,8 @@ The impact on the users predict function varies depending on whether the compone The code snippet below is accurate in cases where the component is used as both an input and an output. - +- **As input:** Is passed, a new, updated instance of the dataclass. +- **As output:** Should return, the dataclass instance to process. ```python def predict( diff --git a/src/frontend/Index.svelte b/src/frontend/Index.svelte index 139dabb6def3bbf65fe6fe62e093ef830fbeb715..e61d37ed6c9aa5c50cfbdd7d5327a3a1df3935f4 100644 --- a/src/frontend/Index.svelte +++ b/src/frontend/Index.svelte @@ -4,35 +4,57 @@ import { StatusTracker } from "@gradio/statustracker"; import type { LoadingStatus } from "@gradio/statustracker"; import type { Gradio } from "@gradio/utils"; - import { onMount } from "svelte"; + import { onMount, tick } from "svelte"; // --- Component Props (passed from Gradio backend) --- + /** The main data structure driving the UI, an array of property groups. */ export let value: Array<{ group_name: string, properties: any[] }> = []; + /** The main label for the component, displayed in the top-level accordion header. */ export let label: string | undefined = undefined; + /** Controls the overall visibility of the component. */ export let visible: boolean = true; + /** If true, the main accordion is open by default. */ export let open: boolean = true; + /** The DOM element ID. */ export let elem_id: string = ""; + /** Custom CSS classes for the root element. */ export let elem_classes: string[] = []; + /** If true, wraps the component in a container with a background. */ export let container: boolean = false; + /** The relative size of the component in its container. */ export let scale: number | null = null; + /** The minimum width of the component in pixels. */ export let min_width: number | undefined = undefined; + /** The fixed width of the component in pixels. */ export let width: number | undefined = undefined; + /** The maximum height of the component's content area before scrolling. */ export let height: number | undefined = undefined; + /** The loading status object from Gradio. */ export let loading_status: LoadingStatus | undefined = undefined; + /** If false, all controls are disabled. */ export let interactive: boolean = true; + /** The Gradio event dispatcher instance. */ export let gradio: Gradio<{ change: any, reset: any, input: any, clear_status: never, expand: never, collapse: never }>; // --- Internal State --- - let groupVisibility: Record = {}; // Tracks visibility of each property group. - let sliderElements: Record = {}; // References to slider input elements for direct manipulation. + /** Tracks the open/closed state of each individual property group. */ + let groupVisibility: Record = {}; + /** Holds references to slider input elements for direct DOM manipulation (e.g., setting background). */ + let sliderElements: Record = {}; + /** Combines default and user-provided CSS classes. */ $: final_classes = ["propertysheet-wrapper", ...elem_classes]; - let validationState: Record = {}; // Tracks validation status for each property. - let lastValue: string | null = null; // Stores a stringified version of `value` to detect changes. - let isResetting: boolean = false; // Flag to prevent event loops during property reset. - let initialValues: Record = {}; // Stores the initial values of all properties for the reset functionality. + /** Tracks the validation status (true/false) for each property to apply error styling. */ + let validationState: Record = {}; + /** A stringified version of the `value` prop, used to detect changes from the backend. */ + let lastValue: string | null = null; + /** A flag to prevent event loops during property reset operations. */ + let isResetting: boolean = false; + /** A snapshot of the initial values of all properties, used for the reset functionality. */ + let initialValues: Record = {}; /** - * Validates a property's value against its minimum and maximum constraints. + * Validates a numeric property against its `minimum` and `maximum` constraints. + * Updates the `validationState` for CSS styling of invalid inputs. * @param {any} prop - The property object to validate. */ function validate_prop(prop: any) { @@ -53,12 +75,12 @@ } } - // Controls the component height based on the accordion's open/closed state. + /** Controls the component's content height based on the main accordion's open/closed state. */ let dynamic_height: number | undefined; $: dynamic_height = open ? height : undefined; /** - * Iterates through all properties and updates the background of any sliders. + * Iterates through all properties and updates the background visuals of any sliders. */ function updateAllSliders() { if (!Array.isArray(value)) return; @@ -73,15 +95,16 @@ } } - // Reactive block that triggers when the `value` prop changes from the backend. + /** + * Reactive block that triggers whenever the `value` prop changes from the backend. + * It initializes group visibility, validates properties, and updates slider visuals. + */ $: if (Array.isArray(value) && JSON.stringify(value) !== lastValue) { lastValue = JSON.stringify(value); for (const group of value) { - // Initialize group visibility if not already set. if (groupVisibility[group.group_name] === undefined) { groupVisibility[group.group_name] = true; } - // Validate properties upon receiving new values. if (Array.isArray(group.properties)) { for (const prop of group.properties) { if (prop.component?.startsWith("number") || prop.component === 'slider') { @@ -90,14 +113,14 @@ } } } - // Update slider visuals to match new values. updateAllSliders(); } /** - * Updates a slider's track background to show progress. + * Updates a slider's track background to visually represent its value as a percentage. + * It sets the `--slider-progress` CSS custom property. * @param {any} prop - The slider property object. - * @param {HTMLInputElement} element - The slider input element. + * @param {HTMLInputElement} element - The slider's input element. */ function updateSliderBackground(prop: any, element: HTMLInputElement) { if (!element) return; @@ -109,7 +132,8 @@ } /** - * Handles the main accordion toggle and dispatches events to Gradio. + * Handles the main accordion toggle (the component's top-level header). + * Dispatches 'expand' or 'collapse' events to Gradio. */ function handle_toggle() { open = !open; @@ -118,7 +142,7 @@ } /** - * Toggles the visibility of an individual property group. + * Toggles the visibility of an individual property group (e.g., "Model", "Sampling"). * @param {string} groupName - The name of the group to toggle. */ function toggleGroup(groupName: string) { @@ -126,9 +150,9 @@ } /** - * Utility function to get the current value of a specific property by its name. - * Used for `interactive_if` logic. - * @param {string} prop_name - The name of the property. + * Utility function to find the current value of a specific property by its name. + * Used to implement the `interactive_if` logic. + * @param {string} prop_name - The name of the property to find. */ function get_prop_value(prop_name: string) { if (!Array.isArray(value)) return undefined; @@ -139,19 +163,20 @@ } return undefined; } - + /** - * Dispatches `change` or `input` events to the Gradio backend. + * Dispatches a single-property update to the Gradio backend. + * Used for simple inputs like textboxes, sliders, and checkboxes. + * Creates a small payload like `{ 'prop_name': new_value }`. * @param {"change" | "input"} event_name - The type of event to dispatch. * @param {any} changed_prop - The property object that was modified. */ function dispatch_update(event_name: "change" | "input", changed_prop: any) { if (validationState[changed_prop.name] === false) { - return; // Do not dispatch if the value is invalid. + return; } const payload: Record = {}; let final_value = changed_prop.value; - // Ensure correct data type for dispatch. if (changed_prop.component?.startsWith("number") || changed_prop.component === "slider") { final_value = Number(changed_prop.value); } else if (changed_prop.component === "checkbox") { @@ -161,13 +186,39 @@ gradio.dispatch(event_name, payload); } - function handle_dropdown_change(event: Event, prop: any) { - prop.value = (event.target as HTMLSelectElement).value; - dispatch_update("change", prop); + /** + * Handles changes from a dropdown (`select`) element. + * It updates the local `value` array and then dispatches the *entire updated object* + * to the backend. This is a robust way to ensure state consistency. + * @param {Event} event - The DOM change event. + * @param {any} prop_to_change - The property object being modified. + */ + async function handle_dropdown_change(event: Event, prop_to_change: any) { + const new_prop_value = (event.target as HTMLSelectElement).value; + + // Recreate the entire `value` array to ensure Svelte's reactivity. + value = value.map(group => { + if (!group.properties) return group; + return { + ...group, + properties: group.properties.map(prop => { + if (prop.name === prop_to_change.name) { + return { ...prop, value: new_prop_value }; + } + return prop; + }) + }; + }); + + // Wait for Svelte to process the DOM update before dispatching. + await tick(); + // Dispatch the full, updated value object to the backend. + gradio.dispatch("change", value); } - + /** - * Resets a single property to its initial value. + * Resets a single property to its initial value, which was stored on mount. + * It dispatches the entire updated `value` object to the backend. * @param {string} propName - The name of the property to reset. */ function handle_reset_prop(propName: string) { @@ -177,7 +228,6 @@ isResetting = false; return; } - // Create a new array to trigger Svelte's reactivity. let updatedValue = value.map(group => { if (group.properties) { group.properties = group.properties.map(prop => { @@ -194,8 +244,11 @@ setTimeout(() => { isResetting = false; }, 100); } - onMount(() => { - // Store a snapshot of the initial value state. + /** + * Creates a snapshot of the initial values of all properties. + * This snapshot is used by the reset functionality. + */ + function storeInitialValues() { lastValue = JSON.stringify(value); if (Array.isArray(value)) { value.forEach(group => { @@ -207,12 +260,19 @@ }); } - // Update sliders on initial mount to ensure they reflect the correct state. - // A timeout ensures `bind:this` has completed. - setTimeout(updateAllSliders, 0); + // Ensure sliders are visually updated on initial load. + setTimeout(updateAllSliders, 50); + } + + /** + * Lifecycle hook that runs when the component is first added to the DOM. + */ + onMount(() => { + storeInitialValues(); }); + {#if loading_status} {/if} - + - +
{#if open}
@@ -371,23 +431,18 @@ \ No newline at end of file diff --git a/src/pyproject.toml b/src/pyproject.toml index 6ee8577e975d64c754e9632c4d61c698c9656623..a2e36b468f574284a8a0ade859579ff3e1e6e32a 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -8,12 +8,12 @@ build-backend = "hatchling.build" [project] name = "gradio_propertysheet" -version = "0.0.1" +version = "0.0.2" description = "Property sheet" readme = "README.md" license = "apache-2.0" requires-python = ">=3.10" -authors = [{ name = "YOUR NAME", email = "YOUREMAIL@domain.com" }] +authors = [{ name = "Eliseu Silva", email = "elismasilva@gmail.com" }] keywords = ["gradio-custom-component", "gradio-template-Fallback"] # Add dependencies here dependencies = ["gradio>=4.0,<6.0"]