@pheem49/mint 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +1258 -35
- package/Cargo.toml +5 -2
- package/LICENSE +21 -654
- package/README.md +93 -756
- package/Release_Note.md +53 -446
- package/apps/mint-companion/src-tauri/Cargo.toml +20 -0
- package/apps/mint-companion/src-tauri/build.rs +3 -0
- package/apps/mint-companion/src-tauri/src/main.rs +468 -0
- package/apps/mint-companion/tsconfig.json +20 -0
- package/apps/mint-companion/vite.config.ts +3 -0
- package/components.json +19 -0
- package/crates/mint-cli/Cargo.toml +9 -1
- package/crates/mint-cli/src/agent/approval_prompts.rs +16 -3
- package/crates/mint-cli/src/agent/live_status.rs +545 -148
- package/crates/mint-cli/src/agent/markdown_render.rs +601 -61
- package/crates/mint-cli/src/agent.rs +723 -258
- package/crates/mint-cli/src/commands/agent.rs +83 -74
- package/crates/mint-cli/src/commands/eval.rs +9 -5
- package/crates/mint-cli/src/commands/git.rs +204 -0
- package/crates/mint-cli/src/commands/integrations.rs +35 -0
- package/crates/mint-cli/src/commands/knowledge.rs +13 -32
- package/crates/mint-cli/src/commands/mod.rs +81 -2
- package/crates/mint-cli/src/commands/tailnet_web.rs +235 -0
- package/crates/mint-cli/src/image.rs +32 -11
- package/crates/mint-cli/src/interactive/chat_tui.rs +7853 -0
- package/crates/mint-cli/src/interactive/command_ui.rs +477 -0
- package/crates/mint-cli/src/interactive/format.rs +8 -0
- package/crates/mint-cli/src/interactive/input_box.rs +94 -8
- package/crates/mint-cli/src/interactive/picker.rs +180 -37
- package/crates/mint-cli/src/interactive/resume_picker.rs +686 -0
- package/crates/mint-cli/src/interactive/slash_commands.rs +1071 -501
- package/crates/mint-cli/src/interactive/thought_viewer.rs +286 -0
- package/crates/mint-cli/src/interactive/tool_activity.rs +328 -0
- package/crates/mint-cli/src/interactive.rs +454 -166
- package/crates/mint-cli/src/main.rs +93 -26
- package/crates/mint-cli/src/markdown.rs +12 -5
- package/crates/mint-cli/src/mcp.rs +5 -0
- package/crates/mint-cli/src/mod_host.rs +6 -0
- package/crates/mint-cli/src/mods_cli.rs +62 -0
- package/crates/mint-cli/src/mods_ui.rs +187 -0
- package/crates/mint-cli/src/onboard.rs +37 -61
- package/crates/mint-cli/src/plugins_cli.rs +8 -5
- package/crates/mint-cli/src/setup.rs +10 -8
- package/crates/mint-cli/src/terminal_theme.rs +189 -0
- package/crates/mint-cli/src/updater.rs +112 -23
- package/crates/mint-cli/tests/library_intake.rs +77 -0
- package/crates/mint-cli/tests/mods_testing.rs +133 -0
- package/crates/mint-companion-protocol/Cargo.toml +10 -0
- package/crates/mint-companion-protocol/src/lib.rs +163 -0
- package/crates/mint-core/Cargo.toml +6 -3
- package/crates/mint-core/build.rs +26 -0
- package/crates/mint-core/src/agent/agent_loop.rs +1 -0
- package/crates/mint-core/src/agent/chat.rs +1003 -209
- package/crates/mint-core/src/agent/code_tools.rs +98 -2
- package/crates/mint-core/src/agent/memory/sources.rs +240 -0
- package/crates/mint-core/src/agent/memory.rs +805 -33
- package/crates/mint-core/src/agent/skill_inventory.rs +325 -0
- package/crates/mint-core/src/agent/skills.rs +437 -90
- package/crates/mint-core/src/agent.rs +1 -0
- package/crates/mint-core/src/api_server/routes/background_jobs.rs +310 -0
- package/crates/mint-core/src/api_server/routes/chat.rs +233 -190
- package/crates/mint-core/src/api_server/routes/html_preview.rs +77 -0
- package/crates/mint-core/src/api_server/routes/library.rs +97 -0
- package/crates/mint-core/src/api_server/routes/linked_folders.rs +118 -3
- package/crates/mint-core/src/api_server/routes/media_gen.rs +10 -57
- package/crates/mint-core/src/api_server/routes/misc.rs +114 -121
- package/crates/mint-core/src/api_server/routes/mod.rs +6 -0
- package/crates/mint-core/src/api_server/routes/mods.rs +31 -0
- package/crates/mint-core/src/api_server/routes/sessions.rs +85 -0
- package/crates/mint-core/src/api_server/routes/skills_subagents.rs +12 -42
- package/crates/mint-core/src/api_server/routes/slash.rs +50 -1
- package/crates/mint-core/src/api_server/routes/sources.rs +101 -0
- package/crates/mint-core/src/api_server.rs +140 -12
- package/crates/mint-core/src/avatar_bridge.rs +13 -2
- package/crates/mint-core/src/browser/cdp.rs +74 -83
- package/crates/mint-core/src/browser/evidence.rs +260 -0
- package/crates/mint-core/src/browser/input.rs +1 -1
- package/crates/mint-core/src/browser/interact.rs +98 -124
- package/crates/mint-core/src/browser/lifecycle.rs +75 -4
- package/crates/mint-core/src/browser/mod.rs +16 -2
- package/crates/mint-core/src/browser/navigate.rs +27 -19
- package/crates/mint-core/src/browser/observe.js +40 -0
- package/crates/mint-core/src/browser/session.rs +1610 -0
- package/crates/mint-core/src/companion.rs +716 -0
- package/crates/mint-core/src/cron/scheduler.rs +34 -2
- package/crates/mint-core/src/git/branches.rs +348 -0
- package/crates/mint-core/src/git/checkpoint.rs +40 -0
- package/crates/mint-core/src/git/diff.rs +206 -0
- package/crates/mint-core/src/git/mod.rs +10 -2
- package/crates/mint-core/src/integrations/channels.rs +88 -345
- package/crates/mint-core/src/integrations/mcp.rs +397 -50
- package/crates/mint-core/src/integrations/mcp_calls.rs +823 -0
- package/crates/mint-core/src/integrations/mcp_catalog.rs +267 -0
- package/crates/mint-core/src/integrations/mcp_device.rs +319 -0
- package/crates/mint-core/src/integrations/mcp_result.rs +356 -0
- package/crates/mint-core/src/integrations/webhooks.rs +539 -0
- package/crates/mint-core/src/integrations.rs +2 -0
- package/crates/mint-core/src/lib.rs +107 -40
- package/crates/mint-core/src/live_sync.rs +28 -9
- package/crates/mint-core/src/media/auto_shorts.rs +1 -0
- package/crates/mint-core/src/media/gemini_live.rs +145 -14
- package/crates/mint-core/src/media/image_models.rs +3 -27
- package/crates/mint-core/src/media/image_workflow.rs +216 -0
- package/crates/mint-core/src/media/library/intake.rs +144 -0
- package/crates/mint-core/src/media/library/migration.rs +56 -0
- package/crates/mint-core/src/media/library/removal.rs +55 -0
- package/crates/mint-core/src/media/library/tests.rs +730 -0
- package/crates/mint-core/src/media/library/thumbnails.rs +72 -0
- package/crates/mint-core/src/media/library.rs +545 -0
- package/crates/mint-core/src/media/mic_transcribe.rs +1 -0
- package/crates/mint-core/src/media/model_catalog.rs +375 -0
- package/crates/mint-core/src/media/pictures.rs +79 -222
- package/crates/mint-core/src/media/subtitle.rs +1 -0
- package/crates/mint-core/src/media/video_models.rs +3 -22
- package/crates/mint-core/src/media.rs +3 -0
- package/crates/mint-core/src/mods/manager.rs +1124 -0
- package/crates/mint-core/src/mods/mod.rs +569 -0
- package/crates/mint-core/src/mods/operations.rs +204 -0
- package/crates/mint-core/src/mods/session.rs +146 -0
- package/crates/mint-core/src/mods/slash.rs +59 -0
- package/crates/mint-core/src/mods/telemetry.rs +306 -0
- package/crates/mint-core/src/orchestration/approvals.rs +344 -0
- package/crates/mint-core/src/orchestration/context_render.rs +105 -0
- package/crates/mint-core/src/orchestration/mcp_review.rs +153 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +110 -33
- package/crates/mint-core/src/orchestration/mod.rs +3129 -481
- package/crates/mint-core/src/orchestration/mod_authoring_regressions.rs +209 -0
- package/crates/mint-core/src/orchestration/progress_clock.rs +80 -0
- package/crates/mint-core/src/orchestration/repeated_failures.rs +116 -0
- package/crates/mint-core/src/orchestration/review_regressions.rs +449 -0
- package/crates/mint-core/src/orchestration/run_control.rs +196 -0
- package/crates/mint-core/src/orchestration/tools/browser.rs +16 -139
- package/crates/mint-core/src/orchestration/tools/files.rs +161 -14
- package/crates/mint-core/src/orchestration/tools/media.rs +37 -41
- package/crates/mint-core/src/orchestration/tools/misc.rs +5 -3
- package/crates/mint-core/src/orchestration/tools/mod.rs +2 -0
- package/crates/mint-core/src/orchestration/tools/mods.rs +161 -0
- package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +303 -71
- package/crates/mint-core/src/orchestration/tools/shell.rs +95 -2
- package/crates/mint-core/src/orchestration/tools/web.rs +1 -1
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +4 -1
- package/crates/mint-core/src/prompts/agent.rs +75 -31
- package/crates/mint-core/src/prompts/chat.rs +1 -1
- package/crates/mint-core/src/prompts/persona.rs +1 -1
- package/crates/mint-core/src/prompts/tool_catalog.rs +121 -27
- package/crates/mint-core/src/search/knowledge.rs +7 -1
- package/crates/mint-core/src/search/linked_folders/index.rs +896 -0
- package/crates/mint-core/src/search/linked_folders.rs +473 -131
- package/crates/mint-core/src/slash/catalog.rs +1 -1
- package/crates/mint-core/src/slash/mod.rs +644 -33
- package/crates/mint-core/src/slash/model_fetcher.rs +12 -3
- package/crates/mint-core/src/slash/models.rs +66 -10
- package/crates/mint-core/src/slash/mods.rs +155 -0
- package/crates/mint-core/src/system/bg_shell.rs +1129 -95
- package/crates/mint-core/src/system/config.rs +235 -10
- package/crates/mint-core/src/system/html_preview.rs +398 -0
- package/crates/mint-core/src/system/mint_web.rs +164 -0
- package/crates/mint-core/src/system/release_notes.rs +18 -0
- package/crates/mint-core/src/system/shell.rs +21 -6
- package/crates/mint-core/src/system/workspace.rs +292 -0
- package/crates/mint-core/src/system/workspace_history.rs +604 -0
- package/crates/mint-core/src/system.rs +5 -0
- package/crates/mint-core/tests/background_retention.rs +34 -0
- package/crates/mint-core/tests/background_shutdown.rs +24 -0
- package/crates/mint-core/tests/library_http.rs +209 -0
- package/crates/mint-core/tests/mcp_contract.rs +283 -0
- package/crates/mint-core/tests/mcp_stdio.rs +11 -10
- package/crates/mint-core/tests/media_model_catalog_http.rs +403 -0
- package/crates/mint-core/tests/memory_persistence.rs +39 -0
- package/crates/mint-core/tests/mods_http.rs +215 -0
- package/crates/mint-core/tests/terminal_shutdown.rs +109 -0
- package/crates/mint-mod-runtime/Cargo.toml +18 -0
- package/crates/mint-mod-runtime/src/lib.rs +507 -0
- package/crates/mint-mod-runtime/src/sdk.js +56 -0
- package/crates/mint-mod-runtime/src/test_sdk.js +32 -0
- package/crates/mint-mod-runtime/src/testing.rs +94 -0
- package/crates/mint-mod-runtime/tests/runtime.rs +156 -0
- package/docs/mods/AUTHORING.md +61 -0
- package/docs/mods/README.md +139 -0
- package/docs/mods/TESTING.md +56 -0
- package/docs/mods/mint-mods.d.ts +66 -0
- package/examples/device-mcp/README.md +22 -0
- package/examples/device-mcp/contract.md +49 -0
- package/examples/device-mcp/mock-device.mjs +66 -0
- package/examples/device-mcp/server.mjs +48 -0
- package/examples/device-mcp/server.test.mjs +78 -0
- package/examples/mods/task-checklist/README.md +1 -0
- package/examples/mods/task-checklist/main.ts +17 -0
- package/examples/mods/task-checklist/manifest.json +1 -0
- package/examples/mods/task-checklist/tests/checklist.test.ts +15 -0
- package/examples/mods/token-meter/README.md +1 -0
- package/examples/mods/token-meter/main.ts +8 -0
- package/examples/mods/token-meter/manifest.json +1 -0
- package/examples/mods/tool-guard/README.md +1 -0
- package/examples/mods/tool-guard/main.ts +9 -0
- package/examples/mods/tool-guard/manifest.json +1 -0
- package/out/web/assets/CliSessionsView-CtzUJpK_.css +1 -0
- package/out/web/assets/CliSessionsView-D7hw0Mgj.js +1 -0
- package/out/web/assets/CodeReviewPage-C7bEOJfd.js +4 -0
- package/out/web/assets/CodeReviewPage-Dte9uLiL.css +1 -0
- package/out/web/assets/CommandPalette-0RrF-AOT.js +1 -0
- package/out/web/assets/ImageStudioPanel-CdxkAf_r.js +1 -0
- package/out/web/assets/ImageStudioPanel-D0lnhQV5.css +1 -0
- package/out/web/assets/LibraryPage--Qfisp6D.js +2 -0
- package/out/web/assets/LibraryPage-DAxUTAg7.css +1 -0
- package/out/web/assets/LinkedFoldersView-2nfZbDgN.js +1 -0
- package/out/web/assets/McpRegistryPicker-h9uS8_wT.js +1 -0
- package/out/web/assets/McpServersView-slfQJzNB.js +1 -0
- package/out/web/assets/MintDashboard-BSR5XpXh.js +25 -0
- package/out/web/assets/MintDashboard-CWUcCGhd.css +1 -0
- package/out/web/assets/PluginsView-l7LSm503.js +1 -0
- package/out/web/assets/ScheduledTasksView-CttmLbq1.js +1 -0
- package/out/web/assets/SettingsWindow-BCMLYvEV.js +4 -0
- package/out/web/assets/SettingsWindow-DcMVmU9u.css +1 -0
- package/out/web/assets/SkillsView-rNs1qr_U.js +2 -0
- package/out/web/assets/ToolSurfacePage-B9DzEPWN.js +37 -0
- package/out/web/assets/ToolSurfacePage-CTfgggF2.css +1 -0
- package/out/web/assets/VeoStudioPanel-DOj7_WR3.css +1 -0
- package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +4 -0
- package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +1 -0
- package/out/web/assets/WorkspaceSelector-B2xIp04D.js +1 -0
- package/out/web/assets/WorkspaceSelector-Ca8uJOsS.css +1 -0
- package/out/web/assets/{abnfDiagram-VCTEODGH-DAOBA7ZG.js → abnfDiagram-VCTEODGH-CD0CjoGl.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-CgSwQOPQ.js → architecture-7GRP2DOG-RKV83OeZ.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-CYp3yupP.js → architectureDiagram-5GKGNRK7-nN_HAFct.js} +1 -1
- package/out/web/assets/{blockDiagram-NRAW4CY4-CyWybDWr.js → blockDiagram-NRAW4CY4-BrrqzHW5.js} +1 -1
- package/out/web/assets/{c4Diagram-UCG6FXSJ-BvY3U709.js → c4Diagram-UCG6FXSJ-DTdV8_zE.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-TLXCoZYv.js → chunk-75Z2AOVW-_M0z5olV.js} +1 -1
- package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +2 -0
- package/out/web/assets/{chunk-CLGD4ZFX-xjsKtNS7.js → chunk-CLGD4ZFX-D54yGvGS.js} +1 -1
- package/out/web/assets/chunk-DSNCTWBM-C-gvT2ru.js +2 -0
- package/out/web/assets/chunk-DU6HZSFF-CnFngIhW.js +128 -0
- package/out/web/assets/{chunk-F27PBJKO-BFpgF55A.js → chunk-F27PBJKO-BqtWrnEO.js} +1 -1
- package/out/web/assets/{chunk-G27WJ6UU-DfF7qW-C.js → chunk-G27WJ6UU-Ckoq5mi2.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-C-558kh_.js → chunk-GMAD6QVW-BuhEcgHq.js} +1 -1
- package/out/web/assets/{chunk-JQ64N6SF-wJmeGKAw.js → chunk-JQ64N6SF-CF8T7GiZ.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-C1wHD8Ie.js → chunk-LCL6LL3I-BhXV9zyH.js} +1 -1
- package/out/web/assets/{chunk-OBVCFTLP-BsRTPBqs.js → chunk-OBVCFTLP-CRIkunUB.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-HZIiM7Ni.js → chunk-P2QGCYS3-UFEU6BxZ.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-Dk9wvVb0.js → chunk-POPQ4Y6H-CQcrNbjr.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-BmjYLNbq.js → chunk-PWAF6VOD-Cc2uVDsG.js} +1 -1
- package/out/web/assets/{chunk-R7TYR2AO-CaHIf-lK.js → chunk-R7TYR2AO-DiCxzdAY.js} +1 -1
- package/out/web/assets/{chunk-RHFEMEQ7-_T561hOU.js → chunk-RHFEMEQ7-b7hnPmrR.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-CM-GGYoY.js → chunk-SVP7TREG-Bu_yYb-V.js} +1 -1
- package/out/web/assets/{chunk-TEH6E4GO-K2A8Vg2C.js → chunk-TEH6E4GO-G4Cdlyrt.js} +1 -1
- package/out/web/assets/classDiagram-DTDB5LWJ-RnC2mYO4.js +1 -0
- package/out/web/assets/classDiagram-v2-JRS7N3AN-RnC2mYO4.js +1 -0
- package/out/web/assets/config-CnvCChUM.js +2 -0
- package/out/web/assets/config-DM6oIVO3.css +1 -0
- package/out/web/assets/core-DsKkQ7ig.js +1 -0
- package/out/web/assets/{cynefin-OW5HDTMX-ClzaB6cc.js → cynefin-OW5HDTMX-CnzQfOGp.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-D_JzZBzf.js → cynefinDiagram-5FMLGOSQ-DVtQnfpm.js} +1 -1
- package/out/web/assets/{dagre-3AP2YEHR-BDuUeMHj.js → dagre-3AP2YEHR-DG76_k5_.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-DgtcfE8P.js → diagram-S7CK7UJ4-CaouUoze.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-DTLoEYti.js → diagram-UQ7AKVKN-B4bEc26B.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-ChGl9pXz.js → diagram-VSXAHHWV-BJ86Ov2Y.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-Be8DWz0S.js → diagram-VX7I27RA-7hH5IPYf.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-BMXjRTOF.js → diagram-Z3DM3KII-CCM4clo8.js} +1 -1
- package/out/web/assets/dist-js-BkYNznHX.js +1 -0
- package/out/web/assets/{ebnfDiagram-PWID7BFC-8Q9pl1CJ.js → ebnfDiagram-PWID7BFC-Da7WAM3k.js} +1 -1
- package/out/web/assets/{erDiagram-SSCWMZ5O-DjH8Lnkn.js → erDiagram-SSCWMZ5O-CzzmnZWT.js} +1 -1
- package/out/web/assets/event-Cdt7Byyj.js +1 -0
- package/out/web/assets/{eventmodeling-NTZA5JFV-BKUH_DOp.js → eventmodeling-NTZA5JFV-xcfsA0XD.js} +1 -1
- package/out/web/assets/fira-code-latin-600-normal-BmSSHshu.woff +0 -0
- package/out/web/assets/fira-code-latin-600-normal-CvYZpPHg.woff2 +0 -0
- package/out/web/assets/fira-code-symbols2-600-normal-Dvq6IQE5.woff +0 -0
- package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-D7fZKJNM.js → ganttDiagram-EL5Y4UJY-B3ClFGmL.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-BypWaaBU.js → gitGraph-4MIJSDKK-BZ_y_cDU.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-DWiw_3bq.js → gitGraphDiagram-WWUBYQGX-drhRSYm3.js} +1 -1
- package/out/web/assets/index-BZ9xgmMP.css +1 -0
- package/out/web/assets/index-Ca8cCS4h.js +168 -0
- package/out/web/assets/{info-A6RAGUB7-KkAUxT4j.js → info-A6RAGUB7-B7I3K0F1.js} +1 -1
- package/out/web/assets/{infoDiagram-RXCK75RN-BNb6E48y.js → infoDiagram-RXCK75RN-deX_1MPh.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-Caa-JoAK.js → ishikawaDiagram-5VMMS53U-s38yo28y.js} +1 -1
- package/out/web/assets/{journeyDiagram-EYS64GPL-DOrmFGz6.js → journeyDiagram-EYS64GPL-CZn2kB8b.js} +1 -1
- package/out/web/assets/jsx-runtime-DN4NhQUK.js +1 -0
- package/out/web/assets/{kanban-definition-3QL26DDD-BOWCYcK0.js → kanban-definition-3QL26DDD-DodjgySL.js} +1 -1
- package/out/web/assets/markdown-CMhYIcWB.js +39 -0
- package/out/web/assets/{mermaid-parser.core-BQqjCkS_.js → mermaid-parser.core-Whu2rlJC.js} +3 -3
- package/out/web/assets/mermaid.core-CKyPo8VH.js +11 -0
- package/out/web/assets/{mindmap-definition-FBJOCRG2-jTceWpr0.js → mindmap-definition-FBJOCRG2-260WBDxZ.js} +1 -1
- package/out/web/assets/modelManager-CUaGWMWu.js +2 -0
- package/out/web/assets/oauthManager-DlNhXJr6.js +1 -0
- package/out/web/assets/{packet-AYTQ26CC-CJ5RXgol.js → packet-AYTQ26CC-CEeIRKRG.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-y8wMtd0y.js → pegDiagram-XKGWAZYB-BYadI-KO.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-72fTBbl4.js → pie-WAS4IAKB-D8uf4dh5.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-e0O02qWq.js → pieDiagram-E7YTZNPT-CjSDy4hO.js} +1 -1
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-C9phYLom.js → quadrantDiagram-AXDQQJYC-B8D3gU5d.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-BAU2hzUT.js → radar-RG4KPBEZ-DZJxnokY.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-B0bCAVHC.js → railroad-74A4TZTK-DBysUiUi.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-WhxO7ndE.js → railroad-abnf-HS5TGJTU-CHWxoJYg.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-BkA0m7-F.js → railroad-ebnf-LZEXJU2U-DDv7X6bY.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-BsVpHIaj.js → railroad-peg-WCYAUIDC-DpfcYYNJ.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-CyOLN65Q.js → railroadDiagram-O6MQD6OU-CYtyv0t3.js} +1 -1
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-DQXJ7Dud.js → requirementDiagram-EFPCY7ZU-D2X-Ewik.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-B2XLyIIc.js → sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-DGQY4wwm.js → sequenceDiagram-WJ2MYXX4-BvFLKtPd.js} +1 -1
- package/out/web/assets/{stateDiagram-HBIQ2CUA-DHZpDwNy.js → stateDiagram-HBIQ2CUA-Bx0GWeaY.js} +1 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +1 -0
- package/out/web/assets/studio-B1mk40wD.js +1 -0
- package/out/web/assets/{swimlanes-XN3QIQJK-Bn_jcZz-.js → swimlanes-XN3QIQJK-CCma0T7L.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +8 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-CdTERuJZ.js → timeline-definition-24CTP7MA-iCRhhJ7C.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-TKBKQG6R.js → treeView-Q6P3EWNA-DZ-y08qp.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-BP7gQoiC.js → treemap-WGGIJYW6-De0CxzMx.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-BHUmxDuK.js → vennDiagram-4TSXK5OY-w_7aZ6xe.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-9bct5AAN.js → wardley-WFR3VGLG-DT0y0xJ4.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-BfJwDDso.js → wardleyDiagram-VM6X3IG4-DAdXELbQ.js} +1 -1
- package/out/web/assets/window-BJCVtyET.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-Dqd9Mvpo.js → xychartDiagram-S5SC5T6Z-IZIXf3Vo.js} +1 -1
- package/out/web/index-web.html +4 -4
- package/out/web/index.html +4 -4
- package/package.json +80 -20
- package/shared-modules/.github/workflows/ci.yml +120 -0
- package/shared-modules/.github/workflows/update.yaml +28 -0
- package/slash-commands.json +16 -2
- package/src/bin/auto-build.js +66 -0
- package/src/bin/desktop.js +113 -0
- package/src/bin/desktop.test.js +113 -0
- package/src/bin/index.js +18 -25
- package/src/bin/index.test.js +89 -0
- package/src/bin/measure-effects.mjs +53 -0
- package/src/bin/package.test.js +28 -0
- package/src/bin/release-notes.test.js +84 -0
- package/src/bin/styles.test.js +20 -0
- package/src/bin/web.js +5 -0
- package/src/bin/web.test.js +39 -0
- package/src/renderer/index-web.html +1 -0
- package/src/renderer/index.html +1 -2
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/src/renderer/shared/agentProgress.ts +201 -3
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +9 -8
- package/src/renderer/shared/components/AgentActivityTable.tsx +193 -133
- package/src/renderer/shared/components/ApprovalCard.test.tsx +24 -0
- package/src/renderer/shared/components/ApprovalCard.tsx +10 -3
- package/src/renderer/shared/components/ArtifactPreviewPanel.tsx +91 -40
- package/src/renderer/shared/components/AuthGate.tsx +79 -48
- package/src/renderer/shared/components/BackgroundTerminals.tsx +181 -0
- package/src/renderer/shared/components/CalculationCard.tsx +41 -15
- package/src/renderer/shared/components/ChatCodeBlock.tsx +8 -4
- package/src/renderer/shared/components/ChatMessageItem.test.tsx +68 -0
- package/src/renderer/shared/components/ChatMessageItem.tsx +52 -33
- package/src/renderer/shared/components/ChatPanel.test.tsx +21 -0
- package/src/renderer/shared/components/ChatPanel.tsx +676 -415
- package/src/renderer/shared/components/ChunkErrorBoundary.tsx +115 -64
- package/src/renderer/shared/components/CliSessionsView.test.tsx +125 -0
- package/src/renderer/shared/components/CliSessionsView.tsx +543 -0
- package/src/renderer/shared/components/CodeReviewPage.tsx +668 -0
- package/src/renderer/shared/components/CollapsiblePasteInput.tsx +90 -0
- package/src/renderer/shared/components/CommandPalette.tsx +8 -8
- package/src/renderer/shared/components/ContextCompactionStatus.tsx +17 -0
- package/src/renderer/shared/components/DashboardSidebar.tsx +853 -229
- package/src/renderer/shared/components/DesktopTitlebar.tsx +371 -0
- package/src/renderer/shared/components/DiffReviewModal.tsx +3 -3
- package/src/renderer/shared/components/ErrorNotice.tsx +29 -0
- package/src/renderer/shared/components/FormattedMessage.tsx +11 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.css +86 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.test.tsx +24 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.tsx +85 -101
- package/src/renderer/shared/components/GitBranchSelector.tsx +442 -0
- package/src/renderer/shared/components/GlideSelect.css +138 -0
- package/src/renderer/shared/components/GlideSelect.d.ts +31 -0
- package/src/renderer/shared/components/GlideSelect.jsx +266 -0
- package/src/renderer/shared/components/ImageGenCard.tsx +31 -12
- package/src/renderer/shared/components/ImageSearchCard.tsx +76 -65
- package/src/renderer/shared/components/ImageStudioPanel.tsx +49 -49
- package/src/renderer/shared/components/InlineThoughtNote.tsx +27 -0
- package/src/renderer/shared/components/LibraryItemCard.tsx +72 -0
- package/src/renderer/shared/components/LibraryPage.tsx +165 -0
- package/src/renderer/shared/components/LibraryPreview.tsx +59 -0
- package/src/renderer/shared/components/LinkedFoldersView.tsx +365 -46
- package/src/renderer/shared/components/McpRegistryPicker.tsx +1 -1
- package/src/renderer/shared/components/McpServersView.tsx +51 -30
- package/src/renderer/shared/components/McpToolAllowlist.tsx +2 -4
- package/src/renderer/shared/components/McpToolResults.tsx +99 -0
- package/src/renderer/shared/components/MermaidCard.tsx +14 -8
- package/src/renderer/shared/components/MintDashboard.tsx +1002 -831
- package/src/renderer/shared/components/ModSessionControls.tsx +8 -0
- package/src/renderer/shared/components/ModUi.test.tsx +65 -0
- package/src/renderer/shared/components/ModUi.tsx +26 -0
- package/src/renderer/shared/components/ModelSelectorPopover.tsx +547 -219
- package/src/renderer/shared/components/ModsPanel.tsx +156 -0
- package/src/renderer/shared/components/PlanChecklistWidget.tsx +1 -1
- package/src/renderer/shared/components/PluginsView.tsx +1 -1
- package/src/renderer/shared/components/ProgressActivity.tsx +17 -0
- package/src/renderer/shared/components/ReviewHistory.tsx +42 -0
- package/src/renderer/shared/components/RewindModal.tsx +11 -18
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +8 -14
- package/src/renderer/shared/components/ScheduledTasksView.tsx +11 -10
- package/src/renderer/shared/components/ScreenCaptureDialog.css +221 -0
- package/src/renderer/shared/components/ScreenCaptureDialog.tsx +199 -0
- package/src/renderer/shared/components/SelectField.test.tsx +27 -0
- package/src/renderer/shared/components/SelectField.tsx +38 -0
- package/src/renderer/shared/components/SessionSources.tsx +48 -0
- package/src/renderer/shared/components/SessionSourcesPopover.tsx +61 -0
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +41 -45
- package/src/renderer/shared/components/Settings/AudioTab.tsx +16 -15
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +10 -60
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +368 -0
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +368 -113
- package/src/renderer/shared/components/Settings/MemoryTab.test.tsx +37 -0
- package/src/renderer/shared/components/Settings/MemoryTab.tsx +71 -31
- package/src/renderer/shared/components/Settings/NotificationsTab.test.tsx +15 -0
- package/src/renderer/shared/components/Settings/NotificationsTab.tsx +84 -0
- package/src/renderer/shared/components/Settings/PluginsTab.tsx +20 -12
- package/src/renderer/shared/components/Settings/ProfileTab.tsx +29 -5
- package/src/renderer/shared/components/Settings/SearchableModelCombobox.tsx +411 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +416 -165
- package/src/renderer/shared/components/SkillsView.tsx +41 -16
- package/src/renderer/shared/components/SlashChoicePanel.tsx +88 -0
- package/src/renderer/shared/components/SlashSuggestions.test.tsx +33 -0
- package/src/renderer/shared/components/SlashSuggestions.tsx +41 -12
- package/src/renderer/shared/components/SourcesBlock.tsx +55 -51
- package/src/renderer/shared/components/StockCard.tsx +58 -24
- package/src/renderer/shared/components/SubagentDagView.tsx +4 -4
- package/src/renderer/shared/components/TerminalDock.tsx +241 -0
- package/src/renderer/shared/components/ThinkingBlock.tsx +14 -8
- package/src/renderer/shared/components/ToolSurfacePage.test.tsx +32 -0
- package/src/renderer/shared/components/ToolSurfacePage.tsx +568 -0
- package/src/renderer/shared/components/ToolsPanelToggle.tsx +13 -0
- package/src/renderer/shared/components/UiFeatureCard.tsx +267 -0
- package/src/renderer/shared/components/UiGridCard.tsx +188 -0
- package/src/renderer/shared/components/UiMockupWidget.tsx +149 -0
- package/src/renderer/shared/components/VeoStudioPanel.tsx +22 -37
- package/src/renderer/shared/components/ViewedImages.tsx +36 -0
- package/src/renderer/shared/components/VirtualChatHistory.tsx +82 -0
- package/src/renderer/shared/components/VoicePill.css +85 -0
- package/src/renderer/shared/components/VoicePill.d.ts +12 -0
- package/src/renderer/shared/components/VoicePill.jsx +190 -0
- package/src/renderer/shared/components/VoicePill.test.tsx +22 -0
- package/src/renderer/shared/components/WeatherCard.tsx +3 -3
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +138 -0
- package/src/renderer/shared/components/WorkspacePaneResizer.tsx +92 -0
- package/src/renderer/shared/components/WorkspacePreviewActions.test.tsx +44 -0
- package/src/renderer/shared/components/WorkspacePreviewActions.tsx +19 -0
- package/src/renderer/shared/components/WorkspaceSelector.tsx +154 -0
- package/src/renderer/shared/components/background-terminals.css +292 -0
- package/src/renderer/shared/components/ui/README.md +52 -0
- package/src/renderer/shared/components/ui/button.tsx +37 -0
- package/src/renderer/shared/components/ui/demo.tsx +26 -0
- package/src/renderer/shared/components/ui/error-recovery.css +35 -0
- package/src/renderer/shared/components/ui/error-recovery.tsx +35 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.css +6 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.tsx +374 -0
- package/src/renderer/shared/components/workspace-selector.css +248 -0
- package/src/renderer/shared/constants/config.ts +57 -3
- package/src/renderer/shared/constants/models.ts +189 -2
- package/src/renderer/shared/constants/slashCommands.ts +1 -1
- package/src/renderer/shared/conversation/coordinator.test.ts +27 -0
- package/src/renderer/shared/conversation/coordinator.ts +82 -0
- package/src/renderer/shared/conversation/lifecycle.test.ts +362 -0
- package/src/renderer/shared/conversation/lifecycle.ts +418 -0
- package/src/renderer/shared/conversation/projectNavigation.test.ts +105 -0
- package/src/renderer/shared/conversation/projectNavigation.ts +39 -0
- package/src/renderer/shared/conversation/sourcesTransport.ts +27 -0
- package/src/renderer/shared/conversation/syncView.test.ts +13 -0
- package/src/renderer/shared/conversation/syncView.ts +6 -0
- package/src/renderer/shared/conversation/transport.test.ts +163 -0
- package/src/renderer/shared/conversation/transport.ts +159 -0
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +64 -0
- package/src/renderer/shared/css/agent-observability.css +46 -15
- package/src/renderer/shared/css/auth-gate.css +114 -15
- package/src/renderer/shared/css/chat-ui-cards.css +495 -0
- package/src/renderer/shared/css/code-review.css +856 -0
- package/src/renderer/shared/css/code-sessions.css +479 -0
- package/src/renderer/shared/css/collapsed-paste.css +35 -0
- package/src/renderer/shared/css/effects.css +15 -0
- package/src/renderer/shared/css/error-notice.css +60 -0
- package/src/renderer/shared/css/file-changes.css +132 -0
- package/src/renderer/shared/css/image-studio.css +16 -16
- package/src/renderer/shared/css/library.css +476 -0
- package/src/renderer/shared/css/management-views.css +415 -27
- package/src/renderer/shared/css/mcp-results.css +11 -0
- package/src/renderer/shared/css/model-selector.css +543 -85
- package/src/renderer/shared/css/mods.css +77 -0
- package/src/renderer/shared/css/notification-notice.css +28 -0
- package/src/renderer/shared/css/session-sources-popover.css +9 -0
- package/src/renderer/shared/css/session-sources.css +23 -0
- package/src/renderer/shared/css/settings/agents.css +1 -1
- package/src/renderer/shared/css/settings/automation.css +13 -13
- package/src/renderer/shared/css/settings/general.css +526 -5
- package/src/renderer/shared/css/settings/memory.css +154 -0
- package/src/renderer/shared/css/settings/notifications.css +11 -0
- package/src/renderer/shared/css/settings/plugins.css +5 -5
- package/src/renderer/shared/css/settings/profile.css +331 -1
- package/src/renderer/shared/css/settings/theme.css +656 -3
- package/src/renderer/shared/css/slash-choice.css +95 -0
- package/src/renderer/shared/css/slash-suggestions.css +68 -0
- package/src/renderer/shared/css/sources-block.css +91 -0
- package/src/renderer/shared/css/thinking-status.css +46 -0
- package/src/renderer/shared/css/tools-panel.css +7 -0
- package/src/renderer/shared/css/ui-tailwind.css +19 -0
- package/src/renderer/shared/css/veo-studio.css +16 -15
- package/src/renderer/shared/css/viewed-images.css +15 -0
- package/src/renderer/shared/fonts.css +46 -0
- package/src/renderer/shared/fonts.ts +10 -37
- package/src/renderer/shared/lib/utils.ts +6 -0
- package/src/renderer/shared/library/controller.test.ts +61 -0
- package/src/renderer/shared/library/controller.ts +57 -0
- package/src/renderer/shared/library/transport.test.ts +26 -0
- package/src/renderer/shared/library/transport.ts +60 -0
- package/src/renderer/shared/library/useLibraryFile.ts +38 -0
- package/src/renderer/shared/mods.ts +58 -0
- package/src/renderer/shared/platform.test.ts +90 -0
- package/src/renderer/shared/platform.ts +219 -7
- package/src/renderer/shared/theme/themeManager.test.ts +43 -0
- package/src/renderer/shared/theme/themeManager.ts +157 -0
- package/src/renderer/shared/theme/themes.ts +116 -0
- package/src/renderer/shared/theme/tokens.css +318 -0
- package/src/renderer/shared/types.ts +137 -2
- package/src/renderer/shared/utils/agentActivity.test.ts +75 -0
- package/src/renderer/shared/utils/agentActivity.ts +168 -8
- package/src/renderer/shared/utils/approval.tsx +7 -0
- package/src/renderer/shared/utils/artifactBrowser.test.ts +80 -0
- package/src/renderer/shared/utils/artifactBrowser.ts +41 -0
- package/src/renderer/shared/utils/cardJson.test.ts +35 -0
- package/src/renderer/shared/utils/cardJson.ts +30 -0
- package/src/renderer/shared/utils/contextCompaction.test.tsx +48 -0
- package/src/renderer/shared/utils/contextCompaction.ts +21 -0
- package/src/renderer/shared/utils/effectVisibility.ts +9 -0
- package/src/renderer/shared/utils/fileIcons.ts +1 -1
- package/src/renderer/shared/utils/markdown.tsx +330 -81
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +40 -0
- package/src/renderer/shared/utils/mcpResults.test.tsx +91 -0
- package/src/renderer/shared/utils/modViewport.ts +7 -0
- package/src/renderer/shared/utils/nativeRecordingSession.test.ts +61 -0
- package/src/renderer/shared/utils/nativeRecordingSession.ts +46 -0
- package/src/renderer/shared/utils/notificationSettings.test.ts +14 -0
- package/src/renderer/shared/utils/notificationSettings.ts +23 -0
- package/src/renderer/shared/utils/notifications.test.ts +51 -0
- package/src/renderer/shared/utils/notifications.ts +54 -0
- package/src/renderer/shared/utils/pastedText.test.ts +20 -0
- package/src/renderer/shared/utils/pastedText.ts +13 -0
- package/src/renderer/shared/utils/progressCache.test.ts +32 -0
- package/src/renderer/shared/utils/providers.ts +8 -3
- package/src/renderer/shared/utils/screenCapture.ts +43 -0
- package/src/renderer/shared/utils/sessionSources.test.ts +31 -0
- package/src/renderer/shared/utils/sessionSources.ts +34 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +5 -2
- package/src/renderer/shared/utils/sourceAttachments.ts +28 -0
- package/src/renderer/shared/utils/speech.ts +51 -9
- package/src/renderer/shared/utils/syntaxHighlight.test.tsx +22 -0
- package/src/renderer/shared/utils/syntaxHighlight.tsx +26 -0
- package/src/renderer/shared/utils/ui.ts +4 -64
- package/src/renderer/shared/utils/useGeminiLiveVoice.ts +49 -5
- package/src/renderer/shared/utils/useLatestCallback.ts +9 -0
- package/src/renderer/shared/utils/useNativeVoiceInput.ts +80 -72
- package/src/renderer/shared/utils/useSessionSources.ts +33 -0
- package/src/renderer/shared/utils/viewedImages.ts +26 -0
- package/src/renderer/shared/utils/workspacePane.test.ts +33 -0
- package/src/renderer/shared/utils/workspacePane.ts +20 -0
- package/src/renderer/shared/utils/workspacePreview.test.ts +24 -0
- package/src/renderer/shared/utils/workspacePreview.ts +16 -0
- package/src/renderer/shared/utils/workspaceSnapshot.test.ts +49 -0
- package/src/renderer/shared/utils/workspaceSnapshot.ts +26 -0
- package/src/renderer/shared/utils/workspaces.ts +10 -0
- package/src/renderer/shared/workspaceUndo.ts +88 -0
- package/src/renderer/src/App.tsx +16 -1
- package/src/renderer/src/components/BrowserShell.tsx +108 -0
- package/src/renderer/src/components/BrowserSuggestionsPopup.tsx +91 -0
- package/src/renderer/src/components/LiveTranslateControls.tsx +65 -0
- package/src/renderer/src/components/MintDashboard.tsx +4 -2
- package/src/renderer/src/components/PicturesLibrary.tsx +2 -287
- package/src/renderer/src/components/ScreenPicker.css +227 -0
- package/src/renderer/src/components/ScreenPicker.tsx +312 -526
- package/src/renderer/src/components/SettingsWindow.tsx +48 -5
- package/src/renderer/src/components/SpotlightWindow.tsx +1 -0
- package/src/renderer/src/components/WidgetWindow.tsx +27 -3
- package/src/renderer/src/components/WorkspacePanel.tsx +269 -61
- package/src/renderer/src/components/browser-shell.css +185 -0
- package/src/renderer/src/components/browser-suggestions-popup.css +55 -0
- package/src/renderer/src/components/liveTranslateFrames.test.ts +44 -0
- package/src/renderer/src/components/liveTranslateFrames.ts +45 -0
- package/src/renderer/src/components/liveTranslateLanguage.ts +6 -0
- package/src/renderer/src/css/app-shell.css +400 -204
- package/src/renderer/src/css/chat.css +1666 -594
- package/src/renderer/src/css/dashboard.css +11 -0
- package/src/renderer/src/css/desktop-tools.css +928 -0
- package/src/renderer/src/css/misc.css +5 -60
- package/src/renderer/src/css/pictures.css +2 -407
- package/src/renderer/src/css/settings/base.css +394 -157
- package/src/renderer/src/css/sidebar-workspace.css +1072 -376
- package/src/renderer/src/css/spotlight.css +15 -26
- package/src/renderer/src/css/tool-surfaces.css +784 -0
- package/src/renderer/src/css/widget.css +36 -8
- package/src/renderer/src/env.d.ts +4 -9
- package/src/renderer/src/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src/index.css +53 -46
- package/src/renderer/src/main.tsx +12 -0
- package/src/renderer/src/proactiveSuggestions.ts +29 -0
- package/src/renderer/src/tauri.ts +302 -339
- package/src/renderer/src/voiceInput.ts +2 -1
- package/src/renderer/src-web/App.tsx +40 -0
- package/src/renderer/src-web/components/MintDashboard.tsx +4 -2
- package/src/renderer/src-web/components/PicturesLibrary.tsx +2 -284
- package/src/renderer/src-web/components/PullToRefresh.tsx +107 -0
- package/src/renderer/src-web/components/SettingsWindow.tsx +36 -5
- package/src/renderer/src-web/css/app-shell.css +188 -207
- package/src/renderer/src-web/css/chat.css +1236 -507
- package/src/renderer/src-web/css/dashboard.css +11 -0
- package/src/renderer/src-web/css/misc.css +3 -55
- package/src/renderer/src-web/css/mobile.css +679 -0
- package/src/renderer/src-web/css/pictures.css +2 -415
- package/src/renderer/src-web/css/pull-to-refresh.css +54 -0
- package/src/renderer/src-web/css/settings/base.css +353 -134
- package/src/renderer/src-web/css/settings/mobile.css +320 -0
- package/src/renderer/src-web/css/sidebar-workspace.css +546 -187
- package/src/renderer/src-web/css/spotlight.css +9 -26
- package/src/renderer/src-web/css/widget.css +1 -6
- package/src/renderer/src-web/env.d.ts +4 -12
- package/src/renderer/src-web/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src-web/index.css +53 -96
- package/src/renderer/src-web/main.tsx +12 -0
- package/src/renderer/src-web/proactiveSuggestions.ts +3 -0
- package/src/renderer/src-web/tauri.ts +309 -364
- package/src/renderer/tests/backgroundTerminals.browser.html +81 -0
- package/src/renderer/tests/chatPanelFixture.ts +23 -0
- package/src/renderer/tests/chatPerformance.browser.html +71 -0
- package/src/renderer/tests/cliSessions.browser.html +82 -0
- package/src/renderer/tests/collapsedPaste.browser.html +70 -0
- package/src/renderer/tests/composerMenus.browser.html +116 -0
- package/src/renderer/tests/contextCompaction.browser.html +17 -0
- package/src/renderer/tests/conversationLifecycle.browser.html +70 -0
- package/src/renderer/tests/effectsPerformance.browser.html +13 -0
- package/src/renderer/tests/errorRecovery.browser.html +21 -0
- package/src/renderer/tests/glideSelect.browser.html +71 -0
- package/src/renderer/tests/glideSelect.preview.html +27 -0
- package/src/renderer/tests/library.browser.html +1 -0
- package/src/renderer/tests/library.browser.tsx +78 -0
- package/src/renderer/tests/liveOrb.browser.html +49 -0
- package/src/renderer/tests/liveVoice.browser.html +29 -0
- package/src/renderer/tests/modInput.browser.html +22 -0
- package/src/renderer/tests/sessionSources.browser.html +1 -0
- package/src/renderer/tests/sessionSources.browser.tsx +107 -0
- package/src/renderer/tests/skills.browser.html +24 -0
- package/src/renderer/tests/toolsPanel.browser.html +1 -0
- package/src/renderer/tests/toolsPanel.browser.tsx +113 -0
- package/src/renderer/tests/viewedImages.browser.html +1 -0
- package/src/renderer/tests/viewedImages.browser.tsx +93 -0
- package/src/renderer/tests/voicePill.browser.html +80 -0
- package/src/renderer/tests/voicePill.preview.html +34 -0
- package/src/renderer/tests/webSources.browser.html +1 -0
- package/src/renderer/tests/webSources.browser.tsx +98 -0
- package/src/renderer/tests/workspaceUndo.browser.html +92 -0
- package/src-tauri/Cargo.toml +40 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/src/app/lifecycle.rs +277 -0
- package/src-tauri/src/app/mod.rs +4 -0
- package/src-tauri/src/app/shortcuts.rs +40 -0
- package/src-tauri/src/app/tray.rs +52 -0
- package/src-tauri/src/background/events.rs +70 -0
- package/src-tauri/src/background/headless.rs +230 -0
- package/src-tauri/src/background/mod.rs +4 -0
- package/src-tauri/src/background/proactive.rs +262 -0
- package/src-tauri/src/commands/approvals.rs +20 -0
- package/src-tauri/src/commands/auth.rs +127 -0
- package/src-tauri/src/commands/conversation.rs +642 -0
- package/src-tauri/src/commands/integrations.rs +157 -0
- package/src-tauri/src/commands/media.rs +179 -0
- package/src-tauri/src/commands/mod.rs +11 -0
- package/src-tauri/src/commands/mods.rs +6 -0
- package/src-tauri/src/commands/settings.rs +141 -0
- package/src-tauri/src/commands/voice.rs +153 -0
- package/src-tauri/src/commands/workspace.rs +501 -0
- package/src-tauri/src/lib.rs +10 -0
- package/src-tauri/src/main.rs +3 -0
- package/src-tauri/src/native/actions.rs +206 -0
- package/src-tauri/src/native/browser.rs +252 -0
- package/src-tauri/src/native/capture.rs +695 -0
- package/src-tauri/src/native/discord_rpc.rs +99 -0
- package/src-tauri/src/native/integrations.rs +126 -0
- package/src-tauri/src/native/mod.rs +12 -0
- package/src-tauri/src/native/notifications.rs +51 -0
- package/src-tauri/src/native/plugins.rs +14 -0
- package/src-tauri/src/native/system.rs +250 -0
- package/src-tauri/src/native/terminal.rs +201 -0
- package/src-tauri/src/native/updater.rs +148 -0
- package/src-tauri/src/native/windows.rs +143 -0
- package/tsconfig.json +2 -0
- package/vite.config.ts +4 -1
- package/vite.config.web.ts +5 -0
- package/.cargo/config.toml +0 -13
- package/.claude/settings.local.json +0 -182
- package/.codex +0 -0
- package/CLAUDE.md +0 -102
- package/out/web/Live2DCubismCore.js +0 -9
- package/out/web/assets/MintDashboard-DWSqucgb.js +0 -57
- package/out/web/assets/SettingsWindow-DFM2aj5B.js +0 -2
- package/out/web/assets/chunk-CKBBP62Z-nr1uKPj9.js +0 -2
- package/out/web/assets/chunk-DSNCTWBM-Dtj8Rqsd.js +0 -2
- package/out/web/assets/chunk-DU6HZSFF-2tv5K1wT.js +0 -128
- package/out/web/assets/classDiagram-DTDB5LWJ-BdSFArgw.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-BdSFArgw.js +0 -1
- package/out/web/assets/core-DImejIUG.js +0 -1
- package/out/web/assets/dist-js-BxuKEVWM.js +0 -1
- package/out/web/assets/event-BNl8Zahw.js +0 -1
- package/out/web/assets/fira-code-cyrillic-400-normal-UC0NFL4U.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-400-normal-dc1q3VD7.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-500-normal-Bu7VCL72.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-500-normal-CX35h3Mg.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-400-normal-Buh61xzB.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-400-normal-txZ9Fk_1.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-500-normal-CYRspHgm.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-500-normal-CwtLmSFD.woff +0 -0
- package/out/web/assets/fira-code-greek-400-normal-B2Gh_Y8s.woff2 +0 -0
- package/out/web/assets/fira-code-greek-400-normal-DobhaxvF.woff +0 -0
- package/out/web/assets/fira-code-greek-500-normal-CVO0IRNt.woff2 +0 -0
- package/out/web/assets/fira-code-greek-500-normal-DEXIWiey.woff +0 -0
- package/out/web/assets/fira-code-greek-ext-400-normal-DR7mBgIM.woff2 +0 -0
- package/out/web/assets/fira-code-greek-ext-400-normal-DSPUheWg.woff +0 -0
- package/out/web/assets/fira-code-greek-ext-500-normal-BO3iq16n.woff2 +0 -0
- package/out/web/assets/fira-code-greek-ext-500-normal-CMiNLXER.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-400-normal-DG73JjOf.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-400-normal-KSMg0QLl.woff2 +0 -0
- package/out/web/assets/fira-code-latin-ext-500-normal-CaANqXjI.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-500-normal-Crd9e_oI.woff2 +0 -0
- package/out/web/assets/flowDiagram-A5DVABFB-BpnHUSU7.js +0 -1
- package/out/web/assets/index-CVRg270z.css +0 -1
- package/out/web/assets/index-DxZQr9yD.js +0 -10
- package/out/web/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/out/web/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/out/web/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
- package/out/web/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
- package/out/web/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/out/web/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/out/web/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/out/web/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/out/web/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
- package/out/web/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/out/web/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/out/web/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
- package/out/web/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
- package/out/web/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/out/web/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/out/web/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/out/web/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/out/web/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
- package/out/web/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/out/web/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/out/web/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
- package/out/web/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/out/web/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/out/web/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
- package/out/web/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- package/out/web/assets/kanit-latin-400-normal-BUlsQXH3.woff2 +0 -0
- package/out/web/assets/kanit-latin-400-normal-HVZWrfev.woff +0 -0
- package/out/web/assets/kanit-latin-500-normal-CX_4XcKi.woff2 +0 -0
- package/out/web/assets/kanit-latin-500-normal-qBha86O4.woff +0 -0
- package/out/web/assets/kanit-latin-600-normal-0lS78yAd.woff2 +0 -0
- package/out/web/assets/kanit-latin-600-normal-DlacpeTg.woff +0 -0
- package/out/web/assets/kanit-latin-ext-400-normal-B2xPf58u.woff2 +0 -0
- package/out/web/assets/kanit-latin-ext-400-normal-CHvNKHHD.woff +0 -0
- package/out/web/assets/kanit-latin-ext-500-normal-BFdWrG22.woff +0 -0
- package/out/web/assets/kanit-latin-ext-500-normal-EHs3suD6.woff2 +0 -0
- package/out/web/assets/kanit-latin-ext-600-normal-BBDzoLaj.woff +0 -0
- package/out/web/assets/kanit-latin-ext-600-normal-DAX3wtuq.woff2 +0 -0
- package/out/web/assets/kanit-thai-400-normal-D2nliXKa.woff +0 -0
- package/out/web/assets/kanit-thai-400-normal-D80Pglro.woff2 +0 -0
- package/out/web/assets/kanit-thai-500-normal-BB8gri04.woff2 +0 -0
- package/out/web/assets/kanit-thai-500-normal-Iy_w0a80.woff +0 -0
- package/out/web/assets/kanit-thai-600-normal-Bj6oiaDc.woff2 +0 -0
- package/out/web/assets/kanit-thai-600-normal-wbTlPO7I.woff +0 -0
- package/out/web/assets/kanit-vietnamese-400-normal-DRI8YWyb.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-400-normal-dow6Bnto.woff +0 -0
- package/out/web/assets/kanit-vietnamese-500-normal-BzTrpCM3.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-500-normal-T1ndT7MF.woff +0 -0
- package/out/web/assets/kanit-vietnamese-600-normal-Bi7fw3I4.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-600-normal-DXCRAa_8.woff +0 -0
- package/out/web/assets/mali-latin-400-normal-ByPcZ8Gx.woff +0 -0
- package/out/web/assets/mali-latin-400-normal-Cuc6Ykl8.woff2 +0 -0
- package/out/web/assets/mali-latin-500-normal-B01M-LP6.woff2 +0 -0
- package/out/web/assets/mali-latin-500-normal-Thgqw_9f.woff +0 -0
- package/out/web/assets/mali-latin-600-normal-B9TiUNpT.woff2 +0 -0
- package/out/web/assets/mali-latin-600-normal-CycpQCwU.woff +0 -0
- package/out/web/assets/mali-latin-ext-400-normal-DUVdJQO4.woff +0 -0
- package/out/web/assets/mali-latin-ext-400-normal-iCG1ALuJ.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-500-normal-BfJE4UMZ.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-500-normal-FoLEyOKS.woff +0 -0
- package/out/web/assets/mali-latin-ext-600-normal-BTvIfiCp.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-600-normal-DAQcLVmD.woff +0 -0
- package/out/web/assets/mali-thai-400-normal-BO7A3bLZ.woff2 +0 -0
- package/out/web/assets/mali-thai-400-normal-CX9VrjTn.woff +0 -0
- package/out/web/assets/mali-thai-500-normal-Cph2qha9.woff +0 -0
- package/out/web/assets/mali-thai-500-normal-D89rMT77.woff2 +0 -0
- package/out/web/assets/mali-thai-600-normal-DPgXT6rZ.woff +0 -0
- package/out/web/assets/mali-thai-600-normal-DlTx3OsB.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-400-normal-DUKxzXaz.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-400-normal-gFDLvsOK.woff +0 -0
- package/out/web/assets/mali-vietnamese-500-normal--OY07q2c.woff +0 -0
- package/out/web/assets/mali-vietnamese-500-normal-KDrNRwfW.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-600-normal-CtTMUU7T.woff +0 -0
- package/out/web/assets/mali-vietnamese-600-normal-DFlJr66u.woff2 +0 -0
- package/out/web/assets/mermaid.core-DYGGlqOf.js +0 -11
- package/out/web/assets/mitr-latin-400-normal-Cb18vPmZ.woff +0 -0
- package/out/web/assets/mitr-latin-400-normal-CwbkLQ4a.woff2 +0 -0
- package/out/web/assets/mitr-latin-500-normal-B4JOhzAi.woff +0 -0
- package/out/web/assets/mitr-latin-500-normal-BmClOow2.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-400-normal-B3CPG7Yo.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-400-normal-DTx65hiC.woff +0 -0
- package/out/web/assets/mitr-latin-ext-500-normal-B_Diajz1.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-500-normal-DYOsVaVT.woff +0 -0
- package/out/web/assets/mitr-thai-400-normal-CS4Do6aM.woff +0 -0
- package/out/web/assets/mitr-thai-400-normal-CXWaAdVj.woff2 +0 -0
- package/out/web/assets/mitr-thai-500-normal-CVdBrEVH.woff2 +0 -0
- package/out/web/assets/mitr-thai-500-normal-CW_B5D-i.woff +0 -0
- package/out/web/assets/mitr-vietnamese-400-normal-CPMGWyoC.woff2 +0 -0
- package/out/web/assets/mitr-vietnamese-400-normal-Z6XhIpdY.woff +0 -0
- package/out/web/assets/mitr-vietnamese-500-normal-CDrv0585.woff2 +0 -0
- package/out/web/assets/mitr-vietnamese-500-normal-CMQWyq-Z.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-400-normal-BaWBrqFP.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-400-normal-Dh_FJjOB.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-500-normal-BC04jsmm.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-500-normal-fyBKClF1.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-600-normal-CemcjnVR.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-600-normal-Dbc-dNO6.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-400-normal-B-1H0YkH.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-400-normal-nBP59pVw.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-500-normal-B-ZWb8SZ.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-500-normal-CrEHO7C8.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-600-normal-PkMZo0xa.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-600-normal-maHHBsez.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-400-normal-BEOmKAI1.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-400-normal-Dxb_unuU.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-500-normal-BOGXO2tw.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-500-normal-CU_X86GQ.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-600-normal-CmgB8_JK.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-600-normal-Cs73sVjl.woff2 +0 -0
- package/out/web/assets/oauthManager-DNiwM8Rn.js +0 -2
- package/out/web/assets/oauthManager-DuamS1Av.css +0 -1
- package/out/web/assets/outfit-latin-300-normal-AWLfuCom.woff +0 -0
- package/out/web/assets/outfit-latin-300-normal-CRYTwY6m.woff2 +0 -0
- package/out/web/assets/outfit-latin-400-normal-BGsTXAXT.woff2 +0 -0
- package/out/web/assets/outfit-latin-400-normal-DMwTpYkH.woff +0 -0
- package/out/web/assets/outfit-latin-500-normal-ClnHRwRh.woff +0 -0
- package/out/web/assets/outfit-latin-500-normal-DKnIMDSk.woff2 +0 -0
- package/out/web/assets/outfit-latin-600-normal-B7SfZ07L.woff2 +0 -0
- package/out/web/assets/outfit-latin-600-normal-BEfTtDA7.woff +0 -0
- package/out/web/assets/outfit-latin-ext-300-normal-BYS6Dpvq.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-300-normal-CMIMshEd.woff +0 -0
- package/out/web/assets/outfit-latin-ext-400-normal-5tcqmc2S.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-400-normal-DHm7mdGe.woff +0 -0
- package/out/web/assets/outfit-latin-ext-500-normal-DrCvqoFD.woff +0 -0
- package/out/web/assets/outfit-latin-ext-500-normal-zeox_O30.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-600-normal-B85nYjL1.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-600-normal-CWJcPgd7.woff +0 -0
- package/out/web/assets/preload-helper-D0uHx7FM.js +0 -1
- package/out/web/assets/prompt-latin-400-normal-BQ9zjSN8.woff2 +0 -0
- package/out/web/assets/prompt-latin-400-normal-CxU4ec_r.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-B1edBDQ9.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-CxzxEHZc.woff2 +0 -0
- package/out/web/assets/prompt-latin-600-normal-CSDDLorv.woff +0 -0
- package/out/web/assets/prompt-latin-600-normal-hKZWXsc1.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-400-normal-1pHbN9uy.woff +0 -0
- package/out/web/assets/prompt-latin-ext-400-normal-DdSafGZ9.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-500-normal--EZ1um7s.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-500-normal-D-lI1EVT.woff +0 -0
- package/out/web/assets/prompt-latin-ext-600-normal-C8b50x67.woff +0 -0
- package/out/web/assets/prompt-latin-ext-600-normal-Cg9L7iJU.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-BrkKv8cO.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-DJypnfr3.woff +0 -0
- package/out/web/assets/prompt-thai-500-normal-C18pDUoL.woff2 +0 -0
- package/out/web/assets/prompt-thai-500-normal-D7YNqUJD.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-CYPViXds.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-MrdfU7zR.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-400-normal-BCPzsgPT.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-400-normal-D4pLyeNK.woff +0 -0
- package/out/web/assets/prompt-vietnamese-500-normal-DmzxmPwa.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-500-normal-w_sS_j2F.woff +0 -0
- package/out/web/assets/prompt-vietnamese-600-normal-1dyohtNh.woff +0 -0
- package/out/web/assets/prompt-vietnamese-600-normal-7QWjJBsF.woff2 +0 -0
- package/out/web/assets/sarabun-latin-400-normal-DmguIS-7.woff +0 -0
- package/out/web/assets/sarabun-latin-400-normal-URPBxl-K.woff2 +0 -0
- package/out/web/assets/sarabun-latin-500-normal-BjUTcdxu.woff2 +0 -0
- package/out/web/assets/sarabun-latin-500-normal-CJexTAnl.woff +0 -0
- package/out/web/assets/sarabun-latin-600-normal-9FonlkKx.woff +0 -0
- package/out/web/assets/sarabun-latin-600-normal-DMD3TROr.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-400-normal-BbP7GpLL.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-400-normal-BsmTn0SS.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-500-normal-Cot16Bd2.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-500-normal-DE1LysqI.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-600-normal-0tXu9x_i.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-600-normal-BRxjKUQ6.woff2 +0 -0
- package/out/web/assets/sarabun-thai-400-normal-C2DaJlKK.woff2 +0 -0
- package/out/web/assets/sarabun-thai-400-normal-CH-UbWgg.woff +0 -0
- package/out/web/assets/sarabun-thai-500-normal-BVssjame.woff2 +0 -0
- package/out/web/assets/sarabun-thai-500-normal-C3iDLEzi.woff +0 -0
- package/out/web/assets/sarabun-thai-600-normal-3dIAQ-_s.woff2 +0 -0
- package/out/web/assets/sarabun-thai-600-normal-DWKeTe6a.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-400-normal-DPfkSCMy.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-400-normal-igdrzAGY.woff2 +0 -0
- package/out/web/assets/sarabun-vietnamese-500-normal-CpRVvGRU.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-500-normal-Dpe7Br9m.woff2 +0 -0
- package/out/web/assets/sarabun-vietnamese-600-normal-BMbOgAW-.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-600-normal-DkxrOlLB.woff2 +0 -0
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-s6P9g2_b.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-CV9fOLrV.js +0 -8
- package/out/web/assets/tauri-CNrHQ2Gb.js +0 -3
- package/out/web/assets/window-DkIhgI7B.js +0 -1
- package/skills-lock.json +0 -41
- package/src/renderer/public/Live2DCubismCore.js +0 -9
- package/src/renderer/src/companionWidget.ts +0 -95
- package/src/renderer/src/components/Live2DStage.tsx +0 -389
- package/src/renderer/src/components/ModelPanel.tsx +0 -154
- package/src/renderer/src/css/model.css +0 -627
- package/src/renderer/src-web/companionWidget.ts +0 -37
- package/src/renderer/src-web/components/ModelPanel.tsx +0 -12
- package/src/renderer/src-web/css/model.css +0 -628
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DYGGlqOf.js","assets/chunk-CacB07dV.js","assets/preload-helper-D0uHx7FM.js","assets/chunk-PWAF6VOD-BmjYLNbq.js","assets/src-DnfeXQPr.js","assets/chunk-Y2CYZVJY-C9o-s6OY.js","assets/chunk-DU6HZSFF-2tv5K1wT.js","assets/chunk-75Z2AOVW-TLXCoZYv.js","assets/dist-BoTOASLF.js","assets/chunk-GMAD6QVW-C-558kh_.js","assets/chunk-CKBBP62Z-nr1uKPj9.js","assets/chunk-JQ64N6SF-wJmeGKAw.js","assets/chunk-OBVCFTLP-BsRTPBqs.js","assets/chunk-TEH6E4GO-K2A8Vg2C.js","assets/chunk-P2QGCYS3-HZIiM7Ni.js","assets/rough.esm-DFbTUy8a.js","assets/chunk-R7TYR2AO-CaHIf-lK.js","assets/chunk-CLGD4ZFX-xjsKtNS7.js","assets/chunk-DSNCTWBM-Dtj8Rqsd.js","assets/graphlib-CTR5ZhLf.js","assets/chunk-LNGE3PJU-AdBoOWw2.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,n as t,r as n,t as r}from"./chunk-CacB07dV.js";import{$ as i,A as a,B as o,C as s,E as c,F as l,G as u,I as d,J as f,K as p,L as m,M as h,O as g,P as _,Q as v,R as y,S as b,T as x,U as S,V as C,W as w,Y as T,Z as E,b as D,ct as O,d as ee,dt as te,f as ne,g as k,h as re,i as ie,it as ae,j as oe,k as se,lt as ce,m as le,mt as ue,n as de,nt as fe,ot as pe,p as me,pt as he,q as ge,r as _e,rt as ve,st as ye,t as be,tt as xe,ut as Se,v as Ce,w as we,x as Te,z as Ee}from"./tauri-CNrHQ2Gb.js";import{n as De,t as Oe}from"./preload-helper-D0uHx7FM.js";import{a as A,i as ke,n as Ae,r as j,t as je}from"./index-DxZQr9yD.js";import{A as Me,B as Ne,C as Pe,D as Fe,E as Ie,F as Le,G as Re,H as ze,I as Be,J as Ve,L as He,M as Ue,N as We,O as Ge,P as Ke,Q as qe,R as Je,S as Ye,T as Xe,U as Ze,V as Qe,W as $e,X as et,Z as tt,_ as nt,a as rt,at as it,b as at,c as ot,d as st,et as ct,f as lt,g as ut,h as dt,i as ft,it as pt,j as mt,k as ht,l as gt,m as _t,n as vt,nt as yt,o as bt,ot as xt,p as St,q as Ct,r as wt,rt as Tt,s as Et,t as Dt,tt as Ot,u as kt,v as At,w as jt,x as Mt,y as Nt,z as Pt}from"./oauthManager-DNiwM8Rn.js";function Ft(e){return e.filter(e=>e.type===`Thought`).map(e=>e.data.thought).filter(Boolean)}function It(e,t=20){if(e.length===0)return e;let n=new Set(e.filter(e=>e.type!==`Thought`).slice(-t));return e.filter(e=>e.type===`Thought`||n.has(e))}function Lt(e){return e.some(e=>e.type===`ToolStart`||e.type===`ToolEnd`)}function Rt(e,t){let n={...e};for(let e of t){let t=String(e.id);e.agentActivity?.length&&!n[t]&&(n[t]=e.agentActivity)}return n}function zt(e){let t=new Map,n=null,r=(e,n,r,i,a)=>{let o=t.get(e);o?(o.additions+=r,o.deletions+=i,o.hunks.push(...a),n&&(o.created=!0)):t.set(e,{path:e,created:n,additions:r,deletions:i,hunks:[...a]})};for(let t of e||[])if(t.type===`ToolStart`)if(t.data.action===`apply_patch`){let e=t.data.input?.patch;if(e&&typeof e.path==`string`){let t=0,r=0,i=[],a=e.hunks,o=!1;if(Array.isArray(a)){o=a.length>0&&a.every(e=>!e?.oldText&&!!e?.newText);for(let e of a){let n=e?.oldText||``,a=e?.newText||``,o=n?n.split(`
|
|
3
|
-
`).length:0,s=a?a.split(`
|
|
4
|
-
`).length:0;r+=o,t+=s,i.push({oldText:n,newText:a})}}n={action:`apply_patch`,path:e.path,created:o&&r===0,additions:t,deletions:r,hunks:i}}}else if(t.data.action===`write_file`||t.data.action===`note_write`){let e=t.data.input||{},r=e.path||e.name||e.title||e.filePath||``;t.data.action===`note_write`&&r&&!r.includes(`/`)&&!r.startsWith(`.config/`)&&(r=`.config/mint/notes/${r}`);let i=e.fileContent??e.file_content??e.content??e.body??e.text??``;if(typeof r==`string`&&r.trim()){let e=i?i.split(`
|
|
5
|
-
`).length:0;n={action:t.data.action,path:r.trim(),created:!0,additions:e,deletions:0,hunks:[{oldText:``,newText:i}]}}}else n=null;else if(t.type===`ToolEnd`){if(n&&(t.data.action===`apply_patch`||t.data.action===`write_file`||t.data.action===`note_write`)&&!(typeof t.data.result==`string`&&(t.data.result.startsWith(`Error:`)||t.data.result.startsWith(`Failed:`))))try{let e=JSON.parse(t.data.result);if(Array.isArray(e)&&e.length>0)for(let t of e)r(t?.path||n.path,typeof t?.created==`boolean`?t.created:n.created,n.additions,n.deletions,n.hunks);else r(n.path,n.created,n.additions,n.deletions,n.hunks)}catch{r(n.path,n.created,n.additions,n.deletions,n.hunks)}n=null}return Array.from(t.values())}var Bt=t((()=>{}));function Vt(e,t){let n=e[t];return typeof n==`string`&&n.trim()?n:``}function Ht(e){return e.replace(/^\/home\/([^/]+)/,`~`)||`workspace`}function Ut(e,t){return[`search_code`,`semantic_search`,`knowledge_search`,`web_search`,`image_search`,`memory_recall`,`find_definition`,`find_references`].includes(e)?`search`:[`run_shell`,`verify`,`run_tests`,`run_typecheck`,`run_linter`].includes(e)?`terminal`:[`list_files`,`detect_project`].includes(e)?`folder`:[`read_file`,`symbols`,`read_diagnostics`,`git_diff`,`apply_patch`,`write_file`,`note_write`,`view_image`].includes(e)?`file`:[`calculation`,`calculator`].includes(e)?`calc`:t.includes(`/`)&&!/\.[^/]+$/.test(t)?`folder`:`tool`}function Wt(e,t){let n=Vt(t,`path`),r=Vt(t,`query`)||Vt(t,`q`)||Vt(t,`keyword`)||Vt(t,`search`)||Vt(t,`prompt`)||Vt(t,`searchTerm`)||Vt(t,`search_term`),i=Vt(t,`command`)||Vt(t,`cmd`),a=Vt(t,`name`),o=Vt(t,`tool`),s=Vt(t,`symbol`)||Vt(t,`ticker`),c=Vt(t,`filter`),l=Vt(t,`expression`)||Vt(t,`expr`)||Vt(t,`math`),u=Vt(t,`city`)||Vt(t,`location`)||Vt(t,`place`),d=Vt(t,`url`),f=Vt(t,`selector`),p=e===`web_search`||e===`search_code`||e===`knowledge_search`?r||`(empty query)`:e===`read_file`||e===`write_file`?n||`(empty path)`:e===`find_definition`||e===`find_references`?s||`(empty symbol)`:e===`run_tests`?c||`(all tests)`:e===`run_typecheck`||e===`run_linter`?n||`workspace`:e===`run_shell`?i||`(empty command)`:e===`calculation`?l||`(math expression)`:e===`weather`?u||`(location)`:e===`stock`?r||s||`(symbol)`:e===`browser_open`?d||`(url)`:e===`browser_click`?f||`(element)`:e.replaceAll(`_`,` `),m=n||r||i||l||s||u||d||f||c||a||o||p,h=m;if(e===`read_file`&&n){let e=typeof t.startLine==`number`?t.startLine:typeof t.start_line==`number`?t.start_line:void 0,n=typeof t.endLine==`number`?t.endLine:typeof t.end_line==`number`?t.end_line:void 0;e!==void 0&&n!==void 0?h=`${m} #L${e}-${n}`:e!==void 0&&(h=`${m} #L${e}`)}return{label:e,target:Ht(h),kind:Ut(e,h),state:`active`,action:e}}function Gt(e){let t=new Set,n=new Set;for(let r of e)r.kind===`file`&&t.add(r.target),r.kind===`folder`&&n.add(r.target);let r=[t.size?`${t.size} ${t.size===1?`file`:`files`}`:``,n.size?`${n.size} ${n.size===1?`folder`:`folders`}`:``].filter(Boolean);return r.length?`Exploring ${r.join(`, `)}`:`Working through task`}function Kt(e){if(e.length===0)return[];let t=[],n=null;for(let r=0;r<e.length;r++){let i=e[r],a=i.action||i.label;!n||n.action!==a?(n&&t.push(qt(n)),n={id:`group-${r}-${a}`,action:a,label:i.label,kind:i.kind,title:i.target,count:1,state:i.state,items:[i]}):(n.items.push(i),n.count+=1,i.state===`active`?n.state=`active`:i.state===`error`&&n.state!==`retry`&&n.state!==`done`?n.state=`error`:i.state===`retry`&&n.state!==`done`&&(n.state=`retry`))}return n&&t.push(qt(n)),t}function qt(e){let t=e.items.length;if(t===1)return e.title=e.items[0].target,e.state=e.items[0].state,e;let n=e.items.some(e=>e.state===`active`),r=e.items.some(e=>e.state===`done`),i=e.items.some(e=>e.state===`error`),a=e.items.some(e=>e.state===`retry`);e.state=n?`active`:r?`done`:a?`retry`:i?`error`:`done`;let o=e.action,s=e.items.filter(e=>e.state===`done`).length;return o===`calculation`?e.title=e.state===`active`?`Calculating expressions (${s}/${t})`:`Calculated ${t} expressions`:o===`read_file`?e.title=e.state===`active`?`Reading files (${s}/${t})`:`Read ${t} files`:o===`write_file`?e.title=e.state===`active`?`Writing files (${s}/${t})`:`Wrote ${t} files`:o===`search_code`||o===`semantic_search`?e.title=`Searched codebase (${t} queries)`:o===`web_search`?e.title=`Searched web (${t} queries)`:e.title=`Executed ${t} ${o.replaceAll(`_`,` `)} steps`,e}function Jt(e){let t=[];for(let n of e)if(n.type===`ToolStart`)t.push(Wt(n.data.action,n.data.input));else if(n.type===`ToolEnd`){for(let e=t.length-1;e>=0;--e)if(t[e].state===`active`){if(t[e].state=n.data.result.startsWith(`Error:`)?`error`:`done`,t[e].result=n.data.result,t[e].action===`ask_user`&&n.data.result.startsWith(`User answered:`)){let r=n.data.result.replace(`User answered:`,``).trim();t[e].target=`(Answered: "${r}") ${t[e].target}`}break}}let n=e.some(e=>e.type===`RunCompleted`&&(e.data?.summary?.outcome===`SUCCESS`||e.data?.summary?.outcome===`success`));for(let e=0;e<t.length;e++)t[e].state===`error`&&(t.slice(e+1).some(e=>e.state===`done`||e.state===`active`)||n)&&(t[e].state=`retry`);let r=t.slice(-25);return{summary:Gt(t),items:r,groups:Kt(r)}}function Yt(e){let t=[];for(let n of e){if(n.type!==`ToolEnd`||n.data.action!==`web_search`)continue;let e=n.data.result;if(!e||e.startsWith(`Web search error:`)||e===`No web search results found.`)continue;let r=e.split(/\n\n+/);for(let e of r){let n=e.split(`
|
|
6
|
-
`).map(e=>e.trim()).filter(Boolean),r=n.find(e=>/^\d+\.\s/.test(e)),i=n.find(e=>e.startsWith(`URL:`)),a=n.find(e=>e.startsWith(`Image:`));if(!r||!i)continue;let o=r.replace(/^\d+\.\s/,``).trim(),s=i.replace(/^URL:\s*/,``).trim(),c=a?a.replace(/^Image:\s*/,``).trim():void 0,l=n.filter(e=>e!==r&&e!==i&&e!==a).join(` `).trim();try{let{hostname:e}=new URL(s),n=e.replace(/^www\./,``),r=`https://www.google.com/s2/favicons?sz=32&domain=${e}`;t.push({title:o,url:s,snippet:l,domain:n,faviconUrl:r,imageUrl:c})}catch{}}}return t}var Xt=t((()=>{})),Zt,Qt=t((()=>{Zt=JSON.parse(`[{"token":"/help","usage":"","description":"Show this help","category":"system","surfaces":["cli","web","desktop"]},{"token":"/init","usage":"","description":"Scan the codebase and write an AGENTS.md (build/test commands, architecture, conventions)","category":"system","surfaces":["cli","web","desktop"]},{"token":"/fast","usage":"[on|off]","description":"Toggle fast mode (hide thinking traces)","category":"system","surfaces":["cli","web","desktop"]},{"token":"/plan","usage":"[<task>|on|off|list|show <name>]","description":"Run task in plan mode, toggle plan mode, or list/show plans saved under .agents/plans/","category":"system","surfaces":["cli","web","desktop"]},{"token":"/models","usage":"[name]","description":"List providers or switch provider","category":"models","surfaces":["cli","web","desktop"]},{"token":"/temperature","usage":"[<provider> [model] [temp]|<temp>|default|status]","description":"Interactive temperature picker or set/inspect per-model temperatures","category":"models","surfaces":["cli","web","desktop"]},{"token":"/clear","usage":"","description":"Clear conversation history","category":"system","surfaces":["cli","web","desktop"]},{"token":"/cd","usage":"<path>","description":"Change workspace directory","category":"workspace","surfaces":["cli","web","desktop"]},{"token":"/image","usage":"<path> [prompt]","description":"Attach image from file","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/edit-image","usage":"<prompt>","description":"Edit attached image with prompt instruction","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/paste","usage":"[prompt]","description":"Attach image from clipboard","category":"tools","surfaces":["cli","web","desktop"]},{"token":"Ctrl+V","usage":"","description":"Paste clipboard image as [Image #1]","surfaces":["cli"]},{"token":"↑ / ↓","usage":"","description":"Recall previously submitted input","surfaces":["cli"]},{"token":"/learn","usage":"<path>","description":"Import a persistent .md or .txt skill","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/skill","usage":"[list]","description":"List skills (global/workspace/taught) — see also /skill add","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/skill add","usage":"<path|github-repo|url>","description":"Install a local skill, or pull one via \`npx skills\` (GitHub repo/URL)","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/plugins","usage":"[name] [prompt]","description":"List configured plugins, or generate a skill.md for one","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/plugin enable","usage":"<name>","description":"Enable a native plugin for the agent","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/plugin disable","usage":"<name>","description":"Disable a native plugin","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/remember","usage":"[here] <text>","description":"Save a durable fact to long-term memory (\\"here\\" = this project only)","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/memory","usage":"","description":"Manage long-term memory store","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/memory list","usage":"","description":"Show recent interactions","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/memory facts","usage":"","description":"List stored long-term facts","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/memory forget","usage":"<id-or-text>","description":"Delete stored fact(s) by id or matching text","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/memory promote","usage":"<id>","description":"Lift a subagent-scoped fact into shared long-term memory","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/memory clear","usage":"","description":"Clear all interactions","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/memory get","usage":"<key>","description":"Read a profile value","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/memory set","usage":"<key> <val>","description":"Store a profile value","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/autoskill","usage":"[on|off]","description":"Toggle auto-writing a SKILL.md after hard tasks","category":"system","surfaces":["cli","web","desktop"]},{"token":"/autorecall","usage":"[on|off]","description":"Toggle full-text recall of older messages from this conversation","category":"system","surfaces":["cli","web","desktop"]},{"token":"/autofacts","usage":"[on|off]","description":"Toggle auto-extracting durable facts from your messages into long-term memory","category":"system","surfaces":["cli","web","desktop"]},{"token":"/factrecall","usage":"[on|off]","description":"Toggle relevance-ranking stored facts against your message when they overflow the budget","category":"system","surfaces":["cli","web","desktop"]},{"token":"/cron","usage":"","description":"Create/list/remove/enable/disable scheduled agent tasks","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/cron add","usage":"<name> | <sched> | <task>","description":"Create a scheduled task — walks through a wizard if you don't type more","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/link","usage":"","description":"Link a folder chat can auto-write notes into","category":"workspace","surfaces":["cli","web","desktop"]},{"token":"/link add","usage":"<name> | <path> | <desc>","description":"Link a folder chat can auto-write notes into","category":"workspace","surfaces":["cli","web","desktop"]},{"token":"/image-provider","usage":"[name]","description":"List image gen providers or switch default provider","category":"models","surfaces":["cli","web","desktop"]},{"token":"/image-models","usage":"[model]","description":"List or switch default image generation model","category":"models","surfaces":["cli","web","desktop"]},{"token":"/generate-image","usage":"<prompt>","description":"Generate image using AI model","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/gen-image","usage":"<prompt>","description":"Generate image using AI model","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/veo","usage":"<prompt>","description":"Generate video using Google Veo","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/video-provider","usage":"[name]","description":"List video gen providers or switch default provider","category":"models","surfaces":["cli","web","desktop"]},{"token":"/video-models","usage":"[model]","description":"List or switch default video generation model","category":"models","surfaces":["cli","web","desktop"]},{"token":"/search-provider","usage":"[name]","description":"List web search providers or switch default provider","category":"models","surfaces":["cli","web","desktop"]},{"token":"/bg","usage":"<query>","description":"Run a query in the background, non-blocking","category":"tools","surfaces":["cli"]},{"token":"/jobs","usage":"[show|cancel <id>]","description":"List, inspect, or cancel background jobs","category":"tools","surfaces":["cli"]},{"token":"/shells","usage":"","description":"List, inspect, or kill background shell jobs run_shell started","category":"tools","surfaces":["cli"]},{"token":"/mcp","usage":"","description":"List configured MCP servers","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp add","usage":"<name> <command> [args...]","description":"Add an MCP server","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp remove","usage":"<name>","description":"Remove an MCP server","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp enable","usage":"<name>","description":"Re-enable a disabled MCP server","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp disable","usage":"<name>","description":"Turn an MCP server off without removing it","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp edit","usage":"<name> command|args|icon <value>","description":"Change one field of a configured MCP server","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp allow","usage":"<server> <tool>","description":"Allow an MCP tool","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp disallow","usage":"<server> <tool>","description":"Remove a tool from a server's allowlist (* clears it)","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp reauth","usage":"<server>","description":"Re-run a server's OAuth login (e.g. expired token)","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp registry","usage":"","description":"Show the catalog of well-known MCP servers","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/mcp clear","usage":"","description":"Remove all configured MCP servers","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/subagent","usage":"","description":"List/create/remove subagents the agent can delegate to","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/subagent add","usage":"","description":"Create a subagent — walks through a wizard","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/release-notes","usage":"","description":"Show release notes for the current version","category":"system","surfaces":["cli","web","desktop"]},{"token":"/stats","usage":"","description":"Show session statistics","category":"system","surfaces":["cli","web","desktop"]},{"token":"/exit","usage":"","description":"Exit Mint","category":"system","surfaces":["cli"]},{"token":"/code","usage":"<task>","description":"Run in code-agent mode","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/n8n","usage":"[task]","description":"Open n8n in your browser, or trigger a workflow via the n8n MCP server","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/notebook","usage":"[task]","description":"Open SurfSense in your browser, or run a task via the surfsense MCP server","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/multi-agent","usage":"[on|off]","description":"Show or toggle Multi-Agent Collaboration system","category":"system","surfaces":["cli","web","desktop"]},{"token":"/avatar","usage":"[web|desktop|status|off]","description":"Connect agent activity to Project Avatar (real-time 3D avatar)","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/rewind","usage":"[step]","description":"Rewind workspace to a previous git checkpoint snapshot","category":"tools","surfaces":["cli","web","desktop"]},{"token":"/palette","usage":"","description":"Open interactive command palette and action menu","category":"system","surfaces":["cli","web","desktop"]}]`)})),$t,en=t((()=>{Qt(),$t=Zt.filter(e=>e.surfaces.some(e=>e===`web`||e===`desktop`)).map(e=>({command:e.token,description:e.description,usage:e.usage||void 0,category:e.category}))})),tn,nn,rn,an,on,sn,cn=t((()=>{tn=e(A()),en(),h(),nn=j(),rn=[`system`,`models`,`workspace`,`tools`],an={system:`System`,models:`Models`,workspace:`Workspace`,tools:`Tools`},on=[{label:`@workspace`,desc:`Include workspace path & context`,kind:`context`},{label:`@file`,desc:`Reference workspace file`,kind:`context`},{label:`@docs`,desc:`Include documentation context`,kind:`context`},{label:`@memory`,desc:`Include long-term memory store`,kind:`context`}],sn=(0,tn.forwardRef)(function({message:e,onComplete:t,workspacePath:n,mcpServers:r,anchorRef:i,suppressed:a=!1},o){let[s,c]=(0,tn.useState)([]),[l,u]=(0,tn.useState)(0),[d,f]=(0,tn.useState)(null),p=(0,tn.useRef)(null),m=(0,tn.useRef)(null),h=e.replace(/^\s+/,``),g=h.startsWith(`/`)?`slash`:h.startsWith(`$`)?`skill`:/@[\w\-./]*$/.test(e)?`at`:null;(0,tn.useEffect)(()=>{if(g!==`skill`)return;let e=!0;return y(n).then(t=>{e&&Array.isArray(t)&&c(t)}).catch(()=>{}),()=>{e=!1}},[g,n]);let _=(0,tn.useMemo)(()=>{if(g!==`slash`)return[];let e=h.toLowerCase(),t=$t.filter(t=>t.command.toLowerCase().startsWith(e));return rn.flatMap(e=>t.filter(t=>(t.category??`tools`)===e))},[g,h]),v=(0,tn.useMemo)(()=>{if(g!==`slash`)return;let e=h.toLowerCase();return[...$t].sort((e,t)=>t.command.length-e.command.length).find(t=>e===t.command.toLowerCase()||e.startsWith(t.command.toLowerCase()+` `))},[g,h]),b=(0,tn.useMemo)(()=>{if(g!==`skill`)return[];let e=h.slice(1).split(/\s+/)[0].toLowerCase();return s.filter(t=>t.name.toLowerCase().startsWith(e))},[g,h,s]),x=(0,tn.useMemo)(()=>{if(g!==`at`)return[];let t=(e.match(/@([\w\-./]*)$/)?.[1]??``).toLowerCase();return[...Object.entries(r??{}).filter(([,e])=>e?.disabled!==!0).map(([e])=>({label:`@${e}`,desc:`Restrict this message to this MCP server / plugin`,kind:`plugin`})),...on].filter(e=>e.label.toLowerCase().includes(t))},[g,e,r]),S=g===`slash`?_:g===`skill`?b:g===`at`?x:[],C=g===`slash`&&S.length===0&&h.trim().length>1,w=!a&&g!==null&&d!==e&&(S.length>0||C);(0,tn.useEffect)(()=>{u(0)},[e]),(0,tn.useEffect)(()=>{!w||!m.current||m.current.querySelector(`[data-idx="${l}"]`)?.scrollIntoView({block:`nearest`})},[l,w]),(0,tn.useEffect)(()=>{if(!w)return;let t=t=>{let n=t.target;p.current?.contains(n)||i.current?.contains(n)||f(e)};return document.addEventListener(`mousedown`,t),()=>document.removeEventListener(`mousedown`,t)},[w,e,i]);let T=t=>g===`slash`?`${t.command} `:g===`skill`?`$${t.name} `:e.replace(/@[\w\-./]*$/,`${t.label} `),E=e=>{let n=T(e);f(n),u(0),t(n)};if((0,tn.useImperativeHandle)(o,()=>({handleKeyDown(t){if(a||g===null)return!1;let n=(t.key===`ArrowUp`||t.key===`ArrowDown`)&&!t.shiftKey&&!t.altKey&&!t.metaKey&&!t.ctrlKey&&!t.nativeEvent.isComposing;if(n&&!w&&S.length>0)return f(null),u(t.key===`ArrowDown`?0:S.length-1),t.preventDefault(),!0;if(!w)return!1;if(n&&S.length>0)return u(e=>t.key===`ArrowDown`?(e+1)%S.length:(e-1+S.length)%S.length),t.preventDefault(),!0;if((t.key===`Enter`||t.key===`Tab`)&&!t.shiftKey&&!t.nativeEvent.isComposing){let e=S[l]??S[0];return e?(E(e),t.preventDefault(),!0):!1}return t.key===`Escape`?(f(e),t.preventDefault(),!0):!1}})),!w)return null;let D=S.length===0?`No matches`:g===`slash`?`${S.length} command${S.length===1?``:`s`}`:g===`skill`?`${S.length} skill${S.length===1?``:`s`}`:`${S.length} mention${S.length===1?``:`s`}`,O=(e,t,n,r,i,a)=>(0,nn.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t===l,"data-idx":t,className:`slash-suggestion-item ${t===l?`active`:``}`,onMouseDown:t=>{t.preventDefault(),E(e)},onPointerMove:()=>u(t),children:[(0,nn.jsx)(`span`,{className:`slash-cmd-name`,children:n}),i&&(0,nn.jsx)(`span`,{className:`skill-badge`,children:i}),(0,nn.jsxs)(`span`,{className:`slash-cmd-body`,children:[(0,nn.jsx)(`span`,{className:`slash-cmd-desc`,children:r}),a&&(0,nn.jsx)(`span`,{className:`slash-cmd-usage`,children:a})]})]},n);return(0,nn.jsxs)(`div`,{className:`slash-suggestions-popup`,ref:p,children:[(0,nn.jsxs)(`div`,{className:`slash-suggestions-header`,children:[g===`slash`?`Slash Commands`:g===`skill`?`Learned Skills`:`Context Mentions`,(0,nn.jsx)(`span`,{className:`slash-suggestions-count`,children:D})]}),(0,nn.jsxs)(`div`,{className:`slash-suggestions-list`,ref:m,role:`listbox`,children:[g===`slash`&&(S.length>0?rn.map(e=>{let t=_.filter(t=>(t.category??`tools`)===e);return t.length?(0,nn.jsxs)(`div`,{className:`slash-suggestions-group`,children:[(0,nn.jsx)(`div`,{className:`slash-suggestions-group-label`,children:an[e]}),t.map(e=>O(e,_.indexOf(e),e.command,e.description,void 0,e.usage))]},e):null}):(0,nn.jsx)(`div`,{className:`slash-suggestions-empty`,children:v?(0,nn.jsxs)(nn.Fragment,{children:[(0,nn.jsx)(`span`,{className:`slash-cmd-name`,children:v.command}),(0,nn.jsx)(`span`,{className:`slash-cmd-usage`,children:v.usage||`No further arguments`})]}):(0,nn.jsxs)(`span`,{children:[`No command matches `,(0,nn.jsx)(`code`,{children:h.trim()})]})})),g===`skill`&&b.map((e,t)=>O(e,t,`$${e.name}`,e.description||e.content?.slice(0,60)||``,`[Skill]`)),g===`at`&&x.map((e,t)=>O(e,t,e.label,e.desc,e.kind===`plugin`?`[Plugin]`:`[Context]`))]})]})})}));function ln(e){if(!e)return``;let t=0,n=0,r=e.split(`
|
|
7
|
-
`);for(let e of r)e.startsWith(`+++ `)||e.startsWith(`--- `)||(e.startsWith(`+`)?t++:e.startsWith(`-`)&&n++);return`(+${t} -${n})`}function un(e){if(!e)return{title:`Action Pending Approval`,body:`No action details available.`,isDangerous:!1};if(e.WriteFile){let t=ln(e.WriteFile.diff);return{title:`Write File`,body:`Path: ${e.WriteFile.path}${t?` ${t}`:``}`,reason:e.WriteFile.diff?`Diff:\n${e.WriteFile.diff}`:`Writing new file content.`,isDangerous:!1}}if(e.ApplyPatch){let t=ln(e.ApplyPatch.diff);return{title:`Apply Patch`,body:`Path: ${e.ApplyPatch.path}${t?` ${t}`:``}`,reason:e.ApplyPatch.diff?`Diff:\n${e.ApplyPatch.diff}`:`Applying code patch.`,isDangerous:!1}}if(e.RunShell)return{title:`Run Shell Command`,body:e.RunShell.command,reason:`Executing shell commands can modify your system.`,isDangerous:!0};if(e.NoteWrite)return{title:`Write Note`,body:`Path: ${e.NoteWrite.path}`,reason:`Creating or updating workspace notes.`,isDangerous:!1};if(e.RunPlugin)return{title:`Run Plugin: ${e.RunPlugin.name}`,body:e.RunPlugin.instruction,reason:`Executing a native plugin action.`,isDangerous:!1};if(e.McpTool){let{server:t,tool:n,arguments:r}=e.McpTool;return{title:`Run MCP Tool: ${t}/${n}`,body:typeof r==`string`?r:JSON.stringify(r,null,2),reason:`Running external MCP tool.`,isDangerous:!1}}if(e.UserApproval)return{title:e.UserApproval.title,body:e.UserApproval.prompt,reason:`The agent requested explicit approval.`,isDangerous:!1};if(e.AskUser){let t=Array.isArray(e.AskUser.options)&&e.AskUser.options.length>0,n=e.AskUser.multiSelect?`Pick one or more choices below, or type your own answer and submit.`:`Pick a choice below, or type your own answer and submit.`;return{title:`Question From Agent`,body:e.AskUser.question,reason:t?n:`Type your answer below and submit to respond to the agent.`,isDangerous:!1}}return e.ExitPlanMode?{title:`Review Plan`,body:e.ExitPlanMode.plan,reason:`Approve to allow file edits and shell commands. Reject to keep the agent investigating.`,isDangerous:!1}:{title:`Unknown Action`,body:JSON.stringify(e,null,2),reason:`Requires approval to proceed.`,isDangerous:!1}}function dn(e){let t=e.trim();if(!t.startsWith(`@@`))return null;let n=t.split(`@@`);if(n.length<3)return null;let r=n[1].trim(),i=1,a=1;for(let e of r.split(/\s+/))if(e.startsWith(`-`)){let t=e.slice(1).split(`,`)[0],n=parseInt(t,10);isNaN(n)||(i=n)}else if(e.startsWith(`+`)){let t=e.slice(1).split(`,`)[0],n=parseInt(t,10);isNaN(n)||(a=n)}return{oldStart:i,newStart:a}}function fn(e){if(!e)return null;let t=e.split(`
|
|
8
|
-
`),n=1,r=1;return(0,pn.jsx)(`div`,{style:{background:`var(--input-bg, #0a0a0b)`,borderRadius:`var(--radius-sm, 6px)`,padding:`8px`,border:`1px solid var(--border)`,overflowX:`auto`,maxHeight:`400px`,fontFamily:`'Fira Code', 'Courier New', Courier, monospace`,fontSize:`0.74rem`,lineHeight:`1.45`},children:t.map((e,t)=>{if(e.startsWith(`@@`)){let i=dn(e);return i&&(n=i.oldStart,r=i.newStart),(0,pn.jsx)(`div`,{style:{color:`var(--text-muted)`,fontWeight:`bold`,padding:`2px 6px`},children:` `+e},t)}if(e.startsWith(`---`)||e.startsWith(`+++`))return(0,pn.jsx)(`div`,{style:{color:`var(--text-muted)`,fontWeight:`bold`,padding:`2px 6px`},children:` `+e},t);let i=``,a={whiteSpace:`pre-wrap`,padding:`2px 6px`,display:`flex`,alignItems:`center`},o=``,s=``,c=e;return e.startsWith(`+`)?(i=String(r),r++,a={...a,background:`color-mix(in srgb, var(--accent) 10%, transparent)`,borderLeft:`3px solid var(--accent)`,color:`var(--text-chat, var(--text-main))`},o=`+`,s=`var(--accent)`,c=e.slice(1)):e.startsWith(`-`)?(i=String(n),n++,a={...a,background:`color-mix(in srgb, var(--status-error, #ef4444) 10%, transparent)`,borderLeft:`3px solid var(--status-error, #ef4444)`,color:`var(--text-chat, var(--text-main))`},o=`-`,s=`var(--status-error, #ef4444)`,c=e.slice(1)):(i=String(r),n++,r++,a={...a,color:`var(--text-chat, var(--text-main))`}),(0,pn.jsxs)(`div`,{style:a,children:[(0,pn.jsx)(`span`,{style:{color:`var(--text-muted)`,marginRight:`12px`,userSelect:`none`,display:`inline-block`,width:`36px`,textAlign:`right`,flexShrink:0},children:i}),o&&(0,pn.jsx)(`span`,{style:{color:s,marginRight:`4px`,userSelect:`none`,fontWeight:600},children:o}),(0,pn.jsx)(`span`,{children:c})]},t)})})}var pn,mn=t((()=>{A(),pn=j()})),hn=t((()=>{mn()}));function gn(e){let t=e.trim();if(!t.startsWith(`@@`))return null;let n=t.split(`@@`);if(n.length<3)return null;let r=n[1].trim(),i=1,a=1;for(let e of r.split(/\s+/))if(e.startsWith(`-`)){let t=e.slice(1).split(`,`)[0],n=parseInt(t,10);isNaN(n)||(i=n)}else if(e.startsWith(`+`)){let t=e.slice(1).split(`,`)[0],n=parseInt(t,10);isNaN(n)||(a=n)}return{oldStart:i,newStart:a}}function _n(e){let t=e.split(`
|
|
9
|
-
`),n=[],r=[],i=0,a=0,o=1,s=1,c=[],l=[],u=()=>{let e=Math.max(c.length,l.length);for(let t=0;t<e;t++){let e=c[t],n=l[t];r.push({type:`line`,left:e?{lineNum:e.lineNum,content:e.content,isDel:!0}:void 0,right:n?{lineNum:n.lineNum,content:n.content,isAdd:!0}:void 0})}c=[],l=[]};for(let e of t){if(e.startsWith(`@@`)){u();let t=gn(e);t&&(o=t.oldStart,s=t.newStart),n.push({type:`hunk`,content:e}),r.push({type:`hunk`,hunkHeader:e});continue}if(e.startsWith(`---`)||e.startsWith(`+++`)){u(),n.push({type:`meta`,content:e});continue}if(e.startsWith(`+`)){i++;let t=e.slice(1);n.push({type:`add`,newNum:s,content:t}),l.push({lineNum:s,content:t}),s++}else if(e.startsWith(`-`)){a++;let t=e.slice(1);n.push({type:`del`,oldNum:o,content:t}),c.push({lineNum:o,content:t}),o++}else{u();let t=e.startsWith(` `)?e.slice(1):e;n.push({type:`normal`,oldNum:o,newNum:s,content:t}),r.push({type:`line`,left:{lineNum:o,content:t,isDel:!1},right:{lineNum:s,content:t,isAdd:!1}}),o++,s++}}return u(),{unifiedLines:n,splitRows:r,additions:i,deletions:a}}var vn,M,yn,bn=t((()=>{vn=e(A()),Ze(),M=j(),yn=({isOpen:e,onClose:t,filePath:n,diffText:r,onApprove:i,onReject:a,isDangerous:o})=>{let[s,c]=(0,vn.useState)(`split`),[l,u]=(0,vn.useState)(!1),{unifiedLines:d,splitRows:f,additions:p,deletions:m}=(0,vn.useMemo)(()=>_n(r||``),[r]);return(0,vn.useEffect)(()=>{if(!e)return;let n=e=>{e.key===`Escape`?t():e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&i()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,i]),e?(0,M.jsx)(`div`,{className:`management-modal-overlay`,onClick:t,style:{zIndex:10001},children:(0,M.jsxs)(`div`,{className:`management-modal diff-review-modal`,onClick:e=>e.stopPropagation(),style:{maxWidth:`92vw`,width:`1100px`,maxHeight:`90vh`,display:`flex`,flexDirection:`column`},children:[(0,M.jsxs)(`div`,{className:`management-modal-header`,style:{padding:`16px 20px`,gap:12},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,minWidth:0,flex:1},children:[(0,M.jsx)(`div`,{className:`management-card-icon`,style:{width:34,height:34,fontSize:`0.72rem`,fontWeight:700,flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`color-mix(in srgb, var(--accent) 15%, transparent)`,color:`var(--accent)`,borderRadius:`6px`},children:`DIFF`}),(0,M.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,M.jsx)(`h3`,{className:`management-card-title`,style:{fontSize:`1rem`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},title:n,children:n}),(0,M.jsx)(`button`,{type:`button`,onClick:()=>{navigator?.clipboard?.writeText&&(navigator.clipboard.writeText(n),u(!0),setTimeout(()=>u(!1),2e3))},className:`management-action-btn`,style:{padding:`2px 6px`,fontSize:`0.72rem`},title:`Copy file path`,children:l?`Copied`:`Copy`})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginTop:3},children:[(0,M.jsxs)(`span`,{style:{fontSize:`0.75rem`,fontWeight:700,color:`var(--accent)`,background:`color-mix(in srgb, var(--accent) 15%, transparent)`,padding:`1px 6px`,borderRadius:`4px`},children:[`+`,p]}),(0,M.jsxs)(`span`,{style:{fontSize:`0.75rem`,fontWeight:700,color:`var(--status-error, #f87171)`,background:`var(--hover-delete-bg, rgba(239, 68, 68, 0.15))`,padding:`1px 6px`,borderRadius:`4px`},children:[`-`,m]}),o&&(0,M.jsx)(`span`,{style:{fontSize:`0.72rem`,fontWeight:700,color:`#fbbf24`,background:`rgba(245, 158, 11, 0.15)`,padding:`1px 6px`,borderRadius:`4px`,textTransform:`uppercase`},children:`Review carefully`})]})]})]}),(0,M.jsxs)(`div`,{className:`management-filter-pills`,style:{display:`flex`,gap:2,padding:3,flexShrink:0},children:[(0,M.jsx)(`button`,{type:`button`,className:`management-pill-btn ${s===`split`?`active`:``}`,onClick:()=>c(`split`),style:{padding:`5px 10px`,fontSize:`0.78rem`},children:`Side-by-Side`}),(0,M.jsx)(`button`,{type:`button`,className:`management-pill-btn ${s===`unified`?`active`:``}`,onClick:()=>c(`unified`),style:{padding:`5px 10px`,fontSize:`0.78rem`},children:`Unified`})]}),(0,M.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:t,title:`Close`,children:(0,M.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,M.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,M.jsx)(`div`,{className:`management-modal-body`,style:{padding:0,overflowY:`auto`,flex:1,background:`#090d16`,fontFamily:`Consolas, Monaco, "JetBrains Mono", monospace`,fontSize:`0.8rem`,lineHeight:1.5},children:s===`split`?(0,M.jsxs)(`div`,{className:`diff-split-container`,style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,minWidth:`700px`},children:[(0,M.jsx)(`div`,{style:{position:`sticky`,top:0,zIndex:2,background:`#0e1526`,padding:`6px 12px`,borderBottom:`1px solid rgba(255,255,255,0.08)`,borderRight:`1px solid rgba(255,255,255,0.08)`,color:`#94a3b8`,fontWeight:600,fontSize:`0.75rem`},children:`Original (Before)`}),(0,M.jsx)(`div`,{style:{position:`sticky`,top:0,zIndex:2,background:`#0e1526`,padding:`6px 12px`,borderBottom:`1px solid rgba(255,255,255,0.08)`,color:`#94a3b8`,fontWeight:600,fontSize:`0.75rem`},children:`Proposed (After)`}),f.map((e,t)=>{if(e.type===`hunk`)return(0,M.jsx)(`div`,{style:{gridColumn:`1 / -1`,background:`rgba(56, 189, 248, 0.08)`,color:`#38bdf8`,padding:`4px 12px`,fontSize:`0.72rem`,fontWeight:600,borderTop:`1px solid rgba(56, 189, 248, 0.2)`,borderBottom:`1px solid rgba(56, 189, 248, 0.2)`},children:e.hunkHeader},t);let n=e.left,r=e.right;return(0,M.jsxs)(vn.Fragment,{children:[(0,M.jsxs)(`div`,{style:{display:`flex`,borderRight:`1px solid var(--border)`,background:n?.isDel?`color-mix(in srgb, var(--status-error, #ef4444) 14%, transparent)`:`transparent`,borderLeft:n?.isDel?`3px solid var(--status-error, #ef4444)`:`3px solid transparent`,minHeight:`22px`},children:[(0,M.jsx)(`span`,{style:{width:`44px`,textAlign:`right`,paddingRight:`10px`,color:n?.isDel?`var(--status-error, #f87171)`:`var(--text-muted)`,userSelect:`none`,flexShrink:0},children:n?n.lineNum:``}),(0,M.jsx)(`span`,{style:{whiteSpace:`pre-wrap`,wordBreak:`break-all`,paddingRight:`8px`,color:n?.isDel?`var(--hover-delete, #fca5a5)`:`var(--text-chat, var(--text-main))`},children:n?n.content:``})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,background:r?.isAdd?`color-mix(in srgb, var(--accent) 14%, transparent)`:`transparent`,borderLeft:r?.isAdd?`3px solid var(--accent)`:`3px solid transparent`,minHeight:`22px`},children:[(0,M.jsx)(`span`,{style:{width:`44px`,textAlign:`right`,paddingRight:`10px`,color:r?.isAdd?`var(--accent)`:`var(--text-muted)`,userSelect:`none`,flexShrink:0},children:r?r.lineNum:``}),(0,M.jsx)(`span`,{style:{whiteSpace:`pre-wrap`,wordBreak:`break-all`,paddingRight:`8px`,color:r?.isAdd?`var(--accent-hover, var(--accent))`:`var(--text-chat, var(--text-main))`},children:r?r.content:``})]})]},t)})]}):(0,M.jsx)(`div`,{style:{minWidth:`500px`},children:d.map((e,t)=>{if(e.type===`hunk`)return(0,M.jsx)(`div`,{style:{background:`rgba(56, 189, 248, 0.08)`,color:`#38bdf8`,padding:`4px 12px`,fontSize:`0.72rem`,fontWeight:600,borderTop:`1px solid rgba(56, 189, 248, 0.2)`,borderBottom:`1px solid rgba(56, 189, 248, 0.2)`},children:e.content},t);if(e.type===`meta`)return(0,M.jsx)(`div`,{style:{color:`#64748b`,padding:`2px 12px`,fontWeight:600},children:e.content},t);let n=`transparent`,r=`3px solid transparent`,i=`var(--text-chat, var(--text-main))`,a=` `;return e.type===`add`?(n=`color-mix(in srgb, var(--accent) 14%, transparent)`,r=`3px solid var(--accent)`,i=`var(--text-chat, var(--text-main))`,a=`+`):e.type===`del`&&(n=`color-mix(in srgb, var(--status-error, #ef4444) 14%, transparent)`,r=`3px solid var(--status-error, #ef4444)`,i=`var(--text-chat, var(--text-main))`,a=`-`),(0,M.jsxs)(`div`,{style:{display:`flex`,background:n,borderLeft:r,padding:`1px 0`},children:[(0,M.jsx)(`span`,{style:{width:`42px`,textAlign:`right`,color:`var(--text-muted)`,paddingRight:`8px`,userSelect:`none`,flexShrink:0},children:e.oldNum||``}),(0,M.jsx)(`span`,{style:{width:`42px`,textAlign:`right`,color:`var(--text-muted)`,paddingRight:`8px`,userSelect:`none`,flexShrink:0},children:e.newNum||``}),(0,M.jsx)(`span`,{style:{width:`16px`,color:e.type===`add`?`var(--accent)`:e.type===`del`?`var(--status-error, #f87171)`:`var(--text-muted)`,userSelect:`none`},children:a}),(0,M.jsx)(`span`,{style:{whiteSpace:`pre-wrap`,wordBreak:`break-all`,color:i},children:e.content})]},t)})})}),(0,M.jsxs)(`div`,{className:`management-modal-footer`,style:{padding:`14px 20px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,M.jsxs)(`div`,{style:{fontSize:`0.8rem`,color:`var(--text-muted, #94a3b8)`},children:[(0,M.jsx)(`span`,{children:`Shortcut: `}),(0,M.jsx)(`kbd`,{style:{background:`rgba(255,255,255,0.1)`,padding:`2px 5px`,borderRadius:4,fontSize:`0.72rem`},children:`Esc`}),` Cancel`,(0,M.jsx)(`span`,{style:{margin:`0 8px`},children:`•`}),(0,M.jsx)(`kbd`,{style:{background:`rgba(255,255,255,0.1)`,padding:`2px 5px`,borderRadius:4,fontSize:`0.72rem`},children:`Cmd/Ctrl+Enter`}),` Approve`]}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:10},children:[(0,M.jsx)(`button`,{type:`button`,className:`management-action-btn danger`,onClick:a,style:{padding:`8px 16px`,fontSize:`0.88rem`},children:`Reject Change`}),(0,M.jsx)(`button`,{type:`button`,className:`management-primary-btn`,onClick:i,style:{padding:`8px 20px`,fontSize:`0.88rem`},children:`Approve & Apply`})]})]})]})}):null}}));function xn({pendingApproval:e,onApproval:t}){let[n,r]=(0,Sn.useState)(``),[i,a]=(0,Sn.useState)(new Set),[o,s]=(0,Sn.useState)(!1),c=un(e.approval),l=e.approval?.WriteFile,u=e.approval?.ApplyPatch,d=e.approval?.RunShell,f=l?.path||u?.path||`Code Change`,p=l?.diff||u?.diff,m=!!e.approval?.AskUser,h=e.approval?.McpTool,g=Array.isArray(e.approval?.AskUser?.options)?e.approval.AskUser.options:[],_=!!e.approval?.AskUser?.multiSelect,v=e.approval?.AskUser?.header||void 0,y=()=>{let e=Array.from(i).join(`, `),t=n.trim();return t?e?`${e} — ${t}`:t:e},b=e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},x=d?{badge:`Run Command`,badgeClass:c.isDangerous?`dangerous`:`command`}:l||u?{badge:`File Edit`,badgeClass:`edit`}:h?{badge:`MCP: ${h.server}`,badgeClass:`mcp`}:m?{badge:v||`Question`,badgeClass:`question`}:{badge:`Action Approval`,badgeClass:c.isDangerous?`dangerous`:`default`},S=h?[{key:`1`,title:`Allow once`,variant:`approve`,action:()=>t(!0,!1)},{key:`2`,title:`Always allow for "${h.server}"`,variant:`session`,action:()=>t(!0,!1,`__mcp_allow_all__`)},{key:`3`,title:`Reject`,variant:`cancel`,action:()=>t(!1)}]:[{key:`1`,title:`Allow once`,variant:`approve`,action:()=>t(!0,!1)},{key:`2`,title:`Always allow for this session`,variant:`session`,action:()=>t(!0,!0)},{key:`3`,title:`Reject`,variant:`cancel`,action:()=>t(!1)}];return(0,Sn.useEffect)(()=>{let e=e=>{let n=document.activeElement;if(!(n&&(n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.isContentEditable))){if(!m){let t=parseInt(e.key,10);!isNaN(t)&&t>=1&&t<=S.length&&(e.preventDefault(),S[t-1].action())}else if(!_&&g.length>0){let n=parseInt(e.key,10);!isNaN(n)&&n>=1&&n<=g.length&&(e.preventDefault(),t(!0,!1,g[n-1].label))}}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m,_,g,S]),(0,N.jsxs)(`div`,{className:`message ai-message`,style:{width:`100%`},children:[(0,N.jsx)(`div`,{className:`bubble-wrapper`,style:{width:`100%`},children:(0,N.jsxs)(`div`,{className:`action-card approval-card`,"data-tier":c.isDangerous?`dangerous`:void 0,style:{width:`100%`,alignItems:`stretch`,textAlign:`left`},children:[(0,N.jsxs)(`div`,{className:`approval-card-header`,style:{width:`100%`,textAlign:`left`},children:[(0,N.jsx)(`div`,{className:`approval-title-group`,style:{textAlign:`left`},children:(0,N.jsx)(`div`,{className:`approval-title-text`,style:{textAlign:`left`},children:c.title})}),(0,N.jsx)(`span`,{className:`approval-badge-chip ${x.badgeClass}`,children:x.badge})]}),p?(0,N.jsxs)(`div`,{className:`approval-card-diff-container`,style:{width:`100%`},children:[(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`8px`},children:[(0,N.jsxs)(`span`,{style:{fontSize:`0.82rem`,fontWeight:600,color:`var(--text-soft, #a1a1aa)`},children:[`Diff: `,(0,N.jsx)(`code`,{style:{color:`var(--text-main, #f4f4f5)`},children:f})]}),(0,N.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>s(!0),style:{display:`inline-flex`,alignItems:`center`,gap:6,padding:`4px 10px`,fontSize:`0.75rem`,borderRadius:`8px`,background:`rgba(56, 189, 248, 0.12)`,border:`1px solid rgba(56, 189, 248, 0.3)`,color:`#38bdf8`,cursor:`pointer`},children:`Review Side-by-Side`})]}),fn(p)]}):(0,N.jsx)(`div`,{className:`approval-content-box ${m?`question-text`:``}`,children:c.body}),c.reason&&!p&&(0,N.jsx)(`div`,{className:`approval-reason-text`,children:c.reason}),m?(0,N.jsxs)(`div`,{className:`claude-choice-stack`,children:[g.length>0&&(0,N.jsx)(`div`,{className:`claude-choice-options`,children:g.map((e,n)=>{let r=_&&i.has(e.label);return(0,N.jsxs)(`button`,{type:`button`,className:`claude-choice-card ${r?`selected`:``}`,onClick:()=>_?b(e.label):t(!0,!1,e.label),children:[(0,N.jsxs)(`div`,{className:`claude-choice-left`,children:[(0,N.jsx)(`span`,{className:`claude-choice-key`,children:n+1}),(0,N.jsxs)(`div`,{className:`claude-choice-text`,children:[(0,N.jsx)(`span`,{className:`claude-choice-title`,children:e.label}),e.description&&(0,N.jsx)(`span`,{className:`claude-choice-desc`,children:e.description})]})]}),(0,N.jsx)(`div`,{className:`claude-choice-right`,children:_?(0,N.jsx)(`span`,{style:{fontSize:`1.1rem`,color:r?`#10b981`:`var(--text-muted)`},children:r?`☑`:`☐`}):(0,N.jsx)(`span`,{style:{fontSize:`1rem`,opacity:.6},children:`›`})})]},n)})}),(0,N.jsx)(`div`,{className:`claude-choice-custom-box`,children:(0,N.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,width:`100%`},children:[(0,N.jsx)(`input`,{type:`text`,className:`claude-choice-input`,placeholder:g.length>0?`Or type custom response (press Enter to submit)...`:`Type your response (press Enter to submit)...`,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),_?t(!0,!1,y()):n.trim()&&t(!0,!1,n.trim()))}}),(_||n.trim())&&(0,N.jsx)(`button`,{type:`button`,className:`approval-btn approval-btn-approve`,style:{whiteSpace:`nowrap`,padding:`9px 16px`,borderRadius:`8px`},disabled:_?i.size===0&&!n.trim():!n.trim(),onClick:()=>t(!0,!1,_?y():n.trim()),children:`Submit`})]})}),(0,N.jsxs)(`button`,{type:`button`,className:`claude-choice-card variant-cancel`,onClick:()=>t(!1),style:{marginTop:2},children:[(0,N.jsxs)(`div`,{className:`claude-choice-left`,children:[(0,N.jsx)(`span`,{className:`claude-choice-key`,children:`✕`}),(0,N.jsx)(`div`,{className:`claude-choice-text`,children:(0,N.jsx)(`span`,{className:`claude-choice-title`,children:`Decline / Skip`})})]}),(0,N.jsx)(`div`,{className:`claude-choice-right`,children:`›`})]})]}):(0,N.jsx)(`div`,{className:`claude-choice-stack`,children:S.map(e=>(0,N.jsxs)(`button`,{type:`button`,className:`claude-choice-card variant-${e.variant}`,onClick:e.action,children:[(0,N.jsxs)(`div`,{className:`claude-choice-left`,children:[(0,N.jsx)(`span`,{className:`claude-choice-key`,children:e.key}),(0,N.jsx)(`div`,{className:`claude-choice-text`,children:(0,N.jsx)(`span`,{className:`claude-choice-title`,children:e.title})})]}),(0,N.jsx)(`div`,{className:`claude-choice-right`,children:`›`})]},e.key))})]})}),o&&p&&(0,N.jsx)(yn,{isOpen:o,onClose:()=>s(!1),filePath:f,diffText:p,isDangerous:c.isDangerous,onApprove:()=>{s(!1),t(!0)},onReject:()=>{s(!1),t(!1)}})]})}var Sn,N,Cn=t((()=>{Sn=e(A()),hn(),bn(),N=j()})),wn=t((()=>{}));function Tn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var En=t((()=>{}));function Dn(e,t){return((t||An).jsx?kn:On).test(e)}var On,kn,An,jn=t((()=>{On=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,An={}})),Mn=t((()=>{jn()}));function Nn(e){return typeof e==`object`?e.type===`text`?Pn(e.value):!1:Pn(e)}function Pn(e){return e.replace(Fn,``)===``}var Fn,In=t((()=>{Fn=/[ \t\n\f\r]/g})),Ln=t((()=>{In()})),Rn,zn=t((()=>{Rn=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}},Rn.prototype.normal={},Rn.prototype.property={},Rn.prototype.space=void 0}));function Bn(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Rn(n,r,t)}var Vn=t((()=>{zn()}));function Hn(e){return e.toLowerCase()}var Un=t((()=>{})),Wn,Gn=t((()=>{Wn=class{constructor(e,t){this.attribute=t,this.property=e}},Wn.prototype.attribute=``,Wn.prototype.booleanish=!1,Wn.prototype.boolean=!1,Wn.prototype.commaOrSpaceSeparated=!1,Wn.prototype.commaSeparated=!1,Wn.prototype.defined=!1,Wn.prototype.mustUseProperty=!1,Wn.prototype.number=!1,Wn.prototype.overloadedBoolean=!1,Wn.prototype.property=``,Wn.prototype.spaceSeparated=!1,Wn.prototype.space=void 0})),Kn=n({boolean:()=>Yn,booleanish:()=>Xn,commaOrSpaceSeparated:()=>er,commaSeparated:()=>$n,number:()=>P,overloadedBoolean:()=>Zn,spaceSeparated:()=>Qn});function qn(){return 2**++Jn}var Jn,Yn,Xn,Zn,P,Qn,$n,er,tr=t((()=>{Jn=0,Yn=qn(),Xn=qn(),Zn=qn(),P=qn(),Qn=qn(),$n=qn(),er=qn()}));function nr(e,t,n){n&&(e[t]=n)}var rr,ir,ar=t((()=>{Gn(),tr(),rr=Object.keys(Kn),ir=class extends Wn{constructor(e,t,n,r){let i=-1;if(super(e,t),nr(this,`space`,r),typeof n==`number`)for(;++i<rr.length;){let e=rr[i];nr(this,rr[i],(n&Kn[e])===Kn[e])}}},ir.prototype.defined=!0}));function or(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ir(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Hn(r)]=r,n[Hn(a.attribute)]=r}return new Rn(t,n,e.space)}var sr=t((()=>{Un(),ar(),zn()})),cr,lr=t((()=>{sr(),tr(),cr=or({properties:{ariaActiveDescendant:null,ariaAtomic:Xn,ariaAutoComplete:null,ariaBusy:Xn,ariaChecked:Xn,ariaColCount:P,ariaColIndex:P,ariaColSpan:P,ariaControls:Qn,ariaCurrent:null,ariaDescribedBy:Qn,ariaDetails:null,ariaDisabled:Xn,ariaDropEffect:Qn,ariaErrorMessage:null,ariaExpanded:Xn,ariaFlowTo:Qn,ariaGrabbed:Xn,ariaHasPopup:null,ariaHidden:Xn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qn,ariaLevel:P,ariaLive:null,ariaModal:Xn,ariaMultiLine:Xn,ariaMultiSelectable:Xn,ariaOrientation:null,ariaOwns:Qn,ariaPlaceholder:null,ariaPosInSet:P,ariaPressed:Xn,ariaReadOnly:Xn,ariaRelevant:null,ariaRequired:Xn,ariaRoleDescription:Qn,ariaRowCount:P,ariaRowIndex:P,ariaRowSpan:P,ariaSelected:Xn,ariaSetSize:P,ariaSort:null,ariaValueMax:P,ariaValueMin:P,ariaValueNow:P,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}})}));function ur(e,t){return t in e?e[t]:t}var dr=t((()=>{}));function fr(e,t){return ur(e,t.toLowerCase())}var pr=t((()=>{dr()})),mr,hr=t((()=>{pr(),sr(),tr(),mr=or({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:$n,acceptCharset:Qn,accessKey:Qn,action:null,allow:null,allowFullScreen:Yn,allowPaymentRequest:Yn,allowUserMedia:Yn,alpha:Yn,alt:null,as:null,async:Yn,autoCapitalize:null,autoComplete:Qn,autoFocus:Yn,autoPlay:Yn,blocking:Qn,capture:null,charSet:null,checked:Yn,cite:null,className:Qn,closedBy:null,colorSpace:null,cols:P,colSpan:P,command:null,commandFor:null,content:null,contentEditable:Xn,controls:Yn,controlsList:Qn,coords:P|$n,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yn,defer:Yn,dir:null,dirName:null,disabled:Yn,download:Zn,draggable:Xn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yn,formTarget:null,headers:Qn,height:P,hidden:Zn,high:P,href:null,hrefLang:null,htmlFor:Qn,httpEquiv:Qn,id:null,imageSizes:null,imageSrcSet:null,inert:Yn,inputMode:null,integrity:null,is:null,isMap:Yn,itemId:null,itemProp:Qn,itemRef:Qn,itemScope:Yn,itemType:Qn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yn,low:P,manifest:null,max:null,maxLength:P,media:null,method:null,min:null,minLength:P,multiple:Yn,muted:Yn,name:null,nonce:null,noModule:Yn,noValidate:Yn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Yn,optimum:P,pattern:null,ping:Qn,placeholder:null,playsInline:Yn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yn,referrerPolicy:null,rel:Qn,required:Yn,reversed:Yn,rows:P,rowSpan:P,sandbox:Qn,scope:null,scoped:Yn,seamless:Yn,selected:Yn,shadowRootClonable:Yn,shadowRootCustomElementRegistry:Yn,shadowRootDelegatesFocus:Yn,shadowRootMode:null,shadowRootSerializable:Yn,shape:null,size:P,sizes:null,slot:null,span:P,spellCheck:Xn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:P,step:null,style:null,tabIndex:P,target:null,title:null,translate:null,type:null,typeMustMatch:Yn,useMap:null,value:Xn,width:P,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qn,axis:null,background:null,bgColor:null,border:P,borderColor:null,bottomMargin:P,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yn,declare:Yn,event:null,face:null,frame:null,frameBorder:null,hSpace:P,leftMargin:P,link:null,longDesc:null,lowSrc:null,marginHeight:P,marginWidth:P,noResize:Yn,noHref:Yn,noShade:Yn,noWrap:Yn,object:null,profile:null,prompt:null,rev:null,rightMargin:P,rules:null,scheme:null,scrolling:Xn,standby:null,summary:null,text:null,topMargin:P,valueType:null,version:null,vAlign:null,vLink:null,vSpace:P,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Yn,disablePictureInPicture:Yn,disableRemotePlayback:Yn,exportParts:$n,part:Qn,prefix:null,property:null,results:P,security:null,unselectable:null},space:`html`,transform:fr})})),gr,_r=t((()=>{dr(),sr(),tr(),gr=or({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:er,accentHeight:P,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:P,amplitude:P,arabicForm:null,ascent:P,attributeName:null,attributeType:null,azimuth:P,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:P,by:null,calcMode:null,capHeight:P,className:Qn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:P,diffuseConstant:P,direction:null,display:null,dur:null,divisor:P,dominantBaseline:null,download:Yn,dx:null,dy:null,edgeMode:null,editable:null,elevation:P,enableBackground:null,end:null,event:null,exponent:P,externalResourcesRequired:null,fill:null,fillOpacity:P,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$n,g2:$n,glyphName:$n,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:P,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:P,horizOriginX:P,horizOriginY:P,id:null,ideographic:P,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:P,k:P,k1:P,k2:P,k3:P,k4:P,kernelMatrix:er,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:P,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:P,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:P,overlineThickness:P,paintOrder:null,panose1:null,path:null,pathLength:P,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:P,pointsAtY:P,pointsAtZ:P,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:er,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:er,rev:er,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:er,requiredFeatures:er,requiredFonts:er,requiredFormats:er,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:P,specularExponent:P,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:P,strikethroughThickness:P,string:null,stroke:null,strokeDashArray:er,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:P,strokeOpacity:P,strokeWidth:null,style:null,surfaceScale:P,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:er,tabIndex:P,tableValues:null,target:null,targetX:P,targetY:P,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:er,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:P,underlineThickness:P,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:P,values:null,vAlphabetic:P,vMathematical:P,vectorEffect:null,vHanging:P,vIdeographic:P,version:null,vertAdvY:P,vertOriginX:P,vertOriginY:P,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:P,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ur})})),vr,yr=t((()=>{sr(),vr=or({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}})})),br,xr=t((()=>{sr(),pr(),br=or({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:fr})})),Sr,Cr=t((()=>{sr(),Sr=or({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}})})),wr,Tr=t((()=>{wr={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`}}));function Er(e,t){let n=Hn(t),r=t,i=Wn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&jr.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ar,Or);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ar.test(e)){let n=e.replace(kr,Dr);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ir}return new i(r,t)}function Dr(e){return`-`+e.toLowerCase()}function Or(e){return e.charAt(1).toUpperCase()}var kr,Ar,jr,Mr=t((()=>{ar(),Gn(),Un(),kr=/[A-Z]/g,Ar=/-[a-z]/g,jr=/^data[-\w.:]+$/i})),Nr,Pr,Fr=t((()=>{Vn(),lr(),hr(),_r(),yr(),xr(),Cr(),Tr(),Mr(),Un(),Nr=Bn([cr,mr,vr,br,Sr],`html`),Pr=Bn([cr,gr,vr,br,Sr],`svg`)}));function Ir(e){return e.join(` `).trim()}var Lr=t((()=>{})),Rr=r(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
10
|
-
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),zr=r((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Rr());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Br=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Vr=r(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(zr()),r=Br();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function Hr(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ur(e){let t=Gr(e),n=Wr(e);if(t&&n)return{start:t,end:n}}var Wr,Gr,Kr=t((()=>{Wr=Hr(`end`),Gr=Hr(`start`)})),qr=t((()=>{Kr()}));function Jr(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Xr(e.position):`start`in e||`end`in e?Xr(e):`line`in e||`column`in e?Yr(e):``}function Yr(e){return Zr(e&&e.line)+`:`+Zr(e&&e.column)}function Xr(e){return Yr(e&&e.start)+`-`+Yr(e&&e.end)}function Zr(e){return e&&typeof e==`number`?e:1}var Qr=t((()=>{})),$r=t((()=>{Qr()})),ei,ti=t((()=>{$r(),ei=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Jr(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}},ei.prototype.file=``,ei.prototype.name=``,ei.prototype.reason=``,ei.prototype.message=``,ei.prototype.stack=``,ei.prototype.column=void 0,ei.prototype.line=void 0,ei.prototype.ancestors=void 0,ei.prototype.cause=void 0,ei.prototype.fatal=void 0,ei.prototype.place=void 0,ei.prototype.ruleId=void 0,ei.prototype.source=void 0})),ni=t((()=>{ti()}));function ri(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=mi(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=pi(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Pr:Nr,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ii(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ii(e,t,n){if(t.type===`element`)return ai(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return oi(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return ci(e,t,n);if(t.type===`mdxjsEsm`)return si(e,t);if(t.type===`root`)return li(e,t,n);if(t.type===`text`)return ui(e,t)}function ai(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Pr,e.schema=i),e.ancestors.push(t);let a=bi(e,t.tagName,!1),o=hi(e,t),s=_i(e,t);return ki.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Nn(e):!0})),di(e,o,a,t),fi(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function oi(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}xi(e,t.position)}function si(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xi(e,t.position)}function ci(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Pr,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:bi(e,t.name,!0),o=gi(e,t),s=_i(e,t);return di(e,o,a,t),fi(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function li(e,t,n){let r={};return fi(r,_i(e,t)),e.create(t,e.Fragment,r,n)}function ui(e,t){return t.value}function di(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function fi(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function pi(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function mi(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Gr(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function hi(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ei.call(t.properties,i)){let a=vi(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Ai.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function gi(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else xi(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else xi(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function _i(e,t){let n=[],r=-1,i=e.passKeys?new Map:Di;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=ii(e,a,o);s!==void 0&&n.push(s)}return n}function vi(e,t,n){let r=Er(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Tn(n):Ir(n)),r.property===`style`){let t=typeof n==`object`?n:yi(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Si(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?wr[r.property]||r.property:r.attribute,n]}}function yi(e,t){try{return(0,Ti.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new ei("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function bi(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Dn(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Dn(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ei.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);xi(e)}function xi(e,t){let n=new ei("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function Si(e){let t={},n;for(n in e)Ei.call(e,n)&&(t[Ci(n)]=e[n]);return t}function Ci(e){let t=e.replace(Oi,wi);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function wi(e){return`-`+e.toLowerCase()}var Ti,Ei,Di,Oi,ki,Ai,ji=t((()=>{En(),wn(),Mn(),Ln(),Fr(),Lr(),Ti=e(Vr(),1),qr(),ni(),Ei={}.hasOwnProperty,Di=new Map,Oi=/[A-Z]/g,ki=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Ai=new Set([`td`,`th`])})),Mi=t((()=>{ji()})),Ni,Pi=t((()=>{Ni={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]}})),Fi=t((()=>{Pi()}));function Ii(e,t){let n=t||Bi;return Li(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Li(e,t,n){if(zi(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Ri(e.children,t,n)}return Array.isArray(e)?Ri(e,t,n):``}function Ri(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Li(e[i],t,n);return r.join(``)}function zi(e){return!!(e&&typeof e==`object`)}var Bi,Vi=t((()=>{Bi={}})),Hi=t((()=>{Vi()}));function Ui(e){let t=`&`+e+`;`;Wi.innerHTML=t;let n=Wi.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}var Wi,Gi=t((()=>{Wi=document.createElement(`i`)}));function Ki(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function qi(e,t){return e.length>0?(Ki(e,e.length,0,t),e):t}var Ji=t((()=>{}));function Yi(e){let t={},n=-1;for(;++n<e.length;)Xi(t,e[n]);return t}function Xi(e,t){let n;for(n in t){let r=(Qi.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Qi.call(r,a)||(r[a]=[]);let e=i[a];Zi(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Zi(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Ki(e,0,0,r)}var Qi,$i=t((()=>{Ji(),Qi={}.hasOwnProperty}));function ea(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var ta=t((()=>{}));function na(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var ra=t((()=>{}));function ia(e){return e!==null&&(e<32||e===127)}function F(e){return e!==null&&e<-2}function aa(e){return e!==null&&(e<0||e===32)}function oa(e){return e===-2||e===-1||e===32}function sa(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var ca,la,ua,da,fa,pa,ma,ha,ga=t((()=>{ca=sa(/[A-Za-z]/),la=sa(/[\dA-Za-z]/),ua=sa(/[#-'*+\--9=?A-Z^-~]/),da=sa(/\d/),fa=sa(/[\dA-Fa-f]/),pa=sa(/[!-/:-@[-`{-~]/),ma=sa(/\p{P}|\p{S}/u),ha=sa(/\s/)}));function _a(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&la(e.charCodeAt(n+1))&&la(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}var va=t((()=>{ga()}));function ya(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return oa(r)?(e.enter(n),s(r)):t(r)}function s(r){return oa(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var ba=t((()=>{ga()}));function xa(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ya(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return F(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Sa,Ca=t((()=>{ba(),ga(),Sa={tokenize:xa}}));function wa(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Ki(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Da,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Da,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return F(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Ki(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ta(e,t,n){return ya(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var Ea,Da,Oa=t((()=>{ba(),ga(),Ji(),Ea={tokenize:wa},Da={tokenize:Ta}}));function ka(e){if(e===null||aa(e)||ha(e))return 1;if(ma(e))return 2}var Aa=t((()=>{ga()}));function ja(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Ma=t((()=>{}));function Na(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Fa(d,-c),Fa(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=qi(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=qi(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=qi(l,ja(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=qi(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=qi(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Ki(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Pa(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ka(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=ka(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Fa(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ia,La=t((()=>{Ji(),Aa(),Ma(),Ia={name:`attention`,resolveAll:Na,tokenize:Pa}}));function Ra(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return ca(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||la(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||la(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||ia(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):ua(t)?(e.consume(t),l):n(t)}function u(e){return la(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||la(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var za,Ba=t((()=>{ga(),za={name:`autolink`,tokenize:Ra}}));function Va(e,t,n){return r;function r(t){return oa(t)?ya(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||F(e)?t(e):n(e)}}var Ha,Ua=t((()=>{ba(),ga(),Ha={partial:!0,tokenize:Va}}));function Wa(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return oa(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ga(e,t,n){let r=this;return i;function i(t){return oa(t)?ya(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(qa,t,n)(r)}}function Ka(e){e.exit(`blockQuote`)}var qa,Ja=t((()=>{ba(),ga(),qa={continuation:{tokenize:Ga},exit:Ka,name:`blockQuote`,tokenize:Wa}}));function Ya(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return pa(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Xa,Za=t((()=>{ga(),Xa={name:`characterEscape`,tokenize:Ya}}));function Qa(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=la,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=fa,u):(e.enter(`characterReferenceValue`),a=7,o=da,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===la&&!Ui(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var $a,eo=t((()=>{Gi(),ga(),$a={name:`characterReference`,tokenize:Qa}}));function to(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),oa(t)?ya(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||F(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ro,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||F(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):oa(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),ya(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||F(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||F(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&oa(t)?ya(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||F(t)?e.check(ro,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||F(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),oa(t)?ya(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),oa(t)?ya(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||F(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function no(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var ro,io,ao=t((()=>{ba(),ga(),ro={partial:!0,tokenize:no},io={concrete:!0,name:`codeFenced`,tokenize:to}}));function oo(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),ya(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):F(t)?e.attempt(lo,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||F(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function so(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):F(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):ya(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):F(e)?i(e):n(e)}}var co,lo,uo=t((()=>{ba(),ga(),co={name:`codeIndented`,tokenize:oo},lo={partial:!0,tokenize:so}}));function fo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function po(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function mo(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):F(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||F(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var ho,go=t((()=>{ga(),ho={name:`codeText`,previous:po,resolve:fo,tokenize:mo}}));function _o(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}var vo,yo=t((()=>{vo=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&_o(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),_o(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),_o(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);_o(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);_o(this.left,t.reverse())}}}}));function bo(e){let t={},n=-1,r,i,a,o,s,c,l,u=new vo(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,xo(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Ki(e,0,1/0,u.slice(0)),!l}function xo(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var So=t((()=>{Ji(),yo()}));function Co(e){return bo(e),e}function wo(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):F(t)?e.check(Do,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function To(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ya(e,a,`linePrefix`)}function a(i){if(i===null||F(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}var Eo,Do,Oo=t((()=>{ba(),ga(),So(),Eo={resolve:Co,tokenize:wo},Do={partial:!0,tokenize:To}}));function ko(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||ia(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||F(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||aa(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||ia(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}var Ao=t((()=>{ga()}));function jo(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):F(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||F(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!oa(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}var Mo=t((()=>{ga()}));function No(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):F(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ya(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||F(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}var Po=t((()=>{ba(),ga()}));function Fo(e,t){let n;return r;function r(i){return F(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):oa(i)?ya(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Io=t((()=>{ba(),ga()}));function Lo(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return jo.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=na(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return aa(t)?Fo(e,l)(t):l(t)}function l(t){return ko(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Bo,d,d)(t)}function d(t){return oa(t)?ya(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||F(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ro(e,t,n){return r;function r(t){return aa(t)?Fo(e,i)(t):n(t)}function i(t){return No(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return oa(t)?ya(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||F(e)?t(e):n(e)}}var zo,Bo,Vo=t((()=>{Ao(),Mo(),ba(),Po(),Io(),ga(),ra(),zo={name:`definition`,tokenize:Lo},Bo={partial:!0,tokenize:Ro}}));function Ho(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return F(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Uo,Wo=t((()=>{ga(),Uo={name:`hardBreakEscape`,tokenize:Ho}}));function Go(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Ki(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ko(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||aa(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||F(n)?(e.exit(`atxHeading`),t(n)):oa(n)?ya(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||aa(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var qo,Jo=t((()=>{ba(),ga(),Ji(),qo={name:`headingAtx`,resolve:Go,tokenize:Ko}})),Yo,Xo,Zo=t((()=>{Yo=`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.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Xo=[`pre`,`script`,`style`,`textarea`]}));function Qo(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $o(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:oe):ca(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):ca(a)?(e.consume(a),i=4,r.interrupt?t:oe):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:oe):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return ca(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||aa(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Xo.includes(l)?(i=1,r.interrupt?t(s):O(s)):Yo.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||la(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return oa(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||ca(t)?(e.consume(t),b):oa(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||la(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):oa(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):oa(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||F(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||aa(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||oa(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||F(t)?O(t):oa(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),k):t===60&&i===1?(e.consume(t),re):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),oe):t===93&&i===5?(e.consume(t),ae):F(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(rs,ce,ee)(t)):t===null||F(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(is,te,ce)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||F(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function k(t){return t===45?(e.consume(t),oe):O(t)}function re(t){return t===47?(e.consume(t),o=``,ie):O(t)}function ie(t){if(t===62){let n=o.toLowerCase();return Xo.includes(n)?(e.consume(t),se):O(t)}return ca(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ie):O(t)}function ae(t){return t===93?(e.consume(t),oe):O(t)}function oe(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),oe):O(t)}function se(t){return t===null||F(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function es(e,t,n){let r=this;return i;function i(t){return F(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function ts(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Ha,t,n)}}var ns,rs,is,as=t((()=>{ga(),Zo(),Ua(),ns={concrete:!0,name:`htmlFlow`,resolveTo:Qo,tokenize:$o},rs={partial:!0,tokenize:ts},is={partial:!0,tokenize:es}}));function os(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):ca(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):ca(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):F(t)?(o=d,re(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?k(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):F(t)?(o=h,re(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?k(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?k(t):F(t)?(o=v,re(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):F(t)?(o=y,re(t)):(e.consume(t),y)}function b(e){return e===62?k(e):y(e)}function x(t){return ca(t)?(e.consume(t),S):n(t)}function S(t){return t===45||la(t)?(e.consume(t),S):C(t)}function C(t){return F(t)?(o=C,re(t)):oa(t)?(e.consume(t),C):k(t)}function w(t){return t===45||la(t)?(e.consume(t),w):t===47||t===62||aa(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),k):t===58||t===95||ca(t)?(e.consume(t),E):F(t)?(o=T,re(t)):oa(t)?(e.consume(t),T):k(t)}function E(t){return t===45||t===46||t===58||t===95||la(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):F(t)?(o=D,re(t)):oa(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):F(t)?(o=O,re(t)):oa(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):F(t)?(o=ee,re(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||aa(t)?T(t):(e.consume(t),te)}function ne(e){return e===47||e===62||aa(e)?T(e):n(e)}function k(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function re(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return oa(t)?ya(e,ae,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ae(t)}function ae(t){return e.enter(`htmlTextData`),o(t)}}var ss,cs=t((()=>{ba(),ga(),ss={name:`htmlText`,tokenize:os}}));function ls(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Ki(e,0,e.length,n),e}function us(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=qi(s,e.slice(a+1,a+r+3)),s=qi(s,[[`enter`,u,t]]),s=qi(s,ja(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=qi(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=qi(s,e.slice(o+1)),s=qi(s,[[`exit`,c,t]]),Ki(e,a,e.length,s),e}function ds(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(na(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(gs,u,o?u:d)(t):t===91?e.attempt(_s,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(vs,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function fs(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return aa(t)?Fo(e,a)(t):a(t)}function a(t){return t===41?u(t):ko(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return aa(t)?Fo(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?No(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return aa(t)?Fo(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function ps(e,t,n){let r=this;return i;function i(t){return jo.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(na(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ms(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var hs,gs,_s,vs,ys=t((()=>{Ao(),Mo(),Po(),Io(),ga(),Ji(),ra(),Ma(),hs={name:`labelEnd`,resolveAll:ls,resolveTo:us,tokenize:ds},gs={tokenize:fs},_s={tokenize:ps},vs={tokenize:ms}}));function bs(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var xs,Ss=t((()=>{ys(),xs={name:`labelStartImage`,resolveAll:hs.resolveAll,tokenize:bs}}));function Cs(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ws,Ts=t((()=>{ys(),ws={name:`labelStartLink`,resolveAll:hs.resolveAll,tokenize:Cs}}));function Es(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ya(e,t,`linePrefix`)}}var Ds,Os=t((()=>{ba(),Ds={name:`lineEnding`,tokenize:Es}}));function ks(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||F(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),oa(t)?ya(e,s,`whitespace`)(t):s(t))}}var As,js=t((()=>{ba(),ga(),As={name:`thematicBreak`,tokenize:ks}}));function Ms(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:da(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(As,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return da(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Ha,r.interrupt?n:u,e.attempt(Rs,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return oa(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Ns(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Ha,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ya(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!oa(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(zs,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ya(e,e.attempt(Ls,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Ps(e,t,n){let r=this;return ya(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Fs(e){e.exit(this.containerState.type)}function Is(e,t,n){let r=this;return ya(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!oa(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Ls,Rs,zs,Bs=t((()=>{ba(),ga(),Ua(),js(),Ls={continuation:{tokenize:Ns},exit:Fs,name:`list`,tokenize:Ms},Rs={partial:!0,tokenize:Is},zs={partial:!0,tokenize:Ps}}));function Vs(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Hs(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),oa(t)?ya(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||F(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Us,Ws=t((()=>{ba(),ga(),Us={name:`setextUnderline`,resolveTo:Vs,tokenize:Hs}})),Gs=t((()=>{La(),Ba(),Ua(),Ja(),Za(),eo(),ao(),uo(),go(),Oo(),Vo(),Wo(),Jo(),as(),cs(),ys(),Ss(),Ts(),Os(),Bs(),Ws(),js()}));function Ks(e){let t=this,n=e.attempt(Ha,r,e.attempt(this.parser.constructs.flowInitial,i,ya(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Eo,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var qs,Js=t((()=>{Gs(),ba(),qs={tokenize:Ks}}));function Ys(e){return{resolveAll:Xs(e===`text`?Zs:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Xs(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Zs(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Qs,$s,ec,tc=t((()=>{Qs={resolveAll:Xs()},$s=Ys(`string`),ec=Ys(`text`)})),nc=n({attentionMarkers:()=>uc,contentInitial:()=>ic,disable:()=>dc,document:()=>rc,flow:()=>oc,flowInitial:()=>ac,insideSpan:()=>lc,string:()=>sc,text:()=>cc}),rc,ic,ac,oc,sc,cc,lc,uc,dc,fc=t((()=>{Gs(),tc(),rc={42:Ls,43:Ls,45:Ls,48:Ls,49:Ls,50:Ls,51:Ls,52:Ls,53:Ls,54:Ls,55:Ls,56:Ls,57:Ls,62:qa},ic={91:zo},ac={[-2]:co,[-1]:co,32:co},oc={35:qo,42:As,45:[Us,As],60:ns,61:Us,95:As,96:io,126:io},sc={38:$a,92:Xa},cc={[-5]:Ds,[-4]:Ds,[-3]:Ds,33:xs,38:$a,42:Ia,60:[za,ss],91:ws,92:[Uo,Xa],93:hs,95:Ia,96:ho},lc={null:[Ia,Qs]},uc={null:[42,95]},dc={null:[]}}));function pc(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=qi(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ja(a,l.events,l),l.events):[]}function f(e,t){return hc(p(e),t)}function p(e){return mc(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){F(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ki(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function mc(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function hc(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
11
|
-
`;break;case-3:o=`\r
|
|
12
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}var gc=t((()=>{ga(),Ji(),Ma()}));function _c(e){let t={constructs:Yi([nc,...(e||{}).extensions||[]]),content:n(Sa),defined:[],document:n(Ea),flow:n(qs),lazy:{},string:n($s),text:n(ec)};return t;function n(e){return n;function n(n){return pc(t,e,n)}}}var vc=t((()=>{$i(),Ca(),Oa(),Js(),tc(),fc(),gc()}));function yc(e){for(;!bo(e););return e}var bc=t((()=>{So()}));function xc(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Sc.lastIndex=u,c=Sc.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Sc,Cc=t((()=>{Sc=/[\0\t\n\r]/g})),wc=t((()=>{Gi(),Ji(),$i(),ta(),ra(),va(),vc(),bc(),Cc()}));function Tc(e){return e.replace(Dc,Ec)}function Ec(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return ea(n.slice(t?2:1),t?16:10)}return Ui(n)||e}var Dc,Oc=t((()=>{Gi(),ta(),Dc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi}));function kc(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Ac(n)(yc(_c(n).document().write(xc()(e,t,!0))))}function Ac(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Te),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(xe),blockQuote:a(ge),characterEscape:T,characterReference:T,codeFenced:a(_e),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(_e,o),codeText:a(ve,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ye),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(be),hardBreakEscape:a(Se),hardBreakTrailing:a(Se),htmlFlow:a(Ce,o),htmlFlowData:T,htmlText:a(Ce,o),htmlTextData:T,image:a(we),label:o,link:a(Te),listItem:a(De),listItemValue:f,listOrdered:a(Ee,d),listUnordered:a(Ee),paragraph:a(Oe),reference:le,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(xe),strong:a(A),thematicBreak:a(Ae)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:he,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:fe,characterReference:pe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ne),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(re),label:ae,labelText:ie,lineEnding:D,link:c(k),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ue,resourceDestinationString:oe,resourceTitleString:se,resource:ce,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Mc(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Fc.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Pc).call(a,void 0,e[0])}for(r.position={start:jc(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:jc(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:jc(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Pc).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Jr({start:e.start,end:e.end})+`): it’s not open`);n.position.end=jc(e.end)}function u(){return Ii(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=na(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ke(),n.position={start:jc(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=jc(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=jc(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function re(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ie(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Tc(t),n.identifier=na(t).toLowerCase()}function ae(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ce(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function ue(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=na(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function de(e){this.data.characterReferenceType=e.type}function fe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=ea(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Ui(t);let i=this.stack[this.stack.length-1];i.value+=r}function pe(e){let t=this.stack.pop();t.position.end=jc(e.end)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function he(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ge(){return{type:`blockquote`,children:[]}}function _e(){return{type:`code`,lang:null,meta:null,value:``}}function ve(){return{type:`inlineCode`,value:``}}function ye(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function be(){return{type:`emphasis`,children:[]}}function xe(){return{type:`heading`,depth:0,children:[]}}function Se(){return{type:`break`}}function Ce(){return{type:`html`,value:``}}function we(){return{type:`image`,title:null,url:``,alt:null}}function Te(){return{type:`link`,title:null,url:``,children:[]}}function Ee(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function De(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Oe(){return{type:`paragraph`,children:[]}}function A(){return{type:`strong`,children:[]}}function ke(){return{type:`text`,value:``}}function Ae(){return{type:`thematicBreak`}}}function jc(e){return{line:e.line,column:e.column,offset:e.offset}}function Mc(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Mc(e,r):Nc(e,r)}}function Nc(e,t){let n;for(n in t)if(Fc.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Pc(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Jr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jr({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Jr({start:t.start,end:t.end})+`) is still open`)}var Fc,Ic=t((()=>{Hi(),wc(),ta(),Oc(),ra(),Gi(),$r(),Fc={}.hasOwnProperty})),Lc=t((()=>{Ic()}));function Rc(e){let t=this;t.parser=n;function n(n){return kc(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}var zc=t((()=>{Lc()})),Bc=t((()=>{zc()}));function Vc(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}var Hc=t((()=>{}));function Uc(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
13
|
-
`}]}var Wc=t((()=>{}));function Gc(e,t){let n=t.value?t.value+`
|
|
14
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}var Kc=t((()=>{}));function qc(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Jc=t((()=>{}));function Yc(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Xc=t((()=>{}));function Zc(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=_a(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}var Qc=t((()=>{va()}));function $c(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var el=t((()=>{}));function tl(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}var nl=t((()=>{}));function rl(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}var il=t((()=>{}));function al(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rl(e,t);let i={src:_a(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}var ol=t((()=>{va(),il()}));function sl(e,t){let n={src:_a(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}var cl=t((()=>{va()}));function ll(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}var ul=t((()=>{}));function dl(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rl(e,t);let i={href:_a(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var fl=t((()=>{va(),il()}));function pl(e,t){let n={href:_a(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}var ml=t((()=>{va()}));function hl(e,t,n){let r=e.all(t),i=n?gl(n):_l(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
15
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
16
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function gl(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=_l(n[r])}return t}function _l(e){return e.spread??e.children.length>1}var vl=t((()=>{}));function yl(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}var bl=t((()=>{}));function xl(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Sl=t((()=>{}));function Cl(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}var wl=t((()=>{}));function Tl(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var El=t((()=>{}));function Dl(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Gr(t.children[1]),o=Wr(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}var Ol=t((()=>{qr()}));function kl(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}var Al=t((()=>{}));function jl(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ml=t((()=>{}));function Nl(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Pl(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Pl(t.slice(i),i>0,!1)),a.join(``)}function Pl(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Fl||t===Il;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Fl||t===Il;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}var Fl,Il,Ll=t((()=>{Fl=9,Il=32}));function Rl(e,t){let n={type:`text`,value:Nl(String(t.value))};return e.patch(t,n),e.applyData(t,n)}var zl=t((()=>{Ll()}));function Bl(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Vl=t((()=>{}));function Hl(){}var Ul,Wl=t((()=>{Hc(),Wc(),Kc(),Jc(),Xc(),Qc(),el(),nl(),ol(),cl(),ul(),fl(),ml(),vl(),bl(),Sl(),wl(),El(),Ol(),Al(),Ml(),zl(),Vl(),Ul={blockquote:Vc,break:Uc,code:Gc,delete:qc,emphasis:Yc,footnoteReference:Zc,heading:$c,html:tl,imageReference:al,image:sl,inlineCode:ll,linkReference:dl,link:pl,listItem:hl,list:yl,paragraph:xl,root:Cl,strong:Tl,table:Dl,tableCell:jl,tableRow:kl,text:Rl,thematicBreak:Bl,toml:Hl,yaml:Hl,definition:Hl,footnoteDefinition:Hl}})),Gl=t((()=>{})),Kl,ql,Jl,Yl,Xl=t((()=>{Gl(),Kl=typeof self==`object`?self:globalThis,ql=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Kl[e](t)},Jl=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Kl[e]==`function`?ql(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(ql(a,o),i)};return r},Yl=e=>Jl(new Map,e)(0)})),Zl,Ql,$l,eu,tu,nu,ru,iu=t((()=>{Gl(),Zl=``,{toString:Ql}={},{keys:$l}=Object,eu=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Ql.call(e).slice(8,-1);switch(n){case`Array`:return[1,Zl];case`Object`:return[2,Zl];case`Date`:return[3,Zl];case`RegExp`:return[4,Zl];case`Map`:return[5,Zl];case`Set`:return[6,Zl];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},tu=([e,t])=>e===0&&(t===`function`||t===`symbol`),nu=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=eu(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of $l(r))(e||!tu(eu(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?Zl:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(tu(eu(n))||tu(eu(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!tu(eu(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},ru=(e,{json:t,lossy:n}={})=>{let r=[];return nu(!(t||n),!!t,new Map,r)(e),r}})),au,ou=t((()=>{Xl(),iu(),au=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Yl(ru(e,t)):structuredClone(e):(e,t)=>Yl(ru(e,t))}));function su(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function cu(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function lu(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||su,r=e.options.footnoteBackLabel||cu,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=_a(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...au(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
17
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
18
|
-
`}]}}var uu=t((()=>{ou(),va()}));function du(e){let t=[],n=-1;for(;++n<e.length;)t[n]=_u(e[n]);return mu(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function fu(e){let t=e;return mu(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function pu(e){return mu(t);function t(t){return t&&t.type===e}}function mu(e){return t;function t(t,n,r){return!!(gu(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function hu(){return!0}function gu(e){return typeof e==`object`&&!!e&&`type`in e}var _u,vu=t((()=>{_u=(function(e){if(e==null)return hu;if(typeof e==`function`)return mu(e);if(typeof e==`object`)return Array.isArray(e)?du(e):fu(e);if(typeof e==`string`)return pu(e);throw Error(`Expected function, string, or object as test`)})})),yu=t((()=>{vu()}));function bu(e){return e}var xu=t((()=>{}));function Su(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=_u(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+bu(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=wu,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Cu(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Cu(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?wu:[e]}var wu,Tu=t((()=>{yu(),xu(),wu=[]})),Eu=t((()=>{Tu()}));function Du(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Su(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Ou=t((()=>{Eu()})),ku=t((()=>{Ou()}));function Au(e,t){let n=t||Lu,r=new Map,i=new Map,a={all:s,applyData:Mu,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Ul,...n.handlers},one:o,options:n,patch:ju,wrap:Pu};return Du(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Iu.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=au(n);return r.children=a.all(e),r}return au(e)}return(a.options.unknownHandler||Nu)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Fu(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Fu(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function ju(e,t){e.position&&(t.position=Ur(e))}function Mu(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,au(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Nu(e,t){let n=t.data||{},r=`value`in t&&!(Iu.call(n,`hProperties`)||Iu.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Pu(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
19
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
20
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
21
|
-
`}),n}function Fu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}var Iu,Lu,Ru=t((()=>{ou(),ku(),qr(),Wl(),Iu={}.hasOwnProperty,Lu={}}));function zu(e,t){let n=Au(e,t),r=n.one(e,void 0),i=lu(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
22
|
-
`},i)),a}var Bu=t((()=>{wn(),uu(),Ru()})),Vu=t((()=>{Wl(),Bu(),uu()}));function Hu(e,t){return e&&`run`in e?async function(n,r){let i=zu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return zu(n,{file:r,...e||t})}}var Uu=t((()=>{Vu()})),Wu=t((()=>{Vu(),Uu()}));function Gu(e){if(e)throw e}var Ku=t((()=>{})),qu=r(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Ju(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Yu=t((()=>{}));function Xu(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Zu(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Zu(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Qu=t((()=>{})),$u=t((()=>{Qu()}));function ed(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);od(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function td(e){if(od(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function nd(e){od(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function rd(...e){let t=-1,n;for(;++t<e.length;)od(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:id(n)}function id(e){od(e);let t=e.codePointAt(0)===47,n=ad(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ad(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function od(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var sd,cd=t((()=>{sd={basename:ed,dirname:td,extname:nd,join:rd,sep:`/`}}));function ld(){return`/`}var ud,dd=t((()=>{ud={cwd:ld}}));function fd(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}var pd=t((()=>{}));function md(e){if(typeof e==`string`)e=new URL(e);else if(!fd(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return hd(e)}function hd(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var gd=t((()=>{pd()}));function _d(e,t){if(e&&e.includes(sd.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+sd.sep+"`")}function vd(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function yd(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function bd(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var xd,Sd,Cd=t((()=>{ni(),cd(),dd(),gd(),xd=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Sd=class{constructor(e){let t;t=e?fd(e)?{path:e}:typeof e==`string`||bd(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:ud.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<xd.length;){let e=xd[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)xd.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?sd.basename(this.path):void 0}set basename(e){vd(e,`basename`),_d(e,`basename`),this.path=sd.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?sd.dirname(this.path):void 0}set dirname(e){yd(this.basename,`dirname`),this.path=sd.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?sd.extname(this.path):void 0}set extname(e){if(_d(e,`extname`),yd(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=sd.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){fd(e)&&(e=md(e)),vd(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?sd.basename(this.path,this.extname):void 0}set stem(e){vd(e,`stem`),_d(e,`stem`),this.path=sd.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new ei(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}}})),wd=t((()=>{Cd()})),Td,Ed=t((()=>{Td=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r})}));function Dd(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Od(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function kd(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ad(e){if(!Ju(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function jd(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Md(e){return Nd(e)?e:new Sd(e)}function Nd(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Pd(e){return typeof e==`string`||Fd(e)}function Fd(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Id,Ld,Rd,zd,Bd=t((()=>{Ku(),Id=e(qu(),1),wn(),Yu(),$u(),wd(),Ed(),Ld={}.hasOwnProperty,Rd=class e extends Td{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Xu()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Id.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(kd(`data`,this.frozen),this.namespace[e]=t,this):Ld.call(this.namespace,e)&&this.namespace[e]||void 0:e?(kd(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Md(e),n=this.parser||this.Parser;return Dd(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Dd(`process`,this.parser||this.Parser),Od(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Md(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Pd(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Dd(`processSync`,this.parser||this.Parser),Od(`processSync`,this.compiler||this.Compiler),this.process(e,r),jd(`processSync`,`process`,t),n;function r(e,r){t=!0,Gu(e),n=r}}run(e,t,n){Ad(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Md(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),jd(`runSync`,`run`,n),r;function i(e,t){Gu(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Md(t),r=this.compiler||this.Compiler;return Od(`stringify`,r),Ad(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(kd(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Id.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ju(o)&&Ju(r)&&(r=(0,Id.default)(!0,o,r)),n[i]=[e,r,...a]}}}},zd=new Rd().freeze()})),Vd=t((()=>{Bd()}));function Hd(e){let t=Ud(e),n=Wd(e);return Gd(t.runSync(t.parse(n),n),e)}function Ud(e){let t=e.rehypePlugins||Jd,n=e.remarkPlugins||Jd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Yd}:Yd;return zd().use(Rc).use(n).use(Hu,r).use(t)}function Wd(e){let t=e.children||``,n=new Sd;return typeof t==`string`?n.value=t:``+t,n}function Gd(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Kd;for(let e of Zd)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Du(e,l),ri(e,{Fragment:qd.Fragment,components:i,ignoreInvalidStyle:!0,jsx:qd.jsx,jsxs:qd.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Ni)if(Object.hasOwn(Ni,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Ni[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Kd(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Xd.test(e.slice(0,t))?e:``}var qd,Jd,Yd,Xd,Zd,Qd=t((()=>{wn(),Mi(),Fi(),qd=j(),A(),Bc(),Wu(),Vd(),ku(),wd(),Jd=[],Yd={allowDangerousHtml:!0},Xd=/^(https?|ircs?|mailto|xmpp)$/i,Zd=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}]})),$d=t((()=>{Qd()}));function ef(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var tf=t((()=>{}));function nf(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var rf=t((()=>{}));function af(e,t,n){let r=_u((n||{}).ignore||[]),i=of(t),a=-1;for(;++a<i.length;)Su(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function of(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([sf(e[0]),cf(e[1])])}return t}function sf(e){return typeof e==`string`?new RegExp(nf(e),`g`):e}function cf(e){return typeof e==`function`?e:function(){return e}}var lf=t((()=>{rf(),Eu(),yu()})),uf=t((()=>{lf()}));function df(){return{transforms:[yf],enter:{literalAutolink:pf,literalAutolinkEmail:mf,literalAutolinkHttp:mf,literalAutolinkWww:mf},exit:{literalAutolink:vf,literalAutolinkEmail:_f,literalAutolinkHttp:hf,literalAutolinkWww:gf}}}function ff(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Tf,notInConstruct:Ef},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Tf,notInConstruct:Ef},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Tf,notInConstruct:Ef}]}}function pf(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function mf(e){this.config.enter.autolinkProtocol.call(this,e)}function hf(e){this.config.exit.autolinkProtocol.call(this,e)}function gf(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function _f(e){this.config.exit.autolinkEmail.call(this,e)}function vf(e){this.exit(e)}function yf(e){af(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,bf],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,xf]],{ignore:[`link`,`linkReference`]})}function bf(e,t,n,r,i){let a=``;if(!wf(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Sf(n)))return!1;let o=Cf(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function xf(e,t,n,r){return!wf(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Sf(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Cf(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=ef(e,`(`),a=ef(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function wf(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||ha(n)||ma(n))&&(!t||n!==47)}var Tf,Ef,Df=t((()=>{tf(),wn(),ga(),uf(),Tf=`phrasing`,Ef=[`autolink`,`link`,`image`,`label`]})),Of=t((()=>{Df()}));function kf(){this.buffer()}function Af(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function jf(){this.buffer()}function Mf(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Nf(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=na(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Pf(e){this.exit(e)}function Ff(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=na(this.sliceSerialize(e)).toLowerCase(),n.label=t}function If(e){this.exit(e)}function Lf(){return`[`}function Rf(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function zf(){return{enter:{gfmFootnoteCallString:kf,gfmFootnoteCall:Af,gfmFootnoteDefinitionLabelString:jf,gfmFootnoteDefinition:Mf},exit:{gfmFootnoteCallString:Nf,gfmFootnoteCall:Pf,gfmFootnoteDefinitionLabelString:Ff,gfmFootnoteDefinition:If}}}function Bf(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Rf},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
23
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Hf:Vf))),s(),o}}function Vf(e,t,n){return t===0?e:Hf(e,t,n)}function Hf(e,t,n){return(n?``:` `)+e}var Uf=t((()=>{wn(),ra(),Rf.peek=Lf})),Wf=t((()=>{Uf()}));function Gf(){return{canContainEols:[`delete`],enter:{strikethrough:qf},exit:{strikethrough:Jf}}}function Kf(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Zf}],handlers:{delete:Yf}}}function qf(e){this.enter({type:`delete`,children:[]},e)}function Jf(e){this.exit(e)}function Yf(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Xf(){return`~`}var Zf,Qf=t((()=>{Zf=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],Yf.peek=Xf})),$f=t((()=>{Qf()}));function ep(e){return e.length}function tp(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ep,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=np(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=rp(r[d]);else{let e=rp(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
24
|
-
`)}function np(e){return e==null?``:String(e)}function rp(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var ip=t((()=>{}));function ap(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),op);return i(),o}function op(e,t,n){return`>`+(n?``:` `)+e}var sp=t((()=>{}));function cp(e,t){return lp(e,t.inConstruct,!0)&&!lp(e,t.notInConstruct,!1)}function lp(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}var up=t((()=>{}));function dp(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
25
|
-
`&&cp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
26
|
-
`}var fp=t((()=>{up()}));function pp(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}var mp=t((()=>{}));function hp(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}var gp=t((()=>{}));function _p(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}var vp=t((()=>{}));function yp(e,t,n,r){let i=_p(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(hp(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,bp);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(pp(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
27
|
-
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
28
|
-
`),a&&(u+=s.move(a+`
|
|
29
|
-
`)),u+=s.move(c),l(),u}function bp(e,t,n){return(n?``:` `)+e}var xp=t((()=>{mp(),gp(),vp()}));function Sp(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}var Cp=t((()=>{}));function wp(e,t,n,r){let i=Sp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
30
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}var Tp=t((()=>{Cp()}));function Ep(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}var Dp=t((()=>{}));function Op(e){return`&#x`+e.toString(16).toUpperCase()+`;`}var kp=t((()=>{}));function Ap(e,t,n){let r=ka(e),i=ka(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var jp=t((()=>{Aa()}));function Mp(e,t,n,r){let i=Ep(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Ap(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Op(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Ap(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Op(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Np(e,t,n){return n.options.emphasis||`*`}var Pp=t((()=>{Dp(),kp(),jp(),Mp.peek=Np}));function Fp(e,t){let n=!1;return Du(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Ii(e)&&(t.options.setext||n))}var Ip=t((()=>{ku(),Hi()}));function Lp(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Fp(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
31
|
-
`,after:`
|
|
32
|
-
`});return r(),t(),o+`
|
|
33
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
34
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
35
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=Op(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}var Rp=t((()=>{kp(),Ip()}));function zp(e){return e.value||``}function Bp(){return`<`}var Vp=t((()=>{zp.peek=Bp}));function Hp(e,t,n,r){let i=Sp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Up(){return`!`}var Wp=t((()=>{Cp(),Hp.peek=Up}));function Gp(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Kp(){return`!`}var qp=t((()=>{Gp.peek=Kp}));function Jp(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Yp(){return"`"}var Xp=t((()=>{Jp.peek=Yp}));function Zp(e,t){let n=Ii(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}var Qp=t((()=>{Hi()}));function $p(e,t,n,r){let i=Sp(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Zp(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function em(e,t,n){return Zp(e,n)?`<`:`[`}var tm=t((()=>{Cp(),Qp(),$p.peek=em}));function nm(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function rm(){return`[`}var im=t((()=>{nm.peek=rm}));function am(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var om=t((()=>{}));function sm(e){let t=am(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}var cm=t((()=>{om()}));function lm(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}var um=t((()=>{}));function dm(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}var fm=t((()=>{}));function pm(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?lm(n):am(n),s=e.ordered?o===`.`?`)`:`.`:sm(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),dm(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}var mm=t((()=>{om(),cm(),um(),fm()}));function hm(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var gm=t((()=>{}));function _m(e,t,n,r){let i=hm(n),a=n.bulletCurrent||am(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}var vm=t((()=>{om(),gm()}));function ym(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var bm=t((()=>{})),xm,Sm=t((()=>{yu(),xm=_u([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`])})),Cm=t((()=>{Sm()}));function wm(e,t,n,r){return(e.children.some(function(e){return xm(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}var Tm=t((()=>{Cm()}));function Em(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}var Dm=t((()=>{}));function Om(e,t,n,r){let i=Em(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Ap(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Op(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Ap(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Op(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function km(e,t,n){return n.options.strong||`*`}var Am=t((()=>{Dm(),kp(),jp(),Om.peek=km}));function jm(e,t,n,r){return n.safe(e.value,r)}var Mm=t((()=>{}));function Nm(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}var Pm=t((()=>{}));function Fm(e,t,n){let r=(dm(n)+(n.options.ruleSpaces?` `:``)).repeat(Nm(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Im=t((()=>{Pm(),fm()})),Lm,Rm=t((()=>{sp(),fp(),xp(),Tp(),Pp(),Rp(),Vp(),Wp(),qp(),Xp(),tm(),im(),mm(),vm(),bm(),Tm(),Am(),Mm(),Im(),Lm={blockquote:ap,break:dp,code:yp,definition:wp,emphasis:Mp,hardBreak:dp,heading:Lp,html:zp,image:Hp,imageReference:Gp,inlineCode:Jp,link:$p,linkReference:nm,list:pm,listItem:_m,paragraph:ym,root:wm,strong:Om,text:jm,thematicBreak:Fm}})),zm=t((()=>{Rm(),gp(),Ip(),Oc(),kp(),up()}));function Bm(){return{enter:{table:Vm,tableData:Gm,tableHeader:Gm,tableRow:Um},exit:{codeText:Km,table:Hm,tableData:Wm,tableHeader:Wm,tableRow:Wm}}}function Vm(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Hm(e){this.exit(e),this.data.inTable=void 0}function Um(e){this.enter({type:`tableRow`,children:[]},e)}function Wm(e){this.exit(e)}function Gm(e){this.enter({type:`tableCell`,children:[]},e)}function Km(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,qm));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function qm(e,t){return t===`|`?t:e}function Jm(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
36
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
37
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return tp(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Lm.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}var Ym=t((()=>{wn(),ip(),zm()})),Xm=t((()=>{Ym()}));function Zm(){return{exit:{taskListCheckValueChecked:$m,taskListCheckValueUnchecked:$m,paragraph:eh}}}function Qm(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:th}}}function $m(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function eh(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function th(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Lm.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}var nh=t((()=>{wn(),zm()})),rh=t((()=>{nh()}));function ih(){return[df(),zf(),Gf(),Bm(),Zm()]}function ah(e){return{extensions:[ff(),Bf(e),Kf(),Jm(e),Qm()]}}var oh=t((()=>{Of(),Wf(),$f(),Xm(),rh()})),sh=t((()=>{oh()}));function ch(){return{text:Ah}}function lh(e,t,n){let r=this,i,a;return o;function o(t){return!bh(t)||!yh.call(r,r.previous)||xh(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return bh(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Eh,u,l)(t):t===45||t===95||la(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&ca(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function uh(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!_h.call(r,r.previous)||xh(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Sh,e.attempt(Ch,e.attempt(wh,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function dh(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&vh.call(r,r.previous)&&!xh(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(ca(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||ia(t)||aa(t)||ha(t)||ma(t)?n(t):e.attempt(Ch,e.attempt(wh,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function fh(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function ph(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Th,c,s)(t):t===null||aa(t)||ha(t)||t!==45&&ma(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function mh(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Th,t,a)(o):o===null||aa(o)||ha(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function hh(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||aa(o)||ha(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||aa(e)||ha(e)?t(e):r(e)}function a(e){return ca(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):ca(t)?(e.consume(t),o):n(t)}}function gh(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return la(e)?n(e):t(e)}}function _h(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||aa(e)}function vh(e){return!ca(e)}function yh(e){return!(e===47||bh(e))}function bh(e){return e===43||e===45||e===46||e===95||la(e)}function xh(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Sh,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh,Mh=t((()=>{for(ga(),Sh={tokenize:fh,partial:!0},Ch={tokenize:ph,partial:!0},wh={tokenize:mh,partial:!0},Th={tokenize:hh,partial:!0},Eh={tokenize:gh,partial:!0},Dh={name:`wwwAutolink`,tokenize:uh,previous:_h},Oh={name:`protocolAutolink`,tokenize:dh,previous:vh},kh={name:`emailAutolink`,tokenize:lh,previous:yh},Ah={},jh=48;jh<123;)Ah[jh]=kh,jh++,jh===58?jh=65:jh===91&&(jh=97);Ah[43]=kh,Ah[45]=kh,Ah[46]=kh,Ah[95]=kh,Ah[72]=[kh,Oh],Ah[104]=[kh,Oh],Ah[87]=[kh,Dh],Ah[119]=[kh,Dh]})),Nh=t((()=>{Mh(),va()}));function Ph(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Rh,continuation:{tokenize:zh},exit:Bh}},text:{91:{name:`gfmFootnoteCall`,tokenize:Lh},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Fh,resolveTo:Ih}}}}function Fh(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=na(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Ih(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Lh(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||aa(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(na(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return aa(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Rh(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||aa(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=na(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return aa(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),ya(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function zh(e,t,n){return e.check(Ha,t,e.attempt(Hh,t,n))}function Bh(e){e.exit(`gfmFootnoteDefinition`)}function Vh(e,t,n){let r=this;return ya(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}var Hh,Uh=t((()=>{Gs(),ba(),ga(),ra(),Hh={tokenize:Vh,partial:!0}})),Wh=t((()=>{Uh(),ra(),va()}));function Gh(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Ki(o,o.length,0,ja(s,e.slice(r+1,n),t)),Ki(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Ki(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=ka(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=ka(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Kh=t((()=>{Ji(),Aa(),Ma()})),qh=t((()=>{Kh()}));function Jh(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}var Yh,Xh=t((()=>{Yh=class{constructor(){this.map=[]}add(e,t,n){Jh(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}}));function Zh(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}var Qh=t((()=>{}));function $h(){return{flow:{null:{name:`table`,tokenize:eg,resolveAll:tg}}}}function eg(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):F(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):oa(t)?ya(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||aa(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,oa(t)?ya(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return oa(t)?ya(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||F(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return oa(t)?ya(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||F(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||F(n)?(e.exit(`tableRow`),t(n)):oa(n)?ya(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||aa(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function tg(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Yh;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(rg(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=ng(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=ng(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=ng(f,t,o,i,n,d)):(o[0]=o[1],d=ng(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&rg(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Zh(t.events,n))}return e}function ng(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},ig(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=ig(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=ig(t.events,n[2]),a=ig(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},ig(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function rg(e,t,n,r,i){let a=[],o=ig(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function ig(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var ag=t((()=>{ba(),ga(),Xh(),Qh()})),og=t((()=>{ag()}));function sg(){return{text:{91:ug}}}function cg(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return aa(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return F(r)?t(r):oa(r)?e.check({tokenize:lg},t,n)(r):n(r)}}function lg(e,t,n){return ya(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}var ug,dg=t((()=>{ba(),ga(),ug={name:`tasklistCheck`,tokenize:cg}})),fg=t((()=>{dg()}));function pg(e){return Yi([ch(),Ph(),Gh(e),$h(),sg()])}var mg=t((()=>{$i(),Nh(),Wh(),qh(),og(),fg()}));function hg(e){let t=this,n=e||gg,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(pg(n)),a.push(ih()),o.push(ah(n))}var gg,_g=t((()=>{sh(),mg(),gg={}})),vg=t((()=>{_g()}));function yg(e){let t=(e||``).toLowerCase().trim();return[`sh`,`bash`,`zsh`,`shell`,`terminal`,`console`,`cmd`].includes(t)?`bash`:[`js`,`jsx`,`javascript`].includes(t)?`javascript`:[`ts`,`tsx`,`typescript`].includes(t)?`typescript`:[`py`,`python`,`python3`].includes(t)?`python`:[`rs`,`rust`].includes(t)?`rust`:[`json`].includes(t)?`json`:[`sql`].includes(t)?`sql`:[`html`,`htm`,`xml`,`svg`].includes(t)?`html`:[`css`,`scss`,`sass`,`less`].includes(t)?`css`:[`yaml`,`yml`].includes(t)?`yaml`:`fallback`}function bg(e){let t=[],n=0,r=e.length,i=!0;for(;n<r;){if(e[n]===`#`){t.push({type:`token-comment`,text:e.slice(n)});break}if(/\s/.test(e[n])){let i=``;for(;n<r&&/\s/.test(e[n]);)i+=e[n],n++;t.push({type:`token-plain`,text:i});continue}if(e[n]===`"`||e[n]===`'`){let a=e[n],o=a;for(n++;n<r&&e[n]!==a;)e[n]===`\\`&&n+1<r?(o+=e[n]+e[n+1],n+=2):(o+=e[n],n++);n<r&&(o+=e[n],n++),t.push({type:`token-string`,text:o}),i=!1;continue}if([`|`,`&`,`;`,`>`,`<`].includes(e[n])){let a=e[n];n++,n<r&&[`|`,`&`,`>`,`<`].includes(e[n])&&(a+=e[n],n++),t.push({type:`token-operator`,text:a}),i=!0;continue}if(e[n]===`$`){let a=`$`;if(n++,n<r&&e[n]===`{`){for(;n<r&&e[n]!==`}`;)a+=e[n],n++;n<r&&(a+=e[n],n++)}else for(;n<r&&/[a-zA-Z0-9_?]/.test(e[n]);)a+=e[n],n++;t.push({type:`token-variable`,text:a}),i=!1;continue}if(e[n]===`-`&&n+1<r&&/[a-zA-Z0-9\-]/.test(e[n+1])){let a=`-`;for(n++;n<r&&/[a-zA-Z0-9_\-\.\/]/.test(e[n]);)a+=e[n],n++;t.push({type:`token-flag`,text:a}),i=!1;continue}let a=``;for(;n<r&&!/[\s"'|&;><#]/.test(e[n]);)a+=e[n],n++;if(i)Tg.has(a)||/^[a-zA-Z0-9_\-\.\/]+$/.test(a)?t.push({type:`token-command`,text:a}):t.push({type:`token-plain`,text:a}),i=!1;else if(/^\d+(\.\d+)?$/.test(a))t.push({type:`token-number`,text:a});else if(a.includes(`=`)){let[e,...n]=a.split(`=`);t.push({type:`token-property`,text:e}),t.push({type:`token-operator`,text:`=`}),t.push({type:`token-plain`,text:n.join(`=`)})}else t.push({type:`token-plain`,text:a})}return t}function xg(e,t){let n=[],r=0,i=e.length;for(;r<i;){if(e[r]===`/`&&e[r+1]===`/`||(t===`python`||t===`yaml`)&&e[r]===`#`||t===`sql`&&e[r]===`-`&&e[r+1]===`-`){n.push({type:`token-comment`,text:e.slice(r)});break}if(/\s/.test(e[r])){let t=``;for(;r<i&&/\s/.test(e[r]);)t+=e[r],r++;n.push({type:`token-plain`,text:t});continue}if(e[r]===`"`||e[r]===`'`||e[r]==="`"){let a=e[r],o=a;for(r++;r<i&&e[r]!==a;)e[r]===`\\`&&r+1<i?(o+=e[r]+e[r+1],r+=2):(o+=e[r],r++);r<i&&(o+=e[r],r++);let s=!1;if(t===`json`){let t=r;for(;t<i&&/\s/.test(e[t]);)t++;t<i&&e[t]===`:`&&(s=!0)}n.push({type:s?`token-property`:`token-string`,text:o});continue}if(/\d/.test(e[r])){let t=``;for(;r<i&&/[0-9a-fA-FxX\._]/.test(e[r]);)t+=e[r],r++;n.push({type:`token-number`,text:t});continue}if(/[a-zA-Z_$]/.test(e[r])){let a=``;for(;r<i&&/[a-zA-Z0-9_$]/.test(e[r]);)a+=e[r],r++;let o=a.toLowerCase();if((t===`javascript`||t===`typescript`)&&Eg.has(a))n.push({type:`token-keyword`,text:a});else if(t===`python`&&Dg.has(a))n.push({type:`token-keyword`,text:a});else if(t===`rust`&&Og.has(a))n.push({type:`token-keyword`,text:a});else if(t===`sql`&&kg.has(o))n.push({type:`token-keyword`,text:a});else if([`true`,`false`,`null`,`undefined`,`None`,`True`,`False`].includes(a))n.push({type:`token-boolean`,text:a});else{let t=r;for(;t<i&&/\s/.test(e[t]);)t++;t<i&&e[t]===`(`?n.push({type:`token-function`,text:a}):/^[A-Z][a-zA-Z0-9_]*$/.test(a)?n.push({type:`token-type`,text:a}):n.push({type:`token-plain`,text:a})}continue}n.push({type:`token-punctuation`,text:e[r]}),r++}return n}function Sg(e,t){let n=yg(t);return n===`bash`?bg(e):xg(e,n)}function Cg(e,t,n=!0){return(0,wg.jsx)(`div`,{className:`chat-code-lines`,children:e.split(`
|
|
38
|
-
`).map((e,r)=>{let i=Sg(e,t);return(0,wg.jsxs)(`div`,{className:`chat-code-line`,children:[n&&(0,wg.jsx)(`span`,{className:`chat-code-line-num`,"aria-hidden":`true`,children:r+1}),(0,wg.jsx)(`span`,{className:`chat-code-line-content`,children:i.length===0?`
|
|
39
|
-
`:i.map((e,t)=>(0,wg.jsx)(`span`,{className:e.type,children:e.text},t))})]},r)})})}var wg,Tg,Eg,Dg,Og,kg,Ag=t((()=>{A(),wg=j(),Tg=new Set(`ffmpeg.ffprobe.git.npm.npx.yarn.pnpm.cargo.rustc.docker.docker-compose.kubectl.curl.wget.cat.grep.egrep.sed.awk.find.ls.cd.mkdir.rm.cp.mv.touch.echo.sudo.chmod.chown.tar.unzip.zip.node.python.python3.pip.pip3.tauri.vite.export.source.sh.bash.zsh.systemctl.journalctl.ps.kill.killall.top.htop.which.head.tail.less.more.nano.vim.vi.ssh.scp.rsync.brew.apt.apt-get.dnf.pacman.mint`.split(`.`)),Eg=new Set(`const.let.var.function.return.import.export.default.from.if.else.for.while.do.switch.case.break.continue.async.await.class.interface.type.new.this.try.catch.finally.throw.extends.implements.typeof.instanceof.as.in.of.yield.void.delete`.split(`.`)),Dg=new Set(`def.class.import.from.as.return.if.elif.else.for.while.try.except.finally.with.yield.async.await.lambda.pass.raise.in.is.not.and.or.global.nonlocal.assert.break.continue`.split(`.`)),Og=new Set(`fn.let.mut.pub.struct.enum.impl.trait.for.loop.while.if.else.match.return.use.mod.crate.super.self.Self.where.async.await.move.ref.type.const.static.unsafe.dyn.break.continue`.split(`.`)),kg=new Set(`select.from.where.insert.into.update.delete.join.left.right.inner.outer.group.by.order.having.limit.offset.and.or.not.in.is.null.create.table.alter.drop.index.primary.key.foreign.references.default.values.as.distinct.union.all.case.when.then.end.like.between`.split(`.`))}));function jg({code:e,language:t}){let[n,r]=(0,Mg.useState)(!1),i=async()=>{try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)}catch(e){console.error(`Failed to copy code: `,e)}},a=()=>{try{let n=new Blob([e],{type:`text/plain;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`code.${t===`plaintext`||!t?`txt`:t.toLowerCase()}`,i.click(),URL.revokeObjectURL(r)}catch(e){console.error(`Failed to download code: `,e)}},o=(t||`plaintext`).toLowerCase().trim(),s=o===`plaintext`?`text`:o,c=(0,Mg.useMemo)(()=>e?e.split(`
|
|
40
|
-
`).length:1,[e]);return(0,Ng.jsxs)(`div`,{className:`chat-code-block-container`,style:{whiteSpace:`normal`},children:[(0,Ng.jsxs)(`div`,{className:`chat-code-block-header`,children:[(0,Ng.jsxs)(`div`,{className:`chat-code-block-meta`,children:[(0,Ng.jsx)(`span`,{className:`chat-code-block-lang`,children:s}),c>3&&(0,Ng.jsxs)(`span`,{className:`chat-code-block-lines`,children:[c,` lines`]})]}),(0,Ng.jsxs)(`div`,{className:`chat-code-block-actions`,children:[(0,Ng.jsx)(`button`,{type:`button`,onClick:a,title:`Download code`,className:`chat-code-action-btn chat-code-download-btn`,children:(0,Ng.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,Ng.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,Ng.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,Ng.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]})}),(0,Ng.jsx)(`button`,{type:`button`,onClick:i,title:`Copy code`,className:`chat-code-action-btn chat-code-copy-btn ${n?`is-copied`:``}`,children:n?(0,Ng.jsxs)(Ng.Fragment,{children:[(0,Ng.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,Ng.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),(0,Ng.jsx)(`span`,{className:`chat-code-btn-label`,children:`Copied!`})]}):(0,Ng.jsxs)(Ng.Fragment,{children:[(0,Ng.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,Ng.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,Ng.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]}),(0,Ng.jsx)(`span`,{className:`chat-code-btn-label`,children:`Copy`})]})})]})]}),(0,Ng.jsx)(`pre`,{className:`chat-code-block-body`,children:(0,Ng.jsx)(`code`,{children:Cg(e,o,c>1)})})]})}var Mg,Ng,Pg=t((()=>{Mg=e(A()),Ag(),Ng=j()})),Fg,Ig=t((()=>{Fg=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim()})),Lg,Rg=t((()=>{Lg=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()})),zg,Bg=t((()=>{zg=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase())})),Vg,Hg=t((()=>{Bg(),Vg=e=>{let t=zg(e);return t.charAt(0).toUpperCase()+t.slice(1)}})),Ug,Wg=t((()=>{Ug={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`}})),Gg,Kg=t((()=>{Gg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1}})),qg,Jg,Yg,Xg=t((()=>{qg=e(A(),1),Jg=(0,qg.createContext)({}),Yg=()=>(0,qg.useContext)(Jg)})),Zg,Qg,$g=t((()=>{Zg=e(A(),1),Wg(),Kg(),Ig(),Xg(),Qg=(0,Zg.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Yg()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,Zg.createElement)(`svg`,{ref:c,...Ug,width:t??l??Ug.width,height:t??l??Ug.height,stroke:e??f,strokeWidth:m,className:Fg(`lucide`,p,i),...!a&&!Gg(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,Zg.createElement)(e,t)),...Array.isArray(a)?a:[a]])})})),e_,t_,n_=t((()=>{e_=e(A(),1),Ig(),Rg(),Hg(),$g(),t_=(e,t)=>{let n=(0,e_.forwardRef)(({className:n,...r},i)=>(0,e_.createElement)(Qg,{ref:i,iconNode:t,className:Fg(`lucide-${Lg(Vg(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Vg(e),n}})),r_,i_,a_=t((()=>{n_(),r_=[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]],i_=t_(`activity`,r_)})),o_,s_,c_=t((()=>{n_(),o_=[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]],s_=t_(`brain`,o_)})),l_,u_,d_=t((()=>{n_(),l_=[[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`1nb95v`}],[`line`,{x1:`8`,x2:`16`,y1:`6`,y2:`6`,key:`x4nwl0`}],[`line`,{x1:`16`,x2:`16`,y1:`14`,y2:`18`,key:`wjye3r`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}]],u_=t_(`calculator`,l_)})),f_,p_,m_=t((()=>{n_(),f_=[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]],p_=t_(`check`,f_)})),h_,g_,__=t((()=>{n_(),h_=[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]],g_=t_(`chevron-right`,h_)})),v_,y_,b_=t((()=>{n_(),v_=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],y_=t_(`circle-alert`,v_)})),x_,S_,C_=t((()=>{n_(),x_=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]],S_=t_(`circle-check`,x_)})),w_,T_,E_=t((()=>{n_(),w_=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],T_=t_(`circle-x`,w_)})),D_,O_,k_=t((()=>{n_(),D_=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],O_=t_(`circle`,D_)})),A_,j_,M_=t((()=>{n_(),A_=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]],j_=t_(`clock`,A_)})),N_,P_,F_=t((()=>{n_(),N_=[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]],P_=t_(`coins`,N_)})),I_,L_,R_=t((()=>{n_(),I_=[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]],L_=t_(`droplet`,I_)})),z_,B_,V_=t((()=>{n_(),z_=[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]],B_=t_(`file-code-corner`,z_)})),H_,U_,W_=t((()=>{n_(),H_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]],U_=t_(`file-code`,H_)})),G_,K_,q_=t((()=>{n_(),G_=[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]],K_=t_(`folder`,G_)})),J_,Y_,X_=t((()=>{n_(),J_=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]],Y_=t_(`globe`,J_)})),Z_,Q_,$_=t((()=>{n_(),Z_=[[`path`,{d:`m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16`,key:`9kzy35`}],[`path`,{d:`M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2`,key:`1t0f0t`}],[`circle`,{cx:`13`,cy:`7`,r:`1`,fill:`currentColor`,key:`1obus6`}],[`rect`,{x:`8`,y:`2`,width:`14`,height:`14`,rx:`2`,key:`1gvhby`}]],Q_=t_(`images`,Z_)})),ev,tv,nv=t((()=>{n_(),ev=[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]],tv=t_(`list-todo`,ev)})),rv,iv,av=t((()=>{n_(),rv=[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],iv=t_(`loader-circle`,rv)})),ov,sv,cv=t((()=>{n_(),ov=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]],sv=t_(`rotate-ccw`,ov)})),lv,uv,dv=t((()=>{n_(),lv=[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]],uv=t_(`search`,lv)})),fv,pv,mv=t((()=>{n_(),fv=[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]],pv=t_(`shield-alert`,fv)})),hv,gv,_v=t((()=>{n_(),hv=[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],gv=t_(`sparkles`,hv)})),vv,yv,bv=t((()=>{n_(),vv=[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]],yv=t_(`terminal`,vv)})),xv,Sv,Cv=t((()=>{n_(),xv=[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]],Sv=t_(`trending-down`,xv)})),wv,Tv,Ev=t((()=>{n_(),wv=[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]],Tv=t_(`trending-up`,wv)})),Dv,Ov,kv=t((()=>{n_(),Dv=[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]],Ov=t_(`workflow`,Dv)})),Av,jv,Mv=t((()=>{n_(),Av=[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]],jv=t_(`wrench`,Av)})),Nv,Pv,Fv=t((()=>{n_(),Nv=[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]],Pv=t_(`zap`,Nv)})),Iv=t((()=>{n_(),b_(),C_(),E_(),V_(),av(),_v(),a_(),c_(),d_(),m_(),__(),k_(),M_(),F_(),R_(),W_(),q_(),X_(),$_(),nv(),cv(),dv(),mv(),bv(),Cv(),Ev(),kv(),Mv(),Fv(),Xg(),$g()})),Lv,Rv=t((()=>{Lv=`/assets/clear-day-DFc8zXW1.svg`})),zv,Bv=t((()=>{zv=`/assets/clear-night-B_u_OMcb.svg`})),Vv,Hv=t((()=>{Vv=`/assets/cloudy-1-day-CuOjunw3.svg`})),Uv,Wv=t((()=>{Uv=`/assets/cloudy-1-night-D7Anqypr.svg`})),Gv,Kv=t((()=>{Gv=`/assets/fog-day-CdrdZ39-.svg`})),qv,Jv=t((()=>{qv=`/assets/fog-night-DcYFgTs4.svg`})),Yv,Xv=t((()=>{Yv=`/assets/frost-day-CfyI9nUi.svg`})),Zv,Qv=t((()=>{Zv=`/assets/frost-night-Bz5DwStr.svg`})),$v,ey=t((()=>{$v=`/assets/rainy-1-day-CWJeISo3.svg`})),ty,ny=t((()=>{ty=`/assets/rainy-1-night-DwW9KJt7.svg`})),ry,iy=t((()=>{ry=`/assets/rainy-2-day-B6MyZ_oc.svg`})),ay,oy=t((()=>{ay=`/assets/rainy-2-night-BBY8Wbjg.svg`})),sy,cy=t((()=>{sy=`/assets/rainy-3-day-C_ux3DeM.svg`})),ly,uy=t((()=>{ly=`/assets/rainy-3-night-CK9WPA4c.svg`})),dy,fy=t((()=>{dy=`/assets/snowy-1-day-DfaDbFWh.svg`})),py,my=t((()=>{py=`/assets/snowy-1-night-D3cH_R6a.svg`})),hy,gy=t((()=>{hy=`/assets/snowy-2-day-HugapG3m.svg`})),_y,vy=t((()=>{_y=`/assets/snowy-2-night-D_js5iXA.svg`})),yy,by=t((()=>{yy=`/assets/snowy-3-day-D8DljJQC.svg`})),xy,Sy=t((()=>{xy=`/assets/snowy-3-night-BhXbYWQj.svg`})),Cy,wy=t((()=>{Cy=`/assets/scattered-thunderstorms-day-TWpxbJ5I.svg`})),Ty,Ey=t((()=>{Ty=`/assets/scattered-thunderstorms-night-Bl2ef4Ya.svg`})),Dy,Oy=t((()=>{Dy=`/assets/severe-thunderstorm-Di36Vy4h.svg`}));function ky(e,t){let n=Ay[e]??Ay[2];return t?n.day:n.night}var Ay,jy=t((()=>{Rv(),Bv(),Hv(),Wv(),Kv(),Jv(),Xv(),Qv(),ey(),ny(),iy(),oy(),cy(),uy(),fy(),my(),gy(),vy(),by(),Sy(),wy(),Ey(),Oy(),Ay={0:{day:Lv,night:zv},1:{day:Lv,night:zv},2:{day:Vv,night:Uv},3:{day:Vv,night:Uv},45:{day:Gv,night:qv},48:{day:Yv,night:Zv},51:{day:$v,night:ty},53:{day:$v,night:ty},55:{day:ry,night:ay},61:{day:$v,night:ty},63:{day:ry,night:ay},65:{day:sy,night:ly},71:{day:dy,night:py},73:{day:hy,night:_y},75:{day:yy,night:xy},80:{day:$v,night:ty},81:{day:ry,night:ay},82:{day:sy,night:ly},95:{day:Cy,night:Ty},96:{day:Dy,night:Dy},99:{day:Dy,night:Dy}}}));function My({data:e}){let t=e.current,n=e.daily,r=t?.is_day!==0,i=(0,Ny.useMemo)(()=>Fy(t?.weather_code||0,r),[t?.weather_code,r]),a=(0,Ny.useMemo)(()=>!n?.time||n.time.length===0?[]:n.time.slice(1,6).map((e,t)=>{let r=new Date(e).toLocaleDateString(`en-US`,{weekday:`short`}),i=Fy(n.weather_code[t+1]||0,!0),a=Math.round(n.temperature_2m_max[t+1]||0),o=Math.round(n.temperature_2m_min[t+1]||0),s=n.precipitation_probability_max?n.precipitation_probability_max[t+1]:0;return{day:r,iconUrl:i.iconUrl,high:a,low:o,precipitation:s}}),[n]);if(!t)return null;let o=t.time?new Date(t.time).toLocaleString(`en-US`,{weekday:`short`,hour:`numeric`,minute:`2-digit`}):new Date().toLocaleString(`en-US`,{weekday:`short`,hour:`numeric`,minute:`2-digit`});return(0,Py.jsxs)(`div`,{style:{background:i.gradient,color:`#ffffff`,borderRadius:`12px`,padding:`16px 20px`,margin:`12px 0`,boxShadow:`0 10px 25px -5px rgba(0, 0, 0, 0.4)`,position:`relative`,overflow:`hidden`,fontFamily:`system-ui, -apple-system, sans-serif`},children:[(0,Py.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:`12px`},children:[(0,Py.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`14px`},children:[(0,Py.jsx)(`img`,{src:i.iconUrl,alt:i.description,width:42,height:42,style:{flexShrink:0}}),(0,Py.jsxs)(`div`,{children:[(0,Py.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:`4px`},children:[(0,Py.jsxs)(`span`,{style:{fontSize:`36px`,fontWeight:`bold`,letterSpacing:`-1px`},children:[Math.round(t.temperature_2m),`°`]}),(0,Py.jsx)(`span`,{style:{fontSize:`18px`,opacity:.9},children:`C`})]}),(0,Py.jsx)(`p`,{style:{margin:`2px 0 0`,fontSize:`14px`,fontWeight:500,opacity:.95},children:i.description})]})]}),(0,Py.jsx)(`div`,{style:{textAlign:`right`},children:n?.temperature_2m_max?.[0]!==void 0&&(0,Py.jsxs)(`p`,{style:{margin:0,fontSize:`13px`,fontWeight:600,opacity:.9},children:[Math.round(n.temperature_2m_max[0]),`° `,Math.round(n.temperature_2m_min[0]),`°`]})})]}),(0,Py.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(255, 255, 255, 0.2)`,paddingBottom:`10px`,marginBottom:`12px`},children:[(0,Py.jsx)(`h4`,{style:{margin:0,fontSize:`17px`,fontWeight:700,letterSpacing:`-0.3px`},children:e.location}),(0,Py.jsx)(`p`,{style:{margin:`2px 0 0`,fontSize:`12px`,opacity:.8},children:o})]}),a.length>0&&(0,Py.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(${a.length}, 1fr)`,gap:`8px`,marginBottom:`14px`,paddingBottom:`12px`,borderBottom:`1px solid rgba(255, 255, 255, 0.2)`},children:a.map((e,t)=>(0,Py.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,background:`rgba(255, 255, 255, 0.12)`,backdropFilter:`blur(4px)`,borderRadius:`8px`,padding:`8px 4px`},children:[(0,Py.jsx)(`span`,{style:{fontSize:`12px`,fontWeight:600,marginBottom:`4px`},children:e.day}),(0,Py.jsx)(`img`,{src:e.iconUrl,alt:e.day,width:20,height:20,style:{marginBottom:`4px`}}),(0,Py.jsxs)(`div`,{style:{fontSize:`11px`,display:`flex`,gap:`3px`},children:[(0,Py.jsxs)(`span`,{style:{fontWeight:700},children:[e.high,`°`]}),(0,Py.jsxs)(`span`,{style:{opacity:.65},children:[e.low,`°`]})]}),e.precipitation!==void 0&&e.precipitation>0&&(0,Py.jsxs)(`span`,{style:{fontSize:`10px`,opacity:.8,marginTop:`2px`,display:`inline-flex`,alignItems:`center`,gap:`2px`},children:[(0,Py.jsx)(L_,{size:10,strokeWidth:2.5}),` `,e.precipitation,`%`]})]},t))}),(0,Py.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:`8px`},children:[(0,Py.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.12)`,backdropFilter:`blur(4px)`,borderRadius:`8px`,padding:`8px 10px`},children:[(0,Py.jsx)(`p`,{style:{margin:0,fontSize:`10px`,opacity:.75,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`Wind`}),(0,Py.jsxs)(`p`,{style:{margin:`2px 0 0`,fontSize:`13px`,fontWeight:700},children:[Math.round(t.wind_speed_10m),` km/h`]})]}),(0,Py.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.12)`,backdropFilter:`blur(4px)`,borderRadius:`8px`,padding:`8px 10px`},children:[(0,Py.jsx)(`p`,{style:{margin:0,fontSize:`10px`,opacity:.75,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`Humidity`}),(0,Py.jsxs)(`p`,{style:{margin:`2px 0 0`,fontSize:`13px`,fontWeight:700},children:[Math.round(t.relative_humidity_2m),`%`]})]}),(0,Py.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.12)`,backdropFilter:`blur(4px)`,borderRadius:`8px`,padding:`8px 10px`},children:[(0,Py.jsx)(`p`,{style:{margin:0,fontSize:`10px`,opacity:.75,textTransform:`uppercase`,letterSpacing:`0.5px`},children:`Feels Like`}),(0,Py.jsxs)(`p`,{style:{margin:`2px 0 0`,fontSize:`13px`,fontWeight:700},children:[Math.round(t.apparent_temperature),`°C`]})]})]})]})}var Ny,Py,Fy,Iy=t((()=>{Ny=e(A()),Iv(),jy(),Py=j(),Fy=(e,t=!0)=>({...{0:{description:`Clear Sky`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #1e3a8a, #1d4ed8 40%, #0284c7 80%, #0369a1)`},1:{description:`Mainly Clear`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #1e3a8a, #1d4ed8 40%, #0284c7 80%, #0369a1)`},2:{description:`Partly Cloudy`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #1e293b, #334155 45%, #0284c7 85%)`},3:{description:`Overcast`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #334155 50%, #475569)`},45:{description:`Foggy`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #1e293b, #475569)`},48:{description:`Rime Fog`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #1e293b, #475569)`},51:{description:`Light Drizzle`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0c4a6e, #0284c7 50%, #0369a1)`},53:{description:`Drizzle`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0c4a6e, #0284c7 50%, #0369a1)`},55:{description:`Heavy Drizzle`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #0369a1 60%)`},61:{description:`Light Rain`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0c4a6e, #0284c7 50%, #0369a1)`},63:{description:`Rain`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #0284c7 50%, #0369a1)`},65:{description:`Heavy Rain`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #1e3a8a 60%, #0284c7)`},71:{description:`Light Snow`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #1e293b, #38bdf8 70%)`},73:{description:`Snow`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #1e293b, #38bdf8 70%)`},75:{description:`Heavy Snow`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #0284c7 70%)`},80:{description:`Light Showers`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0c4a6e, #0284c7 50%, #0369a1)`},81:{description:`Showers`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #0284c7 50%, #0369a1)`},82:{description:`Heavy Showers`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #1e3a8a 50%, #312e81)`},95:{description:`Thunderstorm`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #1e1b4b 50%, #312e81)`},96:{description:`Thunderstorm & Hail`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #1e1b4b 60%)`},99:{description:`Severe Thunderstorm`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #0f172a, #1e1b4b 60%)`}}[e]||{description:`Weather`,gradient:`radial-gradient(ellipse 150% 100% at 50% 100%, #1e3a8a, #0284c7)`},iconUrl:ky(e,t)})}));function Ly({data:e}){let t=e.change>=0,n=t?`#10b981`:`#ef4444`,r=e.price.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),i=(e.change>=0?`+`:``)+e.change.toFixed(2),a=(e.changePercent>=0?`+`:``)+e.changePercent.toFixed(2)+`%`,o=e.currency||`USD`,s=o===`USD`?`$`:o===`THB`?`฿`:`${o} `,c=e=>!e||e===0?`N/A`:e>=0xe8d4a51000?(e/0xe8d4a51000).toFixed(2)+`T`:e>=1e9?(e/1e9).toFixed(2)+`B`:e>=1e6?(e/1e6).toFixed(2)+`M`:e>=1e3?(e/1e3).toFixed(2)+`K`:e.toLocaleString();return(0,Ry.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.03)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`,color:`#ffffff`,borderRadius:`12px`,padding:`16px 20px`,margin:`12px 0`,boxShadow:`0 8px 32px 0 rgba(0, 0, 0, 0.2)`,border:`1px solid ${t?`rgba(16, 185, 129, 0.25)`:`rgba(239, 68, 68, 0.25)`}`,fontFamily:`system-ui, -apple-system, sans-serif`},children:[(0,Ry.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:`12px`},children:[(0,Ry.jsxs)(`div`,{children:[(0,Ry.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,Ry.jsx)(`h3`,{style:{margin:0,fontSize:`20px`,fontWeight:800,letterSpacing:`-0.3px`},children:e.symbol}),(0,Ry.jsx)(`span`,{style:{fontSize:`11px`,fontWeight:700,padding:`2px 6px`,borderRadius:`4px`,background:`rgba(255, 255, 255, 0.08)`,color:`rgba(255, 255, 255, 0.7)`,textTransform:`uppercase`},children:o})]}),(0,Ry.jsx)(`p`,{style:{margin:`2px 0 0`,fontSize:`13px`,opacity:.7,fontWeight:500},children:e.name})]}),(0,Ry.jsxs)(`div`,{style:{background:t?`rgba(16, 185, 129, 0.12)`:`rgba(239, 68, 68, 0.12)`,border:`1px solid ${t?`rgba(16, 185, 129, 0.3)`:`rgba(239, 68, 68, 0.3)`}`,padding:`4px 10px`,borderRadius:`20px`,display:`flex`,alignItems:`center`,gap:`4px`,color:n,fontWeight:700,fontSize:`13px`},children:[t?(0,Ry.jsx)(Tv,{size:14,strokeWidth:2.5}):(0,Ry.jsx)(Sv,{size:14,strokeWidth:2.5}),(0,Ry.jsxs)(`span`,{children:[i,` (`,a,`)`]})]})]}),(0,Ry.jsx)(`div`,{style:{marginBottom:`14px`,borderBottom:`1px solid rgba(255, 255, 255, 0.06)`,paddingBottom:`12px`},children:(0,Ry.jsx)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:`4px`},children:(0,Ry.jsxs)(`span`,{style:{fontSize:`36px`,fontWeight:800,letterSpacing:`-1px`},children:[s,r]})})}),(0,Ry.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, 1fr)`,gap:`8px`},children:[(0,Ry.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.04)`,borderRadius:`8px`,padding:`8px 10px`,border:`1px solid rgba(255, 255, 255, 0.04)`},children:[(0,Ry.jsx)(`p`,{style:{margin:0,fontSize:`10px`,opacity:.6,textTransform:`uppercase`},children:`Day High`}),(0,Ry.jsx)(`p`,{style:{margin:`2px 0 0`,fontSize:`12px`,fontWeight:700},children:e.dayHigh?`${s}${e.dayHigh.toFixed(2)}`:`N/A`})]}),(0,Ry.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.04)`,borderRadius:`8px`,padding:`8px 10px`,border:`1px solid rgba(255, 255, 255, 0.04)`},children:[(0,Ry.jsx)(`p`,{style:{margin:0,fontSize:`10px`,opacity:.6,textTransform:`uppercase`},children:`Day Low`}),(0,Ry.jsx)(`p`,{style:{margin:`2px 0 0`,fontSize:`12px`,fontWeight:700},children:e.dayLow?`${s}${e.dayLow.toFixed(2)}`:`N/A`})]}),(0,Ry.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.04)`,borderRadius:`8px`,padding:`8px 10px`,border:`1px solid rgba(255, 255, 255, 0.04)`},children:[(0,Ry.jsx)(`p`,{style:{margin:0,fontSize:`10px`,opacity:.6,textTransform:`uppercase`},children:`Mkt Cap`}),(0,Ry.jsx)(`p`,{style:{margin:`2px 0 0`,fontSize:`12px`,fontWeight:700},children:c(e.marketCap)})]}),(0,Ry.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.04)`,borderRadius:`8px`,padding:`8px 10px`,border:`1px solid rgba(255, 255, 255, 0.04)`},children:[(0,Ry.jsx)(`p`,{style:{margin:0,fontSize:`10px`,opacity:.6,textTransform:`uppercase`},children:`Volume`}),(0,Ry.jsx)(`p`,{style:{margin:`2px 0 0`,fontSize:`12px`,fontWeight:700},children:c(e.volume)})]})]})]})}var Ry,zy=t((()=>{A(),Iv(),Ry=j()}));function By({data:e}){let t=typeof e.result==`number`?Number.isInteger(e.result)?e.result.toLocaleString():e.result.toLocaleString(void 0,{maximumFractionDigits:6}):String(e.result);return(0,Vy.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.03)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`,color:`#f8fafc`,borderRadius:`12px`,padding:`16px 20px`,margin:`12px 0`,boxShadow:`0 8px 32px 0 rgba(0, 0, 0, 0.2)`,border:`1px solid rgba(255, 255, 255, 0.08)`,fontFamily:`system-ui, -apple-system, sans-serif`},children:[(0,Vy.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,marginBottom:`12px`},children:[(0,Vy.jsx)(u_,{size:16,strokeWidth:2,style:{opacity:.9}}),(0,Vy.jsx)(`span`,{style:{fontSize:`11px`,fontWeight:700,letterSpacing:`0.8px`,color:`rgba(255, 255, 255, 0.6)`},children:`CALCULATION`})]}),(0,Vy.jsx)(`div`,{style:{background:`rgba(255, 255, 255, 0.04)`,border:`1px solid rgba(255, 255, 255, 0.06)`,borderRadius:`8px`,padding:`10px 14px`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,fontSize:`14px`,color:`#cbd5e1`,letterSpacing:`0.3px`},children:e.expression}),(0,Vy.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,margin:`6px 0`,color:`rgba(255, 255, 255, 0.4)`,fontSize:`16px`,fontWeight:`bold`},children:`=`}),(0,Vy.jsx)(`div`,{style:{background:`rgba(255, 255, 255, 0.04)`,border:`1px solid rgba(255, 255, 255, 0.08)`,borderRadius:`10px`,padding:`12px 18px`},children:(0,Vy.jsx)(`div`,{style:{fontSize:`30px`,fontWeight:800,color:`#ffffff`,fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,letterSpacing:`-0.5px`},children:t})})]})}var Vy,Hy=t((()=>{A(),Iv(),Vy=j()}));function Uy({image:e}){let[t,n]=(0,Gy.useState)(!1),[r,i]=(0,Gy.useState)(Ob(e.thumbnailUrl||e.imageUrl));return t||!r?null:(0,Ky.jsxs)(`a`,{href:e.sourceUrl||e.imageUrl,target:`_blank`,rel:`noopener noreferrer`,title:e.title,style:{position:`relative`,display:`block`,borderRadius:`10px`,overflow:`hidden`,aspectRatio:`1 / 1`,background:`rgba(255, 255, 255, 0.04)`,border:`1px solid rgba(255, 255, 255, 0.08)`,textDecoration:`none`},children:[(0,Ky.jsx)(`img`,{src:r,alt:e.title,loading:`lazy`,referrerPolicy:`no-referrer`,onError:()=>{let t=Ob(e.imageUrl);r!==t&&t?i(t):n(!0)},style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}),e.title&&(0,Ky.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,bottom:0,padding:`6px 8px`,fontSize:`11px`,lineHeight:1.3,color:`#f8fafc`,background:`linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0))`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title})]})}function Wy({data:e}){let t=(e?.images??[]).filter(e=>e.thumbnailUrl||e.imageUrl);return(0,Ky.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.03)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`,color:`#f8fafc`,borderRadius:`12px`,padding:`16px 20px`,margin:`12px 0`,boxShadow:`0 8px 32px 0 rgba(0, 0, 0, 0.2)`,border:`1px solid rgba(255, 255, 255, 0.08)`,fontFamily:`system-ui, -apple-system, sans-serif`},children:[(0,Ky.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,marginBottom:`12px`},children:[(0,Ky.jsx)(Q_,{size:16,strokeWidth:2,style:{opacity:.9}}),(0,Ky.jsx)(`span`,{style:{fontSize:`11px`,fontWeight:700,letterSpacing:`0.8px`,color:`rgba(255, 255, 255, 0.6)`},children:`IMAGE SEARCH`}),e?.query&&(0,Ky.jsxs)(`span`,{style:{fontSize:`13px`,color:`rgba(255, 255, 255, 0.8)`},children:[`“`,e.query,`”`]})]}),t.length===0?(0,Ky.jsx)(`div`,{style:{fontSize:`13px`,color:`rgba(255, 255, 255, 0.5)`},children:`No images found.`}):(0,Ky.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(110px, 1fr))`,gap:`8px`},children:t.map((e,t)=>(0,Ky.jsx)(Uy,{image:e},`${e.imageUrl}-${t}`))})]})}var Gy,Ky,qy=t((()=>{Gy=e(A()),Iv(),jb(),Ky=j()}));function Jy(e){return e?e.startsWith(`data:`)||e.startsWith(`http://`)||e.startsWith(`https://`)?e:e.startsWith(`/api/`)?`${typeof window<`u`&&window.location.port===`9000`?`http://localhost:3000`:typeof window<`u`?window.location.origin:``}${e}`:e:``}function Yy({url:e,single:t}){let[n,r]=(0,Zy.useState)(!1),i=Jy(e);return n||!i?null:(0,Qy.jsx)(`div`,{style:{position:`relative`,display:`block`,borderRadius:`10px`,overflow:`hidden`,aspectRatio:t?void 0:`1 / 1`,background:`rgba(255, 255, 255, 0.04)`,border:`1px solid rgba(255, 255, 255, 0.08)`},children:(0,Qy.jsx)(`img`,{src:i,alt:`Generated`,loading:`lazy`,onError:()=>r(!0),style:{width:`100%`,height:t?`auto`:`100%`,maxHeight:t?`420px`:void 0,objectFit:`cover`,display:`block`}})})}function Xy({data:e}){let t=(e?.images??[]).filter(e=>e?.url);return(0,Qy.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.03)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`,color:`#f8fafc`,borderRadius:`12px`,padding:`16px 20px`,margin:`12px 0`,boxShadow:`0 8px 32px 0 rgba(0, 0, 0, 0.2)`,border:`1px solid rgba(255, 255, 255, 0.08)`,fontFamily:`system-ui, -apple-system, sans-serif`},children:[(0,Qy.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,marginBottom:`12px`},children:[(0,Qy.jsx)(gv,{size:16,strokeWidth:2,style:{opacity:.9}}),(0,Qy.jsx)(`span`,{style:{fontSize:`11px`,fontWeight:700,letterSpacing:`0.8px`,color:`rgba(255, 255, 255, 0.6)`},children:`IMAGE GENERATED`}),e?.model&&(0,Qy.jsxs)(`span`,{style:{fontSize:`11px`,color:`rgba(255, 255, 255, 0.5)`},children:[e.model,e.provider?` · ${e.provider}`:``]})]}),t.length===0?(0,Qy.jsx)(`div`,{style:{fontSize:`13px`,color:`rgba(255, 255, 255, 0.5)`},children:`No image returned.`}):t.length===1?(0,Qy.jsx)(Yy,{url:t[0].url,single:!0}):(0,Qy.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(140px, 1fr))`,gap:`8px`},children:t.map((e,t)=>(0,Qy.jsx)(Yy,{url:e.url,single:!1},`${e.url}-${t}`))}),e?.prompt&&(0,Qy.jsxs)(`div`,{style:{marginTop:`10px`,fontSize:`13px`,lineHeight:1.4,color:`rgba(255, 255, 255, 0.7)`},children:[`“`,e.prompt,`”`]})]})}var Zy,Qy,$y=t((()=>{Zy=e(A()),Iv(),Qy=j()}));function eb(e){let t=cb.then(e,e);return cb=t.then(()=>void 0,()=>void 0),t}function tb(e){return`${document.documentElement.getAttribute(`data-theme`)||`dark`}::${e}`}function nb(){let e=getComputedStyle(document.documentElement),t=(t,n)=>e.getPropertyValue(t).trim()||n;return{background:t(`--panel-bg`,`#1e1e20`),primaryColor:t(`--accent`,`#10b981`),primaryTextColor:t(`--text-main`,`#e8e8ea`),primaryBorderColor:t(`--border`,`rgba(255,255,255,0.15)`),lineColor:t(`--text-muted`,`#8f8f94`),textColor:t(`--text-main`,`#e8e8ea`),secondaryColor:t(`--panel-raised`,`#2a2a2d`),tertiaryColor:t(`--panel-soft`,`#242426`)}}function rb(){document.querySelectorAll(`[id^="dmermaid-diagram-"], [id^="mermaid-diagram-"]`).forEach(e=>{e.parentElement===document.body&&e.remove()})}function ib({code:e}){let[t,n]=(0,ab.useState)(`loading`),[r,i]=(0,ab.useState)(``),[a,o]=(0,ab.useState)(!1);return(0,ab.useEffect)(()=>{let t=!1,r=null,a=null;async function o(){let r=lb.get(tb(e));if(r!==void 0){i(r),n(`ready`);return}if(await new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(e))),!t)try{let r=await eb(async()=>{let t=(await Oe(async()=>{let{default:e}=await import(`./mermaid.core-DYGGlqOf.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))).default;if(t.initialize({startOnLoad:!1,securityLevel:`strict`,theme:`base`,themeVariables:nb(),suppressErrorRendering:!0}),!await t.parse(e,{suppressErrors:!0}))throw Error(`Invalid mermaid syntax`);return t.render(`mermaid-diagram-${++sb}`,e)});if(t)return;lb.set(tb(e),r.svg),i(r.svg),n(`ready`)}catch(e){console.error(`Mermaid render failed:`,e),rb(),t||n(`error`)}}let s=lb.get(tb(e));return s===void 0?(n(`loading`),a=setTimeout(o,400)):(i(s),n(`ready`)),r=new MutationObserver(()=>o()),r.observe(document.documentElement,{attributeFilter:[`data-theme`]}),()=>{t=!0,a&&clearTimeout(a),r?.disconnect(),rb()}},[e]),t===`error`?(0,ob.jsx)(jg,{code:e,language:`mermaid`}):(0,ob.jsxs)(`div`,{style:{background:`rgba(255, 255, 255, 0.03)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`,color:`#f8fafc`,borderRadius:`12px`,padding:`16px 20px`,margin:`12px 0`,boxShadow:`0 8px 32px 0 rgba(0, 0, 0, 0.2)`,border:`1px solid rgba(255, 255, 255, 0.08)`,fontFamily:`system-ui, -apple-system, sans-serif`,minWidth:0,maxWidth:`100%`},children:[(0,ob.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,marginBottom:`12px`},children:[(0,ob.jsx)(Ov,{size:16,strokeWidth:2,style:{opacity:.9}}),(0,ob.jsx)(`span`,{style:{fontSize:`11px`,fontWeight:700,letterSpacing:`0.8px`,color:`rgba(255, 255, 255, 0.6)`},children:`DIAGRAM`}),t===`ready`&&(0,ob.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`,marginLeft:`auto`},children:[(0,ob.jsx)(`button`,{type:`button`,onClick:()=>{try{let e=new Blob([r],{type:`image/svg+xml`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`diagram.svg`,n.click(),URL.revokeObjectURL(t)}catch(e){console.error(`Failed to download diagram:`,e)}},title:`Download SVG`,className:`chat-code-action-btn`,children:(0,ob.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,ob.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,ob.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,ob.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]})}),(0,ob.jsx)(`button`,{type:`button`,onClick:async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy diagram source:`,e)}},title:`Copy diagram source`,className:`chat-code-action-btn`,children:a?(0,ob.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--accent)`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,ob.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}):(0,ob.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,ob.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,ob.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]})})]})]}),t===`loading`?(0,ob.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`32px 0`},children:[(0,ob.jsx)(`div`,{style:{width:`20px`,height:`20px`,borderRadius:`50%`,border:`2px solid rgba(255, 255, 255, 0.15)`,borderTopColor:`var(--accent, #10b981)`,animation:`mermaid-card-spin 0.8s linear infinite`}}),(0,ob.jsx)(`style`,{children:`@keyframes mermaid-card-spin { to { transform: rotate(360deg) } }`})]}):(0,ob.jsx)(`div`,{style:{overflowX:`auto`,display:`flex`,justifyContent:`center`,minWidth:0},dangerouslySetInnerHTML:{__html:r}})]})}var ab,ob,sb,cb,lb,ub=t((()=>{ab=e(A()),Iv(),Pg(),ob=j(),De(),sb=0,cb=Promise.resolve(),lb=new Map}));function db(e){if(!e||!e.includes(`imgs.search.brave.com`))return e;try{let t=e.match(/imgs\.search\.brave\.com\/[^\/]+\/[^\/]+\/[^\/]+\/(.+)$/);if(!t)return e;let n=t[1].replace(/\//g,``),r=(n+`=`.repeat((4-n.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),i=atob(r).replace(/&/g,`&`);if(i.startsWith(`http://`)||i.startsWith(`https://`))return i}catch{}return e}function fb(e){if(typeof e!=`string`)return``;let t=e.trim();if(!t.startsWith(`{`))return pb(e);try{let e=JSON.parse(t);if(e?.action===`finish`&&typeof e?.input?.summary==`string`&&e.input.summary.trim())return pb(e.input.summary);if(typeof e?.finish?.summary==`string`&&e.finish.summary.trim())return pb(e.finish.summary)}catch{return pb(e)}return pb(e)}function pb(e){return e.replace(/\$\\rightarrow\$|\\\(\\rightarrow\\\)|\\rightarrow|\bightarrow\b/g,`→`).replace(/\$\\leftarrow\$|\\\(\\leftarrow\\\)|\\leftarrow|\beftarrow\b/g,`←`).replace(/\$\\Rightarrow\$|\\\(\\Rightarrow\\\)|\\Rightarrow|\begRightarrow\b/g,`⇒`).replace(/\$\\Leftarrow\$|\\\(\\Leftarrow\\\)|\\Leftarrow/g,`⇐`).replace(/\$\\leftrightarrow\$|\\\(\\leftrightarrow\\\)|\\leftrightarrow/g,`↔`).replace(/\$\\leq\$|\\\(\\leq\\\)|\\leq/g,`≤`).replace(/\$\\geq\$|\\\(\\geq\\\)|\\geq/g,`≥`).replace(/\$\\neq\$|\\\(\\neq\\\)|\\neq/g,`≠`).replace(/\$\\approx\$|\\\(\\approx\\\)/g,`≈`).replace(/\$\\times\$|\\\(\\times\\\)|\\times/g,`×`).replace(/\$\\div\$|\\\(\\div\\\)|\\div/g,`÷`).replace(/\$\\pm\$|\\\(\\pm\\\)/g,`±`).replace(/\$\\infty\$|\\\(\\infty\\\)|\\infty/g,`∞`).replace(/\$\\cdot\$|\\\(\\cdot\\\)|\\cdot/g,`·`).replace(/\$\\in\$|\\\(\\in\\\)|\\in\b/g,`∈`).replace(/\$\\subset\$|\\\(\\subset\\\)|\\subset/g,`⊂`).replace(/\$\\cup\$|\\\(\\cup\\\)|\\cup\b/g,`∪`).replace(/\$\\cap\$|\\\(\\cap\\\)|\\cap\b/g,`∩`).replace(/\$([^$\n]{1,60})\$/g,`$1`).replace(/\\\(([^)]{1,60})\\\)/g,`$1`)}function mb(e){return fb(e).replace(/\*\*([\s\S]*?)\*\*/g,`$1`).replace(/[*_`#]/g,``).trim()}function hb(e){return e?(0,I.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{display:`block`},children:[(0,I.jsx)(`polygon`,{points:`11 5 6 9 2 9 2 15 6 15 11 19 11 5`}),(0,I.jsx)(`path`,{d:`M15.54 8.46a5 5 0 0 1 0 7.07`}),(0,I.jsx)(`path`,{d:`M19.07 4.93a10 10 0 0 1 0 14.14`})]}):(0,I.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{display:`block`},children:(0,I.jsx)(`polygon`,{points:`11 5 6 9 2 9 2 15 6 15 11 19 11 5`})})}function gb(e){return e?(0,I.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{display:`block`,color:`var(--accent, #10b981)`},children:(0,I.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}):(0,I.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{display:`block`},children:[(0,I.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,I.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]})}function _b(e){return e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(_b).join(``):(0,Db.isValidElement)(e)?_b(e.props.children):``}function vb(e,t=`m`){if(typeof e==`string`){let n=e.split(/(@[\w\-.\/]+)/g);return n.length<=1?e:n.map((e,n)=>n%2==1?(0,I.jsx)(`span`,{className:`chat-mention`,children:e},`${t}-${n}`):e?(0,I.jsx)(Db.Fragment,{children:e},`${t}-t-${n}`):null)}return Array.isArray(e)?e.map((e,n)=>(0,I.jsx)(Db.Fragment,{children:vb(e,`${t}-${n}`)},`${t}-${n}`)):e}function yb(e){let t=e;return t?t.type===`text`?t.value??``:Array.isArray(t.children)?t.children.map(yb).join(``):``:``}function bb(e){return e?.children?.find(e=>e.type===`element`&&e.tagName===`code`)}function xb(e,t){let n=0;return Db.Children.toArray(e).map(e=>{if(!(0,Db.isValidElement)(e))return e;let r=(t.start??1)+n;return n+=1,(0,Db.cloneElement)(e,{key:e.key??r,ordered:t.ordered,index:r})})}function Sb(e){let t=Db.Children.toArray(e);for(;t.length&&typeof t[0]==`string`&&t[0].trim()===``;)t.shift();for(;t.length&&typeof t[t.length-1]==`string`&&t[t.length-1].trim()===``;)t.pop();return t}function Cb(e,t){switch(e){case`weather_json`:case`weather-json`:try{return(0,I.jsx)(My,{data:JSON.parse(t)})}catch{return(0,I.jsx)(jg,{code:t,language:e})}case`stock_json`:case`stock-json`:try{return(0,I.jsx)(Ly,{data:JSON.parse(t)})}catch{return(0,I.jsx)(jg,{code:t,language:e})}case`calculation_json`:case`calculation-json`:try{return(0,I.jsx)(By,{data:JSON.parse(t)})}catch{return(0,I.jsx)(jg,{code:t,language:e})}case`image_search_json`:case`image-search-json`:try{return(0,I.jsx)(Wy,{data:JSON.parse(t)})}catch{return(0,I.jsx)(jg,{code:t,language:e})}case`image_gen_json`:case`image-gen-json`:try{return(0,I.jsx)(Xy,{data:JSON.parse(t)})}catch{return(0,I.jsx)(jg,{code:t,language:e})}case`mermaid`:return(0,I.jsx)(ib,{code:t});default:return(0,I.jsx)(jg,{code:t,language:e})}}function wb(e){return e.split(`
|
|
41
|
-
`).map(e=>{let t=e.match(/^(\s*)[\(\[](\d+)[\)\]](\s+.*)$/);if(t)return`${t[1]}${t[2]}.${t[3]}`;let n=e.match(/^(\s*)[•](\s+.*)$/);return n?`${n[1]}-${n[2]}`:e}).join(`
|
|
42
|
-
`)}function Tb(e){let t=[],n=[],r=()=>{n.length>0&&(t.push({type:`text`,value:n.join(`
|
|
43
|
-
`)}),n=[])};for(let i of e.split(`
|
|
44
|
-
`)){let e=i.match(/<video[^>]*src="([^"]+)"[^>]*>/);e?(r(),t.push({type:`video`,src:e[1]})):n.push(i)}return r(),t}function Eb(e){let t=fb(e);return t?(0,I.jsx)(`div`,{className:`chat-formatted-body`,children:Tb(t).map((e,t)=>e.type===`video`?(0,I.jsx)(`div`,{className:`chat-media-card`,style:{margin:`10px 0`,borderRadius:`12px`,overflow:`hidden`,border:`1px solid var(--border, rgba(255,255,255,0.12))`,background:`#000`},children:(0,I.jsx)(`video`,{controls:!0,src:Ob(e.src),style:{width:`100%`,maxHeight:`400px`,borderRadius:`8px`,display:`block`}})},`video-${t}`):(0,I.jsx)(Hd,{remarkPlugins:[hg],components:Ab,children:wb(e.value)},`md-${t}`))}):null}var Db,I,Ob,kb,Ab,jb=t((()=>{Db=e(A()),$d(),vg(),Pg(),Iy(),zy(),Hy(),qy(),$y(),ub(),I=j(),Ob=e=>{if(!e)return``;let t=db(e);return t.startsWith(`data:`)||t.startsWith(`http://`)||t.startsWith(`https://`)?t:t.startsWith(`/api/`)?`${typeof window<`u`&&window.location.port===`9000`?`http://localhost:3000`:typeof window<`u`?window.location.origin:``}${t}`:t},kb=/^(?:[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]).*:$/u,Ab={p({children:e}){let t=_b(e).trim();return kb.test(t)?(0,I.jsx)(`div`,{className:`chat-heading chat-heading-3 chat-section-title`,children:e}):(0,I.jsx)(`div`,{className:`chat-paragraph`,children:vb(e)})},h1:({children:e})=>(0,I.jsx)(`div`,{className:`chat-heading chat-heading-1`,children:vb(e)}),h2:({children:e})=>(0,I.jsx)(`div`,{className:`chat-heading chat-heading-2`,children:vb(e)}),h3:({children:e})=>(0,I.jsx)(`div`,{className:`chat-heading chat-heading-3`,children:vb(e)}),h4:({children:e})=>(0,I.jsx)(`div`,{className:`chat-heading chat-heading-3`,children:vb(e)}),h5:({children:e})=>(0,I.jsx)(`div`,{className:`chat-heading chat-heading-3`,children:vb(e)}),h6:({children:e})=>(0,I.jsx)(`div`,{className:`chat-heading chat-heading-3`,children:vb(e)}),ul:({children:e})=>(0,I.jsx)(`div`,{className:`chat-list-block`,children:xb(e,{ordered:!1})}),ol:({children:e,start:t})=>(0,I.jsx)(`div`,{className:`chat-list-block`,children:xb(e,{ordered:!0,start:typeof t==`number`?t:1})}),li:({children:e,ordered:t,index:n})=>{let r=Sb(e);return t?(0,I.jsxs)(`div`,{className:`chat-list-item chat-ordered-item`,children:[(0,I.jsxs)(`span`,{className:`chat-list-number`,children:[n,`.`]}),(0,I.jsx)(`div`,{className:`chat-list-text`,children:vb(r)})]}):(0,I.jsxs)(`div`,{className:`chat-list-item chat-bullet-item`,children:[(0,I.jsx)(`span`,{className:`chat-list-bullet`,children:`•`}),(0,I.jsx)(`div`,{className:`chat-list-text`,children:vb(r)})]})},strong:({children:e})=>(0,I.jsx)(`strong`,{className:`chat-bold-highlight`,children:e}),a:({href:e,children:t})=>(0,I.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`chat-link`,children:vb(t)}),img:({src:e,alt:t})=>{let n=Ob(String(e||``)),r=t||`Generated Image`;return n.startsWith(`https://`)||n.startsWith(`http://`)?(0,I.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,title:r,className:`chat-media-card chat-media-card--thumbnail`,style:{display:`block`,margin:`6px 0 10px 0`,borderRadius:`10px`,overflow:`hidden`,border:`1px solid var(--border, rgba(255,255,255,0.12))`,background:`var(--panel-bg, #141416)`,maxWidth:`420px`,textDecoration:`none`,cursor:`pointer`},children:[(0,I.jsx)(`img`,{src:n,alt:r,loading:`lazy`,referrerPolicy:`no-referrer`,style:{width:`100%`,maxHeight:`200px`,objectFit:`cover`,display:`block`},onError:e=>{e.currentTarget.closest(`a`).style.display=`none`}}),r!==`Generated Image`&&(0,I.jsx)(`div`,{style:{padding:`5px 10px`,fontSize:`0.72rem`,color:`var(--text-muted, #64748b)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:r})]}):(0,I.jsx)(`div`,{className:`chat-media-card`,style:{margin:`10px 0`,borderRadius:`12px`,overflow:`hidden`,border:`1px solid var(--border, rgba(255,255,255,0.12))`,background:`var(--panel-bg, #141416)`},children:(0,I.jsx)(`img`,{src:n,alt:r,referrerPolicy:`no-referrer`,style:{width:`100%`,maxHeight:`420px`,objectFit:`contain`,display:`block`,borderRadius:`8px`}})})},code({children:e}){return(0,I.jsx)(`code`,{className:`chat-inline-code`,children:e})},pre({node:e}){let t=bb(e),n=t?.properties?.className,r=(Array.isArray(n)?n.map(String):typeof n==`string`?n.split(/\s+/):[]).find(e=>e.startsWith(`language-`));return Cb(r?r.slice(9):`plaintext`,yb(t).replace(/\n$/,``))},table:({children:e})=>(0,I.jsx)(`div`,{className:`chat-table-container`,style:{overflowX:`auto`,margin:`14px 0`,width:`100%`,borderRadius:`8px`,border:`1px solid var(--border-light, rgba(255, 255, 255, 0.12))`,background:`var(--panel-bg)`,boxShadow:`var(--shadow-sm, 0 4px 12px rgba(0, 0, 0, 0.15))`},children:(0,I.jsx)(`table`,{className:`chat-table`,style:{width:`100%`,borderCollapse:`collapse`,fontSize:`0.86rem`,textAlign:`left`,lineHeight:`1.5`},children:e})}),thead:({children:e})=>(0,I.jsx)(`thead`,{children:Db.Children.map(e,e=>(0,Db.isValidElement)(e)?(0,Db.cloneElement)(e,{style:{background:`color-mix(in srgb, var(--text-main, #e2e8f0) 5%, transparent)`,borderBottom:`2px solid var(--border-light, rgba(255, 255, 255, 0.15))`}}):e)}),tbody:({children:e})=>{let t=Db.Children.toArray(e).filter(Db.isValidElement),n=0;return(0,I.jsx)(`tbody`,{children:Db.Children.toArray(e).map(e=>{if(!(0,Db.isValidElement)(e))return e;let r=n;return n+=1,(0,Db.cloneElement)(e,{key:e.key??r,style:{background:r%2==1?`color-mix(in srgb, var(--text-main, #e2e8f0) 2%, transparent)`:`transparent`,borderBottom:r<t.length-1?`1px solid var(--border, rgba(255, 255, 255, 0.08))`:`none`}})})})},tr:({children:e,style:t})=>(0,I.jsx)(`tr`,{style:t,children:e}),th:({children:e})=>(0,I.jsx)(`th`,{style:{padding:`12px 16px`,fontWeight:700,color:`var(--accent, #38bdf8)`,fontFamily:`ui-sans-serif, system-ui, sans-serif`},children:vb(e)}),td:({children:e})=>(0,I.jsx)(`td`,{style:{padding:`12px 16px`,color:`var(--text-chat, var(--text-main, #e2e8f0))`},children:vb(e)})}}));function Mb({thoughts:e,isLive:t=!1,blockKey:n,expanded:r,onExpandedChange:i,showEmptyHint:a=!1}){let o=(0,Nb.useRef)(null),s=r!==void 0&&!!i,[c,l]=(0,Nb.useState)(t),u=s?!!r:c,d=e=>{s&&i?i(n,e):l(e)};return(0,Nb.useEffect)(()=>{t&&!s&&l(!0)},[t,s]),(0,Nb.useEffect)(()=>{!t||!u||!o.current||(o.current.scrollTop=o.current.scrollHeight)},[e,t,u]),e.length===0&&!a?null:e.length===0?(0,Pb.jsx)(`div`,{className:`thinking-block thinking-block-empty-state`,"data-live":t?`true`:`false`,children:(0,Pb.jsx)(`span`,{className:`thinking-block-empty`,children:Fb.emptyHint})}):(0,Pb.jsxs)(`div`,{className:`thinking-block${t?` is-live`:``}${u?` is-expanded`:``}`,children:[(0,Pb.jsxs)(`button`,{type:`button`,className:`thinking-block-header`,onClick:()=>d(!u),"aria-expanded":u,children:[(0,Pb.jsx)(s_,{size:14,className:`thinking-block-icon`,style:{flexShrink:0}}),(0,Pb.jsx)(`span`,{className:`thinking-block-label`,children:t?Fb.live:Fb.completed(e.length)}),t&&(0,Pb.jsx)(`span`,{className:`thinking-block-live-dot`,"aria-hidden":`true`}),(0,Pb.jsx)(`span`,{className:`thinking-block-chevron${u?` is-open`:``}`,"aria-hidden":`true`,children:(0,Pb.jsx)(g_,{size:13,strokeWidth:2.2})})]}),u&&(0,Pb.jsx)(`div`,{className:`thinking-block-body`,children:(0,Pb.jsx)(`div`,{className:`thinking-block-content`,ref:o,children:e.map((t,r)=>(0,Pb.jsxs)(`div`,{className:`thinking-block-step`,children:[e.length>1&&(0,Pb.jsx)(`div`,{className:`thinking-block-step-label`,children:Fb.step(r+1)}),(0,Pb.jsx)(`div`,{className:`thinking-block-step-body`,children:Eb(t)})]},`${n}-${r}`))})})]})}var Nb,Pb,Fb,Ib=t((()=>{Nb=e(A()),Iv(),jb(),Pb=j(),Fb={live:`Thinking…`,completed:e=>`Thinking process (${e} steps)`,step:e=>`Step ${e}`,emptyHint:`Model didn't send thinking steps this time`}}));function Lb(e){let t=new Map;for(let n of e){let e=n.domain.toLowerCase().trim();if(t.has(e))t.get(e).items.push(n);else{let r=e;/^[^.]+\.com$/i.test(r)?r=r.replace(/\.com$/i,``):/^[^.]+\.org$/i.test(r)?r=r.replace(/\.org$/i,``):/^[^.]+\.net$/i.test(r)&&(r=r.replace(/\.net$/i,``)),t.set(e,{domain:n.domain,displayDomain:r,faviconUrl:n.faviconUrl,items:[n]})}}return Array.from(t.values())}var Rb,zb,Bb,Vb=t((()=>{Rb=e(A()),jb(),zb=j(),Bb=Rb.memo(function({sources:e}){let[t,n]=(0,Rb.useState)(!1),[r,i]=(0,Rb.useState)(null),a=(0,Rb.useMemo)(()=>[...Lb(e)].sort((e,t)=>{let n=+!!e.items[0]?.imageUrl;return+!!t.items[0]?.imageUrl-n}),[e]);if(!e||e.length===0)return null;let o=t?a:a.slice(0,3),s=a.slice(0,3).reduce((e,t)=>e+t.items.length,0),c=e.length-s,l=a.slice(3);return(0,zb.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`10px`,marginBottom:`12px`,marginTop:`4px`},children:[(0,zb.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,zb.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{color:`#94a3b8`},children:(0,zb.jsx)(`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20`})}),(0,zb.jsx)(`span`,{style:{fontSize:`0.85rem`,fontWeight:600,color:`#f1f5f9`,letterSpacing:`0.01em`},children:`Sources`})]}),(0,zb.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`8px`},children:[o.map((e,t)=>{let n=e.items[0],a=e.items.length-1,o=r===e.domain;return(0,zb.jsxs)(`div`,{style:{position:`relative`,flex:`1 1 180px`,maxWidth:`240px`,minWidth:`160px`,boxSizing:`border-box`},children:[(0,zb.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,justifyContent:`space-between`,borderRadius:`10px`,background:`rgba(255, 255, 255, 0.04)`,border:`1px solid rgba(255, 255, 255, 0.08)`,transition:`all 0.15s ease`,cursor:`pointer`,minHeight:`68px`,height:`100%`,boxSizing:`border-box`,overflow:`hidden`},onClick:t=>{let r=t.target;if(a>0&&r.closest(`.extra-badge-btn`)){t.stopPropagation(),i(o?null:e.domain);return}window.open(n.url,`_blank`,`noopener,noreferrer`)},onMouseEnter:e=>{let t=e.currentTarget;t.style.background=`rgba(255, 255, 255, 0.07)`,t.style.borderColor=`rgba(255, 255, 255, 0.16)`,t.style.transform=`translateY(-1px)`},onMouseLeave:e=>{let t=e.currentTarget;t.style.background=`rgba(255, 255, 255, 0.04)`,t.style.borderColor=`rgba(255, 255, 255, 0.08)`,t.style.transform=`translateY(0)`},children:[n.imageUrl&&(0,zb.jsx)(`div`,{style:{width:`100%`,height:`80px`,overflow:`hidden`,background:`rgba(255,255,255,0.06)`,flexShrink:0},children:(0,zb.jsx)(`img`,{src:Ob(n.imageUrl),alt:n.title,loading:`lazy`,referrerPolicy:`no-referrer`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`},onError:e=>{e.currentTarget.parentElement.style.display=`none`}})}),(0,zb.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,flex:1,padding:`10px 12px`},children:[(0,zb.jsx)(`div`,{title:n.title,style:{fontSize:`0.8rem`,fontWeight:500,color:`#f1f5f9`,lineHeight:`1.3`,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`,marginBottom:`8px`,wordBreak:`break-word`},children:n.title}),(0,zb.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:`auto`,paddingTop:`2px`},children:[(0,zb.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,overflow:`hidden`,marginRight:`6px`},children:[(0,zb.jsx)(`img`,{src:e.faviconUrl,alt:``,width:14,height:14,style:{borderRadius:`3px`,flexShrink:0},onError:e=>{e.currentTarget.style.display=`none`}}),(0,zb.jsx)(`span`,{style:{fontSize:`0.73rem`,color:`#94a3b8`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.displayDomain})]}),a>0?(0,zb.jsxs)(`button`,{type:`button`,className:`extra-badge-btn`,title:`${a} extra page${a>1?`s`:``} from ${e.domain} — click to view`,style:{fontSize:`0.68rem`,fontWeight:600,color:`#38bdf8`,background:`rgba(56, 189, 248, 0.12)`,border:`1px solid rgba(56, 189, 248, 0.3)`,padding:`1px 6px`,borderRadius:`4px`,flexShrink:0,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`2px`},onClick:t=>{t.stopPropagation(),i(o?null:e.domain)},children:[`+`,a]}):(0,zb.jsxs)(`span`,{style:{fontSize:`0.7rem`,color:`#64748b`,fontWeight:500,flexShrink:0},children:[`•`,t+1]})]})]})]}),o&&a>0&&(0,zb.jsxs)(`div`,{style:{position:`absolute`,top:`100%`,left:0,width:`260px`,marginTop:`6px`,background:`#18181b`,border:`1px solid rgba(255, 255, 255, 0.15)`,borderRadius:`8px`,boxShadow:`0 10px 25px rgba(0,0,0,0.6)`,zIndex:40,padding:`6px`,display:`flex`,flexDirection:`column`,gap:`4px`},children:[(0,zb.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`4px 6px`,borderBottom:`1px solid rgba(255,255,255,0.06)`},children:[(0,zb.jsxs)(`span`,{style:{fontSize:`0.7rem`,fontWeight:600,color:`#94a3b8`},children:[`All links from `,e.domain,` (`,e.items.length,`)`]}),(0,zb.jsx)(`button`,{type:`button`,style:{background:`none`,border:`none`,color:`#64748b`,cursor:`pointer`,fontSize:`0.8rem`,padding:`0 2px`},onClick:()=>i(null),children:`✕`})]}),e.items.map((e,t)=>(0,zb.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,style:{display:`flex`,flexDirection:`column`,gap:`2px`,padding:`6px 8px`,borderRadius:`6px`,color:`#e2e8f0`,textDecoration:`none`,fontSize:`0.75rem`,background:`rgba(255,255,255,0.02)`,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.08)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.02)`},children:[(0,zb.jsxs)(`div`,{style:{fontWeight:500,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:[t+1,`. `,e.title]}),(0,zb.jsx)(`div`,{style:{fontSize:`0.68rem`,color:`#64748b`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.url})]},t))]})]},e.domain)}),!t&&c>0&&(0,zb.jsxs)(`div`,{onClick:()=>n(!0),style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderRadius:`10px`,background:`rgba(255, 255, 255, 0.03)`,border:`1px solid rgba(255, 255, 255, 0.08)`,cursor:`pointer`,transition:`all 0.15s ease`,minHeight:`68px`,height:`100%`,flex:`1 1 160px`,maxWidth:`200px`,boxSizing:`border-box`},onMouseEnter:e=>{let t=e.currentTarget;t.style.background=`rgba(255, 255, 255, 0.06)`,t.style.borderColor=`rgba(255, 255, 255, 0.16)`,t.style.transform=`translateY(-1px)`},onMouseLeave:e=>{let t=e.currentTarget;t.style.background=`rgba(255, 255, 255, 0.03)`,t.style.borderColor=`rgba(255, 255, 255, 0.08)`,t.style.transform=`translateY(0)`},children:[(0,zb.jsx)(`div`,{style:{display:`flex`,alignItems:`center`},children:l.slice(0,3).map((e,t)=>(0,zb.jsx)(`img`,{src:e.faviconUrl,alt:``,width:18,height:18,style:{borderRadius:`50%`,border:`1.5px solid #18181b`,marginLeft:t===0?0:`-6px`,background:`#27272a`,objectFit:`cover`},onError:e=>{e.currentTarget.style.display=`none`}},t))}),(0,zb.jsxs)(`span`,{style:{fontSize:`0.78rem`,fontWeight:500,color:`#94a3b8`,marginLeft:`8px`},children:[`View `,c,` more`]})]})]}),t&&a.length>3&&(0,zb.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-start`,marginTop:`4px`},children:(0,zb.jsx)(`button`,{type:`button`,onClick:()=>{n(!1),i(null)},style:{background:`rgba(255,255,255,0.05)`,border:`1px solid rgba(255,255,255,0.1)`,borderRadius:`6px`,padding:`4px 10px`,color:`#94a3b8`,fontSize:`0.73rem`,fontWeight:500,cursor:`pointer`,transition:`background 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(255,255,255,0.05)`},children:`Show less`})})]})})})),Hb,Ub,Wb,Gb=t((()=>{Hb=e(A()),jb(),Re(),Ib(),Bt(),Iy(),zy(),Hy(),qy(),$y(),He(),Ub=j(),Wb=Hb.memo(function(e){let{interaction:t,copiedId:n,onEditMessage:r,speakingText:i,agentActivitySnapshots:a,thinkingExpanded:o,openActivityIds:s,openReviewIds:c,openFileDiffs:l,onThinkingExpandedChange:u,handleCopyMessage:d,speak:f,renderCompletedActivity:p,renderFileChanges:m,renderWebSearchSources:h}=e,g=t.provider===`system`&&t.model===`provider_change`,_=(0,Hb.useMemo)(()=>t.userText?Eb(t.userText):null,[t.userText]),v=(0,Hb.useMemo)(()=>t.aiText?Eb(t.aiText):null,[t.aiText]);if(g){let e=(t.userText||``).replace(/^Changed model to\s*/i,``).trim();return(0,Ub.jsxs)(`div`,{className:`system-event-divider`,children:[(0,Ub.jsx)(`div`,{className:`system-event-line`}),(0,Ub.jsxs)(`div`,{className:`system-event-pill`,children:[(0,Ub.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:(0,Ub.jsx)(`path`,{d:`m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z`})}),(0,Ub.jsx)(`span`,{children:e})]}),(0,Ub.jsx)(`div`,{className:`system-event-line`})]},t.id)}let y=a[String(t.id)]??t.agentActivity??[],b=Ft(y),x=n===`user-${t.id}`,S=n===t.id,C=i===t.aiText,w=o[String(t.id)]??!1,T=(0,Hb.useMemo)(()=>{if(t.aiText&&(t.aiText.includes("```weather_json")||t.aiText.includes("```weather-json")))return null;for(let e of y||[])if(e.type===`ToolEnd`&&(e.data?.action===`weather`||e.data?.name===`weather`)){let t=e.data.result||e.data.output||``,n=typeof t==`string`&&t.match(/```weather_json\s*([\s\S]*?)\s*```/);if(n&&n[1])try{return JSON.parse(n[1])}catch{}}return null},[t.aiText,y]),E=(0,Hb.useMemo)(()=>{if(t.aiText&&(t.aiText.includes("```stock_json")||t.aiText.includes("```stock-json")))return null;for(let e of y||[])if(e.type===`ToolEnd`&&(e.data?.action===`stock`||e.data?.name===`stock`)){let t=e.data.result||e.data.output||``,n=typeof t==`string`&&t.match(/```stock_json\s*([\s\S]*?)\s*```/);if(n&&n[1])try{return JSON.parse(n[1])}catch{}}return null},[t.aiText,y]),D=(0,Hb.useMemo)(()=>{if(t.aiText&&(t.aiText.includes("```calculation_json")||t.aiText.includes("```calculation-json")))return null;for(let e of y||[])if(e.type===`ToolEnd`&&(e.data?.action===`calculation`||e.data?.name===`calculation`)){let t=e.data.result||e.data.output||``,n=typeof t==`string`&&t.match(/```calculation_json\s*([\s\S]*?)\s*```/);if(n&&n[1])try{return JSON.parse(n[1])}catch{}}return null},[t.aiText,y]),O=(0,Hb.useMemo)(()=>{if(t.aiText&&(t.aiText.includes("```image_search_json")||t.aiText.includes("```image-search-json")))return null;for(let e of y||[])if(e.type===`ToolEnd`&&(e.data?.action===`image_search`||e.data?.name===`image_search`)){let t=e.data.result||e.data.output||``,n=typeof t==`string`&&t.match(/```image_search_json\s*([\s\S]*?)\s*```/);if(n&&n[1])try{return JSON.parse(n[1])}catch{}}return null},[t.aiText,y]),ee=(0,Hb.useMemo)(()=>{if(t.aiText&&(t.aiText.includes("```image_gen_json")||t.aiText.includes("```image-gen-json")))return null;let e=new Set([`generate_image`,`image_studio.generate`,`image_generate`]);for(let t of y||[])if(t.type===`ToolEnd`&&(e.has(t.data?.action)||e.has(t.data?.name))){let e=t.data.result||t.data.output||``,n=typeof e==`string`&&e.match(/```image_gen_json\s*([\s\S]*?)\s*```/);if(n&&n[1])try{return JSON.parse(n[1])}catch{}}return null},[t.aiText,y]);return(0,Ub.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`,marginBottom:`16px`},children:[t.userText&&(0,Ub.jsx)(`div`,{className:`message user-message`,children:(0,Ub.jsxs)(`div`,{className:`bubble-wrapper`,children:[(0,Ub.jsx)(`div`,{className:`message-bubble`,children:_}),(0,Ub.jsxs)(`div`,{className:`message-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,Ub.jsx)(`span`,{children:Pt(t.createdAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}),(0,Ub.jsx)(`button`,{type:`button`,className:`msg-action-btn copy-btn ${x?`is-copied`:``}`,onClick:()=>d(`user-${t.id}`,t.userText),title:x?`คัดลอกแล้ว (Copied!)`:`คัดลอกข้อความ (Copy)`,children:gb(x)}),r&&t.provider!==`system`&&(0,Ub.jsx)(`button`,{type:`button`,className:`msg-action-btn edit-btn`,onClick:()=>r(t.userText),title:`แก้ไขและส่งใหม่ (Edit & resend)`,children:(0,Ub.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,Ub.jsx)(`path`,{d:`M12 20h9`}),(0,Ub.jsx)(`path`,{d:`M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z`})]})})]})]})}),(0,Ub.jsx)(`div`,{className:`message ai-message`,children:(0,Ub.jsxs)(`div`,{className:`bubble-wrapper`,children:[p(t),m(t),(0,Ub.jsx)(Mb,{blockKey:String(t.id),thoughts:b,expanded:w,onExpandedChange:u,showEmptyHint:Lt(y)&&b.length===0}),(0,Ub.jsxs)(`div`,{className:`message-bubble`,children:[T&&(0,Ub.jsx)(My,{data:T}),E&&(0,Ub.jsx)(Ly,{data:E}),D&&(0,Ub.jsx)(By,{data:D}),O&&(0,Ub.jsx)(Wy,{data:O}),ee&&(0,Ub.jsx)(Xy,{data:ee}),v]}),h(t),(0,Ub.jsxs)(`div`,{className:`message-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,Ub.jsxs)(`span`,{className:`provider-model-chip`,"data-provider":(t.provider||``).toLowerCase(),title:`${t.provider} • ${t.model}`,children:[(0,Ub.jsx)(`span`,{className:`provider-chip-dot`,"aria-hidden":`true`}),(0,Ub.jsx)(`span`,{className:`provider-chip-name`,children:t.provider}),(0,Ub.jsx)(`span`,{className:`provider-chip-divider`,children:`/`}),(0,Ub.jsx)(`span`,{className:`provider-chip-model`,children:t.model})]}),$e(t)&&(0,Ub.jsx)(`span`,{className:`provider-fallback-notice`,children:$e(t)}),(0,Ub.jsx)(`span`,{className:`message-timestamp`,children:Pt(t.createdAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}),(0,Ub.jsxs)(`div`,{className:`message-action-buttons`,style:{display:`flex`,alignItems:`center`,gap:`4px`,marginLeft:`auto`},children:[(0,Ub.jsx)(`button`,{type:`button`,className:`msg-action-btn copy-btn ${S?`is-copied`:``}`,onClick:()=>d(t.id,t.aiText),title:S?`คัดลอกแล้ว (Copied!)`:`คัดลอกข้อความ (Copy message)`,children:gb(S)}),(0,Ub.jsx)(`button`,{type:`button`,className:`msg-action-btn tts-btn ${C?`is-speaking`:``}`,onClick:()=>f(t.aiText),title:C?`Stop reading`:`Read aloud`,children:hb(C)})]})]})]})})]},t.id)},(e,t)=>{let n=e.interaction,r=t.interaction;return!(n.id!==r.id||n.aiText!==r.aiText||n.userText!==r.userText||n.createdAt!==r.createdAt||e.copiedId===`user-${n.id}`!=(t.copiedId===`user-${r.id}`)||e.copiedId===n.id!=(t.copiedId===r.id)||e.speakingText===n.aiText!=(t.speakingText===r.aiText)||(e.thinkingExpanded[String(n.id)]??!1)!==(t.thinkingExpanded[String(r.id)]??!1)||(e.openActivityIds?.[String(n.id)]??!1)!==(t.openActivityIds?.[String(r.id)]??!1)||(e.openReviewIds?.[String(n.id)]??!1)!==(t.openReviewIds?.[String(r.id)]??!1)||e.openFileDiffs!==t.openFileDiffs||e.agentActivitySnapshots[String(n.id)]!==t.agentActivitySnapshots[String(r.id)])})})),Kb,qb=t((()=>{Kb=`data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m6.922%203.768-.644-.536A1%201%200%200%200%205.638%203H2a1%201%200%200%200-1%201v8a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V5a1%201%200%200%200-1-1H7.562a1%201%200%200%201-.64-.232'%20fill='%2390a4ae'%20/%3e%3c/svg%3e`})),Jb,Yb=t((()=>{Jb=`data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.483%206H4.721a1%201%200%200%200-.949.684L2%2012V5h12a1%201%200%200%200-1-1H7.562a1%201%200%200%201-.64-.232l-.644-.536A1%201%200%200%200%205.638%203H2a1%201%200%200%200-1%201v8a1%201%200%200%200%201%201h11l2.403-5.606A1%201%200%200%200%2014.483%206'%20fill='%2390a4ae'%20/%3e%3c/svg%3e`})),Xb,Zb=t((()=>{Xb=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23c0ca33'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23f0f4c3'%20d='M12%2020h8v8h-8zm10%200h8v8h-8zM12%2010h8v8h-8zm8.343%204L26%208.343%2031.657%2014%2026%2019.657z'/%3e%3c/svg%3e`})),Qb,$b=t((()=>{Qb=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23c0ca33'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23f0f4c3'%20d='M12%2020h8v8h-8zm10%200h8v8h-8zM12%2010h8v8h-8zm8.343%204L26%208.343%2031.657%2014%2026%2019.657z'/%3e%3c/svg%3e`})),ex,tx=t((()=>{ex=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23e57373'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23ffcdd2'%20d='M30%2014h-4v-2l-2-2h-4l-2%202v2h-4a2%202%200%200%200-2%202v10a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V16a2%202%200%200%200-2-2m-10%200v-2h4v2Z'/%3e%3c/svg%3e`})),nx,rx=t((()=>{nx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23e57373'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23ffcdd2'%20d='M30%2014h-4v-2l-2-2h-4l-2%202v2h-4a2%202%200%200%200-2%202v10a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V16a2%202%200%200%200-2-2m-10%200v-2h4v2Z'/%3e%3c/svg%3e`})),ix,ax=t((()=>{ix=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%230277bd'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23b3e5fc'%20d='M24%2010h-7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V16Zm0%2016h-6v-2h6Zm4-4H18v-2h10Zm-4.828-5.172V12L28%2016.828Z'/%3e%3c/svg%3e`})),ox,sx=t((()=>{ox=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%230277bd'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23b3e5fc'%20d='M24%2010h-7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V16Zm0%2016h-6v-2h6Zm4-4H18v-2h10Zm-4.828-5.172V12L28%2016.828Z'/%3e%3c/svg%3e`})),cx,lx=t((()=>{cx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23ffccbc'%20d='m12.593%2018.589%205.784-5.794%201.692%201.7a1.98%201.98%200%200%200%20.93%202.233v5.544a1.99%201.99%200%200%200-1%201.731%202.002%202.002%200%200%200%204.003%200A1.99%201.99%200%200%200%2023%2022.272v-4.864l2.071%202.092a1.2%201.2%200%200%200-.07.5%202.002%202.002%200%201%200%202.002-2.002%201.2%201.2%200%200%200-.5.07l-2.573-2.571a1.98%201.98%200%200%200-1.15-2.342%202.1%202.1%200%200%200-1.281-.09l-1.702-1.692.791-.78a1.975%201.975%200%200%201%202.822%200l7.996%207.996a1.975%201.975%200%200%201%200%202.822l-7.996%207.996a1.975%201.975%200%200%201-2.822%200l-7.996-7.996a1.975%201.975%200%200%201%200-2.822Z'/%3e%3c/svg%3e`})),ux,dx=t((()=>{ux=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23ffccbc'%20d='m12.593%2018.589%205.784-5.794%201.692%201.7a1.98%201.98%200%200%200%20.93%202.233v5.544a1.99%201.99%200%200%200-1%201.731%202.002%202.002%200%200%200%204.003%200A1.99%201.99%200%200%200%2023%2022.272v-4.864l2.071%202.092a1.2%201.2%200%200%200-.07.5%202.002%202.002%200%201%200%202.002-2.002%201.2%201.2%200%200%200-.5.07l-2.573-2.571a1.98%201.98%200%200%200-1.15-2.342%202.1%202.1%200%200%200-1.281-.09l-1.702-1.692.791-.78a1.975%201.975%200%200%201%202.822%200l7.996%207.996a1.975%201.975%200%200%201%200%202.822l-7.996%207.996a1.975%201.975%200%200%201-2.822%200l-7.996-7.996a1.975%201.975%200%200%201%200-2.822Z'/%3e%3c/svg%3e`})),fx,px=t((()=>{fx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23546e7a'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23eceff1'%20d='M23%2010a9.03%209.03%200%200%200-9%209.063%209.08%209.08%200%200%200%206.157%208.609c.45.072.593-.21.593-.453v-1.532c-2.493.544-3.024-1.214-3.024-1.214a2.42%202.42%200%200%200-.998-1.333c-.82-.561.062-.544.062-.544a1.9%201.9%200%200%201%201.377.933%201.925%201.925%200%200%200%202.62.754%201.96%201.96%200%200%201%20.566-1.215c-1.998-.227-4.094-1.007-4.094-4.459a3.52%203.52%200%200%201%20.927-2.456%203.26%203.26%200%200%201%20.09-2.392s.754-.245%202.474.924a8.6%208.6%200%200%201%204.5%200c1.718-1.169%202.476-.924%202.476-.924a3.26%203.26%200%200%201%20.088%202.392%203.52%203.52%200%200%201%20.927%202.456c0%203.462-2.105%204.223-4.112%204.45a2.17%202.17%200%200%201%20.622%201.676v2.484c0%20.244.143.533.602.453A9.08%209.08%200%200%200%2023%2010'/%3e%3c/svg%3e`})),mx,hx=t((()=>{mx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23546e7a'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23eceff1'%20d='M23%2010a9.03%209.03%200%200%200-9%209.063%209.08%209.08%200%200%200%206.157%208.609c.45.072.593-.21.593-.453v-1.532c-2.493.544-3.024-1.214-3.024-1.214a2.42%202.42%200%200%200-.998-1.333c-.82-.561.062-.544.062-.544a1.9%201.9%200%200%201%201.377.933%201.925%201.925%200%200%200%202.62.754%201.96%201.96%200%200%201%20.566-1.215c-1.998-.227-4.094-1.007-4.094-4.459a3.52%203.52%200%200%201%20.927-2.456%203.26%203.26%200%200%201%20.09-2.392s.754-.245%202.474.924a8.6%208.6%200%200%201%204.5%200c1.718-1.169%202.476-.924%202.476-.924a3.26%203.26%200%200%201%20.088%202.392%203.52%203.52%200%200%201%20.927%202.456c0%203.462-2.105%204.223-4.112%204.45a2.17%202.17%200%200%201%20.622%201.676v2.484c0%20.244.143.533.602.453A9.08%209.08%200%200%200%2023%2010'/%3e%3c/svg%3e`})),gx,_x=t((()=>{gx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23009688'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23b2dfdb'%20d='M24%2010h-7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V16Zm-4%206a2%202%200%201%201-2%202%202.01%202.01%200%200%201%202-2m8%2010H18l4-4%202%202%204-4Zm-4.828-9.172V12L28%2016.828Z'/%3e%3c/svg%3e`})),vx,yx=t((()=>{vx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23009688'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23b2dfdb'%20d='M24%2010h-7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V16Zm-4%206a2%202%200%201%201-2%202%202.01%202.01%200%200%201%202-2m8%2010H18l4-4%202%202%204-4Zm-4.828-9.172V12L28%2016.828Z'/%3e%3c/svg%3e`})),bx,xx=t((()=>{bx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23afb42b'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23afb42b'%20d='M20%2014h8v2h-8zm0%204h8v2h-8zm0%204h6v2h-6z'/%3e%3cpath%20fill='%23f0f4c3'%20d='M30.337%2014H17.663A1.663%201.663%200%200%200%2016%2015.663v10.674A1.663%201.663%200%200%200%2017.663%2028h12.674A1.663%201.663%200%200%200%2032%2026.337V15.663A1.663%201.663%200%200%200%2030.337%2014M26%2026h-6v-2h6Zm2-4h-8v-2h8Zm0-4h-8v-2h8Z'/%3e%3c/svg%3e`})),Sx,Cx=t((()=>{Sx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23afb42b'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23f0f4c3'%20d='M30.337%2014H17.663A1.663%201.663%200%200%200%2016%2015.663v10.674A1.663%201.663%200%200%200%2017.663%2028h12.674A1.663%201.663%200%200%200%2032%2026.337V15.663A1.663%201.663%200%200%200%2030.337%2014M26%2026h-6v-2h6Zm2-4h-8v-2h8Zm0-4h-8v-2h8Z'/%3e%3c/svg%3e`})),wx,Tx=t((()=>{wx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%238bc34a'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23dcedc8'%20d='m25%2012-7%204.072v7.854L25%2028l7-4.074v-7.854Z'/%3e%3c/svg%3e`})),Ex,Dx=t((()=>{Ex=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%238bc34a'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23dcedc8'%20d='m25%2012-7%204.072v7.854L25%2028l7-4.074v-7.854Z'/%3e%3c/svg%3e`})),Ox,kx=t((()=>{Ox=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23039be5'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23b3e5fc'%20d='M22%2010a10%2010%200%201%200%2010%2010%2010%2010%200%200%200-10-10m6.918%206H25.96a15.8%2015.8%200%200%200-1.342-3.54%208.04%208.04%200%200%201%204.3%203.54M22%2012a14.1%2014.1%200%200%201%201.89%204h-3.78A14.1%2014.1%200%200%201%2022%2012m-2.618.46A15.8%2015.8%200%200%200%2018.04%2016h-2.958a8.04%208.04%200%200%201%204.3-3.54M14.263%2022a7.7%207.7%200%200%201%200-4h3.407a15.5%2015.5%200%200%200%200%204Zm.82%202h2.957a15.8%2015.8%200%200%200%201.342%203.54%208.04%208.04%200%200%201-4.3-3.54ZM22%2028a14.1%2014.1%200%200%201-1.89-4h3.78A14.1%2014.1%200%200%201%2022%2028m2.31-6h-4.62a13.4%2013.4%200%200%201%200-4h4.62a13.4%2013.4%200%200%201%200%204m.308%205.54A15.8%2015.8%200%200%200%2025.96%2024h2.958a8.04%208.04%200%200%201-4.3%203.54M29.737%2022H26.33a15.5%2015.5%200%200%200%200-4h3.407a7.7%207.7%200%200%201%200%204'/%3e%3c/svg%3e`})),Ax,jx=t((()=>{Ax=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23039be5'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23b3e5fc'%20d='M22%2010a10%2010%200%201%200%2010%2010%2010%2010%200%200%200-10-10m6.918%206H25.96a15.8%2015.8%200%200%200-1.342-3.54%208.04%208.04%200%200%201%204.3%203.54M22%2012a14.1%2014.1%200%200%201%201.89%204h-3.78A14.1%2014.1%200%200%201%2022%2012m-2.618.46A15.8%2015.8%200%200%200%2018.04%2016h-2.958a8.04%208.04%200%200%201%204.3-3.54M14.263%2022a7.7%207.7%200%200%201%200-4h3.407a15.5%2015.5%200%200%200%200%204Zm.82%202h2.957a15.8%2015.8%200%200%200%201.342%203.54%208.04%208.04%200%200%201-4.3-3.54ZM22%2028a14.1%2014.1%200%200%201-1.89-4h3.78A14.1%2014.1%200%200%201%2022%2028m2.31-6h-4.62a13.4%2013.4%200%200%201%200-4h4.62a13.4%2013.4%200%200%201%200%204m.308%205.54A15.8%2015.8%200%200%200%2025.96%2024h2.958a8.04%208.04%200%200%201-4.3%203.54M29.737%2022H26.33a15.5%2015.5%200%200%200%200-4h3.407a7.7%207.7%200%200%201%200%204'/%3e%3c/svg%3e`})),Mx,Nx=t((()=>{Mx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23ffccbc'%20d='M30%2024v1a1%201%200%200%201-2%200v-1a2%202%200%200%200-2-2%203%203%200%200%200%202.996-3.16A3.115%203.114%200%200%200%2025.83%2016H14v2h2v8h-2v2h8v-2h-2v-2h4c.82.819.297%202.308%201.179%203.37a1.89%201.89%200%200%200%201.46.63H32v-4zm-6-4h-4v-2h4a1%201%200%200%201%200%202'/%3e%3c/svg%3e`})),Px,Fx=t((()=>{Px=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23ffccbc'%20d='M30%2024v1a1%201%200%200%201-2%200v-1a2%202%200%200%200-2-2%203%203%200%200%200%202.996-3.16A3.115%203.114%200%200%200%2025.83%2016H14v2h2v8h-2v2h8v-2h-2v-2h4c.82.819.297%202.308%201.179%203.37a1.89%201.89%200%200%200%201.46.63H32v-4zm-6-4h-4v-2h4a1%201%200%200%201%200%202'/%3e%3c/svg%3e`})),Ix,Lx=t((()=>{Ix=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23546e7a'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23cfd8dc'%20d='M28%2012h-6a4%204%200%200%200-4%204v8h2v-8h8v9.893a2.074%202.074%200%200%201-1.664%202.08A2%202%200%200%201%2024%2026h-8a4%204%200%200%200%204%204h6a4%204%200%200%200%204-4V16h2a4%204%200%200%200-4-4'/%3e%3c/svg%3e`})),Rx,zx=t((()=>{Rx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23546e7a'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23cfd8dc'%20d='M28%2012h-6a4%204%200%200%200-4%204v8h2v-8h8v9.893a2.074%202.074%200%200%201-1.664%202.08A2%202%200%200%201%2024%2026h-8a4%204%200%200%200%204%204h6a4%204%200%200%200%204-4V16h2a4%204%200%200%200-4-4'/%3e%3c/svg%3e`})),Bx,Vx=t((()=>{Bx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%234caf50'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23c8e6c9'%20d='M18.435%2030a1%201%200%200%201-.238-.028%201.137%201.137%200%200%201-.828-1.323l3.093-15.744a1.13%201.13%200%200%201%20.507-.744%201.06%201.06%200%200%201%20.8-.134%201.14%201.14%200%200%201%20.828%201.324l-3.1%2015.744a1.12%201.12%200%200%201-.505.743%201.06%201.06%200%200%201-.557.162m6.2-2h-.077a1.08%201.08%200%200%201-.762-.412%201.164%201.164%200%200%201%20.113-1.548l5.32-4.967-5.297-4.623a1.165%201.165%200%200%201-.162-1.544%201.08%201.08%200%200%201%20.754-.437%201.06%201.06%200%200%201%20.81.258l6.244%205.455a1.156%201.156%200%200%201%20.004%201.723l-6.22%205.808a1.07%201.07%200%200%201-.728.289Zm-9.31%200a1.07%201.07%200%200%201-.728-.292l-6.225-5.811a1.16%201.16%200%200%201-.01-1.692l.02-.018%206.246-5.454a1.03%201.03%200%200%201%20.8-.26%201.08%201.08%200%200%201%20.758.436%201.165%201.165%200%200%201-.16%201.547l-5.293%204.62%205.32%204.964a1.156%201.156%200%200%201%20.112%201.548%201.07%201.07%200%200%201-.762.412Z'/%3e%3c/svg%3e`})),Hx,Ux=t((()=>{Hx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%234caf50'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23c8e6c9'%20d='M18.473%2030a1%201%200%200%201-.238-.028%201.137%201.137%200%200%201-.828-1.323L20.5%2012.905a1.13%201.13%200%200%201%20.507-.744%201.06%201.06%200%200%201%20.8-.134%201.14%201.14%200%200%201%20.828%201.324l-3.101%2015.744a1.12%201.12%200%200%201-.504.743%201.06%201.06%200%200%201-.557.162m6.2-2h-.077a1.08%201.08%200%200%201-.762-.412%201.164%201.164%200%200%201%20.113-1.548l5.319-4.967-5.296-4.623a1.165%201.165%200%200%201-.162-1.544%201.08%201.08%200%200%201%20.754-.437%201.06%201.06%200%200%201%20.81.258l6.244%205.455a1.156%201.156%200%200%201%20.003%201.723l-6.218%205.808a1.07%201.07%200%200%201-.729.289Zm-9.31%200a1.07%201.07%200%200%201-.728-.292l-6.226-5.811a1.16%201.16%200%200%201-.01-1.692l.02-.018%206.246-5.454a1.03%201.03%200%200%201%20.8-.26%201.08%201.08%200%200%201%20.76.436%201.165%201.165%200%200%201-.16%201.547l-5.294%204.62%205.32%204.964a1.156%201.156%200%200%201%20.112%201.548%201.07%201.07%200%200%201-.762.412Z'/%3e%3c/svg%3e`})),Wx,Gx=t((()=>{Wx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23455a64'%20d='m13.843%207.536-1.288-1.072A2%202%200%200%200%2011.275%206H3.999a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.123a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23ffca28'%20d='M27.157%2016.551c0%201.319-1.43%202.143-2.573%201.483a1.7%201.7%200%200%201-.355-.271c-.934-.933-.506-2.525.768-2.867a1.716%201.716%200%200%201%202.16%201.655'/%3e%3cpath%20fill='%2326c6da'%20d='M22.556%2019.744c-.947%200-1.715.767-1.715%201.712%200%20.946.768%201.713%201.715%201.713.949%200%201.717-.767%201.717-1.713%200-.945-.768-1.712-1.717-1.712'/%3e%3cpath%20fill='%23ffca28'%20d='M28.996%2022.041a6.6%206.6%200%200%201-2.261.918%204.6%204.6%200%200%200%20.226-2.07%204.593%204.593%200%200%200%20.521-8.455%204.6%204.6%200%200%200-5.775%201.44%207.6%207.6%200%200%200-2.51.731%206.55%206.55%200%200%201%2012.798%202.191%206.54%206.54%200%200%201-2.999%205.245m-9.722-6.245%201.607.195a4.6%204.6%200%200%201%20.203-.911%206.6%206.6%200%200%200-1.81.716'%20clip-rule='evenodd'/%3e%3cpath%20fill='%2326c6da'%20d='M18.995%2015.967a6.6%206.6%200%200%201%202.276-.926%204.6%204.6%200%200%200-.257%202.079%204.6%204.6%200%200%200-2.863%203.005c-.893%202.969%201.352%205.951%204.454%205.916a4.6%204.6%200%200%200%203.687-1.914%207.7%207.7%200%200%200%202.509-.724%206.553%206.553%200%200%201-10.212%203.266c-3.617-2.742-3.41-8.24.406-10.702m9.72%206.245-.03.016z'%20clip-rule='evenodd'/%3e%3c/svg%3e`})),Kx,qx=t((()=>{Kx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23455a64'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124c-.468%200-.921-.164-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23ffca28'%20d='M27.163%2016.551c0%201.319-1.428%202.143-2.57%201.483a1.6%201.6%200%200%201-.354-.271%201.714%201.714%200%201%201%202.924-1.212'/%3e%3cpath%20fill='%2326c6da'%20d='M22.568%2019.744a1.713%201.713%200%201%200%200%203.426%201.713%201.713%200%200%200%200-3.426'/%3e%3cpath%20fill='%23ffca28'%20d='M29%2022.041a6.6%206.6%200%200%201-2.259.918%204.6%204.6%200%200%200%20.226-2.07%204.596%204.596%200%200%200%20.521-8.455%204.594%204.594%200%200%200-5.768%201.44%207.6%207.6%200%200%200-2.507.731%206.54%206.54%200%200%201%207.351-4.511A6.542%206.542%200%200%201%2029%2022.041m-9.71-6.245%201.605.195a4.7%204.7%200%200%201%20.202-.911%206.5%206.5%200%200%200-1.807.716'%20clip-rule='evenodd'/%3e%3cpath%20fill='%2326c6da'%20d='M19.011%2015.967a6.5%206.5%200%200%201%202.273-.926%204.6%204.6%200%200%200-.257%202.079%204.6%204.6%200%200%200-2.859%203.005c-.892%202.969%201.35%205.951%204.449%205.916a4.6%204.6%200%200%200%203.682-1.914%207.7%207.7%200%200%200%202.506-.724%206.54%206.54%200%200%201-10.2%203.266c-3.612-2.742-3.405-8.24.406-10.702m9.708%206.245-.03.016z'%20clip-rule='evenodd'/%3e%3c/svg%3e`})),Jx,Yx=t((()=>{Jx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%2300bfa5'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23a7ffeb'%20d='M16%2012v2h2v12a4%204%200%200%200%208%200V14h2v-2Zm5%2014a1%201%200%201%201%201-1%201%201%200%200%201-1%201m2-4a1%201%200%201%201%201-1%201%201%200%200%201-1%201m1-4h-4v-4h4Z'/%3e%3c/svg%3e`})),Xx,Zx=t((()=>{Xx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%2300bfa5'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23a7ffeb'%20d='M16%2012v2h2v12a4%204%200%200%200%208%200V14h2v-2Zm5%2014a1%201%200%201%201%201-1%201%201%200%200%201-1%201m2-4a1%201%200%201%201%201-1%201%201%200%200%201-1%201m1-4h-4v-4h4Z'/%3e%3c/svg%3e`})),Qx,$x=t((()=>{Qx=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ab47bc'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23e1bee7'%20d='M16%2014h16v6H16zm0%208h6v6h-6zm8%200h8v6h-8z'/%3e%3c/svg%3e`})),eS,tS=t((()=>{eS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ab47bc'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23e1bee7'%20d='M16%2014h16v6H16zm0%208h6v6h-6zm8%200h8v6h-8z'/%3e%3c/svg%3e`})),nS,rS=t((()=>{nS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%237cb342'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23dcedc8'%20d='M31%2012H19a1%201%200%200%200-1%201v12a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V13a1%201%200%200%200-1-1m-1%208h-4v4h-2v-4h-4v-2h4v-4h2v4h4Z'/%3e%3cpath%20fill='%23dcedc8'%20d='M16%2028V16h-2v13a1%201%200%200%200%201%201h13v-2Z'/%3e%3c/svg%3e`})),iS,aS=t((()=>{iS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%237cb342'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23dcedc8'%20d='M31%2012H19a1%201%200%200%200-1%201v12a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V13a1%201%200%200%200-1-1m-1%208h-4v4h-2v-4h-4v-2h4v-4h2v4h4Z'/%3e%3cpath%20fill='%23dcedc8'%20d='M16%2028V16h-2v13a1%201%200%200%200%201%201h13v-2Z'/%3e%3c/svg%3e`})),oS,sS=t((()=>{oS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%237e57c2'%20d='M20%2018h-2v-2h-2v2c0%20.193%200%20.703%201.254%201.033A3.345%203.345%200%200%201%2020%2022h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356%2020.34%2020%2018.84%2020%2018m-3.254%202.966C14.356%2020.34%2014%2018.84%2014%2018h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034'/%3e%3cpath%20fill='%237e57c2'%20d='M24%204H4v20a4%204%200%200%200%204%204h16.16A3.84%203.84%200%200%200%2028%2024.16V8a4%204%200%200%200-4-4m2%2014h-2v-2h-2v2c0%20.193%200%20.703%201.254%201.033A3.345%203.345%200%200%201%2026%2022v2a2%202%200%200%201-2%202h-2a2%202%200%200%201-2-2%202%202%200%200%201-2%202h-2a2%202%200%200%201-2-2%202%202%200%200%201-2%202h-2a2%202%200%200%201-2-2v-8a2%202%200%200%201%202-2h2a2%202%200%200%201%202%202%202%202%200%200%201%202-2h2a2%202%200%200%201%202%202%202%202%200%200%201%202-2h2a2%202%200%200%201%202%202Z'/%3e%3c/svg%3e`})),cS=t((()=>{})),lS,uS=t((()=>{lS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23e65100'%20d='m4%204%202%2022%2010%202%2010-2%202-22Zm19.72%207H11.28l.29%203h11.86l-.802%209.335L15.99%2025l-6.635-1.646L8.93%2019h3.02l.19%202%203.86.77%203.84-.77.29-4H8.84L8%208h16Z'/%3e%3c/svg%3e`})),dS,fS=t((()=>{dS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%2326a69a'%20d='M8.5%206h4l-4-4zM3.875%201H9.5l4%204v8.6c0%20.773-.616%201.4-1.375%201.4h-8.25c-.76%200-1.375-.627-1.375-1.4V2.4c0-.777.612-1.4%201.375-1.4M4%2013.6h8V8l-2.625%202.8L8%209.4zm1.25-7.7c-.76%200-1.375.627-1.375%201.4s.616%201.4%201.375%201.4c.76%200%201.375-.627%201.375-1.4S6.009%205.9%205.25%205.9'/%3e%3c/svg%3e`})),pS,mS=t((()=>{pS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%23ffca28'%20d='M2%202v12h12V2zm6%206h1v4a1.003%201.003%200%200%201-1%201H7a1.003%201.003%200%200%201-1-1v-1h1v1h1zm3%200h2v1h-2v1h1a1.003%201.003%200%200%201%201%201v1a1.003%201.003%200%200%201-1%201h-2v-1h2v-1h-1a1.003%201.003%200%200%201-1-1V9a1.003%201.003%200%200%201%201-1'/%3e%3c/svg%3e`})),hS,gS=t((()=>{hS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%20-960%20960%20960'%3e%3cpath%20fill='%23f9a825'%20d='M560-160v-80h120q17%200%2028.5-11.5T720-280v-80q0-38%2022-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50%200%2085%2035t35%2085v80q0%2017%2011.5%2028.5T840-560h40v160h-40q-17%200-28.5%2011.5T800-360v80q0%2050-35%2085t-85%2035zm-280%200q-50%200-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17%200%2028.5-11.5T160-600v-80q0-50%2035-85t85-35h120v80H280q-17%200-28.5%2011.5T240-680v80q0%2038-22%2069t-58%2044v14q36%2013%2058%2044t22%2069v80q0%2017%2011.5%2028.5T280-240h120v80z'/%3e%3c/svg%3e`})),_S,vS=t((()=>{_S=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ffd54f'%20d='M25%2012h-3V8a6%206%200%200%200-12%200v4H7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h18a1%201%200%200%200%201-1V13a1%201%200%200%200-1-1M14%208a2%202%200%200%201%204%200v4h-4Zm2%2017a4%204%200%201%201%204-4%204%204%200%200%201-4%204'/%3e%3c/svg%3e`})),yS,bS=t((()=>{yS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'/%3e%3cpath%20fill='%23afb42b'%20d='M19%205v9h-5v5H5V5zm0-2H5c-1.1%200-2%20.9-2%202v14c0%201.1.9%202%202%202h10l6-6V5c0-1.1-.9-2-2-2m-7%2011H7v-2h5zm5-4H7V8h10z'/%3e%3c/svg%3e`})),xS,SS=t((()=>{xS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%2342a5f5'%20d='m14%2010-4%203.5L6%2010H4v12h4v-6l2%202%202-2v6h4V10zm12%206v-6h-4v6h-4l6%208%206-8z'/%3e%3c/svg%3e`})),CS,wS=t((()=>{CS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23e53935'%20d='M4%204v24h24V4Zm20%2020h-4V12h-4v12H8V8h16Z'/%3e%3c/svg%3e`})),TS,ES=t((()=>{TS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%2300bcd4'%20d='M16%2012c7.444%200%2012%202.59%2012%204s-4.556%204-12%204-12-2.59-12-4%204.556-4%2012-4m0-2c-7.732%200-14%202.686-14%206s6.268%206%2014%206%2014-2.686%2014-6-6.268-6-14-6'/%3e%3cpath%20fill='%2300bcd4'%20d='M16%2014a2%202%200%201%200%202%202%202%202%200%200%200-2-2'/%3e%3cpath%20fill='%2300bcd4'%20d='M10.458%205.507c2.017%200%205.937%203.177%209.006%208.493%203.722%206.447%203.757%2011.687%202.536%2012.392a.9.9%200%200%201-.457.1c-2.017%200-5.938-3.176-9.007-8.492C8.814%2011.553%208.779%206.313%2010%205.608a.9.9%200%200%201%20.458-.1m-.001-2A2.87%202.87%200%200%200%209%203.875C6.13%205.532%206.938%2012.304%2010.804%2019c3.284%205.69%207.72%209.493%2010.74%209.493A2.87%202.87%200%200%200%2023%2028.124c2.87-1.656%202.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z'/%3e%3cpath%20fill='%2300bcd4'%20d='M21.543%205.507a.9.9%200%200%201%20.457.1c1.221.706%201.186%205.946-2.536%2012.393-3.07%205.316-6.99%208.493-9.007%208.493a.9.9%200%200%201-.457-.1C8.779%2025.686%208.814%2020.446%2012.536%2014c3.07-5.316%206.99-8.493%209.007-8.493m0-2c-3.02%200-7.455%203.804-10.74%209.493C6.939%2019.696%206.13%2026.468%209%2028.124a2.87%202.87%200%200%200%201.457.369c3.02%200%207.455-3.804%2010.74-9.493C25.061%2012.304%2025.87%205.532%2023%203.876a2.87%202.87%200%200%200-1.457-.369'/%3e%3c/svg%3e`})),DS,OS=t((()=>{DS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%230288d1'%20d='M16%2012c7.444%200%2012%202.59%2012%204s-4.556%204-12%204-12-2.59-12-4%204.556-4%2012-4m0-2c-7.732%200-14%202.686-14%206s6.268%206%2014%206%2014-2.686%2014-6-6.268-6-14-6'/%3e%3cpath%20fill='%230288d1'%20d='M16%2014a2%202%200%201%200%202%202%202%202%200%200%200-2-2'/%3e%3cpath%20fill='%230288d1'%20d='M10.458%205.507c2.017%200%205.937%203.177%209.006%208.493%203.722%206.447%203.757%2011.687%202.536%2012.392a.9.9%200%200%201-.457.1c-2.017%200-5.938-3.176-9.007-8.492C8.814%2011.553%208.779%206.313%2010%205.608a.9.9%200%200%201%20.458-.1m-.001-2A2.87%202.87%200%200%200%209%203.875C6.13%205.532%206.938%2012.304%2010.804%2019c3.284%205.69%207.72%209.493%2010.74%209.493A2.87%202.87%200%200%200%2023%2028.124c2.87-1.656%202.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z'/%3e%3cpath%20fill='%230288d1'%20d='M21.543%205.507a.9.9%200%200%201%20.457.1c1.221.706%201.186%205.946-2.536%2012.393-3.07%205.316-6.99%208.493-9.007%208.493a.9.9%200%200%201-.457-.1C8.779%2025.686%208.814%2020.446%2012.536%2014c3.07-5.316%206.99-8.493%209.007-8.493m0-2c-3.02%200-7.455%203.804-10.74%209.493C6.939%2019.696%206.13%2026.468%209%2028.124a2.87%202.87%200%200%200%201.457.369c3.02%200%207.455-3.804%2010.74-9.493C25.061%2012.304%2025.87%205.532%2023%203.876a2.87%202.87%200%200%200-1.457-.369'/%3e%3c/svg%3e`})),kS,AS=t((()=>{kS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='m30%2012-4-2V6h-4l-2-4-4%202-4-2-2%204H6v4l-4%202%202%204-2%204%204%202v4h4l2%204%204-2%204%202%202-4h4v-4l4-2-2-4ZM6%2016a9.9%209.9%200%200%201%20.842-4H10v8H6.842A9.9%209.9%200%200%201%206%2016m10%2010a9.98%209.98%200%200%201-7.978-4H16v-2h-2v-2h4c.819.819.297%202.308%201.179%203.37a1.89%201.89%200%200%200%201.46.63h3.34A9.98%209.98%200%200%201%2016%2026m-2-12v-2h4a1%201%200%200%201%200%202Zm11.158%206H24a2.006%202.006%200%200%201-2-2%202%202%200%200%200-2-2%203%203%200%200%200%203-3q0-.08-.004-.161A3.115%203.115%200%200%200%2019.83%2010H8.022a9.986%209.986%200%200%201%2017.136%2010'/%3e%3c/svg%3e`})),jS,MS=t((()=>{jS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'/%3e%3cpath%20fill='%2342a5f5'%20d='M19.43%2012.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5%200%200%200-.61-.22l-2.49%201c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49%200%200%200%2014%202h-4c-.25%200-.46.18-.49.42l-.38%202.65c-.61.25-1.17.59-1.69.98l-2.49-1a.6.6%200%200%200-.18-.03c-.17%200-.34.09-.43.25l-2%203.46c-.13.22-.07.49.12.64l2.11%201.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11%201.65c-.19.15-.24.42-.12.64l2%203.46a.5.5%200%200%200%20.61.22l2.49-1c.52.4%201.08.73%201.69.98l.38%202.65c.03.24.24.42.49.42h4c.25%200%20.46-.18.49-.42l.38-2.65c.61-.25%201.17-.59%201.69-.98l2.49%201q.09.03.18.03c.17%200%20.34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73s-.02.43-.05.73l-.14%201.13.89.7%201.08.84-.7%201.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16%201.13-.2%201.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21%201.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21%201.27.51%201.04.42.9-.68c.43-.32.84-.56%201.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19%201.35.16%201.13%201.06.43c.43.18.83.41%201.23.71l.91.7%201.06-.43%201.27-.51.7%201.21-1.07.85-.89.7zM12%208c-2.21%200-4%201.79-4%204s1.79%204%204%204%204-1.79%204-4-1.79-4-4-4m0%206c-1.1%200-2-.9-2-2s.9-2%202-2%202%20.9%202%202-.9%202-2%202'/%3e%3c/svg%3e`})),NS,PS=t((()=>{NS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20256%20256'%3e%3cpath%20fill='%23ffca28'%20d='M165.09%2099.183a20.153%2020.153%200%200%201-34.401%2014.25%2020.152%2020.152%200%201%201%2034.4-14.25z'/%3e%3cpath%20fill='%2326c6da'%20d='M111.04%20136.74c-11.13%200-20.152%209.022-20.152%2020.151%200%2011.13%209.022%2020.152%2020.152%2020.152%2011.129%200%2020.152-9.022%2020.152-20.152%200-11.129-9.023-20.15-20.152-20.15z'/%3e%3cpath%20fill='%23ffca28'%20d='M186.7%20163.76a77%2077%200%200%201-26.564%2010.81%2054.04%2054.04%200%200%200%202.657-24.366%2054.05%2054.05%200%200%200%2033.856-35.246%2054.04%2054.04%200%200%200-27.73-64.21%2054.044%2054.044%200%200%200-67.863%2016.927%2089.8%2089.8%200%200%200-29.495%208.61%2076.94%2076.94%200%200%201%2086.49-53.058%2076.94%2076.94%200%200%201%2063.888%2078.829%2076.94%2076.94%200%200%201-35.24%2061.706zM72.48%2090.298l18.869%202.29a54%2054%200%200%201%202.381-10.717%2077%2077%200%200%200-21.25%208.427'%20clip-rule='evenodd'/%3e%3cpath%20fill='%2326c6da'%20d='M69.182%2092.314a76.9%2076.9%200%200%201%2026.747-10.9%2053.95%2053.95%200%200%200-3.023%2024.457%2054.05%2054.05%200%200%200-33.64%2035.358%2054.04%2054.04%200%200%200%2052.354%2069.6%2054.04%2054.04%200%200%200%2043.298-22.52%2089.8%2089.8%200%200%200%2029.495-8.518%2076.94%2076.94%200%200%201-50.002%2050.423%2076.94%2076.94%200%200%201-69.992-11.992A76.944%2076.944%200%200%201%2069.18%2092.315zm114.22%2073.462-.366.183z'%20clip-rule='evenodd'/%3e%3c/svg%3e`})),FS,IS=t((()=>{FS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%23cfd8dc'%20d='M4%206V4h8v2H9v7H7V6z'/%3e%3cpath%20fill='%23ef5350'%20d='M4%201v1H2v12h2v1H1V1zm8%200v1h2v12h-2v1h3V1z'/%3e%3c/svg%3e`})),LS,RS=t((()=>{LS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%230288d1'%20d='M2%202v12h12V2zm4%206h3v1H8v4H7V9H6zm5%200h2v1h-2v1h1a1.003%201.003%200%200%201%201%201v1a1.003%201.003%200%200%201-1%201h-2v-1h2v-1h-1a1.003%201.003%200%200%201-1-1V9a1.003%201.003%200%200%201%201-1'/%3e%3c/svg%3e`})),zS,BS=t((()=>{zS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23a0f'%20d='M29.313%2012h-6.664a1.427%201.427%200%200%201-1.1-2.24l4.398-6.676A.703.703%200%200%200%2025.397%202H8.428a.62.62%200%200%200-.55.289l-5.77%208.627A.703.703%200%200%200%202.658%2012h8.175a1.427%201.427%200%200%201%201.099%202.24l-4.48%206.676A.702.702%200%200%200%208%2022l6.695.002A1.34%201.34%200%200%201%2016%2023.375v5.934a.652.652%200%200%200%201.168.433l12.694-16.586a.725.725%200%200%200-.55-1.156'/%3e%3c/svg%3e`})),VS,HS=t((()=>{VS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='%23ff5252'%20d='M13%209h5.5L13%203.5zM6%202h8l6%206v12c0%201.1-.9%202-2%202H6c-1.1%200-2-.9-2-2V4c0-1.1.9-2%202-2m12%2016v-2H9v2zm-4-4v-2H6v2z'/%3e%3c/svg%3e`}));function US(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function WS(e,t){let n=KS[e]||KS[e.toLowerCase()];return n?t?n.open:n.closed:t?Jb:Kb}function GS(e,t){return e.endsWith(`.config.ts`)||e.endsWith(`.config.js`)?jS:e.endsWith(`.tsx`)?DS:e.endsWith(`.jsx`)?TS:JS[e.toLowerCase()]||qS[t]||`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'/%3e%3cpath%20fill='%2342a5f5'%20d='M8%2016h8v2H8zm0-4h8v2H8zm6-10H6c-1.1%200-2%20.9-2%202v16c0%201.1.89%202%201.99%202H18c1.1%200%202-.9%202-2V8zm4%2018H6V4h7v5h5z'/%3e%3c/svg%3e`}var KS,qS,JS,YS=t((()=>{qb(),Yb(),Zb(),$b(),tx(),rx(),ax(),sx(),lx(),dx(),px(),hx(),_x(),yx(),xx(),Cx(),Tx(),Dx(),kx(),jx(),Nx(),Fx(),Lx(),zx(),Vx(),Ux(),Gx(),qx(),Yx(),Zx(),$x(),tS(),rS(),aS(),sS(),cS(),uS(),fS(),mS(),gS(),vS(),bS(),SS(),wS(),ES(),OS(),AS(),MS(),PS(),IS(),RS(),BS(),HS(),KS={".cargo_home":{closed:Mx,open:Px},".github":{closed:fx,open:mx},".git":{closed:cx,open:ux},".rustup":{closed:Mx,open:Px},".rustup_copy":{closed:Mx,open:Px},".rustup_home":{closed:Mx,open:Px},assets:{closed:gx,open:vx},components:{closed:Xb,open:Qb},crates:{closed:Mx,open:Px},css:{closed:Qx,open:eS},dist:{closed:ex,open:nx},docs:{closed:ix,open:ox},logs:{closed:bx,open:Sx},node_modules:{closed:wx,open:Ex},out:{closed:ex,open:nx},public:{closed:Ox,open:Ax},renderer:{closed:Qx,open:eS},scripts:{closed:Ix,open:Rx},src:{closed:Bx,open:Hx},"src-tauri":{closed:Wx,open:Kx},tests:{closed:Jx,open:Xx},utils:{closed:nS,open:iS}},qS={css:oS,html:lS,jpeg:dS,jpg:dS,js:pS,json:hS,lock:_S,log:yS,md:xS,png:dS,rs:kS,svg:dS,toml:FS,ts:LS,tsx:DS,yaml:VS,yml:VS},JS={"package-lock.json":CS,"package.json":CS,"tauri.conf.json":NS,"vite.config.ts":zS,"vite.config.web.ts":zS}}));function XS(e){let t=e.split(` #`)[0].trim().split(`/`);return t[t.length-1]}function ZS(e,t,n){if(e===`file`){let e=XS(t),n=GS(e,US(e));return n?(0,nC.jsx)(`img`,{src:n,alt:``,draggable:!1,className:`agent-activity-icon-img`}):(0,nC.jsx)(U_,{size:14,className:`agent-activity-kind-icon`})}if(e===`folder`){let e=WS(XS(t),!1);return e?(0,nC.jsx)(`img`,{src:e,alt:``,draggable:!1,className:`agent-activity-icon-img`}):(0,nC.jsx)(K_,{size:14,className:`agent-activity-kind-icon`})}return e===`calc`||n===`calculation`?(0,nC.jsx)(u_,{size:14,className:`agent-activity-kind-icon`}):e===`search`?(0,nC.jsx)(uv,{size:14,className:`agent-activity-kind-icon`}):e===`terminal`?(0,nC.jsx)(yv,{size:14,className:`agent-activity-kind-icon`}):(0,nC.jsx)(jv,{size:14,className:`agent-activity-kind-icon`})}function QS(e,t){if(!t||!t.trim())return null;let n=t.trim().split(`
|
|
45
|
-
`)[0].trim();if(e===`calculation`){let e=n.indexOf(`=`);if(e!==-1){let t=n.slice(e+1).trim();if(t.length>0&&t.length<30)return`→ ${t}`}}return n.length>0&&n.length<=35&&!n.startsWith(`Error:`)&&!n.startsWith(`{`)?`→ ${n}`:null}function $S(e){return e===`active`?(0,nC.jsx)(iv,{size:12,className:`agent-activity-status-spin`}):e===`retry`?(0,nC.jsx)(`span`,{className:`agent-activity-badge retry`,title:`Step encountered an error but agent retried`,children:`Retried`}):e===`error`?(0,nC.jsx)(`span`,{className:`agent-activity-badge error`,title:`Step failed`,children:`Failed`}):(0,nC.jsx)(p_,{size:12,className:`agent-activity-status-check`})}function eC({activityView:e}){let t=e.groups||Kt(e.items),[n,r]=(0,tC.useState)({}),[i,a]=(0,tC.useState)({}),o=e=>{r(t=>({...t,[e]:!t[e]}))},s=e=>{a(t=>({...t,[e]:!t[e]}))};return(0,nC.jsx)(`div`,{className:`agent-activity-list`,children:t.map((e,t)=>{let r=e.count>1,a=!!n[e.id];if(!r){let n=e.items[0],r=`${t}-0-${n.label}-${n.target}`,a=!!i[r],o=n.result?.trim(),c=QS(n.action,o);return(0,nC.jsxs)(tC.Fragment,{children:[(0,nC.jsxs)(`div`,{className:`agent-activity-item`,"data-kind":n.kind,"data-state":n.state,style:{cursor:o?`pointer`:`default`},onClick:()=>o&&s(r),children:[(0,nC.jsx)(`span`,{className:`agent-activity-icon-wrap`,"aria-hidden":`true`,children:ZS(n.kind,n.target,n.action)}),(0,nC.jsx)(`span`,{className:`agent-activity-label`,children:(0,nC.jsx)(`span`,{className:`agent-activity-tool-name`,children:n.label||n.action})}),(0,nC.jsxs)(`span`,{className:`agent-activity-text`,title:n.target,style:a?{whiteSpace:`normal`,wordBreak:`break-all`,overflow:`visible`,textOverflow:`clip`}:void 0,children:[(0,nC.jsx)(`span`,{className:`agent-activity-target-text`,children:n.target}),c&&(0,nC.jsx)(`span`,{className:`agent-activity-inline-result`,children:c})]}),(0,nC.jsxs)(`span`,{className:`agent-activity-status-col`,children:[$S(n.state),o&&(0,nC.jsx)(`span`,{className:`agent-activity-chevron${a?` is-open`:``}`,"aria-hidden":`true`,children:(0,nC.jsx)(g_,{size:12,strokeWidth:2.2})})]})]}),a&&o&&(0,nC.jsx)(`div`,{className:`agent-activity-output`,children:(0,nC.jsx)(`pre`,{children:o})})]},e.id)}return(0,nC.jsxs)(`div`,{className:`agent-activity-group`,children:[(0,nC.jsxs)(`div`,{className:`agent-activity-group-header${a?` is-expanded`:``}`,"data-state":e.state,onClick:()=>o(e.id),children:[(0,nC.jsx)(`span`,{className:`agent-activity-icon-wrap`,"aria-hidden":`true`,children:ZS(e.kind,e.items[0]?.target,e.action)}),(0,nC.jsx)(`span`,{className:`agent-activity-group-title`,children:e.title}),(0,nC.jsxs)(`span`,{className:`agent-activity-group-badges`,children:[(0,nC.jsxs)(`span`,{className:`agent-activity-count-badge`,children:[e.count,` steps`]}),$S(e.state),(0,nC.jsx)(`span`,{className:`agent-activity-chevron${a?` is-open`:``}`,"aria-hidden":`true`,children:(0,nC.jsx)(g_,{size:13,strokeWidth:2.2})})]})]}),a&&(0,nC.jsx)(`div`,{className:`agent-activity-group-subitems`,children:e.items.map((t,n)=>{let r=`${e.id}-${n}-${t.target}`,a=!!i[r],o=t.result?.trim(),c=QS(t.action,o);return(0,nC.jsxs)(tC.Fragment,{children:[(0,nC.jsxs)(`div`,{className:`agent-activity-subitem`,"data-state":t.state,style:{cursor:o?`pointer`:`default`},onClick:()=>o&&s(r),children:[(0,nC.jsx)(`span`,{className:`agent-activity-tree-bullet`,"aria-hidden":`true`,children:n===e.items.length-1?`└─`:`├─`}),(0,nC.jsx)(`span`,{className:`agent-activity-subitem-target`,title:t.target,children:t.target}),c&&(0,nC.jsx)(`span`,{className:`agent-activity-inline-result`,children:c}),(0,nC.jsxs)(`span`,{className:`agent-activity-subitem-status`,children:[$S(t.state),o&&(0,nC.jsx)(`span`,{className:`agent-activity-chevron${a?` is-open`:``}`,"aria-hidden":`true`,children:(0,nC.jsx)(g_,{size:11,strokeWidth:2.2})})]})]}),a&&o&&(0,nC.jsx)(`div`,{className:`agent-activity-output agent-activity-subitem-output`,children:(0,nC.jsx)(`pre`,{children:o})})]},r)})})]},e.id)})})}var tC,nC,rC=t((()=>{tC=e(A()),Xt(),YS(),Iv(),nC=j()}));function iC(e){let t=new Map,n=!1;for(let r of e||[])if(r.type===`Thinking`)n=!0;else if(r.type===`ToolStart`){n=!0;let e=r.data.action,i=r.data.subagent;if(e===`dispatch_subagent`){let e=r.data.input?.name||`subagent`,n=r.data.input?.instruction||``;t.has(e)||t.set(e,{name:e,taskSnippet:n.length>80?`${n.slice(0,77)}...`:n,status:`running`,tools:[]})}if(i){let n=t.get(i);n||(n={name:i,status:`running`,tools:[]},t.set(i,n)),n.status=`running`,n.currentTool=e,n.tools.push({action:e,input:r.data.input})}}else if(r.type===`ToolEnd`){let e=r.data.action,n=r.data.subagent,i=r.data.result||``,a=i.startsWith(`Error:`);if(e===`dispatch_subagent`){let e=r.data.input?.name||`subagent`,n=t.get(e);n&&(n.status=a?`failed`:`completed`,n.currentTool=void 0)}if(n){let r=t.get(n);if(r){let t=r.tools[r.tools.length-1];t&&t.action===e&&(t.result=i,t.isError=a),r.currentTool=void 0}}}let r=Array.from(t.values());for(let e of r)!e.currentTool&&e.status===`running`&&(e.status=`completed`);return{orchestratorStatus:n?`running`:`completed`,subagents:r}}function aC({progress:e,isLive:t=!1}){let[n,r]=(0,oC.useState)(null),i=(0,oC.useMemo)(()=>iC(e),[e]),a=(0,oC.useMemo)(()=>n&&i.subagents.find(e=>e.name===n)||null,[i.subagents,n]);return i.subagents.length===0?(0,sC.jsxs)(`div`,{style:{padding:`24px`,textAlign:`center`,color:`var(--text-muted, #9ca3af)`,fontSize:`0.85rem`},children:[(0,sC.jsx)(`p`,{style:{margin:0,fontWeight:500},children:`No subagents dispatched in this turn`}),(0,sC.jsxs)(`p`,{style:{margin:`6px 0 0 0`,opacity:.7,fontSize:`0.78rem`},children:[`Subagents will appear here in an interactive DAG tree when the Main Agent invokes them via `,(0,sC.jsx)(`code`,{children:`dispatch_subagent`}),`.`]})]}):(0,sC.jsxs)(`div`,{className:`subagent-dag-container`,style:{display:`flex`,flexDirection:`column`,gap:`16px`,padding:`16px`},children:[(0,sC.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:`28px`,position:`relative`,padding:`12px`},children:[(0,sC.jsxs)(`div`,{style:{display:`inline-flex`,alignItems:`center`,gap:`10px`,padding:`10px 18px`,borderRadius:`12px`,background:`linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(59, 130, 246, 0.15))`,border:`1px solid rgba(16, 185, 129, 0.35)`,boxShadow:`0 4px 16px rgba(0, 0, 0, 0.3)`,zIndex:2},children:[(0,sC.jsx)(`div`,{style:{width:`32px`,height:`32px`,borderRadius:`8px`,background:`#10b981`,color:`#ffffff`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:`0.75rem`,fontWeight:700},children:`M`}),(0,sC.jsxs)(`div`,{children:[(0,sC.jsx)(`div`,{style:{fontWeight:600,fontSize:`0.88rem`,color:`#f3f4f6`},children:`Main Orchestrator`}),(0,sC.jsxs)(`div`,{style:{fontSize:`0.72rem`,color:t?`#10b981`:`#9ca3af`,display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,sC.jsx)(`span`,{style:{width:`6px`,height:`6px`,borderRadius:`50%`,background:t?`#10b981`:`#6b7280`,display:`inline-block`}}),t?`Active Session`:`Completed`]})]})]}),(0,sC.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`center`,gap:`16px`,width:`100%`,position:`relative`,zIndex:2},children:i.subagents.map(e=>{let t=n===e.name,i=e.status===`running`?`#3b82f6`:e.status===`failed`?`#ef4444`:`#10b981`;return(0,sC.jsxs)(`div`,{onClick:()=>r(t?null:e.name),style:{display:`flex`,flexDirection:`column`,width:`260px`,padding:`12px`,borderRadius:`10px`,background:t?`rgba(30, 41, 59, 0.95)`:`rgba(15, 23, 42, 0.8)`,border:`1px solid ${t?i:`rgba(255, 255, 255, 0.1)`}`,cursor:`pointer`,boxShadow:t?`0 0 16px ${i}33`:`0 4px 12px rgba(0, 0, 0, 0.2)`,transition:`all 0.2s ease`},children:[(0,sC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`8px`},children:[(0,sC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,sC.jsx)(`span`,{style:{width:`8px`,height:`8px`,borderRadius:`50%`,background:i,display:`inline-block`}}),(0,sC.jsx)(`span`,{style:{fontWeight:600,fontSize:`0.84rem`,color:`#f3f4f6`},children:e.name})]}),(0,sC.jsx)(`span`,{style:{fontSize:`0.68rem`,fontWeight:600,padding:`2px 6px`,borderRadius:`4px`,textTransform:`uppercase`,background:`${i}22`,color:i,border:`1px solid ${i}44`},children:e.status===`running`&&e.currentTool?e.currentTool:e.status})]}),e.taskSnippet&&(0,sC.jsx)(`p`,{style:{margin:`0 0 8px 0`,fontSize:`0.74rem`,color:`#94a3b8`,lineHeight:1.4},children:e.taskSnippet}),(0,sC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:`0.72rem`,color:`#64748b`,paddingTop:`6px`,borderTop:`1px solid rgba(255, 255, 255, 0.06)`},children:[(0,sC.jsxs)(`span`,{children:[e.tools.length,` tool `,e.tools.length===1?`call`:`calls`]}),(0,sC.jsx)(`span`,{style:{color:t?i:`#94a3b8`},children:t?`Hide Details ▲`:`View Logs ▼`})]})]},e.name)})})]}),a&&(0,sC.jsxs)(`div`,{style:{background:`rgba(15, 23, 42, 0.95)`,border:`1px solid rgba(255, 255, 255, 0.1)`,borderRadius:`10px`,padding:`14px`,marginTop:`8px`},children:[(0,sC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`12px`},children:[(0,sC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,sC.jsxs)(`span`,{style:{fontWeight:600,fontSize:`0.86rem`,color:`#10b981`},children:[`Subagent Activity: `,a.name]}),(0,sC.jsxs)(`span`,{style:{fontSize:`0.75rem`,color:`#94a3b8`},children:[`(`,a.tools.length,` steps)`]})]}),(0,sC.jsx)(`button`,{type:`button`,onClick:()=>r(null),style:{background:`transparent`,border:`none`,color:`#94a3b8`,cursor:`pointer`,fontSize:`0.8rem`},children:`Close`})]}),(0,sC.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`,maxHeight:`300px`,overflowY:`auto`},children:a.tools.map((e,t)=>(0,sC.jsxs)(`div`,{style:{background:`rgba(0, 0, 0, 0.25)`,border:`1px solid rgba(255, 255, 255, 0.05)`,borderRadius:`6px`,padding:`8px 10px`,fontSize:`0.76rem`},children:[(0,sC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`4px`},children:[(0,sC.jsx)(`span`,{style:{fontWeight:600,color:`#38bdf8`},children:e.action}),e.isError&&(0,sC.jsx)(`span`,{style:{color:`#f87171`,fontWeight:600},children:`FAILED`})]}),e.input&&(0,sC.jsx)(`pre`,{style:{margin:`4px 0`,padding:`4px 6px`,background:`#090d16`,borderRadius:`4px`,color:`#cbd5e1`,fontSize:`0.72rem`,overflowX:`auto`},children:JSON.stringify(e.input,null,2)}),e.result&&(0,sC.jsxs)(`div`,{style:{marginTop:`4px`,color:`#94a3b8`,fontSize:`0.72rem`,maxHeight:`100px`,overflowY:`auto`},children:[(0,sC.jsx)(`strong`,{children:`Result:`}),` `,e.result.slice(0,200),e.result.length>200?`...`:``]})]},t))})]})]})}var oC,sC,cC=t((()=>{oC=e(A()),sC=j()}));function lC({plan:e,className:t=``}){if(!e||!e.tasks||e.tasks.length===0)return null;let n=e.tasks.filter(e=>e.status===`completed`).length,r=e.tasks.length,i=Math.round(n/r*100);return(0,uC.jsxs)(`div`,{className:`plan-checklist-card ${t}`,children:[(0,uC.jsxs)(`div`,{className:`plan-checklist-header`,children:[(0,uC.jsxs)(`div`,{className:`plan-checklist-title`,children:[(0,uC.jsx)(tv,{style:{width:`15px`,height:`15px`,color:`var(--accent, #10b981)`}}),(0,uC.jsx)(`span`,{children:e.objective||`Task Plan`})]}),(0,uC.jsxs)(`span`,{className:`plan-checklist-count`,children:[n,`/`,r,` (`,i,`%)`]})]}),(0,uC.jsx)(`div`,{className:`plan-progress-track`,children:(0,uC.jsx)(`div`,{className:`plan-progress-bar`,style:{width:`${i}%`}})}),(0,uC.jsx)(`div`,{className:`plan-tasks-list`,children:e.tasks.map((e,t)=>{let n=e.status===`completed`,r=e.status===`in_progress`,i=e.status===`failed`;return(0,uC.jsxs)(`div`,{className:`plan-task-item ${r?`in-progress`:n?`completed`:i?`failed`:``}`,children:[(0,uC.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,flexShrink:0},children:[n&&(0,uC.jsx)(S_,{style:{width:`14px`,height:`14px`,color:`var(--status-speaking, #22c55e)`}}),r&&(0,uC.jsx)(iv,{style:{width:`14px`,height:`14px`,color:`var(--status-listening, #7dd3fc)`,animation:`spin 1s linear infinite`}}),i&&(0,uC.jsx)(T_,{style:{width:`14px`,height:`14px`,color:`var(--status-error, #ef4444)`}}),!n&&!r&&!i&&(0,uC.jsx)(O_,{style:{width:`14px`,height:`14px`,color:`rgba(255, 255, 255, 0.3)`}})]}),(0,uC.jsx)(`span`,{className:`plan-task-text`,children:e.title})]},e.id||t)})})]})}var uC,dC=t((()=>{A(),Iv(),uC=j()}));function fC({summary:e,className:t=``}){let n=e.outcome===`SUCCESS`,r=e.outcome===`ROLLED_BACK`,i=e.outcome===`FAILED`,a=e.totalTokens>=1e3?`${(e.totalTokens/1e3).toFixed(1)}k`:e.totalTokens.toString(),o=n?`run-summary-badge success`:r?`run-summary-badge rollback`:`run-summary-badge failure`,s=n?`var(--status-speaking, #22c55e)`:r?`#f59e0b`:`var(--status-error, #ef4444)`;return(0,L.jsxs)(`div`,{className:`run-summary-card ${t}`,children:[(0,L.jsxs)(`div`,{className:`run-summary-header`,children:[(0,L.jsxs)(`div`,{className:`run-summary-title`,children:[(0,L.jsx)(i_,{style:{width:`15px`,height:`15px`,color:s}}),(0,L.jsxs)(`span`,{children:[`Run Telemetry #`,e.runId]})]}),(0,L.jsx)(`div`,{children:(0,L.jsxs)(`span`,{className:o,children:[n&&(0,L.jsx)(S_,{style:{width:`12px`,height:`12px`}}),r&&(0,L.jsx)(sv,{style:{width:`12px`,height:`12px`}}),i&&(0,L.jsx)(T_,{style:{width:`12px`,height:`12px`}}),(0,L.jsx)(`span`,{children:n?`Success`:r?`Rolled Back`:`Failure`})]})})]}),(0,L.jsxs)(`div`,{className:`run-kpi-grid`,children:[(0,L.jsxs)(`div`,{className:`run-kpi-box`,children:[(0,L.jsxs)(`div`,{className:`run-kpi-label`,children:[(0,L.jsx)(j_,{style:{width:`12px`,height:`12px`}}),(0,L.jsx)(`span`,{children:`Duration`})]}),(0,L.jsxs)(`div`,{className:`run-kpi-value`,children:[e.durationSecs.toFixed(1),`s`]})]}),(0,L.jsxs)(`div`,{className:`run-kpi-box`,children:[(0,L.jsxs)(`div`,{className:`run-kpi-label`,children:[(0,L.jsx)(P_,{style:{width:`12px`,height:`12px`}}),(0,L.jsx)(`span`,{children:`Tokens`})]}),(0,L.jsx)(`div`,{className:`run-kpi-value`,children:a})]}),(0,L.jsxs)(`div`,{className:`run-kpi-box`,children:[(0,L.jsxs)(`div`,{className:`run-kpi-label`,children:[(0,L.jsx)(jv,{style:{width:`12px`,height:`12px`}}),(0,L.jsx)(`span`,{children:`Tools`})]}),(0,L.jsxs)(`div`,{className:`run-kpi-value`,children:[e.toolCallsCount,` `,(0,L.jsxs)(`span`,{className:`run-kpi-subtext`,children:[`(`,e.retriesCount,` retry)`]})]})]}),(0,L.jsxs)(`div`,{className:`run-kpi-box`,children:[(0,L.jsxs)(`div`,{className:`run-kpi-label`,children:[(0,L.jsx)(B_,{style:{width:`12px`,height:`12px`}}),(0,L.jsx)(`span`,{children:`Files`})]}),(0,L.jsx)(`div`,{className:`run-kpi-value`,children:e.filesCreated&&e.filesCreated.length>0&&e.filesChanged.length-e.filesCreated.length>0?(0,L.jsxs)(L.Fragment,{children:[e.filesCreated.length,` `,(0,L.jsx)(`span`,{className:`run-kpi-subtext`,children:`created`}),`, `,e.filesChanged.length-e.filesCreated.length,` `,(0,L.jsx)(`span`,{className:`run-kpi-subtext`,children:`modified`})]}):e.filesCreated&&e.filesCreated.length>0?(0,L.jsxs)(L.Fragment,{children:[e.filesCreated.length,` `,(0,L.jsx)(`span`,{className:`run-kpi-subtext`,children:`created`})]}):(0,L.jsxs)(L.Fragment,{children:[e.filesChanged.length,` `,(0,L.jsx)(`span`,{className:`run-kpi-subtext`,children:`modified`})]})})]})]}),e.toolTimeline&&e.toolTimeline.length>0&&(0,L.jsxs)(`div`,{className:`run-timeline-container`,children:[(0,L.jsx)(`div`,{className:`run-timeline-title`,children:`Tool Calls Timeline`}),(0,L.jsx)(`div`,{className:`run-timeline-list`,children:e.toolTimeline.map((e,t)=>(0,L.jsxs)(`div`,{className:`run-timeline-item`,children:[(0,L.jsxs)(`div`,{className:`run-timeline-left`,children:[(0,L.jsxs)(`span`,{className:`run-timeline-step`,children:[String(e.step).padStart(2,`0`),`s`]}),e.success?e.retried?(0,L.jsx)(sv,{style:{width:`14px`,height:`14px`,color:`#f59e0b`,flexShrink:0}}):(0,L.jsx)(S_,{style:{width:`14px`,height:`14px`,color:`var(--status-speaking, #22c55e)`,flexShrink:0}}):(0,L.jsx)(T_,{style:{width:`14px`,height:`14px`,color:`var(--status-error, #ef4444)`,flexShrink:0}}),(0,L.jsx)(`span`,{className:`run-timeline-action`,children:e.action}),e.target&&(0,L.jsxs)(`span`,{className:`run-timeline-target`,children:[`[`,e.target,`]`]})]}),(0,L.jsxs)(`div`,{children:[!e.success&&(0,L.jsx)(`span`,{className:`run-timeline-note-failed`,children:`(failed)`}),e.retried&&e.success&&(0,L.jsx)(`span`,{className:`run-timeline-note-retry`,children:`(self-corrected)`})]})]},t))})]})]})}var L,pC=t((()=>{A(),Iv(),L=j()}));function mC({activityView:e,isOpen:t,onToggle:n,isHistorical:r=!1,pendingApproval:i=!1,rawProgress:a}){let[o,s]=(0,hC.useState)(`list`),c=(a||[]).slice().reverse().find(e=>e.type===`PlanUpdated`)?.data.plan,l=(a||[]).slice().reverse().find(e=>e.type===`RunCompleted`)?.data.summary;if(e.items.length===0&&!c&&!l)return null;let u=(a||[]).some(e=>(e.type===`ToolStart`||e.type===`ToolEnd`)&&(e.data.subagent||e.data.action===`dispatch_subagent`)),d=()=>(0,gC.jsxs)(gC.Fragment,{children:[l&&(0,gC.jsx)(`div`,{style:{marginBottom:`12px`},children:(0,gC.jsx)(fC,{summary:l})}),c&&(0,gC.jsx)(`div`,{style:{marginBottom:`12px`},children:(0,gC.jsx)(lC,{plan:c})}),u&&(0,gC.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-start`,gap:`8px`,marginBottom:`10px`,paddingBottom:`8px`,borderBottom:`1px solid rgba(255, 255, 255, 0.08)`},children:(0,gC.jsxs)(`div`,{style:{display:`inline-flex`,padding:`2px`,background:`rgba(255, 255, 255, 0.05)`,borderRadius:`6px`,border:`1px solid rgba(255, 255, 255, 0.08)`},children:[(0,gC.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),s(`list`)},style:{background:o===`list`?`var(--accent, #10b981)`:`transparent`,color:o===`list`?`#ffffff`:`var(--text-muted, #9ca3af)`,border:`none`,borderRadius:`4px`,padding:`3px 8px`,fontSize:`0.74rem`,fontWeight:500,cursor:`pointer`},children:`Activity List`}),(0,gC.jsxs)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),s(`dag`)},style:{background:o===`dag`?`var(--accent, #10b981)`:`transparent`,color:o===`dag`?`#ffffff`:`var(--text-muted, #9ca3af)`,border:`none`,borderRadius:`4px`,padding:`3px 8px`,fontSize:`0.74rem`,fontWeight:500,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:[(0,gC.jsx)(`span`,{children:`Subagent DAG`}),(0,gC.jsx)(`span`,{style:{width:`6px`,height:`6px`,borderRadius:`50%`,background:`#38bdf8`,display:`inline-block`}})]})]})}),o===`dag`&&u?(0,gC.jsx)(aC,{progress:a||[],isLive:!r}):e.items.length>0?(0,gC.jsx)(eC,{activityView:e}):null]}),f=c?.objective||e.summary||(l?`Run Telemetry (${l.outcome})`:`Agent Activity`);return r?(0,gC.jsxs)(`div`,{className:`agent-activity-history`,children:[(0,gC.jsxs)(`button`,{type:`button`,className:`agent-activity-toggle`,"aria-expanded":t,onClick:n,children:[(0,gC.jsx)(`span`,{children:f}),(0,gC.jsx)(`span`,{"aria-hidden":`true`,children:t?`^`:`>`})]}),t&&(0,gC.jsx)(`div`,{className:`agent-activity-card agent-activity-card-history`,children:d()})]}):(0,gC.jsx)(`div`,{className:`message ai-message agent-activity-message`,children:(0,gC.jsxs)(`div`,{className:`agent-activity-card`,children:[(0,gC.jsxs)(`div`,{className:`agent-activity-header`,style:{cursor:`pointer`},onClick:n,children:[(0,gC.jsx)(`span`,{children:f}),(0,gC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,gC.jsx)(`span`,{className:`agent-activity-status`,"data-state":i?`approval`:l?`done`:`active`,children:i?`Waiting for approval`:l?`Completed`:`Working`}),(0,gC.jsx)(`span`,{"aria-hidden":`true`,children:t?`^`:`>`})]})]}),t&&(0,gC.jsx)(`div`,{style:{marginTop:`8px`},children:d()})]})})}var hC,gC,_C=t((()=>{hC=e(A()),rC(),cC(),dC(),pC(),gC=j()}));function vC(e){let t=e.toLowerCase();return t.endsWith(`.html`)||t.endsWith(`.htm`)?`html`:t.endsWith(`.svg`)?`svg`:t.endsWith(`.md`)||t.endsWith(`.markdown`)?`markdown`:`code`}function yC(e){let t=e.split(`.`).pop()?.toLowerCase()||``;return{js:`javascript`,jsx:`javascript`,ts:`typescript`,tsx:`typescript`,html:`html`,htm:`html`,css:`css`,json:`json`,rs:`rust`,py:`python`,svg:`xml`,md:`markdown`}[t]||t||`plaintext`}function bC({artifact:e,onClose:t,workspacePath:n}){let[r,i]=(0,xC.useState)(`preview`),[a,o]=(0,xC.useState)(`desktop`),[s,c]=(0,xC.useState)(e?.content||``),[l,d]=(0,xC.useState)(!1),[f,p]=(0,xC.useState)(null),[m,h]=(0,xC.useState)(!1),g=e?.path||``,_=(0,xC.useMemo)(()=>{if(!g)return``;let e=g.replace(/\\/g,`/`).split(`/`);return e[e.length-1]||g},[g]),v=(0,xC.useMemo)(()=>e?.type?e.type:vC(g),[e,g]),y=(0,xC.useMemo)(()=>yC(g),[g]),b=(0,xC.useCallback)(async()=>{if(g){d(!0),p(null);try{c(await u(g,n))}catch(t){e?.content?c(e.content):p(t?.message||`Unable to read file content`)}finally{d(!1)}}},[g,n,e]);return(0,xC.useEffect)(()=>{e?.content?c(e.content):b()},[e,b]),e?(0,SC.jsxs)(`aside`,{className:`artifact-preview-panel`,style:{display:`flex`,flexDirection:`column`,width:`var(--preview-width, 50%)`,minWidth:`280px`,maxWidth:`none`,height:`100%`,background:`var(--panel-bg, #1e1e20)`,color:`var(--text-main, #e8e8ea)`,position:`relative`,zIndex:10,overflow:`hidden`},children:[(0,SC.jsxs)(`header`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid var(--border)`,background:`var(--surface-bg, #252527)`,gap:`8px`,flexShrink:0},children:[(0,SC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,minWidth:0},children:[(0,SC.jsx)(`span`,{style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:`24px`,height:`24px`,borderRadius:`var(--radius-xs, 4px)`,background:`color-mix(in srgb, var(--accent) 15%, transparent)`,color:`var(--accent)`,fontSize:`0.68rem`,fontWeight:700,flexShrink:0},children:v.toUpperCase().slice(0,3)}),(0,SC.jsxs)(`div`,{style:{minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,SC.jsx)(`span`,{style:{fontWeight:600,fontSize:`0.86rem`,color:`var(--text-main)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},title:g,children:_}),(0,SC.jsx)(`button`,{type:`button`,onClick:async()=>{if(g)try{await navigator.clipboard.writeText(g),h(!0),setTimeout(()=>h(!1),1800)}catch{}},style:{background:`none`,border:`none`,color:m?`var(--accent)`:`var(--text-muted)`,fontSize:`0.7rem`,padding:0,cursor:`pointer`,textAlign:`left`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:m?`Path Copied`:`Copy path`})]})]}),(0,SC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,SC.jsxs)(`div`,{style:{display:`inline-flex`,padding:`2px`,background:`color-mix(in srgb, var(--text-main) 6%, transparent)`,borderRadius:`var(--radius-sm, 6px)`,border:`1px solid var(--border)`},children:[(0,SC.jsx)(`button`,{type:`button`,onClick:()=>i(`preview`),style:{background:r===`preview`?`var(--accent)`:`transparent`,color:r===`preview`?`#ffffff`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 9px`,fontSize:`0.75rem`,fontWeight:500,cursor:`pointer`,transition:`all 0.15s ease`},children:`Preview`}),(0,SC.jsx)(`button`,{type:`button`,onClick:()=>i(`code`),style:{background:r===`code`?`var(--accent)`:`transparent`,color:r===`code`?`#ffffff`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 9px`,fontSize:`0.75rem`,fontWeight:500,cursor:`pointer`,transition:`all 0.15s ease`},children:`Code`})]}),r===`preview`&&v===`html`&&(0,SC.jsxs)(`div`,{style:{display:`inline-flex`,padding:`2px`,background:`color-mix(in srgb, var(--text-main) 6%, transparent)`,borderRadius:`var(--radius-sm, 6px)`,border:`1px solid var(--border)`},children:[(0,SC.jsx)(`button`,{type:`button`,onClick:()=>o(`desktop`),title:`Desktop 100%`,style:{background:a===`desktop`?`color-mix(in srgb, var(--text-main) 12%, transparent)`:`transparent`,color:a===`desktop`?`var(--text-main)`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 7px`,cursor:`pointer`,fontSize:`0.72rem`},children:`Desktop`}),(0,SC.jsx)(`button`,{type:`button`,onClick:()=>o(`tablet`),title:`Tablet (768px)`,style:{background:a===`tablet`?`color-mix(in srgb, var(--text-main) 12%, transparent)`:`transparent`,color:a===`tablet`?`var(--text-main)`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 7px`,cursor:`pointer`,fontSize:`0.72rem`},children:`Tablet`}),(0,SC.jsx)(`button`,{type:`button`,onClick:()=>o(`mobile`),title:`Mobile (375px)`,style:{background:a===`mobile`?`color-mix(in srgb, var(--text-main) 12%, transparent)`:`transparent`,color:a===`mobile`?`var(--text-main)`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 7px`,cursor:`pointer`,fontSize:`0.72rem`},children:`Mobile`})]})]}),(0,SC.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,SC.jsx)(`button`,{type:`button`,onClick:b,disabled:l,title:`Reload content from file`,style:{background:`none`,border:`none`,color:`var(--text-muted)`,padding:`5px`,borderRadius:`var(--radius-xs, 4px)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`},children:(0,SC.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{animation:l?`spin 1s linear infinite`:`none`},children:[(0,SC.jsx)(`polyline`,{points:`23 4 23 10 17 10`}),(0,SC.jsx)(`polyline`,{points:`1 20 1 14 7 14`}),(0,SC.jsx)(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`})]})}),(0,SC.jsx)(`button`,{type:`button`,onClick:()=>{if(!s)return;let e=new Blob([s],{type:`${v===`html`?`text/html`:v===`svg`?`image/svg+xml`:v===`markdown`?`text/markdown`:`text/plain`};charset=utf-8`}),t=URL.createObjectURL(e);window.open(t,`_blank`)},title:`Open preview in new window`,style:{background:`none`,border:`none`,color:`var(--text-muted)`,padding:`5px`,borderRadius:`var(--radius-xs, 4px)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`},children:(0,SC.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,SC.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,SC.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,SC.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})}),(0,SC.jsx)(`button`,{type:`button`,onClick:t,title:`Close Preview Panel`,style:{background:`none`,border:`none`,color:`var(--text-muted)`,padding:`5px`,borderRadius:`var(--radius-xs, 4px)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`},children:(0,SC.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,SC.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,SC.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})]}),(0,SC.jsx)(`div`,{style:{flex:1,overflow:`auto`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`flex-start`,background:r===`preview`&&v===`html`?`var(--input-bg, #0a0a0b)`:`transparent`,padding:r===`preview`&&v===`html`?`16px`:`0`},children:f?(0,SC.jsxs)(`div`,{style:{padding:`24px`,textAlign:`center`,color:`var(--status-error, #f87171)`},children:[(0,SC.jsx)(`p`,{style:{fontWeight:600,marginBottom:`8px`},children:`Error loading preview`}),(0,SC.jsx)(`p`,{style:{fontSize:`0.8rem`,opacity:.8},children:f}),(0,SC.jsx)(`button`,{type:`button`,onClick:b,style:{marginTop:`12px`,padding:`4px 12px`,borderRadius:`var(--radius-xs, 4px)`,background:`var(--hover-delete-bg, rgba(239, 68, 68, 0.15))`,color:`var(--status-error, #f87171)`,border:`1px solid color-mix(in srgb, var(--status-error, #ef4444) 30%, transparent)`,cursor:`pointer`,fontSize:`0.78rem`},children:`Retry`})]}):r===`code`?(0,SC.jsx)(`div`,{style:{width:`100%`,height:`100%`,overflow:`auto`,padding:`12px`},children:(0,SC.jsx)(jg,{code:s,language:y})}):v===`html`?(0,SC.jsx)(`div`,{style:{width:a===`mobile`?`375px`:a===`tablet`?`768px`:`100%`,maxWidth:`100%`,height:`100%`,background:`#ffffff`,borderRadius:a===`desktop`?`0px`:`var(--radius-md, 8px)`,overflow:`hidden`,boxShadow:a===`desktop`?`none`:`var(--shadow-md, 0 10px 25px rgba(0,0,0,0.5))`,border:a===`desktop`?`none`:`1px solid var(--border)`,transition:`width 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:(0,SC.jsx)(`iframe`,{title:_,srcDoc:s,sandbox:`allow-scripts allow-forms allow-modals`,style:{width:`100%`,height:`100%`,border:`none`,background:`#ffffff`}})}):v===`svg`?(0,SC.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`24px`,backgroundImage:`linear-gradient(45deg, color-mix(in srgb, var(--text-main) 4%, transparent) 25%, transparent 25%), linear-gradient(-45deg, color-mix(in srgb, var(--text-main) 4%, transparent) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, color-mix(in srgb, var(--text-main) 4%, transparent) 75%), linear-gradient(-45deg, transparent 75%, color-mix(in srgb, var(--text-main) 4%, transparent) 75%)`,backgroundSize:`20px 20px`,backgroundPosition:`0 0, 0 10px, 10px -10px, -10px 0px`,overflow:`auto`},children:(0,SC.jsx)(`div`,{style:{maxWidth:`90%`,maxHeight:`90%`,display:`flex`,alignItems:`center`,justifyContent:`center`},dangerouslySetInnerHTML:{__html:s}})}):v===`markdown`?(0,SC.jsx)(`div`,{style:{width:`100%`,height:`100%`,overflow:`auto`,padding:`20px 24px`,lineHeight:1.6,color:`var(--text-chat, var(--text-main))`},children:Eb(s)}):(0,SC.jsx)(`div`,{style:{width:`100%`,height:`100%`,overflow:`auto`,padding:`12px`},children:(0,SC.jsx)(jg,{code:s,language:y})})})]}):null}var xC,SC,CC=t((()=>{xC=e(A()),h(),jb(),Pg(),SC=j()})),wC,R,TC,EC=t((()=>{wC=e(A()),R=j(),TC=({isOpen:e,onClose:t,onConfirm:n,checkpoints:r,targetCheckpoint:i,changes:a,isLoading:o=!1})=>{let[s,c]=(0,wC.useState)(()=>i?.step??(r.length>0?r[r.length-1].step:0));if((0,wC.useEffect)(()=>{i?c(i.step):r.length>0&&c(r[r.length-1].step)},[i,r]),(0,wC.useEffect)(()=>{if(!e)return;let r=e=>{e.key===`Escape`&&!o?t():e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!o&&n(s)};return window.addEventListener(`keydown`,r),()=>window.removeEventListener(`keydown`,r)},[e,o,t,n,s]),!e)return null;let l=r.find(e=>e.step===s)??i;return(0,R.jsx)(`div`,{className:`management-modal-overlay`,onClick:o?void 0:t,style:{zIndex:10002},children:(0,R.jsxs)(`div`,{className:`management-modal rewind-modal`,onClick:e=>e.stopPropagation(),style:{maxWidth:`560px`,width:`100%`,display:`flex`,flexDirection:`column`,boxShadow:`0 24px 48px rgba(0, 0, 0, 0.65)`,border:`1px solid color-mix(in srgb, var(--status-error, #ef4444) 30%, var(--border))`},children:[(0,R.jsxs)(`div`,{className:`management-modal-header`,style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 20px`,borderBottom:`1px solid var(--border)`},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,R.jsx)(`span`,{style:{width:`32px`,height:`32px`,borderRadius:`8px`,background:`color-mix(in srgb, var(--status-error, #ef4444) 15%, transparent)`,color:`var(--status-error, #ef4444)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:(0,R.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,R.jsx)(`polyline`,{points:`1 4 1 10 7 10`}),(0,R.jsx)(`path`,{d:`M3.51 15a9 9 0 1 0 2.13-9.36L1 10`})]})}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`h3`,{style:{margin:0,fontSize:`16px`,fontWeight:600,color:`var(--text-main)`},children:`Rewind Workspace`}),(0,R.jsx)(`span`,{style:{fontSize:`12px`,color:`var(--text-muted)`},children:`Git Checkpoint Time Machine`})]})]}),(0,R.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:o?void 0:t,disabled:o,style:{background:`transparent`,border:`none`,color:`var(--text-muted)`,cursor:o?`not-allowed`:`pointer`,padding:`6px`,borderRadius:`6px`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,R.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,R.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,R.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,R.jsxs)(`div`,{style:{padding:`20px`,display:`flex`,flexDirection:`column`,gap:`16px`,overflowY:`auto`,maxHeight:`70vh`},children:[(0,R.jsxs)(`div`,{style:{padding:`12px 14px`,borderRadius:`10px`,background:`color-mix(in srgb, var(--status-error, #ef4444) 10%, transparent)`,border:`1px solid color-mix(in srgb, var(--status-error, #ef4444) 25%, transparent)`,fontSize:`13px`,lineHeight:1.5,color:`var(--text-main)`,display:`flex`,gap:`10px`,alignItems:`flex-start`},children:[(0,R.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--status-error, #ef4444)`,strokeWidth:`2`,style:{flexShrink:0,marginTop:`2px`},children:[(0,R.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z`}),(0,R.jsx)(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),(0,R.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`strong`,{children:`Revert files to before this turn?`}),(0,R.jsx)(`div`,{style:{marginTop:`2px`,color:`var(--text-muted)`},children:`Your workspace will be restored to the state before these edits. A safety rescue snapshot will be preserved automatically so you can undo at any time.`})]})]}),(0,R.jsxs)(`div`,{style:{background:`var(--surface-bg)`,border:`1px solid var(--border)`,borderRadius:`10px`,padding:`14px`,display:`flex`,flexDirection:`column`,gap:`10px`},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,R.jsx)(`span`,{style:{fontSize:`12px`,fontWeight:600,color:`var(--text-muted)`,textTransform:`uppercase`,letterSpacing:`0.05em`},children:`Target Checkpoint`}),r.length>1&&(0,R.jsx)(`select`,{value:s,onChange:e=>c(Number(e.target.value)),disabled:o,style:{background:`var(--input-bg, #111)`,color:`var(--text-main)`,border:`1px solid var(--border)`,borderRadius:`6px`,fontSize:`12px`,padding:`3px 8px`,cursor:`pointer`},children:r.map(e=>(0,R.jsxs)(`option`,{value:e.step,children:[`Step `,e.step,` (`,e.commitHash.slice(0,7),`)`]},e.step))})]}),l?(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,flexWrap:`wrap`},children:[(0,R.jsxs)(`span`,{style:{padding:`3px 8px`,borderRadius:`6px`,background:`color-mix(in srgb, var(--accent) 15%, transparent)`,color:`var(--accent)`,fontWeight:600,fontSize:`12px`},children:[`Step `,l.step]}),(0,R.jsx)(`code`,{style:{padding:`3px 7px`,borderRadius:`6px`,background:`var(--input-bg, rgba(0,0,0,0.3))`,color:`var(--text-main)`,fontSize:`12px`,border:`1px solid var(--border)`},children:l.commitHash.slice(0,7)}),l.action&&(0,R.jsxs)(`span`,{style:{fontSize:`12px`,color:`var(--text-muted)`},children:[`before `,l.action]}),l.timestamp>0&&(0,R.jsx)(`span`,{style:{fontSize:`11px`,color:`var(--text-muted)`,marginLeft:`auto`},children:(e=>{if(!e)return``;try{return new Date(e*1e3).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}catch{return``}})(l.timestamp)})]}):(0,R.jsx)(`div`,{style:{fontSize:`12px`,color:`var(--text-muted)`},children:`Restoring to initial state before turn execution.`})]}),a.length>0&&(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(`div`,{style:{fontSize:`12px`,fontWeight:600,color:`var(--text-muted)`,marginBottom:`8px`,textTransform:`uppercase`,letterSpacing:`0.05em`},children:[`Files in this turn (`,a.length,`)`]}),(0,R.jsx)(`div`,{style:{maxHeight:`160px`,overflowY:`auto`,border:`1px solid var(--border)`,borderRadius:`8px`,background:`var(--surface-bg)`,display:`flex`,flexDirection:`column`},children:a.map((e,t)=>(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 12px`,fontSize:`12.5px`,borderBottom:t<a.length-1?`1px solid var(--border)`:`none`},children:[(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,minWidth:0},children:[(0,R.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--text-muted)`,strokeWidth:`2`,children:[(0,R.jsx)(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),(0,R.jsx)(`polyline`,{points:`14 2 14 8 20 8`})]}),(0,R.jsx)(`span`,{title:e.path,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,color:`var(--text-main)`,fontFamily:`monospace`},children:e.path})]}),(0,R.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,flexShrink:0},children:e.created?(0,R.jsx)(`span`,{style:{fontSize:`10.5px`,fontWeight:600,padding:`1px 6px`,borderRadius:`4px`,background:`color-mix(in srgb, var(--accent) 15%, transparent)`,color:`var(--accent)`},children:`[NEW FILE]`}):(0,R.jsxs)(R.Fragment,{children:[e.additions>0&&(0,R.jsxs)(`span`,{style:{fontSize:`11px`,color:`var(--accent)`,fontWeight:600},children:[`+`,e.additions]}),e.deletions>0&&(0,R.jsxs)(`span`,{style:{fontSize:`11px`,color:`var(--status-error, #ef4444)`,fontWeight:600},children:[`-`,e.deletions]})]})})]},e.path||t))})]})]}),(0,R.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`flex-end`,gap:`10px`,padding:`14px 20px`,borderTop:`1px solid var(--border)`,background:`color-mix(in srgb, var(--surface-bg) 50%, var(--panel-bg))`},children:[(0,R.jsx)(`button`,{type:`button`,onClick:t,disabled:o,style:{padding:`8px 16px`,borderRadius:`8px`,border:`1px solid var(--border)`,background:`transparent`,color:`var(--text-main)`,fontSize:`13px`,cursor:o?`not-allowed`:`pointer`,fontWeight:500,transition:`background 0.15s ease`},children:`Cancel`}),(0,R.jsx)(`button`,{type:`button`,onClick:()=>{o||n(s)},disabled:o,style:{padding:`8px 18px`,borderRadius:`8px`,border:`none`,background:`var(--status-error, #ef4444)`,color:`#ffffff`,fontSize:`13px`,cursor:o?`not-allowed`:`pointer`,fontWeight:600,display:`inline-flex`,alignItems:`center`,gap:`7px`,boxShadow:`0 2px 8px color-mix(in srgb, var(--status-error, #ef4444) 40%, transparent)`,opacity:o?.75:1,transition:`all 0.15s ease`},children:o?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,className:`spinning-loader`,children:(0,R.jsx)(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`})}),(0,R.jsx)(`span`,{children:`Rewinding...`})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,R.jsx)(`polyline`,{points:`1 4 1 10 7 10`}),(0,R.jsx)(`path`,{d:`M3.51 15a9 9 0 1 0 2.13-9.36L1 10`})]}),(0,R.jsx)(`span`,{children:`Confirm Rewind`})]})})]})]})})}}));function DC({language:e,message:t,sending:n,isSpeaking:r,onSendVoiceMessage:i,onSetMessage:a}){let[o,s]=(0,OC.useState)(!1),[c,l]=(0,OC.useState)(!1),[u,d]=(0,OC.useState)(``),[f,p]=(0,OC.useState)(!1),m=(0,OC.useRef)(null),h=(0,OC.useRef)(null),g=(0,OC.useRef)(null),_=(0,OC.useRef)(!1),v=(0,OC.useRef)(!1),y=(0,OC.useRef)(!1),b=(0,OC.useRef)(!1),x=(0,OC.useRef)(t);(0,OC.useEffect)(()=>{_.current=c,c||(S(),d(``))},[c]),(0,OC.useEffect)(()=>{v.current=n},[n]),(0,OC.useEffect)(()=>{y.current=f},[f]),(0,OC.useEffect)(()=>{b.current=r},[r]),(0,OC.useEffect)(()=>{x.current=t},[t]);let S=()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null)},C=()=>{h.current!==null&&(window.clearTimeout(h.current),h.current=null)},w=()=>{S(),C(),m.current?.stop(),m.current=null,s(!1)},T=(e=350)=>{S(),!(!_.current||v.current||y.current||b.current)&&(g.current=window.setTimeout(()=>{g.current=null,E(!0)},e))},E=t=>{if(m.current||v.current||y.current||b.current)return;let n=window.SpeechRecognition||window.webkitSpeechRecognition;if(!n){alert(`Speech-to-text (Speech Recognition) is not supported in this browser/WebView. Please use Google Chrome or Microsoft Edge to enable voice conversation.`),_.current=!1,l(!1);return}let r=``;C();try{let o=new n;o.continuous=!0,o.interimResults=!0,o.lang=e===`en`?`en-US`:`th-TH`;let c=()=>{C(),t&&(h.current=window.setTimeout(()=>{o.stop()},2e3))};o.onstart=()=>{s(!0)},o.onresult=e=>{let t=``,n=``;for(let r=e.resultIndex;r<e.results.length;r+=1){let i=e.results[r]?.[0]?.transcript??``;e.results[r]?.isFinal?n+=i:t+=i}let i=(n||t).trim();i&&d(i),n.trim()&&(r=n.trim()),i&&c()},o.onerror=e=>{console.error(`Speech recognition error`,e),s(!1),C()},o.onend=()=>{m.current=null,s(!1),C();let e=r.trim();e?t?(y.current=!0,p(!0),i(e).catch(e=>console.error(`Voice message failed`,e)).finally(()=>{y.current=!1,p(!1),T()})):a(x.current.trim()?`${x.current.trimEnd()} ${e}`:e):t&&_.current&&T()},m.current=o,o.start()}catch(e){console.error(`Failed to start speech recognition`,e),m.current=null,s(!1),C()}};return(0,OC.useEffect)(()=>{!c||n||f||r||o||T()},[c,n,f,r,o]),(0,OC.useEffect)(()=>()=>{if(S(),C(),m.current)try{m.current.stop()}catch{}},[]),{isRecording:o,voiceMode:c,setVoiceMode:l,voiceTranscript:u,setVoiceTranscript:d,voiceAwaitingResponse:f,voiceAwaitingResponseRef:y,voiceModeRef:_,startRecognition:E,stopRecognition:w,scheduleVoiceListen:T,clearRestartTimer:S}}var OC,kC=t((()=>{OC=e(A())})),AC=t((()=>{kC()}));function jC({workspacePath:e,chatId:t,startSession:n,sendAudioChunk:r,stopSession:i}){let[a,o]=(0,MC.useState)(!1),[s,c]=(0,MC.useState)(!1),[l,u]=(0,MC.useState)(``),[d,f]=(0,MC.useState)(``),[p,m]=(0,MC.useState)(!1),[h,g]=(0,MC.useState)(!1),[_,v]=(0,MC.useState)(!1),y=(0,MC.useRef)(!1),b=(0,MC.useRef)(!1),x=(0,MC.useRef)(!1),S=(0,MC.useRef)(null),C=(0,MC.useRef)(null),w=(0,MC.useRef)(null),T=(0,MC.useRef)(null),E=(0,MC.useRef)(0),D=(0,MC.useRef)(null),O=(0,MC.useRef)(null);(0,MC.useEffect)(()=>{y.current=s},[s]),(0,MC.useEffect)(()=>{b.current=p},[p]);let ee=(0,MC.useCallback)(()=>((!C.current||C.current.state===`closed`)&&(C.current=new AudioContext),C.current),[]),te=(0,MC.useCallback)(e=>{let t=ee(),n=atob(e),r=new Uint8Array(n.length);for(let e=0;e<n.length;e+=1)r[e]=n.charCodeAt(e);let i=new Int16Array(r.buffer,r.byteOffset,Math.floor(r.length/2)),a=t.createBuffer(1,i.length,PC),o=a.getChannelData(0);for(let e=0;e<i.length;e+=1)o[e]=i[e]/32768;let s=t.createBufferSource();s.buffer=a,s.connect(t.destination);let c=Math.max(t.currentTime,E.current);s.start(c),E.current=c+a.duration,v(!0),D.current!==null&&window.clearTimeout(D.current);let l=Math.max(0,(c+a.duration-t.currentTime)*1e3)+500;D.current=window.setTimeout(()=>v(!1),l)},[ee]),ne=(0,MC.useCallback)(e=>{switch(e.type){case`audioChunk`:m(!1),te(e.data);break;case`transcript`:(e.role===`user`?u:f)(t=>O.current===e.role?t+e.text:e.text),O.current=e.role;break;case`turnComplete`:O.current=null;break;case`toolStatus`:O.current=null,f(e.error?`${e.action} failed: ${e.error}`:`Running ${e.action}...`);break;case`error`:console.error(`Gemini Live session error`,e.message),O.current=null,f(e.message);break;case`closed`:o(!1),m(!1),v(!1),S.current=null,O.current=null;break}},[te]),k=(0,MC.useCallback)(()=>{T.current?.processor.disconnect(),T.current?.source.disconnect(),T.current=null,w.current?.getTracks().forEach(e=>e.stop()),w.current=null},[]),re=(0,MC.useCallback)(()=>{k();let e=S.current;S.current=null,o(!1),m(!1),g(!1),x.current=!1,v(!1),D.current!==null&&(window.clearTimeout(D.current),D.current=null),E.current=0,e&&i(e).catch(e=>console.error(`Failed to stop Gemini Live session`,e))},[k,i]),ie=(0,MC.useCallback)(()=>{g(e=>{let t=!e;return x.current=t,t})},[]),ae=(0,MC.useCallback)(async()=>{try{if(O.current=null,u(``),f(``),!navigator.mediaDevices?.getUserMedia)throw Error(`This window does not support microphone capture (navigator.mediaDevices.getUserMedia is unavailable).`);console.log(`[gemini-live] requesting microphone permission...`);let i=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});console.log(`[gemini-live] microphone granted, starting session...`),w.current=i;let a=await n(ne,e,t);console.log(`[gemini-live] session started`,a),S.current=a;let s=ee(),c=s.createMediaStreamSource(i),l=s.createScriptProcessor(FC,1,1),d=s.sampleRate/NC;l.onaudioprocess=e=>{if(!S.current||x.current)return;let t=e.inputBuffer.getChannelData(0),n=Math.floor(t.length/d),i=new Int16Array(n);for(let e=0;e<n;e+=1){let n=t[Math.floor(e*d)];i[e]=Math.max(-32768,Math.min(32767,Math.round(n*32768)))}let a=``,o=new Uint8Array(i.buffer);for(let e=0;e<o.length;e+=1)a+=String.fromCharCode(o[e]);r(S.current,btoa(a)).catch(e=>console.error(`Failed to send Gemini Live audio chunk`,e))},c.connect(l),l.connect(s.destination),T.current={source:c,processor:l},o(!0),m(!0)}catch(e){console.error(`Failed to start Gemini Live voice session`,e),f(`Error: ${e instanceof Error?e.message:String(e)}`),k(),o(!1),m(!1)}},[ne,e,t,ee,k,n,r]);(0,MC.useEffect)(()=>{s?ae():re()},[s]),(0,MC.useEffect)(()=>re,[re]);let oe=(0,MC.useCallback)(()=>{y.current&&(re(),ae())},[re,ae]),se=(0,MC.useCallback)(()=>{},[]);return{isRecording:a,voiceMode:s,setVoiceMode:c,userTranscript:l,assistantTranscript:d,voiceAwaitingResponse:p,voiceAwaitingResponseRef:b,voiceModeRef:y,isPaused:h,togglePause:ie,isSpeaking:_,restart:oe,startRecognition:se,stopRecognition:se,scheduleVoiceListen:se,clearRestartTimer:se}}var MC,NC,PC,FC,IC=t((()=>{MC=e(A()),NC=16e3,PC=24e3,FC=2048}));function LC({status:e,userTranscript:t,assistantTranscript:n,isPaused:r,onTogglePause:i,onEndCall:a,voice:o,voices:s,onChangeVoice:c}){let[l,u]=(0,RC.useState)(!1);return(0,zC.jsx)(`div`,{className:`gemini-live-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":`Gemini Live conversation`,children:(0,zC.jsxs)(`div`,{className:`gemini-live-card`,children:[(0,zC.jsx)(`span`,{className:`gemini-live-badge`,children:`Gemini Live`}),(0,zC.jsx)(`div`,{className:`gemini-live-orb ${e}`,"aria-hidden":`true`}),(0,zC.jsx)(`div`,{className:`gemini-live-status`,children:BC[e]}),(0,zC.jsx)(`div`,{className:`gemini-live-transcript`,children:t||n?(0,zC.jsxs)(zC.Fragment,{children:[t&&(0,zC.jsxs)(`p`,{className:`gemini-live-transcript-line`,children:[(0,zC.jsx)(`span`,{className:`gemini-live-transcript-speaker`,children:`You:`}),` `,t]}),n&&(0,zC.jsxs)(`p`,{className:`gemini-live-transcript-line`,children:[(0,zC.jsx)(`span`,{className:`gemini-live-transcript-speaker`,children:`Mint:`}),` `,n]})]}):`Say something to get started...`}),(0,zC.jsxs)(`div`,{className:`gemini-live-voice-picker`,children:[(0,zC.jsxs)(`button`,{type:`button`,className:`gemini-live-voice-btn`,onClick:()=>u(e=>!e),title:`Change voice`,"aria-expanded":l,children:[(0,zC.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,zC.jsx)(`path`,{d:`M11 5 6 9H2v6h4l5 4V5z`}),(0,zC.jsx)(`path`,{d:`M15.5 8.5a5 5 0 0 1 0 7`})]}),(0,zC.jsx)(`span`,{children:o})]}),l&&(0,zC.jsx)(`div`,{className:`gemini-live-voice-menu`,role:`listbox`,children:s.map(e=>(0,zC.jsx)(`button`,{type:`button`,role:`option`,"aria-selected":e===o,className:`gemini-live-voice-option ${e===o?`active`:``}`,onClick:()=>{u(!1),e!==o&&c(e)},children:e},e))})]}),(0,zC.jsxs)(`div`,{className:`gemini-live-controls`,children:[(0,zC.jsx)(`button`,{type:`button`,className:`gemini-live-btn`,onClick:i,title:r?`Resume`:`Pause`,children:r?(0,zC.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,zC.jsx)(`path`,{d:`M8 5v14l11-7z`})}):(0,zC.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,zC.jsx)(`rect`,{x:`6`,y:`5`,width:`4`,height:`14`,rx:`1`}),(0,zC.jsx)(`rect`,{x:`14`,y:`5`,width:`4`,height:`14`,rx:`1`})]})}),(0,zC.jsx)(`button`,{type:`button`,className:`gemini-live-btn gemini-live-end`,onClick:a,title:`End Live conversation`,children:(0,zC.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,zC.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,zC.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})]})})}var RC,zC,BC,VC=t((()=>{RC=e(A()),zC=j(),BC={listening:`Listening`,speaking:`Speaking`,thinking:`Thinking`,paused:`Paused`}}));function HC(e){let t=/\.([a-zA-Z0-9]+)$/.exec(e.trim())?.[1]?.toLowerCase();return!!t&&UC.includes(t)}var UC,WC,GC=t((()=>{UC=[`txt`,`md`,`pdf`,`docx`,`xlsx`,`json`,`toml`,`yaml`,`yml`,`rs`,`ts`,`tsx`,`js`,`jsx`,`py`,`html`,`css`],WC=UC.map(e=>`.${e}`).join(`,`)}));function KC({provider:e}){let t=e.toLowerCase();return t===`gemini`?(0,z.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,z.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})}):t===`anthropic`?(0,z.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`path`,{d:`M4.5 16.5c-1.5 1.26-2.5 3.19-2.5 5.5h20c0-2.31-1-4.24-2.5-5.5`}),(0,z.jsx)(`path`,{d:`M12 2L2 22h20L12 2z`})]}):t===`openai`?(0,z.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,z.jsx)(`line`,{x1:`12`,y1:`2`,x2:`12`,y2:`22`}),(0,z.jsx)(`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`})]}):t===`deepseek`?(0,z.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}):t===`openrouter`?(0,z.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`polyline`,{points:`16 3 21 3 21 8`}),(0,z.jsx)(`line`,{x1:`4`,y1:`20`,x2:`21`,y2:`3`}),(0,z.jsx)(`polyline`,{points:`21 16 21 21 16 21`}),(0,z.jsx)(`line`,{x1:`15`,y1:`15`,x2:`21`,y2:`21`}),(0,z.jsx)(`line`,{x1:`4`,y1:`4`,x2:`9`,y2:`9`})]}):t===`huggingface`?(0,z.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,z.jsx)(`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`}),(0,z.jsx)(`line`,{x1:`9`,y1:`9`,x2:`9.01`,y2:`9`}),(0,z.jsx)(`line`,{x1:`15`,y1:`9`,x2:`15.01`,y2:`9`})]}):t===`local_openai`?(0,z.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,ry:`2`}),(0,z.jsx)(`line`,{x1:`8`,y1:`21`,x2:`16`,y2:`21`}),(0,z.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`21`})]}):t===`ollama`?(0,z.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,z.jsx)(`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`})}):(0,z.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,z.jsx)(`path`,{d:`M19.07 4.93a10 10 0 0 1 0 14.14M4.93 4.93a10 10 0 0 0 0 14.14`})]})}function qC({type:e,label:t}){return(0,z.jsxs)(`span`,{className:`model-tag-badge badge-${e}`,children:[e===`fast`&&(0,z.jsx)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,z.jsx)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`})}),e===`reasoning`&&(0,z.jsxs)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}),(0,z.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`}),(0,z.jsx)(`line`,{x1:`9`,y1:`1`,x2:`9`,y2:`4`}),(0,z.jsx)(`line`,{x1:`15`,y1:`1`,x2:`15`,y2:`4`}),(0,z.jsx)(`line`,{x1:`9`,y1:`20`,x2:`9`,y2:`23`}),(0,z.jsx)(`line`,{x1:`15`,y1:`20`,x2:`15`,y2:`23`}),(0,z.jsx)(`line`,{x1:`20`,y1:`9`,x2:`23`,y2:`9`}),(0,z.jsx)(`line`,{x1:`20`,y1:`14`,x2:`23`,y2:`14`}),(0,z.jsx)(`line`,{x1:`1`,y1:`9`,x2:`4`,y2:`9`}),(0,z.jsx)(`line`,{x1:`1`,y1:`14`,x2:`4`,y2:`14`})]}),e===`top`&&(0,z.jsx)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,z.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})}),e===`vision`&&(0,z.jsxs)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,z.jsx)(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z`})]}),(0,z.jsx)(`span`,{children:t})]})}function JC(e){let t=e.toLowerCase();return t.includes(`reason`)||t.includes(`thinking`)||t.includes(`r1`)||t.includes(`o1`)||t.includes(`o3`)||t.includes(`qwq`)?[{label:`Reasoning`,type:`reasoning`}]:t.includes(`vision`)||t.includes(`multimodal`)||t.includes(`-vl`)?[{label:`Vision`,type:`vision`}]:t.includes(`flash`)||t.includes(`haiku`)||t.includes(`mini`)||t.includes(`turbo`)||t.includes(`lite`)?[{label:`Fast`,type:`fast`}]:t===`claude-sonnet-5`||t===`claude-opus-5`||t===`gemini-2.5-pro`||t===`gpt-5.6-luna`||t===`gpt-4o`||t===`deepseek-chat`||t===`deepseek-v4-pro`?[{label:`Top`,type:`top`}]:[]}function YC({activeProvider:e,activeModel:t,availableProviders:n,settingsConfig:r,dynamicOllamaModels:i,onSelect:a,disabled:o=!1}){let[s,c]=(0,XC.useState)(!1),[l,u]=(0,XC.useState)(``),[d,f]=(0,XC.useState)(0),p=(0,XC.useRef)(null),m=(0,XC.useRef)(null),h=(0,XC.useRef)(null),g=(0,XC.useRef)(null),{models:_}=mt(`gemini`,r?.apiKey||``),{models:v}=mt(`anthropic`,r?.anthropicApiKey||``),{models:y}=mt(`openai`,r?.openaiApiKey||``),{models:b}=mt(`openrouter`,r?.openrouterApiKey||``),{models:x}=mt(`deepseek`,r?.deepseekApiKey||``),{models:S}=mt(`local_openai`,``,r?.localApiBaseUrl||``),[C,w]=(0,XC.useState)([]);(0,XC.useEffect)(()=>{if(i&&i.length>0){w(i);return}let e=!1;return(async()=>{let t=r?.ollamaHost||`http://localhost:11434`,n=t.endsWith(`/`)?t.slice(0,-1):t;try{let t=new AbortController,r=setTimeout(()=>t.abort(),2e3),i=await fetch(`${n}/api/tags`,{signal:t.signal});if(clearTimeout(r),i.ok){let t=await i.json();if(!e&&t&&Array.isArray(t.models)&&t.models.length>0){w(t.models.map(e=>e.name));return}}}catch{}try{let t=await Te(`ollama`,``);if(!e&&t&&t.length>0){w(t);return}}catch{}!e&&r?.ollamaModel&&w([r.ollamaModel])})(),()=>{e=!0}},[i,r?.ollamaHost,r?.ollamaModel]);let T=(0,XC.useMemo)(()=>{let e=[],t=(t,n,r)=>{r.length!==0&&e.push({id:t,name:n,icon:(0,z.jsx)(KC,{provider:t}),models:r})};n.includes(`gemini`)&&t(`gemini`,`Google Gemini`,_),n.includes(`anthropic`)&&t(`anthropic`,`Anthropic Claude`,v),n.includes(`openai`)&&t(`openai`,`OpenAI`,y),n.includes(`deepseek`)&&t(`deepseek`,`DeepSeek`,x),n.includes(`openrouter`)&&t(`openrouter`,`OpenRouter`,b),n.includes(`huggingface`)&&t(`huggingface`,`Hugging Face`,[...qe]),n.includes(`local_openai`)&&t(`local_openai`,`LM Studio / Local`,S),n.includes(`ollama`)&&t(`ollama`,`Ollama`,i&&i.length>0?i:C.length>0?C:r?.ollamaModel?[r.ollamaModel]:[]);let a=r?.customProviders||[];for(let e of a){let r=`custom:${e.id}`;if(n.includes(r)){let n=(e.models||[]).map(e=>e.modelId).filter(Boolean);t(r,e.displayName||e.id,n)}}return e},[n,_,v,y,x,b,S,i,C,r?.customProviders,r?.ollamaModel]),E=(0,XC.useMemo)(()=>{let e=l.trim().toLowerCase();if(!e)return T;let t=[];for(let n of T)if(n.name.toLowerCase().includes(e)||n.id.toLowerCase().includes(e))t.push(n);else{let r=n.models.filter(t=>t.toLowerCase().includes(e));r.length>0&&t.push({...n,models:r})}return t},[T,l]),D=(0,XC.useMemo)(()=>{let e=[];for(let t of E)for(let n of t.models)e.push({providerId:t.id,providerName:t.name,model:n});return e},[E]);(0,XC.useEffect)(()=>{f(0)},[l]),(0,XC.useEffect)(()=>{if(!s)return;let e=e=>{let t=e.target;p.current&&!p.current.contains(t)&&m.current&&!m.current.contains(t)&&c(!1)};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[s]),(0,XC.useEffect)(()=>{s&&(u(``),setTimeout(()=>{h.current?.focus()},50))},[s]),(0,XC.useEffect)(()=>{if(!s||!g.current)return;let e=g.current.querySelector(`[data-item-index="${d}"]`);e&&e.scrollIntoView({block:`nearest`})},[d,s]);let O=e=>{if(s)if(e.key===`ArrowDown`){if(e.preventDefault(),D.length===0)return;f(e=>(e+1)%D.length)}else if(e.key===`ArrowUp`){if(e.preventDefault(),D.length===0)return;f(e=>(e-1+D.length)%D.length)}else if(e.key===`Enter`){e.preventDefault();let t=D[d];t&&(a(t.providerId,t.model),c(!1))}else e.key===`Escape`&&(e.preventDefault(),c(!1),m.current?.focus())},ee=(0,XC.useMemo)(()=>t?t.split(`/`).pop()||t:`Select Model`,[t]),te=0;return(0,z.jsxs)(`div`,{className:`model-selector-container`,children:[(0,z.jsxs)(`button`,{ref:m,type:`button`,className:`model-selector-trigger ${s?`active`:``}`,onClick:()=>c(!s),disabled:o,title:`Model: ${t||`None`} (${e})`,"aria-haspopup":`listbox`,"aria-expanded":s,children:[(0,z.jsx)(`span`,{className:`model-selector-trigger-icon`,children:(0,z.jsx)(KC,{provider:e})}),(0,z.jsx)(`span`,{className:`model-selector-trigger-name`,children:ee}),(0,z.jsx)(`svg`,{className:`model-selector-trigger-chevron ${s?`open`:``}`,width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,z.jsx)(`polyline`,{points:`6 9 12 15 18 9`})})]}),s&&(0,z.jsxs)(`div`,{ref:p,className:`model-spotlight-popover`,onKeyDown:O,children:[(0,z.jsxs)(`div`,{className:`model-spotlight-search-bar`,children:[(0,z.jsxs)(`svg`,{className:`search-icon`,width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,z.jsx)(`input`,{ref:h,type:`text`,className:`model-spotlight-input`,placeholder:`Search model or provider...`,value:l,onChange:e=>u(e.target.value)}),l&&(0,z.jsx)(`button`,{type:`button`,className:`search-clear-btn`,onClick:()=>u(``),title:`Clear search`,children:(0,z.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,z.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,z.jsx)(`div`,{ref:g,className:`model-spotlight-list`,role:`listbox`,children:E.length===0?(0,z.jsxs)(`div`,{className:`model-spotlight-empty`,children:[(0,z.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,z.jsxs)(`span`,{children:[`No models found matching "`,l,`"`]})]}):E.map(n=>(0,z.jsxs)(`div`,{className:`model-spotlight-group`,children:[(0,z.jsxs)(`div`,{className:`model-spotlight-group-header`,children:[(0,z.jsx)(`span`,{className:`group-header-icon`,children:n.icon}),(0,z.jsx)(`span`,{className:`group-header-title`,children:n.name})]}),(0,z.jsx)(`div`,{className:`model-spotlight-group-items`,children:n.models.map(r=>{let i=te++,o=e===n.id&&t===r,s=d===i,l=JC(r);return(0,z.jsxs)(`div`,{"data-item-index":i,className:`model-spotlight-item ${o?`is-active`:``} ${s?`is-highlighted`:``}`,onClick:()=>{a(n.id,r),c(!1)},onMouseEnter:()=>f(i),role:`option`,"aria-selected":o,children:[(0,z.jsxs)(`div`,{className:`model-item-left`,children:[(0,z.jsx)(`span`,{className:`model-item-name`,children:r.split(`/`).pop()||r}),r.includes(`/`)&&(0,z.jsx)(`span`,{className:`model-item-repo`,children:r})]}),(0,z.jsxs)(`div`,{className:`model-item-right`,children:[(0,z.jsx)(`div`,{className:`model-item-badges`,children:l.map(e=>(0,z.jsx)(qC,{type:e.type,label:e.label},e.type))}),o&&(0,z.jsx)(`svg`,{className:`model-item-check`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--accent, #10b981)`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,z.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]})]},r)})})]},n.id))})]})]})}var XC,z,ZC=t((()=>{XC=e(A()),Me(),h(),xt(),z=j()}));function QC({interactions:e,sending:t,sendingMessage:n,sendingImageCount:r,sendingVideoCount:i,streamedReply:o,streamedResponse:s,agentProgress:c,agentActivitySnapshots:l,thinkingExpanded:u,onThinkingExpandedChange:d,message:f,imageAttachments:p,videoAttachments:h,documentName:g,pendingApproval:_,smartContext:v,agentMode:y,planMode:b,status:x,workspacePath:S,chatEnd:C,welcomeInteraction:w,onSubmit:T,onSelectImage:D,onSelectVideo:ee,onSelectDocument:te,onPasteImage:ne,onSetMessage:k,onSendVoiceMessage:re,onRemoveImage:ie,onRemoveVideo:oe,onRemoveDocument:se,onStartWebSearch:le,onCaptureScreen:de,onSetSmartContext:fe,onSetAgentMode:pe,onSetPlanMode:me,onSetProvider:he,onSelectWorkspace:ge,onApproval:_e,settingsConfig:ve,onSetModel:ye,onSelectModelAndProvider:xe,onCancelMessage:Se,onClearMessages:Ce,onSetGeminiLiveVoice:we,onToggleMobileSidebar:Ee}){let De=Jt(c),Oe=$e(s),A=[...c].reverse().find(e=>e.type===`Thinking`),ke=null,Ae=null;A&&A.type===`Thinking`&&(ke=A.data.agent_name||null,Ae=A.data.model_name||null);let[j,je]=(0,B.useState)({}),[Me,Ne]=(0,B.useState)({}),[Pe,Fe]=(0,B.useState)({}),[Ie,Le]=(0,B.useState)(null),[Re,He]=(0,B.useState)(!1),[Ue,We]=(0,B.useState)(0),[Ge,Ke]=(0,B.useState)(yt);(0,B.useEffect)(()=>{let e=!1;return(async()=>{let t=ve?.ollamaHost||`http://localhost:11434`,n=t.endsWith(`/`)?t.slice(0,-1):t;try{let t=new AbortController,r=setTimeout(()=>t.abort(),2e3),i=await fetch(`${n}/api/tags`,{signal:t.signal});if(clearTimeout(r),i.ok){let t=await i.json();if(!e&&t&&Array.isArray(t.models)&&t.models.length>0){Ke(t.models.map(e=>e.name));return}}}catch{}try{let t=await Te(`ollama`,``);if(!e&&t&&t.length>0){Ke(t);return}}catch{}e||(ve?.ollamaModel?Ke([ve.ollamaModel]):Ke(yt))})(),()=>{e=!0}},[ve?.ollamaHost,ve?.ollamaModel]),(0,B.useEffect)(()=>{if(!t){We(0);return}let e=Date.now();We(0);let n=setInterval(()=>{We(Math.round((Date.now()-e)/1e3))},1e3);return()=>clearInterval(n)},[t]);let[Ye,Xe]=(0,B.useState)(null),[Ze,Qe]=(0,B.useState)(null),nt=(0,B.useRef)(null),[rt,it]=(0,B.useState)(!1),at=(0,B.useRef)(!0),ot=(0,B.useCallback)(()=>{let e=nt.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<=240;it(!t),at.current=t},[]);(0,B.useEffect)(()=>{let e=nt.current;e&&at.current&&(e.scrollTop=e.scrollHeight)},[Ie]);let st=(0,B.useCallback)(()=>{C.current?.scrollIntoView({behavior:`smooth`})},[C]),[ct,lt]=(0,B.useState)(()=>{try{let e=localStorage.getItem(`mint_preview_split_ratio`);if(e){let t=parseFloat(e);if(!isNaN(t)&&t>=.2&&t<=.8)return t}}catch{}return .5}),ut=(0,B.useRef)(ct),dt=(0,B.useRef)(null),ft=(0,B.useCallback)(e=>{e.preventDefault();let t=dt.current;if(!t)return;t.classList.add(`is-resizing`);let n=e=>{let n=t.getBoundingClientRect(),r=n.width;if(r<=0)return;let i=n.right-e.clientX,a=Math.max(280,Math.min(r-340,i))/r;ut.current=a,t.style.setProperty(`--preview-width`,`${(a*100).toFixed(2)}%`)},r=()=>{window.removeEventListener(`mousemove`,n),window.removeEventListener(`mouseup`,r),t.classList.remove(`is-resizing`),lt(ut.current);try{localStorage.setItem(`mint_preview_split_ratio`,ut.current.toFixed(4))}catch{}};window.addEventListener(`mousemove`,n),window.addEventListener(`mouseup`,r)},[]),mt=(0,B.useCallback)(()=>{let e=.5;ut.current=e,lt(e),dt.current&&dt.current.style.setProperty(`--preview-width`,`50%`);try{localStorage.setItem(`mint_preview_split_ratio`,`0.5`)}catch{}},[]),[ht,gt]=(0,B.useState)({isOpen:!1,interaction:null,changes:[],checkpoints:[],targetCheckpoint:null,isLoading:!1}),[_t,vt]=(0,B.useState)({visible:!1,message:``,canUndo:!1,isUndoing:!1,type:`success`});(0,B.useEffect)(()=>{if(!_t.visible)return;let e=setTimeout(()=>{vt(e=>({...e,visible:!1}))},16e3);return()=>clearTimeout(e)},[_t.visible,_t.message]);let bt=(0,B.useCallback)(async e=>{let t=ht.interaction;if(!t)return;let n=t.chatId||`cli`;gt(e=>({...e,isLoading:!0}));try{let t=await E(n,e,S);gt(e=>({...e,isOpen:!1,isLoading:!1})),t.status===`ok`?vt({visible:!0,message:t.message,canUndo:!0,isUndoing:!1,type:`success`}):vt({visible:!0,message:`Failed to rewind: ${t.message}`,canUndo:!1,isUndoing:!1,type:`error`})}catch(e){gt(e=>({...e,isOpen:!1,isLoading:!1})),vt({visible:!0,message:`Error: ${e.message||String(e)}`,canUndo:!1,isUndoing:!1,type:`error`})}},[ht.interaction,S]),xt=(0,B.useCallback)(async()=>{vt(e=>({...e,isUndoing:!0}));try{let e=await ue(S);e.status===`ok`?vt({visible:!0,message:e.message,canUndo:!1,isUndoing:!1,type:`success`}):vt({visible:!0,message:`Failed to undo rewind: ${e.message}`,canUndo:!0,isUndoing:!1,type:`error`})}catch(e){vt({visible:!0,message:`Error: ${e.message||String(e)}`,canUndo:!0,isUndoing:!1,type:`error`})}},[S]),St=(0,B.useCallback)(async(e,t)=>{try{let n=fb(t)||t;await navigator.clipboard.writeText(n),Qe(e),setTimeout(()=>{Qe(t=>t===e?null:t)},2e3)}catch(e){console.error(`Failed to copy message:`,e)}},[]),wt=(0,B.useRef)(null),Et=(0,B.useRef)(null),Dt=(0,B.useRef)(0),kt=(0,B.useRef)(!1),At=(0,B.useRef)(!1),jt=(0,B.useRef)(null),Mt=(0,B.useRef)(null),[Nt,Pt]=(0,B.useState)(!1),It=(0,B.useRef)(0),Rt=(0,B.useRef)(0),Bt=e=>{e.preventDefault(),e.dataTransfer?.types?.includes(`Files`)&&(It.current++,Pt(!0))},Vt=e=>{e.preventDefault(),e.dataTransfer?.types?.includes(`Files`)&&(It.current--,It.current===0&&Pt(!1))},Ht=e=>{e.preventDefault()},Ut=e=>{e.preventDefault(),e.stopPropagation(),It.current=0,Pt(!1);let t=Date.now();if(t-Rt.current<250)return;Rt.current=t;let n=e.dataTransfer?.files;if(n&&n.length>0){let e=n[0];if(e.type.startsWith(`image/`)){let t=document.getElementById(`vision-file-input`);if(t){let n=new DataTransfer;n.items.add(e),t.files=n.files,D({target:t})}}else if(e.type.startsWith(`video/`)){let t=document.getElementById(`video-file-input`);if(t){let n=new DataTransfer;n.items.add(e),t.files=n.files,ee({target:t})}}else if(HC(e.name)){let t=document.getElementById(`document-file-input`);if(t){let n=new DataTransfer;n.items.add(e),t.files=n.files,te({target:t})}}}},{isRecording:Wt,voiceMode:Gt,setVoiceMode:Kt,voiceTranscript:qt,setVoiceTranscript:Xt,voiceAwaitingResponse:Zt,voiceAwaitingResponseRef:Qt,voiceModeRef:$t,startRecognition:en,stopRecognition:tn,scheduleVoiceListen:nn,clearRestartTimer:rn}=DC({onSendVoiceMessage:re,language:ve?.language,message:f,sending:t,isSpeaking:!!Ye,onSetMessage:k}),an=ve?.voiceMode===`geminiLive`,on=jC({workspacePath:S,startSession:O,sendAudioChunk:ae,stopSession:ce}),cn=!!(f.trim()||p.length>0||h.length>0||g),ln=Array.from({length:r},(e,t)=>`[Image #${t+1}]`).join(` `),un=Array.from({length:i||0},(e,t)=>`[Video #${t+1}]`).join(` `),dn=Ye?`speaking`:t||Zt?`thinking`:Wt?`listening`:Gt?`ready`:`off`,fn=dn===`speaking`?`Speaking`:dn===`thinking`?`Thinking`:dn===`listening`?`Listening`:`Ready`,pn=e=>{switch(e){case`gemini`:return tt;case`openai`:return Tt;case`openrouter`:return pt;case`deepseek`:return Ve;case`anthropic`:return Ct;case`huggingface`:return qe;case`local_openai`:return Ot;case`ollama`:return Ge;default:if(e.startsWith(`custom:`)){let t=e.replace(/^custom:/,``);return(ve?.customProviders??[]).find(e=>e.id===t)?.models.map(e=>e.modelId)??[]}return[]}},mn=x?.activeProvider??``;pn(mn);let hn=(e=>{if(!ve)return``;switch(e){case`gemini`:return ve.geminiModel;case`openai`:return ve.openaiModel;case`openrouter`:return ve.openrouterModel;case`deepseek`:return ve.deepseekModel;case`anthropic`:return ve.anthropicModel;case`huggingface`:return ve.hfModel;case`local_openai`:return ve.localModelName;case`ollama`:return ve.ollamaModel;default:if(e.startsWith(`custom:`)){let t=e.replace(/^custom:/,``),n=(ve?.customProviders??[]).find(e=>e.id===t);return(ve.customModelSelections??{})[t]??n?.models[0]?.modelId??``}return``}})(mn),gn=S?S.split(/[\\/]/).filter(Boolean).pop()||S:`Select Project`,_n=(0,B.useRef)(null),vn=(0,B.useRef)(null),M=(0,B.useMemo)(()=>{let t=[];for(let n of e){if(n?.provider===`system`)continue;let e=typeof n?.userText==`string`?n.userText.trim():``;e&&t[t.length-1]!==e&&t.push(e)}return t},[e]),[yn,bn]=(0,B.useState)(null),Sn=(0,B.useRef)(``),N=e=>{k(e),setTimeout(()=>{let e=_n.current;if(!e)return;Pn(e);let t=e.value.length;e.setSelectionRange(t,t),e.focus()},0)},Cn=()=>{if(M.length===0)return!1;if(yn===null)return Sn.current=f,bn(0),N(M[M.length-1]),!0;if(yn+1<M.length){let e=yn+1;bn(e),N(M[M.length-1-e])}return!0},wn=e=>{bn(null),N(e)},Tn=()=>{if(yn===null)return!1;if(yn===0)return bn(null),N(Sn.current),!0;let e=yn-1;return bn(e),N(M[M.length-1-e]),!0},En=e=>{k(e),setTimeout(()=>{let e=_n.current;e&&(Pn(e),e.focus())},0)},Dn=e=>{e.key!==`Enter`||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),e.currentTarget.form?.requestSubmit())},On=e=>{let t=(e.key===`ArrowUp`||e.key===`ArrowDown`)&&!e.shiftKey&&!e.altKey&&!e.metaKey&&!e.ctrlKey&&!e.nativeEvent.isComposing;if(t&&yn!==null&&e.currentTarget.selectionStart===e.currentTarget.selectionEnd&&(e.key===`ArrowUp`?Cn():Tn())){e.preventDefault();return}if(!vn.current?.handleKeyDown(e)){if(t){let t=e.currentTarget;if(t.selectionStart===t.selectionEnd){if(e.key===`ArrowUp`){if(!t.value.slice(0,t.selectionStart).includes(`
|
|
46
|
-
`)&&Cn()){e.preventDefault();return}}else if(!t.value.slice(t.selectionEnd).includes(`
|
|
47
|
-
`)&&Tn()){e.preventDefault();return}}}Dn(e)}},kn=()=>{Dt.current+=1,Et.current?.pause(),Et.current=null,Mt.current=null,typeof window<`u`&&window.speechSynthesis&&window.speechSynthesis.cancel(),Xe(null)},An=(e,t)=>{if(typeof window>`u`||!window.speechSynthesis){Xe(null);return}let n=/[\u0e00-\u0e7f]/.test(e),r=new SpeechSynthesisUtterance(e);r.lang=n?`th-TH`:`en-US`,r.volume=Math.max(0,Math.min(1,Je(ve?.ttsVolume,1))),r.rate=Math.max(.1,Math.min(10,Je(ve?.ttsSpeed,1))),r.pitch=Math.max(0,Math.min(2,Je(ve?.ttsPitch,1)));let i=window.speechSynthesis.getVoices().find(e=>{let t=e.lang.toLowerCase(),r=n?`th`:`en`;return t.startsWith(r)||t.includes(r)});i&&(r.voice=i);let a=()=>{Xe(e=>e===t?null:e),Mt.current=null,nn(900)};r.onend=a,r.onerror=a,Mt.current=t,Xe(t),window.speechSynthesis.speak(r)},jn=async(e,t,n)=>{let r=await a(e);for(let e of r){if(Dt.current!==n)return;await new Promise((t,n)=>{let r=new Audio(e.url);r.volume=Math.max(0,Math.min(1,Je(ve?.ttsVolume,1))),r.playbackRate=Math.max(.25,Math.min(4,Je(ve?.ttsSpeed,1))),Et.current=r,r.onended=()=>t(),r.onpause=()=>t(),r.onerror=()=>n(Error(`Google TTS playback failed`)),r.play().catch(n)})}Dt.current===n&&(Xe(e=>e===t?null:e),Mt.current=null,nn(900))},Mn=e=>{let t=mb(e);if(!t)return;if(Ye===e){kn();return}kn();let n=Dt.current;if(Mt.current=e,Xe(e),ve?.ttsProvider===`google`){jn(t,e,n).catch(r=>{console.warn(`Google TTS failed, falling back to native speech synthesis:`,r),Dt.current===n&&An(t,e)});return}An(t,e)},Nn=()=>{if(Wt){tn(),kn();return}kn(),en()},Pn=e=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,120)}px`};(0,B.useEffect)(()=>()=>{kn()},[]),(0,B.useEffect)(()=>{t&&(At.current=!0)},[t]),(0,B.useEffect)(()=>{if(e.length===0)return;let n=e[e.length-1];if(!kt.current&&(kt.current=!0,!At.current)){jt.current=n?.id??null;return}if(!t&&!(!n?.aiText||n.id===jt.current)){if(!ve?.enableVoiceReply||on.voiceMode){jt.current=n.id,Gt&&nn(350);return}jt.current=n.id,Mn(n.aiText)}},[e,t,ve?.enableVoiceReply,on.voiceMode,Gt]),(0,B.useEffect)(()=>{if(!Re)return;let e=e=>{wt.current?.contains(e.target)||He(!1)};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[Re]),(0,B.useEffect)(()=>{let e=e=>{e.clipboardData&&ne(e.clipboardData)&&(e.preventDefault(),e.stopPropagation())};return window.addEventListener(`paste`,e,!0),()=>window.removeEventListener(`paste`,e,!0)},[ne]),(0,B.useEffect)(()=>{let e=e=>{e.key===`Escape`&&t&&Se()};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[t,Se]),(0,B.useEffect)(()=>{if(f)return;let e=document.getElementById(`chat-input`);e&&(e.style.height=``)},[f]);let Fn=()=>{He(!1),document.getElementById(`vision-file-input`)?.click()},In=()=>{He(!1),document.getElementById(`video-file-input`)?.click()},Ln=()=>{He(!1),document.getElementById(`document-file-input`)?.click()},Rn=()=>{He(!1),le()},zn=()=>{He(!1),y||pe(!0),k(`Generate an image of `),_n.current?.focus()},Bn=()=>{He(!1),y||pe(!0),k(`Generate a video of `),_n.current?.focus()},Vn=e=>{let t=e.trim();t&&k(f.trim()?`${f.trimEnd()} ${t} `:`${t} `)},Hn=e=>{let t=e.dataTransfer.getData(`application/x-mint-workspace-path`)||e.dataTransfer.getData(`text/plain`);t.trim().startsWith(`@`)&&(e.preventDefault(),Vn(t))},Un=e.length===0&&!t&&!_,Wn=(0,B.useCallback)(e=>{let t=String(e.id),n=l[t]??e.agentActivity??[];return(0,V.jsx)(mC,{activityView:Jt(n),isOpen:!!j[t],onToggle:()=>je(e=>({...e,[t]:!e[t]})),isHistorical:!0,rawProgress:n})},[l,j]),Gn=(0,B.useCallback)(e=>{let t=Yt(l[String(e.id)]??e.agentActivity??[]);return t.length===0?null:(0,V.jsx)(Bb,{sources:t})},[l]),Kn=(e,t)=>(0,V.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`6px`},children:e.map(e=>{let n=`${t}-${e.path}`,r=!!Pe[n],i=e.path.split(`/`).pop()||e.path,a=e.path.includes(`/`)?e.path.substring(0,e.path.lastIndexOf(`/`)):``;return(0,V.jsxs)(`div`,{className:`file-changes-item`,children:[(0,V.jsxs)(`div`,{className:`file-changes-item-header`,onClick:()=>Fe(e=>({...e,[n]:!e[n]})),children:[(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{color:`var(--text-muted)`},children:[(0,V.jsx)(`path`,{d:`M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z`}),(0,V.jsx)(`polyline`,{points:`14 2 14 8 20 8`})]}),(0,V.jsxs)(`span`,{className:`file-changes-filename ${e.created?`is-new`:``}`,children:[i,a&&(0,V.jsx)(`span`,{className:`file-changes-dirpath`,children:a}),e.created&&(0,V.jsx)(`span`,{className:`file-changes-badge-new`,children:`[NEW FILE]`})]})]}),(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,fontSize:`0.76rem`},children:[e.created?(0,V.jsxs)(`span`,{className:`file-changes-count-add`,children:[`+`,e.additions,` `,e.additions===1?`line`:`lines`]}):(0,V.jsxs)(V.Fragment,{children:[e.additions>0&&(0,V.jsxs)(`span`,{className:`file-changes-count-add`,children:[`+`,e.additions]}),e.deletions>0&&(0,V.jsxs)(`span`,{className:`file-changes-count-del`,children:[`-`,e.deletions]})]}),(0,V.jsx)(`button`,{type:`button`,className:`file-changes-preview-btn`,onClick:t=>{t.stopPropagation();let n=e.created&&e.hunks.length>0?e.hunks.map(e=>e.newText).filter(Boolean).join(`
|
|
48
|
-
`):void 0;Le({path:e.path,content:n})},title:`Open Live Preview Split View`,children:`Preview`}),(0,V.jsx)(`span`,{style:{color:`var(--text-muted)`,transform:r?`rotate(90deg)`:`none`,display:`inline-block`,transition:`transform 0.15s`},children:`>`})]})]}),r&&(0,V.jsx)(`div`,{className:`file-changes-diff-box`,children:e.hunks.map((t,n)=>(0,V.jsxs)(`div`,{className:`file-changes-diff-hunk`,style:{marginBottom:n<e.hunks.length-1?`10px`:0},children:[t.oldText&&(0,V.jsx)(`div`,{className:`file-changes-diff-del`,children:t.oldText.split(`
|
|
49
|
-
`).map((e,t)=>(0,V.jsxs)(`div`,{style:{display:`flex`},children:[(0,V.jsx)(`span`,{className:`file-changes-diff-sign-del`,children:`-`}),(0,V.jsx)(`span`,{children:e})]},t))}),t.newText&&(0,V.jsx)(`div`,{className:`file-changes-diff-add`,children:t.newText.split(`
|
|
50
|
-
`).map((e,t)=>(0,V.jsxs)(`div`,{style:{display:`flex`},children:[(0,V.jsx)(`span`,{className:`file-changes-diff-sign-add`,children:`+`}),(0,V.jsx)(`span`,{children:e})]},t))})]},n))})]},e.path)})}),qn=(0,B.useCallback)(e=>{let t=String(e.id),n=zt(l[t]??e.agentActivity??[]);if(n.length===0)return null;let r=n.reduce((e,t)=>e+t.additions,0),i=n.reduce((e,t)=>e+t.deletions,0),a=n.filter(e=>e.created).length,o=n.length-a,s=!!Me[t],c=``;return c=a>0&&o===0?`${a} ${a===1?`file created`:`files created`}`:a>0&&o>0?`${a} created, ${o} modified`:`${n.length} ${n.length===1?`file changed`:`files changed`}`,(0,V.jsxs)(`div`,{className:`file-changes-summary-container`,style:{marginBottom:`8px`},children:[(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`8px`},children:[(0,V.jsxs)(`button`,{type:`button`,className:`agent-activity-toggle file-changes-toggle`,"aria-expanded":s,onClick:()=>Ne(e=>({...e,[t]:!e[t]})),children:[(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{marginRight:`2px`},children:[(0,V.jsx)(`path`,{d:`M22 11.08V12a10 10 0 1 1-5.93-9.14`}),(0,V.jsx)(`polyline`,{points:`22 4 12 14.01 9 11.01`})]}),(0,V.jsxs)(`span`,{children:[c,a>0&&o===0?(0,V.jsxs)(`span`,{className:`file-changes-count-add`,style:{marginLeft:`6px`},children:[`(+`,r,` `,r===1?`line`:`lines`,`)`]}):(0,V.jsxs)(V.Fragment,{children:[r>0&&(0,V.jsxs)(`span`,{className:`file-changes-count-add`,style:{marginLeft:`6px`},children:[`+`,r]}),i>0&&(0,V.jsxs)(`span`,{className:`file-changes-count-del`,style:{marginLeft:`4px`},children:[`-`,i]})]})]}),(0,V.jsx)(`span`,{"aria-hidden":`true`,children:s?`^`:`>`})]}),(0,V.jsxs)(`button`,{type:`button`,className:`file-changes-rewind-btn`,onClick:async t=>{t.stopPropagation();let r=e.chatId||`cli`;try{let t=await m(r);if(!t||t.length===0){vt({visible:!0,message:`No git checkpoints recorded for this session.`,canUndo:!1,isUndoing:!1,type:`error`});return}let i=new Set(n.map(e=>e.path.trim().toLowerCase())),a=t.filter(e=>{if(!e.targetPath)return!1;let t=e.targetPath.trim().toLowerCase();return i.has(t)||Array.from(i).some(e=>t.endsWith(e)||e.endsWith(t))}),o=null;if(a.length>0)o=a.reduce((e,t)=>t.step<e.step?t:e,a[0]);else{let n=e.createdAt?new Date(e.createdAt).getTime()/1e3:0;if(n>0){let e=t.filter(e=>e.timestamp>=n-10);e.length>0&&(o=e[0])}o||=t[t.length-1]}gt({isOpen:!0,interaction:e,changes:n,checkpoints:t,targetCheckpoint:o,isLoading:!1})}catch(e){vt({visible:!0,message:`Failed to load checkpoints: ${e.message||String(e)}`,canUndo:!1,isUndoing:!1,type:`error`})}},title:`Rewind workspace to before these file edits (Git Checkpoint)`,children:[(0,V.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`polyline`,{points:`1 4 1 10 7 10`}),(0,V.jsx)(`path`,{d:`M3.51 15a9 9 0 1 0 2.13-9.36L1 10`})]}),`Rewind`]})]}),s&&(0,V.jsx)(`div`,{className:`agent-activity-card file-changes-card`,children:Kn(n,t)})]})},[l,Me,Pe,S]),Jn=(0,V.jsxs)(`section`,{className:`conversation-panel ${Un?`is-empty`:``}`,onDragEnter:Bt,onDragOver:Ht,onDragLeave:Vt,onDrop:Ut,style:Ie?{flex:`0 0 calc(100% - var(--preview-width, 50%))`,width:`calc(100% - var(--preview-width, 50%))`,minWidth:`320px`,maxWidth:`none`,margin:0,position:`relative`}:void 0,children:[Nt&&(0,V.jsxs)(`div`,{className:`drag-drop-overlay`,onDragEnter:Bt,onDragLeave:Vt,onDragOver:Ht,onDrop:Ut,style:{position:`absolute`,top:0,left:0,right:0,bottom:0,background:`rgba(15, 23, 42, 0.82)`,backdropFilter:`blur(8px)`,border:`2px dashed var(--accent)`,borderRadius:`16px`,margin:`12px`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`white`,zIndex:1e3,pointerEvents:`auto`},children:[(0,V.jsx)(`div`,{style:{marginBottom:`16px`,color:`var(--accent)`},children:(0,V.jsxs)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,V.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,V.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]})}),(0,V.jsx)(`div`,{style:{fontSize:`1.25rem`,fontWeight:`bold`,letterSpacing:`0.5px`},children:`Drag files to attach data`}),(0,V.jsx)(`div`,{style:{fontSize:`0.85rem`,color:`var(--text-muted)`,marginTop:`8px`},children:`Supports images (PNG, JPEG, WebP, GIF), videos (MP4, WebM, MOV, MKV), and PDF files`})]}),(0,V.jsxs)(`div`,{className:`chat-header`,children:[Ee&&(0,V.jsx)(`button`,{className:`mobile-menu-btn`,type:`button`,onClick:Ee,"aria-label":`Toggle menu`,children:(0,V.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`line`,{x1:`3`,y1:`12`,x2:`21`,y2:`12`}),(0,V.jsx)(`line`,{x1:`3`,y1:`6`,x2:`21`,y2:`6`}),(0,V.jsx)(`line`,{x1:`3`,y1:`18`,x2:`21`,y2:`18`})]})}),(0,V.jsxs)(`div`,{className:`chat-header-title`,children:[(0,V.jsx)(`img`,{src:be,alt:`Logo`,className:`chat-header-logo`}),(0,V.jsx)(`span`,{children:`Mint Agent`})]}),(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[Ie&&(0,V.jsx)(`button`,{type:`button`,className:`chat-header-clear-btn`,title:`Close Live Preview`,onClick:()=>Le(null),style:{color:`var(--accent)`,background:`color-mix(in srgb, var(--accent) 12%, transparent)`,border:`1px solid color-mix(in srgb, var(--accent) 25%, transparent)`,padding:`2px 8px`,borderRadius:`var(--radius-xs, 4px)`,fontSize:`0.74rem`,fontWeight:600,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:(0,V.jsx)(`span`,{children:`Close Live Preview`})}),(0,V.jsx)(`button`,{className:`chat-header-clear-btn`,title:`Clear Messages`,onClick:Ce,children:(0,V.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,V.jsx)(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}),(0,V.jsx)(`line`,{x1:`10`,y1:`11`,x2:`10`,y2:`17`}),(0,V.jsx)(`line`,{x1:`14`,y1:`11`,x2:`14`,y2:`17`})]})})]})]}),(0,V.jsxs)(`div`,{className:`chat-container`,ref:nt,onScroll:ot,children:[e.map((t,n)=>(0,V.jsxs)(B.Fragment,{children:[n>0&&ze(e[n-1].createdAt,t.createdAt)&&(0,V.jsxs)(`div`,{className:`system-event-divider`,children:[(0,V.jsx)(`div`,{className:`system-event-line`}),(0,V.jsxs)(`div`,{className:`system-event-pill`,children:[(0,V.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,V.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,V.jsx)(`polyline`,{points:`12 7 12 12 15.5 14`})]}),(0,V.jsx)(`span`,{children:Be(t.createdAt)})]}),(0,V.jsx)(`div`,{className:`system-event-line`})]}),(0,V.jsx)(Wb,{interaction:t,copiedId:Ze,onEditMessage:wn,speakingText:Ye,agentActivitySnapshots:l,thinkingExpanded:u,openActivityIds:j,openReviewIds:Me,openFileDiffs:Pe,onThinkingExpandedChange:d,handleCopyMessage:St,speak:Mn,renderCompletedActivity:Wn,renderFileChanges:qn,renderWebSearchSources:Gn})]},t.id)),t&&(0,V.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`,marginBottom:`16px`},children:[(0,V.jsx)(`div`,{className:`message user-message`,children:(0,V.jsx)(`div`,{className:`bubble-wrapper`,children:(0,V.jsx)(`div`,{className:`message-bubble`,children:Eb([n,ln,un].filter(Boolean).join(` `))})})}),y&&(0,V.jsx)(mC,{activityView:De,isOpen:j.live??!0,onToggle:()=>je(e=>({...e,live:!(e.live??!0)})),pendingApproval:!!_,rawProgress:c}),(()=>{let e=zt(c);if(e.length===0)return null;let t=e.reduce((e,t)=>e+t.additions,0),n=e.reduce((e,t)=>e+t.deletions,0),r=e.filter(e=>e.created).length,i=e.length-r,a=!!Me[`active-run`],o=``;return o=r>0&&i===0?`${r} ${r===1?`file created`:`files created`} in this run`:r>0&&i>0?`${r} created, ${i} modified in this run`:`${e.length} ${e.length===1?`file changed`:`files changed`} in this run`,(0,V.jsx)(`div`,{className:`message ai-message agent-activity-message`,style:{marginTop:`4px`,marginBottom:`8px`},children:(0,V.jsxs)(`div`,{className:`agent-activity-card file-changes-card`,children:[(0,V.jsxs)(`button`,{type:`button`,className:`agent-activity-toggle file-changes-toggle`,"aria-expanded":a,onClick:()=>Ne(e=>({...e,"active-run":!e[`active-run`]})),style:{border:0,background:`transparent`,padding:0},children:[(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{marginRight:`2px`},children:[(0,V.jsx)(`path`,{d:`M22 11.08V12a10 10 0 1 1-5.93-9.14`}),(0,V.jsx)(`polyline`,{points:`22 4 12 14.01 9 11.01`})]}),(0,V.jsxs)(`span`,{children:[o,r>0&&i===0?(0,V.jsxs)(`span`,{className:`file-changes-count-add`,style:{marginLeft:`6px`},children:[`(+`,t,` `,t===1?`line`:`lines`,`)`]}):(0,V.jsxs)(V.Fragment,{children:[t>0&&(0,V.jsxs)(`span`,{className:`file-changes-count-add`,style:{marginLeft:`6px`},children:[`+`,t]}),n>0&&(0,V.jsxs)(`span`,{className:`file-changes-count-del`,style:{marginLeft:`4px`},children:[`-`,n]})]})]}),(0,V.jsx)(`span`,{"aria-hidden":`true`,children:a?`^`:`>`})]}),a&&(0,V.jsx)(`div`,{style:{marginTop:`8px`},children:Kn(e,`active`)})]})})})(),(0,V.jsx)(`div`,{className:`message ai-message thinking-message`,children:(0,V.jsxs)(`div`,{className:`bubble-wrapper`,children:[(0,V.jsx)(Mb,{blockKey:`live`,thoughts:Ft(c),isLive:!0,expanded:u.live??!0,onExpandedChange:d,showEmptyHint:y&&Lt(c)&&Ft(c).length===0&&!o}),(0,V.jsx)(`div`,{className:`message-bubble`,children:(0,V.jsx)(`span`,{children:o?Eb(o):(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,color:`var(--text-soft, #94a3b8)`},children:[(0,V.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{display:`inline-block`,flexShrink:0},children:[(0,V.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`,stroke:`rgba(255, 255, 255, 0.12)`}),(0,V.jsx)(`path`,{d:`M12 2a10 10 0 0 1 10 10`,stroke:`var(--accent)`,strokeLinecap:`round`,children:(0,V.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`0.9s`,repeatCount:`indefinite`})})]}),(0,V.jsx)(`span`,{children:ke&&Ae?`${ke} (${Ae}) is thinking... (${Ue}s)`:`Thinking for ${Ue}s (Esc to cancel)`})]})})}),s&&(0,V.jsxs)(`div`,{className:`message-time`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,V.jsxs)(`span`,{className:`provider-model-chip`,"data-provider":(s.provider||``).toLowerCase(),title:`${s.provider} • ${s.model}`,children:[(0,V.jsx)(`span`,{className:`provider-chip-dot`,"aria-hidden":`true`}),(0,V.jsx)(`span`,{className:`provider-chip-name`,children:s.provider}),(0,V.jsx)(`span`,{className:`provider-chip-divider`,children:`/`}),(0,V.jsx)(`span`,{className:`provider-chip-model`,children:s.model})]}),Oe&&(0,V.jsx)(`span`,{className:`provider-fallback-notice`,children:Oe}),o&&(0,V.jsxs)(`div`,{className:`message-action-buttons`,style:{display:`flex`,alignItems:`center`,gap:`4px`,marginLeft:`auto`},children:[(0,V.jsx)(`button`,{type:`button`,className:`msg-action-btn copy-btn ${Ze===`live`?`is-copied`:``}`,onClick:()=>St(`live`,o),title:Ze===`live`?`คัดลอกแล้ว (Copied!)`:`คัดลอกข้อความ (Copy message)`,children:gb(Ze===`live`)}),(0,V.jsx)(`button`,{type:`button`,className:`msg-action-btn tts-btn ${Ye===o?`is-speaking`:``}`,onClick:()=>Mn(o),title:Ye===o?`Stop reading`:`Read aloud`,children:hb(Ye===o)})]})]})]})})]}),_&&(0,V.jsx)(xn,{pendingApproval:_,onApproval:_e},_.id||JSON.stringify(_)),rt&&(0,V.jsx)(`button`,{type:`button`,className:`scroll-to-bottom-btn`,onClick:st,title:`Scroll to latest message`,"aria-label":`Scroll to latest message`,children:(0,V.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`path`,{d:`M12 5v14`}),(0,V.jsx)(`path`,{d:`M6 13l6 6 6-6`})]})}),(0,V.jsx)(`div`,{ref:C})]}),(0,V.jsxs)(`div`,{className:`input-area ${Gt?`voice-active`:``}`,children:[Un&&(0,V.jsx)(`div`,{className:`empty-chat-prompt`,children:`Mint Agent is ready to work`}),ge&&(0,V.jsxs)(`button`,{type:`button`,className:`workspace-select-btn`,onClick:ge,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,V.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,V.jsx)(`path`,{d:`M3 6h7l2 2h9v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z`})})}),(0,V.jsx)(`span`,{children:gn}),(0,V.jsx)(`span`,{"aria-hidden":`true`,children:`⌄`})]}),(0,V.jsxs)(`div`,{className:`smart-context-bar`,children:[(0,V.jsxs)(`div`,{className:`smart-context-label`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,V.jsxs)(`label`,{className:`toggle-switch`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:v,onChange:e=>fe(e.target.checked)}),(0,V.jsx)(`span`,{className:`slider round`})]}),(0,V.jsx)(`span`,{children:`Smart Context (Auto-Screen)`})]}),(0,V.jsxs)(`div`,{className:`smart-context-label`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,V.jsxs)(`label`,{className:`toggle-switch`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>pe(e.target.checked)}),(0,V.jsx)(`span`,{className:`slider round`})]}),(0,V.jsx)(`span`,{children:`Agent Mode`})]}),me&&(0,V.jsxs)(`div`,{className:`smart-context-label`,style:{display:`flex`,alignItems:`center`,gap:`8px`},title:`Investigate read-only and require plan approval before editing files or running commands`,children:[(0,V.jsxs)(`label`,{className:`toggle-switch`,children:[(0,V.jsx)(`input`,{type:`checkbox`,checked:!!b,onChange:e=>me(e.target.checked)}),(0,V.jsx)(`span`,{className:`slider round`})]}),(0,V.jsx)(`span`,{children:`Plan Mode`})]})]}),Gt&&(0,V.jsxs)(`div`,{className:`voice-mode-bar`,"data-state":dn,children:[(0,V.jsx)(`span`,{className:`voice-mode-dot`}),qt?qt===`Listening to microphone...`||qt===`Listening...`||qt===`No speech detected`||qt===`Sent audio to AI`?(0,V.jsx)(`span`,{children:qt}):(0,V.jsxs)(`span`,{style:{display:`flex`,alignItems:`center`,gap:`4px`,minWidth:0,overflow:`hidden`},children:[(0,V.jsxs)(`span`,{children:[fn,`:`]}),(0,V.jsxs)(`span`,{className:`voice-mode-transcript`,children:[`"`,qt,`"`]})]}):(0,V.jsx)(`span`,{children:fn})]}),(0,V.jsx)(sn,{ref:vn,message:f,onComplete:En,workspacePath:S,mcpServers:ve?.mcpServers,anchorRef:_n,suppressed:yn!==null}),(0,V.jsxs)(`form`,{id:`chat-form`,className:an?`has-live-btn`:``,style:{position:`relative`},onSubmit:e=>{bn(null),Sn.current=``,T(e)},onDragOver:e=>{e.dataTransfer.types.includes(`application/x-mint-workspace-path`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)},onDrop:Hn,onPaste:e=>{ne(e.clipboardData)&&e.preventDefault()},children:[(p.length>0||h.length>0||g)&&(0,V.jsxs)(`div`,{className:`mint-attachment`,children:[p.map((e,t)=>(0,V.jsxs)(`div`,{className:`mint-image-attachment`,children:[(0,V.jsx)(`img`,{className:`mint-image-preview`,src:e.objectUrl||e.previewDataUri||e.dataUri,alt:e.name||`Image attachment`}),(0,V.jsx)(`button`,{className:`mint-attachment-remove`,type:`button`,onClick:()=>ie(t),"aria-label":`Remove image`,children:(0,V.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,V.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]},t)),h.map((e,t)=>(0,V.jsxs)(`div`,{className:`mint-image-attachment`,children:[(0,V.jsx)(`video`,{className:`mint-image-preview`,src:e.dataUri,muted:!0,playsInline:!0,preload:`metadata`}),(0,V.jsx)(`div`,{className:`mint-video-play-indicator`,style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,pointerEvents:`none`,background:`rgba(0,0,0,0.6)`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,width:`22px`,height:`22px`,border:`1.5px solid white`},children:(0,V.jsx)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`white`,stroke:`white`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,V.jsx)(`polygon`,{points:`5 3 19 12 5 21 5 3`})})}),(0,V.jsx)(`button`,{className:`mint-attachment-remove`,type:`button`,onClick:()=>oe(t),"aria-label":`Remove video`,children:(0,V.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,V.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]},t)),g&&(0,V.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,minWidth:0},children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`,color:`var(--text-soft)`},children:(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),(0,V.jsx)(`polyline`,{points:`14 2 14 8 20 8`})]})}),(0,V.jsx)(`span`,{style:{fontSize:`0.76rem`,color:`var(--text-soft)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,maxWidth:`220px`},children:g}),(0,V.jsx)(`button`,{type:`button`,onClick:se,style:{background:`transparent`,border:0,color:`#ef4444`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`},children:(0,V.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,V.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})]}),yn!==null&&M.length>0&&(0,V.jsxs)(`div`,{className:`chat-history-indicator`,"aria-live":`polite`,style:{position:`absolute`,top:`-9px`,right:`14px`,padding:`1px 8px`,fontSize:`0.68rem`,fontWeight:600,letterSpacing:`0.02em`,color:`var(--text-soft, #94a3b8)`,background:`var(--input-bg, #1e293b)`,border:`1px solid var(--border, rgba(148,163,184,0.25))`,borderRadius:`999px`,pointerEvents:`none`,zIndex:2},children:[`History `,yn+1,`/`,M.length]}),(0,V.jsx)(`textarea`,{id:`chat-input`,ref:_n,value:f,onChange:e=>{Pn(e.currentTarget),k(e.target.value),yn!==null&&bn(null)},onKeyDown:On,onDrop:Hn,placeholder:`Ask anything, @ to mention, / for actions`,rows:1}),(0,V.jsxs)(`div`,{className:`chat-tool-menu-wrap`,ref:wt,children:[(0,V.jsx)(`button`,{id:`chat-tool-btn`,type:`button`,"aria-haspopup":`menu`,"aria-expanded":Re,onClick:()=>He(e=>!e),style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:(0,V.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,V.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]})}),Re&&(0,V.jsxs)(`div`,{className:`chat-tool-menu`,role:`menu`,children:[(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:Fn,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,children:(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,V.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,V.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]})}),(0,V.jsx)(`span`,{children:`Add image`})]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:In,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,children:(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,V.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]})}),(0,V.jsx)(`span`,{children:`Add video`})]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:Ln,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,children:(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`path`,{d:`M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z`}),(0,V.jsx)(`polyline`,{points:`14 2 14 8 20 8`})]})}),(0,V.jsx)(`span`,{children:`Add file`})]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:Rn,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,children:(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,V.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})}),(0,V.jsx)(`span`,{children:`Search web`})]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:zn,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,children:(0,V.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,V.jsx)(`path`,{d:`M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83`})})}),(0,V.jsx)(`span`,{children:`Generate image`})]}),(0,V.jsxs)(`button`,{type:`button`,role:`menuitem`,onClick:Bn,children:[(0,V.jsx)(`span`,{"aria-hidden":`true`,children:(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,V.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]})}),(0,V.jsx)(`span`,{children:`Generate video`})]})]})]}),(0,V.jsx)(`input`,{id:`vision-file-input`,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,onChange:D,style:{display:`none`}}),(0,V.jsx)(`input`,{id:`video-file-input`,type:`file`,accept:`video/mp4,video/webm,video/quicktime,video/x-matroska`,onChange:ee,style:{display:`none`}}),(0,V.jsx)(`input`,{id:`document-file-input`,type:`file`,accept:WC,onChange:te,style:{display:`none`}}),(0,V.jsx)(`button`,{id:`screen-capture-btn`,type:`button`,onClick:de,"aria-label":`Capture screen`,children:(0,V.jsx)(`span`,{className:`screen-capture-eye`,"aria-hidden":`true`})}),(0,V.jsx)(YC,{activeProvider:x?.activeProvider??``,activeModel:hn,availableProviders:x?.availableProviders??[],settingsConfig:ve,dynamicOllamaModels:Ge,onSelect:(e,t)=>{xe?xe(e,t):(he(e),ye(t))}}),(0,V.jsx)(`button`,{id:`mic-btn`,className:`${Wt?`is-recording`:``} ${Gt?`voice-mode-active`:``}`,type:`button`,onClick:Nn,title:Gt?`Disable voice conversation`:`Enable voice conversation`,style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:Wt?(0,V.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,V.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,ry:`2`})}):(0,V.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`path`,{d:`M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z`}),(0,V.jsx)(`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`}),(0,V.jsx)(`line`,{x1:`12`,y1:`19`,x2:`12`,y2:`23`}),(0,V.jsx)(`line`,{x1:`8`,y1:`23`,x2:`16`,y2:`23`})]})}),an&&(0,V.jsx)(`button`,{id:`gemini-live-btn`,type:`button`,onClick:()=>on.setVoiceMode(!0),title:`Start Gemini Live conversation`,style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:(0,V.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2`}),(0,V.jsx)(`path`,{d:`M8.5 8.5a5 5 0 0 0 0 7`}),(0,V.jsx)(`path`,{d:`M15.5 8.5a5 5 0 0 1 0 7`}),(0,V.jsx)(`path`,{d:`M5.5 5.5a9 9 0 0 0 0 13`}),(0,V.jsx)(`path`,{d:`M18.5 5.5a9 9 0 0 1 0 13`})]})}),t?(0,V.jsx)(`button`,{id:`send-btn`,className:`stop-btn`,type:`button`,onClick:Se,title:`Stop generating`,style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:(0,V.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,V.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,ry:`2`})})}):(0,V.jsx)(`button`,{id:`send-btn`,type:`submit`,disabled:!cn,style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:(0,V.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),(0,V.jsx)(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`})]})})]})]}),(0,V.jsx)(`p`,{className:`input-disclaimer`,children:`Mint Agent is an AI gateway. Responses via third-party APIs. Verify critical info.`}),on.voiceMode&&(0,V.jsx)(LC,{status:on.isPaused?`paused`:on.isSpeaking?`speaking`:on.voiceAwaitingResponse?`thinking`:`listening`,userTranscript:on.userTranscript,assistantTranscript:on.assistantTranscript,isPaused:on.isPaused,onTogglePause:on.togglePause,onEndCall:()=>on.setVoiceMode(!1),voice:ve?.geminiLiveVoice||`Puck`,voices:et,onChangeVoice:async e=>{await we(e),on.restart()}}),_t.visible&&(0,V.jsxs)(`div`,{className:`rewind-toast-banner ${_t.type===`error`?`is-error`:`is-success`}`,children:[(0,V.jsxs)(`div`,{className:`rewind-toast-content`,children:[_t.type===`error`?(0,V.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--status-error, #ef4444)`,strokeWidth:`2`,children:[(0,V.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,V.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,V.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]}):(0,V.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--accent)`,strokeWidth:`2.2`,children:[(0,V.jsx)(`path`,{d:`M22 11.08V12a10 10 0 1 1-5.93-9.14`}),(0,V.jsx)(`polyline`,{points:`22 4 12 14.01 9 11.01`})]}),(0,V.jsx)(`span`,{className:`rewind-toast-text`,children:_t.message})]}),(0,V.jsxs)(`div`,{className:`rewind-toast-actions`,children:[_t.canUndo&&(0,V.jsx)(`button`,{type:`button`,className:`rewind-toast-undo-btn`,onClick:xt,disabled:_t.isUndoing,title:`Restore workspace files back from safety rescue snapshot`,children:_t.isUndoing?`Undoing...`:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,V.jsx)(`polyline`,{points:`9 14 4 9 9 4`}),(0,V.jsx)(`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`})]}),`Undo Rewind`]})}),(0,V.jsx)(`button`,{type:`button`,className:`rewind-toast-close-btn`,onClick:()=>vt(e=>({...e,visible:!1})),"aria-label":`Close notification`,children:`✕`})]})]})]});return(0,V.jsxs)(`div`,{ref:dt,className:`chat-panel-split-wrapper ${Ie?`has-preview`:`no-preview`}`,style:{width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,gridColumn:`1 / -1`,zIndex:1,"--preview-width":`${(ct*100).toFixed(2)}%`},children:[Jn,Ie&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`preview-split-resizer`,onMouseDown:ft,onDoubleClick:mt,title:`Drag to resize · Double-click to reset 50/50`,children:(0,V.jsx)(`div`,{className:`preview-split-resizer-grip`})}),(0,V.jsx)(bC,{artifact:Ie,onClose:()=>Le(null),workspacePath:S})]}),ht.isOpen&&(0,V.jsx)(TC,{isOpen:ht.isOpen,onClose:()=>gt(e=>({...e,isOpen:!1})),onConfirm:bt,checkpoints:ht.checkpoints,targetCheckpoint:ht.targetCheckpoint,changes:ht.changes,workspacePath:S,isLoading:ht.isLoading})]})}var B,V,$C=t((()=>{B=e(A()),Bt(),xt(),Re(),Xt(),cn(),Cn(),jb(),Ib(),Vb(),Gb(),_C(),CC(),EC(),He(),AC(),IC(),VC(),GC(),ZC(),h(),V=j()}));function ew({view:e,sidebarCollapsed:t,modelVisible:n,sending:r,chatSessions:i,activeConversationId:a,expressionIndex:o=0,accessoryIndex:s=0,expressions:c=[],accessories:l=[],interactionEnabled:u,showInteractionGuide:d,onToggleSidebar:f,onSidebarResize:p,onSidebarResizeEnd:m,onClearHistory:h,onSelectConversation:g,onDeleteConversation:_,onRenameConversation:v,onSetView:y,onToggleModel:b,onSetExpressionIndex:x,onSetAccessoryIndex:S,onSetInteractionEnabled:C,onSetShowInteractionGuide:w,onShowToast:T,isSearchOpen:E,onSetSearchOpen:D,showWorkspaceTab:O,promoteMediaStudios:ee}){let[te,ne]=(0,tw.useState)(null),[k,re]=(0,tw.useState)(``),[ie,ae]=(0,tw.useState)(!1),[oe,se]=(0,tw.useState)(!1),ce=(0,tw.useRef)(null),le=(0,tw.useRef)(null),ue=(0,tw.useRef)(null),{user:de,avatarUrl:fe,logout:pe}=Ae(),[me,he]=(0,tw.useState)(!1),ge=(0,tw.useRef)(null);(0,tw.useEffect)(()=>{if(!me)return;let e=e=>{let t=ge.current;t&&(t.lastWidth=t.startWidth+(e.clientX-t.startX),t.frame??=requestAnimationFrame(()=>{ge.current&&(ge.current.frame=null,p?.(ge.current.lastWidth))}))},t=()=>{let e=ge.current;e?.frame!=null&&cancelAnimationFrame(e.frame),he(!1),document.body.style.cursor=``,document.body.style.userSelect=``,e&&m?.(e.lastWidth),ge.current=null};return document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[me,p,m]);let _e=e=>{if(t)return;e.preventDefault();let n=ue.current?.getBoundingClientRect().width??264;ge.current={startX:e.clientX,startWidth:n,lastWidth:n,frame:null},he(!0)};(0,tw.useEffect)(()=>{function e(e){ce.current&&!ce.current.contains(e.target)&&ae(!1),le.current&&!le.current.contains(e.target)&&se(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let ve=e=>{k.trim()&&k.trim()!==i.find(t=>t.id===e)?.title&&v?.(e,k.trim()),ne(null)},ye=()=>{let e=!d;w?.(e),T?.(e?`Show interaction zones ⊹`:`Hide interaction zones ⊹`)},xe=()=>{let e=!u;C?.(e),T?.(e?`Enable model interaction ⦸`:`Disable model interaction ⦸`)},Se=i.filter(e=>e.kind!==`cli`&&e.id!==`conversation-default`),Ce=i.find(e=>e.kind===`cli`||e.id===`cli`)??{id:`cli`,title:`cli`,kind:`cli`};return(0,H.jsxs)(`aside`,{className:`workspace-sidebar ${me?`is-resizing`:``}`,ref:ue,children:[!t&&(0,H.jsx)(`div`,{className:`sidebar-resize-handle ${me?`is-active`:``}`,onMouseDown:_e,title:`Drag to resize sidebar`}),(0,H.jsxs)(`div`,{className:`sidebar-brand clickable`,onClick:f,title:t?`Expand sidebar`:`Collapse sidebar`,role:`button`,tabIndex:0,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&f()},children:[(0,H.jsx)(`img`,{src:be,alt:`Mint Agent Logo`,className:`sidebar-logo`}),(0,H.jsx)(`span`,{className:`sidebar-brand-name`,children:`Mint Agent`})]}),(0,H.jsxs)(`button`,{className:`sidebar-new-chat`,onClick:()=>h(`New chat`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,H.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]})}),(0,H.jsx)(`span`,{children:`New Chat`})]}),(0,H.jsxs)(`button`,{className:`sidebar-top-action sidebar-search-btn`,onClick:()=>D(!0),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,H.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})}),(0,H.jsx)(`span`,{children:`Search Chats`})]}),(0,H.jsxs)(`button`,{className:`sidebar-top-action ${e===`chat`?`is-active`:``}`,onClick:()=>y(`chat`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`})})}),(0,H.jsx)(`span`,{children:`Chat`})]}),(0,H.jsxs)(`button`,{className:`sidebar-top-action ${e===`pictures`?`is-active`:``}`,onClick:()=>y(`pictures`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,H.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,H.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]})}),(0,H.jsx)(`span`,{children:`Pictures`})]}),ee&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`button`,{className:`sidebar-top-action ${e===`imagine`?`is-active`:``}`,onClick:()=>y(`imagine`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`span`,{children:`Image Studio`})]}),(0,H.jsxs)(`button`,{className:`sidebar-top-action ${e===`veo`?`is-active`:``}`,onClick:()=>y(`veo`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`20`,rx:`2.18`,ry:`2.18`}),(0,H.jsx)(`line`,{x1:`7`,y1:`2`,x2:`7`,y2:`22`}),(0,H.jsx)(`line`,{x1:`17`,y1:`2`,x2:`17`,y2:`22`}),(0,H.jsx)(`line`,{x1:`2`,y1:`12`,x2:`22`,y2:`12`}),(0,H.jsx)(`line`,{x1:`2`,y1:`7`,x2:`7`,y2:`7`}),(0,H.jsx)(`line`,{x1:`2`,y1:`17`,x2:`7`,y2:`17`}),(0,H.jsx)(`line`,{x1:`17`,y1:`17`,x2:`22`,y2:`17`}),(0,H.jsx)(`line`,{x1:`17`,y1:`7`,x2:`22`,y2:`7`})]})}),(0,H.jsx)(`span`,{children:`Veo Studio`})]})]}),O&&(0,H.jsxs)(`button`,{className:`sidebar-top-action ${e===`workspace`?`is-active`:``}`,onClick:()=>y(`workspace`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M3 6h7l2 2h9v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z`}),(0,H.jsx)(`path`,{d:`M3 6v12`})]})}),(0,H.jsx)(`span`,{children:`Workspace`})]}),b&&(0,H.jsxs)(`button`,{className:`sidebar-top-action ${n?`is-active`:``}`,onClick:b,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2`}),(0,H.jsx)(`circle`,{cx:`12`,cy:`7`,r:`4`})]})}),(0,H.jsx)(`span`,{children:`Live2D Model`})]}),(0,H.jsxs)(`div`,{className:`sidebar-more-container`,ref:ce,children:[(0,H.jsxs)(`button`,{className:`sidebar-top-action ${ie||!ee&&(e===`imagine`||e===`veo`)||e===`skills`||e===`mcp`||e===`plugins`||e===`cron`||e===`link`?`is-active`:``}`,onClick:()=>ae(!ie),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`}),(0,H.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.5`}),(0,H.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.5`})]})}),(0,H.jsx)(`span`,{children:`More`})]}),ie&&(0,H.jsxs)(`div`,{className:`sidebar-more-popover`,style:{display:`flex`,flexDirection:`column`,gap:`4px`,padding:`6px`,minWidth:`160px`},children:[(0,H.jsxs)(`button`,{className:`popover-item ${e===`skills`?`active`:``}`,onClick:()=>{y(`skills`),ae(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Ge(15)}),(0,H.jsx)(`span`,{children:`Skills`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`mcp`?`active`:``}`,onClick:()=>{y(`mcp`),ae(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Pe(15)}),(0,H.jsx)(`span`,{children:`MCP Servers`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`plugins`?`active`:``}`,onClick:()=>{y(`plugins`),ae(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Xe(15)}),(0,H.jsx)(`span`,{children:`Plugins`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`cron`?`active`:``}`,onClick:()=>{y(`cron`),ae(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Ie(15)}),(0,H.jsx)(`span`,{children:`Scheduled Tasks`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`link`?`active`:``}`,onClick:()=>{y(`link`),ae(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Ye(15)}),(0,H.jsx)(`span`,{children:`Linked Folders`})]}),!ee&&(0,H.jsxs)(`button`,{className:`popover-item ${e===`imagine`?`active`:``}`,onClick:()=>{y(`imagine`),ae(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,H.jsx)(`span`,{children:`Image Studio`})]}),!ee&&(0,H.jsxs)(`button`,{className:`popover-item ${e===`veo`?`active`:``}`,onClick:()=>{y(`veo`),ae(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,H.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]})}),(0,H.jsx)(`span`,{children:`Veo Studio`})]})]})]}),n&&(0,H.jsxs)(`div`,{className:`sidebar-model-controls`,children:[(0,H.jsxs)(`button`,{className:`change-expression-btn`,onClick:()=>{let e=(o+1)%c.length;x?.(e),S?.(0),T?.(`Expression: ${c[e]}`)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`}),(0,H.jsx)(`line`,{x1:`9`,y1:`9`,x2:`9.01`,y2:`9`}),(0,H.jsx)(`line`,{x1:`15`,y1:`9`,x2:`15.01`,y2:`9`})]})}),(0,H.jsx)(`span`,{children:`Expression`})]}),(0,H.jsxs)(`button`,{className:`accessory-cycle-btn`,onClick:()=>{let e=(s+1)%l.length;S?.(e),x?.(0),T?.(`Accessory: ${l[e]}`)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`path`,{d:`M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 1 0 0-8c-2 0-4 1.33-6 4Z`})})}),(0,H.jsx)(`span`,{children:`Accessory`})]}),(0,H.jsxs)(`button`,{className:`toggle-interaction-btn ${u?`active`:``}`,onClick:xe,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`path`,{d:`M18 11V6a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v5m-4 0V4a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v7m-4 0V5a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v9M4 22V13a3 3 0 0 1 6 0v0M4 22h14a2 2 0 0 0 2-2V11a2 2 0 0 0-2-2h-2`})})}),(0,H.jsx)(`span`,{className:`mint-status-label`,children:`Interact`})]}),(0,H.jsxs)(`button`,{className:`interaction-guide-btn ${d?`active`:``}`,onClick:ye,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,H.jsx)(`line`,{x1:`22`,y1:`12`,x2:`18`,y2:`12`}),(0,H.jsx)(`line`,{x1:`6`,y1:`12`,x2:`2`,y2:`12`}),(0,H.jsx)(`line`,{x1:`12`,y1:`6`,x2:`12`,y2:`2`}),(0,H.jsx)(`line`,{x1:`12`,y1:`22`,x2:`12`,y2:`18`})]})}),(0,H.jsx)(`span`,{children:`Areas`})]})]}),(0,H.jsxs)(`div`,{className:`sidebar-section`,children:[(0,H.jsx)(`div`,{className:`sidebar-section-title`,children:`Conversation CLI`}),(0,H.jsx)(`div`,{className:`sidebar-chat-list sidebar-cli-list`,children:(0,H.jsxs)(`button`,{className:`sidebar-project sidebar-chat-item ${Ce.id===a?`active`:``}`,onClick:()=>g(Ce.id),title:Ce.title,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M4 17l6-6-6-6`}),(0,H.jsx)(`path`,{d:`M12 19h8`})]})}),(0,H.jsx)(`span`,{className:`sidebar-chat-title`,children:Ce.title||`cli`}),Ce.id===a&&(0,H.jsxs)(`span`,{className:`mint-status-pill`,"data-state":r?`thinking`:`idle`,children:[(0,H.jsx)(`span`,{className:`mint-status-dot`}),(0,H.jsx)(`span`,{className:`mint-status-label`,children:r?`Thinking`:`Idle`})]})]})}),(0,H.jsx)(`div`,{className:`sidebar-section-title sidebar-subsection-title`,children:`Conversations`}),(0,H.jsx)(`div`,{className:`sidebar-chat-list`,children:Se.map(e=>(0,H.jsxs)(`button`,{className:`sidebar-project sidebar-chat-item ${e.id===a?`active`:``}`,onClick:()=>g(e.id),title:e.title,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`})})}),te===e.id?(0,H.jsx)(`input`,{type:`text`,className:`sidebar-chat-rename-input`,value:k,onChange:e=>re(e.target.value),onBlur:()=>ve(e.id),onKeyDown:t=>{t.key===`Enter`?ve(e.id):t.key===`Escape`&&ne(null)},autoFocus:!0,onClick:e=>e.stopPropagation()}):(0,H.jsx)(`span`,{className:`sidebar-chat-title`,children:e.title||`New chat`}),e.id===a&&(0,H.jsxs)(`span`,{className:`mint-status-pill`,"data-state":r?`thinking`:`idle`,children:[(0,H.jsx)(`span`,{className:`mint-status-dot`}),(0,H.jsx)(`span`,{className:`mint-status-label`,children:r?`Thinking`:`Idle`})]}),te!==e.id&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`sidebar-chat-edit`,role:`button`,tabIndex:0,title:`Rename conversation`,onClick:t=>{t.stopPropagation(),ne(e.id),re(e.title||``)},onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),ne(e.id),re(e.title||``))},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M12 20h9`}),(0,H.jsx)(`path`,{d:`M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z`})]})}),(0,H.jsx)(`span`,{className:`sidebar-chat-delete`,role:`button`,tabIndex:0,title:`Delete conversation`,onClick:t=>{t.stopPropagation(),_(e.id)},onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),_(e.id))},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,H.jsx)(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}),(0,H.jsx)(`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})]})})]})]},e.id))})]}),de&&(0,H.jsxs)(`div`,{className:`sidebar-account-container`,ref:le,children:[oe&&(0,H.jsxs)(`div`,{className:`sidebar-account-menu`,children:[de.email&&(0,H.jsx)(`div`,{className:`sidebar-account-menu-header`,children:de.email}),(0,H.jsxs)(`button`,{className:`popover-item`,onClick:()=>{window.api.openSettings(),se(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,H.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z`})]})}),(0,H.jsx)(`span`,{children:`Settings`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`skills`?`active`:``}`,onClick:()=>{y(`skills`),se(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Ge(15)}),(0,H.jsx)(`span`,{children:`Skills`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`mcp`?`active`:``}`,onClick:()=>{y(`mcp`),se(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Pe(15)}),(0,H.jsx)(`span`,{children:`MCP Servers`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`plugins`?`active`:``}`,onClick:()=>{y(`plugins`),se(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Xe(15)}),(0,H.jsx)(`span`,{children:`Plugins`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`cron`?`active`:``}`,onClick:()=>{y(`cron`),se(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Ie(15)}),(0,H.jsx)(`span`,{children:`Scheduled Tasks`})]}),(0,H.jsxs)(`button`,{className:`popover-item ${e===`link`?`active`:``}`,onClick:()=>{y(`link`),se(!1)},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:Ye(15)}),(0,H.jsx)(`span`,{children:`Linked Folders`})]}),(0,H.jsx)(`div`,{className:`sidebar-account-menu-divider`}),(0,H.jsxs)(`button`,{className:`popover-item`,onClick:()=>{se(!1),pe()},children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,style:{display:`inline-flex`,alignItems:`center`},children:(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),(0,H.jsx)(`polyline`,{points:`16 17 21 12 16 7`}),(0,H.jsx)(`line`,{x1:`21`,y1:`12`,x2:`9`,y2:`12`})]})}),(0,H.jsx)(`span`,{children:`Log out`})]})]}),(0,H.jsxs)(`button`,{className:`sidebar-account`,onClick:()=>se(e=>!e),children:[(0,H.jsx)(`div`,{className:`sidebar-account-avatar`,children:fe?(0,H.jsx)(`img`,{src:fe,alt:de.name||`User`}):(de.name?.[0]||de.email?.[0]||`U`).toUpperCase()}),(0,H.jsx)(`div`,{className:`sidebar-account-info`,children:(0,H.jsx)(`span`,{className:`sidebar-account-name`,children:de.name||de.email})}),(0,H.jsx)(`span`,{className:`sidebar-account-chevron`,"aria-hidden":`true`,children:(0,H.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`18 15 12 9 6 15`})})})]})]})]})}var tw,H,nw=t((()=>{tw=e(A()),at(),je(),h(),H=j()})),rw,iw,aw,ow,sw=t((()=>{rw=[{value:`1:1`,label:`1:1`,icon:`■`},{value:`16:9`,label:`16:9`,icon:`▬`},{value:`9:16`,label:`9:16`,icon:`▮`},{value:`4:3`,label:`4:3`,icon:`▭`}],iw=[{value:`16:9`,label:`16:9`,icon:`▬`},{value:`9:16`,label:`9:16`,icon:`▮`},{value:`1:1`,label:`1:1`,icon:`■`}],aw=[`photorealistic`,`anime`,`oil painting`,`watercolor`,`cinematic`,`digital art`,`3D render`,`sketch`],ow=[`cinematic`,`photorealistic`,`anime`,`3D animation`,`documentary`,`animation`,`action`,`nature`]}));function cw(e){return gw[e]??e}function lw(e){return hw[e]?.[0]?.value??``}function uw(){return(0,U.jsx)(`div`,{className:`img-studio-skeleton`,children:(0,U.jsx)(`div`,{className:`img-studio-skeleton-shine`})})}function dw({view:e,onRefreshPictures:t,onSendToChat:n,onToggleMobileSidebar:r}){let[i,a]=(0,fw.useState)(``),[o,c]=(0,fw.useState)(``),[l,u]=(0,fw.useState)(!1),[d,f]=(0,fw.useState)(`1:1`),[p,m]=(0,fw.useState)(1),[h,g]=(0,fw.useState)(!1),[_,v]=(0,fw.useState)(``),[y,b]=(0,fw.useState)(null),[S,w]=(0,fw.useState)([]),[T,E]=(0,fw.useState)([]),O=(0,fw.useCallback)(async()=>{try{let e=await C(),t=[`nanobanana`,`dalle`,`stability`,`ideogram`,`replicate`,`image_gen`];E([...e.filter(e=>e.source&&t.includes(e.source.toLowerCase()))].sort((e,t)=>{let n=e.createdAt?new Date(e.createdAt).getTime():0;return(t.createdAt?new Date(t.createdAt).getTime():0)-n||t.filename.localeCompare(e.filename)}))}catch(e){console.error(`Failed to load history pictures:`,e)}},[]),[ee,te]=(0,fw.useState)({active:`nanobanana`,available:[`nanobanana`]}),[ne,k]=(0,fw.useState)(`nanobanana`),[re,ie]=(0,fw.useState)(lw(`nanobanana`)),[ae,oe]=(0,fw.useState)(``),[se,ce]=(0,fw.useState)({}),le=(0,fw.useRef)(null);(0,fw.useEffect)(()=>{let e=!1;return x().then(t=>{e||(te(t),k(t.active),ie(lw(t.active)))}).catch(()=>{}),O(),()=>{e=!0}},[O]),(0,fw.useEffect)(()=>{let e=!1;return D(ne).then(t=>{if(e||!t||t.length===0)return;let n=hw[ne]??[],r=new Map;for(let e of n)r.set(e.value,e.label);let i=[],a=new Set;for(let e of t)a.has(e)||(a.add(e),i.push({value:e,label:r.get(e)??e}));for(let e of n)a.has(e.value)||(a.add(e.value),i.push(e));ce(e=>({...e,[ne]:i}))}).catch(()=>{}),()=>{e=!0}},[ne]);let ue=e=>{k(e),ie(lw(e)),oe(``)},de=re===`custom`?ae.trim():re,[fe,pe]=(0,fw.useState)(null),[he,ge]=(0,fw.useState)(!1),_e=(0,fw.useRef)(null),ve=e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=e=>{typeof e.target?.result==`string`&&pe(e.target.result)},n.readAsDataURL(t)},ye=e=>{e.preventDefault(),ge(!1);let t=e.dataTransfer.files?.[0];if(!t||!t.type.startsWith(`image/`))return;let n=new FileReader;n.onload=e=>{typeof e.target?.result==`string`&&pe(e.target.result)},n.readAsDataURL(t)},be=(0,fw.useCallback)(async()=>{let e=i.trim();if(!e||h)return;g(!0),v(``),b(null);let n={prompt:e,negativePrompt:o.trim()||void 0,aspectRatio:d,numImages:p,model:de||void 0,provider:ne,imageDataUri:fe||void 0,mode:fe?`edit`:`generate`};try{b(await s(n)),w(t=>[e,...t.filter(t=>t!==e)].slice(0,8)),t?.(),O()}catch(e){v(e instanceof Error?e.message:String(e))}finally{g(!1)}},[i,o,d,p,h,t,ne,de,fe]),xe=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),be())},Se=(e,t)=>{let n=document.createElement(`a`);n.href=e.url||e.path,n.download=`mint-imagine-${t+1}.png`,document.body.appendChild(n),n.click(),document.body.removeChild(n)},Ce=se[ne]??hw[ne]??[];return(0,U.jsxs)(`div`,{className:`img-studio ${e===`imagine`?`is-visible`:``}`,id:`image-studio-panel`,role:`main`,"aria-label":`Image Studio`,"aria-hidden":e!==`imagine`,children:[(0,U.jsxs)(`header`,{className:`img-studio-header`,children:[(0,U.jsxs)(`div`,{className:`img-studio-header-title`,children:[(0,U.jsx)(`button`,{className:`mobile-menu-btn`,type:`button`,onClick:r,"aria-label":`Toggle menu`,style:{marginRight:`8px`},children:`☰`}),(0,U.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,U.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})}),(0,U.jsx)(`h1`,{children:`Image Studio`}),(0,U.jsx)(`span`,{className:`img-studio-badge`,children:cw(ne)})]}),(0,U.jsxs)(`p`,{className:`img-studio-subtitle`,children:[`Generate images with`,` `,ee.available.length>1?`${ee.available.length} configured providers`:cw(ne)]})]}),(0,U.jsxs)(`div`,{className:`img-studio-content`,children:[(0,U.jsxs)(`section`,{className:`img-studio-controls`,"aria-label":`Generation settings`,children:[(0,U.jsxs)(`div`,{className:`img-studio-field`,style:{display:`flex`,gap:`10px`,width:`100%`},children:[(0,U.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`4px`},children:[(0,U.jsx)(`label`,{className:`img-studio-label`,htmlFor:`img-studio-provider`,style:{display:`flex`,alignItems:`center`,width:`100%`,height:`18px`},children:(0,U.jsx)(`span`,{children:`Provider`})}),(0,U.jsx)(`select`,{id:`img-studio-provider`,className:`img-studio-textarea`,style:{padding:`8px 10px`,height:`38px`,cursor:`pointer`},value:ne,onChange:e=>ue(e.target.value),disabled:h,children:ee.available.map(e=>(0,U.jsx)(`option`,{value:e,children:cw(e).replace(/^[^a-zA-Z0-9]+/,``)},e))})]}),(0,U.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`4px`},children:[(0,U.jsx)(`label`,{className:`img-studio-label`,htmlFor:`img-studio-model`,style:{display:`flex`,alignItems:`center`,height:`18px`},children:`Model`}),(0,U.jsxs)(`select`,{id:`img-studio-model`,className:`img-studio-textarea`,style:{padding:`8px 10px`,height:`38px`,cursor:`pointer`},value:re,onChange:e=>ie(e.target.value),disabled:h,children:[Ce.map(({value:e,label:t})=>(0,U.jsx)(`option`,{value:e,children:t},e)),re&&re!==`custom`&&!Ce.some(e=>e.value===re)&&(0,U.jsx)(`option`,{value:re,children:re},re),(0,U.jsx)(`option`,{value:`custom`,children:`Custom Model ID...`})]})]})]}),re===`custom`&&(0,U.jsx)(`div`,{className:`img-studio-field`,style:{marginTop:`-8px`},children:(0,U.jsx)(`input`,{type:`text`,className:`img-studio-textarea img-studio-textarea--sm`,placeholder:ne===`replicate`?`e.g. owner/model-name`:ne===`dalle`?`e.g. dall-e-3`:`e.g. sd3.5-large`,value:ae,onChange:e=>oe(e.target.value),disabled:h})}),(0,U.jsxs)(`div`,{className:`img-studio-field`,children:[(0,U.jsxs)(`label`,{className:`img-studio-label`,children:[`Source Image (Optional for Image Editing)`,(0,U.jsx)(`span`,{className:`img-studio-label-hint`,children:`Upload an image to edit / inpaint`})]}),fe?(0,U.jsxs)(`div`,{className:`img-studio-preview-card`,children:[(0,U.jsx)(`img`,{src:fe,alt:`Input source`,className:`img-studio-preview-thumb`}),(0,U.jsxs)(`div`,{className:`img-studio-preview-info`,children:[(0,U.jsx)(`div`,{className:`img-studio-preview-title`,children:(0,U.jsx)(`span`,{children:`Source Image Attached`})}),(0,U.jsx)(`div`,{className:`img-studio-preview-subtitle`,children:`Ready for Image Editing`})]}),(0,U.jsx)(`button`,{type:`button`,className:`img-studio-preview-remove`,onClick:()=>pe(null),children:`✕ Remove`})]}):(0,U.jsxs)(`div`,{className:`img-studio-dropzone ${he?`is-dragging`:``}`,onClick:()=>_e.current?.click(),onDragOver:e=>{e.preventDefault(),ge(!0)},onDragLeave:()=>ge(!1),onDrop:ye,children:[(0,U.jsx)(`input`,{ref:_e,type:`file`,accept:`image/*`,onChange:ve,disabled:h,style:{display:`none`}}),(0,U.jsxs)(`svg`,{className:`img-studio-dropzone-icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,U.jsx)(`polyline`,{points:`17 8 12 3 7 8`}),(0,U.jsx)(`line`,{x1:`12`,y1:`3`,x2:`12`,y2:`15`})]}),(0,U.jsx)(`div`,{className:`img-studio-dropzone-text`,children:`Click or Drag & Drop image here`}),(0,U.jsx)(`div`,{className:`img-studio-dropzone-subtext`,children:`PNG, JPG, WEBP up to 10MB`})]})]}),(0,U.jsxs)(`div`,{className:`img-studio-field`,children:[(0,U.jsxs)(`label`,{className:`img-studio-label`,htmlFor:`img-studio-prompt`,children:[fe?`Editing Instruction Prompt`:`Prompt`,(0,U.jsx)(`span`,{className:`img-studio-label-hint`,children:fe?`Describe what to edit or remove`:`Describe the image you want`})]}),(0,U.jsx)(`textarea`,{id:`img-studio-prompt`,ref:le,className:`img-studio-textarea`,value:i,onChange:e=>a(e.target.value),onKeyDown:xe,placeholder:`a dragon flying over Bangkok at sunset, golden hour, ultra-detailed...`,rows:4,disabled:h,"aria-required":`true`}),(0,U.jsx)(`div`,{className:`img-studio-prompt-hint`,children:`⌘+Enter to generate`})]}),(0,U.jsxs)(`div`,{className:`img-studio-field`,children:[(0,U.jsx)(`span`,{className:`img-studio-label`,children:`Style suggestions`}),(0,U.jsx)(`div`,{className:`img-studio-chips`,role:`group`,"aria-label":`Style suggestions`,children:mw.map(e=>(0,U.jsx)(`button`,{type:`button`,className:`img-studio-chip`,onClick:()=>a(t=>t.trim()?`${t.trim()}, ${e}`:e),disabled:h,title:`Add "${e}" to prompt`,children:e},e))})]}),(0,U.jsxs)(`div`,{className:`img-studio-field`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`img-studio-toggle`,onClick:()=>u(e=>!e),"aria-expanded":l,"aria-controls":`img-studio-negative-wrap`,children:[(0,U.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{transform:l?`rotate(90deg)`:`none`,transition:`transform 0.2s`},children:(0,U.jsx)(`polyline`,{points:`9 18 15 12 9 6`})}),`Negative prompt`,o.trim()&&(0,U.jsx)(`span`,{className:`img-studio-badge-dot`,"aria-label":`has content`})]}),l&&(0,U.jsx)(`div`,{id:`img-studio-negative-wrap`,children:(0,U.jsx)(`textarea`,{id:`img-studio-negative`,className:`img-studio-textarea img-studio-textarea--sm`,value:o,onChange:e=>c(e.target.value),placeholder:`blurry, low quality, distorted, text, watermark...`,rows:2,disabled:h})})]}),(0,U.jsxs)(`div`,{className:`img-studio-field`,children:[(0,U.jsx)(`span`,{className:`img-studio-label`,children:`Aspect ratio`}),(0,U.jsx)(`div`,{className:`img-studio-aspect-group`,role:`radiogroup`,"aria-label":`Aspect ratio`,children:pw.map(({value:e,label:t,icon:n})=>(0,U.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":d===e,className:`img-studio-aspect-btn ${d===e?`is-active`:``}`,onClick:()=>f(e),disabled:h,id:`img-studio-aspect-${e.replace(`:`,`x`)}`,children:[(0,U.jsx)(`span`,{className:`img-studio-aspect-icon`,"aria-hidden":`true`,children:n}),(0,U.jsx)(`span`,{children:t})]},e))})]}),(0,U.jsxs)(`div`,{className:`img-studio-field`,children:[(0,U.jsxs)(`span`,{className:`img-studio-label`,children:[`Number of images`,ne===`dalle`&&(de===`dall-e-3`||de===`gpt-image-1`)&&(0,U.jsx)(`span`,{className:`img-studio-label-hint`,children:` (DALL·E 3 / GPT-Image-1: max 1)`})]}),(0,U.jsx)(`div`,{className:`img-studio-count-group`,role:`radiogroup`,"aria-label":`Image count`,children:[1,2,3,4].map(e=>(0,U.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":p===e,className:`img-studio-count-btn ${p===e?`is-active`:``}`,onClick:()=>m(e),disabled:h||ne===`dalle`&&(de===`dall-e-3`||de===`gpt-image-1`)&&e>1,id:`img-studio-count-${e}`,children:e},e))})]}),(0,U.jsx)(`button`,{id:`img-studio-generate-btn`,type:`button`,className:`img-studio-generate-btn ${h?`is-loading`:``}`,onClick:be,disabled:!i.trim()||h,"aria-busy":h,children:h?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`img-studio-spinner`,"aria-hidden":`true`}),`Generating...`]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,U.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})}),`Generate Image`]})}),_&&(0,U.jsxs)(`div`,{className:`img-studio-error`,role:`alert`,children:[(0,U.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,U.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,U.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]}),(0,U.jsx)(`span`,{children:_}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>v(``),"aria-label":`Dismiss error`,children:`×`})]}),S.length>0&&(0,U.jsxs)(`div`,{className:`img-studio-field`,children:[(0,U.jsx)(`span`,{className:`img-studio-label`,children:`Recent prompts`}),(0,U.jsx)(`div`,{className:`img-studio-history`,children:S.map(e=>(0,U.jsxs)(`button`,{type:`button`,className:`img-studio-history-item`,onClick:()=>{a(e),le.current?.focus()},disabled:h,title:e,children:[(0,U.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,U.jsx)(`polyline`,{points:`12 6 12 12 16 14`})]}),(0,U.jsx)(`span`,{children:e})]},e))})]})]}),(0,U.jsxs)(`section`,{className:`img-studio-results`,"aria-label":`Generated images`,"aria-live":`polite`,children:[(0,U.jsxs)(`div`,{className:`img-studio-active-workspace`,children:[h&&(0,U.jsxs)(`div`,{className:`img-studio-skeleton-grid`,children:[Array.from({length:p}).map((e,t)=>(0,U.jsx)(uw,{},t)),(0,U.jsxs)(`p`,{className:`img-studio-generating-label`,"aria-live":`assertive`,children:[`Creating `,p,` image`,p>1?`s`:``,` with `,cw(ne),` — this may take a few seconds…`]})]}),!h&&y&&(0,U.jsxs)(U.Fragment,{children:[y.description&&(0,U.jsx)(`p`,{className:`img-studio-description`,children:y.description}),(0,U.jsx)(`div`,{className:`img-studio-grid`,style:{"--img-count":y.images.length},children:y.images.map((e,t)=>(0,U.jsxs)(`article`,{className:`img-studio-card`,"aria-label":`Generated image ${t+1}`,children:[(0,U.jsx)(`div`,{className:`img-studio-card-img-wrap`,children:(0,U.jsx)(`img`,{src:me(e.url||e.path),alt:e.message||i,className:`img-studio-card-img`,loading:`eager`,decoding:`async`})}),(0,U.jsxs)(`div`,{className:`img-studio-card-actions`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`img-studio-action-btn`,onClick:()=>Se(e,t),title:`Download image`,id:`img-studio-download-${t}`,children:[(0,U.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,U.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,U.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,U.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]}),`Download`]}),n&&(0,U.jsxs)(`button`,{type:`button`,className:`img-studio-action-btn img-studio-action-btn--primary`,onClick:()=>n(e.url||e.path,i),title:`Send to Chat`,id:`img-studio-send-${t}`,children:[(0,U.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,U.jsx)(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),(0,U.jsx)(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`})]}),`Send to Chat`]})]})]},e.id))}),(0,U.jsxs)(`p`,{className:`img-studio-meta`,children:[`Provider: `,(0,U.jsx)(`strong`,{children:cw(y.provider)}),` · Model: `,(0,U.jsx)(`strong`,{children:y.model}),` · `,y.images.length,` image`,y.images.length>1?`s`:``,` · Saved to gallery`]})]}),!h&&!y&&(0,U.jsxs)(`div`,{className:`img-studio-active-empty`,children:[(0,U.jsx)(`div`,{className:`img-studio-empty-icon`,"aria-hidden":`true`,children:(0,U.jsx)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,U.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,U.jsx)(`p`,{children:`No active generation`}),(0,U.jsx)(`span`,{children:`Enter a prompt on the left pane and generate new images.`})]})]}),(0,U.jsx)(`div`,{className:`img-studio-history-header`,children:(0,U.jsxs)(`div`,{className:`img-studio-history-title`,children:[(0,U.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,U.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,U.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,U.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]}),(0,U.jsx)(`span`,{children:`Gallery & History`}),(0,U.jsx)(`span`,{className:`img-studio-history-badge`,children:(()=>{let e=new Set(y?.images.map(e=>e.id)||[]);return T.filter(t=>!e.has(t.id)).length})()})]})}),(0,U.jsx)(`div`,{className:`img-studio-history-gallery`,children:(()=>{let e=new Set(y?.images.map(e=>e.id)||[]),t=T.filter(t=>!e.has(t.id));return t.length===0?(0,U.jsxs)(`div`,{className:`img-studio-gallery-empty`,children:[(0,U.jsx)(`p`,{children:`Your saved gallery is empty`}),(0,U.jsx)(`span`,{children:`Generated images will be stored here automatically.`})]}):(0,U.jsx)(`div`,{className:`img-studio-grid`,children:t.map((e,t)=>(0,U.jsxs)(`article`,{className:`img-studio-card`,"aria-label":`Saved image ${t+1}`,children:[(0,U.jsx)(`div`,{className:`img-studio-card-img-wrap`,children:(0,U.jsx)(`img`,{src:me(e.thumbnailUrl||e.thumbnailPath||e.url||e.path),alt:e.message||`Generated image`,className:`img-studio-card-img`,loading:`lazy`,decoding:`async`})}),(0,U.jsxs)(`div`,{className:`img-studio-card-actions`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`img-studio-action-btn`,onClick:()=>Se(e,t),title:`Download image`,id:`img-studio-gallery-download-${t}`,children:[(0,U.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,U.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,U.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,U.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]}),`Download`]}),n&&(0,U.jsxs)(`button`,{type:`button`,className:`img-studio-action-btn img-studio-action-btn--primary`,onClick:()=>n(e.url||e.path,e.message||``),title:`Send to Chat`,id:`img-studio-gallery-send-${t}`,children:[(0,U.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,U.jsx)(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),(0,U.jsx)(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`})]}),`Send to Chat`]})]})]},e.id))})})()})]})]})]})}var fw,U,pw,mw,hw,gw,_w=t((()=>{fw=e(A()),h(),sw(),U=j(),xt(),pw=rw,mw=aw,hw=ct,gw={nanobanana:`✦ NanoBanana (Gemini)`,bfl:`⚡ Black Forest Labs (FLUX API)`,dalle:`⬡ DALL·E (OpenAI)`,stability:`◈ Stability AI`,ideogram:`◉ Ideogram`,replicate:`⬢ Replicate`}}));function vw(e){return Dw[e]??e}function yw(e){return Ew[e]?.[0]?.value??``}function bw(){return(0,W.jsxs)(`div`,{className:`veo-studio-skeleton`,children:[(0,W.jsx)(`div`,{className:`veo-studio-skeleton-shine`}),(0,W.jsx)(`div`,{className:`veo-studio-skeleton-icon`,"aria-hidden":`true`,children:(0,W.jsxs)(`svg`,{width:`40`,height:`40`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,W.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,W.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]})})]})}function xw({view:e,onSendToChat:t,onToggleMobileSidebar:n}){let[r,i]=(0,Sw.useState)(``),[a,o]=(0,Sw.useState)(``),[s,c]=(0,Sw.useState)(!1),[l,u]=(0,Sw.useState)(`16:9`),[d,f]=(0,Sw.useState)(5),[p,m]=(0,Sw.useState)(!1),[h,g]=(0,Sw.useState)(``),[_,v]=(0,Sw.useState)(null),[y,x]=(0,Sw.useState)([]),[S,C]=(0,Sw.useState)([]),[w,T]=(0,Sw.useState)({active:`veo`,available:[`veo`]}),[E,D]=(0,Sw.useState)(`veo`),[O,ee]=(0,Sw.useState)(yw(`veo`)),[te,ne]=(0,Sw.useState)({}),k=(0,Sw.useRef)(null);(0,Sw.useEffect)(()=>{let e=!1;oe().then(async t=>{if(e)return;T(t),D(t.active);let n=await dt(`veoModel`);n&&!e?ee(n):e||ee(yw(t.active))}).catch(()=>{});let t=At(e=>{(e.provider===`veoModel`||e.category===`video`)&&ee(e.model)});return()=>{e=!0,t()}},[]),(0,Sw.useEffect)(()=>{let e=!1;return b(E).then(t=>{if(e||!t||t.length===0)return;let n=Ew[E]??[],r=new Map;for(let e of n)r.set(e.value,e.label);let i=[],a=new Set;for(let e of t)a.has(e)||(a.add(e),i.push({value:e,label:r.get(e)??e}));for(let e of n)a.has(e.value)||(a.add(e.value),i.push(e));ne(e=>({...e,[E]:i}))}).catch(()=>{}),()=>{e=!0}},[E]);let re=e=>{D(e);let t=(te[e]??Ew[e]??[])[0]?.value||yw(e);ee(t),nt(`veoModel`,t,`video`)},ie=e=>{ee(e),nt(`veoModel`,e,`video`)},ae=(0,Sw.useCallback)(async()=>{let e=r.trim();if(!e||p)return;m(!0),g(``),v(null);let t={prompt:e,negativePrompt:a.trim()||void 0,aspectRatio:l,duration:d,model:O||void 0,provider:E};try{v(await we(t)),x(t=>[e,...t.filter(t=>t!==e)].slice(0,8))}catch(e){g(e instanceof Error?e.message:String(e))}finally{m(!1)}},[r,a,l,d,p,E,O]),se=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),ae())},ce=(e,t)=>{let n=document.createElement(`a`);n.href=e.url||e.path,n.download=`mint-veo-${t+1}.mp4`,document.body.appendChild(n),n.click(),document.body.removeChild(n)},le=te[E]??Ew[E]??[],[ue,de]=(0,Sw.useState)(`generate`);return(0,W.jsxs)(`div`,{className:`veo-studio ${e===`veo`?`is-visible`:``}`,id:`veo-studio-panel`,role:`main`,"aria-label":`AI Video Editor`,"aria-hidden":e!==`veo`,children:[(0,W.jsxs)(`header`,{className:`veo-studio-header`,children:[(0,W.jsxs)(`div`,{className:`veo-studio-header-title`,children:[(0,W.jsx)(`button`,{className:`mobile-menu-btn`,type:`button`,onClick:n,"aria-label":`Toggle menu`,style:{marginRight:`8px`},children:`☰`}),(0,W.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,W.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]}),(0,W.jsx)(`h1`,{children:`Veo Studio`}),(0,W.jsx)(`span`,{className:`veo-studio-badge`,children:ue===`generate`?vw(E):`FableMint`})]}),(0,W.jsxs)(`div`,{className:`veo-studio-tabs`,role:`tablist`,"aria-label":`Studio mode`,children:[(0,W.jsxs)(`button`,{id:`veo-tab-generate`,role:`tab`,type:`button`,"aria-selected":ue===`generate`,className:`veo-studio-tab ${ue===`generate`?`is-active`:``}`,onClick:()=>de(`generate`),children:[(0,W.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,W.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]}),`Generate`]}),(0,W.jsxs)(`button`,{id:`veo-tab-edit`,role:`tab`,type:`button`,"aria-selected":ue===`edit`,className:`veo-studio-tab ${ue===`edit`?`is-active`:``}`,onClick:()=>de(`edit`),children:[(0,W.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),(0,W.jsx)(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`})]}),`Edit`]})]})]}),ue===`generate`&&(0,W.jsxs)(`div`,{className:`veo-studio-content`,role:`tabpanel`,"aria-labelledby":`veo-tab-generate`,children:[(0,W.jsxs)(`section`,{className:`veo-studio-controls`,"aria-label":`Video generation settings`,children:[(0,W.jsxs)(`div`,{className:`veo-studio-field`,style:{display:`flex`,gap:`10px`,width:`100%`},children:[(0,W.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`4px`},children:[(0,W.jsx)(`label`,{className:`veo-studio-label`,htmlFor:`veo-studio-provider`,style:{display:`flex`,alignItems:`center`,width:`100%`,height:`18px`},children:(0,W.jsx)(`span`,{children:`Provider`})}),(0,W.jsx)(`select`,{id:`veo-studio-provider`,className:`veo-studio-textarea`,style:{padding:`8px 10px`,height:`38px`,cursor:`pointer`},value:E,onChange:e=>re(e.target.value),disabled:p,children:w.available.map(e=>(0,W.jsx)(`option`,{value:e,children:vw(e).replace(/^[^a-zA-Z0-9]+/,``)},e))})]}),(0,W.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`4px`},children:[(0,W.jsx)(`label`,{className:`veo-studio-label`,htmlFor:`veo-studio-model`,style:{display:`flex`,alignItems:`center`,height:`18px`},children:`Model`}),(0,W.jsx)(`select`,{id:`veo-studio-model`,className:`veo-studio-textarea`,style:{padding:`8px 10px`,height:`38px`,cursor:`pointer`},value:O,onChange:e=>ie(e.target.value),disabled:p,children:le.map(({value:e,label:t})=>(0,W.jsx)(`option`,{value:e,children:t},e))})]})]}),(0,W.jsxs)(`div`,{className:`veo-studio-field`,children:[(0,W.jsxs)(`label`,{className:`veo-studio-label`,htmlFor:`veo-studio-prompt`,children:[`Prompt`,(0,W.jsx)(`span`,{className:`veo-studio-label-hint`,children:`Describe the video you want`})]}),(0,W.jsx)(`textarea`,{id:`veo-studio-prompt`,ref:k,className:`veo-studio-textarea`,value:r,onChange:e=>i(e.target.value),onKeyDown:se,placeholder:`a golden eagle soaring over mountain peaks at sunset, cinematic 4K, slow motion...`,rows:4,disabled:p,"aria-required":`true`}),(0,W.jsx)(`div`,{className:`veo-studio-prompt-hint`,children:`⌘+Enter to generate`})]}),(0,W.jsxs)(`div`,{className:`veo-studio-field`,children:[(0,W.jsx)(`span`,{className:`veo-studio-label`,children:`Style suggestions`}),(0,W.jsx)(`div`,{className:`veo-studio-chips`,role:`group`,"aria-label":`Style suggestions`,children:Tw.map(e=>(0,W.jsx)(`button`,{type:`button`,className:`veo-studio-chip`,onClick:()=>i(t=>t.trim()?`${t.trim()}, ${e}`:e),disabled:p,title:`Add "${e}" to prompt`,children:e},e))})]}),(0,W.jsxs)(`div`,{className:`veo-studio-field`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`veo-studio-toggle`,onClick:()=>c(e=>!e),"aria-expanded":s,"aria-controls":`veo-studio-negative-wrap`,children:[(0,W.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{transform:s?`rotate(90deg)`:`none`,transition:`transform 0.2s`},children:(0,W.jsx)(`polyline`,{points:`9 18 15 12 9 6`})}),`Negative prompt`,a.trim()&&(0,W.jsx)(`span`,{className:`veo-studio-badge-dot`,"aria-label":`has content`})]}),s&&(0,W.jsx)(`div`,{id:`veo-studio-negative-wrap`,children:(0,W.jsx)(`textarea`,{id:`veo-studio-negative`,className:`veo-studio-textarea veo-studio-textarea--sm`,value:a,onChange:e=>o(e.target.value),placeholder:`blurry, shaky camera, low quality, watermark...`,rows:2,disabled:p})})]}),(0,W.jsxs)(`div`,{className:`veo-studio-field`,children:[(0,W.jsx)(`span`,{className:`veo-studio-label`,children:`Aspect ratio`}),(0,W.jsx)(`div`,{className:`veo-studio-aspect-group`,role:`radiogroup`,"aria-label":`Aspect ratio`,children:Cw.map(({value:e,label:t,icon:n})=>(0,W.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":l===e,className:`veo-studio-aspect-btn ${l===e?`is-active`:``}`,onClick:()=>u(e),disabled:p,id:`veo-studio-aspect-${e.replace(`:`,`x`)}`,children:[(0,W.jsx)(`span`,{className:`veo-studio-aspect-icon`,"aria-hidden":`true`,children:n}),(0,W.jsx)(`span`,{children:t})]},e))})]}),(0,W.jsxs)(`div`,{className:`veo-studio-field`,children:[(0,W.jsx)(`span`,{className:`veo-studio-label`,children:`Duration`}),(0,W.jsx)(`div`,{className:`veo-studio-duration-group`,role:`radiogroup`,"aria-label":`Video duration`,children:ww.map(({value:e,label:t})=>(0,W.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":d===e,className:`veo-studio-duration-btn ${d===e?`is-active`:``}`,onClick:()=>f(e),disabled:p,id:`veo-studio-duration-${e}`,children:[(0,W.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,W.jsx)(`polyline`,{points:`12 6 12 12 16 14`})]}),t]},e))})]}),(0,W.jsx)(`button`,{id:`veo-studio-generate-btn`,type:`button`,className:`veo-studio-generate-btn ${p?`is-loading`:``}`,onClick:ae,disabled:!r.trim()||p,"aria-busy":p,children:p?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`veo-studio-spinner`,"aria-hidden":`true`}),`Generating video...`]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,W.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]}),`Generate Video`]})}),h&&(0,W.jsxs)(`div`,{className:`veo-studio-error`,role:`alert`,children:[(0,W.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,W.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,W.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]}),(0,W.jsx)(`span`,{children:h}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>g(``),"aria-label":`Dismiss error`,children:`×`})]}),y.length>0&&(0,W.jsxs)(`div`,{className:`veo-studio-field`,children:[(0,W.jsx)(`span`,{className:`veo-studio-label`,children:`Recent prompts`}),(0,W.jsx)(`div`,{className:`veo-studio-history`,children:y.map(e=>(0,W.jsxs)(`button`,{type:`button`,className:`veo-studio-history-item`,onClick:()=>{i(e),k.current?.focus()},disabled:p,title:e,children:[(0,W.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,W.jsx)(`polyline`,{points:`12 6 12 12 16 14`})]}),(0,W.jsx)(`span`,{children:e})]},e))})]})]}),(0,W.jsxs)(`section`,{className:`veo-studio-results`,"aria-label":`Generated videos`,"aria-live":`polite`,children:[(0,W.jsxs)(`div`,{className:`veo-studio-active-workspace`,children:[p&&(0,W.jsxs)(`div`,{className:`veo-studio-skeleton-wrap`,children:[(0,W.jsx)(bw,{}),(0,W.jsxs)(`p`,{className:`veo-studio-generating-label`,"aria-live":`assertive`,children:[`Generating `,d,`s video with `,vw(E),` — this may take a moment…`]})]}),!p&&_&&(0,W.jsxs)(W.Fragment,{children:[_.description&&(0,W.jsx)(`p`,{className:`veo-studio-description`,children:_.description}),(0,W.jsx)(`div`,{className:`veo-studio-video-grid`,children:_.videos.map((e,n)=>(0,W.jsxs)(`article`,{className:`veo-studio-card`,"aria-label":`Generated video ${n+1}`,children:[(0,W.jsx)(`div`,{className:`veo-studio-card-video-wrap`,children:(0,W.jsx)(`video`,{src:me(e.url||e.path),className:`veo-studio-card-video`,controls:!0,preload:`metadata`,"aria-label":e.message||r})}),(0,W.jsxs)(`div`,{className:`veo-studio-card-actions`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`veo-studio-action-btn`,onClick:()=>ce(e,n),title:`Download video`,id:`veo-studio-download-${n}`,children:[(0,W.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,W.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,W.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]}),`Download`]}),t&&(0,W.jsxs)(`button`,{type:`button`,className:`veo-studio-action-btn veo-studio-action-btn--primary`,onClick:()=>t(r),title:`Send prompt to Chat`,id:`veo-studio-send-${n}`,children:[(0,W.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),(0,W.jsx)(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`})]}),`Send to Chat`]})]})]},e.id))}),(0,W.jsxs)(`p`,{className:`veo-studio-meta`,children:[`Provider: `,(0,W.jsx)(`strong`,{children:vw(_.provider)}),` · Model: `,(0,W.jsx)(`strong`,{children:_.model}),` · `,_.videos.length,` video`,_.videos.length>1?`s`:``]})]}),!p&&!_&&(0,W.jsxs)(`div`,{className:`veo-studio-active-empty`,children:[(0,W.jsx)(`div`,{className:`veo-studio-empty-icon`,"aria-hidden":`true`,children:(0,W.jsxs)(`svg`,{width:`56`,height:`56`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,W.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,W.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]})}),(0,W.jsx)(`p`,{children:`No video generated yet`}),(0,W.jsx)(`span`,{children:`Enter a prompt on the left and click Generate Video to begin.`})]})]}),(0,W.jsx)(`div`,{className:`veo-studio-history-header`,children:(0,W.jsxs)(`div`,{className:`veo-studio-history-title`,children:[(0,W.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,W.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,W.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]}),(0,W.jsx)(`span`,{children:`Video History`}),(0,W.jsx)(`span`,{className:`veo-studio-history-badge`,children:S.length})]})}),(0,W.jsx)(`div`,{className:`veo-studio-history-gallery`,children:S.length===0?(0,W.jsxs)(`div`,{className:`veo-studio-gallery-empty`,children:[(0,W.jsx)(`p`,{children:`Your video gallery is empty`}),(0,W.jsx)(`span`,{children:`Generated videos will appear here once the backend is connected.`})]}):(0,W.jsx)(`div`,{className:`veo-studio-video-grid`,children:S.map((e,t)=>(0,W.jsxs)(`article`,{className:`veo-studio-card`,"aria-label":`Saved video ${t+1}`,children:[(0,W.jsx)(`div`,{className:`veo-studio-card-video-wrap`,children:(0,W.jsx)(`video`,{src:me(e.url||e.path),className:`veo-studio-card-video`,controls:!0,preload:`metadata`})}),(0,W.jsx)(`div`,{className:`veo-studio-card-actions`,children:(0,W.jsxs)(`button`,{type:`button`,className:`veo-studio-action-btn`,onClick:()=>ce(e,t),title:`Download video`,id:`veo-studio-gallery-download-${t}`,children:[(0,W.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,W.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,W.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,W.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]}),`Download`]})})]},e.id))})})]})]}),ue===`edit`&&(0,W.jsx)(`div`,{className:`veo-studio-content veo-studio-content--single`,role:`tabpanel`,"aria-labelledby":`veo-tab-edit`,children:(0,W.jsxs)(`section`,{className:`veo-studio-fablemint-notice`,"aria-label":`Video editing via FableMint`,children:[(0,W.jsx)(`div`,{className:`veo-studio-empty-icon`,"aria-hidden":`true`,children:(0,W.jsxs)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,W.jsx)(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),(0,W.jsx)(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`})]})}),(0,W.jsx)(`h2`,{children:`Video editing now runs through FableMint`}),(0,W.jsxs)(`p`,{children:[`Timeline edits are handled by`,` `,(0,W.jsx)(`a`,{href:`https://github.com/Pheem49/FableMint`,target:`_blank`,rel:`noreferrer`,children:`FableMint`}),` `,`— a free, open-source, zero-dependency browser video editor connected to Mint over MCP. Its whole project is one JSON timeline: Mint patches it directly and the open editor tab live-reloads in ~150 ms, so you watch the edit happen in real time.`]}),(0,W.jsxs)(`div`,{className:`veo-studio-fablemint-step`,children:[(0,W.jsx)(`span`,{className:`veo-studio-fablemint-step-num`,children:`1`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`strong`,{children:`Clone FableMint`}),(0,W.jsxs)(`span`,{className:`veo-studio-label-hint`,children:[`Needs Node 18+ and a Chromium-based browser. `,(0,W.jsx)(`code`,{children:`ffmpeg`}),` on your PATH is optional but recommended for fast export.`]}),(0,W.jsx)(`pre`,{children:(0,W.jsxs)(`code`,{children:[`git clone https://github.com/Pheem49/FableMint.git`,`
|
|
51
|
-
`,`cd FableMint`]})})]})]}),(0,W.jsxs)(`div`,{className:`veo-studio-fablemint-step`,children:[(0,W.jsx)(`span`,{className:`veo-studio-fablemint-step-num`,children:`2`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`strong`,{children:`Start the editor`}),(0,W.jsxs)(`span`,{className:`veo-studio-label-hint`,children:[`Opens the timeline UI at `,(0,W.jsx)(`code`,{children:`http://localhost:7777`}),`. Media dropped into the window (or `,(0,W.jsx)(`code`,{children:`./media/`}),`) is picked up automatically.`]}),(0,W.jsx)(`pre`,{children:(0,W.jsx)(`code`,{children:`node server.js`})})]})]}),(0,W.jsxs)(`div`,{className:`veo-studio-fablemint-step`,children:[(0,W.jsx)(`span`,{className:`veo-studio-fablemint-step-num`,children:`3`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`strong`,{children:`Connect it to Mint as an MCP server`}),(0,W.jsx)(`pre`,{children:(0,W.jsx)(`code`,{children:`mint mcp add fablemint node --args "<path-to>/FableMint/mcp-server.js"
|
|
52
|
-
mint mcp allow fablemint "*"
|
|
53
|
-
mint mcp call fablemint fablecut_status --arguments '{}' # sanity check`})}),(0,W.jsxs)(`span`,{className:`veo-studio-label-hint`,children:[`The last line should report the editor is running (it auto-starts `,(0,W.jsx)(`code`,{children:`server.js`}),` `,`for you if step 2 wasn't run yet). In Desktop/Web you can do the same from`,` `,(0,W.jsx)(`strong`,{children:`Settings → MCP servers → custom server`}),` — Name `,(0,W.jsx)(`code`,{children:`fablemint`}),`, Command `,(0,W.jsx)(`code`,{children:`node`}),`, Args `,(0,W.jsx)(`code`,{children:`<path-to>/FableMint/mcp-server.js`}),`.`]})]})]}),(0,W.jsxs)(`div`,{className:`veo-studio-fablemint-step`,children:[(0,W.jsx)(`span`,{className:`veo-studio-fablemint-step-num`,children:`4`}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`strong`,{children:`Ask Mint to edit`}),(0,W.jsxs)(`span`,{className:`veo-studio-label-hint`,children:[`With the FableMint tab open, just describe the edit in chat — Mint calls its`,(0,W.jsx)(`code`,{children:`fablecut_*`}),` tools to patch the timeline and the tab updates live. Every agent write is checkpointed automatically, so a bad edit is always one revert away.`]})]})]}),(0,W.jsx)(`a`,{className:`veo-studio-action-btn veo-studio-action-btn--primary`,href:`https://github.com/Pheem49/FableMint#driving-it-with-an-ai-agent`,target:`_blank`,rel:`noreferrer`,style:{textDecoration:`none`,width:`fit-content`},children:`Full setup guide`})]})})]})}var Sw,W,Cw,ww,Tw,Ew,Dw,Ow=t((()=>{Sw=e(A()),ut(),h(),sw(),W=j(),xt(),Cw=iw,ww=[{value:5,label:`5s`},{value:8,label:`8s`}],Tw=ow,Ew=it,Dw={veo:`Google Veo (Gemini Videos)`}}));function kw(e){return null}var Aw=t((()=>{}));function jw({view:e,pictures:t,onSetView:n,onRefreshPictures:r}){let[i,a]=(0,Mw.useState)(`photo`),[o,s]=(0,Mw.useState)(24),[c,l]=(0,Mw.useState)(null),[u,d]=(0,Mw.useState)(!1),f=(0,Mw.useMemo)(()=>t.filter(e=>{let t=(e.path||``).toLowerCase(),n=(e.url||``).toLowerCase(),r=(e.mimeType||``).toLowerCase().startsWith(`video/`)||t.endsWith(`.mp4`)||t.endsWith(`.webm`)||t.endsWith(`.mov`)||t.endsWith(`.avi`)||t.endsWith(`.mkv`)||n.endsWith(`.mp4`)||n.endsWith(`.webm`)||n.endsWith(`.mov`);return i===`video`?r:!r}),[t,i]),p=(0,Mw.useMemo)(()=>f.slice(0,o),[f,o]);return(0,Mw.useEffect)(()=>{s(24)},[e,t,i]),(0,G.jsxs)(`section`,{className:`pictures-library ${e===`pictures`?`is-visible`:``}`,"aria-hidden":e!==`pictures`,children:[(0,G.jsxs)(`header`,{className:`pictures-header`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`span`,{className:`pictures-kicker`,children:`Gallery`}),(0,G.jsx)(`h2`,{children:`Saved Pictures`})]}),(0,G.jsxs)(`div`,{className:`pictures-header-actions`,children:[(0,G.jsx)(`button`,{className:`pictures-close-btn`,onClick:()=>n(`chat`),children:`Close Gallery`}),(0,G.jsx)(`button`,{type:`button`,className:`picture-refresh-btn`,title:`Refresh`,onClick:()=>r?.(),children:(0,G.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`polyline`,{points:`23 4 23 10 17 10`}),(0,G.jsx)(`polyline`,{points:`1 20 1 14 7 14`}),(0,G.jsx)(`path`,{d:`M3.51 9a9 9 0 0 1 14.13-3.36L23 10`}),(0,G.jsx)(`path`,{d:`M20.49 15a9 9 0 0 1-14.13 3.36L1 14`})]})})]})]}),(0,G.jsxs)(`div`,{className:`pictures-type-filter`,children:[(0,G.jsxs)(`button`,{type:`button`,className:`filter-tab-btn ${i===`photo`?`active`:``}`,onClick:()=>a(`photo`),children:[(0,G.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,G.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,G.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]}),`Photos`]}),(0,G.jsxs)(`button`,{type:`button`,className:`filter-tab-btn ${i===`video`?`active`:``}`,onClick:()=>a(`video`),children:[(0,G.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,G.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]}),`Videos`]})]}),f.length===0?(0,G.jsxs)(`div`,{className:`pictures-empty`,children:[(0,G.jsx)(`div`,{className:`pictures-empty-icon`,style:{display:`flex`,justifyContent:`center`,marginBottom:`12px`,opacity:.3},children:(0,G.jsxs)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,G.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,G.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]})}),(0,G.jsxs)(`p`,{children:[`No saved `,i===`video`?`videos`:`pictures`,` yet`]}),(0,G.jsx)(`span`,{children:`Items appear here after a message with an attachment is sent successfully.`})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`pictures-grid`,children:p.map((e,t)=>(0,G.jsx)(Fw,{picture:e,filterType:i,index:t,onDeleteClick:l},e.id))}),o<f.length&&(0,G.jsx)(`div`,{className:`pictures-load-more-container`,children:(0,G.jsxs)(`button`,{type:`button`,className:`pictures-load-more-btn`,onClick:()=>s(e=>e+24),children:[`Load More (`,f.length-o,` remaining)`]})})]}),c&&typeof document<`u`&&(0,Nw.createPortal)((0,G.jsx)(`div`,{className:`picture-delete-modal-overlay`,onClick:()=>l(null),children:(0,G.jsxs)(`div`,{className:`picture-delete-modal`,onClick:e=>e.stopPropagation(),children:[(0,G.jsxs)(`div`,{className:`picture-delete-modal-header`,children:[(0,G.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#ef4444`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,G.jsx)(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})]}),(0,G.jsxs)(`span`,{children:[`Delete `,i===`video`?`Video`:`Picture`]})]}),(0,G.jsxs)(`p`,{className:`picture-delete-modal-body`,children:[`Are you sure you want to permanently delete `,(0,G.jsx)(`strong`,{children:c.message||c.filename}),`? This action cannot be undone.`]}),(0,G.jsxs)(`div`,{className:`picture-delete-modal-actions`,children:[(0,G.jsx)(`button`,{type:`button`,className:`picture-modal-btn cancel`,onClick:()=>l(null),disabled:u,children:`Cancel`}),(0,G.jsx)(`button`,{type:`button`,className:`picture-modal-btn delete`,onClick:async()=>{if(!c)return;let e=c;d(!0);try{await k(e.id||e.filename),await r?.()}catch(e){console.error(`Failed to delete picture:`,e)}finally{d(!1),l(null)}},disabled:u,children:u?`Deleting...`:`Delete`})]})]})}),document.body)]})}var Mw,Nw,G,Pw,Fw,Iw=t((()=>{Mw=e(A()),Nw=ke(),h(),G=j(),Pw=(e,t=!1)=>{if(_())return t&&(e.thumbnailPath||e.thumbnailUrl)?me(e.thumbnailPath||e.thumbnailUrl||``):me(e.path||e.url||``);{let n=c();return t&&(e.thumbnailPath||e.thumbnailUrl)?`${n}/thumbnails/${e.id}.thumb.png`:`${n}/pictures/${encodeURIComponent(e.filename)}`}},Fw=(0,Mw.memo)(({picture:e,filterType:t,index:n,onDeleteClick:r})=>(0,G.jsxs)(`article`,{className:`picture-card`,children:[(0,G.jsx)(`button`,{type:`button`,className:`picture-card-delete-btn`,title:`Delete item`,onClick:t=>{t.stopPropagation(),r(e)},children:(0,G.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,G.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,G.jsx)(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})]})}),t===`video`?(0,G.jsxs)(`div`,{style:{position:`relative`,width:`100%`,aspectRatio:`4 / 3`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1a1a1a`},children:[e.thumbnailPath||e.thumbnailUrl?(0,G.jsx)(`img`,{src:Pw(e,!0),alt:e.message||e.filename,loading:n<8?`eager`:`lazy`,decoding:`async`,style:{width:`100%`,height:`100%`,objectFit:`cover`},onError:t=>{let n=t.currentTarget;n.dataset.fallback||(n.dataset.fallback=`true`,n.src=Pw(e,!1))}}):(0,G.jsx)(`video`,{src:Pw(e,!1),preload:`metadata`,style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,G.jsx)(`div`,{style:{position:`absolute`,top:`8px`,left:`8px`,display:`flex`,alignItems:`center`,gap:`4px`,backgroundColor:`rgba(0, 0, 0, 0.75)`,color:`#fff`,padding:`4px 8px`,borderRadius:`4px`,fontSize:`11px`,fontWeight:600,pointerEvents:`none`,backdropFilter:`blur(4px)`,border:`1px solid rgba(255, 255, 255, 0.1)`},children:(0,G.jsx)(`span`,{children:`📹 Video`})})]}):(0,G.jsx)(`div`,{style:{position:`relative`,width:`100%`,aspectRatio:`4 / 3`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`#1a1a1a`},children:(0,G.jsx)(`img`,{src:Pw(e,!0),alt:e.message||e.filename,loading:n<8?`eager`:`lazy`,decoding:`async`,style:{width:`100%`,height:`100%`,objectFit:`cover`},onError:t=>{let n=t.currentTarget;n.dataset.fallback||(n.dataset.fallback=`true`,n.src=Pw(e,!1))}})}),(0,G.jsx)(`div`,{className:`picture-card-meta`,children:(0,G.jsx)(`span`,{children:e.message||e.filename})})]},e.id))}));function Lw(e){return null}var Rw=t((()=>{}));function zw({isOpen:e,onClose:t,onSelectChat:n,onNewChat:r,onSelectWorkspace:i,onOpenSettings:a,onChangeView:o,onChangeModel:s,onChangeProvider:c,onExecuteSlash:l,chatSessions:u,currentChatId:d,workspacePath:f}){let[p,m]=(0,Bw.useState)(``),[h,g]=(0,Bw.useState)(0),_=(0,Bw.useRef)(null),v=(0,Bw.useRef)(null);(0,Bw.useEffect)(()=>{e&&(m(``),g(0),setTimeout(()=>_.current?.focus(),50))},[e]);let y=(0,Bw.useMemo)(()=>{let e=[];e.push({id:`cmd-new-chat`,title:`New Chat`,subtitle:`Start a clean conversation session`,category:`Commands`,icon:`+`,action:()=>{r(),t()}}),l&&(e.push({id:`cmd-rewind`,title:`/rewind - Git Checkpoint Time Machine`,subtitle:`Roll back workspace to a previous checkpoint`,category:`Commands`,icon:`↺`,action:()=>{l(`/rewind`),t()}}),e.push({id:`cmd-repomap`,title:`/repomap - Codebase AST Map`,subtitle:`Generate hierarchical tree-sitter map of workspace`,category:`Commands`,icon:`AST`,action:()=>{l(`/repomap`),t()}}),e.push({id:`cmd-init`,title:`/init - Initialize AGENTS.md`,subtitle:`Generate project instructions and guidelines file`,category:`Commands`,icon:`DOC`,action:()=>{l(`/init`),t()}})),o&&(e.push({id:`cmd-skills`,title:`Manage Skills (/skills)`,subtitle:`Browse and customize agent skills`,category:`Commands`,icon:`SKL`,action:()=>{o(`skills`),t()}}),e.push({id:`cmd-mcp`,title:`MCP Catalog & Tools (/mcp)`,subtitle:`Configure Model Context Protocol servers`,category:`Commands`,icon:`MCP`,action:()=>{o(`mcp`),t()}}),e.push({id:`cmd-cron`,title:`Scheduled Tasks (/cron)`,subtitle:`View and manage recurring background tasks`,category:`Commands`,icon:`CRN`,action:()=>{o(`cron`),t()}}),e.push({id:`cmd-link`,title:`Linked Folders (/link)`,subtitle:`Connect external notes and doc directories`,category:`Commands`,icon:`DIR`,action:()=>{o(`link`),t()}})),a&&e.push({id:`cmd-settings`,title:`Settings`,subtitle:`Configure API keys, models, and preferences`,category:`Commands`,icon:`SET`,action:()=>{a(),t()}}),i&&e.push({id:`ws-switch`,title:`Switch Workspace Directory`,subtitle:f?`Current: ${f}`:`Select a project folder`,category:`Workspace`,icon:`DIR`,action:()=>{i(),t()}}),c&&s&&(e.push({id:`model-claude-37`,title:`Claude 3.7 Sonnet`,subtitle:`Anthropic • Hybrid reasoning and fast coding`,category:`Models`,icon:`CL`,action:()=>{c(`anthropic`),s(`claude-3-7-sonnet-20250219`),t()}}),e.push({id:`model-claude-35`,title:`Claude 3.5 Sonnet`,subtitle:`Anthropic • High precision coding agent`,category:`Models`,icon:`CL`,action:()=>{c(`anthropic`),s(`claude-3-5-sonnet-20240620`),t()}}),e.push({id:`model-deepseek-v3`,title:`DeepSeek-V3`,subtitle:`DeepSeek • Fast reasoning and cost efficiency`,category:`Models`,icon:`DS`,action:()=>{c(`deepseek`),s(`deepseek-chat`),t()}}),e.push({id:`model-gpt-4o`,title:`GPT-4o`,subtitle:`OpenAI • Multimodal flagship model`,category:`Models`,icon:`AI`,action:()=>{c(`openai`),s(`gpt-4o`),t()}}),e.push({id:`model-gemini-flash`,title:`Gemini 2.0 Flash`,subtitle:`Google • Ultra-fast multi-turn assistant`,category:`Models`,icon:`GM`,action:()=>{c(`gemini`),s(`gemini-2.0-flash`),t()}}),e.push({id:`model-gemini-pro`,title:`Gemini 1.5 Pro`,subtitle:`Google • 2M token deep context reasoning`,category:`Models`,icon:`GM`,action:()=>{c(`gemini`),s(`gemini-1.5-pro`),t()}}),e.push({id:`model-ollama`,title:`Local Ollama Model`,subtitle:`Ollama • 100% offline private inference`,category:`Models`,icon:`OL`,action:()=>{c(`ollama`),t()}}));for(let r of u||[])e.push({id:`chat-${r.id}`,title:r.title||`Untitled Chat`,subtitle:`Chat session • ${r.id===d?`Active`:`Previous`}`,category:`Chats`,icon:`#`,action:()=>{n(r.id),t()}});return e},[r,t,l,o,a,i,f,c,s,u,d,n]),b=(0,Bw.useMemo)(()=>{let e=p.trim().toLowerCase();return e?y.filter(t=>{let n=t.title.toLowerCase().includes(e),r=t.subtitle?t.subtitle.toLowerCase().includes(e):!1,i=t.category.toLowerCase().includes(e);return n||r||i}):y},[y,p]);(0,Bw.useEffect)(()=>{g(0)},[b]);let x=e=>{if(e.key===`ArrowDown`)e.preventDefault(),g(e=>e+1<b.length?e+1:0);else if(e.key===`ArrowUp`)e.preventDefault(),g(e=>e-1>=0?e-1:b.length-1);else if(e.key===`Enter`){e.preventDefault();let t=b[h];t&&t.action()}else e.key===`Escape`&&(e.preventDefault(),t())};if((0,Bw.useEffect)(()=>{if(v.current){let e=v.current.querySelector(`.palette-item.is-selected`);e&&e.scrollIntoView({block:`nearest`})}},[h]),!e)return null;let S=b.reduce((e,t)=>(e[t.category]||(e[t.category]=[]),e[t.category].push(t),e),{}),C=0;return(0,Vw.jsx)(`div`,{className:`command-palette-backdrop`,onClick:t,style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(5, 7, 12, 0.72)`,backdropFilter:`blur(8px)`,zIndex:9999,display:`flex`,alignItems:`flex-start`,justifyContent:`center`,paddingTop:`12vh`},children:(0,Vw.jsxs)(`div`,{className:`command-palette-dialog`,onClick:e=>e.stopPropagation(),style:{width:`100%`,maxWidth:`620px`,background:`var(--bg-primary, #111317)`,border:`1px solid var(--border-color, #232730)`,borderRadius:`14px`,boxShadow:`0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08)`,overflow:`hidden`,display:`flex`,flexDirection:`column`,maxHeight:`70vh`,animation:`paletteIn 0.15s cubic-bezier(0.16, 1, 0.3, 1)`},children:[(0,Vw.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,padding:`14px 18px`,borderBottom:`1px solid var(--border-color, #232730)`,gap:`12px`,background:`var(--bg-secondary, #181a20)`},children:[(0,Vw.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{color:`var(--accent, #10b981)`,flexShrink:0},children:[(0,Vw.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,Vw.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,Vw.jsx)(`input`,{ref:_,type:`text`,placeholder:`Type a command, model, chat, or / for slash actions...`,value:p,onChange:e=>m(e.target.value),onKeyDown:x,style:{flex:1,background:`transparent`,border:`none`,outline:`none`,color:`#f3f4f6`,fontSize:`1rem`,fontWeight:500}}),(0,Vw.jsx)(`kbd`,{style:{padding:`2px 7px`,borderRadius:`4px`,background:`rgba(255, 255, 255, 0.08)`,color:`var(--text-muted, #9ca3af)`,fontSize:`0.7rem`,fontWeight:600,border:`1px solid rgba(255, 255, 255, 0.1)`},children:`ESC`})]}),(0,Vw.jsx)(`div`,{ref:v,style:{flex:1,overflowY:`auto`,padding:`10px`,display:`flex`,flexDirection:`column`,gap:`6px`},children:b.length===0?(0,Vw.jsx)(`div`,{style:{padding:`32px 16px`,textAlign:`center`,color:`#9ca3af`,fontSize:`0.88rem`},children:`No matching commands, models, or chats found`}):Object.entries(S).map(([e,t])=>(0,Vw.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`2px`},children:[(0,Vw.jsx)(`div`,{style:{fontSize:`0.68rem`,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.06em`,color:`var(--text-muted, #6b7280)`,padding:`8px 10px 4px 10px`},children:e}),t.map(e=>{let t=C++,n=t===h;return(0,Vw.jsxs)(`div`,{className:`palette-item ${n?`is-selected`:``}`,onClick:()=>e.action(),onMouseEnter:()=>g(t),style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`9px 12px`,borderRadius:`8px`,cursor:`pointer`,background:n?`rgba(16, 185, 129, 0.12)`:`transparent`,border:`1px solid ${n?`rgba(16, 185, 129, 0.3)`:`transparent`}`,transition:`all 0.1s ease`},children:[(0,Vw.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`,minWidth:0},children:[(0,Vw.jsx)(`span`,{style:{fontSize:`0.68rem`,fontWeight:700,padding:`2px 5px`,borderRadius:`4px`,background:`rgba(255, 255, 255, 0.08)`,color:n?`#10b981`:`#94a3b8`,fontFamily:`monospace`,flexShrink:0,minWidth:`22px`,textAlign:`center`},children:e.icon}),(0,Vw.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,minWidth:0},children:[(0,Vw.jsx)(`span`,{style:{fontSize:`0.85rem`,fontWeight:600,color:n?`#ffffff`:`#e2e8f0`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title}),e.subtitle&&(0,Vw.jsx)(`span`,{style:{fontSize:`0.72rem`,color:`#94a3b8`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.subtitle})]})]}),n&&(0,Vw.jsx)(`span`,{style:{fontSize:`0.7rem`,color:`#10b981`,fontWeight:600,padding:`2px 6px`,borderRadius:`4px`,background:`rgba(16, 185, 129, 0.15)`},children:`↵ Select`})]},e.id)})]},e))}),(0,Vw.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 16px`,borderTop:`1px solid var(--border-color, #232730)`,background:`var(--bg-secondary, #181a20)`,fontSize:`0.72rem`,color:`#94a3b8`},children:[(0,Vw.jsxs)(`div`,{style:{display:`flex`,gap:`12px`},children:[(0,Vw.jsxs)(`span`,{children:[(0,Vw.jsx)(`kbd`,{style:{background:`rgba(255,255,255,0.1)`,padding:`1px 4px`,borderRadius:`3px`},children:`↑`}),` `,(0,Vw.jsx)(`kbd`,{style:{background:`rgba(255,255,255,0.1)`,padding:`1px 4px`,borderRadius:`3px`},children:`↓`}),` to navigate`]}),(0,Vw.jsxs)(`span`,{children:[(0,Vw.jsx)(`kbd`,{style:{background:`rgba(255,255,255,0.1)`,padding:`1px 4px`,borderRadius:`3px`},children:`↵`}),` to select`]})]}),(0,Vw.jsx)(`span`,{children:`Universal Command Palette`})]})]})})}var Bw,Vw,Hw=t((()=>{Bw=e(A()),Vw=j()}));function Uw(e){let t=e.trim();if(!t.startsWith(`/`))return null;let n=t.search(/\s/);return n===-1?{command:t.toLowerCase(),rest:``}:{command:t.slice(0,n).toLowerCase(),rest:t.slice(n).trim()}}function Ww(e){let t=Uw(e);if(!t)return{handled:!1};let{command:n,rest:r}=t;switch(n){case`/image`:return{handled:!0,action:`open_image_picker`,payload:{pathOrPrompt:r}};case`/paste`:return{handled:!0,action:`paste_image`,payload:{prompt:r}};case`/veo`:return r?{handled:!0,action:`generate_veo`,payload:{prompt:r}}:{handled:!0,action:`system_message`,systemText:"⚠️ Usage: `/veo <prompt>`"};case`/n8n`:return{handled:!0,action:`system_message`,systemText:`🔗 **n8n** runs at http://localhost:5678 — open it in a browser tab. Wire it as an MCP server (Settings > Plugins) to drive workflows from chat.`};case`/notebook`:return{handled:!0,action:`system_message`,systemText:"📓 **SurfSense** runs at http://localhost:3929 — open it in a browser tab. Wire the `surfsense` MCP server (Settings > Plugins) to run tasks from chat."};case`/avatar`:return{handled:!0,action:`system_message`,systemText:"🧍 **Project Avatar** — the desktop app renders the live companion automatically. Use the CLI `/avatar link` to pair an external viewer."};default:return{handled:!1}}}var Gw=t((()=>{}));function Kw(e){return e.split(`
|
|
54
|
-
`).map(e=>e.replace(/^#+\s*/,``).trim()).find(Boolean)||``}var qw,K,Jw,Yw=t((()=>{qw=e(A()),at(),jb(),Ze(),K=j(),Jw=qw.memo(function({listSkills:e,addSkill:t,deleteSkill:n,workspacePath:r}){let[i,a]=(0,qw.useState)([]),[o,s]=(0,qw.useState)(!1),[c,l]=(0,qw.useState)(``),[u,d]=(0,qw.useState)(``),[f,p]=(0,qw.useState)(`all`),[m,h]=(0,qw.useState)(``),[g,_]=(0,qw.useState)(``),[v,y]=(0,qw.useState)(!1),[b,x]=(0,qw.useState)(!1),[S,C]=(0,qw.useState)(null),w=async()=>{s(!0),l(``);try{a(await e(r))}catch(e){console.error(`Failed to fetch skills:`,e),l(`Failed to load learned skills`)}finally{s(!1)}};(0,qw.useEffect)(()=>{w()},[r]);let T=async e=>{if(e.preventDefault(),!(!m.trim()||!g.trim())){y(!0);try{await t(m.trim(),g.trim()),h(``),_(``),x(!1),w()}catch(e){console.error(`Failed to add learned skill:`,e),alert(`Error saving skill`)}finally{y(!1)}}},E=async e=>{if(window.confirm(`Are you sure you want to forget skill "${e}"?`))try{await n(e),C(t=>t?.name===e?null:t),w()}catch(e){console.error(`Failed to delete skill:`,e),alert(`Error deleting skill`)}},D=i.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())||(e.description||``).toLowerCase().includes(u.toLowerCase())||e.content.toLowerCase().includes(u.toLowerCase())?f===`workspace`?!!e.is_workspace:f===`global`?!e.is_workspace:!0:!1);return(0,K.jsxs)(`div`,{className:`management-container`,children:[(0,K.jsxs)(`div`,{className:`management-header`,children:[(0,K.jsxs)(`div`,{className:`management-title-group`,children:[(0,K.jsxs)(`h1`,{className:`management-title`,children:[(0,K.jsx)(`span`,{className:`management-title-icon`,style:{display:`inline-flex`,alignItems:`center`},children:Ge(22,`var(--accent)`)}),`Skills`]}),(0,K.jsx)(`p`,{className:`management-subtitle`,children:`Instructions Mint follows automatically, reviewed before every prompt.`})]}),(0,K.jsxs)(`button`,{type:`button`,className:`management-primary-btn`,onClick:()=>x(!0),children:[(0,K.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,K.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,K.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`Teach New Skill`]})]}),(0,K.jsxs)(`div`,{className:`management-control-bar`,children:[(0,K.jsxs)(`div`,{className:`management-search-wrapper`,children:[(0,K.jsx)(`input`,{type:`text`,className:`management-search-input`,placeholder:`Search skills by name or instructions...`,value:u,onChange:e=>d(e.target.value)}),(0,K.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,K.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,K.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]}),(0,K.jsx)(`div`,{className:`management-filter-pills`,children:[`all`,`workspace`,`global`].map(e=>(0,K.jsx)(`button`,{type:`button`,className:`management-pill-btn ${f===e?`active`:``}`,onClick:()=>p(e),children:e},e))})]}),c&&(0,K.jsx)(`div`,{className:`management-error-banner`,children:c}),o?(0,K.jsx)(`div`,{className:`mgmt-empty`,children:`Loading…`}):D.length===0?(0,K.jsxs)(`div`,{className:`mgmt-empty`,children:[(0,K.jsx)(`p`,{children:u||f!==`all`?`No skills match.`:`No skills yet.`}),!u&&f===`all`&&(0,K.jsxs)(`p`,{children:[`Teach one above, or run `,(0,K.jsx)(`code`,{children:`/learn`}),` in chat.`]})]}):(0,K.jsx)(`div`,{className:`mgmt-list`,children:D.map(e=>(0,K.jsxs)(`div`,{className:`mgmt-row`,onClick:()=>C(e),children:[(0,K.jsxs)(`div`,{className:`mgmt-row-main`,children:[(0,K.jsx)(`div`,{className:`mgmt-row-title`,children:e.name}),(0,K.jsx)(`div`,{className:`mgmt-row-sub`,children:e.description||Kw(e.content)})]}),(0,K.jsx)(`span`,{className:`management-tag ${e.is_workspace?`workspace`:`global`}`,children:e.is_workspace?`Workspace`:`Global`})]},e.name))}),S&&(0,K.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>C(null),children:(0,K.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,K.jsxs)(`div`,{className:`management-modal-header`,children:[(0,K.jsxs)(`div`,{className:`management-card-title-group`,children:[Fe(44),(0,K.jsx)(`h2`,{className:`management-modal-title`,children:S.name})]}),(0,K.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>C(null),children:`✕`})]}),(0,K.jsxs)(`div`,{className:`management-modal-body`,children:[(0,K.jsx)(`span`,{className:`management-tag ${S.is_workspace?`workspace`:`global`}`,children:S.is_workspace?`Workspace`:`Global`}),S.description&&(0,K.jsx)(`p`,{style:{color:`var(--text-soft, #d1d1d4)`,lineHeight:1.55,margin:0},children:S.description}),(0,K.jsx)(`div`,{className:`mgmt-prose`,children:Eb(S.content)})]}),(0,K.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,K.jsx)(`span`,{style:{fontSize:`0.8rem`,color:`var(--text-muted, #64748b)`},children:S.updatedAt?new Date(S.updatedAt).toLocaleDateString():`Learned`}),(0,K.jsx)(`button`,{type:`button`,className:`management-action-btn danger`,onClick:()=>E(S.name),children:`Forget`})]})]})}),b&&(0,K.jsx)(`div`,{className:`management-modal-overlay`,children:(0,K.jsxs)(`div`,{className:`management-modal`,children:[(0,K.jsxs)(`div`,{className:`management-modal-header`,children:[(0,K.jsx)(`h2`,{className:`management-modal-title`,children:`Teach New Skill to Mint`}),(0,K.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>x(!1),children:`✕`})]}),(0,K.jsxs)(`form`,{onSubmit:T,children:[(0,K.jsxs)(`div`,{className:`management-modal-body`,children:[(0,K.jsxs)(`div`,{className:`management-form-group`,children:[(0,K.jsx)(`label`,{className:`management-label`,children:`Skill Name (e.g. typescript-standards)`}),(0,K.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. angular-standard`,value:m,onChange:e=>h(e.target.value),required:!0})]}),(0,K.jsxs)(`div`,{className:`management-form-group`,children:[(0,K.jsx)(`label`,{className:`management-label`,children:`Skill Instructions / Content (Markdown supported)`}),(0,K.jsx)(`textarea`,{className:`management-textarea-field`,placeholder:`# Guidelines
|
|
55
|
-
Always write modular React code using TypeScript.`,value:g,onChange:e=>_(e.target.value),required:!0,rows:6})]})]}),(0,K.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,K.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>x(!1),children:`Cancel`}),(0,K.jsx)(`button`,{type:`submit`,disabled:v,className:`management-primary-btn`,children:v?`Saving...`:`Save Skill`})]})]})]})})]})})}));function Xw(e){let t=uO.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),uO.set(e,t)),t}function Zw(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,l]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,l]}function Qw(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=dO[t];t===`era`?r[a]=i:AT(a)||(r[a]=parseInt(i,10))}return r}function $w(e,t={}){let n=JSON.stringify([e,t]),r=mO[n];return r||(r=new Intl.ListFormat(e,t),mO[n]=r),r}function eT(e,t={}){let n=JSON.stringify([e,t]),r=hO.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),hO.set(n,r)),r}function tT(e,t={}){let n=JSON.stringify([e,t]),r=gO.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),gO.set(n,r)),r}function nT(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=_O.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),_O.set(i,a)),a}function rT(){return vO||(vO=new Intl.DateTimeFormat().resolvedOptions().locale,vO)}function iT(e){let t=yO.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),yO.set(e,t)),t}function aT(e){let t=bO.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...wO,...t}),bO.set(e,t)}return t}function oT(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=eT(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=eT(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function sT(e,t,n){return n||t?(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}function cT(e){let t=[];for(let n=1;n<=12;n++){let r=uA.utc(2009,n,1);t.push(e(r))}return t}function lT(e){let t=[];for(let n=1;n<=7;n++){let r=uA.utc(2016,11,13+n);t.push(e(r))}return t}function uT(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function dT(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||iT(e.locale).numberingSystem===`latn`}function fT(e,t){if(AT(e)||e===null)return t;if(e instanceof sO)return e;if(NT(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?lO.instance:n===`utc`||n===`gmt`?DO.utcInstance:DO.parseSpecifier(n)||pO.create(e)}else if(jT(e))return DO.instance(e);else if(typeof e==`object`&&`offset`in e&&typeof e.offset==`function`)return e;else return new OO(e)}function pT(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(kO.hanidec)!==-1)t+=jO.indexOf(e[n]);else for(let e in AO){let[n,i]=AO[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}else return t}function mT(){MO.clear()}function hT({numberingSystem:e},t=``){let n=e||`latn`,r=MO.get(n);r===void 0&&(r=new Map,MO.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${kO[n]}${t}`),r.set(t,i)),i}function gT(e,t){return new HO(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function _T(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function vT(e,t,n){return n+(YT(e)?WO:UO)[t-1]}function yT(e,t){let n=YT(e)?WO:UO,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function bT(e,t){return(e-t+7)%7+1}function xT(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=vT(r,i,a),s=bT(_T(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=eE(l,t,n)):c>eE(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...sE(e)}}function ST(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=bT(_T(r,1,t),n),s=XT(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=XT(l)):c>s?(l=r+1,c-=XT(r)):l=r;let{month:u,day:d}=yT(l,c);return{year:l,month:u,day:d,...sE(e)}}function CT(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:vT(t,n,r),...sE(e)}}function wT(e){let{year:t,ordinal:n}=e,{month:r,day:i}=yT(t,n);return{year:t,month:r,day:i,...sE(e)}}function TT(e,t){if(!AT(e.localWeekday)||!AT(e.localWeekNumber)||!AT(e.localWeekYear)){if(!AT(e.weekday)||!AT(e.weekNumber)||!AT(e.weekYear))throw new ND(`Cannot mix locale-based week fields with ISO-based week fields`);return AT(e.localWeekday)||(e.weekday=e.localWeekday),AT(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),AT(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function ET(e,t=4,n=1){let r=MT(e.weekYear),i=HT(e.weekNumber,1,eE(e.weekYear,t,n)),a=HT(e.weekday,1,7);return r?i?a?!1:gT(`weekday`,e.weekday):gT(`week`,e.weekNumber):gT(`weekYear`,e.weekYear)}function DT(e){let t=MT(e.year),n=HT(e.ordinal,1,XT(e.year));return t?n?!1:gT(`ordinal`,e.ordinal):gT(`year`,e.year)}function OT(e){let t=MT(e.year),n=HT(e.month,1,12),r=HT(e.day,1,ZT(e.year,e.month));return t?n?r?!1:gT(`day`,e.day):gT(`month`,e.month):gT(`year`,e.year)}function kT(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=HT(t,0,23)||t===24&&n===0&&r===0&&i===0,o=HT(n,0,59),s=HT(r,0,59),c=HT(i,0,999);return a?o?s?c?!1:gT(`millisecond`,i):gT(`second`,r):gT(`minute`,n):gT(`hour`,t)}function AT(e){return e===void 0}function jT(e){return typeof e==`number`}function MT(e){return typeof e==`number`&&e%1==0}function NT(e){return typeof e==`string`}function PT(e){return Object.prototype.toString.call(e)===`[object Date]`}function FT(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function IT(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function LT(e){return Array.isArray(e)?e:[e]}function RT(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function zT(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function BT(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function VT(e){if(e==null)return null;if(typeof e!=`object`)throw new FD(`Week settings must be an object`);if(!HT(e.firstDay,1,7)||!HT(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!HT(e,1,7)))throw new FD(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function HT(e,t,n){return MT(e)&&e>=t&&e<=n}function UT(e,t){return e-t*Math.floor(e/t)}function WT(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function GT(e){if(!(AT(e)||e===null||e===``))return parseInt(e,10)}function KT(e){if(!(AT(e)||e===null||e===``))return parseFloat(e)}function qT(e){if(!(AT(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function JT(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function YT(e){return e%4==0&&(e%100!=0||e%400==0)}function XT(e){return YT(e)?366:365}function ZT(e,t){let n=UT(t-1,12)+1,r=e+(t-n)/12;return n===2?YT(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function QT(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function $T(e,t,n){return-bT(_T(e,1,t),n)+t-1}function eE(e,t=4,n=1){let r=$T(e,t,n),i=$T(e+1,t,n);return(XT(e)-r+i)/7}function tE(e){return e>99?e:e>VO.twoDigitCutoffYear?1900+e:2e3+e}function nE(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function rE(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function iE(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new FD(`Invalid unit value ${e}`);return t}function aE(e,t){let n={};for(let r in e)if(BT(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=iE(i)}return n}function oE(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${WT(n,2)}:${WT(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${WT(n,2)}${WT(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function sE(e){return zT(e,[`hour`,`minute`,`second`,`millisecond`])}function cE(e){switch(e){case`narrow`:return[...qO];case`short`:return[...KO];case`long`:return[...GO];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}function lE(e){switch(e){case`narrow`:return[...XO];case`short`:return[...YO];case`long`:return[...JO];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}function uE(e){switch(e){case`narrow`:return[...ek];case`short`:return[...$O];case`long`:return[...QO];default:return null}}function dE(e){return ZO[e.hour<12?0:1]}function fE(e,t){return lE(t)[e.weekday-1]}function pE(e,t){return cE(t)[e.month-1]}function mE(e,t){return uE(t)[e.year<0?0:1]}function hE(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,l=i[e],u=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return o?`${s} ${u} ago`:`in ${s} ${u}`}function gE(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}function _E(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function vE(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function yE(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function bE(...e){return(t,n)=>{let r={},i;for(i=0;i<e.length;i++)r[e[i]]=GT(t[n+i]);return[r,null,n+i]}}function xE(e,t,n){let r=e[t];return AT(r)?n:GT(r)}function SE(e,t){return[{year:xE(e,t),month:xE(e,t+1,1),day:xE(e,t+2,1)},null,t+3]}function CE(e,t){return[{hours:xE(e,t,0),minutes:xE(e,t+1,0),seconds:xE(e,t+2,0),milliseconds:qT(e[t+3])},null,t+4]}function wE(e,t){let n=!e[t]&&!e[t+1],r=rE(e[t+1],e[t+2]);return[{},n?null:DO.instance(r),t+3]}function TE(e,t){return[{},e[t]?pO.create(e[t]):null,t+1]}function EE(e){let[t,n,r,i,a,o,s,c,l]=e,u=t[0]===`-`,d=c&&c[0]===`-`,f=(e,t=!1)=>e!==void 0&&(t||e&&u)?-e:e;return[{years:f(KT(n)),months:f(KT(r)),weeks:f(KT(i)),days:f(KT(a)),hours:f(KT(o)),minutes:f(KT(s)),seconds:f(KT(c),c===`-0`),milliseconds:f(qT(l),d)}]}function DE(e,t,n,r,i,a,o){let s={year:t.length===2?tE(GT(t)):GT(t),month:KO.indexOf(n)+1,day:GT(r),hour:GT(i),minute:GT(a)};return o&&(s.second=GT(o)),e&&(s.weekday=e.length>3?JO.indexOf(e)+1:YO.indexOf(e)+1),s}function OE(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=DE(t,i,r,n,a,o,s),p;return p=c?yk[c]:l?0:rE(u,d),[f,new DO(p)]}function kE(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}function AE(e){let[,t,n,r,i,a,o,s]=e;return[DE(t,i,r,n,a,o,s),DO.utcInstance]}function jE(e){let[,t,n,r,i,a,o,s]=e;return[DE(t,s,n,r,i,a,o),DO.utcInstance]}function ME(e){return yE(e,[wk,Ok],[Tk,kk],[Ek,Ak],[Dk,jk])}function NE(e){return yE(kE(e),[bk,OE])}function PE(e){return yE(e,[xk,AE],[Sk,AE],[Ck,jE])}function FE(e){return yE(e,[vk,EE])}function IE(e){return yE(e,[_k,Mk])}function LE(e){return yE(e,[Nk,Ok],[Pk,Fk])}function RE(e,t,n=!1){return new Wk({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function zE(e,t){let n=t.milliseconds??0;for(let r of Uk.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function BE(e,t){let n=zE(e,t)<0?-1:1;Hk.reduceRight((r,i)=>{if(AT(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),Hk.reduce((n,r)=>{if(AT(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function VE(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}function HE(e,t){return!e||!e.isValid?Kk.invalid(`missing or invalid start`):!t||!t.isValid?Kk.invalid(`missing or invalid end`):t<e?Kk.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}function UE(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(Wk.fromMillis(r).as(`days`))}function WE(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=UE(e,t);return(n-n%7)/7}],[`days`,UE]],i={},a=e,o,s;for(let[c,l]of r)n.indexOf(c)>=0&&(o=c,i[c]=l(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function GE(e,t,n,r){let[i,a,o,s]=WE(e,t,n),c=t-i,l=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let u=Wk.fromObject(a,r);return l.length>0?Wk.fromMillis(c,r).shiftTo(...l).plus(u):u}function KE(e,t=e=>e){return{regex:e,deser:([e])=>t(pT(e))}}function qE(e){return e.replace(/\./g,`\\.?`).replace(Xk,Yk)}function JE(e){return e.replace(/\./g,``).replace(Xk,` `).toLowerCase()}function YE(e,t){return e===null?null:{regex:RegExp(e.map(qE).join(`|`)),deser:([n])=>e.findIndex(e=>JE(n)===JE(e))+t}}function XE(e,t){return{regex:e,deser:([,e,t])=>rE(e,t),groups:t}}function ZE(e){return{regex:e,deser:([e])=>e}}function QE(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function $E(e,t){let n=hT(t),r=hT(t,`{2}`),i=hT(t,`{3}`),a=hT(t,`{4}`),o=hT(t,`{6}`),s=hT(t,`{1,2}`),c=hT(t,`{1,3}`),l=hT(t,`{1,6}`),u=hT(t,`{1,9}`),d=hT(t,`{2,4}`),f=hT(t,`{4,6}`),p=e=>({regex:RegExp(QE(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return YE(t.eras(`short`),0);case`GG`:return YE(t.eras(`long`),0);case`y`:return KE(l);case`yy`:return KE(d,tE);case`yyyy`:return KE(a);case`yyyyy`:return KE(f);case`yyyyyy`:return KE(o);case`M`:return KE(s);case`MM`:return KE(r);case`MMM`:return YE(t.months(`short`,!0),1);case`MMMM`:return YE(t.months(`long`,!0),1);case`L`:return KE(s);case`LL`:return KE(r);case`LLL`:return YE(t.months(`short`,!1),1);case`LLLL`:return YE(t.months(`long`,!1),1);case`d`:return KE(s);case`dd`:return KE(r);case`o`:return KE(c);case`ooo`:return KE(i);case`HH`:return KE(r);case`H`:return KE(s);case`hh`:return KE(r);case`h`:return KE(s);case`mm`:return KE(r);case`m`:return KE(s);case`q`:return KE(s);case`qq`:return KE(r);case`s`:return KE(s);case`ss`:return KE(r);case`S`:return KE(c);case`SSS`:return KE(i);case`u`:return ZE(u);case`uu`:return ZE(s);case`uuu`:return KE(n);case`a`:return YE(t.meridiems(),0);case`kkkk`:return KE(a);case`kk`:return KE(d,tE);case`W`:return KE(s);case`WW`:return KE(r);case`E`:case`c`:return KE(n);case`EEE`:return YE(t.weekdays(`short`,!1),1);case`EEEE`:return YE(t.weekdays(`long`,!1),1);case`ccc`:return YE(t.weekdays(`short`,!0),1);case`cccc`:return YE(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return XE(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return XE(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return ZE(/[a-z_+-/]{1,256}?/i);case` `:return ZE(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:Jk};return m.token=e,m}function eD(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=Zk[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function tD(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function nD(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(BT(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}else return[r,{}]}function rD(e){let t=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},n=null,r;return AT(e.z)||(n=pO.create(e.z)),AT(e.Z)||(n||=new DO(e.Z),r=e.Z),AT(e.q)||(e.M=(e.q-1)*3+1),AT(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),AT(e.u)||(e.S=qT(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}function iD(){return Qk||=uA.fromMillis(1555555555555),Qk}function aD(e,t){if(e.literal)return e;let n=lD(nk.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function oD(e,t){return Array.prototype.concat(...e.map(e=>aD(e,t)))}function sD(e,t,n){return new $k(e,n).explainFromTokens(t)}function cD(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=sD(e,t,n);return[r,i,a,o]}function lD(e,t){if(!e)return null;let n=nk.create(t,e).dtFormatter(iD()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>eD(t,e,i))}function uD(e){return new HO(`unsupported zone`,`the zone "${e.name}" is not supported`)}function dD(e){return e.weekData===null&&(e.weekData=xT(e.c)),e.weekData}function fD(e){return e.localWeekData===null&&(e.localWeekData=xT(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function pD(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new uA({...n,...t,old:n})}function mD(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function hD(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function gD(e,t,n){return mD(QT(e),t,n)}function _D(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,ZT(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=Wk.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=mD(QT(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function vD(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=uA.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}else return uA.invalid(new HO(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function yD(e,t,n=!0){return e.isValid?nk.create(TO.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function bD(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=WT(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=WT(e.c.month),n===`month`)return i;i+=`-`}else if(i+=WT(e.c.month),n===`month`)return i;return i+=WT(e.c.day),i}function xD(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=WT(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=WT(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=WT(e.c.second))}else{if(c+=WT(e.c.minute),o===`minute`)break;s&&(c+=WT(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=WT(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=WT(Math.trunc(-e.o/60)),c+=`:`,c+=WT(Math.trunc(-e.o%60))):(c+=`+`,c+=WT(Math.trunc(e.o/60)),c+=`:`,c+=WT(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}function SD(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new PD(e);return t}function CD(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return SD(e)}}function wD(e){if(cA===void 0&&(cA=VO.now()),e.type!==`iana`)return e.offset(cA);let t=e.name,n=lA.get(t);return n===void 0&&(n=e.offset(cA),lA.set(t,n)),n}function TD(e,t){let n=fT(t.zone,VO.defaultZone);if(!n.isValid)return uA.invalid(uD(n));let r=TO.fromObject(t),i,a;if(AT(e.year))i=VO.now();else{for(let t of aA)AT(e[t])&&(e[t]=nA[t]);let t=OT(e)||kT(e);if(t)return uA.invalid(t);let r=wD(n);[i,a]=gD(e,r,n)}return new uA({ts:i,zone:n,loc:r,o:a})}function ED(e,t,n){let r=AT(n.round)?!0:n.round,i=AT(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=JT(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(o(n.unit),n.unit);for(let e of n.units){let t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function DD(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}function OD(e){if(uA.isDateTime(e))return e;if(e&&e.valueOf&&jT(e.valueOf()))return uA.fromJSDate(e);if(e&&typeof e==`object`)return uA.fromObject(e);throw new FD(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var kD,AD,jD,MD,ND,PD,FD,ID,q,LD,RD,zD,BD,VD,HD,UD,WD,GD,KD,qD,JD,YD,XD,ZD,QD,$D,eO,tO,nO,rO,iO,aO,oO,sO,cO,lO,uO,dO,fO,pO,mO,hO,gO,_O,vO,yO,bO,xO,SO,CO,wO,TO,EO,DO,OO,kO,AO,jO,MO,NO,PO,FO,IO,LO,RO,zO,BO,VO,HO,UO,WO,GO,KO,qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck,lk,uk,dk,fk,pk,mk,hk,gk,_k,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk,Rk,zk,Bk,Vk,Hk,Uk,Wk,Gk,Kk,qk,Jk,Yk,Xk,Zk,Qk,$k,eA,tA,nA,rA,iA,aA,oA,sA,cA,lA,uA,dA=t((()=>{kD=class extends Error{},AD=class extends kD{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},jD=class extends kD{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},MD=class extends kD{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},ND=class extends kD{},PD=class extends kD{constructor(e){super(`Invalid unit ${e}`)}},FD=class extends kD{},ID=class extends kD{constructor(){super(`Zone is an abstract class`)}},q=`numeric`,LD=`short`,RD=`long`,zD={year:q,month:q,day:q},BD={year:q,month:LD,day:q},VD={year:q,month:LD,day:q,weekday:LD},HD={year:q,month:RD,day:q},UD={year:q,month:RD,day:q,weekday:RD},WD={hour:q,minute:q},GD={hour:q,minute:q,second:q},KD={hour:q,minute:q,second:q,timeZoneName:LD},qD={hour:q,minute:q,second:q,timeZoneName:RD},JD={hour:q,minute:q,hourCycle:`h23`},YD={hour:q,minute:q,second:q,hourCycle:`h23`},XD={hour:q,minute:q,second:q,hourCycle:`h23`,timeZoneName:LD},ZD={hour:q,minute:q,second:q,hourCycle:`h23`,timeZoneName:RD},QD={year:q,month:q,day:q,hour:q,minute:q},$D={year:q,month:q,day:q,hour:q,minute:q,second:q},eO={year:q,month:LD,day:q,hour:q,minute:q},tO={year:q,month:LD,day:q,hour:q,minute:q,second:q},nO={year:q,month:LD,day:q,weekday:LD,hour:q,minute:q},rO={year:q,month:RD,day:q,hour:q,minute:q,timeZoneName:LD},iO={year:q,month:RD,day:q,hour:q,minute:q,second:q,timeZoneName:LD},aO={year:q,month:RD,day:q,weekday:RD,hour:q,minute:q,timeZoneName:RD},oO={year:q,month:RD,day:q,weekday:RD,hour:q,minute:q,second:q,timeZoneName:RD},sO=class{get type(){throw new ID}get name(){throw new ID}get ianaName(){return this.name}get isUniversal(){throw new ID}offsetName(e,t){throw new ID}formatOffset(e,t){throw new ID}offset(e){throw new ID}equals(e){throw new ID}get isValid(){throw new ID}},cO=null,lO=class e extends sO{static get instance(){return cO===null&&(cO=new e),cO}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return nE(e,t,n)}formatOffset(e,t){return oE(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},uO=new Map,dO={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6},fO=new Map,pO=class e extends sO{static create(t){let n=fO.get(t);return n===void 0&&fO.set(t,n=new e(t)),n}static resetCache(){fO.clear(),uO.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return nE(e,t,n,this.name)}formatOffset(e,t){return oE(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=Xw(this.name),[r,i,a,o,s,c,l]=n.formatToParts?Qw(n,t):Zw(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=QT({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:l,millisecond:0}),d=+t,f=d%1e3;return d-=f>=0?f:1e3+f,(u-d)/(60*1e3)}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},mO={},hO=new Map,gO=new Map,_O=new Map,vO=null,yO=new Map,bO=new Map,xO=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=tT(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else return WT(this.floor?Math.floor(e):JT(e,3),this.padTo)}},SO=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&pO.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=eT(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}else return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},CO=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&FT()&&(this.rtf=nT(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):hE(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},wO={firstDay:1,minimalDays:4,weekend:[6,7]},TO=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,i,a=!1){let o=t||VO.defaultLocale;return new e(o||(a?`en-US`:rT()),n||VO.defaultNumberingSystem,r||VO.defaultOutputCalendar,VT(i)||VO.defaultWeekSettings,o)}static resetCache(){vO=null,hO.clear(),gO.clear(),_O.clear(),yO.clear(),bO.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return e.create(t,n,r,i)}constructor(e,t,n,r,i){let[a,o,s]=oT(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=sT(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=dT(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,VT(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return uT(this,e,cE,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=cT(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return uT(this,e,lE,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=lT(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return uT(this,void 0,()=>ZO,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[uA.utc(2016,11,13,9),uA.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return uT(this,e,uE,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[uA.utc(-40,1,1),uA.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new xO(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new SO(e,this.intl,t)}relFormatter(e={}){return new CO(this.intl,this.isEnglish(),e)}listFormatter(e={}){return $w(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||iT(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:IT()?aT(this.locale):wO}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},EO=null,DO=class e extends sO{static get utcInstance(){return EO===null&&(EO=new e(0)),EO}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(rE(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${oE(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${oE(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return oE(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},OO=class extends sO{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}},kO={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},AO={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},jO=kO.hanidec.replace(/[\[|\]]/g,``).split(``),MO=new Map,NO=()=>Date.now(),PO=`system`,FO=null,IO=null,LO=null,RO=60,BO=null,VO=class{static get now(){return NO}static set now(e){NO=e}static set defaultZone(e){PO=e}static get defaultZone(){return fT(PO,lO.instance)}static get defaultLocale(){return FO}static set defaultLocale(e){FO=e}static get defaultNumberingSystem(){return IO}static set defaultNumberingSystem(e){IO=e}static get defaultOutputCalendar(){return LO}static set defaultOutputCalendar(e){LO=e}static get defaultWeekSettings(){return BO}static set defaultWeekSettings(e){BO=VT(e)}static get twoDigitCutoffYear(){return RO}static set twoDigitCutoffYear(e){RO=e%100}static get throwOnInvalid(){return zO}static set throwOnInvalid(e){zO=e}static resetCaches(){TO.resetCache(),pO.resetCache(),uA.resetCache(),mT()}},HO=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},UO=[0,31,59,90,120,151,181,212,243,273,304,334],WO=[0,31,60,91,121,152,182,213,244,274,305,335],GO=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],KO=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],qO=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],JO=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],YO=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],XO=[`M`,`T`,`W`,`T`,`F`,`S`,`S`],ZO=[`AM`,`PM`],QO=[`Before Christ`,`Anno Domini`],$O=[`BC`,`AD`],ek=[`B`,`A`],tk={D:zD,DD:BD,DDD:HD,DDDD:UD,t:WD,tt:GD,ttt:KD,tttt:qD,T:JD,TT:YD,TTT:XD,TTTT:ZD,f:QD,ff:eO,fff:rO,ffff:aO,F:$D,FF:tO,FFF:iO,FFFF:oO},nk=class e{static create(t,n={}){return new e(t,n)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return tk[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return WT(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(t,n){let r=this.loc.listingMode()===`en`,i=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,a=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&t.offset===0&&e.allowZ?`Z`:t.isValid?t.zone.formatOffset(t.ts,e.format):``,s=()=>r?dE(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?pE(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?fE(t,e):a(n?{weekday:e}:{weekday:e,month:`long`,day:`numeric`},`weekday`),u=n=>{let r=e.macroTokenToFormatOpts(n);return r?this.formatWithSystemDefault(t,r):n},d=e=>r?mE(t,e):a({era:e},`era`);return gE(e.parseFormat(n),e=>{switch(e){case`S`:return this.num(t.millisecond);case`u`:case`SSS`:return this.num(t.millisecond,3);case`s`:return this.num(t.second);case`ss`:return this.num(t.second,2);case`uu`:return this.num(Math.floor(t.millisecond/10),2);case`uuu`:return this.num(Math.floor(t.millisecond/100));case`m`:return this.num(t.minute);case`mm`:return this.num(t.minute,2);case`h`:return this.num(t.hour%12==0?12:t.hour%12);case`hh`:return this.num(t.hour%12==0?12:t.hour%12,2);case`H`:return this.num(t.hour);case`HH`:return this.num(t.hour,2);case`Z`:return o({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return o({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return o({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return t.zone.offsetName(t.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return t.zone.offsetName(t.ts,{format:`long`,locale:this.loc.locale});case`z`:return t.zoneName;case`a`:return s();case`d`:return i?a({day:`numeric`},`day`):this.num(t.day);case`dd`:return i?a({day:`2-digit`},`day`):this.num(t.day,2);case`c`:return this.num(t.weekday);case`ccc`:return l(`short`,!0);case`cccc`:return l(`long`,!0);case`ccccc`:return l(`narrow`,!0);case`E`:return this.num(t.weekday);case`EEE`:return l(`short`,!1);case`EEEE`:return l(`long`,!1);case`EEEEE`:return l(`narrow`,!1);case`L`:return i?a({month:`numeric`,day:`numeric`},`month`):this.num(t.month);case`LL`:return i?a({month:`2-digit`,day:`numeric`},`month`):this.num(t.month,2);case`LLL`:return c(`short`,!0);case`LLLL`:return c(`long`,!0);case`LLLLL`:return c(`narrow`,!0);case`M`:return i?a({month:`numeric`},`month`):this.num(t.month);case`MM`:return i?a({month:`2-digit`},`month`):this.num(t.month,2);case`MMM`:return c(`short`,!1);case`MMMM`:return c(`long`,!1);case`MMMMM`:return c(`narrow`,!1);case`y`:return i?a({year:`numeric`},`year`):this.num(t.year);case`yy`:return i?a({year:`2-digit`},`year`):this.num(t.year.toString().slice(-2),2);case`yyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,4);case`yyyyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,6);case`G`:return d(`short`);case`GG`:return d(`long`);case`GGGGG`:return d(`narrow`);case`kk`:return this.num(t.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(t.weekYear,4);case`W`:return this.num(t.weekNumber);case`WW`:return this.num(t.weekNumber,2);case`n`:return this.num(t.localWeekNumber);case`nn`:return this.num(t.localWeekNumber,2);case`ii`:return this.num(t.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(t.localWeekYear,4);case`o`:return this.num(t.ordinal);case`ooo`:return this.num(t.ordinal,3);case`q`:return this.num(t.quarter);case`qq`:return this.num(t.quarter,2);case`X`:return this.num(Math.floor(t.ts/1e3));case`x`:return this.num(t.ts);default:return u(e)}})}formatDurationFromString(t,n){let r=this.opts.signMode===`negativeLargestOnly`?-1:1,i=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},a=(e,t)=>n=>{let a=i(n);if(a){let i=t.isNegativeDuration&&a!==t.largestUnit?r:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&a!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(a)*i,n.length,o)}else return n},o=e.parseFormat(n),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),c=t.shiftTo(...s.map(i).filter(e=>e));return gE(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},rk=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,ik=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ak=`(?:${ik.source}?(?:\\[(${rk.source})\\])?)?`,ok=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,sk=RegExp(`${ok.source}${ak}`),ck=RegExp(`(?:[Tt]${sk.source})?`),lk=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,uk=/(\d{4})-?W(\d\d)(?:-?(\d))?/,dk=/(\d{4})-?(\d{3})/,fk=bE(`weekYear`,`weekNumber`,`weekDay`),pk=bE(`year`,`ordinal`),mk=/(\d{4})-(\d\d)-(\d\d)/,hk=RegExp(`${ok.source} ?(?:${ik.source}|(${rk.source}))?`),gk=RegExp(`(?: ${hk.source})?`),_k=RegExp(`^T?${ok.source}$`),vk=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/,yk={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480},bk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/,xk=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Sk=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ck=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/,wk=_E(lk,ck),Tk=_E(uk,ck),Ek=_E(dk,ck),Dk=_E(sk),Ok=vE(SE,CE,wE,TE),kk=vE(fk,CE,wE,TE),Ak=vE(pk,CE,wE,TE),jk=vE(CE,wE,TE),Mk=vE(CE),Nk=_E(mk,gk),Pk=_E(hk),Fk=vE(CE,wE,TE),Ik=`Invalid Duration`,Lk={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Rk={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...Lk},zk=146097/400,Bk=146097/4800,Vk={years:{quarters:4,months:12,weeks:zk/7,days:zk,hours:zk*24,minutes:zk*24*60,seconds:zk*24*60*60,milliseconds:zk*24*60*60*1e3},quarters:{months:3,weeks:zk/28,days:zk/4,hours:zk*24/4,minutes:zk*24*60/4,seconds:zk*24*60*60/4,milliseconds:zk*24*60*60*1e3/4},months:{weeks:Bk/7,days:Bk,hours:Bk*24,minutes:Bk*24*60,seconds:Bk*24*60*60,milliseconds:Bk*24*60*60*1e3},...Lk},Hk=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],Uk=Hk.slice(0).reverse(),Wk=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?Vk:Rk;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||TO.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,n){return e.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(typeof t!=`object`||!t)throw new FD(`Duration.fromObject: argument expected to be an object, got ${t===null?`null`:typeof t}`);return new e({values:aE(t,e.normalizeUnit),loc:TO.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(jT(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==`object`)return e.fromObject(t);throw new FD(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){let[r]=FE(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){let[r]=IE(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new FD(`need to specify a reason the Duration is invalid`);let r=t instanceof HO?t:new HO(t,n);if(VO.throwOnInvalid)throw new MD(r);return new e({invalid:r})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new PD(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?nk.create(this.loc,n).formatDurationFromString(this,e):Ik}toHuman(e={}){if(!this.isValid)return Ik;let t=e.showZeros!==!1,n=Hk.map(n=>{let r=this.values[n];return AT(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=JT(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},uA.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?zE(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t),r={};for(let e of Hk)(BT(n.values,e)||BT(this.values,e))&&(r[e]=n.get(e)+this.get(e));return RE(this,{values:r},!0)}minus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=iE(e(this.values[n],n));return RE(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...aE(t,e.normalizeUnit)};return RE(this,{values:n})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return RE(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return BE(this.matrix,e),RE(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=VE(this.normalize().shiftToAll().toObject());return RE(this,{values:e},!0)}shiftTo(...t){if(!this.isValid||t.length===0)return this;t=t.map(t=>e.normalizeUnit(t));let n={},r={},i=this.toObject(),a;for(let e of Hk)if(t.indexOf(e)>=0){a=e;let t=0;for(let n in r)t+=this.matrix[n][e]*r[n],r[n]=0;jT(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else jT(i[e])&&(r[e]=i[e]);for(let e in r)r[e]!==0&&(n[a]+=e===a?r[e]:r[e]/this.matrix[a][e]);return BE(this.matrix,n),RE(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return RE(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=VE(this.values);return RE(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let n of Hk)if(!t(this.values[n],e.values[n]))return!1;return!0}},Gk=`Invalid Interval`,Kk=class e{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new FD(`need to specify a reason the Interval is invalid`);let r=t instanceof HO?t:new HO(t,n);if(VO.throwOnInvalid)throw new jD(r);return new e({invalid:r})}static fromDateTimes(t,n){let r=OD(t),i=OD(n);return HE(r,i)??new e({start:r,end:i})}static after(t,n){let r=Wk.fromDurationLike(n),i=OD(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=Wk.fromDurationLike(n),i=OD(t);return e.fromDateTimes(i.minus(r),i)}static fromISO(t,n){let[r,i]=(t||``).split(`/`,2);if(r&&i){let t,a;try{t=uA.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=uA.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=Wk.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=Wk.fromISO(r,n);if(t.isValid)return e.before(o,t)}}return e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:t,end:n}={}){return this.isValid?e.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];let n=t.map(OD).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[],{s:i}=this,a=0;for(;i<this.e;){let t=n[a]||this.e,o=+t>+this.e?this.e:t;r.push(e.fromDateTimes(i,o)),i=o,a+=1}return r}splitBy(t){let n=Wk.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as(`milliseconds`)===0)return[];let{s:r}=this,i=1,a,o=[];for(;r<this.e;){let t=this.start.plus(n.mapUnits(e=>e*i));a=+t>+this.e?this.e:t,o.push(e.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(t){if(!this.isValid)return this;let n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:e.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;let n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(t){let n=null,r=0,i=[],a=t.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),o=Array.prototype.concat(...a).sort((e,t)=>e.time-t.time);for(let t of o)r+=t.type===`s`?1:-1,r===1?n=t.time:(n&&+n!=+t.time&&i.push(e.fromDateTimes(n,t.time)),n=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Gk}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=zD,t={}){return this.isValid?nk.create(this.s.loc.clone(t),e).formatInterval(this):Gk}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Gk}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Gk}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Gk}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Gk}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Wk.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},qk=class{static hasDST(e=VO.defaultZone){let t=uA.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return pO.isValidZone(e)}static normalizeZone(e){return fT(e,VO.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||TO.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||TO.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||TO.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||TO.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||TO.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||TO.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||TO.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return TO.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return TO.create(t,null,`gregory`).eras(e)}static features(){return{relative:FT(),localeWeek:IT()}}},Jk=`missing Intl.DateTimeFormat.formatToParts support`,Yk=`[ \xA0]`,Xk=new RegExp(Yk,`g`),Zk={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}},Qk=null,$k=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=oD(nk.parseFormat(t),e),this.units=this.tokens.map(t=>$E(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=tD(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=nD(e,this.regex,this.handlers),[r,i,a]=n?rD(n):[null,null,void 0];if(BT(n,`a`)&&BT(n,`H`))throw new ND(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}},eA=`Invalid DateTime`,tA=864e13,nA={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rA={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},iA={ordinal:1,hour:0,minute:0,second:0,millisecond:0},aA=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],oA=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],sA=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`],lA=new Map,uA=class e{constructor(e){let t=e.zone||VO.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new HO(`invalid input`):null)||(t.isValid?null:uD(t));this.ts=AT(e.ts)?VO.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=jT(e.o)&&!e.old?e.o:t.offset(this.ts);r=hD(this.ts,a),n=Number.isNaN(r.year)?new HO(`invalid input`):null,r=n?null:r,i=n?null:a}this._zone=t,this.loc=e.loc||TO.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[e,t]=DD(arguments),[n,r,i,a,o,s,c]=t;return TD({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=DD(arguments),[n,r,i,a,o,s,c]=t;return e.zone=DO.utcInstance,TD({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=PT(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=fT(n.zone,VO.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:TO.fromObject(n)}):e.invalid(uD(i))}static fromMillis(t,n={}){if(!jT(t))throw new FD(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>tA?e.invalid(`Timestamp out of range`):new e({ts:t,zone:fT(n.zone,VO.defaultZone),loc:TO.fromObject(n)})}static fromSeconds(t,n={}){if(jT(t))return new e({ts:t*1e3,zone:fT(n.zone,VO.defaultZone),loc:TO.fromObject(n)});throw new FD(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=fT(n.zone,VO.defaultZone);if(!r.isValid)return e.invalid(uD(r));let i=TO.fromObject(n),a=aE(t,CD),{minDaysInFirstWeek:o,startOfWeek:s}=TT(a,i),c=VO.now(),l=AT(n.specificOffset)?r.offset(c):n.specificOffset,u=!AT(a.ordinal),d=!AT(a.year),f=!AT(a.month)||!AT(a.day),p=d||f,m=a.weekYear||a.weekNumber;if((p||u)&&m)throw new ND(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(f&&u)throw new ND(`Can't mix ordinal dates with month/day`);let h=m||a.weekday&&!p,g,_,v=hD(c,l);h?(g=oA,_=rA,v=xT(v,o,s)):u?(g=sA,_=iA,v=CT(v)):(g=aA,_=nA);let y=!1;for(let e of g){let t=a[e];AT(t)?y?a[e]=_[e]:a[e]=v[e]:y=!0}let b=(h?ET(a,o,s):u?DT(a):OT(a))||kT(a);if(b)return e.invalid(b);let[x,S]=gD(h?ST(a,o,s):u?wT(a):a,l,r),C=new e({ts:x,zone:r,o:S,loc:i});return a.weekday&&p&&t.weekday!==C.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${a.weekday} and a date of ${C.toISO()}`):C.isValid?C:e.invalid(C.invalid)}static fromISO(e,t={}){let[n,r]=ME(e);return vD(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=NE(e);return vD(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=PE(e);return vD(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(AT(t)||AT(n))throw new FD(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,s,c,l]=cD(TO.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return l?e.invalid(l):vD(o,s,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return e.fromFormat(t,n,r)}static fromSQL(e,t={}){let[n,r]=LE(e);return vD(n,r,t,`SQL`,e)}static invalid(t,n=null){if(!t)throw new FD(`need to specify a reason the DateTime is invalid`);let r=t instanceof HO?t:new HO(t,n);if(VO.throwOnInvalid)throw new AD(r);return new e({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=lD(e,TO.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return oD(nk.parseFormat(e),TO.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){cA=void 0,lA.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?dD(this).weekYear:NaN}get weekNumber(){return this.isValid?dD(this).weekNumber:NaN}get weekday(){return this.isValid?dD(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?fD(this).weekday:NaN}get localWeekNumber(){return this.isValid?fD(this).weekNumber:NaN}get localWeekYear(){return this.isValid?fD(this).weekYear:NaN}get ordinal(){return this.isValid?CT(this.c).ordinal:NaN}get monthShort(){return this.isValid?qk.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?qk.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?qk.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?qk.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=QT(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,l=hD(s,a),u=hD(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[pD(this,{ts:s}),pD(this,{ts:c})]:[this]}get isInLeapYear(){return YT(this.year)}get daysInMonth(){return ZT(this.year,this.month)}get daysInYear(){return this.isValid?XT(this.year):NaN}get weeksInWeekYear(){return this.isValid?eE(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?eE(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=nk.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(DO.instance(e),t)}toLocal(){return this.setZone(VO.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=fT(t,VO.defaultZone),t.equals(this.zone))return this;if(t.isValid){let e=this.ts;if(n||r){let n=t.offset(this.ts),r=this.toObject();[e]=gD(r,n,t)}return pD(this,{ts:e,zone:t})}else return e.invalid(uD(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return pD(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=aE(e,CD),{minDaysInFirstWeek:n,startOfWeek:r}=TT(t,this.loc),i=!AT(t.weekYear)||!AT(t.weekNumber)||!AT(t.weekday),a=!AT(t.ordinal),o=!AT(t.year),s=!AT(t.month)||!AT(t.day),c=o||s,l=t.weekYear||t.weekNumber;if((c||a)&&l)throw new ND(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(s&&a)throw new ND(`Can't mix ordinal dates with month/day`);let u;i?u=ST({...xT(this.c,n,r),...t},n,r):AT(t.ordinal)?(u={...this.toObject(),...t},AT(t.day)&&(u.day=Math.min(ZT(u.year,u.month),u.day))):u=wT({...CT(this.c),...t});let[d,f]=gD(u,this.o,this.zone);return pD(this,{ts:d,o:f})}plus(e){if(!this.isValid)return this;let t=Wk.fromDurationLike(e);return pD(this,_D(this,t))}minus(e){if(!this.isValid)return this;let t=Wk.fromDurationLike(e).negate();return pD(this,_D(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=Wk.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0;break}if(r===`weeks`)if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?nk.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):eA}toLocaleString(e=zD,t={}){return this.isValid?nk.create(this.loc.clone(t),e).formatDateTime(this):eA}toLocaleParts(e={}){return this.isValid?nk.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=SD(a);let o=e===`extended`,s=bD(this,o,a);return aA.indexOf(a)>=3&&(s+=`T`),s+=xD(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?bD(this,e===`extended`,SD(t)):null}toISOWeekDate(){return yD(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=SD(o),(r&&aA.indexOf(o)>=3?`T`:``)+xD(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return yD(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return yD(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?bD(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),yD(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():eA}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return Wk.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=LT(t).map(Wk.normalizeUnit),a=e.valueOf()>this.valueOf(),o=GE(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(t=`milliseconds`,n={}){return this.diff(e.now(),t,n)}until(e){return this.isValid?Kk.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(t={}){if(!this.isValid)return null;let n=t.base||e.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0,i=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),ED(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?ED(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new FD(`min requires all arguments be DateTimes`);return RT(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new FD(`max requires all arguments be DateTimes`);return RT(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return sD(TO.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(t,n,r={}){return e.fromFormatExplain(t,n,r)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new $k(TO.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(AT(t)||AT(n))throw new FD(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=TO.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new FD(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:s,zone:c,specificOffset:l,invalidReason:u}=n.explainFromTokens(t);return u?e.invalid(u):vD(s,c,r,`format ${n.format}`,t,l)}static get DATE_SHORT(){return zD}static get DATE_MED(){return BD}static get DATE_MED_WITH_WEEKDAY(){return VD}static get DATE_FULL(){return HD}static get DATE_HUGE(){return UD}static get TIME_SIMPLE(){return WD}static get TIME_WITH_SECONDS(){return GD}static get TIME_WITH_SHORT_OFFSET(){return KD}static get TIME_WITH_LONG_OFFSET(){return qD}static get TIME_24_SIMPLE(){return JD}static get TIME_24_WITH_SECONDS(){return YD}static get TIME_24_WITH_SHORT_OFFSET(){return XD}static get TIME_24_WITH_LONG_OFFSET(){return ZD}static get DATETIME_SHORT(){return QD}static get DATETIME_SHORT_WITH_SECONDS(){return $D}static get DATETIME_MED(){return eO}static get DATETIME_MED_WITH_SECONDS(){return tO}static get DATETIME_MED_WITH_WEEKDAY(){return nO}static get DATETIME_FULL(){return rO}static get DATETIME_FULL_WITH_SECONDS(){return iO}static get DATETIME_HUGE(){return aO}static get DATETIME_HUGE_WITH_SECONDS(){return oO}}}));function fA(){try{let e=Intl.supportedValuesOf?.(`timeZone`);if(e&&e.length)return e}catch{}return vA}function pA(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`}catch{return`UTC`}}function mA(e){if(!e)return`never`;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function hA(e){if(!e)return`—`;let t=uA.fromISO(e);return t.isValid?t.toRelative()??mA(e):mA(e)}function gA(e){return e.runningSince?`running`:e.lastStatus===`success`?`ok`:e.lastStatus===`failed`?`failed`:null}var _A,J,vA,yA,bA,xA,SA=t((()=>{_A=e(A()),dA(),at(),jb(),Ze(),J=j(),vA=`UTC.Pacific/Midway.Pacific/Honolulu.America/Anchorage.America/Los_Angeles.America/Denver.America/Chicago.America/New_York.America/Sao_Paulo.Atlantic/Azores.Europe/London.Europe/Paris.Europe/Berlin.Europe/Moscow.Africa/Cairo.Africa/Johannesburg.Asia/Dubai.Asia/Karachi.Asia/Kolkata.Asia/Dhaka.Asia/Bangkok.Asia/Jakarta.Asia/Shanghai.Asia/Singapore.Asia/Tokyo.Asia/Seoul.Australia/Sydney.Pacific/Auckland`.split(`.`),yA=e=>e===0?7:e,bA=e=>e%7,xA=_A.memo(function({listCronJobs:e,addCronJob:t,removeCronJob:n,setCronJobEnabled:r,workspacePath:i}){let[a,o]=(0,_A.useState)([]),[s,c]=(0,_A.useState)(!1),[l,u]=(0,_A.useState)(``),[d,f]=(0,_A.useState)(``),[p,m]=(0,_A.useState)(``),[h,g]=(0,_A.useState)(``),[_,v]=(0,_A.useState)(``),[y,b]=(0,_A.useState)(i||``),[x,S]=(0,_A.useState)(!1),[C,w]=(0,_A.useState)(!1),[T,E]=(0,_A.useState)(null),[D,O]=(0,_A.useState)(`daily`),[ee,te]=(0,_A.useState)(`08:00`),[ne,k]=(0,_A.useState)([1]),[re,ie]=(0,_A.useState)(1),[ae,oe]=(0,_A.useState)(``),[se,ce]=(0,_A.useState)(pA),le=(0,_A.useMemo)(fA,[]);(0,_A.useEffect)(()=>{if(D===`custom`)return;let[e,t]=ee.split(`:`).map(e=>parseInt(e,10)),n=Number.isFinite(e)?e:8,r=Number.isFinite(t)?t:0,i=uA.now().setZone(se);if(i.isValid){if(D===`daily`){let e=i.set({hour:n,minute:r,second:0,millisecond:0}).toUTC();g(`${e.minute} ${e.hour} * * *`)}else if(D===`weekly`){if(!ne.length){let e=i.set({hour:n,minute:r,second:0,millisecond:0}).toUTC();g(`${e.minute} ${e.hour} * * *`);return}let e=ne.map(e=>{let t=(yA(e)-i.weekday+7)%7;return i.plus({days:t}).set({hour:n,minute:r,second:0,millisecond:0}).toUTC()}),t=[...new Set(e.map(e=>bA(e.weekday)))].sort((e,t)=>e-t);g(`${e[0].minute} ${e[0].hour} * * ${t.join(`,`)}`)}else if(D===`monthly`){let e=i.set({day:re,hour:n,minute:r,second:0,millisecond:0}).toUTC();if(!e.isValid)return;g(`${e.minute} ${e.hour} ${e.day} * *`)}else if(D===`once`){if(!ae){g(``);return}let[e,t,i]=ae.split(`-`).map(e=>parseInt(e,10)),a=uA.fromObject({year:e,month:t,day:i,hour:n,minute:r},{zone:se}).toUTC();if(!a.isValid)return;g(`0 ${a.minute} ${a.hour} ${a.day} ${a.month} * ${a.year}`)}}},[D,ee,ne,re,ae,se]);let ue=e=>{k(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort())},de=()=>{m(``),g(``),v(``),O(`daily`),te(`08:00`),k([1]),ie(1),oe(``)},fe=async()=>{c(!0),u(``);try{o(await e())}catch(e){console.error(`Failed to fetch cron jobs:`,e),u(`Failed to load scheduled tasks`)}finally{c(!1)}};(0,_A.useEffect)(()=>{fe()},[]),(0,_A.useEffect)(()=>{b(i||``)},[i]);let pe=async e=>{if(e.preventDefault(),!(!p.trim()||!h.trim()||!_.trim())){S(!0);try{await t({name:p.trim(),schedule:h.trim(),task:_.trim(),workspace:y.trim()||i||`.`}),de(),w(!1),fe()}catch(e){console.error(`Failed to add scheduled task:`,e),alert(e?.message||`Error saving scheduled task. Check the cron expression.`)}finally{S(!1)}}},me=async(e,t)=>{if(window.confirm(`Remove scheduled task "${t}"?`))try{await n(e),E(t=>t?.id===e?null:t),fe()}catch(e){console.error(`Failed to remove scheduled task:`,e),alert(`Error removing scheduled task`)}},he=async e=>{try{await r(e.id,!e.enabled),fe()}catch(e){console.error(`Failed to toggle scheduled task:`,e),alert(`Error updating scheduled task`)}},ge=a.filter(e=>{let t=d.toLowerCase();return e.name.toLowerCase().includes(t)||e.task.toLowerCase().includes(t)||e.schedule.toLowerCase().includes(t)});return(0,J.jsxs)(`div`,{className:`management-container`,children:[(0,J.jsxs)(`div`,{className:`management-header`,children:[(0,J.jsxs)(`div`,{className:`management-title-group`,children:[(0,J.jsxs)(`h1`,{className:`management-title`,children:[(0,J.jsx)(`span`,{className:`management-title-icon`,style:{display:`inline-flex`,alignItems:`center`},children:Ie(22,`var(--accent)`)}),`Scheduled Tasks`]}),(0,J.jsx)(`p`,{className:`management-subtitle`,children:`Tasks that run on a schedule in the background.`})]}),(0,J.jsxs)(`button`,{type:`button`,className:`management-primary-btn`,onClick:()=>w(!0),children:[(0,J.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,J.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,J.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`New Scheduled Task`]})]}),(0,J.jsx)(`div`,{className:`management-control-bar`,children:(0,J.jsxs)(`div`,{className:`management-search-wrapper`,children:[(0,J.jsx)(`input`,{type:`text`,className:`management-search-input`,placeholder:`Search scheduled tasks...`,value:d,onChange:e=>f(e.target.value)}),(0,J.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,J.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,J.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]})}),l&&(0,J.jsx)(`div`,{className:`management-error-banner`,children:l}),s?(0,J.jsx)(`div`,{className:`mgmt-empty`,children:`Loading…`}):ge.length===0?(0,J.jsxs)(`div`,{className:`mgmt-empty`,children:[(0,J.jsx)(`p`,{children:d?`No scheduled tasks match your search.`:`No scheduled tasks.`}),!d&&(0,J.jsxs)(`p`,{children:[`Add one above, or run `,(0,J.jsx)(`code`,{children:`mint cron add`}),` in chat.`]})]}):(0,J.jsx)(`div`,{className:`mgmt-list`,children:ge.map(e=>{let t=gA(e);return(0,J.jsxs)(`div`,{className:`mgmt-row${e.enabled?``:` is-disabled`}`,onClick:()=>E(e),children:[(0,J.jsxs)(`div`,{className:`mgmt-row-main`,children:[(0,J.jsx)(`div`,{className:`mgmt-row-title`,children:e.name}),(0,J.jsxs)(`div`,{className:`mgmt-row-meta`,children:[(0,J.jsx)(`code`,{children:e.schedule}),(0,J.jsx)(`span`,{className:`mgmt-row-sep`,children:`·`}),(0,J.jsxs)(`span`,{children:[`next `,hA(e.nextRun)]}),t&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`mgmt-row-sep`,children:`·`}),(0,J.jsx)(`span`,{className:`mgmt-status ${t}`,children:t})]})]})]}),(0,J.jsxs)(`label`,{className:`settings-toggle-switch`,onClick:e=>e.stopPropagation(),children:[(0,J.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:()=>he(e)}),(0,J.jsx)(`span`,{className:`settings-toggle-slider`})]})]},e.id)})}),T&&(0,J.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>E(null),children:(0,J.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,J.jsxs)(`div`,{className:`management-modal-header`,children:[(0,J.jsxs)(`div`,{className:`management-card-title-group`,children:[ht(44),(0,J.jsx)(`h2`,{className:`management-modal-title`,children:T.name})]}),(0,J.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>E(null),children:`✕`})]}),(0,J.jsxs)(`div`,{className:`management-modal-body`,children:[(0,J.jsx)(`p`,{style:{color:`var(--text-soft, #d1d1d4)`,lineHeight:1.55,margin:0},children:T.task}),(0,J.jsxs)(`div`,{className:`mgmt-detail-grid`,children:[(0,J.jsx)(`span`,{children:`Schedule`}),(0,J.jsxs)(`code`,{children:[T.schedule,` `,(0,J.jsx)(`span`,{style:{opacity:.55},children:`UTC`})]}),(0,J.jsx)(`span`,{children:`Next run`}),(0,J.jsx)(`span`,{children:mA(T.nextRun)}),T.runningSince&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{children:`Running since`}),(0,J.jsx)(`span`,{children:mA(T.runningSince)})]}),(0,J.jsx)(`span`,{children:`Last run`}),(0,J.jsxs)(`span`,{children:[mA(T.lastRunAt),gA(T)&&(0,J.jsx)(`span`,{className:`mgmt-status ${gA(T)}`,style:{marginLeft:`8px`},children:gA(T)})]})]}),T.lastSummary&&(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`label`,{className:`management-label`,style:{display:`block`,marginBottom:`8px`},children:`Last response`}),(0,J.jsx)(`div`,{className:`mgmt-prose`,children:Eb(T.lastSummary)})]})]}),(0,J.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,J.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,J.jsx)(`input`,{type:`checkbox`,checked:T.enabled,onChange:()=>he(T)}),(0,J.jsx)(`span`,{className:`settings-toggle-slider`})]}),(0,J.jsx)(`button`,{type:`button`,className:`management-action-btn danger`,onClick:()=>me(T.id,T.name),children:`Remove`})]})]})}),C&&(0,J.jsx)(`div`,{className:`management-modal-overlay`,children:(0,J.jsxs)(`div`,{className:`management-modal`,children:[(0,J.jsxs)(`div`,{className:`management-modal-header`,children:[(0,J.jsx)(`h2`,{className:`management-modal-title`,children:`New Scheduled Task`}),(0,J.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>w(!1),children:`✕`})]}),(0,J.jsxs)(`form`,{onSubmit:pe,children:[(0,J.jsxs)(`div`,{className:`management-modal-body`,children:[(0,J.jsxs)(`div`,{className:`management-form-group`,children:[(0,J.jsx)(`label`,{className:`management-label`,children:`Name`}),(0,J.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. Morning stock report`,value:p,onChange:e=>m(e.target.value),required:!0})]}),(0,J.jsxs)(`div`,{className:`management-form-group`,children:[(0,J.jsx)(`label`,{className:`management-label`,children:`When to run`}),(0,J.jsxs)(`div`,{className:`schedule-inline-row`,children:[(0,J.jsxs)(`select`,{className:`management-input-field schedule-repeat-select`,value:D,onChange:e=>O(e.target.value),children:[(0,J.jsx)(`option`,{value:`daily`,children:`Daily`}),(0,J.jsx)(`option`,{value:`weekly`,children:`Weekly`}),(0,J.jsx)(`option`,{value:`monthly`,children:`Monthly`}),(0,J.jsx)(`option`,{value:`once`,children:`One-time`}),(0,J.jsx)(`option`,{value:`custom`,children:`Custom (cron)`})]}),D===`weekly`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`schedule-inline-word`,children:`on`}),(0,J.jsx)(`div`,{className:`schedule-weekday-circles`,children:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`].map((e,t)=>(0,J.jsx)(`button`,{type:`button`,className:`management-pill-btn-circle ${ne.includes(t)?`active`:``}`,onClick:()=>ue(t),title:e,children:e[0]},e))})]}),D===`monthly`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`span`,{className:`schedule-inline-word`,children:`on day`}),(0,J.jsx)(`input`,{type:`number`,min:1,max:31,className:`management-input-field schedule-day-input`,value:re,onChange:e=>ie(Math.min(31,Math.max(1,parseInt(e.target.value,10)||1))),required:!0})]}),D===`once`&&(0,J.jsx)(`input`,{type:`date`,className:`management-input-field schedule-day-input`,value:ae,onChange:e=>oe(e.target.value),required:!0})]}),D!==`custom`&&(0,J.jsxs)(`div`,{className:`schedule-inline-row`,style:{marginTop:`10px`},children:[(0,J.jsx)(`span`,{className:`schedule-inline-word`,children:`around`}),(0,J.jsx)(`input`,{type:`time`,className:`management-input-field schedule-time-input`,value:ee,onChange:e=>te(e.target.value),required:!0}),(0,J.jsx)(`select`,{className:`management-input-field schedule-timezone-select`,value:se,onChange:e=>ce(e.target.value),children:le.map(e=>(0,J.jsx)(`option`,{value:e,children:e},e))})]})]}),D===`custom`&&(0,J.jsxs)(`div`,{className:`management-form-group`,children:[(0,J.jsx)(`label`,{className:`management-label`,children:`Schedule (cron expression, UTC)`}),(0,J.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`0 8 * * * (every day at 08:00 UTC)`,value:h,onChange:e=>g(e.target.value),required:!0})]}),D!==`custom`&&(0,J.jsxs)(`div`,{style:{fontSize:`0.78rem`,color:`var(--text-muted, #94a3b8)`},children:[`Cron (UTC): `,(0,J.jsx)(`code`,{children:h||`—`})]}),(0,J.jsxs)(`div`,{className:`management-form-group`,children:[(0,J.jsx)(`label`,{className:`management-label`,children:`Task / prompt`}),(0,J.jsx)(`textarea`,{className:`management-textarea-field`,placeholder:`Fetch today's stock prices and summarize them.`,value:_,onChange:e=>v(e.target.value),required:!0,rows:4})]}),(0,J.jsxs)(`div`,{className:`management-form-group`,children:[(0,J.jsx)(`label`,{className:`management-label`,children:`Workspace path`}),(0,J.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`Defaults to the current workspace`,value:y,onChange:e=>b(e.target.value)})]})]}),(0,J.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,J.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>w(!1),children:`Cancel`}),(0,J.jsx)(`button`,{type:`submit`,disabled:x,className:`management-primary-btn`,children:x?`Saving...`:`Create Task`})]})]})]})})]})})})),CA,Y,wA,TA=t((()=>{CA=e(A()),at(),Ze(),Y=j(),wA=CA.memo(function({listLinkedFolders:e,addLinkedFolder:t,removeLinkedFolder:n,selectFolder:r}){let[i,a]=(0,CA.useState)([]),[o,s]=(0,CA.useState)(!1),[c,l]=(0,CA.useState)(``),[u,d]=(0,CA.useState)(``),[f,p]=(0,CA.useState)(``),[m,h]=(0,CA.useState)(``),[g,_]=(0,CA.useState)(``),[v,y]=(0,CA.useState)(!1),[b,x]=(0,CA.useState)(!1),[S,C]=(0,CA.useState)(null),w=async()=>{s(!0),l(``);try{let t=await e();a(Object.values(t||{}))}catch(e){console.error(`Failed to fetch linked folders:`,e),l(`Failed to load linked folders`)}finally{s(!1)}};(0,CA.useEffect)(()=>{w()},[]);let T=async e=>{if(e.preventDefault(),!(!f.trim()||!m.trim())){y(!0);try{await t({name:f.trim(),path:m.trim(),description:g.trim()||void 0}),p(``),h(``),_(``),x(!1),w()}catch(e){console.error(`Failed to add linked folder:`,e),alert(e?.message||`Error linking folder. Check the path is allowed and exists.`)}finally{y(!1)}}},E=async()=>{if(r)try{let e=await r();e&&h(e)}catch(e){console.error(`Failed to open folder picker:`,e)}},D=async e=>{if(window.confirm(`Unlink folder "${e}"? (The folder and its notes are not deleted.)`))try{await n(e),C(t=>t?.name===e?null:t),w()}catch(e){console.error(`Failed to remove linked folder:`,e),alert(`Error unlinking folder`)}},O=i.filter(e=>{let t=u.toLowerCase();return e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)||(e.description||``).toLowerCase().includes(t)});return(0,Y.jsxs)(`div`,{className:`management-container`,children:[(0,Y.jsxs)(`div`,{className:`management-header`,children:[(0,Y.jsxs)(`div`,{className:`management-title-group`,children:[(0,Y.jsxs)(`h1`,{className:`management-title`,children:[(0,Y.jsx)(`span`,{className:`management-title-icon`,style:{display:`inline-flex`,alignItems:`center`},children:Ye(22,`var(--accent)`)}),`Linked Folders`]}),(0,Y.jsxs)(`p`,{className:`management-subtitle`,children:[`Mint drops a note into `,(0,Y.jsx)(`code`,{children:`mint-notes/`}),` when a chat matches a linked folder's topic.`]})]}),(0,Y.jsxs)(`button`,{type:`button`,className:`management-primary-btn`,onClick:()=>x(!0),children:[(0,Y.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,Y.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,Y.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`Link a Folder`]})]}),(0,Y.jsx)(`div`,{className:`management-control-bar`,children:(0,Y.jsxs)(`div`,{className:`management-search-wrapper`,children:[(0,Y.jsx)(`input`,{type:`text`,className:`management-search-input`,placeholder:`Search linked folders...`,value:u,onChange:e=>d(e.target.value)}),(0,Y.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,Y.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,Y.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]})}),c&&(0,Y.jsx)(`div`,{className:`management-error-banner`,children:c}),o?(0,Y.jsx)(`div`,{className:`mgmt-empty`,children:`Loading…`}):O.length===0?(0,Y.jsxs)(`div`,{className:`mgmt-empty`,children:[(0,Y.jsx)(`p`,{children:u?`No linked folders match your search.`:`No linked folders yet.`}),!u&&(0,Y.jsxs)(`p`,{children:[`Link one above, or run `,(0,Y.jsx)(`code`,{children:`mint link add`}),` in chat.`]})]}):(0,Y.jsx)(`div`,{className:`mgmt-list`,children:O.map(e=>(0,Y.jsx)(`div`,{className:`mgmt-row`,onClick:()=>C(e),children:(0,Y.jsxs)(`div`,{className:`mgmt-row-main`,children:[(0,Y.jsx)(`div`,{className:`mgmt-row-title`,children:e.name}),(0,Y.jsx)(`div`,{className:`mgmt-row-sub`,children:e.path})]})},e.name))}),S&&(0,Y.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>C(null),children:(0,Y.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,Y.jsxs)(`div`,{className:`management-modal-header`,children:[(0,Y.jsxs)(`div`,{className:`management-card-title-group`,children:[Mt(44),(0,Y.jsx)(`h2`,{className:`management-modal-title`,children:S.name})]}),(0,Y.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>C(null),children:`✕`})]}),(0,Y.jsxs)(`div`,{className:`management-modal-body`,children:[(0,Y.jsx)(`p`,{style:{color:`var(--text-soft, #d1d1d4)`,lineHeight:1.55,margin:0},children:S.description||`No description`}),(0,Y.jsxs)(`div`,{className:`mgmt-detail-grid`,children:[(0,Y.jsx)(`span`,{children:`Path`}),(0,Y.jsx)(`code`,{children:S.path}),(0,Y.jsx)(`span`,{children:`Notes`}),(0,Y.jsxs)(`code`,{children:[S.path.replace(/\/$/,``),`/mint-notes/`]})]})]}),(0,Y.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,Y.jsx)(`span`,{}),(0,Y.jsx)(`button`,{type:`button`,className:`management-action-btn danger`,onClick:()=>D(S.name),children:`Unlink`})]})]})}),b&&(0,Y.jsx)(`div`,{className:`management-modal-overlay`,children:(0,Y.jsxs)(`div`,{className:`management-modal`,children:[(0,Y.jsxs)(`div`,{className:`management-modal-header`,children:[(0,Y.jsx)(`h2`,{className:`management-modal-title`,children:`Link a Folder`}),(0,Y.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>x(!1),children:`✕`})]}),(0,Y.jsxs)(`form`,{onSubmit:T,children:[(0,Y.jsxs)(`div`,{className:`management-modal-body`,children:[(0,Y.jsxs)(`div`,{className:`management-form-group`,children:[(0,Y.jsx)(`label`,{className:`management-label`,children:`Name`}),(0,Y.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. Food`,value:f,onChange:e=>p(e.target.value),required:!0})]}),(0,Y.jsxs)(`div`,{className:`management-form-group`,children:[(0,Y.jsx)(`label`,{className:`management-label`,children:`Folder path`}),(0,Y.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[(0,Y.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`~/notes/food`,value:m,onChange:e=>h(e.target.value),required:!0,style:{flex:1}}),r&&(0,Y.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:E,children:`Browse...`})]})]}),(0,Y.jsxs)(`div`,{className:`management-form-group`,children:[(0,Y.jsx)(`label`,{className:`management-label`,children:`Description (helps topic matching)`}),(0,Y.jsx)(`textarea`,{className:`management-textarea-field`,placeholder:`restaurant reviews and recipes`,value:g,onChange:e=>_(e.target.value),rows:3})]})]}),(0,Y.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,Y.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>x(!1),children:`Cancel`}),(0,Y.jsx)(`button`,{type:`submit`,disabled:v,className:`management-primary-btn`,children:v?`Linking...`:`Link Folder`})]})]})]})})]})})})),EA,X,DA,OA=t((()=>{EA=e(A()),Ze(),at(),lt(),kt(),h(),Iv(),X=j(),DA=EA.memo(function({config:e,updateField:t,mcpName:n,setMcpName:r,mcpCmd:i,setMcpCmd:a,mcpArgs:o,setMcpArgs:s,mcpEnv:c,setMcpEnv:l,mcpIcon:u=``,setMcpIcon:d,handleAddMcpServer:f,handleRemoveMcpServer:p,detectTools:m,onReauth:h,listServerTools:g}){let[_,v]=(0,EA.useState)({docker:!1,git:!1,gh:!1,node:!1}),[y,b]=(0,EA.useState)(null),[x,S]=(0,EA.useState)(!1),[C,w]=(0,EA.useState)(!1),[T,E]=(0,EA.useState)(!1),[D,O]=(0,EA.useState)(``),[ee,te]=(0,EA.useState)({}),[ne,k]=(0,EA.useState)(`url`),[re,ie]=(0,EA.useState)(``),[ae,oe]=(0,EA.useState)(`none`),[se,ce]=(0,EA.useState)(``),[le,ue]=(0,EA.useState)(``),[de,fe]=(0,EA.useState)(`idle`),[pe,me]=(0,EA.useState)(``),[ge,_e]=(0,EA.useState)(!1);(0,EA.useEffect)(()=>{m&&m().then(e=>e&&v(e)).catch(()=>{})},[m]);let ve=(n,r,i,a)=>{let o={...e.mcpServers||{}};o[n]?o[n]={...o[n],disabled:!r}:r&&i&&(o[n]={command:i,args:a||[],env:{},disabled:!1}),t(`mcpServers`,o)},ye=(n,r,i)=>{let a={...e.mcpServers||{}};a[n]&&(a[n]={...a[n],[r]:i},t(`mcpServers`,a))},be=[];Object.entries(e.mcpServers||{}).forEach(([e,t])=>{let n=`plug`;e===`docker`&&(n=`docker`),(e===`git`||e===`github`)&&(n=`git`),t.url&&(n=`globe`);let r=!!t.url,i=r?`URL: ${t.url}`:`Command: ${t.command} ${(t.args||[]).join(` `)}`;be.push({name:e,command:t.command||``,args:t.args||[],icon:n,customIcon:t.icon,isEnabled:t?.disabled!==!0,isConfigured:!0,isRemote:r,url:t.url,description:i})}),_.docker&&!e.mcpServers?.docker&&be.push({name:`docker`,command:`npx`,args:[`-y`,`@proxeus/mcp-docker-server`],icon:`🐳`,isEnabled:!1,isConfigured:!1,isRemote:!1,description:`Docker MCP Server (Auto Discovered)`}),_.git&&!e.mcpServers?.git&&be.push({name:`git`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-git`],icon:`🐙`,isEnabled:!1,isConfigured:!1,isRemote:!1,description:`Git MCP Server (Auto Discovered)`});let xe=be.filter(e=>e.name.toLowerCase().includes(D.toLowerCase())||e.command.toLowerCase().includes(D.toLowerCase())||(e.url||``).toLowerCase().includes(D.toLowerCase())||(e.description||``).toLowerCase().includes(D.toLowerCase())),Se=be.filter(e=>e.isEnabled),Ce=async e=>{if(h){te(t=>({...t,[e]:`running`}));try{let t=await h(e);te(n=>({...n,[e]:t?`success`:`error`}))}catch{te(t=>({...t,[e]:`error`}))}finally{setTimeout(()=>{te(t=>({...t,[e]:`idle`}))},2500)}}};return(0,X.jsxs)(`div`,{className:`management-container`,children:[(0,X.jsxs)(`div`,{className:`management-header`,children:[(0,X.jsxs)(`div`,{className:`management-title-group`,children:[(0,X.jsxs)(`h1`,{className:`management-title`,children:[(0,X.jsx)(`span`,{className:`management-title-icon`,style:{display:`inline-flex`,alignItems:`center`},children:Pe(22,`var(--accent)`)}),`MCP Servers`]}),(0,X.jsx)(`p`,{className:`management-subtitle`,children:`Connect external tool servers.`})]}),(0,X.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,X.jsxs)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>w(!0),children:[(0,X.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,X.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,X.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`MCP catalog`]}),(0,X.jsxs)(`button`,{type:`button`,className:`management-primary-btn`,onClick:()=>S(!0),children:[(0,X.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,X.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,X.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`Add MCP Server`]})]})]}),(0,X.jsx)(`div`,{className:`management-control-bar`,children:(0,X.jsxs)(`div`,{className:`management-search-wrapper`,style:{maxWidth:`400px`},children:[(0,X.jsx)(`input`,{type:`text`,className:`management-search-input`,placeholder:`Search MCP servers...`,value:D,onChange:e=>O(e.target.value)}),(0,X.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,X.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,X.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]})}),Se.length>0&&(0,X.jsxs)(`div`,{className:`management-installed-section`,children:[(0,X.jsx)(`h2`,{className:`management-section-title`,children:`Installed`}),(0,X.jsx)(`div`,{className:`management-installed-row`,children:Se.map(e=>(0,X.jsx)(`button`,{type:`button`,className:`management-plugin-avatar`,title:e.name,onClick:()=>b(e.name),children:jt(e.name,e.customIcon)},e.name))})]}),(0,X.jsx)(`h2`,{className:`management-section-title`,children:`All Servers`}),xe.length===0?(0,X.jsxs)(`div`,{className:`mgmt-empty`,children:[(0,X.jsx)(`p`,{children:D?`No MCP servers match your search.`:`No MCP servers yet.`}),!D&&(0,X.jsxs)(`p`,{children:[`Add one above, or run `,(0,X.jsx)(`code`,{children:`mint mcp add`}),` in a terminal.`]})]}):(0,X.jsx)(`div`,{className:`mgmt-row-stack`,children:xe.map(e=>(0,X.jsxs)(`div`,{className:`management-plugin-row`,onClick:()=>b(e.name),children:[(0,X.jsx)(`div`,{className:`management-card-icon`,style:{background:`rgba(255, 255, 255, 0.06)`,borderColor:`rgba(255, 255, 255, 0.08)`},children:jt(e.name,e.customIcon)}),(0,X.jsxs)(`div`,{className:`management-plugin-info`,children:[(0,X.jsxs)(`div`,{className:`management-plugin-name`,children:[e.name,e.isRemote&&(0,X.jsxs)(`span`,{className:`management-badge remote`,style:{fontSize:`0.72rem`,padding:`2px 7px`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:[(0,X.jsx)(Y_,{size:11}),` Remote`]}),(0,X.jsx)(`span`,{className:`management-dot ${e.isEnabled?`connected`:``}`,title:e.isEnabled?`Active`:`Inactive`})]}),(0,X.jsx)(`div`,{className:`management-plugin-desc`,style:{fontFamily:`monospace`},children:e.description})]}),e.isEnabled?(0,X.jsx)(`button`,{type:`button`,className:`management-plugin-icon-btn`,title:`View details`,onClick:t=>{t.stopPropagation(),b(e.name)},children:(0,X.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,X.jsx)(`circle`,{cx:`5`,cy:`12`,r:`2`}),(0,X.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2`}),(0,X.jsx)(`circle`,{cx:`19`,cy:`12`,r:`2`})]})}):(0,X.jsx)(`button`,{type:`button`,className:`management-plugin-icon-btn`,title:`Enable`,onClick:t=>{t.stopPropagation(),ve(e.name,!0,e.command,e.args),b(e.name)},children:(0,X.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,children:[(0,X.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,X.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]})})]},e.name))}),y&&(()=>{let n=be.find(e=>e.name===y);if(!n)return null;let r=e.mcpServers?.[n.name]||{command:n.command,args:n.args,env:{},icon:n.customIcon};return(0,X.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>b(null),children:(0,X.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,X.jsxs)(`div`,{className:`management-modal-header`,children:[(0,X.jsxs)(`div`,{className:`management-card-title-group`,children:[(0,X.jsx)(`div`,{className:`management-card-icon`,style:{width:44,height:44,background:`rgba(255, 255, 255, 0.06)`,borderColor:`rgba(255, 255, 255, 0.08)`},children:jt(n.name,n.customIcon)}),(0,X.jsx)(`h2`,{className:`management-modal-title`,children:n.name})]}),(0,X.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>b(null),children:`✕`})]}),(0,X.jsxs)(`div`,{className:`management-modal-body`,children:[(0,X.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,flexWrap:`wrap`},children:[(0,X.jsxs)(`label`,{className:`settings-toggle-switch`,title:n.isEnabled?`Disable server`:`Enable server`,children:[(0,X.jsx)(`input`,{type:`checkbox`,checked:n.isEnabled,onChange:e=>ve(n.name,e.target.checked,n.command,n.args)}),(0,X.jsx)(`span`,{className:`settings-toggle-slider`})]}),(0,X.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`var(--text-muted, #94a3b8)`},children:n.isEnabled?`Enabled`:`Disabled`}),!n.isConfigured&&(0,X.jsx)(`span`,{className:`management-tag workspace`,style:{marginLeft:`auto`},children:`Discovered`})]}),n.isConfigured&&(0,X.jsxs)(`div`,{style:{marginTop:`20px`,paddingTop:`16px`,borderTop:`1px solid var(--border, rgba(255, 255, 255, 0.08))`},children:[(0,X.jsx)(`h4`,{style:{fontSize:`0.8rem`,fontWeight:600,color:`var(--accent, #3b82f6)`,textTransform:`uppercase`,letterSpacing:`0.5px`,margin:`0 0 12px`},children:`Server Config`}),r.url?(0,X.jsxs)(`div`,{style:{display:`grid`,gap:`12px`},children:[(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Server URL`}),(0,X.jsx)(`span`,{className:`management-badge remote`,style:{fontSize:`0.7rem`},children:`SSE Transport`})]}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,value:r.url||``,onChange:e=>ye(n.name,`url`,e.target.value)})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Custom Headers (JSON)`}),(0,X.jsx)(`textarea`,{className:`management-textarea-field`,value:typeof r.headers==`object`?JSON.stringify(r.headers,null,2):r.headers||``,onChange:e=>{try{let t=JSON.parse(e.target.value);ye(n.name,`headers`,t)}catch{}},rows:3,placeholder:`{"Authorization": "Bearer ..."}`})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Icon (preset / URL / SVG)`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. globe, search, database`,value:r.icon||``,onChange:e=>ye(n.name,`icon`,e.target.value)})]})]}):(0,X.jsxs)(`div`,{style:{display:`grid`,gap:`12px`},children:[(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Command`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,value:r.command||``,onChange:e=>ye(n.name,`command`,e.target.value)})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Arguments (space-separated)`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,value:(r.args||[]).join(` `),onChange:e=>ye(n.name,`args`,e.target.value.split(/\s+/).filter(Boolean))})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Icon (preset / URL / SVG)`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. search, database, code`,value:r.icon||``,onChange:e=>ye(n.name,`icon`,e.target.value)})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Environment Variables (JSON)`}),(0,X.jsx)(`textarea`,{className:`management-textarea-field`,value:typeof r.env==`object`?JSON.stringify(r.env,null,2):r.env||``,onChange:e=>{try{let t=JSON.parse(e.target.value);ye(n.name,`env`,t)}catch{}},rows:3})]})]}),(0,X.jsx)(st,{serverName:n.name,config:e,updateField:t,listServerTools:g})]})]}),(0,X.jsxs)(`div`,{className:`management-modal-footer`,children:[n.isConfigured&&h?(0,X.jsxs)(`span`,{style:{fontSize:`0.8rem`,color:`var(--text-muted, #94a3b8)`},children:[ee[n.name]===`success`&&`Done ✓`,ee[n.name]===`error`&&`Re-authentication failed`]}):(0,X.jsx)(`span`,{}),(0,X.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[n.isConfigured&&h&&(0,X.jsx)(`button`,{type:`button`,className:`management-action-btn`,disabled:ee[n.name]===`running`,onClick:()=>Ce(n.name),children:ee[n.name]===`running`?`Re-authenticating...`:`Re-authenticate`}),n.isConfigured&&(0,X.jsx)(`button`,{type:`button`,className:`management-action-btn danger`,onClick:()=>{p(n.name),b(null)},children:`Remove`})]})]})]})})})(),x&&(0,X.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>S(!1),children:(0,X.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,X.jsxs)(`div`,{className:`management-modal-header`,children:[(0,X.jsx)(`h2`,{className:`management-modal-title`,children:`Add New MCP Server`}),(0,X.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>S(!1),children:`✕`})]}),(0,X.jsxs)(`form`,{onSubmit:i=>{if(i.preventDefault(),ne===`url`){if(!n.trim()||!re.trim()){alert(`Please provide a server name and URL.`);return}if(!ge){alert(`Please acknowledge the security risks of connecting to a custom remote MCP server.`);return}let i;if(ae===`bearer`&&se.trim())i={Authorization:se.trim().startsWith(`Bearer `)?se.trim():`Bearer ${se.trim()}`};else if(ae===`custom`&&le.trim())try{i=JSON.parse(le.trim())}catch{alert(`Invalid JSON in Custom Headers field.`);return}let a=n.trim(),o={...e.mcpServers||{}};o[a]={url:re.trim(),headers:i,transport:`sse`,disabled:!1,icon:u?.trim()||void 0},t(`mcpServers`,o),T&&t(`allowedMcpTools`,{...e.allowedMcpTools||{},[a]:[`*`]}),r(``),ie(``),ce(``),ue(``),fe(`idle`),me(``),_e(!1),E(!1),S(!1)}else f(T),E(!1),S(!1)},children:[(0,X.jsxs)(`div`,{className:`management-modal-body`,children:[(0,X.jsxs)(`div`,{className:`mcp-server-type-toggle`,children:[(0,X.jsxs)(`button`,{type:`button`,className:`mcp-toggle-btn ${ne===`url`?`active`:``}`,onClick:()=>{k(`url`),fe(`idle`),me(``)},children:[(0,X.jsx)(Y_,{size:15}),` Remote Server (URL / SSE)`]}),(0,X.jsxs)(`button`,{type:`button`,className:`mcp-toggle-btn ${ne===`command`?`active`:``}`,onClick:()=>{k(`command`),fe(`idle`),me(``)},children:[(0,X.jsx)(yv,{size:15}),` Local Command (stdio)`]})]}),ne===`url`?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:`12px`},children:[(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Server Name`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. cloud-mcp`,value:n,onChange:e=>r(e.target.value),required:!0})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Authentication`}),(0,X.jsxs)(`select`,{className:`management-input-field`,value:ae,onChange:e=>{oe(e.target.value),fe(`idle`),me(``)},style:{cursor:`pointer`},children:[(0,X.jsx)(`option`,{value:`none`,children:`None (Public)`}),(0,X.jsx)(`option`,{value:`bearer`,children:`Bearer Token`}),(0,X.jsx)(`option`,{value:`custom`,children:`Custom Headers (JSON)`})]})]})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Server URL`}),(0,X.jsx)(`input`,{type:`url`,className:`management-input-field`,placeholder:`https://example.com/sse or http://localhost:8000/sse`,value:re,onChange:e=>{ie(e.target.value),fe(`idle`),me(``)},required:!0})]}),ae===`bearer`&&(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Bearer Token`}),(0,X.jsx)(`input`,{type:`password`,className:`management-input-field`,placeholder:`Paste API token or JWT...`,value:se,onChange:e=>{ce(e.target.value),fe(`idle`),me(``)}})]}),ae===`custom`&&(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Custom HTTP Headers (JSON)`}),(0,X.jsx)(`textarea`,{className:`management-textarea-field`,placeholder:`{"Authorization": "Bearer ...", "X-Custom-Auth": "secret"}`,value:le,onChange:e=>{ue(e.target.value),fe(`idle`),me(``)},rows:3})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Icon (Optional)`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. globe, cloud, database, search`,value:u,onChange:e=>d&&d(e.target.value)})]}),(0,X.jsxs)(`div`,{className:`mcp-test-row`,children:[(0,X.jsx)(`button`,{type:`button`,className:`mcp-test-btn`,onClick:async()=>{if(!re.trim()){fe(`error`),me(`Please enter a server URL first.`);return}let e;if(ae===`bearer`)se.trim()&&(e={Authorization:se.trim().startsWith(`Bearer `)?se.trim():`Bearer ${se.trim()}`});else if(ae===`custom`&&le.trim())try{e=JSON.parse(le.trim())}catch{fe(`error`),me(`Invalid JSON in Custom Headers field.`);return}fe(`testing`),me(`Connecting to MCP server...`);try{let t=await he(re.trim(),e);t.ok?(fe(`success`),me(`Connected: ${t.server_info?.name||`Remote Server`} (${t.tools_count??0} tools discovered)`)):(fe(`error`),me(`Connection failed: ${t.error||`Server unreachable`}`))}catch(e){fe(`error`),me(`Connection failed: ${e?.message||String(e)}`)}},disabled:de===`testing`||!re.trim(),children:de===`testing`?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(iv,{size:13,className:`mcp-spin`}),` Testing...`]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Pv,{size:13}),` Test Connection`]})}),pe&&(0,X.jsxs)(`span`,{className:`mcp-test-status ${de}`,children:[de===`success`&&(0,X.jsx)(p_,{size:13}),de===`error`&&(0,X.jsx)(y_,{size:13}),pe]})]}),(0,X.jsxs)(`div`,{className:`mcp-security-notice`,children:[(0,X.jsxs)(`div`,{className:`mcp-security-header`,children:[(0,X.jsx)(pv,{size:16,className:`mcp-security-icon`}),(0,X.jsx)(`span`,{children:`Custom MCP servers introduce security risks`})]}),(0,X.jsx)(`div`,{className:`mcp-security-body`,children:(0,X.jsxs)(`label`,{className:`mcp-security-ack`,children:[(0,X.jsx)(`input`,{type:`checkbox`,className:`mint-custom-checkbox`,checked:ge,onChange:e=>_e(e.target.checked)}),(0,X.jsxs)(`span`,{className:`mcp-security-ack-text`,children:[(0,X.jsx)(`strong`,{children:`I understand the risks and wish to proceed`}),(0,X.jsx)(`span`,{className:`mcp-security-subtext`,children:`External endpoints can execute tools and receive prompt context. Malicious servers could attempt to access sensitive information or trigger unintended actions. Only connect to endpoints you trust.`})]})]})})]})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:`12px`},children:[(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Server Name`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. google-search`,value:n,onChange:e=>r(e.target.value),required:!0})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Command`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. npx`,value:i,onChange:e=>a(e.target.value),required:!0})]})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Arguments`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. -y @modelcontextprotocol/server-brave-search`,value:o,onChange:e=>s(e.target.value)})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Icon (Optional)`}),(0,X.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. search, database, cloud, code`,value:u,onChange:e=>d&&d(e.target.value)})]}),(0,X.jsxs)(`div`,{className:`management-form-group`,children:[(0,X.jsx)(`label`,{className:`management-label`,children:`Environment Variables (JSON)`}),(0,X.jsx)(`textarea`,{className:`management-textarea-field`,placeholder:`e.g. {"BRAVE_API_KEY": "your_key_here"}`,value:c,onChange:e=>l(e.target.value),rows:3})]})]}),(0,X.jsxs)(`label`,{className:`mcp-allow-all-row`,children:[(0,X.jsx)(`input`,{type:`checkbox`,className:`mint-custom-checkbox`,checked:T,onChange:e=>E(e.target.checked)}),(0,X.jsxs)(`span`,{className:`mcp-allow-all-text`,children:[(0,X.jsx)(`span`,{className:`mcp-allow-all-title`,children:`Allow the agent to call all of this server’s tools (*)`}),(0,X.jsx)(`span`,{className:`mcp-allow-all-desc`,children:`Leave off to approve tools one by one afterwards.`})]})]})]}),(0,X.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,X.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>S(!1),children:`Cancel`}),(0,X.jsx)(`button`,{type:`submit`,className:`management-primary-btn`,disabled:ne===`url`&&!ge,children:`Add Server`})]})]})]})}),C&&(0,X.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>w(!1),children:(0,X.jsxs)(`div`,{className:`management-modal mcp-catalog-modal`,onClick:e=>e.stopPropagation(),children:[(0,X.jsxs)(`div`,{className:`management-modal-header`,children:[(0,X.jsx)(`h2`,{className:`management-modal-title`,children:`MCP Catalog`}),(0,X.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>w(!1),children:`✕`})]}),(0,X.jsx)(`div`,{className:`management-modal-body`,children:(0,X.jsx)(gt,{configuredNames:Object.keys(e.mcpServers||{}),onPick:(e,t,n)=>{k(`command`),r(e.key),a(e.command),s([...e.args||[],...t].join(` `)),l(Object.keys(n).length?JSON.stringify(n,null,2):``),d&&d(e.icon||``),w(!1),S(!0)},showManualHint:!1})}),(0,X.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,X.jsx)(`span`,{}),(0,X.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>{w(!1),S(!0)},children:`Add manually instead`})]})]})})]})})})),kA,Z,AA,jA=t((()=>{kA=e(A()),Ze(),at(),Et(),vt(),Z=j(),AA=kA.memo(function({config:e,updateField:t,handleConnectPlugin:n}){let[r,i]=(0,kA.useState)([]),[a,o]=(0,kA.useState)(null),[s,c]=(0,kA.useState)(null),[l,u]=(0,kA.useState)(``),d=async()=>{try{i(await Dt())}catch(e){console.error(`Failed to fetch OAuth statuses:`,e)}};(0,kA.useEffect)(()=>{d();let e=rt(()=>{d()});return()=>{e()}},[]);let f=Nt,p=e=>{let t=f.find(t=>t.key===e);t&&c(t)},m=async(t,n)=>{if(t===`spotify`&&!e.spotifyClientId?.trim()){p(n||`spotify`),alert(`Please enter your Spotify Client ID below before signing in (get it from developer.spotify.com/dashboard)`);return}if(t===`github`&&!e.githubClientId?.trim()&&!e.githubToken?.trim()){p(n||`github`),alert(`Please enter your GitHub Client ID (or Personal Access Token) below before signing in.`);return}if(t===`vercel`&&!e.vercelClientId?.trim()&&!e.vercelToken?.trim()){p(n||`vercel`),alert(`Please enter your Vercel Client ID (or Access Token) below before signing in.`);return}if((t===`google`||t===`gmail`||t===`google_calendar`)&&!e.gmailClientId?.trim()&&!e.googleCalendarClientId?.trim()){p(n||`gmail`),alert(`Please enter your Google Client ID below before signing in.`);return}o(t);try{await ft(t)}catch(e){console.error(`OAuth login error for ${t}:`,e)}finally{o(null),d()}},h=async e=>{try{await wt(e),await d()}catch(t){console.error(`OAuth revoke error for ${e}:`,t)}},g=f.filter(e=>e.name.toLowerCase().includes(l.toLowerCase())||e.desc.toLowerCase().includes(l.toLowerCase())),_=f.filter(t=>ot(e,t));return(0,Z.jsxs)(`div`,{className:`management-container`,children:[(0,Z.jsx)(`div`,{className:`management-header`,children:(0,Z.jsxs)(`div`,{className:`management-title-group`,children:[(0,Z.jsxs)(`h1`,{className:`management-title`,children:[(0,Z.jsx)(`span`,{className:`management-title-icon`,style:{display:`inline-flex`,alignItems:`center`},children:Xe(22,`var(--accent)`)}),`Plugins`]}),(0,Z.jsx)(`p`,{className:`management-subtitle`,children:`Connect external services and accounts.`})]})}),(0,Z.jsx)(`div`,{className:`management-control-bar`,children:(0,Z.jsxs)(`div`,{className:`management-search-wrapper`,style:{maxWidth:`400px`},children:[(0,Z.jsx)(`input`,{type:`text`,className:`management-search-input`,placeholder:`Search plugins...`,value:l,onChange:e=>u(e.target.value)}),(0,Z.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,Z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,Z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]})}),_.length>0&&(0,Z.jsxs)(`div`,{className:`management-installed-section`,children:[(0,Z.jsx)(`h2`,{className:`management-section-title`,children:`Installed`}),(0,Z.jsx)(`div`,{className:`management-installed-row`,children:_.map(e=>(0,Z.jsx)(`button`,{type:`button`,className:`management-plugin-avatar`,title:e.name,onClick:()=>c(e),children:jt(e.key)},e.key))})]}),(0,Z.jsx)(`h2`,{className:`management-section-title`,children:`Recommended`}),(0,Z.jsx)(`div`,{className:`mgmt-row-stack`,children:g.map(n=>{let i=ot(e,n),a=!!(n.isOAuth?r.find(e=>e.provider===n.oauthProvider):void 0)?.connected;return(0,Z.jsxs)(`div`,{className:`management-plugin-row`,onClick:()=>c(n),children:[(0,Z.jsx)(`div`,{className:`management-card-icon`,style:{background:`rgba(255, 255, 255, 0.06)`,borderColor:`rgba(255, 255, 255, 0.08)`},children:jt(n.key)}),(0,Z.jsxs)(`div`,{className:`management-plugin-info`,children:[(0,Z.jsxs)(`div`,{className:`management-plugin-name`,children:[n.name,n.isOAuth&&(0,Z.jsx)(`span`,{className:`management-dot ${a?`connected`:``}`,title:a?`Connected`:`Not connected`})]}),(0,Z.jsx)(`div`,{className:`management-plugin-desc`,children:n.desc})]}),i?(0,Z.jsx)(`button`,{type:`button`,className:`management-plugin-icon-btn`,title:`View details`,onClick:e=>{e.stopPropagation(),c(n)},children:(0,Z.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,Z.jsx)(`circle`,{cx:`5`,cy:`12`,r:`2`}),(0,Z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2`}),(0,Z.jsx)(`circle`,{cx:`19`,cy:`12`,r:`2`})]})}):(0,Z.jsx)(`button`,{type:`button`,className:`management-plugin-icon-btn`,title:`Enable`,onClick:r=>{r.stopPropagation(),bt(e,n,!0,t),c(n)},children:(0,Z.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,children:[(0,Z.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,Z.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]})})]},n.key)})}),s&&(()=>{let n=s,i=ot(e,n),o=n.isOAuth?r.find(e=>e.provider===n.oauthProvider):void 0,l=!!o?.connected;return(0,Z.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>c(null),children:(0,Z.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,Z.jsxs)(`div`,{className:`management-modal-header`,children:[(0,Z.jsxs)(`div`,{className:`management-card-title-group`,children:[(0,Z.jsx)(`div`,{className:`management-card-icon`,style:{width:44,height:44,background:`rgba(255, 255, 255, 0.06)`,borderColor:`rgba(255, 255, 255, 0.08)`},children:jt(n.key)}),(0,Z.jsx)(`h2`,{className:`management-modal-title`,children:n.name})]}),(0,Z.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>c(null),children:`✕`})]}),(0,Z.jsxs)(`div`,{className:`management-modal-body`,children:[(0,Z.jsx)(`p`,{style:{color:`var(--text-soft, #d1d1d4)`,lineHeight:1.55},children:n.desc}),(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,marginTop:`16px`,flexWrap:`wrap`},children:[(0,Z.jsxs)(`label`,{className:`settings-toggle-switch`,title:i?`Disable plugin`:`Enable plugin`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:i,onChange:r=>bt(e,n,r.target.checked,t)}),(0,Z.jsx)(`span`,{className:`settings-toggle-slider`})]}),(0,Z.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`var(--text-muted, #94a3b8)`},children:i?`Enabled`:`Disabled`}),n.isOAuth&&(l?(0,Z.jsxs)(`button`,{type:`button`,className:`management-action-btn danger`,style:{marginLeft:`auto`},onClick:()=>h(n.oauthProvider),children:[`Disconnect`,o?.accountEmail?` (${o.accountEmail})`:``]}):(0,Z.jsx)(`button`,{type:`button`,className:`management-primary-btn`,style:{marginLeft:`auto`},onClick:()=>m(n.oauthProvider,n.key),disabled:a===n.oauthProvider,children:a===n.oauthProvider?`Signing In...`:`Sign In`}))]}),n.hasCredentials&&n.fields&&(0,Z.jsxs)(`div`,{style:{marginTop:`20px`,paddingTop:`16px`,borderTop:`1px solid var(--border, rgba(255, 255, 255, 0.08))`},children:[(0,Z.jsx)(`h4`,{style:{fontSize:`0.8rem`,fontWeight:600,color:`var(--accent, #10b981)`,textTransform:`uppercase`,letterSpacing:`0.5px`,margin:`0 0 12px`},children:`Credentials`}),(0,Z.jsx)(`div`,{style:{display:`grid`,gap:`12px`},children:n.fields.map(n=>(0,Z.jsxs)(`div`,{className:`management-form-group`,children:[(0,Z.jsx)(`label`,{className:`management-label`,children:n.label}),(0,Z.jsx)(`input`,{type:n.type,className:`management-input-field`,placeholder:n.placeholder,value:e[n.field]||``,onChange:e=>t(n.field,e.target.value)})]},n.field))})]})]})]})})})()]})})}));function MA(e){return{modelVisible:!1,scale:1,interactionEnabled:!1,showInteractionGuide:!1,isLocked:!1,layoutPreset:`chat-wide`,expressionIndex:0,accessoryIndex:0,modelReady:!0,proactiveSuggestion:null,setScale:void 0,setIsLocked:void 0,setExpressionIndex:void 0,setAccessoryIndex:void 0,setModelReady:void 0,toggleModel:void 0,changeLayoutPreset:void 0,updateInteractionEnabled:void 0,updateInteractionGuide:void 0,dismissProactiveSuggestion:void 0,handleProactiveAction:void 0}}var NA=t((()=>{}));function PA(){if(!(typeof window>`u`))try{window.localStorage.setItem(QA,Date.now().toString())}catch{}}function FA(){if(typeof window>`u`||!_())return!1;let e=window.localStorage.getItem(QA);if(!e)return!1;let t=parseInt(e,10);if(isNaN(t)||t<=0)return!1;let n=Date.now(),r=n-t;return r<0||r>$A?!1:new Date(t).toDateString()===new Date(n).toDateString()}function IA(e){if(!e)return``;try{return window.localStorage.getItem(tj(e))||``}catch{return``}}function LA(e,t){if(e)try{t?window.localStorage.setItem(tj(e),t):window.localStorage.removeItem(tj(e))}catch{}}function RA(){let e=Math.random().toString(36).slice(2,10);return`conversation-${Date.now().toString(36)}-${e}`}function zA(){if(typeof window>`u`)return null;let e=window.location.pathname||``,t=(window.location.hash||``).replace(/^#/,``),n=e||t,r=n.match(/^\/chat\/(.+)$/i)||n.match(/^\/c\/(.+)$/i);return r&&r[1]?decodeURIComponent(r[1]):new URLSearchParams(window.location.search).get(`id`)||null}function BA(){if(typeof window>`u`)return!0;let e=(window.location.pathname||``).replace(/\/+$/,``),t=(window.location.hash||``).replace(/^#\/?/,``).replace(/\/+$/,``),n=(e||t).toLowerCase();return zA()||n.includes(`skills`)||n.includes(`mcp`)||n.includes(`plugins`)||n.includes(`picture`)||n.includes(`image-studio`)||n.includes(`imagine`)||n.includes(`veo-studio`)||n.includes(`veo`)||n.includes(`settings`)?!1:!n||n===``||n===`/chat`||n===`chat`||n===`/index.html`||n===`index.html`}function VA(){let e=zA();if(e)return window.localStorage.setItem(ZA,e),PA(),e;if(_()&&FA()){let e=window.localStorage.getItem(ZA);if(e)return PA(),e===`conversation-default`?`cli`:e}if(BA()){let e=RA();return PA(),e}let t=window.localStorage.getItem(ZA);if(t===`conversation-default`)return window.localStorage.setItem(ZA,`cli`),PA(),`cli`;if(t)return PA(),t;let n=RA();return PA(),n}function HA(){if(typeof window>`u`)return`chat`;let e=(window.location.hash||``).toLowerCase().replace(/^#/,``),t=(window.location.pathname||``).toLowerCase(),n=e||t;return n.includes(`skills`)?`skills`:n.includes(`mcp`)?`mcp`:n.includes(`plugins`)?`plugins`:n.includes(`picture`)?`pictures`:n.includes(`image-studio`)||n.includes(`imagine`)?`imagine`:n.includes(`veo-studio`)||n.includes(`veo`)?`veo`:`chat`}function UA(e,t){return e===`skills`?`/skills`:e===`mcp`?`/mcp`:e===`plugins`?`/plugins`:e===`pictures`?`/pictures`:e===`imagine`?`/image-studio`:e===`veo`||e===`veo_studio`?`/veo-studio`:e===`settings`?`/settings`:t?`/chat/${encodeURIComponent(t)}`:`/chat`}function WA(e,t=120){let n=e.replace(/\s+/g,` `).trim();return n.length>t?`${n.slice(0,t)}…`:n}function GA(e){let t=Object.entries(e?.approval??{})[0],n=t?.[0],r=t?.[1];switch(n){case`WriteFile`:return`Write to ${r?.path}?`;case`ApplyPatch`:return`Edit ${r?.path}?`;case`RunShell`:return`Run: ${r?.command}`;case`NoteWrite`:return`Save note to ${r?.path}?`;case`RunPlugin`:return`Run plugin: ${r?.name}?`;case`McpTool`:return`Use ${r?.tool} on ${r?.server}?`;case`UserApproval`:return r?.title??`Approval needed`;case`AskUser`:return r?.question??`Mint has a question`;case`ExitPlanMode`:case`EnterPlanMode`:return`Plan mode change needs approval`;default:return`Mint needs your approval to continue`}}function KA(e){(document.hidden||!document.hasFocus())&&window.api?.notifyAiResponse?.(WA(GA(e)))}function qA(){let e=_(),[t,n]=(0,Q.useState)(HA),[r,a]=(0,Q.useState)(VA),[s,c]=(0,Q.useState)(()=>window.localStorage.getItem(XA)||``),[u,m]=(0,Q.useState)(!1),h=(e,t)=>{m(!1),n(n=>{let i=typeof e==`function`?e(n):e;if(i===`settings`)return window.api?.openSettings?window.api.openSettings():window.location.pathname!==`/settings`&&window.history.pushState({},``,`/settings`),n;let a=i===`veo_studio`?`veo`:i,o=UA(a,t||r);return typeof window<`u`&&window.location.pathname!==o&&window.history.pushState({},``,o),a})};(0,Q.useEffect)(()=>{let e=()=>{(window.location.hash===`#`||window.location.hash===`#/`)&&window.history.replaceState({},``,window.location.pathname+window.location.search);let e=(window.location.pathname||``).toLowerCase(),t=(window.location.hash||``).toLowerCase();if(e.includes(`/settings`)||t.includes(`/settings`))return;n(HA());let i=zA();i&&i!==r?(window.localStorage.setItem(ZA,i),a(i),g(50,i,s||null).then(e=>{let t=e.reverse();ce(t),Be(e=>Rt(e,t))})):!i&&BA()&&(a(RA()),ce([]),Be({}),j(``),Me(null),k(``),Je([]),$e(null),Re([]))};return window.addEventListener(`popstate`,e),window.addEventListener(`hashchange`,e),()=>{window.removeEventListener(`popstate`,e),window.removeEventListener(`hashchange`,e)}},[r,s]),(0,Q.useEffect)(()=>{PA();let e=()=>PA();return window.addEventListener(`beforeunload`,e),document.addEventListener(`visibilitychange`,e),window.addEventListener(`focus`,e),()=>{window.removeEventListener(`beforeunload`,e),document.removeEventListener(`visibilitychange`,e),window.removeEventListener(`focus`,e)}},[]);let[b,x]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(``),[O,k]=(0,Q.useState)(()=>IA(r)),ae=(0,Q.useRef)(!1),[oe,ce]=(0,Q.useState)([]),[ue,me]=(0,Q.useState)([]),[he,be]=(0,Q.useState)(!1),[we,Te]=(0,Q.useState)(``),[De,Oe]=(0,Q.useState)(0),[A,ke]=(0,Q.useState)(0),[Ae,j]=(0,Q.useState)(``),[je,Me]=(0,Q.useState)(null),[Pe,Fe]=(0,Q.useState)(null),[Ie,Re]=(0,Q.useState)([]),[ze,Be]=(0,Q.useState)({}),[Ve,He]=(0,Q.useState)({}),Ge=(0,Q.useRef)(!0),[qe,Je]=(0,Q.useState)([]),[Ye,Xe]=(0,Q.useState)([]),[Ze,$e]=(0,Q.useState)(null),[et,tt]=(0,Q.useState)(null),[nt,rt]=(0,Q.useState)(!1),it=(0,Q.useRef)(!1),[at,ot]=(0,Q.useState)(()=>window.localStorage.getItem(`mint:sidebar-collapsed`)===`true`),[st,ct]=(0,Q.useState)(()=>{let e=Number(window.localStorage.getItem(`mint:sidebar-width`));return e>=rj&&e<=ij?e:nj}),[lt,ut]=(0,Q.useState)(()=>window.localStorage.getItem(`mint:smart-context`)!==`false`),[dt,ft]=(0,Q.useState)(()=>window.localStorage.getItem(`mint:agent-mode`)===`true`),[pt,mt]=(0,Q.useState)(()=>window.localStorage.getItem(`mint:plan-mode`)===`true`),[ht,gt]=(0,Q.useState)(``),[_t,vt]=(0,Q.useState)(!1),[yt,bt]=(0,Q.useState)(!1),[xt,Ct]=(0,Q.useState)(null),[wt,Tt]=(0,Q.useState)([]),Et=(0,Q.useRef)(null),Dt=(0,Q.useRef)(0),{modelVisible:Ot,scale:kt,interactionEnabled:At,showInteractionGuide:jt,isLocked:Mt,layoutPreset:Nt,expressionIndex:Ft,accessoryIndex:Lt,modelReady:zt,proactiveSuggestion:Bt,setScale:Vt,setIsLocked:Ht,setExpressionIndex:Ut,setAccessoryIndex:Wt,setModelReady:Gt,toggleModel:Kt,changeLayoutPreset:qt,updateInteractionEnabled:Jt,updateInteractionGuide:Yt,dismissProactiveSuggestion:Xt,handleProactiveAction:Zt}=MA(e=>D(e)),Qt=_t&&zt||yt,[$t,en]=(0,Q.useState)(``),[tn,nn]=(0,Q.useState)(``),[rn,an]=(0,Q.useState)(``),[on,sn]=(0,Q.useState)(``),[cn,ln]=(0,Q.useState)(``),un=async(e,t)=>{let n={...xt||St,[e]:t};if(Ct(n),window.settingsApi)await window.settingsApi.saveSettings(n);else try{await ye(`user-settings`,JSON.stringify(n))}catch(e){console.error(`Failed to save settings field:`,e)}},dn=async e=>{if(!$t.trim()||!tn.trim()){alert(`Please provide at least a server name and command.`);return}let t={};if(on.trim())try{t=JSON.parse(on)}catch{alert(`Invalid JSON in Environment variable field.`);return}let n=$t.trim(),r=rn.split(/\s+/).filter(Boolean),i=xt||St,a={...i,mcpServers:{...i?.mcpServers,[n]:{command:tn.trim(),args:r,env:t,icon:cn.trim()||void 0}}};if(e&&(a.allowedMcpTools={...i?.allowedMcpTools||{},[n]:[`*`]}),Ct(a),window.settingsApi)await window.settingsApi.saveSettings(a);else try{await ye(`user-settings`,JSON.stringify(a))}catch(e){console.error(`Failed to save settings field:`,e)}en(``),nn(``),an(``),sn(``),ln(``)},fn=async e=>{let t={...(xt||St)?.mcpServers||{}};delete t[e],await un(`mcpServers`,t)},pn=e=>{},[mn,hn]=(0,Q.useState)(!1),[gn,_n]=(0,Q.useState)(null),[vn,M]=(0,Q.useState)(``);(0,Q.useEffect)(()=>{function e(e){(e.ctrlKey||e.metaKey)&&e.key===`k`?(e.preventDefault(),hn(e=>!e)):e.key===`Escape`&&hn(!1)}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,Q.useEffect)(()=>{mn||M(``)},[mn]);let yn=(0,Q.useRef)(oe);(0,Q.useEffect)(()=>{yn.current=oe},[oe]);let bn=(0,Q.useRef)(!1);(0,Q.useEffect)(()=>{if(!bn.current){bn.current=!0;return}ae.current=!0,k(IA(r))},[r]),(0,Q.useEffect)(()=>{if(ae.current){ae.current=!1;return}let e=window.setTimeout(()=>LA(r,O),300);return()=>window.clearTimeout(e)},[O,r]),(0,Q.useEffect)(()=>{if(t!==`chat`||!r)return;let e=window.setInterval(async()=>{if(!(document.visibilityState!==`visible`||he))try{let e=(await g(50,r,s||null)).reverse(),t=yn.current,n=t[t.length-1],i=e[e.length-1];if(t.length===e.length&&n?.id===i?.id)return;ce(e),Be(t=>Rt(t,e))}catch{}},3e3);return()=>window.clearInterval(e)},[t,r,he,s]),(e=>{let t={};return e.forEach(e=>{let n=e.updatedAt||e.createdAt;if(!n){let n=`Other`;t[n]||(t[n]=[]),t[n].push(e);return}let r=Pt(n),i=new Date,a=new Date;a.setDate(i.getDate()-1);let o=``;if(r.toDateString()===i.toDateString())o=`Today`;else if(r.toDateString()===a.toDateString())o=`Yesterday`;else{let e=Math.abs(i.getTime()-r.getTime()),t=Math.ceil(e/(1e3*60*60*24));o=t<=7?`Previous 7 days`:t<=30?`Previous 30 days`:r.toLocaleDateString(`en-US`,{month:`long`,year:`numeric`})}t[o]||(t[o]=[]),t[o].push(e)}),t})(wt.filter(e=>e.kind===`cli`||e.id===`conversation-default`?!1:e.title.toLowerCase().includes(vn.toLowerCase())));async function xn(){let e=(await g(50,r,s||null)).reverse();ce(e),Be(t=>Rt(t,e))}async function Sn(){Tt(await l())}let[N,Cn]=(0,Q.useState)(!1);async function wn(){Cn(!0);try{me(await C())}finally{Cn(!1)}}(0,Q.useEffect)(()=>{Promise.allSettled([se().then(x),xn(),Sn(),window.settingsApi?.getSettings().then(e=>{Ct(e),Ue({...St,...e})})]).then(e=>{let t=e.find(e=>e.status===`rejected`);t?.status===`rejected`&&D(Le(t.reason)),vt(!0)});let e=window.api.onSpotlightToChat(e=>{h(`chat`),k(e)}),t=window.api.onVisionReady(e=>{Ke(e).catch(()=>e).then(t=>{Je(n=>[...n,{dataUri:e,previewDataUri:t,name:`Screen capture`}])})}),n=()=>{se().then(x).catch(()=>{}),window.settingsApi?.getSettings?.().then(e=>{e&&(Ct(e),Ue(e))}).catch(()=>{}),window.api?.clearAiNotifications?.()};window.addEventListener(`focus`,n),window.api?.onSettingsChanged?.(e=>{Ct(e),Ue(e),se().then(x).catch(()=>{})});let r=S(`tool-approval-requested`,e=>{it.current?te(e.payload.token,!0).catch(e=>{console.error(`Auto approval failed:`,e)}):(tt(e.payload),KA(e.payload))});return()=>{window.removeEventListener(`focus`,n),r?.then?.(e=>e?.()),e?.then?.(e=>e?.()),t?.then?.(e=>e?.())}},[]),(0,Q.useEffect)(()=>{let e=window.setTimeout(()=>bt(!0),1e4);return()=>window.clearTimeout(e)},[]),(0,Q.useEffect)(()=>{(t===`pictures`||t===`imagine`)&&wn().catch(e=>D(Le(e)))},[t]),(0,Q.useEffect)(()=>{t===`workspace`&&!dt&&An(!0)},[t,dt]),(0,Q.useEffect)(()=>{Et.current?.scrollIntoView({behavior:`smooth`})},[oe,he,Ae,et,Ie]);let Tn=e=>{gt(e),setTimeout(()=>gt(t=>t===e?``:t),3e3)},En=()=>{if(window.innerWidth<=760){m(!1);return}let e=!at;window.localStorage.setItem(`mint:sidebar-collapsed`,String(e)),ot(e),m(!1)},Dn=e=>{ct(Math.max(aj,Math.min(ij,e)))},On=e=>{if(e<aj){ct(nj),window.localStorage.setItem(`mint:sidebar-width`,String(nj)),window.localStorage.setItem(`mint:sidebar-collapsed`,`true`),ot(!0);return}let t=Math.max(rj,Math.min(ij,e));ct(t),window.localStorage.setItem(`mint:sidebar-width`,String(t))},kn=e=>{window.localStorage.setItem(`mint:smart-context`,String(e)),ut(e)},An=e=>{window.localStorage.setItem(`mint:agent-mode`,String(e)),ft(e)},jn=e=>{window.localStorage.setItem(`mint:plan-mode`,String(e)),mt(e)},Mn=e=>{let t=e.trim();t?window.localStorage.setItem(XA,t):window.localStorage.removeItem(XA),c(t)};(0,Q.useEffect)(()=>{he||(it.current=!1,rt(!1))},[he]);async function Nn(e,t=!1,n){if(et)try{t&&(it.current=!0,rt(!0)),await te(et.token,e,n)}catch(e){D(Le(e))}finally{tt(null)}}async function Pn(){if(!(!he||!Pe))try{await ee(Pe)}catch(e){console.error(`Failed to cancel message stream:`,e)}finally{be(!1),Fe(null),Te(``),Oe(0),ke(0)}}async function Fn(e,t={}){if(he)return;let n=t.imageAttachments??[],a=t.videoAttachments??[],o=t.documentAttachment??null,c=dt||t.forceAgentMode||e.toLowerCase().startsWith(`search web:`),l=n.map(e=>e.dataUri).join(` `),u=a.map(e=>e.dataUri).join(` `),d=n.length;be(!0),Fe(r),Te(e),Oe(d),ke(a.length),D(``),j(``),Me(null),Re([]),Ge.current=!0,He(e=>({...e,live:!0}));let f=[];t.clearComposer&&(k(``),Je([]),Xe([]),$e(null));try{let n=await Se(c?e:`/chat ${e}`,e=>j(t=>`${t}${e}`),l,t.audioDataUri??null,u,t.systemInstruction??``,e=>{f.push(e),Re(t=>It([...t,e]))},o,s||null,r,void 0,c?pt:!1,t.pinnedMcpServer??null,e=>{it.current?te(e.token,!0).catch(e=>{console.error(`Auto approval failed:`,e)}):(tt(e),KA(e))});Me(n),(document.hidden||!document.hasFocus())&&window.api?.notifyAiResponse?.(WA(n.text));let a=(await g(50,r,s||null)).reverse(),d=a;if(f.length>0){let t=[...a].reverse().find(t=>t.aiText===n.text||t.userText===e)??a[a.length-1];if(t?.id!=null){let e=String(t.id);d=a.map(e=>e.id===t.id?{...e,agentActivity:f}:e),Be(t=>({...t,[e]:f.slice()})),Ge.current&&He(t=>({...t,[e]:!0})),await i(t.id,f)}}if(ce(d),Be(e=>Rt(e,d)),await Sn(),await wn(),typeof window<`u`){let e=(window.location.pathname||``).replace(/\/+$/,``),t=(window.location.hash||``).replace(/^#\/?/,``).replace(/\/+$/,``),n=(e||t).toLowerCase();(!n||n===``||n===`/chat`||n===`chat`||n===`/index.html`||n===`index.html`)&&window.history.replaceState({},``,`/chat/${encodeURIComponent(r)}`)}se().then(x).catch(()=>{}),j(``),Me(null)}catch(e){D(Le(e))}finally{be(!1),Fe(null),Te(``),Oe(0),ke(0)}}async function In(e){e.preventDefault();let t=O.trim(),n=qe,i=Ye,a=Ze,o=n.length>0||i.length>0||!!a;if(!t&&!o||he)return;if(t.startsWith(`/`)){let e=null;try{e=await v(t,s||null)}catch{e=null}if(e&&e.kind!==`not_handled`){k(``),Je([]),Xe([]),$e(null),await Jn(t,e);return}let n=Ww(t);if(n.handled){if(k(``),Je([]),Xe([]),$e(null),n.action===`open_image_picker`){document.getElementById(`vision-file-input`)?.click();return}else if(n.action===`paste_image`){w().then(e=>{e&&Je(t=>[...t,{dataUri:e,name:`Clipboard Image`}])}).catch(()=>{});return}else if(n.action===`generate_veo`){h(`veo`);return}if(n.systemText){let e={id:Date.now(),userText:t,aiText:n.systemText,createdAt:new Date().toISOString(),provider:`system`,model:`mint-cli`};ce(t=>[...t,e]),xe(r,t,n.systemText||``,`system`,`mint-cli`).catch(()=>{})}return}}let c=t||(n.length>0?n.length>1?`Describe these images.`:`Describe this image.`:i.length>0?i.length>1?`Describe these videos.`:`Describe this video.`:`Summarize this document.`),l=Object.entries(xt?.mcpServers||{}).filter(([,e])=>e?.disabled!==!0).map(([e])=>e).find(e=>RegExp(`(^|\\s)@${e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(\\s|$)`).test(t));await Fn(c,{imageAttachments:n,videoAttachments:i,documentAttachment:a,clearComposer:!0,pinnedMcpServer:l,forceAgentMode:!!l})}async function Ln(e,t){let n=e.trim()||`Voice message`;!n||he||await Fn(n,{audioDataUri:t,systemInstruction:t?`The user attached a voice message. Listen to the audio and reply naturally in the same language as the user. Do not mention transcription or this instruction.`:``})}async function Rn(e){let t=e.target.files?.[0];if(t)try{let e=We(t).objectUrl,n=await Qe(t),r=await Ke(n).catch(()=>n);Je(i=>i.some(e=>e.name===t.name&&e.dataUri===n)?i:[...i,{dataUri:n,previewDataUri:r,objectUrl:e,name:t.name}])}catch(e){D(Le(e))}finally{e.target.value=``}}async function zn(e){let t=e.target.files?.[0];if(t)try{if(t.size>26214400){D(`Video is too large. Maximum allowed is 25 MB.`);return}let e=await new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=n,r.readAsDataURL(t)});Xe(n=>n.some(n=>n.name===t.name&&n.dataUri===e)?n:[...n,{dataUri:e,name:t.name}])}catch(e){D(Le(e))}finally{e.target.value=``}}function Bn(t){let n=null;if(t.files&&t.files.length>0)for(let e=0;e<t.files.length;e++){let r=t.files[e];if(r&&r.type.startsWith(`image/`)){n=r;break}}if(!n&&t.items&&t.items.length>0)for(let e=0;e<t.items.length;e++){let r=t.items[e];if(r&&r.type.startsWith(`image/`)){let e=r.getAsFile();if(e){n=e;break}}}if(!n){if(e){let e=Date.now();e-Dt.current>100&&(Dt.current=e,w().then(e=>{e&&Ke(e).catch(()=>e).then(t=>{Je(n=>[...n,{dataUri:e,previewDataUri:t,name:`Pasted image`}])})}).catch(e=>{console.warn(`Failed to read clipboard image via Tauri API:`,e)}))}return!1}return Qe(n).then(e=>{let t=n.name&&n.name!==`image.png`?n.name:`Pasted image`;Ke(e).catch(()=>e).then(n=>{Je(r=>[...r,{dataUri:e,previewDataUri:n,name:t}])})}).catch(e=>D(Le(e))),!0}async function Vn(e){let t=e.target.files?.[0];if(t)try{if(!HC(t.name))throw Error(`Unsupported document type`);$e({filename:t.name,dataUri:await Ne(t)})}catch(e){D(Le(e))}finally{e.target.value=``}}function Hn(){An(!0),k(e=>e.trim()?`Search web: ${e.trim()}`:`Search web: `)}async function Un(){try{let e=await ve();e&&(Mn(e),h(`workspace`))}catch(e){D(Le(e))}}async function Wn(){try{await window.api.startVision()}catch(e){D(Le(e))}}async function Gn(e){try{if(e===`New chat`){if(a(RA()),ce([]),Be({}),j(``),Me(null),k(``),Je([]),$e(null),Re([]),n(`chat`),typeof window<`u`){let e=(window.location.pathname||``).replace(/\/+$/,``);e!==``&&e!==`/chat`&&window.history.pushState({},``,`/chat`)}return}else{if(!window.confirm(`${e} will clear the current conversation history. Continue?`))return;await ne(r)}ce([]),Be({}),j(``),Me(null),k(``),Je([])}catch(e){D(Le(e))}}function Kn(e,t){let n={id:Date.now(),userText:e,aiText:t,createdAt:new Date().toISOString(),provider:`system`,model:`mint-cli`};ce(e=>[...e,n]),xe(r,e,t,`system`,`mint-cli`).catch(()=>{})}function qn(e){switch(e){case`linked_folders`:return`link`;case`cron`:return`cron`;case`skills`:return`skills`;case`plugins`:return`plugins`;case`mcp`:return`mcp`;case`veo`:return`veo`;default:return`chat`}}async function Jn(e,t){switch(t.kind){case`message`:Kn(e,t.markdown);break;case`applied`:{let n=t.effects.find(e=>e.kind===`workspace_changed`);n&&c(n.path);let i=t.effects.find(e=>e.kind===`plan_mode_changed`);i&&mt(i.enabled);let a=t.effects.find(e=>e.kind===`provider_changed`);a&&ce(e=>[...e,{id:Date.now(),userText:a.display,aiText:``,createdAt:new Date().toISOString(),provider:`system`,model:`provider_change`}]),t.effects.some(e=>e.kind===`history_cleared`)&&(await ne(r).catch(()=>{}),ce([])),t.markdown&&Kn(e,t.markdown),t.effects.some(e=>e.kind!==`history_cleared`&&e.kind!==`workspace_changed`)&&(window.settingsApi?.getSettings?.().then(e=>e&&Ct(e)).catch(()=>{}),se().then(x).catch(()=>{}));break}case`navigate`:t.markdown&&Kn(e,t.markdown),h(qn(t.target));break;case`forward_to_agent`:t.plan_mode&&mt(!0),t.agent_mode&&ft(!0),await Fn(t.prompt,{clearComposer:!0});break;case`needs_choice`:_n({command:t.command,title:t.title,options:t.options});break;case`exit`:break}}function Yn(e,t){e===`live`&&(Ge.current=t),He(n=>({...n,[e]:t}))}async function Xn(e){window.localStorage.setItem(ZA,e),PA(),a(e),h(`chat`,e),j(``),Me(null),k(``),Je([]),$e(null),Re([]);let t=(await g(50,e,s||null)).reverse();ce(t),Be(e=>Rt(e,t))}async function Zn(e){if(e===`cli`)return;let t=wt.find(t=>t.id===e)?.title||`this chat`;if(window.confirm(`Delete "${t}"? This will remove the conversation and its messages.`))try{await le(e);let t=wt.filter(t=>t.id!==e&&t.kind!==`cli`&&t.id!==`conversation-default`),n=e===r?t[0]?.id??RA():r;if(n!==r){t.length>0&&t[0]?.id?(window.localStorage.setItem(ZA,n),typeof window<`u`&&window.history.replaceState({},``,`/chat/${encodeURIComponent(n)}`)):(window.localStorage.removeItem(ZA),typeof window<`u`&&window.history.replaceState({},``,`/chat`)),a(n),Re([]);let e=(await g(50,n,s||null)).reverse();ce(e),Be(t=>Rt(t,e))}if(await Sn(),e!==r)return;j(``),Me(null),k(``),Je([]),$e(null)}catch(e){D(Le(e))}}async function P(e,t){if(t.trim())try{await T(e,t.trim()),await Sn()}catch(e){D(Le(e))}}function Qn(e,t){let n=e;if(e===`gemini`)n=`Gemini`;else if(e===`openai`)n=`OpenAI`;else if(e===`openrouter`)n=`OpenRouter`;else if(e===`deepseek`)n=`DeepSeek`;else if(e===`anthropic`)n=`Claude`;else if(e===`huggingface`)n=`HF`;else if(e===`local_openai`)n=`Local`;else if(e===`ollama`)n=`Ollama`;else if(e.startsWith(`custom:`)){let t=e.replace(/^custom:/,``);n=(xt?.customProviders??[]).find(e=>e.id===t)?.displayName||t}return n&&n===e&&(n=n.charAt(0).toUpperCase()+n.slice(1)),[n,t].filter(Boolean).join(` • `)}function $n(e,t){switch(t){case`gemini`:return e.geminiModel||`gemini-1.5-flash`;case`openai`:return e.openaiModel||`gpt-4o`;case`openrouter`:return e.openrouterModel||`anthropic/claude-3.5-sonnet`;case`deepseek`:return e.deepseekModel||`deepseek-chat`;case`anthropic`:return e.anthropicModel||`claude-3-5-sonnet-20240620`;case`huggingface`:return e.hfModel||`meta-llama/Meta-Llama-3-8B-Instruct`;case`local_openai`:return e.localModelName||`llama3`;case`ollama`:return e.ollamaModel||`llama3:latest`;default:if(t.startsWith(`custom:`)){let n=t.replace(/^custom:/,``),r=(e.customProviders??[]).find(e=>e.id===n);return(e.customModelSelections??{})[n]??r?.models[0]?.modelId??``}return``}}async function er(e){try{let t=await window.settingsApi.getSettings();if(t.aiProvider===e)return;t.aiProvider=e,await window.settingsApi.saveSettings(t),Ct(t),x(await se());let n=Qn(e,$n(t,e));oe.length>0&&(await xe(r,n,``,`system`,`provider_change`),await xn())}catch(e){D(Le(e))}}async function tr(e){try{let t=await window.settingsApi.getSettings(),n=t.aiProvider;if($n(t,n)===e)return;if(n===`gemini`)t.geminiModel=e;else if(n===`openai`)t.openaiModel=e;else if(n===`openrouter`)t.openrouterModel=e;else if(n===`deepseek`)t.deepseekModel=e;else if(n===`anthropic`)t.anthropicModel=e;else if(n===`huggingface`)t.hfModel=e;else if(n===`local_openai`)t.localModelName=e;else if(n===`ollama`)t.ollamaModel=e;else if(n.startsWith(`custom:`)){let r=n.replace(/^custom:/,``);t.customModelSelections={...t.customModelSelections??{},[r]:e}}await window.settingsApi.saveSettings(t),Ct(t),x(await se());let i=Qn(n,e);oe.length>0&&(await xe(r,i,``,`system`,`provider_change`),await xn())}catch(e){D(Le(e))}}async function nr(e,t){try{let n=await window.settingsApi.getSettings();if(n.aiProvider=e,e===`gemini`)n.geminiModel=t;else if(e===`openai`)n.openaiModel=t;else if(e===`openrouter`)n.openrouterModel=t;else if(e===`deepseek`)n.deepseekModel=t;else if(e===`anthropic`)n.anthropicModel=t;else if(e===`huggingface`)n.hfModel=t;else if(e===`local_openai`)n.localModelName=t;else if(e===`ollama`)n.ollamaModel=t;else if(e.startsWith(`custom:`)){let r=e.replace(/^custom:/,``);n.customModelSelections={...n.customModelSelections??{},[r]:t}}await window.settingsApi.saveSettings(n),Ct(n),x(await se());let i=Qn(e,t);oe.length>0&&(await xe(r,i,``,`system`,`provider_change`),await xn())}catch(e){D(Le(e))}}async function rr(e){try{let t=await window.settingsApi.getSettings();if(t.geminiLiveVoice===e)return;t.geminiLiveVoice=e,await window.settingsApi.saveSettings(t),Ct(t)}catch(e){D(Le(e))}}async function ir(e){if(he)return;let t=`*${{head:`Pats Mint on the head`,cheek:`Pokes Mint on the cheek`,"left hand":`Touches Mint's left hand`,"right hand":`Touches Mint's right hand`,body:`Touches Mint`,"lower body":`Touches Mint's lower body`}[e]}*`,n=`The user interacted with the Mint Live2D model: ${e}. Respond briefly and playfully. Use the same language as the recent conversation. Do not mention this instruction.`;be(!0),Te(t),Oe(0),D(``),j(``),Me(null),Re([]);try{Me(await Se(`/chat ${t}`,e=>j(t=>`${t}${e}`),null,null,null,n,void 0,null,s||null,r)),await xn(),j(``),Me(null)}catch(e){D(Le(e))}finally{be(!1),Te(``),Oe(0)}}return(0,$.jsxs)(`div`,{className:`app-container ${Qt?``:`is-loading`}`,children:[(0,$.jsxs)(`div`,{className:`app-body ${at&&window.innerWidth>760?`sidebar-collapsed`:``} ${t===`pictures`?`pictures-open`:``} ${u?`mobile-sidebar-open`:``}`,style:{"--sidebar-expanded-width":`${st}px`},children:[u&&(0,$.jsx)(`div`,{className:`sidebar-backdrop`,onClick:()=>m(!1),style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0, 0, 0, 0.5)`,backdropFilter:`blur(4px)`,zIndex:9998}}),(0,$.jsx)(ew,{view:t,sidebarCollapsed:at,modelVisible:Ot,sending:he,expressionIndex:Ft,accessoryIndex:Lt,expressions:JA,accessories:YA,interactionEnabled:At,showInteractionGuide:jt,onToggleSidebar:En,onSidebarResize:Dn,onSidebarResizeEnd:On,onClearHistory:Gn,chatSessions:wt,activeConversationId:r,onSelectConversation:Xn,onDeleteConversation:Zn,onRenameConversation:P,onSetView:h,onToggleModel:Kt,onSetExpressionIndex:Ut,onSetAccessoryIndex:Wt,onSetInteractionEnabled:Jt,onSetShowInteractionGuide:Yt,onShowToast:Tn,isSearchOpen:mn,onSetSearchOpen:hn,showWorkspaceTab:e,promoteMediaStudios:!e}),(0,$.jsxs)(`main`,{className:`assistant-workspace ${Nt===`chat-wide`?`layout-chat-wide`:`layout-model-wide`} ${Ot||t===`workspace`?``:`model-hidden`} ${t===`workspace`?`workspace-open`:``}`,style:t===`skills`||t===`mcp`||t===`plugins`||t===`cron`||t===`link`||t===`pictures`||t===`imagine`||t===`veo`?{display:`none`}:void 0,children:[Bt&&(0,$.jsxs)(`div`,{className:`proactive-bar`,style:{position:`absolute`,top:0,left:0,right:0,zIndex:100},children:[(0,$.jsxs)(`div`,{className:`proactive-header`,children:[(0,$.jsx)(`span`,{className:`proactive-icon`,children:`✨`}),(0,$.jsx)(`div`,{className:`proactive-message`,children:Bt.message}),(0,$.jsx)(`button`,{className:`proactive-dismiss-btn`,onClick:Xt,children:`Dismiss`})]}),(0,$.jsx)(`div`,{className:`proactive-chips`,children:Bt.suggestions?.map((e,t)=>(0,$.jsx)(`button`,{className:`suggestion-chip`,onClick:()=>Zt(e.action),children:e.label},t))})]}),gn&&(0,$.jsxs)(`div`,{className:`proactive-bar`,style:{position:`absolute`,top:0,left:0,right:0,zIndex:100},children:[(0,$.jsxs)(`div`,{className:`proactive-header`,children:[(0,$.jsx)(`span`,{className:`proactive-icon`,children:`⚡`}),(0,$.jsx)(`div`,{className:`proactive-message`,children:gn.title}),(0,$.jsx)(`button`,{className:`proactive-dismiss-btn`,onClick:()=>_n(null),children:`Dismiss`})]}),(0,$.jsx)(`div`,{className:`proactive-chips`,children:gn.options.map(e=>(0,$.jsx)(`button`,{className:`suggestion-chip`,onClick:()=>{let t=`${gn.command} ${e.value}`;_n(null),v(t,s||null).then(e=>Jn(t,e)).catch(()=>{})},children:e.label},e.value))})]}),t===`workspace`&&(0,$.jsx)(Lw,{agentMode:dt,sending:he,workspacePath:s,onEnableAgentMode:()=>An(!0),onSetMessage:k,onWorkspaceReady:Mn}),(0,$.jsx)(kw,{scale:kt,expressionIndex:Ft,accessoryIndex:Lt,isLocked:Mt,isActive:Ot&&t!==`pictures`&&t!==`workspace`&&t!==`imagine`&&t!==`veo`&&t!==`skills`&&t!==`mcp`&&t!==`plugins`,layoutPreset:Nt,sending:he,interactionEnabled:At,showInteractionGuide:jt,toastMessage:ht,onSetScale:Vt,onSetLocked:Ht,onSetView:h,onChangeLayoutPreset:qt,onDismissToast:()=>gt(``),onInteract:ir,onModelLoadComplete:()=>Gt(!0)}),(0,$.jsx)(QC,{interactions:oe,sending:he&&Pe===r,sendingMessage:Pe===r?we:``,sendingImageCount:Pe===r?De:0,streamedReply:Pe===r?Ae:``,streamedResponse:Pe===r?je:null,agentProgress:Pe===r?Ie:[],sendingVideoCount:Pe===r?A:0,agentActivitySnapshots:ze,thinkingExpanded:Ve,onThinkingExpandedChange:Yn,message:O,imageAttachments:qe,videoAttachments:Ye,documentName:Ze?.filename??``,pendingApproval:Pe===r?et:null,smartContext:lt,agentMode:dt,planMode:pt,status:b,workspacePath:s,chatEnd:Et,welcomeInteraction:oj,onSubmit:In,onSelectImage:Rn,onSelectVideo:zn,onSelectDocument:Vn,onPasteImage:Bn,onSetMessage:k,onSendVoiceMessage:Ln,onRemoveImage:e=>{Je(t=>t.filter((t,n)=>n!==e))},onRemoveVideo:e=>{Xe(t=>t.filter((t,n)=>n!==e))},onRemoveDocument:()=>$e(null),onStartWebSearch:Hn,onCaptureScreen:Wn,onSetSmartContext:kn,onSetAgentMode:An,onSetPlanMode:e?jn:void 0,onSetProvider:er,onSelectWorkspace:e?Un:void 0,settingsConfig:xt,onSetModel:tr,onSelectModelAndProvider:nr,onSetGeminiLiveVoice:rr,onApproval:Nn,onCancelMessage:Pn,onClearMessages:()=>Gn(`Clear history`),onToggleMobileSidebar:()=>m(!u)})]}),t===`skills`&&(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,background:`transparent`},children:(0,$.jsx)(Jw,{listSkills:y,addSkill:_e,deleteSkill:re,workspacePath:s})}),t===`mcp`&&(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,background:`transparent`},children:(0,$.jsx)(DA,{config:xt||St,updateField:un,mcpName:$t,setMcpName:en,mcpCmd:tn,setMcpCmd:nn,mcpArgs:rn,setMcpArgs:an,mcpEnv:on,setMcpEnv:sn,mcpIcon:cn,setMcpIcon:ln,handleAddMcpServer:dn,handleRemoveMcpServer:fn,detectTools:Ce,onReauth:p,listServerTools:o})}),t===`plugins`&&(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,background:`transparent`},children:(0,$.jsx)(AA,{config:xt||St,updateField:un,handleConnectPlugin:pn})}),t===`cron`&&(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,background:`transparent`},children:(0,$.jsx)(xA,{listCronJobs:d,addCronJob:de,removeCronJob:ge,setCronJobEnabled:pe,workspacePath:s})}),t===`link`&&(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,background:`transparent`},children:(0,$.jsx)(wA,{listLinkedFolders:Ee,addLinkedFolder:ie,removeLinkedFolder:f,selectFolder:fe})}),(0,$.jsx)(jw,{view:t,pictures:ue,onSetView:h,onRefreshPictures:wn}),(0,$.jsx)(dw,{view:t,onRefreshPictures:wn,onSendToChat:(e,t)=>{h(`chat`),k(t)},onToggleMobileSidebar:()=>m(!u)}),(0,$.jsx)(xw,{view:t,onSendToChat:e=>{h(`chat`),k(e)},onToggleMobileSidebar:()=>m(!u)})]}),(0,$.jsx)(`div`,{className:`startup-loading ${Qt?`is-hidden`:``}`,"aria-live":`polite`,"aria-busy":!Qt,children:(0,$.jsxs)(`div`,{className:`startup-loading-content`,children:[(0,$.jsxs)(`div`,{className:`startup-loading-dots`,"aria-hidden":`true`,children:[(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{}),(0,$.jsx)(`span`,{})]}),(0,$.jsx)(`div`,{className:`startup-loading-text`,children:`Loading Mint Agent`})]})}),E&&(0,$.jsxs)(`div`,{className:`mint-error`,style:{position:`absolute`,bottom:`20px`,right:`20px`,zIndex:100,margin:0,boxShadow:`0 8px 24px rgba(0,0,0,0.3)`,display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,$.jsx)(`span`,{children:E}),(0,$.jsx)(`button`,{onClick:()=>D(``),style:{background:`transparent`,border:0,color:`white`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,padding:0},children:(0,$.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,$.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,$.jsx)(zw,{isOpen:mn,onClose:()=>hn(!1),onSelectChat:e=>{Xn(e),hn(!1)},onNewChat:()=>{Gn(`New chat`),hn(!1)},onSelectWorkspace:e?Un:void 0,onOpenSettings:()=>{h(`settings`),hn(!1)},onChangeView:e=>{h(e),hn(!1)},onChangeModel:e=>{un(`model`,e),gt(`Switched model to ${e}`)},onChangeProvider:e=>{un(`provider`,e),gt(`Switched provider to ${e}`)},onExecuteSlash:e=>{k(e+` `),hn(!1)},chatSessions:wt,currentChatId:r,workspacePath:s})]})}var Q,$,JA,YA,XA,ZA,QA,$A,ej,tj,nj,rj,ij,aj,oj,sj=t((()=>{Q=e(A()),Bt(),h(),$C(),nw(),_w(),Ow(),Aw(),Iw(),Rw(),Hw(),He(),Gw(),$=j(),_t(),Yw(),SA(),TA(),OA(),jA(),GC(),NA(),JA=[`Default`,`Dumb Cat`,`Dumb Cat Eye Roll`,`Take Photo`,`Poke`,`Cat Filter`],YA=[`None`,`Apron`,`Glasses`,`Hold Pen`],XA=`mint:last-workspace-path`,ZA=`mint:active-conversation-id`,QA=`mint:last-active-timestamp`,$A=1800*1e3,ej=`mint:draft:`,tj=e=>`${ej}${e}`,nj=264,rj=200,ij=420,aj=170,oj={id:-1,userText:``,aiText:`Hi there! I'm Mint, your AI assistant! 🎯✨ I'm here and ready to help you with whatever you need. I've been organizing some background data to make things smoother for you. 💖
|
|
56
|
-
|
|
57
|
-
But the moment you start chatting with me, I'll put everything aside and focus on you! Is there something I can help you with today, or would you like to chat about something special? Let's do this! 🚀💪`,provider:`gemini`,model:`gemini-3-flash-preview`,createdAt:new Date().toISOString()}}));t((()=>{sj()}))();export{qA as default};
|